feat(wms): 添加类型不匹配钢卷管理功能并优化材料类型处理
1. 新增类型不匹配钢卷查询接口和页面 2. 优化材料类型变更处理逻辑,自动清空物品选择 3. 移除表单复制时冗余的材料类型同步调用
This commit is contained in:
@@ -610,8 +610,15 @@ export default {
|
||||
|
||||
// 材料类型变更处理
|
||||
handleMaterialTypeChange(val) {
|
||||
// 根据材料类型设置itemType
|
||||
this.splitForm.itemType = val === '成品' ? 'product' : val === '原料' ? 'raw_material' : ''
|
||||
// 清空物品选择
|
||||
this.splitForm.itemId = null;
|
||||
|
||||
// 根据材料类型设置物品类型
|
||||
if (val === '成品') {
|
||||
this.splitForm.itemType = 'product';
|
||||
} else if (val === '原料') {
|
||||
this.splitForm.itemType = 'raw_material';
|
||||
}
|
||||
},
|
||||
|
||||
// 选中分条列表项(显示详情)
|
||||
@@ -640,8 +647,6 @@ export default {
|
||||
this.selectedSplitItem = null
|
||||
// 赋值表单数据
|
||||
this.splitForm = { ...row }
|
||||
// 同步材料类型和长度显示状态
|
||||
this.handleMaterialTypeChange(row.materialType)
|
||||
},
|
||||
|
||||
// 新增/编辑分条
|
||||
@@ -883,11 +888,6 @@ export default {
|
||||
...copiedFields
|
||||
};
|
||||
|
||||
// 同步材料类型和长度显示状态
|
||||
if (this.splitForm.materialType) {
|
||||
this.handleMaterialTypeChange(this.splitForm.materialType);
|
||||
}
|
||||
|
||||
this.$message.success('已复制源卷信息,请根据需要修改');
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user