Ver Fonte

其他材料

sunyize há 2 anos atrás
pai
commit
b661fda940

+ 161 - 1
src/views/truckCheck/TaskUploadData.vue

@@ -2428,6 +2428,147 @@
 
 
     </a-card>
+
+    <!--承诺涵-其他材料-非必填-->
+    <a-card v-if="steps.currentId === 'commitment'" style="margin-bottom:10px; float: left;width: 83%;left: 2%; ">
+      <div slot="title">
+        <span style="float: left;position: relative;top: 4px">其他材料</span>
+      </div>
+      <div class="a-card-25">
+        <a-alert
+          message="注意事项(必看)"
+          type="warning"
+          style="height: 100vh"
+        >
+          <div slot="description" class="markdown" style="position: relative;top:30px">
+            <ul>
+              <li>1)如有其他材料请进行上传</li>
+            </ul>
+          </div>
+        </a-alert>
+      </div>
+      <div class="a-card-70">
+        <div>
+          <a-form-model-item style="left: -2%;" label="上传资料备注:" v-bind="labelCol1Note">
+            <a-textarea class="a-textarea-line-30"
+                        v-model="infoModel.commitmentRemark"
+                        @change="textareaChange('commitment','commitmentRemark')"
+                        placeholder="如没有上传资料备注,需要说明原因"
+            />
+            <!--            :auto-size="{ minRows: 3, maxRows: 5 }"-->
+          </a-form-model-item>
+        </div>
+        <a-upload
+          name="file"
+          :multiple="true"
+          :action="importMinioUploadAction"
+          :customRequest="e => selfUploadContract(e, 'commitment')"
+          :headers="tokenHeader"
+          :showUploadList="false"
+          :beforeUpload="importBeforeUpload"
+          @change="importHandleChange"
+          class="a-upload-line-30"
+        >
+          <a-button>
+            <a-icon type="upload"/>
+            上传文件
+          </a-button>
+        </a-upload>
+        <div style="height: 70%">
+          <div class="thumb-example">
+            <!-- swiper1 -->
+            <swiper
+              class="swiper gallery-top"
+              :options="swiperOptionTop"
+              ref="swiperTop"
+            >
+              <swiper-slide class="slide-1" v-for="(item, index) in infoModel.commitment" :key="item.id">
+                <iframe
+                  v-if="item.urlBase"
+                  frameborder="1"
+                  :src="item.urlBase"
+                  ref="ifr"
+                  width="70%"
+                  height="500px"
+                  scrolling="auto">
+                </iframe>
+                <img style="width: 70%;height: 70%;border: 1px solid;"
+                     v-if="!item.urlBase" :src="noDataPng" border="1">
+                <div><a-button v-if="item.urlBase"
+                               style="display: block;margin-top: 1px;border-color: red;color: red;float: left"
+                               danger @click="removeFile(item,'commitment')">移除
+                </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></div>
+              </swiper-slide>
+              <div
+                class="swiper-button-next swiper-button-white"
+                slot="button-next"
+              ></div>
+              <div
+                class="swiper-button-prev swiper-button-white"
+                slot="button-prev"
+              ></div>
+            </swiper>
+            <!-- swiper2 Thumbs -->
+            <swiper
+              class="swiper gallery-thumbs"
+              :options="swiperOptionThumbs"
+              ref="swiperThumbs"
+            >
+              <swiper-slide
+                class="slide"
+                style="width:100px;height:100px;"
+                v-for="(item, index) in infoModel.commitment"
+                :key="item.id"
+              >
+                <div v-if="item.urlBase" style="width: 100%;height: 96px;background: rgb(68,142,247);color: white">
+                  <span style="white-space:normal; word-break:break-all;overflow:hidden;">{{ item.fileName }}</span>
+                </div>
+
+                <img style="width: 100%;height: 96px"
+                     v-if="!item.urlBase" :src="noDataPng" border="1">
+
+              </swiper-slide>
+              <!--              点我上传文件按钮-->
+              <div class="clearfix">
+                <a-upload
+                  listType="picture-card"
+                  name="file"
+                  :multiple="false"
+                  :action="importMinioUploadAction"
+                  :customRequest="e=>selfUploadContract(e,'commitment')"
+                  :headers="tokenHeader"
+                  :showUploadList="false"
+                  :beforeUpload="importBeforeUpload"
+                  @change="importHandleChange"
+                >
+                  <div>
+                    <a-icon type="plus"/>
+                    <div class="ant-upload-text">点我上传其它材料</div>
+                  </div>
+
+                </a-upload>
+
+              </div>
+
+              <div class="swiper-button-next swiper-button-white" slot="button-next">
+                <div>
+                  <!--                  <img src="../../../../assets/images/nextImg.png" alt=""/>-->
+                </div>
+              </div>
+              <div class="swiper-button-prev swiper-button-white" slot="button-prev">
+                <div>
+                  <!--                  <img src="../../../../assets/images/prevImg.png" alt=""/>-->
+                </div>
+              </div>
+            </swiper>
+          </div>
+        </div>
+      </div>
+    </a-card>
     <a-card  v-if='isPhoneshow'    ref="floatButton"
              class="float-infoPhone">
       <div class="thumb-example1"  >
