From 9438c8b77ec2ea86210ac27154e4e687a41894f3 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Fri, 27 Sep 2024 10:57:19 +0800 Subject: [PATCH] =?UTF-8?q?HL-6005=E6=8F=90=E7=A4=BA=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=8D=95=E5=8F=B7=E5=8D=A0=E7=94=A8=EF=BC=8C?= =?UTF-8?q?=E7=8E=B0=E9=80=89=E6=8B=A9=E5=AE=8C=E6=95=B0=E9=87=8F=E6=98=BE?= =?UTF-8?q?=E7=A4=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerreturnRequestMain/index.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index cff712b57..e25e2f6f2 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -234,6 +234,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => tableData.value = [...res.list] originTableData.value = [...res.list] } + let messageItemCode = [] + tableData.value.forEach(item=>{ + if(item['subReturnedQty']<=0){ + messageItemCode.push(item['itemCode']) + } + }) + if(messageItemCode.length>0){ + message.error(`发货记录单号${val[0]['number']}物料${messageItemCode.join(',')}被占用`) + } }).catch(err => { console.log(err) message.error('错误') @@ -745,11 +754,16 @@ const clearSearchInput = (field)=>{ } //为true表示子表数据中存在数量为0的数据 const inputNumberChange = (field, val,row, index) => { + console.log('inputNumberChange',formRef.value.formRef) if(field=='qty'){ + if(row['subReturnedQty']<=0){ + message.error(`发货记录单号${formRef.value.formRef.formModel['deliverRecordNumber']}物料${row['itemCode']}被占用`) + } if(row['subReturnedQty']!=null&&row['qty']>row['subReturnedQty']){ message.error(`物料${row['itemCode']}最大数量为${row['subReturnedQty']}`) } } + console.log('inputNumberChange',field, val,row, index) } // 主子数据 提交 @@ -760,6 +774,10 @@ const submitForm = async (formType, submitData) => { } let flag = true tableData.value.forEach(item=>{ + if(item['subReturnedQty']<=0){ + flag = false + message.error(`发货记录单号${data['deliverRecordNumber']}物料${item['itemCode']}被占用`) + } if(item['subReturnedQty']!=null&&item['qty']>item['subReturnedQty']){ flag = false message.error(`物料${item['itemCode']}最大数量为${item['subReturnedQty']}`)