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 } } // 选择仓库/库位/库位组/库区