feat(钢卷): 重构标签打印逻辑并添加合卷操作功能

重构钢卷标签打印逻辑,提取公共方法到coilPrint.js
添加合卷操作区功能,支持200-299操作类型
为合卷表单添加验证规则
This commit is contained in:
砂糖
2026-03-16 13:15:54 +08:00
parent d613058104
commit b27f246fa0
7 changed files with 152 additions and 77 deletions

View File

@@ -494,6 +494,7 @@ import RawMaterialInfo from '@/components/KLPService/Renderer/RawMaterialInfo'
import { addCoilAbnormal } from '@/api/wms/coilAbnormal'
import LabelRender from './LabelRender/index.vue'
import StepSplit from './stepSplit.vue'
import { getCoilTagPrintType } from '@/views/wms/coil/js/coilPrint'
export default {
name: 'DoPage',
@@ -715,33 +716,8 @@ export default {
parseTime,
// 打印标签
handlePrintLabel(row) {
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
const itemType = row.itemType || '';
const warehouseId = row.warehouseId || '';
// 在镀锌颜料库的卷使用镀锌原料标签
if (itemType == 'raw_material' && (warehouseId == '1988150263284953089' || warehouseId == '1988150487185289217')) {
this.labelRender.type = '5';
}
// 脱脂原料库
else if (itemType == 'raw_material' && (warehouseId == '1988150545175736322')) {
this.labelRender.type = '6';
}
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 if (itemType == 'product' && itemName == '镀铬卷') {
this.labelRender.type = 'ge';
} else {
this.labelRender.type = '3';
}
const type = getCoilTagPrintType(row);
this.labelRender.type = type;
this.labelRender.data = {
...row,
itemName: itemName,