From 396286017197771b9e1780daa046b843e25bd368 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Sat, 14 Sep 2024 10:21:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=89=AB=E7=A0=81=E5=9B=9E=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/inout/order.js | 8 ++ .../CollectOrderAllotCardComponents.vue | 2 +- src/views/collect/DealOrder.vue | 81 ++++++++++++++++++- 3 files changed, 89 insertions(+), 2 deletions(-) diff --git a/src/api/inout/order.js b/src/api/inout/order.js index 2803c2d8..674beb29 100644 --- a/src/api/inout/order.js +++ b/src/api/inout/order.js @@ -132,6 +132,14 @@ export function enterCodeWeb(query) { }); } +export function enterCodeBillNo(query) { + return axios({ + url: "/warehouse/inout/enterCodeBillNo", + method: "post", + data: query + }); +} + export function postOrdersWeb(query) { return axios({ diff --git a/src/views/collect/CollectOrderAllotCardComponents.vue b/src/views/collect/CollectOrderAllotCardComponents.vue index 6dac1141..e4f37610 100644 --- a/src/views/collect/CollectOrderAllotCardComponents.vue +++ b/src/views/collect/CollectOrderAllotCardComponents.vue @@ -697,7 +697,7 @@ export default { type: "warning", }) .then(() => { - _this.deleteOrders(row.code); + _this.deleteOrders(row.billNo); }) .catch(() => { }); diff --git a/src/views/collect/DealOrder.vue b/src/views/collect/DealOrder.vue index 75150298..0204a7f4 100644 --- a/src/views/collect/DealOrder.vue +++ b/src/views/collect/DealOrder.vue @@ -353,7 +353,7 @@ import prescribeOriginPanel from "./PannelOrderBiz"; import prescribeCodePanel from "./PanelOrderTagCode"; import PannelOrderBiz from "./PannelOrderBiz"; import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage"; -import {enterCodeWeb} from "@/api/inout/order"; +import {enterCodeWeb,enterCodeBillNo} from "@/api/inout/order"; import {cancelOrder, draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder"; import {selectCorpList} from "@/api/basic/basicUnitMaintain"; import {getCurOrder, getNextOrder, findByBill, findFromCorp} from "@/api/collect/collectOrder"; @@ -627,6 +627,10 @@ export default { enterKey() { + if (this.formData.billNo == null){ + this.enterBillNoKey() + return; + } this.checkSuccess = true; this.filterQuery.code = this.scanCode; let tQuery = { @@ -701,6 +705,81 @@ export default { }); }, + enterBillNoKey() { + this.checkSuccess = true; + this.filterQuery.code = this.scanCode; + let tQuery = { + viewType: "tagCode", + workPlaceCode: this.workplaceId, + originCode: this.originCode, + busType: this.formData.busType, + code: this.filterQuery.code.trim(), + }; + enterCodeBillNo(tQuery).then((response) => { + if (response.code === 20000) { + this.$refs.inputRef.focus(); + this.$refs.inputRef.select(); + 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) { + this.checkSuccess = false; + this.isSuccess = false; + this.printCodeResult(response.data, response.message) + this.filterQuery.code = response.data.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", + }) + .then(() => { + this.filterQuery.code = response.data.code; + this.addCode(); + }) + .catch(() => { + this.filterQuery.code = response.data.code; + }); + } else if (response.code == 508) { + this.originCode = ""; + this.filterQuery.code = "01" + response.data.nameCode; + this.originCode = this.filterQuery.code; + } else if (response.code == 601) { + this.formData.billNo = response.data.billNo + this.getBillNo(this.formData.billNo) + this.startDeal(); + + } else { + this.scanCode = "" + this.$alert(response.message, "提示", { + confirmButtonText: "确定", + type: "warning", + closeOnClickModal: true, + callback: (action) => { + this.$refs.inputRef.focus(); + this.$refs.inputRef.select(); + }, + }); + } + } + this.loading = false; + }); + }, + addCode() { if (this.$isBlank(this.filterQuery.code)) { this.filterQuery.code = this.scanCode.trim();