|
|
@ -160,6 +160,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
|
newRow['locationCode'] = item['locationCode'] |
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
newRow['originFrozen'] = newRow['frozen']=='TRUE'?true:false //记录原始数据用于判断 |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
} else { |
|
|
@ -445,11 +446,25 @@ const submitForm = async (formType, submitData) => { |
|
|
|
if(data.masterId){ |
|
|
|
data.id = data.masterId |
|
|
|
} |
|
|
|
let findInventoryStatus = tableData.value.find(item=>item.fromInventoryStatus&&item.toInventoryStatus&&item.fromInventoryStatus==item.toInventoryStatus) |
|
|
|
if(tableData.value.find(item=>!item.toInventoryStatus)){ |
|
|
|
message.warning('请选择到库存状态') |
|
|
|
return |
|
|
|
} |
|
|
|
if(tableData.value.find(item=>!item.toQty||item.toQty==0)){ |
|
|
|
message.warning('请填写到数量') |
|
|
|
return |
|
|
|
} |
|
|
|
if(tableData.value.find(item=>!item.toExpireDate)){ |
|
|
|
message.warning('请选择到过期日期') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
let findInventoryStatus = tableData.value.find(item=>item.fromInventoryStatus&&item.toInventoryStatus&&item.fromInventoryStatus==item.toInventoryStatus&&item.fromQty&&item.toQty&&item.fromQty==item.toQty&&item.fromExpireDate&&item.toExpireDate&&item.fromExpireDate==item.toExpireDate&&item.originFrozen==item.frozen) |
|
|
|
if(findInventoryStatus){ |
|
|
|
message.warning('从库存状态和到库存状态不能相同') |
|
|
|
message.warning('您未修改数据') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
const duplicateItems = tableData.value.filter((item, index) => { |
|
|
|
return tableData.value.findIndex((el) => el.itemCode === item.itemCode) !== index; |
|
|
|