From 168447807c5091118cbdb6eda5c884f617f82419 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Fri, 24 May 2024 17:02:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A1=E5=88=92=E7=AD=96?= =?UTF-8?q?=E7=95=A5=EF=BC=8C=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2=E5=8D=A1?= =?UTF-8?q?=E9=A1=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplieDeliveryStrategy/AddForm.vue | 118 +++++++++++------- .../strategy/upShelfStrategy/AddForm.vue | 14 +-- 2 files changed, 78 insertions(+), 54 deletions(-) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue index d0531a644..cdd2ee65a 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue @@ -16,7 +16,7 @@ - - + - + - + - + -
-
规则条件
- - +
+
规则条件
+ + - - - - - - - -
@@ -141,7 +141,7 @@
@@ -150,14 +150,14 @@
-
-
规则配置
- +
+
规则配置
+ - + - - + - - + - - + - - + - - + - - + + - - + + @@ -363,7 +365,8 @@ const options = reactive({ //月台列表 dockList: [], //在途库位列表 - locationList: [] + locationList: [], + originLocationList: [] }) // 弹窗按钮 const Butttondata = ref([ @@ -407,15 +410,35 @@ const getFormWarehouseList = async () => { const getFormDockList = async () => { options.dockList = await getDockList() } +const filterMethodFromLocation = (query: string) => { + if (query) { + options.locationList = options.originLocationList.filter((item) => { + return item?.code.includes(query) + }) + } else { + options.locationList = options.originLocationList + } +} // 获取库位列表 const getFormLocationList = async () => { - options.locationList = await getLocationList({ type: 'TRANSPORT' }) + if(!options.locationList || options.locationList.length==0){ + options.locationList = await getLocationList({ type: 'TRANSPORT' }) + options.originLocationList = [...options.locationList] + }else{ + options.locationList = [] + let timer = setTimeout(()=>{ + options.locationList = options.originLocationList + if(timer){ + clearTimeout(timer) + } + },2000) + } } getFormSupplierList() getFormWarehouseList() getFormDockList() -getFormLocationList() + /** 打开弹窗 */ const open = async (type: string, strategyCode: string, id?: number) => { @@ -469,6 +492,7 @@ const open = async (type: string, strategyCode: string, id?: number) => { defaultButtons.formCloseBtn(null) // 关闭 ] } + getFormLocationList() } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue index 69b2ddad1..4ef5568ae 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue @@ -628,7 +628,7 @@ const options = reactive({ ], //供应商列表 supplierList: [], - orignSupplierList: [], + originSupplierList: [], // 物料类型列表 itemTypeOptions: [ { value: 'ItemType', label: '物料类型' }, @@ -673,21 +673,21 @@ const buttonBaseClick = (val, item) => { } // 获取供应商列表 const getFormSupplierList = async () => { - options.orignSupplierList = await getSupplierList() - options.supplierList = [...options.orignSupplierList] + options.originSupplierList = await getSupplierList() + options.supplierList = [...options.originSupplierList] } // 获取客户列表 const getFormCustomerList = async () => { options.supplierList = await getCustomerList() - options.supplierList = [...options.orignSupplierList] + options.supplierList = [...options.originSupplierList] } const filterMethod = (query: string) => { if (query) { - options.supplierList = options.orignSupplierList.filter((item) => { + options.supplierList = options.originSupplierList.filter((item) => { return item.name.includes(query) }) } else { - options.supplierList = [...options.orignSupplierList] + options.supplierList = [...options.originSupplierList] } } @@ -744,7 +744,7 @@ const filterMethodWarehouseList = (query: string) => { return item.code.includes(query) }) } else { - options.warehouseList = [] + options.warehouseList = options.originWarehouseList } } // 选择仓库/库位/库位组/库区