|
|
@@ -174,7 +174,6 @@ export default {
|
|
|
// 修改
|
|
|
this.$nextTick(() => {
|
|
|
if (val.id) {
|
|
|
- console.log(111111,val.id);
|
|
|
this.bomListVersion();
|
|
|
if(val.bomCategoryId){
|
|
|
this.getPlanRouting();
|
|
|
@@ -279,7 +278,19 @@ export default {
|
|
|
this.$set(this.form, 'code', code);
|
|
|
} catch (err) { }
|
|
|
},
|
|
|
-
|
|
|
+ initForm() {
|
|
|
+ this.form= {
|
|
|
+ timeDimensionPlanType: 3,
|
|
|
+ categoryId: '',
|
|
|
+ productName: '',
|
|
|
+ planType: 1,
|
|
|
+ id: '',
|
|
|
+ produceType: 2,
|
|
|
+ bomCategoryId: '',
|
|
|
+ produceRoutingId: '',
|
|
|
+ requiredFormingNum: ''
|
|
|
+ };
|
|
|
+ },
|
|
|
save() {
|
|
|
this.$refs.form.validate(async (valid) => {
|
|
|
if (!valid) {
|
|
|
@@ -297,7 +308,9 @@ export default {
|
|
|
.then((res) => {
|
|
|
this.$message.success('新增成功!');
|
|
|
this.visible = false;
|
|
|
+ this.initForm();
|
|
|
this.$emit('close', true);
|
|
|
+
|
|
|
})
|
|
|
.finally(() => {
|
|
|
this.loading = false;
|
|
|
@@ -308,7 +321,9 @@ export default {
|
|
|
.then((res) => {
|
|
|
this.$message.success('修改成功!');
|
|
|
this.visible = false;
|
|
|
+ this.initForm();
|
|
|
this.$emit('close', true);
|
|
|
+
|
|
|
})
|
|
|
.finally(() => {
|
|
|
this.loading = false;
|
|
|
@@ -371,8 +386,6 @@ export default {
|
|
|
this.$set(this.form, 'produceRoutingId', f.id);
|
|
|
this.$set(this.form, 'produceRoutingName', f.name);
|
|
|
this.$set(this.form, 'produceVersionName', f.version);
|
|
|
-
|
|
|
- console.log(this.form, '1111111');
|
|
|
}
|
|
|
});
|
|
|
},
|