From 3c1d55fe67cf436de36fd2e7ddc057e26b7a89c9 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期五, 19 五月 2023 15:12:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/common/Audit.vue |  466 +++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 298 insertions(+), 168 deletions(-)

diff --git a/src/views/common/Audit.vue b/src/views/common/Audit.vue
index 542c1ac..1ebb2b3 100644
--- a/src/views/common/Audit.vue
+++ b/src/views/common/Audit.vue
@@ -4,23 +4,23 @@
       <template slot="header">
         <el-form :inline="true" :model="queryInfo" class="demo-form-inline">
           <el-form-item label="鎶ユ浜猴細">
-            <el-input placeholder="璇疯緭鍏ュ鍚嶆垨韬唤璇�" v-model="queryInfo.people"></el-input>
+            <el-input placeholder="璇疯緭鍏ュ鍚�" v-model="queryInfo.people"></el-input>
           </el-form-item>
           <el-form-item label="鎵嬫満鍙风爜锛�">
             <el-input placeholder="璇疯緭鍏�" v-model="queryInfo.phoneNumber"></el-input>
           </el-form-item>
-          <el-form-item label="鏄惁宸茶繘缇わ細">
-            <el-select v-model="queryInfo.isInGroup" placeholder="璇烽�夋嫨">
-              <el-option v-for="item in optionsGroup" :key="item.value" :label="item.label" :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="鎶ユ鏉愭枡锛�">
-            <el-select v-model="queryInfo.HavaMaterial" placeholder="璇烽�夋嫨">
-              <el-option v-for="item in optionsMate" :key="item.value" :label="item.label" :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
+<!--          <el-form-item label="鏄惁宸茶繘缇わ細">-->
+<!--            <el-select v-model="queryInfo.isInGroup" placeholder="璇烽�夋嫨">-->
+<!--              <el-option v-for="item in optionsGroup" :key="item.value" :label="item.label" :value="item.value">-->
+<!--              </el-option>-->
+<!--            </el-select>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="鎶ユ鏉愭枡锛�">-->
+<!--            <el-select v-model="queryInfo.HavaMaterial" placeholder="璇烽�夋嫨">-->
+<!--              <el-option v-for="item in optionsMate" :key="item.value" :label="item.label" :value="item.value">-->
+<!--              </el-option>-->
+<!--            </el-select>-->
+<!--          </el-form-item>-->
           <el-form-item>
             <el-button type="primary" @click="search">鏌ヨ</el-button>
           </el-form-item>
@@ -49,20 +49,20 @@
         <el-table-column width="80" prop="reporterName" label="鎶ユ浜�"></el-table-column>
         <el-table-column width="120" prop="mobile" label="鎵嬫満鍙风爜"></el-table-column>
         <el-table-column width="180" prop="idcard" label="璇佷欢鍙风爜"></el-table-column>
-        <el-table-column width="100" prop="isCommission" label="鏄惁瀹℃牳">
-          <template slot-scope="scope">
-            <el-popover
-                v-if="scope.row.status == 2"
-                placement="bottom"
-                title="椹冲洖鍘熷洜"
-                width="200"
-                trigger="click"
-                :content="scope.row.remarks">
-              <el-button type="text"  slot="reference">宸查┏鍥�</el-button>
-            </el-popover>
-            <span v-else>鍚�</span>
-          </template>
-        </el-table-column>
+<!--        <el-table-column width="100" prop="isCommission" label="鏄惁瀹℃牳">-->
+<!--          <template slot-scope="scope">-->
+<!--            <el-popover-->
+<!--                v-if="scope.row.status == 2"-->
+<!--                placement="bottom"-->
+<!--                title="椹冲洖鍘熷洜"-->
+<!--                width="200"-->
+<!--                trigger="click"-->
+<!--                :content="scope.row.remarks">-->
+<!--              <el-button type="text"  slot="reference">宸查┏鍥�</el-button>-->
+<!--            </el-popover>-->
+<!--            <span v-else>鍚�</span>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
         <el-table-column width="100" prop="amountInvolved" label="娑夋閲戦">
           <template slot-scope="scope">
             <span>{{ scope.row.amountInvolved === null ? 0 : scope.row.amountInvolved }}</span>
@@ -89,126 +89,57 @@
       <el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.current" :page-size="queryInfo.size"
         layout="prev, pager, next" :total="total"></el-pagination>
     </el-card>
-    <!--娣诲姞浜哄憳寮圭獥-->
-    <el-dialog title="娣诲姞浜哄憳" :visible.sync="addAduitDialogVisible" width="50%" :before-close="addAduitClose">
-      <el-row :gutter="15">
-        <el-form ref="addAduitForm" :model="auditFrom" :rules="rules" size="medium" label-width="100px">
-          <el-col :span="12">
-            <el-form-item label="澶村儚" prop="pic" required>
-              <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess"
-                list-type="picture-card" accept="image/*">
-                <img v-if="picShow" :src="picShow" style="width: 145px;height: 145px">
-                <i v-else class="el-icon-plus"></i>
-              </el-upload>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="鎶ユ浜� " prop="reporterName">
-              <el-input v-model="auditFrom.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }">
-              </el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="鎵嬫満鍙风爜" prop="mobile">
-              <el-input v-model="auditFrom.mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{ width: '100%' }">
-              </el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="韬唤璇佸彿" prop="idcard">
-              <el-input v-model="auditFrom.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{ width: '100%' }">
-              </el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="琚獥鏃堕棿" prop="cheatTime">
-              <el-date-picker v-model="auditFrom.cheatTime+''" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿"
-                :style="{ width: '100%' }" format="yyyy-MM-dd HH:mm:ss"
-                value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="娑夋閲戦" prop="amountInvolved">
-              <el-input v-model="auditFrom.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" clearable :style="{ width: '100%' }">
-              </el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="妗堜欢鎻忚堪" prop="reportDescription">
-              <el-input v-model="auditFrom.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" clearable
-                :style="{ width: '100%' }">
-              </el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="琛ュ厖淇℃伅" prop="information">
-              <el-input v-model="auditFrom.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�"
-                :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="涓婁紶" prop="fileList">
-              <el-upload ref="reportMaterials" :file-list="auditFrom.fileList" action="/api/minio/upload"
-                list-type="picture" :on-success="handleMaterialSuccess">
-                <el-button size="small" type="primary" icon="el-icon-upload">鐐瑰嚮涓婁紶</el-button>
-              </el-upload>
-            </el-form-item>
-          </el-col>
-          <!-- <el-col :span="24">
-            <el-form-item label="鍏宠仈妗堜欢" prop="causeId">
-              <el-select v-model="auditFrom.causeId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{width: '50%'}">
-                <el-option v-for="item in causeOptions" :key="item.id" :label="item.name"
-                           :value="item.id"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col> -->
-        </el-form>
-      </el-row>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="addAduitDialogVisible = false">鍙� 娑�</el-button>
-
-        <el-button type="primary" @click="addAduit">纭� 瀹�</el-button>
-      </span>
-    </el-dialog>
 
     <!--瀹℃牳寮圭獥-->
-    <el-dialog title="瀹℃牳" :visible.sync="checkVisible" width="50%" :before-close="infoAduitClose">
+    <el-dialog :title="fromTitle" :visible.sync="checkVisible" width="50%" :before-close="infoAduitClose">
       <el-row :gutter="15">
         <el-form ref="infoAduitForm" :rules="rules2" :model="auditInfo" size="medium" label-width="100px">
           <el-col :span="12">
-            <el-form-item label="澶村儚" prop="pic" required>
-
-                <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)">
-                </el-image>
+            <el-form-item label="澶村儚" prop="pic" >
+              <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess"
+                         list-type="picture-card" accept="image/*">
+                <img v-if="picShow" :src="picShow" style="width: 145px;height: 145px">
+                <i v-else class="el-icon-plus"></i>
+              </el-upload>
+<!--                <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)">-->
+<!--                </el-image>-->
 
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="鎶ユ浜� ">
-              <el-input v-model="auditInfo.reporterName" disabled :style="{ width: '100%' }"></el-input>
+              <el-input v-model="auditInfo.reporterName" :disabled="fromDis" :style="{ width: '100%' }"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="鎵嬫満鍙风爜">
-              <el-input v-model="auditInfo.mobile" disabled :style="{ width: '100%' }">
+              <el-input v-model="auditInfo.mobile" :disabled="fromDis" :style="{ width: '100%' }">
               </el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="韬唤璇佸彿">
