sunyize 2 роки тому
батько
коміт
1be9b1e0d3

+ 230 - 36
src/views/truckCheck/modules/TaskCheckAudit.vue

@@ -3,7 +3,7 @@
     <!--  客户信息-->
     <a-page-header
       style="background-color: #FFFFFF;margin-bottom:10px"
-      title="客户详情稽核"
+      :title= 'checkState===2 ?"客户信息稽核":checkState===4?"客户信息信息整改":""'
       sub-title=""
       @back="back"
     >
@@ -68,7 +68,7 @@
 
     <div>
       <a-card style="margin-bottom:10px;width: 15%;float: left">
-        <a-steps direction="vertical" :current="steps.current" size="small" @change="stepsClick">
+        <a-steps direction="vertical" :current="steps.current" size="small" @change="stepsClick" v-if='checkState===2 ||checkState===5 '>
           <a-step v-for="item in steps.stepsNow" :key="item.title"   :status="item.status">
             <a-icon v-if="item.solution" style='color: #faad14;' :type="item.type"  :slot="item.slot" />
             <a-icon v-if="item.solutionGreen" style='color: #52c41a;' :type="item.type"  :slot="item.slot" />
@@ -77,9 +77,18 @@
             <span v-else-if='item.yellow'  style='color: sandybrown' slot="title" >{{item.title}}</span>
             <span v-else    slot="title" >{{item.title}}</span>
           </a-step>
-
         </a-steps>
-        <a-button @click="submitAuditLot" style="width: 100%;position: relative;top: 10px" type="primary">提交稽核</a-button>
+        <a-steps direction="vertical" :current="steps.current" size="small" @change="stepsClick"v-if='checkState===4'>
+          <a-step v-for="item in steps.stepsNow" :key="item.title"   :status="item.status" >
+            <!--          <a-icon  :type="item.type" :slot="item.slot"   />-->
+            <a-icon v-if="item.solution" style='color: #faad14;' :type="item.type"  :slot="item.slot" />
+            <span  v-if="item.solution"  style='color: sandybrown' slot="title" >{{item.title}}</span>
+            <span v-else    slot="title" >{{item.title}}</span>
+          </a-step>
+        </a-steps>
+
+        <a-button @click="submitAuditLot"v-if='checkState!==5' style="width: 100%;position: relative;top: 10px" type="primary">提交稽核</a-button>
+        <a-button @click="outPage"v-if='checkState===5' style="width: 100%;position: relative;top: 10px" type="primary">退出</a-button>
       </a-card>
 
       <!--    入网申请签报 -->
@@ -158,7 +167,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'applySign')">移除
                   </a-button>
 
@@ -306,7 +323,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'threePhotos')">移除
                   </a-button>
 
@@ -453,7 +478,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'commitmentBook')">移除
                   </a-button>
 
@@ -600,7 +633,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'isPriceApproval')">移除
                   </a-button>
 
@@ -748,7 +789,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'legalIdCard')">移除
                   </a-button>
 
@@ -895,7 +944,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'operatorIdCard')">移除
                   </a-button>
 
@@ -1042,7 +1099,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'authorizeBook')">移除
                   </a-button>
 
@@ -1189,7 +1254,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'zZBusinessLicense')">移除
                   </a-button>
 
@@ -1337,7 +1410,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'centerBusiness')">移除
                   </a-button>
 
@@ -1485,7 +1566,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'contractOrProve')">移除
                   </a-button>
 
@@ -1633,7 +1722,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'riskTable')">移除
                   </a-button>
 
@@ -1780,7 +1877,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'trunkTable')">移除
                   </a-button>
 
@@ -1928,7 +2033,15 @@
                   </iframe>
                   <img style="width: 100%;height: 70%;border: 1px solid;"
                        v-if="!item.urlBase" :src="noDataPng" border="1">
-                  <a-button v-if="item.urlBase" style="display: block;margin-top: 10px;border-color: red;color: red"
+                  <a-button  style="float:left;display: block;position: relative;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if="  item.urlBase "
+                         @click="downloadFile(item.url)">下载
+              </a-button>
+              <a-button  style="display: block;position: relative;left:20px;margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                         v-if=" item.urlBase "
+                         @click="jumpUrl(item.urlBase)">预览
+              </a-button>
+                  <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5" style="display: block;margin-top: 10px;border-color: red;color: red"
                             danger @click="removeFile(item,'trunkContract')">移除
                   </a-button>
 
