update 混料批次

This commit is contained in:
lb
2023-03-14 17:07:59 +08:00
parent f9ad79f6bc
commit 977dbb7c41
4 changed files with 62 additions and 11 deletions

View File

@@ -248,7 +248,7 @@ export default {
},
/** init **/
init(id, detailMode) {
init(id, detailMode, extraParams) {
// console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
if (this.$refs.dataForm) {
// console.log("[DialogJustForm] clearing form validation...");
@@ -257,6 +257,7 @@ export default {
}
this.detailMode = detailMode ?? false;
this.$nextTick(() => {
this.dataForm.id = id || null;
if (this.dataForm.id) {
@@ -297,7 +298,15 @@ export default {
});
});
} else {
// 如果不是编辑
// 如果不是编辑,看看是否有其他 extraParams
if (extraParams && typeof extraParams === "object") {
for (const [key, value] of Object.entries(extraParams)) {
this.$set(this.dataForm, key, value);
console.log('[DialogJustForm] setting: ', key, value)
}
}
this.loadingStatus = false;
}
});