wangmengwei 3 anni fa
parent
commit
228089dd27

+ 341 - 88
ruoyi-ui/src/views/management/nstruction/index.vue

@@ -151,6 +151,7 @@
                 placeholder="选择日期"
                 placeholder="选择日期"
                 :disabled = "disfal"
                 :disabled = "disfal"
                 v-model="queryParamstwr.constructionStartdate"
                 v-model="queryParamstwr.constructionStartdate"
+                value-format="yyyy-MM-dd"
                 style="width: 335px"
                 style="width: 335px"
               ></el-date-picker>
               ></el-date-picker>
             </el-form-item>
             </el-form-item>
@@ -160,6 +161,7 @@
                 :disabled = "disfal"
                 :disabled = "disfal"
                 placeholder="选择日期"
                 placeholder="选择日期"
                 v-model="queryParamstwr.constructionEnddate"
                 v-model="queryParamstwr.constructionEnddate"
+                value-format="yyyy-MM-dd"
                 style="width: 335px"
                 style="width: 335px"
               ></el-date-picker>
               ></el-date-picker>
             </el-form-item>
             </el-form-item>
@@ -172,7 +174,7 @@
                     ref="uploadtwo"
                     ref="uploadtwo"
                     :before-upload="beforeAvatarUpload"
                     :before-upload="beforeAvatarUpload"
                     :on-preview="handlePictureCardPreview"
                     :on-preview="handlePictureCardPreview"
-                    :on-remove="handleRemove"
+                    :on-remove="handleRemoves"
                     :multiple="true"
                     :multiple="true"
                     :on-success="handleSuccontract"
                     :on-success="handleSuccontract"
                     :file-list="fileListfour"
                     :file-list="fileListfour"
@@ -220,7 +222,7 @@
                     :before-upload="beforeAvatarUpload"
                     :before-upload="beforeAvatarUpload"
                     list-type="picture-card"
                     list-type="picture-card"
                     :on-preview="handlePictureCardPreview"
                     :on-preview="handlePictureCardPreview"
-                    :on-remove="handleRemove"
+                    :on-remove="handleRemovess"
                     :on-success="handleSucc"
                     :on-success="handleSucc"
                     :multiple="true"
                     :multiple="true"
                     :disabled = "disfal"
                     :disabled = "disfal"
@@ -424,6 +426,7 @@
               placeholder="选择日期"
               placeholder="选择日期"
               v-model="queryParamstheyr.statisticsDate"
               v-model="queryParamstheyr.statisticsDate"
               style="width: 335px"
               style="width: 335px"
+              value-format="yyyy-MM-dd"
             ></el-date-picker>
             ></el-date-picker>
           </el-form-item>
           </el-form-item>
           <el-form-item
           <el-form-item
@@ -441,7 +444,7 @@
                   :before-upload="beforeAvatarUpload"
                   :before-upload="beforeAvatarUpload"
                   list-type="picture-card"
                   list-type="picture-card"
                   :on-preview="handlePictureCardPreview"
                   :on-preview="handlePictureCardPreview"
-                  :on-remove="handleRemove"
+                  :on-remove="handleRemovesss"
                   :on-success="handleSuccntry"
                   :on-success="handleSuccntry"
                   :multiple="true"
                   :multiple="true"
                   :disabled = "disfal"
                   :disabled = "disfal"
@@ -490,7 +493,7 @@
                   :before-upload="beforeAvatarUpload"
                   :before-upload="beforeAvatarUpload"
                   list-type="picture-card"
                   list-type="picture-card"
                   :on-preview="handlePictureCardPreview"
                   :on-preview="handlePictureCardPreview"
-                  :on-remove="handleRemove"
+                  :on-remove="handleRemovesss"
                   :on-success="handleSuccntry"
                   :on-success="handleSuccntry"
                   :multiple="true"
                   :multiple="true"
                   :disabled = "disfal"
                   :disabled = "disfal"