-              <el-input v-model="auditInfo.idcard" disabled :style="{ width: '100%' }">
+              <el-input v-model="auditInfo.idcard" :disabled="fromDis" :style="{ width: '100%' }">
               </el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="琚獥鏃堕棿">
-              <el-input v-model="auditInfo.cheatTime" placeholder="璇烽�夋嫨鎶ユ鏃堕棿 " clearable disabled :style="{ width: '100%' }">
+              <el-date-picker
+                  v-show="fromTitle=='娣诲姞'"
+                  v-model="auditInfo.cheatTime"
+                  type="date"
+                  placeholder="閫夋嫨鏃ユ湡"
+                  value-format="yyyy-MM-dd 00:00:00"
+              >
+              </el-date-picker>
+              <el-input v-show="fromTitle=='瀹℃牳'" v-model="auditInfo.cheatTime" placeholder="璇烽�夋嫨鎶ユ鏃堕棿 " clearable :disabled="fromDis" :style="{ width: '100%' }">
               </el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="娑夋閲戦">
-              <el-input v-model="auditInfo.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" :style="{ width: '100%' }" disabled>
+              <el-input v-model="auditInfo.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" :style="{ width: '100%' }" :disabled="fromDis">
               </el-input>
             </el-form-item>
           </el-col>
@@ -229,35 +160,89 @@
               <div class="metalL">
                 <el-tabs v-model="activeName" @tab-click="handleClickTab">
                   <el-tab-pane label="韬唤璇�" name="a">
-                   <div v-for="item in idCardMaterials">
+                    <el-upload
+                        :limit="2"
+                        v-show="fromTitle=='娣诲姞'"
+                        action="/api/minio/upload"
+                        list-type="picture-card"
+                        :with-credentials="true"
+                        :on-preview="handlePictureCardPreview"
+                        :on-success="handIdCardMaterials"
+                        :on-remove="handleRemovecard"
+                        :file-list="auditInfo.cardimg"
+                       >
+                      <i slot="default" class="el-icon-plus"></i>
+                    </el-upload>
+                   <div v-show="fromTitle=='瀹℃牳'" v-for="item in idCardMaterials">
                      <el-image
                          style="width: 100px; height: 100px"
                          :src="item"
-                         fit="fill"></el-image>
+                         fit="fill"
+                         :preview-src-list="idCardMaterials"></el-image>
                    </div>
                   </el-tab-pane>
                   <el-tab-pane label="鍚堝悓" name="b">
-                    <div v-for="item in contractMaterials">
+                    <el-upload
+                        v-show="fromTitle=='娣诲姞'"
+                        action="/api/minio/upload"
+                        list-type="picture-card"
+                        :with-credentials="true"
+                        :on-preview="handlePictureCardPreview"
+                        :on-success="handContractMaterials"
+                        :on-remove="handleRemovecontractimg"
+                        :file-list="auditInfo.contractimg"
+                       >
+                      <i slot="default" class="el-icon-plus"></i>
+                    </el-upload>
+                    <div v-show="fromTitle=='瀹℃牳'" v-for="item in contractMaterials">
                       <el-image
                           style="width: 100px; height: 100px"
                           :src="item"
-                          fit="fill"></el-image>
+                          fit="fill"
+                          :preview-src-list="contractMaterials"></el-image>
                     </div>
                   </el-tab-pane>
                   <el-tab-pane label="浜ゆ槗鍑瘉" name="c">
-                    <div v-for="item in transactionMaterials">
+
+                    <div v-show="fromTitle=='瀹℃牳'" v-for="item in transactionMaterials">
                       <el-image
                           style="width: 100px; height: 100px"
                           :src="item"
-                          fit="fill"></el-image>
+                          fit="fill"
+                          :preview-src-list="transactionMaterials"></el-image>
                     </div>
