Просмотр исходного кода

申请人文件上传接口调试及详情展示

Your Name 2 лет назад
Родитель
Сommit
269a2ee1a2

+ 5
- 18
src/views/caseManagement/caseList.vue Просмотреть файл

@@ -126,14 +126,6 @@
126 126
         class-name="small-padding fixed-width"
127 127
       >
128 128
         <template slot-scope="scope">
129
-          <!-- <el-button
130
-            size="mini"
131
-            type="text"
132
-            icon="el-icon-check"
133
-            @click="onsubmitRow(scope.row)"
134
-            v-hasPermi="['monitor:online:forceLogout']"
135
-            >提交</el-button
136
-          > -->
137 129
           <el-button
138 130
             size="mini"
139 131
             type="text"
@@ -154,7 +146,7 @@
154 146
           <el-button
155 147
             size="mini"
156 148
             type="text"
157
-            icon="el-icon-edit"
149
+            icon="el-icon-check"
158 150
             @click="onsubmitRow(scope.row)"
159 151
             v-if="scope.row.caseStatus == 0"
160 152
             v-hasPermi="['monitor:online:forceLogout']"
@@ -178,7 +170,6 @@
178 170
             v-hasPermi="['monitor:online:forceLogout']"
179 171
             >立案审查</el-button
180 172
           >
181
-          <!-- <el-popconfirm title="是否进行缴费" @confirm="payStatus(scope.row)"> -->
182 173
           <el-button
183 174
             size="mini"
184 175
             type="text"
@@ -188,7 +179,6 @@
188 179
             v-hasPermi="['monitor:online:forceLogout']"
189 180
             >缴费</el-button
190 181
           >
191
-          <!-- </el-popconfirm> -->
192 182
 
193 183
           <!-- <el-button
194 184
             size="mini"
@@ -281,6 +271,7 @@
281 271
       :dialogtitle="dialogtitle"
282 272
       :getcaseApply="getcaseApply"
283 273
       :flag="flag"
274
+      :caseAttachList="caseAttachList"
284 275
       :initpaymentArr="initpaymentArr"
285 276
       :initpaymentArr1="initpaymentArr1"
286 277
     ></caseentryDialog>
@@ -427,6 +418,7 @@ export default {
427 418
       openPay: false, //缴费弹框
428 419
       payTitle: "",
429 420
       payForm: {},
421
+      caseAttachList: [], //案件质证资料
430 422
     };
431 423
   },
432 424
   created() {
@@ -553,14 +545,8 @@ export default {
553 545
     // 是否进行缴费
554 546
     payStatus(val) {
555 547
       this.getDetail({ id: val.id });
556
-      this.payTitle = "缴费";
557
-      this.$modal
558
-        .confirm("是否进行缴费?")
559
-        .then()
560
-        .then(() => {
548
+      // this.payTitle = "缴费";
561 549
           this.openPay = true;
562
-        })
563
-        .catch(() => {});
564 550
     },
565 551
     getDetail(parms) {
566 552
       caseApplicationDetail(parms).then((res) => {
@@ -670,6 +656,7 @@ export default {
670 656
             this.initpaymentArr1.push(item);
671 657
           }
672 658
         });
659
+        this.caseAttachList = res.data.caseAttachList
673 660
       });
674 661
     },
675 662
     // 删除

+ 64
- 23
src/views/caseManagement/components/caseentryDialog.vue Просмотреть файл

@@ -112,13 +112,16 @@
112 112
             <el-form-item
113 113
               label="申请人案件证据资料上传:"
114 114
               prop="applicantEvidence"
115
+              v-if="flag !== '0'"
115 116
             >
116 117
               <el-upload
117 118
                 class="upload-demo"
118
-                action="https://jsonplaceholder.typicode.com/posts/"
119
-                :on-preview="handlePreview"
120
-                :on-remove="handleRemove"
119
+                ref="fileupload"
120
+                :action="UploadUrl()"
121
+                :on-success="handlSuccess"
121 122
                 :before-remove="beforeRemove"
123
+                :data="filedata"
124
+                :headers="headers"
122 125
                 multiple
123 126
                 :limit="3"
124 127
                 :on-exceed="handleExceed"
@@ -126,18 +129,30 @@
126 129
               >
127 130
                 <el-button size="small" type="primary">点击上传</el-button>
128 131
                 <div slot="tip" class="el-upload__tip">
129
-                  只能上传jpg/png文件,且不超过500kb
132
+                  文件支持上传jpg/png、.doc/docx、pdf文件
130 133
                 </div>
131 134
               </el-upload>
132 135
             </el-form-item>
133 136
           </el-col>
134
-          <!-- 仅详情展示 -->
135
-          <!-- <el-col :span="12">
137
+          <el-col :span="12">
138
+            <el-form-item
139
+              label="申请人案件证据资料:"
140
+              v-if="flag == '0' && caseAttachList.length > 0"
141
+            >
142
+              <a href=""></a>
143
+            </el-form-item>
144
+          </el-col>
145
+          <!-- 仅详情展示 案件质证环节以后显示被申请人证据-->
146
+          <el-col :span="12">
136 147
             <el-form-item
