From b573e2dc2f3732b4a8ff80b617ffc69e08356748 Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 24 Feb 2023 14:47:51 +0800 Subject: [PATCH] =?UTF-8?q?done=20=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=B7=A5=E8=89=BA=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DialogWithMenu.vue | 10 ++++------ src/views/modules/pms/blenderStep/config.js | 2 +- src/views/modules/pms/firingStep/config.js | 2 +- src/views/modules/pms/shapeStep/config.js | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/components/DialogWithMenu.vue b/src/components/DialogWithMenu.vue index f75998e..ccb1ce8 100644 --- a/src/components/DialogWithMenu.vue +++ b/src/components/DialogWithMenu.vue @@ -424,20 +424,18 @@ export default { updateOptions() { return new Promise((resolve, reject) => { - if (!this.dataForm?.id) resolve(null); - if (this.watingToRefreshQueue.length) { this.watingToRefreshQueue.forEach((opt) => { console.log("[刷新数据, ", opt, "]"); if ("fetchData" in opt) { - opt.fetchData(this.dataForm.id).then(({ data: res }) => { + opt.fetchData(this.dataForm.id ? this.dataForm.id : -1).then(({ data: res }) => { if (res.code === 0) { this.$set( opt, "options", "list" in res.data - ? res.data.list.map((i) => ({ label: i.name, value: i.id })) - : res.data.map((i) => ({ label: i.name, value: i.id })) + ? res.data.list.map((i) => ({ label: i.code, value: i.id })) + : res.data.map((i) => ({ label: i.code, value: i.id })) ); resolve({ done: true }); @@ -504,7 +502,7 @@ export default { }); } else { // 如果不是编辑 - // this.dialogVisible = true; + this.updateOptions() } }); }, diff --git a/src/views/modules/pms/blenderStep/config.js b/src/views/modules/pms/blenderStep/config.js index 0b24dec..1697a76 100644 --- a/src/views/modules/pms/blenderStep/config.js +++ b/src/views/modules/pms/blenderStep/config.js @@ -104,7 +104,7 @@ export default function () { options: [], refreshOptionsAfterConfirm: true, elparams: { clearable: true, filterable: true, placeholder: "请选择配方" }, - fetchData: () => this.$http.get("/pms/bom/listUnR", { params: { wsId: 1, externalCode: '', key: '' } }), + fetchData: (techId = -1) => this.$http.get("/pms/bom/listUnR", { params: { wsId: 1, externalCode: '', key: '', techId } }), }, ], [{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], diff --git a/src/views/modules/pms/firingStep/config.js b/src/views/modules/pms/firingStep/config.js index 8550603..882aeb5 100644 --- a/src/views/modules/pms/firingStep/config.js +++ b/src/views/modules/pms/firingStep/config.js @@ -104,7 +104,7 @@ export default function () { options: [], refreshOptionsAfterConfirm: true, elparams: { clearable: true, filterable: true, placeholder: "请选择配方" }, - fetchData: () => this.$http.get("/pms/bom/listUnR", { params: { wsId: 3, externalCode: '', key: '' } }), + fetchData: (techId = -1) => this.$http.get("/pms/bom/listUnR", { params: { wsId: 3, externalCode: '', key: '', techId } }), }, ], [{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], diff --git a/src/views/modules/pms/shapeStep/config.js b/src/views/modules/pms/shapeStep/config.js index ddfc471..4d58cb4 100644 --- a/src/views/modules/pms/shapeStep/config.js +++ b/src/views/modules/pms/shapeStep/config.js @@ -101,7 +101,7 @@ export default function () { options: [], refreshOptionsAfterConfirm: true, elparams: { clearable: true, filterable: true, placeholder: "请选择砖型" }, - fetchData: () => this.$http.get("/pms/shape/listUnR", { params: { wsId: 2, externalCode: '', key: '' } }), + fetchData: (techId = -1) => this.$http.get("/pms/shape/listUnR", { params: { wsId: 2, externalCode: '', key: '', techId } }), }, ], // {