chencc пре 1 година
родитељ
комит
45e6f26c61

+ 17 - 4
src/views/productionPlan/components/factoryAdd/index.vue

@@ -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');
         }
       });
     },

+ 0 - 2
src/views/productionPlan/index.vue

@@ -970,12 +970,10 @@
   
         this.$refs.factoryAddRef.open();
         // this.factoryShow = true;
-        
       },
 
       factoryClose(val) {
         // this.factoryShow = false;
-        this.$refs.factoryAddRef.close();
         this.factoryType= 3;
         this.factoryObj= {};
         if (val) {