update 混料批次
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user