Commit db6587d4 authored by 沈翠玲's avatar 沈翠玲

切换页签保存数据

parent 564e7671
......@@ -214,6 +214,7 @@ export default {
return {
loading: false,
bomList: [],
productionSolutionId: null,
// 表单参数
form: {
productionSolutionId: "",
......@@ -265,9 +266,16 @@ export default {
},
},
created() {
if (this.$route.query && this.$route.query.productionSolutionId && this.productionSolutionId !== this.$route.query.productionSolutionId) {
this.productionSolutionId = this.$route.query.productionSolutionId
}
this.getFormInfo();
if (this.mode == "apply") {
this.gCode();
},
activated() {
if (this.$route.query && this.$route.query.productionSolutionId && this.productionSolutionId !== this.$route.query.productionSolutionId) {
this.resetForm()
this.productionSolutionId = this.$route.query.productionSolutionId
this.getFormInfo();
}
},
methods: {
......@@ -292,12 +300,6 @@ export default {
});
}
},
/** 生成编码 */
gCode() {
genCode("PROTOTYPE_REQUEST_CODE").then((response) => {
this.form.prototypeRequestCode = response;
});
},
/** 点击tab 获取bom的数据,将参数传递给后面的组件 */
tabClick(val) {
if (val.index != 0) {
......@@ -397,7 +399,6 @@ export default {
this.$refs["ProogingBomRef"].resetState();
this.$refs["ProogingProcessRef"].resetState();
this.$refs["ProogingSpecificationSheetRef"].resetState();
this.gCode();
},
},
};
......
......@@ -462,13 +462,17 @@ export default {
if (this.$route.query && this.$route.query.workorderId && this.workorderId !== this.$route.query.workorderId) {
this.resetForm()
this.workorderId = this.$route.query.workorderId
this.getFormInfo();
if (this.mode == "apply") {
this.gCode();
}
}
this.getFormInfo();
if (this.mode == "apply") {
this.gCode();
}
},
created() {
if (this.$route.query && this.$route.query.workorderId && this.workorderId !== this.$route.query.workorderId) {
this.workorderId = this.$route.query.workorderId
}
this.getFormInfo();
if (this.mode == "apply") {
this.gCode();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment