From 88119a635ee65999ff14a07f4238ad5add1bb2d4 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Thu, 6 Apr 2023 17:53:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/product/UdiInfoSelectLocalUdi.vue | 124 ++++++++++-------- src/views/basic/product/product.vue | 2 +- .../company/basicCompanyproductDetail.vue | 53 +++++++- 3 files changed, 119 insertions(+), 60 deletions(-) diff --git a/src/views/basic/product/UdiInfoSelectLocalUdi.vue b/src/views/basic/product/UdiInfoSelectLocalUdi.vue index f1d2427..15cc057 100644 --- a/src/views/basic/product/UdiInfoSelectLocalUdi.vue +++ b/src/views/basic/product/UdiInfoSelectLocalUdi.vue @@ -163,7 +163,7 @@ /> - +
@@ -383,6 +383,7 @@ export default { zczbhhzbapzbh: "", isCheck: 1 }, + cpmctymc1:"", combineLoading: false, combineQuery: { idSpliUdi: false, @@ -525,6 +526,10 @@ export default { return ""; }, handleErpChange(val) { + debugger + console.log("+++"+ this.data.cpmctymc) + + this.cpmctymc1=val.cpmctymc; this.currentRow = val; }, intentBack() { @@ -532,52 +537,42 @@ export default { }, checkCombine() { - let selectData = this.multipleUdiSelection; - let selected = null; - if (this.multipleUdiSelection.length == 0) { - if (this.relId != null) { - this.combineQuery.relId = this.relId; - this.combineQuery.keys.push(this.currentRow.uuid); - if (this.currentRow.check) { - selected = this.currentRow; - } - } else - return; + this.$confirm("是否确定关联DI产品名称:" + this.cpmctymc1 + ":与第三方产品名称"+this.data.cpmctymc, "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + + let selectData = this.multipleUdiSelection; + let selected = null; + if (this.multipleUdiSelection.length == 0) { + if (this.relId != null) { + this.combineQuery.relId = this.relId; + this.combineQuery.keys.push(this.currentRow.uuid); + if (this.currentRow.check) { + selected = this.currentRow; + } + } else + return; - } else { - selectData.forEach((obj) => { - if (obj.check) { - selected = obj; + } else { + selectData.forEach((obj) => { + if (obj.check) { + selected = obj; + } + this.combineQuery.keys.push(obj.uuid); + }); } - this.combineQuery.keys.push(obj.uuid); - }); - } - if (selected != null) { - this.$message.warning("UDI编码:" + selected.nameCode + "已被选入"); - return; - } - this.combineLoading = true; - checkExitUdi(this.combineQuery) - .then((response) => { - this.combineLoading = false; - if (response.code == 20000) { - this.combine(); - // combineUdi(this.combineQuery) - // .then((response) => { - // this.combineLoading = false; - // if (response.code == 20000) { - // this.$emit("closeUdi", true); - // } else { - // this.$emit("closeUdi", false); - // } - // }) - // .catch(() => { - // this.combineLoading = false; - // this.$emit("closeUdi", false); - // }); - } else if (response.code == 499) { - this.$confirm(response.message, {type: "warning"}) - .then(_ => { + if (selected != null) { + this.$message.warning("UDI编码:" + selected.nameCode + "已被选入"); + return; + } + this.combineLoading = true; + checkExitUdi(this.combineQuery) + .then((response) => { + this.combineLoading = false; + if (response.code == 20000) { this.combine(); // combineUdi(this.combineQuery) // .then((response) => { @@ -592,19 +587,36 @@ export default { // this.combineLoading = false; // this.$emit("closeUdi", false); // }); - }) - .catch(_ => { - - this.combineQuery.keys = []; - }); - } - }) - .catch(() => { - this.combineLoading = false; - this.$emit("closeUdi", false); + } else if (response.code == 499) { + this.$confirm(response.message, { type: "warning" }) + .then(_ => { + this.combine(); + // combineUdi(this.combineQuery) + // .then((response) => { + // this.combineLoading = false; + // if (response.code == 20000) { + // this.$emit("closeUdi", true); + // } else { + // this.$emit("closeUdi", false); + // } + // }) + // .catch(() => { + // this.combineLoading = false; + // this.$emit("closeUdi", false); + // }); + }) + .catch(_ => { + + this.combineQuery.keys = []; + }); + } + }) + .catch(() => { + this.combineLoading = false; + this.$emit("closeUdi", false); + }); }); - }, combine() { diff --git a/src/views/basic/product/product.vue b/src/views/basic/product/product.vue index eb6a12b..98f345b 100644 --- a/src/views/basic/product/product.vue +++ b/src/views/basic/product/product.vue @@ -204,7 +204,7 @@ - - + + - + @@ -1099,5 +1099,52 @@ export default {