refactor(wms): 优化钢卷操作表单的数据结构
使用对象展开运算符简化表单数据初始化与提交逻辑 添加质量状态、包装要求等新字段 移除冗余的watch和重复的仓库名称获取逻辑
This commit is contained in:
@@ -246,7 +246,11 @@ export default {
|
||||
grossWeight: null,
|
||||
netWeight: null,
|
||||
warehouseId: null,
|
||||
actualWarehouseId: null
|
||||
actualWarehouseId: null,
|
||||
qualityStatus: '',
|
||||
packagingRequirement: '',
|
||||
packingStatus: '',
|
||||
trimmingRequirement: ''
|
||||
},
|
||||
loading: false,
|
||||
// 钢卷选择器可见性
|
||||
@@ -407,7 +411,8 @@ export default {
|
||||
materialName: data.materialName || (data.rawMaterial ? data.rawMaterial.rawMaterialName : ''),
|
||||
productName: data.productName || (data.product ? data.product.productName : ''),
|
||||
specification: data.rawMaterial?.specification || data.product?.specification || '',
|
||||
bomItems: data.bomItemList || []
|
||||
bomItems: data.bomItemList || [],
|
||||
|
||||
},
|
||||
{
|
||||
coilId: null,
|
||||
@@ -782,16 +787,8 @@ export default {
|
||||
.join(',');
|
||||
|
||||
const mergeData = {
|
||||
...this.targetCoil,
|
||||
enterCoilNo: enterCoilNos, // 拼接的入场钢卷号
|
||||
currentCoilNo: this.targetCoil.currentCoilNo,
|
||||
team: this.targetCoil.team,
|
||||
materialType: this.targetCoil.materialType,
|
||||
itemType: this.targetCoil.itemType,
|
||||
itemId: this.targetCoil.itemId,
|
||||
grossWeight: this.targetCoil.grossWeight,
|
||||
netWeight: this.targetCoil.netWeight,
|
||||
warehouseId: this.targetCoil.warehouseId,
|
||||
actualWarehouseId: this.targetCoil.actualWarehouseId,
|
||||
hasMergeSplit: 2, // 2表示合卷
|
||||
newCoils: this.sourceCoils.map(item => ({
|
||||
coilId: item.coilId,
|
||||
|
||||
Reference in New Issue
Block a user