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