From a116abc56d47e243e4702c2cb7ad85980a690a63 Mon Sep 17 00:00:00 2001 From: yewj Date: Sun, 25 Aug 2024 14:28:45 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=89=AB=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/collect/DealOrder.vue | 78 ++++++++++++++++++++-------- src/views/collect/DealOrderBlank.vue | 72 ++++++++++++++++++------- 2 files changed, 109 insertions(+), 41 deletions(-) diff --git a/src/views/collect/DealOrder.vue b/src/views/collect/DealOrder.vue index 4b9539c2..5f0f430e 100644 --- a/src/views/collect/DealOrder.vue +++ b/src/views/collect/DealOrder.vue @@ -9,12 +9,12 @@ 部门 : {{ this.userInfo.deptName }} - {{ - this.userInfo.companyName - }} + + + (用户 : {{ + >    (用户 : {{ this.userInfo.userName }}) @@ -577,6 +577,9 @@ export default { this.isSuccess = true; this.printCodeResult(response.data, response.message) this.filterQuery.code = response.data.code; + this.scanCode = "" + this.originCode = "" + this.addCode(); } else { if (response.code == 502) { @@ -584,15 +587,18 @@ export default { this.isSuccess = false; this.printCodeResult(response.data, response.message) this.filterQuery.code = response.data.code; - this.originCode = this.filterQuery.code; + this.originCode = response.data.code; + this.scanCode = "" } else if (response.code == 501) { this.checkSuccess = false; this.$message.error(response.message); + this.scanCode = "" } else if (response.code == 503) { this.checkSuccess = false; this.isSuccess = false; this.printCodeResult(response.data, response.message) this.filterQuery.code = response.data.code; + this.scanCode = "" this.$confirm(response.message, "提示", { type: "warning", }) @@ -608,6 +614,7 @@ export default { this.filterQuery.code = "01" + response.data.nameCode; this.originCode = this.filterQuery.code; } else { + this.scanCode = "" this.$alert(response.message, "提示", { confirmButtonText: "确定", type: "warning", @@ -648,6 +655,7 @@ export default { this.formData.insert = false; this.formData = res.data; this.curRow = this.formData; + this.$refs.inputRef.focus(); this.refreshCodesPanel(this); } else { if (res.code == 502) { @@ -660,8 +668,11 @@ export default { this.addCode(); }).catch(() => { }); - } else + } else { + this.$refs.inputRef.focus(); this.$message.error(res.message) + } + } }).catch(() => { this.loading = false @@ -677,9 +688,7 @@ export default { draftOrder(this.formData).then(res => { this.loading = false if (res.code == 20000) { - this.formData = {tagStatus: -1}; - this.curRow = null - this.refreshCodesPanel(this) + this.resetWork() } }).catch(() => { this.loading = false @@ -688,27 +697,39 @@ export default { }); }, - finishOrder() { + confirmFinishOrder() { this.$confirm('是否确定完成此单据?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { - finishOrder(this.formData).then(res => { - this.loading = false - if (res.code == 20000) { - this.formData = {tagStatus: -1}; - this.curRow = null - this.refreshCodesPanel(this) - } - }).catch(() => { - this.loading = false - }) + this.finishOrder() }).catch(() => { }); + }, + finishOrder() { + finishOrder(this.formData).then(res => { + this.loading = false + if (res.code == 20000) { + this.resetWork() + } else if (res.code == 502) { + this.$confirm(res.message, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.formData.confirmFinish = true; + this.finishOrder(); + }).catch(() => { + }); + } + }).catch(() => { + this.loading = false + }) }, + updateOrder() { updateOrder(this.formData).then(res => { this.loading = false @@ -818,7 +839,6 @@ export default { printCodeResult(data, message) { const resultParts = []; - if (data.udi) { resultParts.push("层级标识: " + data.udi); } @@ -850,6 +870,22 @@ export default { this.originCode = ""; this.formData.code = ""; this.scanCode = ""; + this.scanTitle = "扫码结果:"; + this.result = ""; + }, + + /** + * 重置 + */ + resetWork() { + this.formData = { + tagStatus: -1, + workPlaceCode: this.formData.workPlaceCode, + busType: this.formData.busType + }; + this.curRow = null + this.formData.confirmFinish = false; + this.refreshCodesPanel(this) }, diff --git a/src/views/collect/DealOrderBlank.vue b/src/views/collect/DealOrderBlank.vue index 9818d6a9..5f0f430e 100644 --- a/src/views/collect/DealOrderBlank.vue +++ b/src/views/collect/DealOrderBlank.vue @@ -9,9 +9,9 @@ 部门 : {{ this.userInfo.deptName }} - - - + + +     (用户 : {{ @@ -577,6 +577,9 @@ export default { this.isSuccess = true; this.printCodeResult(response.data, response.message) this.filterQuery.code = response.data.code; + this.scanCode = "" + this.originCode = "" + this.addCode(); } else { if (response.code == 502) { @@ -584,15 +587,18 @@ export default { this.isSuccess = false; this.printCodeResult(response.data, response.message) this.filterQuery.code = response.data.code; - this.originCode = this.filterQuery.code; + this.originCode = response.data.code; + this.scanCode = "" } else if (response.code == 501) { this.checkSuccess = false; this.$message.error(response.message); + this.scanCode = "" } else if (response.code == 503) { this.checkSuccess = false; this.isSuccess = false; this.printCodeResult(response.data, response.message) this.filterQuery.code = response.data.code; + this.scanCode = "" this.$confirm(response.message, "提示", { type: "warning", }) @@ -608,6 +614,7 @@ export default { this.filterQuery.code = "01" + response.data.nameCode; this.originCode = this.filterQuery.code; } else { + this.scanCode = "" this.$alert(response.message, "提示", { confirmButtonText: "确定", type: "warning", @@ -661,7 +668,7 @@ export default { this.addCode(); }).catch(() => { }); - } else{ + } else { this.$refs.inputRef.focus(); this.$message.error(res.message) } @@ -681,9 +688,7 @@ export default { draftOrder(this.formData).then(res => { this.loading = false if (res.code == 20000) { - this.formData = {tagStatus: -1}; - this.curRow = null - this.refreshCodesPanel(this) + this.resetWork() } }).catch(() => { this.loading = false @@ -692,27 +697,39 @@ export default { }); }, - finishOrder() { + confirmFinishOrder() { this.$confirm('是否确定完成此单据?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { - finishOrder(this.formData).then(res => { - this.loading = false - if (res.code == 20000) { - this.formData = {tagStatus: -1}; - this.curRow = null - this.refreshCodesPanel(this) - } - }).catch(() => { - this.loading = false - }) + this.finishOrder() }).catch(() => { }); + }, + finishOrder() { + finishOrder(this.formData).then(res => { + this.loading = false + if (res.code == 20000) { + this.resetWork() + } else if (res.code == 502) { + this.$confirm(res.message, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.formData.confirmFinish = true; + this.finishOrder(); + }).catch(() => { + }); + } + }).catch(() => { + this.loading = false + }) }, + updateOrder() { updateOrder(this.formData).then(res => { this.loading = false @@ -822,7 +839,6 @@ export default { printCodeResult(data, message) { const resultParts = []; - if (data.udi) { resultParts.push("层级标识: " + data.udi); } @@ -854,6 +870,22 @@ export default { this.originCode = ""; this.formData.code = ""; this.scanCode = ""; + this.scanTitle = "扫码结果:"; + this.result = ""; + }, + + /** + * 重置 + */ + resetWork() { + this.formData = { + tagStatus: -1, + workPlaceCode: this.formData.workPlaceCode, + busType: this.formData.busType + }; + this.curRow = null + this.formData.confirmFinish = false; + this.refreshCodesPanel(this) }, From e7232c0d2f9f946b7201d10319b2d1006344942c Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Sun, 25 Aug 2024 14:39:08 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20=E7=BB=9F=E4=B8=80=E5=88=86=E5=89=B2?= =?UTF-8?q?=E5=8A=A0=E5=88=87=E6=A8=AA=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/collectPoint/collectPointManage.vue | 1 + .../basic/collectPoint/gatherOrderType.vue | 2 +- .../basic/collectPoint/selectWorkplace.vue | 1 + src/views/basic/collectPoint/userWorkplace.vue | 17 +++++++++-------- src/views/basic/workplace/selectBusType.vue | 2 +- src/views/basic/workplace/workplaceManage.vue | 1 + .../collect/CollectOrderAllotCardComponents.vue | 2 ++ src/views/collect/fieldOperation.vue | 9 ++++----- 8 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/views/basic/collectPoint/collectPointManage.vue b/src/views/basic/collectPoint/collectPointManage.vue index b7057fd4..259fd180 100644 --- a/src/views/basic/collectPoint/collectPointManage.vue +++ b/src/views/basic/collectPoint/collectPointManage.vue @@ -84,6 +84,7 @@ 新增采集点 + diff --git a/src/views/basic/collectPoint/gatherOrderType.vue b/src/views/basic/collectPoint/gatherOrderType.vue index 05554204..a17df103 100644 --- a/src/views/basic/collectPoint/gatherOrderType.vue +++ b/src/views/basic/collectPoint/gatherOrderType.vue @@ -26,7 +26,7 @@ 新增单据类型 - + diff --git a/src/views/basic/collectPoint/selectWorkplace.vue b/src/views/basic/collectPoint/selectWorkplace.vue index bc9a63fe..476f7ade 100644 --- a/src/views/basic/collectPoint/selectWorkplace.vue +++ b/src/views/basic/collectPoint/selectWorkplace.vue @@ -35,6 +35,7 @@ 选入工位 + diff --git a/src/views/basic/collectPoint/userWorkplace.vue b/src/views/basic/collectPoint/userWorkplace.vue index 7609206c..7456be75 100644 --- a/src/views/basic/collectPoint/userWorkplace.vue +++ b/src/views/basic/collectPoint/userWorkplace.vue @@ -32,15 +32,16 @@ 查询 + - - - - - + + + + + @@ -109,7 +110,7 @@ > - +