From 400a852ab4be971524ee0f024cb4e33250041fbc Mon Sep 17 00:00:00 2001 From: x_z Date: Fri, 10 Feb 2023 12:03:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=9C=AA=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/invWarehouse.js | 8 ++ src/views/inout/IoNewOrder.vue | 126 +++++++++------------------ src/views/inout/IoUnCheckedOrder.vue | 110 ++++++++--------------- 3 files changed, 83 insertions(+), 161 deletions(-) diff --git a/src/api/system/invWarehouse.js b/src/api/system/invWarehouse.js index 965015e2..61f2db98 100644 --- a/src/api/system/invWarehouse.js +++ b/src/api/system/invWarehouse.js @@ -226,5 +226,13 @@ export function filterThridSubByInv(params) { }); } +export function getInvListByUser(params) { + return axios({ + url: "/spms/inv/warehouse/findInvListByUser", + method: "get", + params: params + }); +} + diff --git a/src/views/inout/IoNewOrder.vue b/src/views/inout/IoNewOrder.vue index fd67eddd..c0be754b 100644 --- a/src/views/inout/IoNewOrder.vue +++ b/src/views/inout/IoNewOrder.vue @@ -5,7 +5,7 @@ - @@ -37,10 +37,10 @@ @@ -85,7 +85,6 @@ > 合并单据 新增单据 - 异常单据 @@ -139,6 +138,14 @@ >删除 + 删除 + - + - + @@ -210,16 +217,6 @@ - - - 0) { - this.filterQuery.locStorageCode = this.subInvList.find(item => item.code == this.filterQuery.invWarehouseCode).parentId - } let query = { - code: this.filterQuery.invWarehouseCode, + code: this.filterQuery.invCode, enabled: true, }; getLocalJoinByUser(query) .then((response) => { this.busTypes = response.data.list || []; - this.filterQuery.billAction = this.busTypes[0].action; - // this.getList(); - }) - .catch(() => { - }); - }, - getStorage() { - this.storageList = []; - filterAllByUser() - .then((response) => { - this.storageList = response.data || []; - if (this.storageList.length > 0) { - this.getSubInvList(); - this.getList(); - } + this.filterQuery.action = this.busTypes[0].action; + this.getList(); }) .catch(() => { }); }, - getStorageName(code) { - for (let i = 0; i < this.storageList.length; i++) { - if (this.storageList[i].code === code) { - return this.storageList[i].name; - } - } - }, - getSubStorageName(code) { - for (let i = 0; i < this.subInvList.length; i++) { - if (this.subInvList[i].code === code) { - return this.subInvList[i].name; - } - } - }, addOrders(row) { this.idQuery = {}; this.idQuery = row; this.addOrderVisible = true; }, - errOrders() { - this.errOrderVisible = true; - }, closeDialog() { this.addOrderVisible = false; this.addHosOrderVisible = false; @@ -518,10 +481,10 @@ export default { }, getUnitList() { this.loading = true; - getBasicUnitMaintains(this.unitquery) + getBasicUnitMaintains(this.unitQuery) .then((response) => { this.loading = false; - this.unitlist = response.data.list || []; + this.unitList = response.data.list || []; }) .catch(() => { this.loading = false; @@ -684,33 +647,17 @@ export default { this.idQuery.id = row.id; }, - invChange() { - this.subInvList = []; - this.filterQuery.invWarehouseCode = ""; - let query = { - pcode: this.filterQuery.locStorageCode - }; - filterSubByInv(query) - .then((response) => { - this.subInvList = response.data || []; - }) - .catch(() => { - }); - }, - getSubInvList() { - let query = { - // pcode: this.filterQuery.locStorageCode - filter: 3, - }; - filterSubByInv(query) + getInvList() { + getInvListByUser() .then((response) => { - this.subInvList = response.data || []; + this.invList = response.data || []; this.getList(); }) .catch(() => { }); }, - subInvChange() { + invChange() { + this.filterQuery.action = null; this.getBusType(); }, init() { @@ -720,6 +667,13 @@ export default { this.uploadFileUrl = response + "/udiwms/orders/file/upload"; }); }, + errorMsgDialog(row) { + this.$alert(row.remark, '错误信息', { + confirmButtonText: '确定', + callback: action => { + } + }); + }, }, filters: { statusFilterType(status) { @@ -737,7 +691,7 @@ export default { }; }, created() { - this.getSubInvList(); + this.getInvList(); this.getBusType(); let query = this.$route.query; this.filterQuery = Object.assign(this.filterQuery, query); diff --git a/src/views/inout/IoUnCheckedOrder.vue b/src/views/inout/IoUnCheckedOrder.vue index fe103576..0b6fb94b 100644 --- a/src/views/inout/IoUnCheckedOrder.vue +++ b/src/views/inout/IoUnCheckedOrder.vue @@ -3,14 +3,14 @@ - + - - + @@ -19,7 +19,7 @@ - + @@ -33,14 +33,14 @@ - + @@ -52,7 +52,7 @@ - + 0) { - this.filterQuery.locStorageCode = this.subInvList.find(item => item.code == this.filterQuery.invWarehouseCode).parentId - } let query = { - code: this.filterQuery.invWarehouseCode, + code: this.filterQuery.invCode, enabled: true, }; getLocalJoinByUser(query) .then((response) => { this.busTypes = response.data.list || []; - this.filterQuery.billAction = this.busTypes[0].action; - }) - .catch(() => { - }); - }, - getStorage() { - this.storageList = []; - filterAllByUser() - .then((response) => { - this.storageList = response.data || []; - if (this.storageList.length > 0) { - this.getSubInvList(); - this.getList(); - } + this.filterQuery.action = this.busTypes[0].action; + this.getList(); }) .catch(() => { }); }, - getStorageName(code) { - for (let i = 0; i < this.storageList.length; i++) { - if (this.storageList[i].code === code) { - return this.storageList[i].name; - } - } - }, - getSubStorageName(code) { - for (let i = 0; i < this.subInvList.length; i++) { - if (this.subInvList[i].code === code) { - return this.subInvList[i].name; - } - } - }, handleSelectionChange(val) { this.currentRow = val; this.getOrderDetails(); @@ -736,34 +714,16 @@ export default { .catch(() => { }); }, - invChange() { - this.subInvList = []; - this.filterQuery.invWarehouseCode = ""; - let query = { - pcode: this.filterQuery.locStorageCode - }; - filterSubByInv(query) - .then((response) => { - this.subInvList = response.data || []; - }) - .catch(() => { - }); - }, - getSubInvList() { - let query = { - filter: 3, - }; - filterSubByInv(query) + getInvList() { + getInvListByUser() .then((response) => { - this.subInvList = response.data || []; + this.invList = response.data || []; + console.log(this.invList) this.getList(); }) .catch(() => { }); }, - subInvChange() { - this.getBusType(); - }, checkOrder(orderId) { }, onBizReset() { @@ -903,7 +863,7 @@ export default { }; }, created() { - this.getSubInvList(); + this.getInvList(); this.getBusType(); let query = this.$route.query; this.filterQuery = Object.assign(this.filterQuery, query);