From 5559705ffa98ea8d0c0f3bbf3463715628cfe071 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 21 Aug 2024 09:31:00 +0800 Subject: [PATCH] =?UTF-8?q?HL-5524=E5=BA=93=E5=AD=98=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=EF=BC=88=E6=96=B0=EF=BC=89=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=BA=BF=E8=BE=B9=E7=9A=84=E8=B4=9F=E6=95=B0?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventorymoveRecordMainNew/index.vue | 17 +++++++++++------ .../inventorymoveRecordRequestMain.data.ts | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue index e81f61d67..508315b44 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue @@ -325,7 +325,6 @@ const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) } //为true表示子表数据中存在数量为0的数据 -const flag = ref() // 主子数据 提交 const submitForm = async (formType, submitData) => { @@ -334,15 +333,20 @@ const submitForm = async (formType, submitData) => { data.id = data.masterId } data.subList = tableData.value // 拼接子表数据参数 + let flag = false data.subList.forEach(item => { item.toBatch = item.fromBatch item.fromLocationCode = data.fromLocationCode item.toLocationCode = data.toLocationCode item.toInventoryStatus = data.toInventoryStatus - - if(item.qty == 0){ - message.error(`数量不能为0!`) - flag.value = true + if(item.checkQty>0&&Number(item.qty)==0){ + message.error(`${item['itemCode']}数量不能为0!`) + flag = true + return; + } + if(item.checkQty>0&&item.qty<0){ + message.error(`${item['itemCode']}数量不能小于0!`) + flag = true return; } }) @@ -351,7 +355,7 @@ const submitForm = async (formType, submitData) => { message.warning('从库位和到库位不能相同') return } - if(flag.value){ + if(flag){ formRef.value.formLoading = false return } @@ -387,6 +391,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['fromInventoryStatus'] = item['inventoryStatus'] newRow['origin_fromLocationCode'] = item['locationCode'] newRow['uom'] = item['uom'] + newRow['checkQty'] = item['qty'] //用于保存的时候作校验 HL-5524 newRow['qty'] = item['qty'] if(item['packingNumber']&&item['packingNumber'].length>0){ newRow['packUnit'] = item['packUnit'] diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts index b35bd6e88..5f075da73 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts @@ -411,14 +411,14 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( form: { component: 'InputNumber', componentProps: { - min: 0, + // min: 0, precision: 6 } }, tableForm: { disabled: false, type: 'InputNumber', - min: 0, + // min: 0, precision: 6 } },