+                    <el-upload
+                        v-show="fromTitle=='娣诲姞'"
+                        action="/api/minio/upload"
+                        list-type="picture-card"
+                        :with-credentials="true"
+                        :on-preview="handlePictureCardPreview"
+                        :on-success="handTransactionMaterials"
+                        :on-remove="handleRemovetransaction"
+                        :file-list="auditInfo.transactionimg"
+                        >
+                      <i slot="default" class="el-icon-plus"></i>
+                    </el-upload>
                   </el-tab-pane>
                   <el-tab-pane label="鍏朵粬" name="d">
-                    <div v-for="item in elseMaterials">
+                    <el-upload
+                        v-show="fromTitle=='娣诲姞'"
+                        action="/api/minio/upload"
+                        list-type="picture-card"
+                        :with-credentials="true"
+                        :on-preview="handlePictureCardPreview"
+                        :on-success="handTlseMaterials"
+                        :on-remove="handleRemoveelse"
+                        :file-list="auditInfo.elseimg"
+                       >
+                      <i slot="default" class="el-icon-plus"></i>
+                    </el-upload>
+                    <div v-show="fromTitle=='瀹℃牳'" v-for="item in elseMaterials">
                       <el-image
                           style="width: 100px; height: 100px"
                           :src="item"
-                          fit="fill"></el-image>
+                          fit="fill"
+                          :preview-src-list="elseMaterials"></el-image>
                     </div>
                   </el-tab-pane>
                 </el-tabs>
@@ -266,7 +251,7 @@
           </el-col>
           <el-col :span="24">
             <el-form-item label="鍏宠仈妗堜欢" prop="causeId">
-              <el-select v-model="auditInfo.causeId+''" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '50%' }">
+              <el-select v-model="auditInfo.causeId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '50%' }">
                 <el-option v-for="item in causeOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
@@ -275,10 +260,13 @@
       </el-row>
       <span slot="footer" class="dialog-footer">
         <el-button @click="checkVisible = false">鍙� 娑�</el-button>
-        <el-button type="danger" @click="innerLayerVisible =true">椹� 鍥�</el-button>
+        <el-button v-show="fromTitle=='瀹℃牳'" type="danger" @click="innerLayerVisible =true">椹� 鍥�</el-button>
         <el-button type="primary" @click="checkAdd">纭� 瀹�</el-button>
       </span>
-
+      <!-- 鍥剧墖鏀惧ぇ寮圭獥 -->
+      <el-dialog :visible.sync="dialogVisible" append-to-body>
+        <img width="100%" :src="dialogImageUrl" alt="">
+      </el-dialog>
       <el-dialog
           width="30%"
           title="椹冲洖鍘熷洜"
@@ -348,7 +336,9 @@
                       <el-image
                           style="width: 100px; height: 100px"
                           :src="item"
-                          fit="fill"></el-image>
+                          fit="fill"
+                          :preview-src-list="idCardMaterials"
+                      ></el-image>
                     </div>
                   </el-tab-pane>
                   <el-tab-pane label="鍚堝悓" name="b">
@@ -356,7 +346,8 @@
                       <el-image
                           style="width: 100px; height: 100px"
                           :src="item"
-                          fit="fill"></el-image>
+                          fit="fill"
+                          :preview-src-list="contractMaterials"></el-image>
                     </div>
                   </el-tab-pane>
                   <el-tab-pane label="浜ゆ槗鍑瘉" name="c">
@@ -364,7 +355,8 @@
                       <el-image
                           style="width: 100px; height: 100px"
                           :src="item"
-                          fit="fill"></el-image>
+                          fit="fill"
+                          :preview-src-list="transactionMaterials"></el-image>
                     </div>
                   </el-tab-pane>
                   <el-tab-pane label="鍏朵粬" name="d">
@@ -372,7 +364,8 @@
                       <el-image
                           style="width: 100px; height: 100px"
                           :src="item"
-                          fit="fill"></el-image>
+                          fit="fill"
+                          :preview-src-list="elseMaterials"></el-image>
                     </div>
                   </el-tab-pane>
                 </el-tabs>
@@ -380,8 +373,8 @@
             </el-form-item>
           </el-col>
           <el-col :span="24">
