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

切换页签保存数据

parent 564e7671
...@@ -214,6 +214,7 @@ export default { ...@@ -214,6 +214,7 @@ export default {
return { return {
loading: false, loading: false,
bomList: [], bomList: [],
productionSolutionId: null,
// 表单参数 // 表单参数
form: { form: {
productionSolutionId: "", productionSolutionId: "",
...@@ -265,9 +266,16 @@ export default { ...@@ -265,9 +266,16 @@ export default {
}, },
}, },
created() { created() {
if (this.$route.query && this.$route.query.productionSolutionId && this.productionSolutionId !== this.$route.query.productionSolutionId) {
this.productionSolutionId = this.$route.query.productionSolutionId
}
this.getFormInfo(); 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: { methods: {
...@@ -292,12 +300,6 @@ export default { ...@@ -292,12 +300,6 @@ export default {
}); });
} }
}, },
/** 生成编码 */
gCode() {
genCode("PROTOTYPE_REQUEST_CODE").then((response) => {
this.form.prototypeRequestCode = response;
});
},
/** 点击tab 获取bom的数据,将参数传递给后面的组件 */ /** 点击tab 获取bom的数据,将参数传递给后面的组件 */
tabClick(val) { tabClick(val) {
if (val.index != 0) { if (val.index != 0) {
...@@ -397,7 +399,6 @@ export default { ...@@ -397,7 +399,6 @@ export default {
this.$refs["ProogingBomRef"].resetState(); this.$refs["ProogingBomRef"].resetState();
this.$refs["ProogingProcessRef"].resetState(); this.$refs["ProogingProcessRef"].resetState();
this.$refs["ProogingSpecificationSheetRef"].resetState(); this.$refs["ProogingSpecificationSheetRef"].resetState();
this.gCode();
}, },
}, },
}; };
......
...@@ -462,13 +462,17 @@ export default { ...@@ -462,13 +462,17 @@ export default {
if (this.$route.query && this.$route.query.workorderId && this.workorderId !== this.$route.query.workorderId) { if (this.$route.query && this.$route.query.workorderId && this.workorderId !== this.$route.query.workorderId) {
this.resetForm() this.resetForm()
this.workorderId = this.$route.query.workorderId this.workorderId = this.$route.query.workorderId
this.getFormInfo();
if (this.mode == "apply") {
this.gCode();
}
} }
this.getFormInfo();
if (this.mode == "apply") {
this.gCode();
}
}, },
created() { created() {
if (this.$route.query && this.$route.query.workorderId && this.workorderId !== this.$route.query.workorderId) {
this.workorderId = this.$route.query.workorderId
}
this.getFormInfo(); this.getFormInfo();
if (this.mode == "apply") { if (this.mode == "apply") {
this.gCode(); 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