feat(标签打印): 增加镀锌原料标签类型并优化标签选择逻辑

- 在LabelRender组件中新增类型5的标签尺寸配置
- 修改ZincRawTag组件中下工序默认值为'镀锌卷'
- 在do.vue中新增标签尺寸映射并实现根据物料类型和仓库自动选择标签类型
This commit is contained in:
砂糖
2026-03-09 13:24:16 +08:00
parent a2b90f3b72
commit f389576c92
3 changed files with 47 additions and 6 deletions

View File

@@ -31,7 +31,7 @@
</div> </div>
<div class="grid-cell label-cell">下工序</div> <div class="grid-cell label-cell">下工序</div>
<div class="grid-cell value-cell"> <div class="grid-cell value-cell">
<div class="nob" contenteditable>{{ content.nextProcess || '冷硬卷' }}</div> <div class="nob" contenteditable>{{ content.nextProcess || '镀锌卷' }}</div>
</div> </div>
<!-- 第四行包装要求切边要求 --> <!-- 第四行包装要求切边要求 -->

View File

@@ -91,6 +91,10 @@ export default {
width: 100, width: 100,
height: 80, height: 80,
}, },
'5': {
width: 180,
height: 100,
},
} }
} }
}, },

View File

@@ -246,8 +246,7 @@
<div class="info-item"> <div class="info-item">
<span class="info-label">品名</span> <span class="info-label">品名</span>
<span class="info-value"> <span class="info-value">
<el-popover placement="top" width="280" trigger="hover" <el-popover placement="top" width="280" trigger="hover" popper-class="material-params-popover">
popper-class="material-params-popover">
<div class="material-params-content"> <div class="material-params-content">
<div class="params-list"> <div class="params-list">
<div class="param-item"> <div class="param-item">
@@ -273,7 +272,7 @@
<span class="param-value">{{ item.manufacturer }}</span> <span class="param-value">{{ item.manufacturer }}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<span slot="reference" style="cursor: pointer; color: #2bf;">{{ item.itemName || '—' }}</span> <span slot="reference" style="cursor: pointer; color: #2bf;">{{ item.itemName || '—' }}</span>
@@ -552,6 +551,28 @@ export default {
defectCode: null, defectCode: null,
degree: null, degree: null,
remark: null remark: null
},
tagSizeMap: {
'2': {
width: 100,
height: 80,
},
'3': {
width: 180,
height: 100,
},
'4': {
width: 180,
height: 100,
},
'where': {
width: 100,
height: 80,
},
'5': {
width: 180,
height: 100,
},
}, },
stepSpilt: { stepSpilt: {
list: [], list: [],
@@ -633,8 +654,24 @@ export default {
handlePrintLabel(row) { handlePrintLabel(row) {
const item = row.itemType === 'product' ? row.product : row.rawMaterial; const item = row.itemType === 'product' ? row.product : row.rawMaterial;
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || ''; const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
const itemType = row.itemType || '';
this.labelRender.type = row.itemType === 'product' ? '3' : '2' const warehouseId = row.warehouseId || '';
// 在镀锌颜料库的卷使用镀锌原料标签
if (itemType == 'raw_material' && warehouseId == '1988150263284953089') {
this.labelRender.type = '5';
} else if (itemType == 'raw_material') {
this.labelRender.type = '2';
} else if (itemType == 'product' && itemName == '冷硬卷') {
this.labelRender.type = '3';
} else if (itemType == 'product' && itemName == '热轧卷板') {
this.labelRender.type = '3';
} else if (itemType == 'product' && itemName == '镀锌卷') {
this.labelRender.type = '4';
} else if (itemType == 'product' && itemName == '冷轧卷') {
this.labelRender.type = '3';
} else {
this.labelRender.type = '3';
}
this.labelRender.data = { this.labelRender.data = {
...row, ...row,
itemName: itemName, itemName: itemName,