gangyj 3 жил өмнө
parent
commit
137548e609

+ 10 - 4
src/views/manager/contractinfo/detail.vue

@@ -524,11 +524,17 @@
 
       async saveQuit(){
         this.btnLoad = true;
-        if(this.activeType == '1'){
-          await this.savecontract();
-        }else if(this.activeType == '2'){
-          await this.saveWbsTree();
+        try {
+          if(this.activeType == '1'){
+            await this.savecontract();
+          }else if(this.activeType == '2'){
+            await this.saveWbsTree();
+          }
+        } catch (error) {
+          this.btnLoad = false;
+          return;
         }
+
         this.$message({
           type: "success",
           message: "保存成功!"

+ 21 - 6
src/views/manager/projectinfo/detail.vue

@@ -181,6 +181,9 @@
         if (value != Number(value)) {
           callback(new Error('金额必须是数字'));
         }
+        if (value && 999999999999999999 < Number(value)) {
+          callback(new Error('数字过大'));
+        }
         callback();
       };
       var checkMileage = (rule, value, callback) => {
@@ -369,11 +372,17 @@
 
      async saveQuit(){
        this.btnLoad = true;
-       if(this.activeType == '1'){
+       try {
+        if(this.activeType == '1'){
           await this.saveProject();
         }else if(this.activeType == '2'){
           await this.saveWbsTree();
         }
+       } catch (error) {
+         this.btnLoad = false;
+          return;
+       }
+
        this.$message({
           type: "success",
           message: "保存成功!"
@@ -383,12 +392,18 @@
      },
      async saveNext(type){
         this.btnLoad = true;
-        if(this.activeType == '1'){
-          let res = await this.saveProject();
-          this.projectForm.id = res.data.data.id;
-        }else if(this.activeType == '2'){
-          await this.saveWbsTree();
+        try {
+          if(this.activeType == '1'){
+            let res = await this.saveProject();
+            this.projectForm.id = res.data.data.id;
+          }else if(this.activeType == '2'){
+            await this.saveWbsTree();
+          }
+        } catch (error) {
+          this.btnLoad = false;
+          return;
         }
+        
         this.$message({
           type: "success",
           message: "保存成功!"

+ 1 - 1
src/views/manager/wbsinfo/edit.vue

@@ -789,7 +789,7 @@
             })
             saveFormAndElement(this.eleForm).then(()=>{
               //console.log(res)
-              this.updateTreeNewNode();
+              //this.updateTreeNewNode();
               this.updateNodeTable();
               this.eleVisible = false;
               this.$message({