@@ -902,6 +905,7 @@ export default {
       queryFormhye: {},
       queryFormhye: {},
       udgment: 0, //项目入统判断是新增  还是修改   新增0   修改1
       udgment: 0, //项目入统判断是新增  还是修改   新增0   修改1
       udgmentList: [],
       udgmentList: [],
+      fourenter:false,//是否进入入统项目
     };
     };
   },
   },
   created() {
   created() {
@@ -1035,17 +1039,103 @@ export default {
       this.$refs.uploadtwo.submit();
       this.$refs.uploadtwo.submit();
     },
     },
     handleRemove(file) {
     handleRemove(file) {
-      console.log(file);
+      // console.log(file);
+      let urls = ""
+      // fileListther
+      // this.permit.push(file.response.url);
+      // this.queryParamstwr.constructionCode = this.permit.join(",");
+      if(file.response){
+        this.queryParamstwr.constructionCode =  file.response.url
+      }else{
+        urls = file.url
+      }
+      for (let i = this.permit.length - 1; i >= 0; i--) {
+        if (this.permit[i] == urls) {
+           this.permit.splice(i, 1);
+        }
+      }
+      this.queryParamstwr.constructionCode = this.permit.join(",");
+      // console.log(this.form.agreementUrl)
+
+    },
+    handleRemoves(file) {
+      // this.ontract.push(file.response.url);
+     // this.queryParamstwr.constructionDoc = this.ontract.join(",");
+     let urls = ""
+     if(file.response){
+       this.queryParamstwr.constructionDoc =  file.response.url
+     }else{
+       urls = file.url
+     }
+     for (let i = this.ontract.length - 1; i >= 0; i--) {
+       if (this.ontract[i] == urls) {
+          this.ontract.splice(i, 1);
+       }
+     }
+     this.queryParamstwr.constructionDoc = this.ontract.join(",");
+      // console.log(file);
+    },
+    handleRemovess(file) {
+      // handleSucc
+      // this.onstruction.push(file.response.url);
+     // this.queryParamstwr.constructionPhoto = this.onstruction.join(",");
+     let urls = ""
+     if(file.response){
+       this.queryParamstwr.constructionPhoto =  file.response.url
+     }else{
+       urls = file.url
+     }
+     for (let i = this.onstruction.length - 1; i >= 0; i--) {
+       if (this.onstruction[i] == urls) {
+          this.onstruction.splice(i, 1);
+       }
+     }
+     this.queryParamstwr.constructionPhoto = this.onstruction.join(",");
+      // console.log(this.queryParamstwr.constructionPhoto,777);
+
+    },
+    handleRemovesss(file) {
+      // console.log(file);
+      // fileListthertwo
+      // this.ntry.push(file.response.url);
+      // if(this.tab == 3){
+      //   this.queryParamstheyr.statisticsPhoto = this.ntry.join(",");
+      // }else if(this.tab == 4){
+      //   this.queryParamstheyrss.statisticsPhoto = this.ntry.join(",");
+      // }
+      let urls = ""
+      if(file.response){
+        if(this.tab == 3){
+             this.queryParamstheyr.statisticsPhoto = file.response.url;
+        }else if(this.tab == 4){
+            this.queryParamstheyrss.statisticsPhoto = file.response.url;
+        }
+      }else{
+        urls = file.url
+      }
+      for (let i = this.udgmentList.length - 1; i >= 0; i--) {
+        if (this.udgmentList[i] == urls) {
+           this.udgmentList.splice(i, 1);
+        }
+      }
+      if(this.tab == 3){
+           this.queryParamstheyr.statisticsPhoto = this.udgmentList.join(",");
+      }else if(this.tab == 4){
+          this.queryParamstheyrss.statisticsPhoto = this.udgmentList.join(",");
+      }
     },
     },
     //开工合同
     //开工合同
     handleSucc(response, file, fileList) {
     handleSucc(response, file, fileList) {
-      console.log(file.response.url);
       this.onstruction.push(file.response.url);
       this.onstruction.push(file.response.url);
       this.queryParamstwr.constructionPhoto = this.onstruction.join(",");
       this.queryParamstwr.constructionPhoto = this.onstruction.join(",");
+      // if(file.response.code==200){
+
+      // }
+      // console.log(this.queryParamstwr.constructionPhoto,7)
     },
     },
     //施工许可证照片
     //施工许可证照片
     handleSuccpermit(response, file, fileList) {
     handleSuccpermit(response, file, fileList) {
-      console.log(file.response.url);
+      // console.log(file.response.url);
       this.permit.push(file.response.url);
       this.permit.push(file.response.url);
       this.queryParamstwr.constructionCode = this.permit.join(",");
       this.queryParamstwr.constructionCode = this.permit.join(",");
     },
     },
@@ -1058,11 +1148,11 @@ export default {
     // 入统截图
     // 入统截图
     handleSuccntry(response, file, fileList) {
     handleSuccntry(response, file, fileList) {
       // this.ontract = []
       // this.ontract = []
-      this.ntry.push(file.response.url);
+      this.udgmentList.push(file.response.url);
       if(this.tab == 3){
       if(this.tab == 3){
-        this.queryParamstheyr.statisticsPhoto = this.ntry.join(",");
+        this.queryParamstheyr.statisticsPhoto = this.udgmentList.join(",");
       }else if(this.tab == 4){
       }else if(this.tab == 4){
-        this.queryParamstheyrss.statisticsPhoto = this.ntry.join(",");
+        this.queryParamstheyrss.statisticsPhoto = this.udgmentList.join(",");
       }
       }
 
 
     },
     },
@@ -1077,7 +1167,7 @@ export default {
         this.dialogImagename = file.name
         this.dialogImagename = file.name
       }
       }
 
 
-      console.log(file,345)
+      // console.log(file,345)
 
 
     },
     },
     handleDownload(file) {
     handleDownload(file) {
@@ -1141,7 +1231,7 @@ export default {
           //修改
           //修改
           this.queryParamstwr = response.data;
           this.queryParamstwr = response.data;
           this.modify = 1;
           this.modify = 1;
-          if (this.queryParamstwr.constructionCode !== null) {
+          if (this.queryParamstwr.constructionCode !== null&&this.queryParamstwr.constructionCode!='') {
             this.ermit = this.queryParamstwr.constructionCode.split(",");
             this.ermit = this.queryParamstwr.constructionCode.split(",");
             console.log(this.ermit, 90);
             console.log(this.ermit, 90);
             for (var i = 0; i < this.ermit.length; i++) {
             for (var i = 0; i < this.ermit.length; i++) {
@@ -1151,9 +1241,9 @@ export default {
               });
               });
             }
             }
           }
           }
