feat(标签打印): 添加镀锌原料标签组件及显示逻辑
新增 ZincRawTag 组件用于显示镀锌原料标签,并在特定仓库条件下自动选择该标签类型。标签包含冷卷号、热卷号、规格等字段,并支持二维码显示和打印适配。
This commit is contained in:
@@ -26,6 +26,12 @@
|
||||
:paperWidthMm="100"
|
||||
:paperHeightMm="80"
|
||||
/>
|
||||
<ZincRawTag
|
||||
v-if="tagType === '5'"
|
||||
: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" /> -->
|
||||
@@ -47,6 +53,8 @@ import MaterialTag from './MaterialTag.vue';
|
||||
import OuterTagPreview from './OuterTagPreview.vue';
|
||||
import GalvanizedTag from './GalvanizedTag.vue';
|
||||
import WhereTag from './WhereTag.vue';
|
||||
import ZincRawTag from './ZincRawTag.vue';
|
||||
|
||||
// import SampleTagPreview from './SampleTagPreview.vue';
|
||||
// import ForgeTagPreview from './ForgeTagPreview.vue';
|
||||
// import SaltSprayTagPreview from './SaltSprayTagPreview.vue';
|
||||
@@ -58,6 +66,7 @@ export default {
|
||||
OuterTagPreview,
|
||||
GalvanizedTag,
|
||||
WhereTag,
|
||||
ZincRawTag,
|
||||
// SampleTagPreview,
|
||||
// ForgeTagPreview,
|
||||
// SaltSprayTagPreview,
|
||||
@@ -114,8 +123,11 @@ export default {
|
||||
watch: {
|
||||
content: {
|
||||
handler(newVal) {
|
||||
const { itemName, itemType } = newVal;
|
||||
if (itemType == 'raw_material') {
|
||||
const { itemName, itemType, warehouseId } = newVal;
|
||||
// 在镀锌颜料库的卷使用镀锌原料标签
|
||||
if (itemType == 'raw_material' && warehouseId == '1988150263284953089') {
|
||||
this.labelType = '5';
|
||||
} else if (itemType == 'raw_material') {
|
||||
this.labelType = '2';
|
||||
} else if (itemType == 'product' && itemName == '冷硬卷') {
|
||||
this.labelType = '3';
|
||||
|
||||
Reference in New Issue
Block a user