feat(wms): 添加镀锌卷标签组件并替换旧标签组件

- 新增GalvanisedTag.vue组件用于显示镀锌卷标签
- 在LabelRender中替换SampleTagPreview为新的GalvanisedTag组件
- 调整标签类型判断逻辑,将镀锌卷的labelType从'3'改为'4'
- 移除不再使用的旧标签组件引用和注释代码
This commit is contained in:
砂糖
2026-01-23 18:05:59 +08:00
parent 0aedf81efb
commit 86a1ea0694
3 changed files with 497 additions and 10 deletions

View File

@@ -14,9 +14,15 @@
:paperWidthMm="180"
:paperHeightMm="100"
/>
<SampleTagPreview v-if="labelType === '4'" :content="content" />
<GalvanisedTag
v-if="labelType === '4'"
:content="content"
:paperWidthMm="180"
:paperHeightMm="100"
/>
<!-- <SampleTagPreview v-if="labelType === '4'" :content="content" />
<ForgeTagPreview v-if="labelType === '5'" :content="content" />
<SaltSprayTagPreview v-if="labelType === '6'" :content="content" />
<SaltSprayTagPreview v-if="labelType === '6'" :content="content" /> -->
</div>
<div class="action-buttons" v-if="!hideActions">
<el-button type="primary" @click="downloadLabelAsImage">下载标签图片</el-button>
@@ -33,18 +39,20 @@ import { PDFDocument } from 'pdf-lib';
import MaterialTag from './MaterialTag.vue';
import OuterTagPreview from './OuterTagPreview.vue';
import SampleTagPreview from './SampleTagPreview.vue';
import ForgeTagPreview from './ForgeTagPreview.vue';
import SaltSprayTagPreview from './SaltSprayTagPreview.vue';
import GalvanisedTag from './GalvanisedTag.vue';
// import SampleTagPreview from './SampleTagPreview.vue';
// import ForgeTagPreview from './ForgeTagPreview.vue';
// import SaltSprayTagPreview from './SaltSprayTagPreview.vue';
export default {
name: 'LabelRender',
components: {
MaterialTag,
OuterTagPreview,
SampleTagPreview,
ForgeTagPreview,
SaltSprayTagPreview,
GalvanisedTag,
// SampleTagPreview,
// ForgeTagPreview,
// SaltSprayTagPreview,
},
data() {
return {
@@ -76,7 +84,7 @@ export default {
} else if (itemType == 'product' && itemName == '热轧卷板') {
this.labelType = '3';
} else if (itemType == 'product' && itemName == '镀锌卷') {
this.labelType = '3';
this.labelType = '4';
} else if (itemType == 'product' && itemName == '冷轧卷') {
this.labelType = '3';
} else {