From e37348f00ed5177894e767adae84be6b75d12169 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Thu, 6 Jun 2024 09:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E6=9E=B6=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../strategy/downShelfStrategy/AddForm.vue | 295 +++++++++++------- 1 file changed, 186 insertions(+), 109 deletions(-) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue index 4b075a056..d78685b60 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue @@ -9,13 +9,14 @@ label-width="120px" label-position="left" > +
规则
- - + - + - + - + @@ -48,13 +49,13 @@ -
-
规则条件
- - +
+
规则条件
+ + - - + - - - - + - - - - - - - - + - - - + - - - + - - - + - -
-
规则配置
- - - - +
规则配置
+ + + + @@ -334,12 +340,15 @@ v-model="formData.configuration.AreaCode" v-if="warehouseType == 'AreaCode'" placeholder="请选择库区" + key="请选择库区" clearable style="flex: 1" + filterable + :filter-method="filterMethodWarehouseList" > @@ -348,12 +357,15 @@ v-model="formData.configuration.LocationGroupCode" v-if="warehouseType == 'LocationGroupCode'" placeholder="请选择库位组" + key="请选择库位组" clearable style="flex: 1" + filterable + :filter-method="filterMethodWarehouseList" > @@ -363,12 +375,15 @@ v-model="formData.configuration.LocationCode" v-if="warehouseType == 'LocationCode'" placeholder="请选择库位" + key="请选择库位" clearable style="flex: 1" + filterable + :filter-method="filterMethodWarehouseList" > @@ -376,14 +391,14 @@ - - + +
- + {{ cur.label }} @@ -391,14 +406,14 @@ - - + +
- + {{ cur.label }} @@ -406,14 +421,14 @@ - - + +
- + {{ cur.label }} @@ -421,14 +436,14 @@ - - + +
- + {{ cur.label }} @@ -436,14 +451,14 @@ - - + +
- + {{ cur.label }} @@ -452,8 +467,8 @@ - - + - - + +
- + {{ cur.label }} @@ -476,9 +491,9 @@ - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + { // 获取供应商列表 const getFormSupplierList = async () => { - options.supplierList = await getSupplierList() + options.originSupplierList = await getSupplierList(null) + options.supplierList = [...options.originSupplierList] } // 获取客户列表 const getFormCustomerList = async () => { - options.supplierList = await getCustomerList() + options.originSupplierList = await getCustomerList(null) + options.supplierList = [...options.originSupplierList] +} +const filterMethod = (query: string) => { + if (query) { + options.supplierList = options.originSupplierList.filter((item) => { + if(!item.name||item.name==''){ + return item.code.includes(query) + }else{ + return item.name.includes(query) + } + }) + } else { + options.supplierList = [...options.originSupplierList] + } } // 选择客户还是承运商 const changeSupplierCustomer = (e) => { @@ -745,19 +777,64 @@ const changeCalculation = () => { } // 获取仓库列表 const getFormWarehouseList = async () => { - options.warehouseList = await getWarehouseList() + const loading = ElLoading.service({ + lock: true, + text: t('ts.加载中'), + background: 'rgba(0, 0, 0, 0.7)', + }) + options.originWarehouseList = await getWarehouseList() + options.warehouseList = [...options.originWarehouseList] + nextTick(()=>{ + loading.close() + }) } // 获取库区列表 const getFormAreaList = async () => { - options.warehouseList = await getAreaList() + const loading = ElLoading.service({ + lock: true, + text: t('ts.加载中'), + background: 'rgba(0, 0, 0, 0.7)', + }) + options.originWarehouseList = await getAreaList() + options.warehouseList = [...options.originWarehouseList] + nextTick(()=>{ + loading.close() + }) } // 获取库位组列表 const getFormLocationgrouList = async () => { - options.warehouseList = await getLocationgroupList() + const loading = ElLoading.service({ + lock: true, + text: t('ts.加载中'), + background: 'rgba(0, 0, 0, 0.7)', + }) + options.originWarehouseList = await getLocationgroupList() + options.warehouseList = [...options.originWarehouseList] + nextTick(()=>{ + loading.close() + }) } // 获取库位列表 const getFormLocationList = async () => { - options.warehouseList = await getLocationList() + const loading = ElLoading.service({ + lock: true, + text: t('ts.加载中'), + background: 'rgba(0, 0, 0, 0.7)', + }) + options.originWarehouseList = await getLocationList() + options.warehouseList = [...options.originWarehouseList] + nextTick(()=>{ + loading.close() + }) +} +const filterMethodWarehouseList = (query: string) => { + if (query) { + options.warehouseList = options.originWarehouseList.filter((item) => { + return item.code.includes(query) + }) + } else { + options.warehouseList = options.originWarehouseList + } } getFormWarehouseList() // 选择仓库/库位/库位组/库区