feat(标签打印): 增加镀锌原料标签类型并优化标签选择逻辑
- 在LabelRender组件中新增类型5的标签尺寸配置 - 修改ZincRawTag组件中下工序默认值为'镀锌卷' - 在do.vue中新增标签尺寸映射并实现根据物料类型和仓库自动选择标签类型
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
<div class="grid-cell label-cell">下工序</div>
|
||||
<div class="grid-cell value-cell">
|
||||
<div class="nob" contenteditable>{{ content.nextProcess || '冷硬卷' }}</div>
|
||||
<div class="nob" contenteditable>{{ content.nextProcess || '镀锌卷' }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 第四行:包装要求、切边要求 -->
|
||||
|
||||
@@ -91,6 +91,10 @@ export default {
|
||||
width: 100,
|
||||
height: 80,
|
||||
},
|
||||
'5': {
|
||||
width: 180,
|
||||
height: 100,
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -246,8 +246,7 @@
|
||||
<div class="info-item">
|
||||
<span class="info-label">品名:</span>
|
||||
<span class="info-value">
|
||||
<el-popover placement="top" width="280" trigger="hover"
|
||||
popper-class="material-params-popover">
|
||||
<el-popover placement="top" width="280" trigger="hover" popper-class="material-params-popover">
|
||||
<div class="material-params-content">
|
||||
<div class="params-list">
|
||||
<div class="param-item">
|
||||
@@ -273,7 +272,7 @@
|
||||
<span class="param-value">{{ item.manufacturer }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<span slot="reference" style="cursor: pointer; color: #2bf;">{{ item.itemName || '—' }}</span>
|
||||
@@ -552,6 +551,28 @@ export default {
|
||||
defectCode: null,
|
||||
degree: 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: {
|
||||
list: [],
|
||||
@@ -633,8 +654,24 @@ export default {
|
||||
handlePrintLabel(row) {
|
||||
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
|
||||
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
|
||||
|
||||
this.labelRender.type = row.itemType === 'product' ? '3' : '2'
|
||||
const itemType = row.itemType || '';
|
||||
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 = {
|
||||
...row,
|
||||
itemName: itemName,
|
||||
|
||||
Reference in New Issue
Block a user