@@ -2689,6 +2802,19 @@ export default {
     this.getInfoDataByInfoId(this.$route.query.id)
   },
   methods: {
+    downloadFile(url){
+      const a = document.createElement('a')
+      a.style.display='none';
+      a.href=url
+      document.body.appendChild(a)
+      a.click()
+    },
+    jumpUrl(url){
+      var a = document.createElement("a");
+      a.setAttribute("href", url);
+      a.setAttribute("target", "_blank");
+      a.click();
+    },
     /**移除文件*/
     removeFile(fileData, fileAttribute) {
       let that = this.infoModel;
@@ -2781,6 +2907,14 @@ export default {
       } else {
         this.steps.stepsNow[this.steps.current].status = "wait"
       }
+      if (this.steps.stepsNow[this.steps.current].status = "error"){
+        //  type:"solution",
+        //slot:"icon"
+        this.steps.stepsNow[this.steps.current].type="solution",
+          this.steps.stepsNow[this.steps.current].slot="icon"
+        this.steps.stepsNow[this.steps.current].status = "final"
+        this.steps.stepsNow[this.steps.current].solution = true;
+      }
     },
     sizeColor(){
       if (this.infoModel.infoResult==="2"){
@@ -2830,16 +2964,59 @@ export default {
             that.infoModel.riskTable= JSON.parse(result.riskTable);
             that.infoModel.trunkTable= JSON.parse(result.trunkTable);
             that.infoModel.trunkContract= JSON.parse(result.trunkContract);
-            // for (var i in that.steps.stepsNow) {
-            //   for (var j in result[that.steps.stepsNow[i].id]){
-            //     if (result[that.steps.stepsNow[i].id][0].urlBase!==undefined){
-            //       that.steps.stepsNow[i].status = "finish"
-            //     }
-            //     if (result[that.steps.stepsNow[i].id+'Remark'][0]!==undefined){
-            //       that.steps.stepsNow[i].status = "finish"
-            //     }
-            //   }
-            // }
+            //待稽核
+            if (that.checkState===2 || that.checkState===5 ){
+              for (var i in that.steps.stepsNow) {
+                for (var j in result[that.steps.stepsNow[i].id]){
+                  if (result[that.steps.stepsNow[i].id+'Result'][0]!==undefined){
+                    if (result[that.steps.stepsNow[i].id+'Result'][0]==='1'){
+                      that.steps.stepsNow[i].status = "finish"
+
+                    }else {
+                      //that.steps.stepsNow[i].status = "error"
+                      that.steps.stepsNow[i].type="solution"
+                      that.steps.stepsNow[i].slot="icon"
+                      that.steps.stepsNow[i].status = "final"
+                      that.steps.stepsNow[i].solution = true;
+                      that.steps.stepsNow[i].yellow = true;
+                      that.steps.stepsNow[i].Isyellow = true;
+                    }
+                  }
+                }
+              }
+              if (that.infoModel.infoResult==="2"){
+                var element = document.getElementById('directRequirements');
+                element.style.color = 'red';
+              }
+              if (that.infoModel.infoResult==="1"){
+                var element = document.getElementById('directRequirements');
+                element.style.color = 'black';
+              }
+            }
+            //待整改
+            if (that.checkState===4){
+              for (var i in that.steps.stepsNow) {
+                for (var j in result[that.steps.stepsNow[i].id]){
+                  if (result[that.steps.stepsNow[i].id+'Result'][0]!==undefined){
+                    if (result[that.steps.stepsNow[i].id+'Result'][0]==='1'){
+                      that.steps.stepsNow[i].status = "finish"
+                    }else {
+                      that.steps.stepsNow[i].status = "error"
+                    }
+                  }
+                }
+              }
+              if (that.infoModel.infoResult==="2"){
+                var element = document.getElementById('directRequirements');
+                element.style.color = 'red';
+                that.isShow=false
+              }
+              if (that.infoModel.infoResult==="1"){
+                var element = document.getElementById('directRequirements');
+                element.style.color = 'black';
+                that.isShow=true
+              }
+            }
 
           }
         })
@@ -2870,20 +3047,36 @@ export default {
       }
       return resultA
     },
