|
@@ -470,9 +470,9 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- defaultForm,
|
|
|
|
|
// 表单数据
|
|
// 表单数据
|
|
|
- form: defaultForm(),
|
|
|
|
|
|
|
+ form: defaultForm.call(this),
|
|
|
|
|
+ clientEnvironmentId: this.$store.state.user.info.clientEnvironmentId,
|
|
|
|
|
|
|
|
factoryList: [],
|
|
factoryList: [],
|
|
|
workshopPlanList: [],
|
|
workshopPlanList: [],
|
|
@@ -660,14 +660,17 @@
|
|
|
|
|
|
|
|
async open(type, row) {
|
|
async open(type, row) {
|
|
|
this.type = type;
|
|
this.type = type;
|
|
|
|
|
+ this.form = defaultForm.call(this);
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
if (type == 'edit' || type == 'copy') {
|
|
if (type == 'edit' || type == 'copy') {
|
|
|
for (const key of Object.keys(this.form)) {
|
|
for (const key of Object.keys(this.form)) {
|
|
|
if (key !== 'extInfo') {
|
|
if (key !== 'extInfo') {
|
|
|
this.form[key] = row[key];
|
|
this.form[key] = row[key];
|
|
|
} else {
|
|
} else {
|
|
|
- for (const el of Object.keys(this.form.extInfo)) {
|
|
|
|
|
- this.form.extInfo[el] = row.extInfo[el];
|
|
|
|
|
|
|
+ if (row.extInfo) {
|
|
|
|
|
+ for (const el of Object.keys(this.form.extInfo)) {
|
|
|
|
|
+ this.form.extInfo[el] = row.extInfo[el];
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -786,7 +789,7 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
restForm() {
|
|
restForm() {
|
|
|
- this.form = { ...this.defaultForm() };
|
|
|
|
|
|
|
+ this.form = { ...defaultForm.call(this) };
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.form.clearValidate();
|
|
this.$refs.form.clearValidate();
|
|
|
});
|
|
});
|
|
@@ -927,7 +930,7 @@
|
|
|
res.tMainFactoryWorkstationOperationAddPOList
|
|
res.tMainFactoryWorkstationOperationAddPOList
|
|
|
);
|
|
);
|
|
|
});
|
|
});
|
|
|
- const baseForm = defaultForm();
|
|
|
|
|
|
|
+ const baseForm = defaultForm.call(this);
|
|
|
|
|
|
|
|
this.form = {
|
|
this.form = {
|
|
|
...baseForm,
|
|
...baseForm,
|