Rorschach 5 лет назад
Родитель
Сommit
4026e38b17

+ 2 - 0
src/pages/costTeam/index.vue

@@ -125,6 +125,7 @@ export default {
         if (valid) {
           console.log(this.form);
           if(this.addFlag) {
+            this.form.id = null;
             addCostTeam(this.form).then(res => {
               this.costTeamData.unshift(res.data)
               this.$refs[formName].resetFields();
@@ -150,6 +151,7 @@ export default {
     },
     // 取消
     resetForm (formName) {
+      this.form.id = null;
       this.$refs[formName].resetFields();
       this.dialogFormVisible = false;
     }    

+ 2 - 0
src/pages/costType/index.vue

@@ -129,6 +129,7 @@ export default {
         if (valid) {
           console.log(this.form);
           if (this.addFlag) {
+            this.form.id = null;
             addCostType(this.form).then(res => {
               if (res.code === 703) {
                 this.$alert("添加失败,该类型名已存在");
@@ -162,6 +163,7 @@ export default {
     },
     // 取消
     resetForm(formName) {
+      this.form.id = null;
       this.$refs[formName].resetFields();
       this.dialogFormVisible = false;
     }

+ 2 - 0
src/pages/customer/index.vue

@@ -183,6 +183,7 @@ export default {
         if (valid) {
           console.log(this.form);
           if(this.addFlag) {
+            this.form.id = null;
             addTeam(this.form).then(res => {
               console.log(res.data.name)
               //追加元素
@@ -216,6 +217,7 @@ export default {
       });
     },
     resetForm(formName) {
+      this.form.id = null;
         this.dialogFormVisible = false;
         this.$refs[formName].resetFields();
     }  

+ 2 - 0
src/pages/manage/cost.vue

@@ -414,6 +414,7 @@ export default {
           this.form.happenTime = new Date(this.form.happenTime) * 1;
           this.form.type = this.type;
           if (this.addFlag) {
+            this.form.id = null;
             addManage(this.form).then(res => {
               console.log(res);
               //获取经营列表
@@ -462,6 +463,7 @@ export default {
     },
     // 取消
     resetForm(formName) {
+      this.form.id = null;
       this.$refs[formName].resetFields();
       this.dialogFormVisible = false;
     },

+ 2 - 0
src/pages/manage/index.vue

@@ -401,6 +401,7 @@ export default {
           this.form.happenTime = new Date(this.form.happenTime) * 1;
           this.form.type = this.type;
           if (this.addFlag) {
+            this.form.id = null;
             addManage(this.form).then(res => {
               console.log(res);
               //获取经营列表
@@ -473,6 +474,7 @@ export default {
     },
     // 取消
     resetForm(formName) {
+      this.form.id = null;
       this.$refs[formName].resetFields();
       this.dialogFormVisible = false;
     },

+ 2 - 0
src/pages/product/index.vue

@@ -127,6 +127,7 @@ export default {
         if (valid) {
           console.log('进入第一个')
           if (this.addFlag) {
+            this.form.id = null;
             addProduct(this.form).then(res => {
               this.productData.unshift(res.data);
               this.$refs[formName].resetFields();
@@ -156,6 +157,7 @@ export default {
     },
     // 取消
     resetForm(formName) {
+      this.form.id = null;
       this.$refs[formName].resetFields();
       this.dialogFormVisible = false;
     }

+ 2 - 0
src/pages/project/index.vue

@@ -139,6 +139,7 @@ export default {
         if (valid) {
           console.log(this.form);
           if (this.addFlag) {
+            this.form.id = null;
             addProject(this.form).then(res => {
               if (res.code === 703) {
                 this.$alert("添加失败,该项目名已存在");
@@ -174,6 +175,7 @@ export default {
     },
     // 取消
     resetForm(formName) {
+      this.form.id = null;
       this.$refs[formName].resetFields();
       this.dialogFormVisible = false;
     }

+ 2 - 0
src/pages/provider/index.vue

@@ -183,6 +183,7 @@ export default {
         if (valid) {
           console.log(this.form);
           if(this.addFlag) {
+            this.form.id = null;
             addTeam(this.form).then(res => {
               console.log(res.data.name)
               //追加元素
@@ -216,6 +217,7 @@ export default {
       });
     },
     resetForm(formName) {
+      this.form.id = null;
         this.dialogFormVisible = false;
         this.$refs[formName].resetFields();
     }  

+ 1 - 0
src/pages/team/index.vue

@@ -197,6 +197,7 @@ export default {
         if (valid) {
           console.log(this.form);
           if(this.addFlag) {
+            this.form.id = null;
             addTeam(this.form).then(res => {
               console.log(res.data.name)
               //追加元素