yrik 4 жил өмнө
parent
commit
737a5f4023

+ 25 - 16
ruoyi-ui/src/views/management/nstruction/index.vue

@@ -1440,22 +1440,27 @@ export default {
                 this.msgSuccess("请上传施工许可证");
                 return  false
               }
+              if(this.queryParamstwr.isConstruction == "Y"){
+                console.log(this.queryParamstwr.isConstruction)
+                if(this.queryParamstwr.constructionEnddate == null){
+                  this.msgSuccess("请选择预计完工日期");
+                  return  false
+                }
+                if(this.queryParamstwr.constructionStartdate == null){
+                  this.msgSuccess("请选择开工日期");
+                  return  false
+                }
+              }
               if(this.queryParamstwr.constructionDoc == null){
                 this.msgSuccess("请上传施工施工合同");
                 return  false
               }
+
               if(this.queryParamstwr.constructionPhoto == null){
                 this.msgSuccess("请上传开工合同");
                 return  false
               }
-              if(this.queryParamstwr.constructionEnddate == null){
-                this.msgSuccess("请选择预计完工日期");
-                return  false
-              }
-              if(this.queryParamstwr.constructionStartdate == null){
-                this.msgSuccess("请选择开工日期");
-                return  false
-              }
+
               //修改
               updateConfigatruction(this.queryParamstwr).then((response) => {
                 this.msgSuccess("修改成功");
@@ -1464,6 +1469,16 @@ export default {
                 this.$router.go(-1);
               });
             } else if (this.modify == 0) {
+              if(this.queryParamstwr.isConstruction == "Y"){
+                if(this.queryParamstwr.constructionEnddate == undefined){
+                  this.msgSuccess("请选择预计完工日期");
+                  return  false
+                }
+                if(this.queryParamstwr.constructionStartdate == undefined){
+                  this.msgSuccess("请选择开工日期");
+                  return  false
+                }
+              }
               if(this.queryParamstwr.constructionCode == undefined){
                 this.msgSuccess("请上传施工许可证");
                 return  false
@@ -1476,14 +1491,8 @@ export default {
                 this.msgSuccess("请上传开工合同");
                 return  false
               }
-              if(this.queryParamstwr.constructionEnddate == undefined){
-                this.msgSuccess("请选择预计完工日期");
-                return  false
-              }
-              if(this.queryParamstwr.constructionStartdate == undefined){
-                this.msgSuccess("请选择开工日期");
-                return  false
-              }
+              
+
               //新增
               this.queryParamstwr.bmProjectId = this.bmProjectId;
               addConfigtherction(this.queryParamstwr).then((response) => {