@@ -3207,6 +3348,9 @@ export default {
 
         accessPhoto:[{}],
         accessPhotoRemark:"",
+
+        commitment: [{}],
+        commitmentRemark: '',
       },
 
       next: "",
@@ -3465,6 +3609,7 @@ export default {
             that.infoModel.accessPhone= JSON.parse(result.accessPhone);
             that.infoModel.accessPhoto= JSON.parse(result.accessPhoto);
             that.infoModel.accessTable= JSON.parse(result.accessTable);
+            that.infoModel.commitment = JSON.parse(result.commitment);
             that.controlChange();
             for (var i in that.steps.stepsNow) {
               for (var j in result[that.steps.stepsNow[i].id]){
@@ -3584,7 +3729,7 @@ export default {
       )
       var text= "";
       for (var i in this.steps.stepsNow) {
-        if (this.steps.stepsNow[i].status !== "finish") {
+        if (this.steps.stepsNow[i].status !== "finish"&&  this.steps.stepsNow[i].id !=='commitment') {
           // text+= '111<br/> ';
           var str=this.steps.stepsNow[i].title;
           text+=  str+"资料或备注都未上传!!!"+'<br/><br/>';
@@ -3699,6 +3844,21 @@ export default {
             });
           }
       }
+
+      var info2='';
+      for (var i = 0; i <this.steps.stepsNow.length; i++) {
+        if (this.steps.stepsNow[i].id==='commitment'){
+          info2 ='yes';
+        }
+      }
+      if (info2!=='yes'){
+        this.steps.stepsNow.push({
+          title: '其他材料',
+          content: 'First-content',
+          id: "commitment",
+        });
+      }
+
       for (var i in this.steps.stepsNow) {
         for (var j in this.infoModel[this.steps.stepsNow[i].id]){
           if (this.infoModel[this.steps.stepsNow[i].id][0].urlBase!==undefined){

+ 215 - 6
src/views/truckCheck/modules/TaskCheckAudit.vue

@@ -8,7 +8,7 @@
       @back="back"
     >
       <!--      稽核和详情的基础信息-->
-      <div v-if='checkState===2 ||checkState===5 '>
+      <div v-if='checkState===2 ||checkState===5 || infoModel.infoResult==="1" '>
         <a-form-model
           ref="form"
           :model="infoModel"
@@ -172,7 +172,7 @@
         :model="infoModel"
         :rules="rules"
       >
-      <a-card  v-if='checkState===4' style="margin-bottom:10px;color: #000000d9;font-size: 15px;line-height: 2.5;">
+      <a-card  v-if='checkState===4 &&  infoModel.infoResult!=="1"' style="margin-bottom:10px;color: #000000d9;font-size: 15px;line-height: 2.5;">
         <div>
           <span>1.请选择客户类型</span>
         </div>
@@ -200,7 +200,7 @@
           </a-radio-group>
         </div>
       </a-card>
-      <a-card v-if='checkState===4' style="margin-bottom:10px;color: #000000d9;font-size: 15px;line-height: 2.5;">
+      <a-card v-if='checkState===4 &&  infoModel.infoResult!=="1" ' style="margin-bottom:10px;color: #000000d9;font-size: 15px;line-height: 2.5;">
         <a-row>
           <a-col :span="6">
             <a-form-model-item label="客户编号"prop="customerNo" v-bind="labelCol4" >
@@ -3304,7 +3304,178 @@
 
       </a-card>
 
+      <a-card v-if="steps.currentId === 'commitment'" style="margin-bottom:10px; float: left;width: 83%;left: 2%; ">
+        <div slot="title">
+          <span style="float: left;position: relative;top: 4px">其他材料</span>
+          <!--        操作按钮-->
+
+        </div>
+        <div class="a-card-25">
+          <a-alert
+            message="注意事项(必看)"
+            type="warning"
+            style="height: 100vh"
+          >
+            <div slot="description" class="markdown" style="position: relative;top:30px">
+              <ul>
+                <li>1)如有其他材料请进行上传</li>
+              </ul>
+            </div>
+          </a-alert>
+        </div>
+        <div class="a-card-70">
+          <div>
+            <a-form-model-item style="left:  10%;margin-top: 20px" label="稽核是否通过:" v-bind="labelCol1Note">
+              <div v-if="checkState===2?false:true">
+                <a-tag class="font-size-14" v-if="infoModel.commitmentResult == 1" color="#2db7f5">是</a-tag>
+                <a-tag class="font-size-14" v-if="infoModel.commitmentResult == 2" color=“#f50”>否</a-tag>
+              </div>
+              <div v-if="checkState===2?true:false">
+                <a-radio-group button-style="solid" :disabled="checkState===2?false:true"
+                               @change="basicCheckClick(infoModel.commitmentResult)"
+                               v-model='infoModel.commitmentResult'>
+                  <a-radio :value="'1'">是</a-radio>
+                  <a-radio :value="'2'">否</a-radio>
+                </a-radio-group>
+              </div>
+              <!--            :auto-size="{ minRows: 3, maxRows: 5 }"-->
+            </a-form-model-item>
+          </div>
+          <div>
+            <a-form-model-item style="left: 10%;margin-top: 20px" label="稽核结果备注:" v-bind="labelCol1Note">
+              <a-tag v-if="checkState===2?false:true" class="font-size-14"
+                     color="orange">{{ infoModel.commitmentResultRemark }}</a-tag>
+              <a-textarea v-if="checkState===2?true:false" style="height: 77px"
+                          v-model="infoModel.commitmentResultRemark"
+
+                          placeholder="请输入稽核结果" :disabled="checkState===2?false:true"
+              />
+            </a-form-model-item>
+            <a-form-model-item style="left: 10%;margin-top: 20px" label="上传资料备注:" v-bind="labelCol1Note">
+              <a-tag v-if="(checkState===4 && infoModel.commitmentResult  ==='1' ) || (checkState===2|| checkState===5) ?true:false"
+                     class="font-size-14" color="orange">{{ infoModel.commitmentRemark }}</a-tag>
 
+              <a-textarea v-if="(checkState===4 && infoModel.commitmentResult  ==='1' ) || (checkState===2|| checkState===5) ?false:true"
+                          style="height: 77px"
+                          :disabled="(checkState===4 && infoModel.commitmentResult  ==='1' ) || (checkState===2|| checkState===5) ?true:false"
+                          v-model="infoModel.commitmentRemark"
+                          @change="textareaChange('commitment','commitmentRemark')"
+                          placeholder="如没有上传资料备注,需要说明原因"
+              />
+              <!--            :auto-size="{ minRows: 3, maxRows: 5 }"-->
+            </a-form-model-item>
+          </div>
+          <a-upload
+            name="file"
+            :multiple="true"
+            :action="importMinioUploadAction"
+            :customRequest="e => selfUploadContract(e, 'commitment')"
+            :headers="tokenHeader"
+            :showUploadList="false"
+            :beforeUpload="importBeforeUpload"
+            @change="importHandleChange"
+            v-if='checkState===4 && infoModel.commitmentResult==="2"'
+            class="a-upload-line-30"
+          >
+            <a-button>
+              <a-icon type="upload"/>
+              上传文件
+            </a-button>
+          </a-upload>
+          <div style="height: 70%">
+            <div class="thumb-example">
+
+              <!-- swiper1 -->
+              <swiper
+                class="swiper gallery-top"
+                :options="swiperOptionTop"
+                ref="swiperTop"
+              >
+                <swiper-slide class="slide-1" v-for="(item, index) in infoModel.commitment" :key="item.id">
+                  <iframe
+                    v-if="item.urlBase"
+                    frameborder="1"
+                    :src="item.urlBase"
+                    ref="ifr"
+                    width="70%"
+                    height="500px"
+                    scrolling="auto">
+                  </iframe>
+                  <img style="width: 70%;height: 70%;border: 1px solid;"
+                       v-if="!item.urlBase" :src="noDataPng" border="1">
+                  <div>
+                    <a-button style="float: left; margin-top: 10px;border-color: #1890FF;color: #1890FF"
+                              v-if="  item.urlBase "
+                              @click="downloadFile(item.url)">下载
+                    </a-button>
+                    <a-button style="float: left;margin-top: 10px;border-color: #1890FF;color: #1890FF;margin: 10px"
+                              v-if=" item.urlBase "
+                              @click="jumpUrl(item.urlBase)">预览
+                    </a-button>
+                    <a-button v-if="item.urlBase&& checkState!==2  &&checkState!==5&& infoModel.commitmentResult==='2'"
+                              style="float: left;margin-top: 10px;border-color: red;color: red"
+                              danger @click="removeFile(item,'commitment')">移除
+                    </a-button>
+                  </div>
+                </swiper-slide>
+              </swiper>
+              <!-- swiper2 Thumbs -->
+              <swiper
+                class="swiper gallery-thumbs"
+                :options="swiperOptionThumbs"
+                ref="swiperThumbs"
+              >
+                <swiper-slide
+                  class="slide"
+                  style="width:100px;height:100px;"
+                  v-for="(item, index) in infoModel.commitment"
+                  :key="item.id"
+                >
+                  <div v-if="item.urlBase" style="width: 100%;height: 96px;background: rgb(68,142,247);color: white">
+                    <span style="white-space:normal; word-break:break-all;overflow:hidden;">{{ item.fileName }}</span>
+                  </div>
+
+                  <img style="width: 100%;height: 96px"
+                       v-if="!item.urlBase" :src="noDataPng" border="1">
+
+                </swiper-slide>
+                <!--              点我上传文件按钮-->
+                <div class="clearfix">
+                  <a-upload
+                    listType="picture-card"
+                    name="file"
+                    :multiple="false"
+                    :action="importMinioUploadAction"
+                    :customRequest="e=>selfUploadContract(e,'commitment')"
+                    :headers="tokenHeader"
+                    :showUploadList="false"
+                    :beforeUpload="importBeforeUpload"
+                    @change="importHandleChange"
+                  >
+                    <div v-if='checkState===4 && infoModel.commitmentResult==="2"'>
+                      <a-icon type="plus"/>
+                      <div class="ant-upload-text">点我上传资料</div>
+                    </div>
+
+                  </a-upload>
+
+                </div>
+
+                <div class="swiper-button-next swiper-button-white" slot="button-next">
+                  <div>
+                    <!--                  <img src="../../../../assets/images/nextImg.png" alt=""/>-->
+                  </div>
+                </div>
+                <div class="swiper-button-prev swiper-button-white" slot="button-prev">
+                  <div>
+                    <!--                  <img src="../../../../assets/images/prevImg.png" alt=""/>-->
+                  </div>
+                </div>
+              </swiper>
+            </div>
+          </div>
+        </div>
+      </a-card>
 
     </div>
 
@@ -3559,8 +3730,10 @@ export default {
 
         accessPhotoResult:"",
         accessPhotoResultRemark:"",
-
-
+        commitment: [{}],
+        commitmentRemark: '',
+        commitmentResult: "",
+        commitmentResultRemark: "",
         infoResult:"",
         infoResultRemark:"",
         dataId:"",
@@ -4296,6 +4469,19 @@ export default {
           });
         }
       }
+      var info2='';
+      for (var i = 0; i <this.steps.stepsNow.length; i++) {
+        if (this.steps.stepsNow[i].id==='commitment'){
+          info2='yes';
+        }
+      }
+      if (info2!=='yes'){
+        this.steps.stepsNow.push({
+          title: '其他材料',
+          content: 'First-content',
+          id: "commitment",
+        });
+      }
       for (var i in this.steps.stepsNow) {
         for (var j in this.infoModel[this.steps.stepsNow[i].id]){
           if (this.infoModel[this.steps.stepsNow[i].id][0].urlBase!==undefined){
@@ -4522,6 +4708,7 @@ export default {
             that.infoModel.accessPhone= JSON.parse(result.accessPhone);
             that.infoModel.accessPhoto= JSON.parse(result.accessPhoto);
             that.infoModel.accessTable= JSON.parse(result.accessTable);
+            that.infoModel.commitment = JSON.parse(result.commitment);
             that.infoModel.customType= result.customType ;
             that.infoModel.scene= result.scene ;
             var customType =result.customType;
@@ -4576,6 +4763,27 @@ export default {
                 });
               }
             }
+            var info2='';
+            for (var i = 0; i <that.steps.stepsNow.length; i++) {
+              if (that.steps.stepsNow[i].id==='commitment'){
+                info2='yes';
+              }
+            }
+            if (info2!=='yes'){
+              that.steps.stepsNow.push({
+                title: '其他材料',
+                content: 'First-content',
+                id: "commitment",
+              });
+            }
+            if ((that.infoModel.commitmentRemark ==='' || that.infoModel.commitmentRemark ===null)&&
+              (that.infoModel.commitment  ==='' || that.infoModel.commitment  ===null || that.infoModel.commitment  ==='[{}]' &&  that.checkState !== 4 )){
+              for (var i = 0; i <this.steps.stepsNow.length; i++) {
+                if (that.steps.stepsNow[i].id==='commitment'){
+                  that.steps.stepsNow.splice(i, 1);
+                }
+              }
+            }
             that.checkState=result.checkState;
             //待稽核
             if (that.checkState===2 || that.checkState===5 ){
@@ -4675,6 +4883,7 @@ export default {
 
         for (var i in this.steps.stepsNow) {
           if (this.checkState===2){
+            debugger
             if (this.steps.stepsNow[i].status === "wait"  || this.steps.stepsNow[i].status===undefined  || this.steps.stepsNow[i].status===''|| this.steps.stepsNow[i].status===null ) {
                 if (this.steps.stepsNow[i].type!=='solution'){
                   this.$message.warn( this.steps.stepsNow[i].title +"未进行稽核...");
@@ -4687,7 +4896,7 @@ export default {
             }
           }
           if (this.checkState===4){
-            if (this.steps.stepsNow[i].status !== "finish" && this.steps.stepsNow[i].type!=='solution') {
+            if (this.steps.stepsNow[i].status !== "finish" && this.steps.stepsNow[i].type!=='solution'&&  this.steps.stepsNow[i].id !=='commitment') {
               this.$message.warn( this.steps.stepsNow[i].title +"资料或备注都未整改!!!");
               info="no";
             }