sunyize há 2 anos atrás
pai
commit
4d381e574f

+ 8 - 1
src/views/smscheck/modules/TaskCheckCheck.vue

@@ -2584,6 +2584,7 @@ export default {
     },
     /*提交*/
     submitAuditLot() {
+      this.uploading=true;
       var info = "yes";
       for (var i in this.steps.stepsNow) {
         if (this.steps.stepsNow[i].status === "wait"   ) {
@@ -2596,23 +2597,29 @@ export default {
         info="no";
       }
       if (info==="no"){
+        this.uploading=false;
         return
       }
       var that = this;
       var data=that.infoModel ;
-      data =this.dataListToStr(data);
+      var dataToStr =this.dataListToStr(data);
+      data=dataToStr;
       postAction("/smsCheck/customerData/addLog", data).then((res) => {
         if (res.success) {
+          this.uploading=false;
           this.$message.success("提交成功", 3);
           this.addIng == true
           this.closeCurrent();
         } else {
+          this.uploading=false;
           if (  res.message  !==null){
             this.$message.error( res.message);
           }else {
             this.$message.error("提交失败");
           }
         }
+      }).finally(() => {
+        this.uploading = false;
       })
     },
     /**步骤条点击事件*/

+ 12 - 1
src/views/smscheck/modules/TaskUploadData.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-spin :spinning="uploading" size="large" tip="正在提交资料,请勿关闭当前网页...">
+  <a-spin :spinning="this.uploading" size="large" tip="正在提交资料,请勿关闭当前网页...">
     <!--  客户信息-->
     <a-page-header
       style="background-color: #FFFFFF;margin-bottom:10px"
@@ -2808,31 +2808,38 @@ export default {
 
     /**暂存*/
     addIsStaging() {
+      this.uploading = true;
       var that = this;
       var data=that.infoModel ;
       data =this.dataListToStr(data);
       postAction("/smsCheck/customerData/addIsStaging", data).then((res) => {
         if (res.success) {
+          this.uploading = false;
           this.$message.success("提交成功", 3);
           this.addIng == true
           this.$router.push({path: '/sms/check/task/check', query: {id: data.taskId}});
           this.closeCurrent();
         } else {
+          this.uploading = false;
           if (  res.message  !==null){
             this.$message.error( res.message);
           }else {
             this.$message.error("提交失败");
           }
         }
+      }).finally(() => {
+        this.uploading = false;
       })
     },
     /*提交*/
     submitAuditLot() {
+      this.uploading = true;
       var info = "yes";
       this.$refs.form.validate(valid => {
         // 验证通过
         if (!valid) {
           info = "no";
+          this.uploading = false;
         }}
       )
 
@@ -2858,18 +2865,22 @@ export default {
       data =this.dataListToStr(data);
       postAction("/smsCheck/customerData/add", data).then((res) => {
         if (res.success) {
+          this.uploading = false;
           this.$message.success("提交成功", 3);
           this.addIng == true
 
           this.$router.push({path: '/sms/check/task/check', query: {id: data.taskId}});
           this.closeCurrent();
         } else {
+          this.uploading = false;
           if (  res.message  !==null){
             this.$message.error( res.message);
           }else {
             this.$message.error("提交失败");
           }
         }
+      }).finally(() => {
+        this.uploading = false;
       })
     },
     /**步骤条点击事件*/

+ 20 - 2
src/views/smscheck/modules/TaskUploadDataZG.vue

@@ -3392,38 +3392,53 @@ export default {
 
     /**暂存*/
     addIsStaging() {
+      this.uploading = true;
       var that = this;
       var data=that.infoModel ;
       data =this.dataListToStr(data);
       postAction("/smsCheck/customerData/addIsStaging", data).then((res) => {
         if (res.success) {
+          this.uploading = false;
           this.$message.success("提交成功", 3);
           this.addIng == true
           this.closeCurrent();
         } else {
+          this.uploading = false;
           if (  res.message  !==null){
             this.$message.error( res.message);
           }else {
             this.$message.error("提交失败");
           }
         }
+      }).finally(() => {
+        this.uploading = false;
       })
     },
     /*提交*/
     submitAuditLot() {
+      this.uploading = true;
       this.$refs['form'].validate(valid => {
       })
       var info = "yes";
+      this.$refs.form.validate(valid => {
+        // 验证通过
+        if (!valid) {
+          info = "no";
+          this.uploading = false;
+        }}
+      )
       for (var i in this.steps.stepsNow) {
         if (this.steps.stepsNow[i].status !== "finish" && this.steps.stepsNow[i].type!=='solution') {
            this.$message.warn( this.steps.stepsNow[i].title +"资料或备注都未整改!!!");
            info="no";
+          this.uploading = false;
         }
       }
       if (this.infoModel.isCsp==='1'){
         if ((this.infoModel.permitDateDate==="" ||this.infoModel.permitDateDate===null
         ) && (this.infoModel.permitDateDateIs==="" ||this.infoModel.permitDateDateIs===null ||this.infoModel.permitDateDateIs==='0') ){
           info="no";
+          this.uploading = false;
           this.$message.warn( "增值业务许可证到期时间未填写!!!");
         }
       }
@@ -3431,21 +3446,24 @@ export default {
         return
       }
 
-      var that = this;
-      var data=that.infoModel ;
+      var data=this.infoModel ;
       data =this.dataListToStr(data);
       postAction("/smsCheck/customerData/addLog", data).then((res) => {
         if (res.success) {
+          this.uploading = false;
           this.$message.success("提交成功", 3);
           this.$router.push({path: '/sms/check/task/check', query: {id: data.taskId}});
           this.closeCurrent();
         } else {
+          this.uploading = false;
           if (  res.message  !==null){
             this.$message.error( res.message);
           }else {
             this.$message.error("提交失败");
           }
         }
+      }).finally(() => {
+        this.uploading = false;
       })
     },
     /**步骤条点击事件*/