From 6e31ca6545f632dc3bcb18da4adac1c737c93c38 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Thu, 31 Oct 2024 15:29:36 +0800 Subject: [PATCH] =?UTF-8?q?YT-595=E9=9A=94=E7=A6=BB=E8=BD=AC=E5=90=88?= =?UTF-8?q?=E6=A0=BC=EF=BC=8C=E6=96=B0=E5=A2=9E=EF=BC=8C=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8F=AF=E4=BB=A5=E4=BF=AE=E6=94=B9=E7=BC=96?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventorymoveRequestMain/index.vue | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index ce08198d0..9bb29c449 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -384,6 +384,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['fromLocationCode'] = item['locationCode'] newRow['uom'] = item['uom'] newRow['qty'] = item['qty'] + newRow['inventoryQty'] = item['qty'] if(routeName.value == 'NoktoholdRequestMain'){ newRow['toInventoryStatus'] = "HOLD" }else if ( routeName.value == 'HoldtookRequestMain') { @@ -606,11 +607,11 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const formRef = ref() const openForm =async (type: string, row?: number) => { - InventorymoveRequestDetail.allSchemas.tableFormColumns.forEach(item=>{ - if(item.field == 'qty'){ - item.tableForm.disabled = routeName.value == "HoldtookRequestMain" - } - }) + // InventorymoveRequestDetail.allSchemas.tableFormColumns.forEach(item=>{ + // if(item.field == 'qty'){ + // item.tableForm.disabled = routeName.value == "HoldtookRequestMain" + // } + // }) tableData.value = [] // 重置明细数据 formRef.value.open(type, row) } @@ -768,6 +769,13 @@ const submitForm = async (formType, submitData) => { } formRef.value.formLoading = true try { + const cmdExists = data.subList.some(filter => + parseFloat(filter.inventoryQty) < parseFloat(filter.qty) + ); + if(cmdExists){ + message.warning("数量不能大于库存数量") + return + } if (formType === 'create') { await InventorymoveRequestMainApi.createInventorymoveRequestMain(data) message.success(t('common.createSuccess'))