done 基本完成工艺管理

This commit is contained in:
lb 2023-02-24 14:47:51 +08:00
parent b0286bcc08
commit b573e2dc2f
4 changed files with 7 additions and 9 deletions

View File

@ -424,20 +424,18 @@ export default {
updateOptions() { updateOptions() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!this.dataForm?.id) resolve(null);
if (this.watingToRefreshQueue.length) { if (this.watingToRefreshQueue.length) {
this.watingToRefreshQueue.forEach((opt) => { this.watingToRefreshQueue.forEach((opt) => {
console.log("[刷新数据, ", opt, "]"); console.log("[刷新数据, ", opt, "]");
if ("fetchData" in 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) { if (res.code === 0) {
this.$set( this.$set(
opt, opt,
"options", "options",
"list" in res.data "list" in res.data
? res.data.list.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.name, value: i.id })) : res.data.map((i) => ({ label: i.code, value: i.id }))
); );
resolve({ done: true }); resolve({ done: true });
@ -504,7 +502,7 @@ export default {
}); });
} else { } else {
// //
// this.dialogVisible = true; this.updateOptions()
} }
}); });
}, },

View File

@ -104,7 +104,7 @@ export default function () {
options: [], options: [],
refreshOptionsAfterConfirm: true, refreshOptionsAfterConfirm: true,
elparams: { clearable: true, filterable: true, placeholder: "请选择配方" }, 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: "备注" } }], [{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],

View File

@ -104,7 +104,7 @@ export default function () {
options: [], options: [],
refreshOptionsAfterConfirm: true, refreshOptionsAfterConfirm: true,
elparams: { clearable: true, filterable: true, placeholder: "请选择配方" }, 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: "备注" } }], [{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],

View File

@ -101,7 +101,7 @@ export default function () {
options: [], options: [],
refreshOptionsAfterConfirm: true, refreshOptionsAfterConfirm: true,
elparams: { clearable: true, filterable: true, placeholder: "请选择砖型" }, 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 } }),
}, },
], ],
// { // {