doctor-admin-components 1.0.4 → 1.0.6-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/lib/index.common.js +399 -321
  2. package/lib/index.css +1 -1
  3. package/lib/index.umd.js +399 -321
  4. package/lib/index.umd.min.js +43 -43
  5. package/package.json +4 -3
  6. package/packages/Button/index.js +16 -0
  7. package/packages/Button/src/index.vue +33 -0
  8. package/packages/index.js +122 -0
  9. package/packages/src/api/biz/bizCompanyBillGoods.js +61 -0
  10. package/packages/src/api/biz/bizContainer.js +86 -0
  11. package/packages/src/api/biz/bizContainerDetail.js +61 -0
  12. package/packages/src/api/biz/bizContract.js +112 -0
  13. package/packages/src/api/biz/bizContractCompany.js +53 -0
  14. package/packages/src/api/biz/bizContractDetail.js +62 -0
  15. package/packages/src/api/biz/bizContractDispute.js +53 -0
  16. package/packages/src/api/biz/bizDealRecord.js +87 -0
  17. package/packages/src/api/biz/bizFileInfo.js +53 -0
  18. package/packages/src/api/biz/bizInvoice.js +161 -0
  19. package/packages/src/api/biz/bizInvoiceExtraCosts.js +53 -0
  20. package/packages/src/api/biz/bizShipment.js +113 -0
  21. package/packages/src/api/biz/companyInfo.js +61 -0
  22. package/packages/src/api/biz/dictData.js +77 -0
  23. package/packages/src/api/biz/track.js +21 -0
  24. package/packages/src/api/system/dict/data.js +60 -0
  25. package/packages/src/api/system/dict/type.js +68 -0
  26. package/packages/src/assets/icons/index.js +17 -0
  27. package/packages/src/assets/icons/svg/404.svg +1 -0
  28. package/packages/src/assets/icons/svg/bug.svg +1 -0
  29. package/packages/src/assets/icons/svg/build.svg +1 -0
  30. package/packages/src/assets/icons/svg/button.svg +1 -0
  31. package/packages/src/assets/icons/svg/cascader.svg +1 -0
  32. package/packages/src/assets/icons/svg/chart.svg +1 -0
  33. package/packages/src/assets/icons/svg/checkbox.svg +1 -0
  34. package/packages/src/assets/icons/svg/clipboard.svg +1 -0
  35. package/packages/src/assets/icons/svg/code.svg +1 -0
  36. package/packages/src/assets/icons/svg/color.svg +1 -0
  37. package/packages/src/assets/icons/svg/component.svg +1 -0
  38. package/packages/src/assets/icons/svg/dashboard.svg +1 -0
  39. package/packages/src/assets/icons/svg/date-range.svg +1 -0
  40. package/packages/src/assets/icons/svg/date.svg +1 -0
  41. package/packages/src/assets/icons/svg/dict.svg +1 -0
  42. package/packages/src/assets/icons/svg/documentation.svg +1 -0
  43. package/packages/src/assets/icons/svg/download.svg +1 -0
  44. package/packages/src/assets/icons/svg/drag.svg +1 -0
  45. package/packages/src/assets/icons/svg/druid.svg +1 -0
  46. package/packages/src/assets/icons/svg/edit.svg +1 -0
  47. package/packages/src/assets/icons/svg/education.svg +1 -0
  48. package/packages/src/assets/icons/svg/email.svg +1 -0
  49. package/packages/src/assets/icons/svg/example.svg +1 -0
  50. package/packages/src/assets/icons/svg/excel.svg +1 -0
  51. package/packages/src/assets/icons/svg/exit-fullscreen.svg +1 -0
  52. package/packages/src/assets/icons/svg/eye-open.svg +1 -0
  53. package/packages/src/assets/icons/svg/eye.svg +1 -0
  54. package/packages/src/assets/icons/svg/form.svg +1 -0
  55. package/packages/src/assets/icons/svg/fullscreen.svg +1 -0
  56. package/packages/src/assets/icons/svg/github.svg +1 -0
  57. package/packages/src/assets/icons/svg/guide.svg +1 -0
  58. package/packages/src/assets/icons/svg/icon.svg +1 -0
  59. package/packages/src/assets/icons/svg/input.svg +1 -0
  60. package/packages/src/assets/icons/svg/international.svg +1 -0
  61. package/packages/src/assets/icons/svg/job.svg +1 -0
  62. package/packages/src/assets/icons/svg/language.svg +1 -0
  63. package/packages/src/assets/icons/svg/link.svg +1 -0
  64. package/packages/src/assets/icons/svg/list.svg +1 -0
  65. package/packages/src/assets/icons/svg/lock.svg +1 -0
  66. package/packages/src/assets/icons/svg/log.svg +1 -0
  67. package/packages/src/assets/icons/svg/logininfor.svg +1 -0
  68. package/packages/src/assets/icons/svg/message.svg +1 -0
  69. package/packages/src/assets/icons/svg/money.svg +1 -0
  70. package/packages/src/assets/icons/svg/monitor.svg +2 -0
  71. package/packages/src/assets/icons/svg/nested.svg +1 -0
  72. package/packages/src/assets/icons/svg/number.svg +1 -0
  73. package/packages/src/assets/icons/svg/online.svg +1 -0
  74. package/packages/src/assets/icons/svg/password.svg +1 -0
  75. package/packages/src/assets/icons/svg/pdf.svg +1 -0
  76. package/packages/src/assets/icons/svg/people.svg +1 -0
  77. package/packages/src/assets/icons/svg/peoples.svg +1 -0
  78. package/packages/src/assets/icons/svg/phone.svg +1 -0
  79. package/packages/src/assets/icons/svg/post.svg +1 -0
  80. package/packages/src/assets/icons/svg/qq.svg +1 -0
  81. package/packages/src/assets/icons/svg/question.svg +1 -0
  82. package/packages/src/assets/icons/svg/radio.svg +1 -0
  83. package/packages/src/assets/icons/svg/rate.svg +1 -0
  84. package/packages/src/assets/icons/svg/redis.svg +1 -0
  85. package/packages/src/assets/icons/svg/row.svg +1 -0
  86. package/packages/src/assets/icons/svg/search.svg +1 -0
  87. package/packages/src/assets/icons/svg/select.svg +1 -0
  88. package/packages/src/assets/icons/svg/server.svg +1 -0
  89. package/packages/src/assets/icons/svg/shopping.svg +1 -0
  90. package/packages/src/assets/icons/svg/size.svg +1 -0
  91. package/packages/src/assets/icons/svg/skill.svg +1 -0
  92. package/packages/src/assets/icons/svg/slider.svg +1 -0
  93. package/packages/src/assets/icons/svg/star.svg +1 -0
  94. package/packages/src/assets/icons/svg/swagger.svg +1 -0
  95. package/packages/src/assets/icons/svg/switch.svg +1 -0
  96. package/packages/src/assets/icons/svg/system.svg +2 -0
  97. package/packages/src/assets/icons/svg/tab.svg +1 -0
  98. package/packages/src/assets/icons/svg/table.svg +1 -0
  99. package/packages/src/assets/icons/svg/textarea.svg +1 -0
  100. package/packages/src/assets/icons/svg/theme.svg +1 -0
  101. package/packages/src/assets/icons/svg/time-range.svg +1 -0
  102. package/packages/src/assets/icons/svg/time.svg +1 -0
  103. package/packages/src/assets/icons/svg/tool.svg +1 -0
  104. package/packages/src/assets/icons/svg/tree-table.svg +1 -0
  105. package/packages/src/assets/icons/svg/tree.svg +1 -0
  106. package/packages/src/assets/icons/svg/upload.svg +1 -0
  107. package/packages/src/assets/icons/svg/user.svg +1 -0
  108. package/packages/src/assets/icons/svg/validCode.svg +1 -0
  109. package/packages/src/assets/icons/svg/warn.svg +1 -0
  110. package/packages/src/assets/icons/svg/wechat.svg +1 -0
  111. package/packages/src/assets/icons/svg/zip.svg +1 -0
  112. package/packages/src/assets/icons/svgo.yml +22 -0
  113. package/packages/src/assets/images/file.png +0 -0
  114. package/packages/src/assets/images/pdf.png +0 -0
  115. package/packages/src/assets/styles/btn.scss +99 -0
  116. package/packages/src/assets/styles/element-ui.scss +92 -0
  117. package/packages/src/assets/styles/element-variables.scss +31 -0
  118. package/packages/src/assets/styles/index.scss +191 -0
  119. package/packages/src/assets/styles/mixin.scss +66 -0
  120. package/packages/src/assets/styles/ruoyi.scss +273 -0
  121. package/packages/src/assets/styles/sidebar.scss +223 -0
  122. package/packages/src/assets/styles/transition.scss +48 -0
  123. package/packages/src/assets/styles/variables.scss +54 -0
  124. package/packages/src/components/DictData/index.js +29 -0
  125. package/packages/src/components/DictTag/index.vue +65 -0
  126. package/packages/src/components/FileUpload/aliyun.vue +350 -0
  127. package/packages/src/components/FileUpload/apk.vue +360 -0
  128. package/packages/src/components/FileUpload/contract-drag.vue +268 -0
  129. package/packages/src/components/FileUpload/contract.vue +239 -0
  130. package/packages/src/components/FileUpload/index.vue +229 -0
  131. package/packages/src/components/FileUpload/s3.vue +244 -0
  132. package/packages/src/components/FileUpload/uploadInvoice.vue +270 -0
  133. package/packages/src/components/ImagePreview/index.vue +92 -0
  134. package/packages/src/components/ImageUpload/aliyun.vue +257 -0
  135. package/packages/src/components/ImageUpload/index.vue +192 -0
  136. package/packages/src/components/ImageUpload/s3.vue +243 -0
  137. package/packages/src/components/ImageUpload/shrinkS3.vue +253 -0
  138. package/packages/src/components/SvgIcon/index.vue +69 -0
  139. package/packages/src/index.js +24 -0
  140. package/packages/src/lang/en.json +225 -0
  141. package/packages/src/lang/zh.json +224 -0
  142. package/packages/src/lib-components/zpw-button.vue +53 -0
  143. package/packages/src/lib-components/zpw-com-test-sample.vue +78 -0
  144. package/packages/src/plugins/auth.js +68 -0
  145. package/packages/src/plugins/cache.js +77 -0
  146. package/packages/src/plugins/download.js +80 -0
  147. package/packages/src/plugins/index.js +28 -0
  148. package/packages/src/plugins/modal.js +83 -0
  149. package/packages/src/plugins/tab.js +75 -0
  150. package/packages/src/router/index.js +339 -0
  151. package/packages/src/store/getters.js +18 -0
  152. package/packages/src/store/index.js +31 -0
  153. package/packages/src/store/modules/app.js +56 -0
  154. package/packages/src/store/modules/i18n.js +28 -0
  155. package/packages/src/store/modules/permission.js +138 -0
  156. package/packages/src/store/modules/settings.js +50 -0
  157. package/packages/src/store/modules/tagsView.js +207 -0
  158. package/packages/src/store/modules/user.js +104 -0
  159. package/packages/src/utils/auth.js +25 -0
  160. package/packages/src/utils/dict/Dict.js +90 -0
  161. package/packages/src/utils/dict/DictConverter.js +17 -0
  162. package/packages/src/utils/dict/DictData.js +13 -0
  163. package/packages/src/utils/dict/DictMeta.js +46 -0
  164. package/packages/src/utils/dict/DictOptions.js +59 -0
  165. package/packages/src/utils/dict/index.js +33 -0
  166. package/packages/src/utils/errorCode.js +6 -0
  167. package/packages/src/utils/generator/config.js +438 -0
  168. package/packages/src/utils/generator/css.js +18 -0
  169. package/packages/src/utils/generator/drawingDefault.js +29 -0
  170. package/packages/src/utils/generator/html.js +359 -0
  171. package/packages/src/utils/generator/icon.json +1 -0
  172. package/packages/src/utils/generator/js.js +236 -0
  173. package/packages/src/utils/generator/render.js +126 -0
  174. package/packages/src/utils/index.js +390 -0
  175. package/packages/src/utils/pdf.js +62 -0
  176. package/packages/src/utils/request.js +227 -0
  177. package/packages/src/utils/ruoyi.js +261 -0
  178. package/packages/src/utils/validate.js +83 -0
  179. package/packages/src/utils/zip.js +62 -0
  180. package/packages/src/views/biz/bizContract/companyList.vue +217 -0
  181. package/packages/src/views/biz/bizContract/contractCompanyList.vue +433 -0
  182. package/packages/src/views/biz/bizContract/depositInvoice.vue +688 -0
  183. package/packages/src/views/biz/bizContract/detail.vue +1168 -0
  184. package/packages/src/views/biz/bizContract/index.vue +940 -0
  185. package/packages/src/views/biz/bizFileInfo/contract copy.vue +359 -0
  186. package/packages/src/views/biz/bizFileInfo/contract-history.vue +150 -0
  187. package/packages/src/views/biz/bizFileInfo/contract.vue +1115 -0
  188. package/packages/src/views/biz/bizFileInfo/detail.vue +82 -0
  189. package/packages/src/views/biz/bizFileInfo/fileShow.vue +316 -0
  190. package/packages/src/views/biz/bizFileInfo/index.vue +405 -0
  191. package/packages/src/views/biz/bizShipment/detail.vue +202 -0
  192. package/packages/src/views/biz/bizShipment/gen.vue +1147 -0
  193. package/packages/src/views/biz/bizShipment/index.vue +696 -0
  194. package/packages/src/views/biz/contractTracing/addBillGood.vue +184 -0
  195. package/packages/src/views/biz/contractTracing/addSubCompany.vue +337 -0
  196. package/packages/src/views/biz/contractTracing/association.vue +189 -0
  197. package/packages/src/views/biz/contractTracing/billGoods.vue +180 -0
  198. package/packages/src/views/biz/contractTracing/billInfo.vue +559 -0
  199. package/packages/src/views/biz/contractTracing/billPdf.vue +275 -0
  200. package/packages/src/views/biz/contractTracing/chargingDialog.vue +84 -0
  201. package/packages/src/views/biz/contractTracing/contract.vue +1256 -0
  202. package/packages/src/views/biz/contractTracing/contractInfo.vue +209 -0
  203. package/packages/src/views/biz/contractTracing/contractPdf.vue +562 -0
  204. package/packages/src/views/biz/contractTracing/contractSummary.vue +1012 -0
  205. package/packages/src/views/biz/contractTracing/contractTracingDetail.vue +88 -0
  206. package/packages/src/views/biz/contractTracing/disputeRecord.vue +311 -0
  207. package/packages/src/views/biz/contractTracing/edit.vue +205 -0
  208. package/packages/src/views/biz/contractTracing/editBill.vue +722 -0
  209. package/packages/src/views/biz/contractTracing/index.vue +1503 -0
  210. package/packages/src/views/biz/contractTracing/purchaseInvoiceUpload.vue +330 -0
  211. package/packages/src/views/biz/contractTracing/sendDrafEmail.vue +120 -0
  212. package/packages/src/views/biz/contractTracing/shipment.vue +601 -0
  213. package/packages/src/views/biz/contractTracing/subCompanyDialog.vue +318 -0
  214. package/packages/src/views/biz/track/index.vue +171 -0
  215. package/packages/src/views/components/icons/element-icons.js +3 -0
  216. package/packages/src/views/components/icons/index.vue +87 -0
  217. package/packages/src/views/components/icons/svg-icons.js +10 -0
  218. package/packages/src/views/test.vue +44 -0