-            <el-form-item label="鍏宠仈妗堜欢" prop="causeId">
-              <el-select v-model="auditInfo.causeId+''" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '50%' }">
+            <el-form-item label="鍏宠仈妗堜欢"  prop="causeId">
+              <el-select v-model="auditInfo.causeId" disabled  placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '50%' }">
                 <el-option v-for="item in causeOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
@@ -408,6 +401,14 @@
   name: "Audit",
   data() {
     return {
+      dialogImageUrl: '',
+      dialogVisible: false,
+      fromDis:false,
+      fromTitle:'娣诲姞',
+      idCardList:[],
+      contractList:[],
+      transacList:[],
+      elseList:[],
       idCardMaterials:[],
       contractMaterials:[],
       transactionMaterials:[],
@@ -440,9 +441,11 @@
         fileList: [],
         tmpTime: '',
       },
-      auditInfo: {},
+      auditInfo: {
 
-      picShow: "",
+      },
+
+      picShow: '',
       reportData: [],
       optionsGroup: [
         {
@@ -525,7 +528,7 @@
       },
       rules2:{
         causeId: [
-          { required: true, message: '璇烽�夋嫨娲诲姩鍖哄煙', trigger: 'change' }
+          { required: true, message: '璇烽�夋嫨鍏宠仈妗堜欢', trigger: 'change' }
         ]
       }
     }
@@ -536,6 +539,84 @@
   },
 
   methods: {
+    handTlseMaterials(res){
+      if (res.code === 200) {
+        this.auditInfo.elseimg.push({
+          name: res.data,
+          url: '/minio/img/' + res.data,
+          // uid: this.addPublicityForm.img.length
+          response: {data:res.data}
+        })
+      } else {
+        this.$message.error(res.msg)
+      }
+      console.log(res,this.auditInfo)
+    },
+    handTransactionMaterials(res){
+      if (res.code === 200) {
+        this.auditInfo.transactionimg.push({
+          name: res.data,
+          url: '/minio/img/' + res.data,
+          // uid: this.addPublicityForm.img.length
+          response: {data:res.data}
+        })
+      } else {
+        this.$message.error(res.msg)
+      }
+      console.log(res,this.auditInfo)
+    },
+    handContractMaterials(res){
+      if (res.code === 200) {
+        this.auditInfo.contractimg.push({
+          name: res.data,
+          url: '/minio/img/' + res.data,
+          // uid: this.addPublicityForm.img.length
+          response: {data:res.data}
+        })
+      } else {
+        this.$message.error(res.msg)
+      }
+      console.log(res,this.auditInfo)
+    },
+    handIdCardMaterials(res){
+      console.log(res)
+      if (res.code === 200) {
+        this.auditInfo.cardimg.push({
+          name: res.data,
+          url: '/minio/img/' + res.data,
+          // uid: this.addPublicityForm.img.length
+          response: {data:res.data}
+        })
+      } else {
+        this.$message.error(res.msg)
+      }
+      console.log(res,this.auditInfo,this.idCardList)
+
+    },
+
+    // 姝f枃鍥剧墖涓婁紶,鍒犻櫎鎿嶄綔
+    handleRemove(file, fileList) {
+      // file鏄偣鍑诲垹闄ょ殑鏂囦欢锛宖ileList鏃跺垹闄ゅ悗鍓╀笅鐨勬枃浠跺垪琛�
+      console.log(file,fileList)
+      // this.auditInfo.idCardMaterials = fileList[0].response
+    },
+    handleRemovecard(file,fileList){
+      console.log(fileList)
+      this.auditInfo.cardimg = fileList
+    },
+    handleRemovecontractimg(file,fileList){
+      this.auditInfo.contractimg = fileList
+    },
+    handleRemovetransaction(file,fileList){
+      this.auditInfo.transactionimg = fileList
+    },
+    handleRemoveelse(file,fileList){
+      this.auditInfo.elseimg = fileList
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url
+      this.dialogVisible = true
+    },
     openInnerLayerVisible(){
 
     },
@@ -568,6 +649,7 @@
       }
     },
     rejectionConfirmation(){
+
       let data={
         id:this.auditInfo.id,
         reason:this.reasonForRejectionInput
@@ -582,25 +664,51 @@
     //瀹℃牳纭畾
     checkAdd() {
       let form = null;
-
       form = this.auditInfo;
-      console.log(form)
-      this.$refs.infoAduitForm.validate((valid)=>{
-        if(valid){
-          checkPass(form).then(res => {
-            this.$message.success('鎻愪氦鎴愬姛')
-            this.getList()
-            this.checkVisible = false;
-          })
-        }else{
-          return false;
-        }
+      console.log(form,this.idCardList)
 
-      })
+      if (this.fromTitle=='娣诲姞'){
+        //澶勭悊鍥剧墖韬唤璇�
+        if (form.cardimg.length>0){
+          form.idCardMaterials=form.cardimg.map(item=>item.response.data).join(',')
+        }else {form.idCardMaterials=''}
+        if (form.contractimg.length>0){
+          form.contractMaterials=form.contractimg.map(item=>item.response.data).join(',')
+        }else {form.contractMaterials=''}
+        if (form.transactionimg.length>0){
+          form.transactionMaterials=form.transactionimg.map(item=>item.response.data).join(',')
+        }else {form.transactionMaterials=''}
+        if (form.elseimg.length>0){
+          form.elseMaterials=form.elseimg.map(item=>item.response.data).join(',')
+        }else {form.elseMaterials=''}
+        report(form).then(res=>{
+          this.checkVisible=false
+          console.log(res)
+          this.getList()
+        })
+      }else {
+
+        console.log(form)
+        this.$refs.infoAduitForm.validate((valid)=>{
+          if(valid){
+            checkPass(form).then(res => {
+              this.$message.success('鎻愪氦鎴愬姛')
+              this.getList()
+              this.checkVisible = false;
+            })
+          }else{
+            return false;
+          }
+
+        })
+      }
+
 
     },
     //瀹℃牳
     check(val) {
+      this.fromDis=true
+      this.fromTitle='瀹℃牳'
       getReportById(val).then(res => {
         this.auditInfo = res
         console.log(this.auditInfo)
@@ -665,27 +773,18 @@
       this.reportData = []
       this.picShow = ""
     },
-    addAduit() {
-      this.$refs.addAduitForm.validate(async (vaild) => {
-        if (!vaild) return this.$message.error('杈撳叆鏈夎')
-        this.auditFrom.reportMaterials = this.auditFrom.fileList.map(i => i.data).join(',')
-        report(this.auditFrom).then(res => {
-          this.$message.success('鎻愪氦鎴愬姛')
-          this.auditFrom = {}
-          this.addAduitDialogVisible = false
-          this.getList()
-        }).catch(err => {
-          this.addAduitClose()
-        })
-      })
-    },
+
     async getCauseOptions() {
       const { data: data } = await this.$http.get('/api/cause/getCauseIdAndName');
+      data.data.map(item=>{
+        item.id=Number(item.id)
+      })
       this.causeOptions = data.data;
       console.log(this.causeOptions)
     },
-    handleAvatarSuccess(res, file) {
-      this.auditFrom.pic = res.data
+    handleAvatarSuccess(res, file,e) {
+      console.log(res,file)
+      this.auditInfo.pic = res.data
       getImgUrl(res.data).then(res => {
         this.picShow = res
       })
@@ -731,7 +830,38 @@
       this.getList()
     },
     addAduitDialogOpen() {
-      this.addAduitDialogVisible = true
+      // this.addAduitDialogVisible = true
+      this.idCardMaterials=[]
+      this.contractMaterials=[]
+      this.transactionMaterials=[]
+      this.elseMaterials=[]
+      this.fromDis=false
+      this.picShow= ''
+      this.auditInfo= {
+        elseimg:[],
+        transactionimg:[],
+        cardimg:[],
+        contractimg:[],
+        pic: '',
+        reporterName: '',
+        mobile: '',
+        idcard: '',
+        cheatTime: '',
+        amountInvolved: '',
+        reportDescription: '',
+        information: '',
+        reportMaterials: "",
+        causeId: '',
+        fileList: [],
+        idCardMaterials:[],
+        elseMaterials:[],
+        transactionMaterials:[],
+        contractMaterials:[],
+        tmpTime: '',
+      }
+      this.checkVisible = true
+      this.fromTitle = '娣诲姞'
+
     },
     exportExcel() {
     },

--
Gitblit v1.8.0