From fc9c09257988901e7ef5914c3e7de43c468d8404 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 15 Nov 2024 18:03:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=AD=96=E7=95=A5=E5=A4=B1?= =?UTF-8?q?=E5=8E=BB=E7=84=A6=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplieDeliveryStrategy/AddForm.vue | 93 +++++++++++++------ 1 file changed, 66 insertions(+), 27 deletions(-) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue index e3f868382..c10f736dd 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue @@ -82,7 +82,7 @@ :key="'仓库和库区Operator'+cur.value" /> - + @@ -563,45 +563,84 @@ const searchTableSuccess = (formField, searchField, val, type, row) => { } } // 受入地失去焦点校验 -const blurWarehouseByCodes = async ()=>{ - let WarehouseCode = formData.value.condition.find(item=>item['ParamCode']=='WarehouseCode') - if(WarehouseCode&&WarehouseCode.Value){ - let verifyRes = await WarehouseApi.getWarehouseByCodes({ - codes:WarehouseCode.Value - }) - console.log('事务类型verifyRes',verifyRes) - if (verifyRes && verifyRes.length > 0) { - const arr1 = WarehouseCode.Value.split(',') - if (arr1.length != verifyRes.length) { - const arr2 = verifyRes.map((item) => item.code) - const str = [ - ...arr1.filter((item) => !arr2.includes(item)), - ...arr2.filter((item) => !arr1.includes(item)) - ].join(',') - message.alert('代码' + str + '没有找到对应数据') +const blurWarehouseByCodes = async (formField) => { + if (formField == 'WarehouseCode') { + let WarehouseCode = formData.value.condition.find(item=>item['ParamCode']=='WarehouseCode') + if(WarehouseCode&&WarehouseCode.Value){ + let verifyRes = await WarehouseApi.getWarehouseByCodes({ + codes:WarehouseCode.Value + }) + console.log('事务类型verifyRes',verifyRes) + if (verifyRes && verifyRes.length > 0) { + const arr1 = WarehouseCode.Value.split(',') + if (arr1.length != verifyRes.length) { + const arr2 = verifyRes.map((item) => item.code) + const str = [ + ...arr1.filter((item) => !arr2.includes(item)), + ...arr2.filter((item) => !arr1.includes(item)) + ].join(',') + message.alert('代码' + str + '没有找到对应数据') + WarehouseCode.Value = '' + // formData.value.configuration.DockCode='' + // formData.value.configuration.Receiver='' + // formData.value.configuration.PhoneNumber='' + return + } + } else { WarehouseCode.Value = '' // formData.value.configuration.DockCode='' // formData.value.configuration.Receiver='' // formData.value.configuration.PhoneNumber='' - return + message.alert('暂无数据') } - } else { + }else{ + WarehouseCode.Value = '' + // formData.value.configuration.DockCode='' + // formData.value.configuration.Receiver='' + // formData.value.configuration.PhoneNumber='' + } + } else { + let AreaCode = formData.value.condition.find(item=>item['ParamCode']=='AreaCode') + if(AreaCode&&AreaCode.Value){ + let verifyRes = await AreaApi.getAreabasicByCodes({ + codes:AreaCode.Value + }) + console.log('事务类型verifyRes',verifyRes) + if (verifyRes && verifyRes.length > 0) { + const arr1 = AreaCode.Value.split(',') + if (arr1.length != verifyRes.length) { + const arr2 = verifyRes.map((item) => item.code) + const str = [ + ...arr1.filter((item) => !arr2.includes(item)), + ...arr2.filter((item) => !arr1.includes(item)) + ].join(',') + message.alert('代码' + str + '没有找到对应数据') + AreaCode.Value = '' + // formData.value.configuration.DockCode='' + // formData.value.configuration.Receiver='' + // formData.value.configuration.PhoneNumber='' + return + } + } else { + AreaCode.Value = '' + // formData.value.configuration.DockCode='' + // formData.value.configuration.Receiver='' + // formData.value.configuration.PhoneNumber='' + message.alert('暂无数据') + } + }else{ WarehouseCode.Value = '' // formData.value.configuration.DockCode='' // formData.value.configuration.Receiver='' // formData.value.configuration.PhoneNumber='' - message.alert('暂无数据') } - }else{ - WarehouseCode.Value = '' - // formData.value.configuration.DockCode='' - // formData.value.configuration.Receiver='' - // formData.value.configuration.PhoneNumber='' } + } // 供应商失去焦点 -const blurSupplierCode = async ()=>{ - let SupplierCode = formData.value.condition.find(item=>item['ParamCode']=='SupplierCode') +const blurSupplierCode = async () => { + let SupplierCode = formData.value.condition.find(item => item['ParamCode'] == 'SupplierCode') + console.log(77,SupplierCode) if(SupplierCode&&SupplierCode.Value){ let verifyRes = await SupplierApi.getSupplierListByCodes({ codes:SupplierCode.Value