+
+    outPage(){
+      this.$router.push({path: '/truck/check/task/check', query: {id: this.taskId}});
+    },
+
     /**提交稽核*/
     submitAuditLot() {
       this.uploading=true;
       var info = "yes";
-      for (var i in this.steps.stepsNow) {
-        if (this.steps.stepsNow[i].status === "wait"   ) {
-          this.$message.warn( this.steps.stepsNow[i].title +"未进行稽核...");
-          info="no";
-        }
-      }
-      if (this.infoModel.infoResult==="" || this.infoModel.infoResult===null){
-        this.$message.warn( "中继线基本信息未进行稽核...");
-        info="no";
+
+        for (var i in this.steps.stepsNow) {
+          if (this.checkState===2){
+            if (this.steps.stepsNow[i].status === "wait"   ) {
+              this.$message.warn( this.steps.stepsNow[i].title +"未进行稽核...");
+              info="no";
+              }
+              if (this.infoModel.infoResult==="" || this.infoModel.infoResult===null){
+                this.$message.warn( "中继线基本信息未进行稽核...");
+                info="no";
+              }
+          }
+          if (this.checkState===4){
+            if (this.steps.stepsNow[i].status !== "finish" && this.steps.stepsNow[i].type!=='solution') {
+              this.$message.warn( this.steps.stepsNow[i].title +"资料或备注都未整改!!!");
+              info="no";
+            }
+          }
       }
+
+
       if (info==="no"){
         this.uploading=false;
         return
@@ -2898,6 +3091,7 @@ export default {
           this.$message.success("提交成功", 3);
           this.addIng == true
           this.closeCurrent();
+          this.$router.push({path: '/truck/check/task/check', query: {id: that.taskId}});
         } else {
           this.uploading=false;
           if (  res.message  !==null){

+ 16 - 6
src/views/truckCheck/modules/TaskCheckList.vue

@@ -100,7 +100,7 @@
 
           <template slot="action" slot-scope="text, record">
 
-            <span v-has="'truck:task:check:list:upload:improve'" v-if="record.checkState == 0 || record.checkState == 1 || record.checkState == 4">
+            <span v-has="'truck:task:check:list:upload:improve'" v-if="record.checkState == 0 || record.checkState == 1  ">
               <a @click="showImproveAndUpload(record)">上传资料</a>
               <a-divider type="vertical"/>
             </span>
@@ -109,12 +109,14 @@
               <a @click="showCheckCheck(record)">稽核</a>
               <a-divider type="vertical"/>
             </span>
-
-            <span v-has="'truck:task:check:list:history'" v-if="record.checkState >= 4">
-              <a @click="showCheckLog(record)">历史</a>
-              <a-divider type="vertical"/>
+            <span v-has="'truck:check:list:selectData'" v-if="record.checkState === 5">
+              <a @click="selectData(record)">查看数据</a>
+              <a-divider type="vertical" />
+            </span>
+            <span v-has="'truck:check:list:history'" v-if="record.checkState === 4">
+              <a @click="showImproveGZ(record)">整改</a>
+              <a-divider type="vertical" />
             </span>
-
             <span v-has="'truck:task:check:list:notice'"
                   v-if="record.checkState != 2 && record.checkState != 3 && record.checkState != 5">
               <a @click="noticeDeal(record)">催办</a>
@@ -362,6 +364,14 @@ export default {
     }
   },
   methods: {
+    // 整改
+    showImproveGZ(record) {
+      this.$router.push({path: '/truckCheck/modules/TaskCheckAudit', query: {id: record.id}});
+    },
+// 历史
+    selectData(record) {
+      this.$router.push({path: '/truckCheck/modules/TaskCheckAudit', query: {id: record.id}});
+    },
     // 返回上一级
     goBack() {
       this.$router.go(-1);