137
-              label="被申请人案件证据资料上传:"
148
+              label="被申请人案件证据资料:"
138 149
               prop="respondentEvidence"
150
+              v-if="flag == '0' && caseAttachList.length > 0"
139 151
             >
140
-              <el-upload
152
+              <a href="#" @click="toFile" style="color: blue">{{
153
+                caseAttachList[0].annexName
154
+              }}</a>
155
+              <!-- <el-upload
141 156
                 class="upload-demo"
142 157
                 action="https://jsonplaceholder.typicode.com/posts/"
143 158
                 :on-preview="handlePreview"
@@ -152,9 +167,9 @@
152 167
                 <div slot="tip" class="el-upload__tip">
153 168
                   只能上传jpg/png文件,且不超过500kb
154 169
                 </div>
155
-              </el-upload>
170
+              </el-upload> -->
156 171
             </el-form-item>
157
-          </el-col> -->
172
+          </el-col>
158 173
         </el-row>
159 174
       </el-form>
160 175
       <!-- 申请人主体信息 -->
@@ -602,6 +617,7 @@
602 617
 
603 618
 <script>
604 619
 import moment from "moment"; //导入文件
620
+import { getToken } from "@/utils/auth";
605 621
 import { addCaseApply, editCaseApply } from "@/api/caseAccess/caseEntry";
606 622
 export default {
607 623
   props: [
@@ -613,10 +629,17 @@ export default {
613 629
     "initpaymentArr",
614 630
     "initpaymentArr1",
615 631
     "queryParams",
632
+    "caseAttachList",
616 633
   ],
617 634
   data() {
618 635
     return {
619 636
       formData: this.form,
637
+      filedata: {
638
+        annexType: 2,
639
+      },
640
+      headers: {
641
+        Authorization: "Bearer " + getToken(),
642
+      },
620 643
       form2: {
621 644
         paymentArr: [
622 645
           {
@@ -789,8 +812,13 @@ export default {
789 812
     },
790 813
   },
791 814
   methods: {
792
-    handleRemove(file, fileList) {console.log('文件列表移除文件时的钩子');},
793
-    handlePreview(file) {console.log('点击文件列表中已上传的文件时的钩子');},
815
+    UploadUrl() {
816
+      return window.location.origin + "/API/evidence/upload";
817
+    },
818
+    // 文件上传成功
819
+    handlSuccess(res, file) {
820
+      console.log(res, file);
821
+    },
794 822
     // 文件超出个数限制时的钩子
795 823
     handleExceed(files, fileList) {
796 824
       this.$message.warning(
@@ -809,23 +837,29 @@ export default {
809 837
     },
810 838
     // 校验借款开始日期与结束日期
811 839
     setStartTime() {
812
-      if ( this.setTime(this.formData.loanStartDate) >= this.setTime(this.formData.loanEndDate) ) {
813
-        this.$message.error('借款开始日期应早于借款结束日期');
814
-        this.formData.loanStartDate = '';
815
-        this.formData.loanEndDate = '';
840
+      if (
841
+        this.setTime(this.formData.loanStartDate) >=
842
+        this.setTime(this.formData.loanEndDate)
843
+      ) {
844
+        this.$message.error("借款开始日期应早于借款结束日期");
845
+        this.formData.loanStartDate = "";
846
+        this.formData.loanEndDate = "";
816 847
       }
817 848
     },
818 849
     setEndTime() {
819
-      if ( this.setTime(this.formData.loanEndDate) <= this.setTime(this.formData.loanStartDate) ) {
820
-        this.$message.error('借款结束日期应晚于借款开始日期');
821
-        this.formData.loanStartDate = '';
822
-        this.formData.loanEndDate = '';
850
+      if (
851
+        this.setTime(this.formData.loanEndDate) <=
852
+        this.setTime(this.formData.loanStartDate)
853
+      ) {
854
+        this.$message.error("借款结束日期应晚于借款开始日期");
855
+        this.formData.loanStartDate = "";
856
+        this.formData.loanEndDate = "";
823 857
       }
824 858
     },
825 859
     setTime(val) {
826
-      const date = new Date(val)
827
-      const time = date.getTime()
828
-      return time
860
+      const date = new Date(val);
861
+      const time = date.getTime();
862
+      return time;
829 863
     },
830 864
 
831 865
     // 新增申请人主体信息
@@ -914,6 +948,13 @@ export default {
914 948
         }
915 949
       });
916 950
     },
951
+    // 详情显示,展示案件文件
952
+    toFile() {
953
+      window.open(
954
+        window.location.origin + "/API" + this.caseAttachList[0].annexPath,
955
+        "_black"
956
+      );
957
+    },
917 958
   },
918 959
 };
919 960
 </script>