From b6a6deb5c7fbdf25206ce0af2813eb5b824ce35f Mon Sep 17 00:00:00 2001 From: yuanwei Date: Wed, 13 Dec 2023 17:51:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auth/authDept.js | 17 + src/api/system/invWarehouse.js | 16 + .../purchase/purOrder/purOrderSearch.vue | 363 +++++++++++++++--- .../system/customConfig/configFromDetail.vue | 47 ++- .../system/customConfig/configQueryDetail.vue | 19 + 5 files changed, 413 insertions(+), 49 deletions(-) diff --git a/src/api/auth/authDept.js b/src/api/auth/authDept.js index ddf44b1..09d5187 100644 --- a/src/api/auth/authDept.js +++ b/src/api/auth/authDept.js @@ -8,6 +8,14 @@ export function filterDepts(query) { }); } +export function filterDeptsOptimize(query) { + return axios({ + url: "/spms/inv/warehouse/filterAllOptimize", + method: "get", + params: query + }); +} + export function addDept(data) { return axios({ url: "/udi/auth/dept/add", @@ -39,3 +47,12 @@ export function getDeptListByUser(params) { params: params }); } + +export function getDeptListByUserOptimize(params) { + return axios({ + url: "/spms/inv/warehouse/filterByUserOptimize", + method: "get", + params: params + }); +} + diff --git a/src/api/system/invWarehouse.js b/src/api/system/invWarehouse.js index 43d7205..f8c3201 100644 --- a/src/api/system/invWarehouse.js +++ b/src/api/system/invWarehouse.js @@ -43,6 +43,14 @@ export function filterAllByUser(query) { }); } +export function findAllInvByUserOptimize(params) { + return axios({ + url: "/spms/inv/warehouse/findAllInvByUserOptimize", + method: "get", + params: params + }); +} + export function filterUplLocInv(query) { return axios({ url: "/spms/inv/warehouse/filterUplLocInv", @@ -242,6 +250,14 @@ export function getInvListByUser(params) { }); } +export function getInvListByUserOptimize(params) { + return axios({ + url: "/spms/inv/warehouse/findInvListByUserOptimize", + method: "get", + params: params + }); +} + export function selectInvById(params) { return axios({ diff --git a/src/views/purchase/purOrder/purOrderSearch.vue b/src/views/purchase/purOrder/purOrderSearch.vue index 7261eeb..2f9d21d 100644 --- a/src/views/purchase/purOrder/purOrderSearch.vue +++ b/src/views/purchase/purOrder/purOrderSearch.vue @@ -2,13 +2,14 @@
- + + +
@@ -150,11 +217,11 @@ style="width: 100%" border highlight-current-row="true" - @current-change="handleDetail" + @current-change="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)" :default-sort="defaultSort" @sort-change="handleSortChange" > - + - + --> + - + + @@ -286,9 +526,12 @@ import { delOrderDetailAll, } from "@/api/purchase/purOrder"; import {selectAuthMenu} from "@/api/system/sysMenuHelp"; -import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; -import {getDeptListByUser} from "@/api/auth/authDept"; -import {getInvListByUser} from "@/api/system/invWarehouse"; +import {getBasicUnitMaintainsOptimize} from "@/api/basic/basicUnitMaintain"; +import {getDeptListByUserOptimize} from "@/api/auth/authDept"; +import {filterSubAllOptimize} from "@/api/system/invWarehouse"; +import { + getHead,executeFuc +} from "@/utils/customConfig"; export default { data() { @@ -344,6 +587,17 @@ export default { idQuery: {}, editType: 1, total: 0, + tableHeader:[], + queryList:[], + fromList:[], + tableHeader2:[], + queryList2:[], + fromList2:[], + options: { + getInvList:[], + getDeptList:[], + findMethod:[], + }, thirdSys: [], thirdSysDetail: null, busTypes: [], @@ -451,15 +705,11 @@ export default { this.showSearch = !this.showSearch; }, - change(val){ + change(_this,val){ let param={ pcode:val } - getInvListByUser(param).then((res) => { - // console.log("res1", res); - this.invList = res.data || []; - }); - + _this.getInvList(_this,param) }, @@ -508,18 +758,18 @@ export default { this.total = 0; }); }, - handleDetail(row) { + handleDetail(_this,row) { let query = {orderIdFk: row.id}; - this.loading = true; + _this.loading = true; listOrderDetail(query) //查找该单号下的所有条码 .then((response) => { - this.detailList = response.data.list || []; - this.loading = false; + _this.detailList = response.data.list || []; + _this.loading = false; }) .catch(() => { - this.loading = false; - this.detailList = []; - this.total = 0; + _this.loading = false; + _this.detailList = []; + _this.total = 0; }); }, deleteDialog(row) { @@ -560,7 +810,7 @@ export default { }); }, - findMethod(key) { + findMethod(_this,key) { this.corpLoading = true; this.fromOptions = []; let params = { @@ -569,13 +819,13 @@ export default { page: 1, limit: 20, }; - getBasicUnitMaintains(params) + getBasicUnitMaintainsOptimize(params) .then((res) => { - this.corpLoading = false; - this.fromOptions = res.data.list || []; + _this.corpLoading = false; + _this.options.findMethod = res.data.list || []; }) .catch(() => { - this.corpLoading = false; + _this.corpLoading = false; }); }, @@ -584,26 +834,26 @@ export default { this.getList(); this.detailList = []; }, - getInvList() { - getInvListByUser().then((res) => { + getInvList(_this,param) { + getInvListByUserOptimize(param).then((res) => { // console.log("res1", res); - this.invList = res.data || []; + _this.options.getInvList = res.data || []; }); }, - getDeptList() { - getDeptListByUser().then((res) => { + getDeptList(_this) { + getDeptListByUserOptimize().then((res) => { // console.log("res2", res); - this.deptList = res.data || []; + _this.options.getDeptList = res.data || []; }); }, - newDistributionForm(row) { - this.idQuery.id = ""; - if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) { - this.idQuery.id = row.id; - this.idQuery.formData = row; - this.formName = "update"; - } else this.formName = "add"; - this.newSpDistributionVisible = true; + newDistributionForm(_this,row) { + _this.idQuery.id = ""; + if (_this.$isNotBlank(row) && _this.$isNotBlank(row.id)) { + _this.idQuery.id = row.id; + _this.idQuery.formData = row; + _this.formName = "update"; + } else _this.formName = "add"; + _this.newSpDistributionVisible = true; }, statusFilterType(status) { const statusMap = { @@ -613,6 +863,15 @@ export default { }; return statusMap[status]; }, + executeFuc(row,type,clickFuc,value){ + return executeFuc(this,row,type,clickFuc,value); + }, + executeEval(row,expression,defaultRet){ + if(expression){ + return eval(expression); + } + return defaultRet; + } }, components: { purPlanEdit, @@ -632,9 +891,23 @@ export default { let start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); this.actDateRange = [start, end]; - this.getList(); - this.getInvList(); - this.getDeptList(); + this.getInvList(this,{}); + this.getDeptList(this); + getHead("purOrderSearch-1","1").then((re) => { + // 处理返回的数据 + this.tableObj = re.data; + this.tableHeader = re.data.tableList; + this.queryList = re.data.queryList; + this.fromList = re.data.fromList; + this.getList(); + }); + getHead("purOrderSearch-2","1").then((re) => { + // 处理返回的数据 + this.tableObj2 = re.data; + this.tableHeader2 = re.data.tableList; + this.queryList2 = re.data.queryList; + this.fromList2 = re.data.fromList; + }); }, }; diff --git a/src/views/system/customConfig/configFromDetail.vue b/src/views/system/customConfig/configFromDetail.vue index 4c89a3a..9d23b72 100644 --- a/src/views/system/customConfig/configFromDetail.vue +++ b/src/views/system/customConfig/configFromDetail.vue @@ -43,6 +43,12 @@ + + + +