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 } }), }, ], // {