-          if (this.queryParamstwr.constructionDoc !== null) {
+          if (this.queryParamstwr.constructionDoc !== null&&this.queryParamstwr.constructionDoc!='') {
             this.ontractr = this.queryParamstwr.constructionDoc.split(",");
             this.ontractr = this.queryParamstwr.constructionDoc.split(",");
-            console.log(this.ontractr, 80);
+            // console.log(this.ontractr, 80);
             for (var i = 0; i < this.ontractr.length; i++) {
             for (var i = 0; i < this.ontractr.length; i++) {
               this.fileListfour.push({
               this.fileListfour.push({
                 name: this.ontractr[i].substring(this.ontractr[i].lastIndexOf("/")+1),
                 name: this.ontractr[i].substring(this.ontractr[i].lastIndexOf("/")+1),
@@ -1161,14 +1251,14 @@ export default {
               });
               });
             }
             }
           }
           }
-          if (this.queryParamstwr.constructionPhoto !== null) {
-            this.ruction = this.queryParamstwr.constructionPhoto.split(",");
+          if (this.queryParamstwr.constructionPhoto !== null&&this.queryParamstwr.constructionPhoto!='') {
+            this.onstruction = this.queryParamstwr.constructionPhoto.split(",");
             // this.dialogImagename = this.queryParamstwr.constructionPhoto
             // this.dialogImagename = this.queryParamstwr.constructionPhoto
-            console.log(this.ruction, 70);
-            for (var i = 0; i < this.ruction.length; i++) {
+            // onstruction
+            for (var i = 0; i < this.onstruction.length; i++) {
               this.fileListfive.push({
               this.fileListfive.push({
-                name: this.ruction[i],
-                url: this.ruction[i],
+                name: this.onstruction[i],
+                url: this.onstruction[i],
               });
               });
             }
             }
           }
           }
@@ -1273,8 +1363,7 @@ export default {
           //修改
           //修改
           this.udgment = 1;
           this.udgment = 1;
           this.queryParamstheyr = response.data;
           this.queryParamstheyr = response.data;
-
-          if (this.queryParamstheyr.statisticsPhoto !== null) {
+          if (this.queryParamstheyr.statisticsPhoto !== null&&this.queryParamstheyr.statisticsPhoto!='') {
             this.udgmentList = this.queryParamstheyr.statisticsPhoto.split(",");
             this.udgmentList = this.queryParamstheyr.statisticsPhoto.split(",");
             for (var i = 0; i < this.udgmentList.length; i++) {
             for (var i = 0; i < this.udgmentList.length; i++) {
               this.fileListthertwo.push({
               this.fileListthertwo.push({
@@ -1373,6 +1462,10 @@ export default {
       } else if (this.numhu == 2) {
       } else if (this.numhu == 2) {
         this.openther = true;
         this.openther = true;
       }
       }
+      this.form = {}
+      this.formtwo = {}
+      this.formther = {}
+      this.imagese = []
 
 
       this.title = "添加参数";
       this.title = "添加参数";
     },
     },
@@ -1465,8 +1558,37 @@ export default {
       this.queryParamstheyr.bmProjectId = this.bmProjectId
       this.queryParamstheyr.bmProjectId = this.bmProjectId
       // this.formther.bmProjectId = this.bmProjectId
       // this.formther.bmProjectId = this.bmProjectId
       // console.log(this.numhu);
       // console.log(this.numhu);
-      console.log(this.tab,this.modify)
+      // console.log(this.tab,this.modify)
+
       if (this.tab == 0) {
       if (this.tab == 0) {
+          // 提示展示
+          if(this.queryParamstwr.constructionCode == null){
+            this.msgSuccess("请上传施工许可证");
+            return  false
+          }
+          if(this.queryParamstwr.isConstruction == "Y"){
+            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.queryParamstwr.constructionPhoto==''){
+            this.msgSuccess("请上传开工照片");
+            return  false
+          }
+          if(this.configList.length<1){
+            this.msgSuccess("请添加开工照片");
+            return  false
+          }
+
         this.$refs["queryForm"].validate((valid) => {
         this.$refs["queryForm"].validate((valid) => {
           if (valid) {
           if (valid) {
             // if(this.queryParamstwr.constructionCode == ''){
             // if(this.queryParamstwr.constructionCode == ''){
@@ -1474,30 +1596,30 @@ export default {
             //   return  false
             //   return  false
             // }
             // }
             if (this.modify == 1) {
             if (this.modify == 1) {
-              if(this.queryParamstwr.constructionCode == null){
-                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.constructionCode == null){
+              //   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.constructionPhoto == null){
+              //   this.msgSuccess("请上传开工合同");
+              //   return  false
+              // }
 
 
               //修改
               //修改
 
 
@@ -1509,28 +1631,28 @@ export default {
                 // this.$router.go(-1);
                 // this.$router.go(-1);
               });
               });
             } else if (this.modify == 0) {
             } 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
-              }
-              if(this.queryParamstwr.constructionDoc == undefined){
-                this.msgSuccess("请上传施工施工合同");
-                return  false
-              }
-              if(this.queryParamstwr.constructionPhoto == undefined){
-                this.msgSuccess("请上传开工合同");
-                return  false
-              }
+              // 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
+              // }
+              // if(this.queryParamstwr.constructionDoc == undefined){
+              //   this.msgSuccess("请上传施工施工合同");
+              //   return  false
+              // }
+              // if(this.queryParamstwr.constructionPhoto == undefined){
+              //   this.msgSuccess("请上传开工合同");
+              //   return  false
+              // }
 
 
 
 
               //新增
               //新增
@@ -1550,31 +1672,31 @@ export default {
         this.$refs["queryFormtwo"].validate((valid) => {
         this.$refs["queryFormtwo"].validate((valid) => {
           if (valid) {
           if (valid) {
             if (this.udgment == 1) {
             if (this.udgment == 1) {
-              if(this.queryParamstheyr.statisticsDate == null){
-                this.msgSuccess("请选择入统日期");
-                return  false
-              }
-              if(this.queryParamstheyr.statisticsPhoto == null){
-                this.msgSuccess("请上传入统截图");
-                return  false
-              }
+              // if(this.queryParamstheyr.statisticsDate == null){
+              //   this.msgSuccess("请选择入统日期");
+              //   return  false
+              // }
+              // if(this.queryParamstheyr.statisticsPhoto == null){
+              //   this.msgSuccess("请上传入统截图");
+              //   return  false
+              // }
               //修改
               //修改
               updateConfigntegration(this.queryParamstheyr).then((response) => {
               updateConfigntegration(this.queryParamstheyr).then((response) => {
                 this.msgSuccess("修改成功");
                 this.msgSuccess("修改成功");
                 this.open = false;
                 this.open = false;
                 // this.getListtoi();
                 // this.getListtoi();
                 this.handleAudit()
                 this.handleAudit()
-                this.$router.go(-1);
+                // this.$router.go(-1);
               });
               });
             } else {
             } else {
-              if(this.queryParamstheyr.statisticsDate == undefined){
-                this.msgSuccess("请选择入统日期");
-                return  false
-              }
-              if(this.queryParamstheyr.statisticsPhoto == undefined){
-                this.msgSuccess("请上传入统截图");
-                return  false
-              }
+              // if(this.queryParamstheyr.statisticsDate == undefined){
+              //   this.msgSuccess("请选择入统日期");
+              //   return  false
+              // }
+              // if(this.queryParamstheyr.statisticsPhoto == undefined){
+              //   this.msgSuccess("请上传入统截图");
+              //   return  false
+              // }
               this.queryParamstheyr.bmProjectId = this.bmProjectId;
               this.queryParamstheyr.bmProjectId = this.bmProjectId;
               console.log(this.queryParamstheyr.bmProjectId,98)
               console.log(this.queryParamstheyr.bmProjectId,98)
               addConfigsix(this.queryParamstheyr).then((response) => {
               addConfigsix(this.queryParamstheyr).then((response) => {
@@ -1600,7 +1722,7 @@ export default {
           });
           });
         } else {
         } else {
           this.queryParamstheyrss.bmProjectId = this.bmProjectId;
           this.queryParamstheyrss.bmProjectId = this.bmProjectId;
-          console.log(this.queryParamstheyrss.bmProjectId,98)
+          // console.log(this.queryParamstheyrss.bmProjectId,98)
           addConfigsixde(this.queryParamstheyrss).then((response) => {
           addConfigsixde(this.queryParamstheyrss).then((response) => {
             this.msgSuccess("新增成功");
             this.msgSuccess("新增成功");
             this.opentwo = false;
             this.opentwo = false;
@@ -1695,8 +1817,7 @@ export default {
     //tab
     //tab
     tabClid(index) {
     tabClid(index) {
       this.tab = index;
       this.tab = index;
-      console.log(this.tab,78)
-      this.ntry = []
+      this.udgmentList = []
       if (this.tab == 1) {
       if (this.tab == 1) {
         this.getListther();
         this.getListther();
       } else if (this.tab == 0) {
       } else if (this.tab == 0) {
@@ -1706,13 +1827,134 @@ export default {
         this.getListfour();
         this.getListfour();
         this.getListfive();
         this.getListfive();
       } else if (this.tab == 3) {
       } else if (this.tab == 3) {
+        // 判断有没有进入4
+        this.fourenter=true
         this.getListsix();
         this.getListsix();
       }else if(this.tab == 4){
       }else if(this.tab == 4){
          this.getListssijeu()
          this.getListssijeu()
       }
       }
+      if(!this.disfal){
+        this.submitCtionfrty()
+      }
+
 
 
       // this.$router.push('/tab');
       // this.$router.push('/tab');
     },
     },
+    // 到哪一步才能走暂存
+    submitCtionfrty() {
+          this.queryParamstheyr.bmProjectId = this.bmProjectId
+          if (this.tab == 0) {
+            // 项目施工?暂存项目入统
+            if(this.fourenter){
+              if (this.udgment == 1) {
+                //修改
+                var arr = Object.keys(this.queryParamstheyr);
+                if(arr.length>1){
+                  //修改
+                  updateConfigntegration(this.queryParamstheyr).then((response) => {
+                    this.open = false;
+                  });
+                }
+              } else {
+                this.queryParamstheyr.bmProjectId = this.bmProjectId;
+                addConfigsix(this.queryParamstheyr).then((response) => {
+                  // this.msgSuccess("新增成功");
+                  this.opentwo = false;
+                  // this.handleAudit()
+                  // this.getListther();
+                  // this.$router.go(-1);
+                });
+              }
+            }
+
+
+          } else if (this.tab == 3) {
+            // 项目 暂存项目施工
+    //修改
+            if (this.modify == 1) {
+              //修改
+             var arrs = Object.keys(this.queryParamstwr);
+               if(arrs.length){
+                 updateConfigatruction(this.queryParamstwr).then((response) => {
+                   this.open = false;
+                   // this.getListtoi();
+                 });
+               }
+            } else if (this.modify == 0) {
+              //新增
+              this.queryParamstwr.bmProjectId = this.bmProjectId;
+              addConfigtherction(this.queryParamstwr).then((response) => {
+                // this.msgSuccess("新增成功");
+                this.open = false;
+                // this.getListtoi();
+                // this.handleAudit()
+                // this.$router.go(-1);
+              });
+            }
+          }else if(this.tab == 4){
+
+            if (this.udgment == 1) {
+              //修改
+              updateConfigntegrationde(this.queryParamstheyrss).then((response) => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+              });
+            } else {
+              this.queryParamstheyrss.bmProjectId = this.bmProjectId;
+              // console.log(this.queryParamstheyrss.bmProjectId,98)
+              addConfigsixde(this.queryParamstheyrss).then((response) => {
+                this.msgSuccess("新增成功3");
+                this.opentwo = false;
+              });
+            }
+          }else{
+            // 都暂存这是项目入统暂存
+            //修改
+            if(this.fourenter){
+              if (this.udgment == 1) {
+                //修改
+                var arr = Object.keys(this.queryParamstheyr);
+                if(arr.length>1){
+                  //修改
+                  console.log(55)
+                  updateConfigntegration(this.queryParamstheyr).then((response) => {
+                    this.open = false;
+                  });
+                }
+              } else {
+                this.queryParamstheyr.bmProjectId = this.bmProjectId;
+                addConfigsix(this.queryParamstheyr).then((response) => {
+                  // this.msgSuccess("新增成功");
+                  this.opentwo = false;
+                  // this.handleAudit()
+                  // this.getListther();
+                  // this.$router.go(-1);
+                });
+              }
+            }
+
+           if (this.modify == 1) {
+             //修改
+            var arrs = Object.keys(this.queryParamstwr);
+              if(arrs.length){
+                updateConfigatruction(this.queryParamstwr).then((response) => {
+                  this.open = false;
+                  // this.getListtoi();
+                });
+              }
+           } else if (this.modify == 0) {
+             //新增
+             this.queryParamstwr.bmProjectId = this.bmProjectId;
+             addConfigtherction(this.queryParamstwr).then((response) => {
+               // this.msgSuccess("新增成功");
+               this.open = false;
+               // this.getListtoi();
+               // this.handleAudit()
+               // this.$router.go(-1);
+             });
+           }
+          }
+        },
     //下一页点击
     //下一页点击
     nextYg() {
     nextYg() {
       this.tab = this.tab + 1;
       this.tab = this.tab + 1;
@@ -1727,6 +1969,8 @@ export default {
       this.resettwo();
       this.resettwo();
       this.numhu = index;
       this.numhu = index;
       this.fileListtherrt = []
       this.fileListtherrt = []
+      this.formther = {}
+      this.imagese = []
       this.opentwo = true;
       this.opentwo = true;
       this.titletwo = "添加参数";
       this.titletwo = "添加参数";
     },
     },
@@ -1738,6 +1982,15 @@ export default {
     handleAudit() {
     handleAudit() {
       console.log(23)
       console.log(23)
       // this.msgSuccess("请点击暂存按钮,返回上级页面进行提交");
       // this.msgSuccess("请点击暂存按钮,返回上级页面进行提交");
+      if(this.configListher.length<1){
+        this.msgSuccess("请添加设备安全信息");
+        return  false
+      }
+      // 判断是否项目资金
+      if(this.configLisfour.length<1){
+        this.msgSuccess("请添加项目到资信息");
+        return  false
+      }
       this.queryFormhye.code = 1;
       this.queryFormhye.code = 1;
       this.queryFormhye.bmProjectId = this.bmProjectId;
       this.queryFormhye.bmProjectId = this.bmProjectId;
       setExamine(this.queryFormhye).then((response) => {
       setExamine(this.queryFormhye).then((response) => {

+ 18 - 18
ruoyi-ui/src/views/management/roduction/index.vue

@@ -447,32 +447,32 @@ export default {
     /** 暂存按钮 */
     /** 暂存按钮 */
     submitForm() {
     submitForm() {
       var tmp = [];
       var tmp = [];
+	  if (this.form.totInvestment == null) {
+	    this.msgError("请输入已完成投资额");
+	    return;
+	  }
+	  if (this.form.macInvestment == null) {
+	    this.msgError("请输入设备投资额度");
+	    return;
+	  }
+	  if (this.form.productDate == null) {
+	    this.msgError("请选择投产时间");
+	    return;
+	  }
       if (this.productPhotoList.length == 0) {
       if (this.productPhotoList.length == 0) {
         this.msgError("请先选择投产图片");
         this.msgError("请先选择投产图片");
         return;
         return;
       }
       }
+	  if (this.orderContractPhotoList.length == 0) {
+	    this.msgError("请先选择设备订购合同");
+	    return;
+	  }
       if (this.arrivalListPhotoList.length == 0) {
       if (this.arrivalListPhotoList.length == 0) {
-        this.msgError("请先选择到资清单图片");
-        return;
-      }
-      if (this.orderContractPhotoList.length == 0) {
-        this.msgError("请先选择设备订购合同图片");
-        return;
-      }
-      if (this.form.totInvestment == null) {
-        this.msgError("请输入已完成投资额");
-        return;
-      }
-      if (this.form.macInvestment == null) {
-        this.msgError("请输入设备投资额度");
-        return;
-      }
-      if (this.form.productDate == null) {
-        this.msgError("请选择投产时间");
+        this.msgError("请先选择到资清单");
         return;
         return;
       }
       }
       if (this.form.isOk == null) {
       if (this.form.isOk == null) {
-        this.msgError("请填写信息");
+        this.msgError("请填写项目入规信息");
         return;
         return;
       }
       }
       this.productPhotoList.forEach((item, index) => {
       this.productPhotoList.forEach((item, index) => {