feat(标签打印): 添加分条成品标签类型及打印组件

新增分条成品标签类型,支持在特定仓库中自动识别并打印分条成品标签。添加SplitTag.vue组件用于分条成品标签的渲染,并更新相关逻辑以支持新的标签类型。
This commit is contained in:
砂糖
2026-03-24 14:52:47 +08:00
parent cbc4334db9
commit 062bcd0b71
3 changed files with 310 additions and 4 deletions

View File

@@ -44,6 +44,12 @@
:paperWidthMm="180"
:paperHeightMm="100"
/>
<SplitTag
v-if="tagType === 'split'"
:content="content"
:paperWidthMm="180"
:paperHeightMm="100"
/>
</div>
<div class="action-buttons" v-if="!hideActions">
<el-button type="primary" @click="downloadLabelAsImage">下载标签图片</el-button>
@@ -65,7 +71,7 @@ import WhereTag from './WhereTag.vue';
import ZincRawTag from './ZincRawTag.vue';
import DuGeTag from './DuGeTag.vue';
import TuoZhiTag from './TuoZhiTag.vue';
import SplitTag from './SplitTag.vue';
export default {
name: 'LabelRender',
@@ -77,6 +83,7 @@ export default {
ZincRawTag,
DuGeTag,
TuoZhiTag,
SplitTag,
// SampleTagPreview,
// ForgeTagPreview,
// SaltSprayTagPreview,
@@ -113,6 +120,10 @@ export default {
width: 180,
height: 100,
},
'split': {
width: 180,
height: 100,
},
}
}
},
@@ -151,8 +162,10 @@ export default {
this.labelType = '6';
} else if (itemType == 'raw_material') {
this.labelType = '2';
} else if (itemType == 'product') {
this.labelType = 'where';
}
// 分条成品
else if (itemType == 'product' && (warehouseId == '1988150210872930306' || warehouseId == '1988150800092950529' || warehouseId == '1988150380649967617' || warehouseId == '1988151027466170370')) {
this.labelType = 'split';
} else if (itemType == 'product' && itemName == '冷硬卷') {
this.labelType = '3';
} else if (itemType == 'product' && itemName == '热轧卷板') {