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

Merge branch 'hhl' of SH-Arbitrate/Arbitrate-Frontend into dev

hhlxayunmei 2 лет назад
Родитель
Сommit
4982eb3bc3

+ 52
- 9
src/views/awardManagement/components/paymentdetailsDialog.vue Просмотреть файл

@@ -32,15 +32,21 @@
32 32
         <el-descriptions-item label="申请人主张违约金">{{
33 33
           form.claimLiquidDamag
34 34
         }}</el-descriptions-item>
35
-        <el-descriptions-item label="申请人案件证据资料">{{
36
-          form.aaa
37
-        }}</el-descriptions-item>
38
-        <el-descriptions-item label="被申请人案件证据资料">{{
39
-          form.aaa
40
-        }}</el-descriptions-item>
41
-        <el-descriptions-item label="裁决书附件">{{
42
-          form.aaa
43
-        }}</el-descriptions-item>
35
+        <el-descriptions-item label="申请人案件证据资料">
36
+          <span @click="toFile(2)">
37
+            <a href="#">{{ applicantFile }}</a>
38
+          </span>
39
+        </el-descriptions-item>
40
+        <el-descriptions-item label="被申请人案件证据资料">
41
+          <span @click="toFile(6)">
42
+            <a href="#">{{ respondentFile }}</a>
43
+          </span>
44
+        </el-descriptions-item>
45
+        <el-descriptions-item label="裁决书附件">
46
+          <span @click="toFile(3)">
47
+            <a href="#">{{ awardFile }}</a>
48
+          </span>
49
+        </el-descriptions-item>
44 50
       </el-descriptions>
45 51
       <el-form
46 52
         ref="form"
@@ -208,6 +214,12 @@ export default {
208 214
           },
209 215
         ],
210 216
       },
217
+      applicantFile: "", //申请人
218
+      applicantPath: "", //申请人
219
+      respondentFile: "", //被申请人
220
+      respondentPath: "", //被申请人
221
+      awardFile: "", //裁决书
222
+      awardPath: "", //裁决书
211 223
     };
212 224
   },
213 225
   watch: {
@@ -218,12 +230,40 @@ export default {
218 230
             this.form = this.detailform;
219 231
             this.arbitrateRecord = this.form.arbitrateRecord;
220 232
             console.log(this.form, "this.form");
233
+            this.evidenceFile(this.form);
221 234
           }, 1000);
222 235
         }
223 236
       },
224 237
     },
225 238
   },
