From e77e42a35c33b9065508dc33284db873aee2c52d Mon Sep 17 00:00:00 2001 From: x_z Date: Wed, 28 Sep 2022 00:23:39 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=95=B0=E6=8D=AE=E6=9C=AA=E5=B1=95=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/invWarehouse.vue | 13 ++--- src/views/product/udiRelevance.vue | 46 +++++++++-------- src/views/warehouse/ioErrorOrder.vue | 69 +++++++++++++++----------- src/views/warehouse/ioNewOrder.vue | 65 ++++++++++++++---------- src/views/warehouse/stockOrderEdit.vue | 29 +++++++++-- 5 files changed, 130 insertions(+), 92 deletions(-) diff --git a/src/views/basic/invWarehouse.vue b/src/views/basic/invWarehouse.vue index b738403..a2259b0 100644 --- a/src/views/basic/invWarehouse.vue +++ b/src/views/basic/invWarehouse.vue @@ -1021,15 +1021,10 @@ export default { let params = {id: row.id}; updateDirector(params).then((res) => { this.$message.success("设置成功"); - //重新加载表格数据 - let loadParam = { - code: this.currentCode - }; - //重新加载数据 - warehouseUserList(loadParam).then((res) => { - this.userData = res.data; - }).catch((error) => { - }); + if (res.code === 20000) { + //重新加载数据 + this.loadUserList(); + } }).catch((error) => { this.$message.error("设置失败"); }); diff --git a/src/views/product/udiRelevance.vue b/src/views/product/udiRelevance.vue index ffd2ef5..073d9dc 100644 --- a/src/views/product/udiRelevance.vue +++ b/src/views/product/udiRelevance.vue @@ -297,29 +297,31 @@ export default { }); }, combineUdiAll() { - this.$confirm("此操作将在后台自动下载所有查询结果, 是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }) - .then(() => { - combineAllUdi(this.unionQuery) - .then((response) => { - this.loading = false; - if (response.code == 20000) { - this.$message.success(response.data); - this.$emit("closeUdi", true); - } else { - this.$message.error(response.message); - } - }) - .catch(() => { - }); + if (this.udidlList.length > 0) { + this.$confirm("此操作将在后台自动下载所有查询结果, 是否继续?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" }) - .catch(() => { - }); - - + .then(() => { + combineAllUdi(this.unionQuery) + .then((response) => { + this.loading = false; + if (response.code == 20000) { + this.$message.success(response.data); + this.$emit("closeUdi", true); + } else { + this.$message.error(response.message); + } + }) + .catch(() => { + }); + }) + .catch(() => { + }); + } else { + this.$message.error("无数据可以选入!"); + } }, intentDetail(row) { diff --git a/src/views/warehouse/ioErrorOrder.vue b/src/views/warehouse/ioErrorOrder.vue index 0db309d..06d8e7a 100644 --- a/src/views/warehouse/ioErrorOrder.vue +++ b/src/views/warehouse/ioErrorOrder.vue @@ -180,7 +180,7 @@ > - - + + + + { - if (res.code === 20000) { - this.unitquery = { - key: "", - corpType: res.data, - page: 1, - limit: 10 - } - this.getUnitList(); - } else { - this.$message.error("查询往来单位错误"); - } - }) + this.currentRowAction = row.action; + this.getUnitList(); }, closeDetailDialog(val) { this.codeDetailVisible = false; @@ -358,23 +362,30 @@ export default { }, resetUnitQuery() { this.unitlist = []; - this.unitquery = {key: "", page: 1, limit: 20}; - this.getUnitList(); + this.unitquery.key = ""; + this.getUnitList(1); }, getUnitList(page) { this.loading = true; if (page != null) { this.unitquery.page = 1; } - unitListBykey(this.unitquery) - .then((response) => { - this.loading = false; - this.unitlist = response.data.list || []; - this.unitTotal = response.data.total || 0; - }) - .catch(() => { - this.loading = false; - }); + getCorpType({action: this.currentRowAction}).then((res) => { + if (res.code === 20000) { + this.unitquery.corpType = res.data; + unitListBykey(this.unitquery) + .then((response) => { + this.loading = false; + this.unitlist = response.data.list || []; + this.unitTotal = response.data.total || 0; + }) + .catch(() => { + this.loading = false; + }); + } else { + this.$message.error("查询往来单位错误"); + } + }) }, selectUnit(row) { diff --git a/src/views/warehouse/ioNewOrder.vue b/src/views/warehouse/ioNewOrder.vue index 473819d..0ec752c 100644 --- a/src/views/warehouse/ioNewOrder.vue +++ b/src/views/warehouse/ioNewOrder.vue @@ -162,7 +162,7 @@ > - + + + - @@ -235,7 +239,12 @@ export default { limit: 20 }, curIndex: "", - unitquery: {key: "", page: 1, limit: 20}, + unitquery: { + key: "", + corpType: null, + page: 1, + limit: 20 + }, unitlist: [], unitUpdateQuery: { id: "", @@ -270,6 +279,12 @@ export default { 1: "等待处理", 3: "校验失败", 4: "已校验" + }, + currentRowAction: null, //当前选中单据的单据类型 + corpTypeMap: { + 1: "客户", + 2: "供应商", + 4: "特殊往来" } }; }, @@ -306,37 +321,33 @@ export default { this.curIndex = row.id; this.dialogTableVisible = true; this.curOrderId = row.orderId; - getCorpType({action: row.action}).then((res) => { - if (res.code === 20000) { - this.unitquery = { - key: "", - corpType: res.data, - page: 1, - limit: 10 - } - this.getUnitList(); - } else { - this.$message.error("查询往来单位错误"); - } - }) + this.currentRowAction = row.action; + this.getUnitList(); }, closeDetailDialog(val) { this.codeDetailVisible = false; }, resetUnitQuery() { - this.unitquery = {key: "", page: 1, limit: 20}; - this.getUnitList(); + this.unitquery.key = ""; + this.getUnitList(1); }, getUnitList() { this.loading = true; - unitListBykey(this.unitquery) - .then((response) => { - this.loading = false; - this.unitlist = response.data.list || []; - }) - .catch(() => { - this.loading = false; - }); + getCorpType({action: this.currentRowAction}).then((res) => { + if (res.code === 20000) { + this.unitquery.corpType = res.data; + unitListBykey(this.unitquery) + .then((response) => { + this.loading = false; + this.unitlist = response.data.list || []; + }) + .catch(() => { + this.loading = false; + }); + } else { + this.$message.error("查询往来单位错误"); + } + }) }, selectUnit(row) { diff --git a/src/views/warehouse/stockOrderEdit.vue b/src/views/warehouse/stockOrderEdit.vue index 03ebb46..b8c5a22 100644 --- a/src/views/warehouse/stockOrderEdit.vue +++ b/src/views/warehouse/stockOrderEdit.vue @@ -3,8 +3,10 @@ 批量设置销售清单 - 批量设置销售发票第一票 - 批量设置销售发票第二票 + 批量设置销售发票第一票 + + 批量设置销售发票第二票 + - + @@ -96,7 +104,12 @@ - + @@ -109,7 +122,13 @@ - +