Browse Source

库存修改判断校验

hella_online_20240829
wangyufei 3 months ago
parent
commit
a715689c45
  1. 19
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

19
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

@ -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;

Loading…
Cancel
Save