226 239
   methods: {
240
+    // 申请人裁决书
241
+    evidenceFile(val) {
242
+      if (val) {
243
+        val.caseAttachList.forEach((item) => {
244
+          if ((item.annexType = 2)) {
245
+            this.applicantFile = item.annexName;
246
+            this.applicantPath = item.annexPath;
247
+          } else if ((item.annexType = 6)) {
248
+            this.respondentFile = item.annexName;
249
+            this.respondenPath = item.annexPath;
250
+          } else if ((item.annexType = 3)) {
251
+            this.awardFile = item.annexName;
252
+            this.awardPath = item.annexPath;
253
+          }
254
+        });
255
+      }
256
+    },
257
+    toFile(val) {
258
+      let headPath = window.location.origin + "/API";
259
+      if (val == 2) {
260
+        window.open(headPath + this.applicantPath, "_black");
261
+      } else if (val == 6) {
262
+        window.open(headPath + this.respondenPath, "_black");
263
+      } else if (val == 3) {
264
+        window.open(headPath + this.awardPath, "_black");
265
+      }
266
+    },
227 267
     // 校验裁决书
228 268
     verificationArbitrateRecordFn(parms) {
229 269
       verificationArbitrateRecord(parms).then((res) => {
@@ -283,4 +323,7 @@ export default {
283 323
 .esign {
284 324
   border: 1px solid;
285 325
 }
326
+a {
327
+  color: blue;
328
+}
286 329
 </style>

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

@@ -119,6 +119,7 @@
119 119
                 ref="fileupload"
120 120
                 :action="UploadUrl()"
121 121
                 :on-success="handlSuccess"
122
+                :on-remove="handleRemove"
122 123
                 :before-remove="beforeRemove"
123 124
                 :data="filedata"
124 125
                 :headers="headers"
@@ -137,9 +138,17 @@
137 138
           <el-col :span="12">
138 139
             <el-form-item
139 140
               label="申请人案件证据资料:"
140
-              v-if="flag == '0' && caseAttachList.length > 0"
141
+              v-if="
142
+                flag == '0' &&
143
+                caseAttachList.length > 0 &&
144
+                applicateArr.length > 0
145
+              "
141 146
             >
142
-              <a href=""></a>
147
+              <div v-for="(item, index) in applicateArr" :key="index">
148
+                <a href="#" @click="toFile(item, index)" style="color: blue">
149
+                  {{ item }}
150
+                </a>
151
+              </div>
143 152
             </el-form-item>
144 153
           </el-col>
145 154
           <!-- 仅详情展示 案件质证环节以后显示被申请人证据-->
@@ -147,11 +156,16 @@
147 156
             <el-form-item
148 157
               label="被申请人案件证据资料:"
149 158
               prop="respondentEvidence"
150
-              v-if="flag == '0' && caseAttachList.length > 0"
159
+              v-if="
160
+                flag == '0' && caseAttachList.length > 0 && quiltArr.length > 0
161
+              "
151 162
             >
152
-              <a href="#" @click="toFile" style="color: blue">{{
153
-                caseAttachList[0].annexName
154
-              }}</a>
163
+              <div v-for="(item, index) in quiltArr" :key="index">
164
+                <a href="#" @click="toFile(item, index)" style="color: blue">
165
+                  {{ item }}
166
+                </a>
167
+              </div>
168
+
155 169
               <!-- <el-upload
156 170
                 class="upload-demo"
157 171
                 action="https://jsonplaceholder.typicode.com/posts/"
@@ -762,7 +776,11 @@ export default {
762 776
           },
763 777
         ],
764 778
       },
779
+      // annexId: '',
780
+      caseAttachListArr: [],
765 781
       fileList: [],
782
+      applicateArr: [],
783
+      quiltArr: [],
766 784
     };
767 785
   },
768 786
   watch: {
@@ -774,6 +792,15 @@ export default {
774 792
             setTimeout(() => {
775 793
               this.form2.paymentArr = this.initpaymentArr;
776 794
               this.form3.paymentArr1 = this.initpaymentArr1;
795
+              console.log(this.caseAttachList, "caseAttachList");
796
+              this.caseAttachList.forEach((item) => {
797
+                if (item.annexType == 2) {
798
+                  this.applicateArr.push(item.annexName);
799
+                }
800
+                if (item.annexType == 6) {
801
+                  this.quiltArr.push(item.annexName);
802
+                }
803
+              });
777 804
             }, 1000);
778 805
           }
779 806
           if (this.flag == "2") {
@@ -817,7 +844,9 @@ export default {
817 844
     },
818 845
     // 文件上传成功
819 846
     handlSuccess(res, file) {
820
-      console.log(res, file);
847
+      this.caseAttachListArr.push({
848
+        annexId: res.data.annexId,
849
+      });
821 850
     },
822 851
     // 文件超出个数限制时的钩子
823 852
     handleExceed(files, fileList) {
@@ -831,6 +860,12 @@ export default {
831 860
     beforeRemove(file, fileList) {
832 861
       return this.$confirm(`确定移除 ${file.name}?`);
833 862
     },
863
+    handleRemove(file, fileList) {
864
+      (this.caseAttachListArr = []),
865
+        fileList.forEach((item) => {
866
+          this.caseAttachListArr.push({ annexId: item.response.data.annexId });
867
+        });
868
+    },
834 869
     // 取消
835 870
     cancel() {
836 871
       this.$emit("cancel");
@@ -918,11 +953,7 @@ export default {
918 953
                     ...this.form2.paymentArr,
919 954
                     ...this.form3.paymentArr1,
920 955
                   ];
921
-                  this.formData.caseAttachList = [
922
-                    {
923
-                      annexId: 106,
924
-                    },
925
-                  ];
956
+                  this.formData.caseAttachList = [...this.caseAttachListArr];
926 957
                   if (this.formData.id) {
927 958
                     editCaseApply({
928 959
                       ...this.formData,
@@ -954,9 +985,9 @@ export default {
954 985
       });
955 986
     },
956 987
     // 详情显示,展示案件文件
957
-    toFile() {
988
+    toFile(item, index) {
958 989
       window.open(
959
-        window.location.origin + "/API" + this.caseAttachList[0].annexPath,
990
+        window.location.origin + "/API" + this.caseAttachList[index].annexPath,
960 991
         "_black"
961 992
       );
962 993
     },