@@ -0,0 +1,1115 @@
1
+ <template>
2
+ <div class="app-container" v-if="linkId">
3
+ <div slot="header">
4
+ <el-row>
5
+ <el-button style="float: right" type="text" @click="downloadZip"
6
+ >{{ $t("contractDetail.downloadZip") }}
7
+ </el-button>
8
+ </el-row>
9
+ </div>
10
+ <el-timeline>
11
+ <el-timeline-item icon="el-icon-success" type="primary" size="large">
12
+ <div style="color: #1890ff">
13
+ {{ $t("contractDetail.contractInfoConfirm") }}
14
+ </div>
15
+ <div>
16
+ <el-row>
17
+ <el-col :span="6">
18
+ <div class="sub-title">
19
+ {{
20
+ contract.contractType == "sale"
21
+ ? $t("contractDetail.saleContract")
22
+ : "$t('contractDetail.purchaseContract')"
23
+ }}
24
+ <el-button
25
+ v-if="channel !== 'official-website'"
26
+ type="text"
27
+ size="mini"
28
+ @click="handleHistory('contract_formal')"
29
+ >
30
+ 查看历史合同
31
+ </el-button>
32
+ </div>
33
+ <div class="file-list">
34
+ <file-show
35
+ @refresh="handleRefresh"
36
+ @checked="handleChecked"
37
+ @uncheck="handleUncheck"
38
+ :fileInfo="
39
+ getLastFileByList(contractFileInfo.latestContractFileInfo)
40
+ "
41
+ />
42
+ </div>
43
+ </el-col>
44
+ <el-col :span="6">
45
+ <div>
46
+ <div class="sub-title">{{ $t("contractDetail.blInfo") }}</div>
47
+ <div class="file-list">
48
+ <file-show
49
+ @refresh="handleRefresh"
50
+ @checked="handleChecked"
51
+ @uncheck="handleUncheck"
52
+ :fileInfo="
53
+ getLastFileByList(contractFileInfo.latestBillFileInfo)
54
+ "
55
+ />
56
+ </div>
57
+ </div>
58
+ </el-col>
59
+ <el-col :span="12">
60
+ <div class="file-list">
61
+ <file-show
62
+ @refresh="handleRefresh"
63
+ @checked="handleChecked"
64
+ @uncheck="handleUncheck"
65
+ :file-info="item"
66
+ v-for="(item, i) in contractFileInfo.personalBillFileInfo"
67
+ :key="i"
68
+ />
69
+ <contract-file-drag-upload
70
+ v-if="channel !== 'official-website'"
71
+ @upload="
72
+ handleUpload(
73
+ $event,
74
+ contract.dealId,
75
+ 'dealRecord',
76
+ 'personal_deal_bill'
77
+ )
78
+ "
79
+ :isShowTip="false"
80
+ /></div
81
+ ></el-col>
82
+ </el-row>
83
+ <el-divider></el-divider>
84
+ <div
85
+ v-if="channel !== 'official-website'"
86
+ class="sub-title">
87
+ {{
88
+ contract.contractType == "sale"
89
+ ? $t("contractDetail.signSaleContract")
90
+ : $t("contractDetail.signPuchaseContract")
91
+ }}
92
+ </div>
93
+ <div v-esle class="sub-title">
94
+ {{
95
+ $t("contractDetail.signSaleContract")
96
+ }}
97
+ </div>
98
+ <div class="file-list">
99
+ <file-show
100
+ @refresh="handleRefresh"
101
+ @checked="handleChecked"
102
+ @uncheck="handleUncheck"
103
+ :file-info="item"
104
+ v-for="(item, i) in contractFileInfo.signContractFileInfo"
105
+ :key="i"
106
+ />
107
+ <contract-file-drag-upload
108
+ @upload="
109
+ handleUpload(
110
+ $event,
111
+ contract.contractId,
112
+ 'contract',
113
+ 'contract_sign'
114
+ )
115
+ "
116
+ :isShowTip="false"
117
+ />
118
+ <div>
119
+ <el-button
120
+ v-if="channel !== 'official-website'"
121
+ style="margin-left: 10px"
122
+ @click="counterSign"
123
+ size="mini"
124
+ >撤回回签</el-button
125
+ >
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </el-timeline-item>
130
+ <el-timeline-item
131
+ :icon="contractFileInfo.proformaInvoice ? 'el-icon-success' : ''"
132
+ :type="contractFileInfo.proformaInvoice ? 'primary' : ''"
133
+ size="large"
134
+ v-if="contract.deposit !== 0"
135
+ >
136
+ <el-row v-if="contract.contractType == 'sale'">
137
+ <el-col :span="2"
138
+ ><div style="color: #1890ff">
139
+ {{ $t("contractDetail.deposit") }}
140
+ </div>
141
+ </el-col>
142
+ <el-col :span="4">
143
+ <div
144
+ v-if="
145
+ contractFileInfo.proformaInvoice &&
146
+ contractFileInfo.proformaInvoice.amount >
147
+ contractFileInfo.proformaInvoice.remainingAmount
148
+ "
149
+ class="el-icon-success customer-icon-success-color"
150
+ >
151
+ {{channel !== 'official-website' ? '定金已收' : $t('contractDetail.Deposit_Paid')}}
152
+ </div>
153
+ <div v-else style="color: red">{{channel !== 'official-website' ? '定金未收' : $t('contractDetail.Deposit_Unpaid')}}</div>
154
+ </el-col>
155
+ </el-row>
156
+ <el-row v-else>
157
+ <el-col :span="2"><div style="color: #1890ff">{{$t('contractDetail.Deposit')}}</div> </el-col>
158
+ <el-col :span="2">
159
+ <div
160
+ v-if="
161
+ contractFileInfo.proformaInvoice &&
162
+ contractFileInfo.proformaInvoice.amount >
163
+ contractFileInfo.proformaInvoice.remainingAmount
164
+ "
165
+ class="el-icon-success customer-icon-success-color"
166
+ >
167
+ 定金已付
168
+ </div>
169
+ <div v-else style="color: red">定金未付</div>
170
+ </el-col>
171
+ </el-row>
172
+ <el-row v-if="channel !== 'official-website'">
173
+ <el-col :span="5">
174
+ <el-button type="primary" size="mini" @click="getDepositInvoice">{{
175
+ contract.contractType == "sale" ? "生成定金发票" : "上传定金发票"
176
+ }}</el-button>
177
+ </el-col>
178
+ </el-row>
179
+ <el-row>
180
+ <el-col :span="6">
181
+ <div class="sub-title">
182
+ {{ $t("contractDetail.depositInvoice") }}
183
+ </div>
184
+ <div class="file-list">
185
+ <file-show
186
+ @refresh="handleRefresh"
187
+ @checked="handleChecked"
188
+ @uncheck="handleUncheck"
189
+ :fileInfo="
190
+ getLastFileByList(contractFileInfo.proformaInvoiceFileInfo)
191
+ "
192
+ />
193
+ </div>
194
+ </el-col>
195
+ <el-col :span="13">
196
+ <el-row style="margin-top: 20px"></el-row>
197
+ <div class="file-list">
198
+ <file-show
199
+ @refresh="handleRefresh"
200
+ @checked="handleChecked"
201
+ @uncheck="handleUncheck"
202
+ :file-info="item"
203
+ v-for="(
204
+ item, i
205
+ ) in contractFileInfo.personalProformaInvoiceFileInfo"
206
+ :key="i"
207
+ />
208
+ <contract-file-drag-upload
209
+ v-if="channel !== 'official-website'"
210
+ @upload="
211
+ handleUpload(
212
+ $event,
213
+ contractFileInfo.proformaInvoice.id,
214
+ 'invoice',
215
+ 'personal_proforma_invoice'
216
+ )
217
+ "
218
+ :isShowTip="false"
219
+ />
220
+ </div>
221
+ </el-col>
222
+ </el-row>
223
+ <el-row>
224
+ <div class="sub-title">
225
+ {{ $t("contractDetail.voucherOrReceipt") }}
226
+ </div>
227
+ <div class="file-list">
228
+ <file-show
229
+ @refresh="handleRefresh"
230
+ @checked="handleChecked"
231
+ @uncheck="handleUncheck"
232
+ :file-info="item"
233
+ v-for="(
234
+ item, i
235
+ ) in contractFileInfo.proformaInvoiceWaterBillFileInfo"
236
+ :key="i"
237
+ />
238
+ </div>
239
+ </el-row>
240
+ </el-timeline-item>
241
+ <el-timeline-item
242
+ :icon="contractFileInfo.shipmentFileInfoList ? 'el-icon-success' : ''"
243
+ :type="contractFileInfo.shipmentFileInfoList ? 'primary' : ''"
244
+ size="large"
245
+ >
246
+ <div style="color: #1890ff">{{ $t("contractDetail.tip5") }}</div>
247
+ <el-button
248
+ type="primary"
249
+ size="mini"
250
+ @click="handleGenerate"
251
+ v-if="channel !== 'official-website' && contract.contractType == 'sale'"
252
+ >生成船运</el-button
253
+ >
254
+ <el-tabs v-model="activeName">
255
+ <el-tab-pane
256
+ :label="shipmentFileInfo.bookingNo"
257
+ :name="i.toString()"
258
+ v-for="(
259
+ shipmentFileInfo, i
260
+ ) in contractFileInfo.shipmentFileInfoList"
261
+ :key="i"
262
+ >
263
+ <el-timeline>
264
+ <el-timeline-item
265
+ :icon="shipmentFileInfo ? 'el-icon-success' : ''"
266
+ :type="shipmentFileInfo ? 'primary' : ''"
267
+ size="large"
268
+ >
269
+ <div v-if="channel !== 'official-website'" style="color: #1890ff">首批货运</div>
270
+ <div>
271
+ <div class="sub-title">
272
+ {{ $t("contractDetail.bookingConfirmation") }}
273
+ </div>
274
+ <div class="file-list">
275
+ <file-show
276
+ @refresh="handleRefresh"
277
+ @checked="handleChecked"
278
+ @uncheck="handleUncheck"
279
+ :file-info="item"
280
+ v-for="(item, i) in shipmentFileInfo.bookingConfirmation"
281
+ :key="i"
282
+ />
283
+ <contract-file-drag-upload
284
+ v-if="channel !== 'official-website'"
285
+ @upload="
286
+ handleUpload(
287
+ $event,
288
+ shipmentFileInfo.shipmentId,
289
+ 'shipment',
290
+ 'shipment_booking_confirmation'
291
+ )
292
+ "
293
+ :isShowTip="false"
294
+ />
295
+ </div>
296
+ </div>
297
+ <el-divider></el-divider>
298
+ <el-row v-if="channel !== 'official-website'">
299
+ <el-col :span="6" v-if="contract.contractType == 'sale'">
300
+ <div>
301
+ <div class="sub-title">
302
+ {{ $t("contractDetail.packingList") }}
303
+ </div>
304
+ <div class="file-list">
305
+ <file-show
306
+ @refresh="handleRefresh"
307
+ @checked="handleChecked"
308
+ @uncheck="handleUncheck"
309
+ :file-info="
310
+ getLastFileByList(shipmentFileInfo.packingList)
311
+ "
312
+ />
313
+ </div>
314
+ </div>
315
+ </el-col>
316
+ <el-col :span="18">
317
+ <el-row v-if="contract.contractType == 'purchase'">
318
+ <div>
319
+ <div class="sub-title">装箱单(P)</div>
320
+
321
+ <div class="file-list">
322
+ <file-show
323
+ @refresh="handleRefresh"
324
+ @checked="handleChecked"
325
+ @uncheck="handleUncheck"
326
+ :file-info="item"
327
+ v-for="(
328
+ item, i
329
+ ) in shipmentFileInfo.purchasePersonalPackingList"
330
+ :key="i"
331
+ />
332
+ <contract-file-drag-upload
333
+ v-if="channel !== 'official-website'"
334
+ @upload="
335
+ handleUpload(
336
+ $event,
337
+ shipmentFileInfo.shipmentId,
338
+ 'shipment',
339
+ 'purchase_personal_shipment_packing_list'
340
+ )
341
+ "
342
+ :isShowTip="false"
343
+ />
344
+ </div>
345
+ </div>
346
+ </el-row>
347
+ <el-row v-if="contract.contractType == 'sale'">
348
+ <div>
349
+ <div class="sub-title">装箱单(S)</div>
350
+
351
+ <div class="file-list">
352
+ <file-show
353
+ @refresh="handleRefresh"
354
+ @checked="handleChecked"
355
+ @uncheck="handleUncheck"
356
+ :file-info="item"
357
+ v-for="(
358
+ item, i
359
+ ) in shipmentFileInfo.salePersonalPackingList"
360
+ :key="i"
361
+ />
362
+ <contract-file-drag-upload
363
+ v-if="channel !== 'official-website'"
364
+ @upload="
365
+ handleUpload(
366
+ $event,
367
+ shipmentFileInfo.shipmentId,
368
+ 'shipment',
369
+ 'sale_personal_shipment_packing_list'
370
+ )
371
+ "
372
+ :isShowTip="false"
373
+ />
374
+ </div>
375
+ </div>
376
+ </el-row>
377
+ </el-col>
378
+ </el-row>
379
+ <el-divider></el-divider>
380
+ <div>
381
+ <div class="sub-title">
382
+ {{ $t("contractDetail.packingPhoto") }}
383
+ </div>
384
+ <el-row
385
+ style="margin-left: 60px"
386
+ v-for="(
387
+ containerFile, i
388
+ ) in shipmentFileInfo.containerFileInfoRespList"
389
+ :key="i"
390
+ >
391
+ <div>
392
+ {{ "集装箱" + (i + 1) + containerFile.containerNo }}
393
+ </div>
394
+ <div class="file-list">
395
+ <file-show
396
+ @refresh="handleRefresh"
397
+ @checked="handleChecked"
398
+ @uncheck="handleUncheck"
399
+ :file-info="item"
400
+ v-for="(item, i) in containerFile.packingPhoto"
401
+ :key="i"
402
+ />
403
+ <contract-file-drag-upload
404
+ v-if="channel !== 'official-website'"
405
+ @upload="
406
+ handleUpload(
407
+ $event,
408
+ containerFile.containerId,
409
+ 'container',
410
+ 'container_packing_photo'
411
+ )
412
+ "
413
+ :isShowTip="false"
414
+ />
415
+ </div>
416
+ </el-row>
417
+ </div>
418
+ <el-divider></el-divider>
419
+ <div class="sub-title">
420
+ {{ $t("contractDetail.finallyInvoice") }}
421
+ </div>
422
+ <el-row v-if="contract.quoteType != 'FIXED'">
423
+ <div v-if="contract.contractType == 'sale'">
424
+ <el-col :span="6">
425
+ <div style="margin-left: 60px">
426
+ <div class="sub-title">
427
+ $t("contractDetail.saleTemporaryFinallyInvoice")
428
+ </div>
429
+ <div class="file-list">
430
+ <file-show
431
+ @refresh="handleRefresh"
432
+ @checked="handleChecked"
433
+ @uncheck="handleUncheck"
434
+ :file-info="
435
+ getLastFileByList(
436
+ shipmentFileInfo.saleTemporaryFinallyInvoice
437
+ )
438
+ "
439
+ />
440
+ </div>
441
+ </div>
442
+ </el-col>
443
+ <el-col :span="18">
444
+ <div>
445
+ <div class="file-list">
446
+ <file-show
447
+ @refresh="handleRefresh"
448
+ @checked="handleChecked"
449
+ @uncheck="handleUncheck"
450
+ :file-info="item"
451
+ v-for="(
452
+ item, i
453
+ ) in shipmentFileInfo.salePersonalTemporaryFinallyInvoice"
454
+ :key="i"
455
+ />
456
+ <contract-file-drag-upload
457
+ v-if="channel !== 'official-website'"
458
+ @upload="
459
+ handleUpload(
460
+ $event,
461
+ shipmentFileInfo.shipmentId,
462
+ 'shipment',
463
+ 'sale_personal_temporary_finally_invoice'
464
+ )
465
+ "
466
+ :isShowTip="false"
467
+ />
468
+ </div>
469
+ </div>
470
+ </el-col>
471
+ </div>
472
+ <div v-else style="margin-left: 60px">
473
+ <div class="sub-title">卖家临时尾款发票</div>
474
+ <div class="file-list">
475
+ <file-show
476
+ @refresh="handleRefresh"
477
+ @checked="handleChecked"
478
+ @uncheck="handleUncheck"
479
+ :file-info="item"
480
+ v-for="(
481
+ item, i
482
+ ) in shipmentFileInfo.purchaseTemporaryFinallyInvoice"
483
+ :key="i"
484
+ />
485
+ <contract-file-drag-upload
486
+ v-if="channel !== 'official-website'"
487
+ @upload="
488
+ handleUpload(
489
+ $event,
490
+ shipmentFileInfo.shipmentId,
491
+ 'shipment',
492
+ 'purchase_temporary_finally_invoice'
493
+ )
494
+ "
495
+ :isShowTip="false"
496
+ />
497
+ </div>
498
+ </div>
499
+ </el-row>
500
+
501
+ <el-divider v-if="contract.quoteType != 'FIXED'"></el-divider>
502
+
503
+ <el-row v-if="contract.contractType == 'sale'">
504
+ <el-col :span="6">
505
+ <div style="margin-left: 60px">
506
+ <div class="sub-title">
507
+ {{ $t("contractDetail.saleFinallyInvoice") }}
508
+ </div>
509
+ <div class="file-list">
510
+ <file-show
511
+ @refresh="handleRefresh"
512
+ @checked="handleChecked"
513
+ @uncheck="handleUncheck"
514
+ :file-info="
515
+ getLastFileByList(
516
+ shipmentFileInfo.saleFinallyInvoice
517
+ )
518
+ "
519
+ />
520
+ </div>
521
+ </div>
522
+ </el-col>
523
+ <el-col :span="18">
524
+ <div>
525
+ <div class="file-list">
526
+ <file-show
527
+ @refresh="handleRefresh"
528
+ @checked="handleChecked"
529
+ @uncheck="handleUncheck"
530
+ :file-info="item"
531
+ v-for="(
532
+ item, i
533
+ ) in shipmentFileInfo.salePersonalFinallyInvoice"
534
+ :key="i"
535
+ />
536
+ <contract-file-drag-upload
537
+ v-if="channel !== 'official-website'"
538
+ @upload="
539
+ handleUpload(
540
+ $event,
541
+ shipmentFileInfo.shipmentId,
542
+ 'shipment',
543
+ 'sale_personal_finally_invoice'
544
+ )
545
+ "
546
+ :isShowTip="false"
547
+ />
548
+ </div></div
549
+ ></el-col>
550
+ </el-row>
551
+ <el-row v-else>
552
+ <div style="margin-left: 60px">
553
+ <div class="sub-title">卖家采购尾款发票</div>
554
+ <div class="file-list">
555
+ <file-show
556
+ @refresh="handleRefresh"
557
+ @checked="handleChecked"
558
+ @uncheck="handleUncheck"
559
+ :file-info="item"
560
+ v-for="(
561
+ item, i
562
+ ) in shipmentFileInfo.purchaseFinallyInvoice"
563
+ :key="i"
564
+ />
565
+ <div>
566
+ <el-button
567
+ type="primary"
568
+ size="mini"
569
+ @click="
570
+ uploadFinalInvoice(
571
+ 'finally',
572
+ shipmentFileInfo.shipmentId
573
+ )
574
+ "
575
+ >
576
+ 上传采购尾款发票</el-button
577
+ >
578
+ </div>
579
+ </div>
580
+ </div>
581
+ </el-row>
582
+ <el-divider></el-divider>
583
+ <!-- 提单草稿 -->
584
+ <el-row>
585
+ <div>
586
+ <div class="sub-title">
587
+ {{ $t("contractDetail.draftBillOfLading") }}
588
+ </div>
589
+ <div class="file-list">
590
+ <file-show
591
+ @refresh="handleRefresh"
592
+ @checked="handleChecked"
593
+ @uncheck="handleUncheck"
594
+ :file-info="item"
595
+ v-for="(item, i) in shipmentFileInfo.draftBillOfLading"
596
+ :key="i"
597
+ />
598
+ <contract-file-drag-upload
599
+ v-if="channel !== 'official-website'"
600
+ @upload="
601
+ handleUpload(
602
+ $event,
603
+ shipmentFileInfo.shipmentId,
604
+ 'shipment',
605
+ 'draft_bill_of_lading'
606
+ )
607
+ "
608
+ :isShowTip="false"
609
+ />
610
+ </div>
611
+ </div>
612
+ </el-row>
613
+ <el-divider></el-divider>
614
+ <!-- 提单正本Copy -->
615
+ <el-row>
616
+ <div>
617
+ <div class="sub-title">
618
+ {{ $t("contractDetail.BLCopy") }}
619
+ </div>
620
+ <div class="file-list">
621
+ <file-show
622
+ @refresh="handleRefresh"
623
+ @checked="handleChecked"
624
+ @uncheck="handleUncheck"
625
+ :file-info="item"
626
+ v-for="(
627
+ item, i
628
+ ) in shipmentFileInfo.originalBillOfLadingCopy"
629
+ :key="i"
630
+ />
631
+ <contract-file-drag-upload
632
+ v-if="channel !== 'official-website'"
633
+ @upload="
634
+ handleUpload(
635
+ $event,
636
+ shipmentFileInfo.shipmentId,
637
+ 'shipment',
638
+ 'original_bill_of_lading_copy'
639
+ )
640
+ "
641
+ :isShowTip="false"
642
+ />
643
+ </div>
644
+ </div>
645
+ </el-row>
646
+ <el-divider></el-divider>
647
+ <div>
648
+ <div class="sub-title">
649
+ {{ $t("contractDetail.otherFile") }}
650
+ </div>
651
+ <div class="file-list">
652
+ <file-show
653
+ @refresh="handleRefresh"
654
+ @checked="handleChecked"
655
+ @uncheck="handleUncheck"
656
+ :file-info="item"
657
+ v-for="(item, i) in shipmentFileInfo.shipmentOther"
658
+ :key="i"
659
+ />
660
+ <contract-file-drag-upload
661
+ v-if="channel !== 'official-website'"
662
+ @upload="
663
+ handleUpload(
664
+ $event,
665
+ shipmentFileInfo.shipmentId,
666
+ 'shipment',
667
+ 'shipment_other'
668
+ )
669
+ "
670
+ :isShowTip="false"
671
+ />
672
+ </div>
673
+ </div>
674
+ </el-timeline-item>
675
+ <el-timeline-item
676
+ :icon="shipmentFileInfo.waterBill ? 'el-icon-success' : ''"
677
+ :type="shipmentFileInfo.waterBill ? 'primary' : ''"
678
+ size="large"
679
+ >
680
+ <div v-if="channel !== 'official-website'" style="color: #1890ff">
681
+ {{
682
+ contract.contractType == "sale" ? "尾款收款" : $t('contractDetail.Final_payment')
683
+ }}
684
+ </div>
685
+ <div v-else class="sub-title">
686
+ {{
687
+ $t('contractDetail.Final_payment')
688
+ }}
689
+ </div>
690
+ <el-row>
691
+ <el-col :span="8">
692
+ <div>
693
+ <div v-if="channel !== 'official-website'" class="sub-title">
694
+ {{
695
+ contract.contractType == "sale"
696
+ ? "收款水单"
697
+ : $t('contractDetail.Payment_receipt')
698
+ }}
699
+ </div>
700
+ <div v-else class="sub-title">
701
+ {{
702
+ $t('contractDetail.Payment_receipt')
703
+ }}
704
+ </div>
705
+ <div class="file-list">
706
+ <file-show
707
+ @refresh="handleRefresh"
708
+ @checked="handleChecked"
709
+ @uncheck="handleUncheck"
710
+ :file-info="item"
711
+ v-for="(item, i) in shipmentFileInfo.waterBill"
712
+ :key="i"
713
+ />
714
+ </div>
715
+ </div>
716
+ </el-col>
717
+ <!-- <el-col :span="16">
718
+ <div v-if="contract.contractType == 'sale'">
719
+ <div class="file-list">
720
+ <file-show
721
+ @refresh="handleRefresh"
722
+ @checked="handleChecked"
723
+ @uncheck="handleUncheck"
724
+ :file-info="item"
725
+ v-for="(
726
+ item, i
727
+ ) in shipmentFileInfo.salePersonalWaterBill"
728
+ :key="i"
729
+ />
730
+ <contract-file-drag-upload
731
+ @upload="
732
+ handleUpload(
733
+ $event,
734
+ shipmentFileInfo.shipmentId,
735
+ 'shipment',
736
+ 'sale_personal_waterBill'
737
+ )
738
+ "
739
+ :isShowTip="false"
740
+ />
741
+ </div>
742
+ </div>
743
+ <div v-else>
744
+ <div class="file-list">
745
+ <file-show
746
+ @refresh="handleRefresh"
747
+ @checked="handleChecked"
748
+ @uncheck="handleUncheck"
749
+ :file-info="item"
750
+ v-for="(
751
+ item, i
752
+ ) in shipmentFileInfo.purchasePersonalWaterBill"
753
+ :key="i"
754
+ />
755
+ <contract-file-drag-upload
756
+ @upload="
757
+ handleUpload(
758
+ $event,
759
+ shipmentFileInfo.shipmentId,
760
+ 'shipment',
761
+ 'purchase_personal_waterBill'
762
+ )
763
+ "
764
+ :isShowTip="false"
765
+ />
766
+ </div>
767
+ </div>
768
+ </el-col> -->
769
+ </el-row>
770
+ <el-row>
771
+ <div>
772
+ <div class="sub-title" v-if="channel !== 'official-website'">
773
+ {{
774
+ contract.contractType == "sale"
775
+ ? "收款凭证"
776
+ : $t('contractDetail.Payment_voucher')
777
+ }}
778
+ </div>
779
+ <div v-else class="sub-title">
780
+ {{
781
+ $t('contractDetail.Payment_voucher')
782
+ }}
783
+ </div>
784
+ <div class="file-list">
785
+ <file-show
786
+ @refresh="handleRefresh"
787
+ @checked="handleChecked"
788
+ @uncheck="handleUncheck"
789
+ :file-info="item"
790
+ v-for="(item, i) in shipmentFileInfo.voucher"
791
+ :key="i"
792
+ />
793
+ </div>
794
+ </div>
795
+ </el-row>
796
+ </el-timeline-item>
797
+ <el-timeline-item
798
+ :icon="
799
+ shipmentFileInfo.deliveryReceipt &&
800
+ shipmentFileInfo.deliveryReceipt.length > 0
801
+ ? 'el-icon-success'
802
+ : ''
803
+ "
804
+ :type="
805
+ shipmentFileInfo.deliveryReceipt &&
806
+ shipmentFileInfo.deliveryReceipt.length > 0
807
+ ? 'primary'
808
+ : ''
809
+ "
810
+ size="large"
811
+ >
812
+ <div style="color: #1890ff">
813
+ {{ $t("contractDetail.tip6") }}
814
+ </div>
815
+ <div class="sub-title">{{ $t("contractDetail.tip7") }}</div>
816
+
817
+ <div class="file-list">
818
+ <file-show
819
+ @refresh="handleRefresh"
820
+ @checked="handleChecked"
821
+ @uncheck="handleUncheck"
822
+ :file-info="item"
823
+ v-for="(item, i) in shipmentFileInfo.deliveryReceipt"
824
+ :key="i"
825
+ />
826
+ <contract-file-drag-upload
827
+ v-if="channel !== 'official-website'"
828
+ @upload="
829
+ handleUpload(
830
+ $event,
831
+ shipmentFileInfo.shipmentId,
832
+ 'shipment',
833
+ 'shipment_delivery_receipt'
834
+ )
835
+ "
836
+ :isShowTip="false"
837
+ />
838
+ </div>
839
+ </el-timeline-item>
840
+ </el-timeline>
841
+ </el-tab-pane>
842
+ </el-tabs>
843
+ </el-timeline-item>
844
+
845
+ <el-timeline-item icon="el-icon-success" type="primary" size="large">
846
+ <div style="color: #1890ff">{{ $t("contractDetail.tip8") }}</div>
847
+ </el-timeline-item>
848
+ </el-timeline>
849
+
850
+ <deposit-invoice ref="depositInvoice"></deposit-invoice>
851
+
852
+ <gen-shipment ref="genShipment" @refresh="handleRefresh" />
853
+
854
+ <purchase-invoice-upload
855
+ ref="purchaseInvoice"
856
+ @refresh="handleRefresh"
857
+ ></purchase-invoice-upload>
858
+ </div>
859
+ </template>
860
+
861
+ <script>
862
+ import { listBizFileInfo, addBizFileInfo } from "../../../api/biz/bizFileInfo";
863
+ import { getBizContractFileInfo } from "../../../api/biz/bizContract";
864
+ import FileShow from "./fileShow.vue";
865
+ import ContractFileUpload from "../../../components/FileUpload/contract.vue";
866
+ import ContractFileDragUpload from "../../../components/FileUpload/contract-drag.vue";
867
+ import { batchAsZip } from "../../../utils/zip";
868
+ import {
869
+ getBizContract,
870
+ updateBizContract,
871
+ } from "../../../api/biz/bizContract";
872
+ import DepositInvoice from "../bizContract/depositInvoice.vue";
873
+ import { getDepositInvoice } from "../../../api/biz/bizInvoice";
874
+ import GenShipment from "../bizShipment/gen.vue";
875
+ import { listWithContractInfo } from "../../../api/biz/bizContractDetail";
876
+ import PurchaseInvoiceUpload from "../contractTracing/purchaseInvoiceUpload.vue";
877
+
878
+ export default {
879
+ name: "ContractFile",
880
+ components: {
881
+ FileShow,
882
+ ContractFileUpload,
883
+ ContractFileDragUpload,
884
+ DepositInvoice,
885
+ GenShipment,
886
+ PurchaseInvoiceUpload,
887
+ },
888
+ props: {
889
+ // 文件信息
890
+ contract: {
891
+ type: Object,
892
+ default: () => {
893
+ return {};
894
+ },
895
+ },
896
+ channel: {
897
+ type: String,
898
+ default: "",
899
+ },
900
+ },
901
+ data() {
902
+ return {
903
+ activeName: "0",
904
+ // 遮罩层
905
+ loading: true,
906
+ // 选中数组
907
+ ids: [],
908
+ // 非单个禁用
909
+ single: true,
910
+ // 非多个禁用
911
+ multiple: true,
912
+ // 显示搜索条件
913
+ showSearch: true,
914
+ // 总条数
915
+ total: 0,
916
+ // 文件信息表格数据
917
+ fileInfoList: [],
918
+ // 弹出层标题
919
+ title: "",
920
+ // 是否显示弹出层
921
+ open: false,
922
+ //是否显示上传弹出层
923
+ uploadOpen: false,
924
+ // 查询参数
925
+ queryParams: {
926
+ linkId: null,
927
+ linkType: "contract",
928
+ fileName: null,
929
+ fileType: null,
930
+ url: null,
931
+ ext: null,
932
+ },
933
+ // 表单参数
934
+ form: {},
935
+ //上传表单
936
+ uploadForm: {},
937
+ // 表单校验
938
+ rules: {},
939
+ lintId: null,
940
+ selectFileList: [],
941
+ contractId: null,
942
+ //合同文件
943
+ contractFileInfo: {
944
+ latestContractFileInfo: [],
945
+ },
946
+ };
947
+ },
948
+ created() {
949
+ const contractId = this.$route.params && this.$route.params.contractId;
950
+ if (contractId) {
951
+ this.linkId = contractId;
952
+ this.contractId = contractId;
953
+ this.getContractFileInfo(contractId);
954
+ this.queryParams.linkId = contractId;
955
+ }
956
+ },
957
+ methods: {
958
+ //撤回回签
959
+ counterSign() {
960
+ //如果是回签合同 保留原合同状态
961
+ updateBizContract({
962
+ contractId: this.contractId,
963
+ contractStatus:
964
+ this.contract.beforeContractStatus || this.contract.contractStatus,
965
+ }).then((res) => {
966
+ this.$modal.msgSuccess("撤回回签成功");
967
+ });
968
+ },
969
+ //生船运按钮操作
970
+ handleGenerate() {
971
+ listWithContractInfo({
972
+ contractIds: [this.contractId],
973
+ contractType: "sale",
974
+ }).then((response) => {
975
+ this.$refs.genShipment.handleAdd(
976
+ response.rows,
977
+ this.contract.destination,
978
+ this.contract
979
+ );
980
+ });
981
+ },
982
+ handleRefresh() {
983
+ this.getContractFileInfo(this.contractId);
984
+ },
985
+ //定金发票
986
+ getDepositInvoice() {
987
+ if (this.contract.contractType == "sale") {
988
+ getDepositInvoice(this.contract).then((response) => {
989
+ const data = response.data;
990
+ this.$refs.depositInvoice.handleShow(data);
991
+ });
992
+ } else {
993
+ this.$refs.purchaseInvoice.handleUpload(this.contract, "deposit");
994
+ }
995
+ },
996
+ //上传尾款发票
997
+ uploadFinalInvoice(type, shipmentId) {
998
+ this.$refs.purchaseInvoice.handleUpload(this.contract, type, shipmentId);
999
+ },
1000
+ getContractFileInfo(contractId) {
1001
+ getBizContractFileInfo(contractId).then((res) => {
1002
+ this.contractFileInfo = res.data;
1003
+ });
1004
+ },
1005
+ handleHistory(fileType) {
1006
+ this.$router.push({
1007
+ path: "/contract/file/history",
1008
+ query: {
1009
+ linkId: this.linkId,
1010
+ fileType: fileType,
1011
+ },
1012
+ });
1013
+ },
1014
+ downloadZip() {
1015
+ batchAsZip(
1016
+ this.selectFileList,
1017
+ "contract-" + this.parseTime(new Date(), "{y}-{m}-{d}")
1018
+ );
1019
+ },
1020
+ handleChecked(file) {
1021
+ if (file) this.selectFileList.push(file);
1022
+ console.log(this.selectFileList);
1023
+ },
1024
+ handleUncheck(val) {
1025
+ let index = this.selectFileList.findIndex((item) => item.fileId === val);
1026
+ if (index > -1) this.selectFileList.splice(index, 1);
1027
+ console.log(this.selectFileList);
1028
+ },
1029
+ handleUpload(e, linkId, linkType, fileType) {
1030
+ addBizFileInfo({
1031
+ linkId: linkId,
1032
+ linkType: linkType,
1033
+ fileName: e.originFileName,
1034
+ fileType: fileType,
1035
+ url: e.url,
1036
+ ext: e.url.substring(e.url.lastIndexOf(".")),
1037
+ }).then((res) => {
1038
+ this.getContractFileInfo(this.contractId);
1039
+ //如果是回签合同 保留原合同状态
1040
+ if (fileType == "contract_sign") {
1041
+ getBizContract(this.contractId).then((res) => {
1042
+ const contract = res.data;
1043
+ updateBizContract({
1044
+ contractId: this.contractId,
1045
+ contractStatus: "signed",
1046
+ beforeContractStatus: contract.contractStatus,
1047
+ contractSignTime: new Date(),
1048
+ }).then((res) => {
1049
+ this.$modal.msgSuccess("回签成功");
1050
+ });
1051
+ });
1052
+ }
1053
+ });
1054
+ },
1055
+
1056
+ getLastFileByList(fileList) {
1057
+ if (!fileList || fileList.length <= 0) {
1058
+ return;
1059
+ }
1060
+ //找到最新的文件
1061
+ let sortFileList = fileList?.slice()?.sort((a, b) => {
1062
+ return new Date(b.createTime) - new Date(a.createTime);
1063
+ });
1064
+ let file = sortFileList[0];
1065
+ return file;
1066
+ },
1067
+ getLastFile(fileType) {
1068
+ if (!fileType) {
1069
+ return;
1070
+ }
1071
+ //找到最新的文件
1072
+ let file = this.fileInfoList
1073
+ .filter((item) => item.fileType === fileType)
1074
+ .sort((a, b) => {
1075
+ return new Date(b.createTime) - new Date(a.createTime);
1076
+ })[0];
1077
+ return file;
1078
+ },
1079
+ getFileList(fileType) {
1080
+ if (!fileType) {
1081
+ return;
1082
+ }
1083
+ //找到最新的文件
1084
+ return this.fileInfoList.filter((item) => item.fileType === fileType);
1085
+ },
1086
+ /** 查询文件信息列表 */
1087
+ getList() {
1088
+ this.loading = true;
1089
+ listBizFileInfo(this.queryParams).then((response) => {
1090
+ this.fileInfoList = response.rows;
1091
+ this.total = response.total;
1092
+ this.loading = false;
1093
+ });
1094
+ },
1095
+ },
1096
+ };
1097
+ </script>
1098
+ <style lang="scss" scoped>
1099
+ .box-card {
1100
+ width: 100%;
1101
+ }
1102
+ .sub-title {
1103
+ font-size: 14px;
1104
+ font-weight: bold;
1105
+ margin-bottom: 10px;
1106
+ }
1107
+ .file-list {
1108
+ display: flex;
1109
+ flex-wrap: wrap;
1110
+
1111
+ .file-info {
1112
+ margin-right: 10px;
1113
+ }
1114
+ }
1115
+ </style>