From a715689c4575db6ed54055b182460e3d55485d6e Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 7 Aug 2024 11:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E4=BF=AE=E6=94=B9=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventorychangeRequestMain/index.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index 945297a7d..1f1d10ecc 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/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;