doctor-admin-components 1.0.13-beta.9 → 1.0.13-beta.91

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 (56) hide show
  1. package/README.md +28 -9
  2. package/package.json +1 -1
  3. package/packages/index.js +10 -0
  4. package/packages/src/api/biz/bizContract.js +996 -1
  5. package/packages/src/api/biz/bizContractCompany.js +1 -1
  6. package/packages/src/api/biz/bizFileInfo.js +16 -0
  7. package/packages/src/api/biz/bizInvoice.js +1 -1
  8. package/packages/src/api/biz/bizShipment.js +18 -0
  9. package/packages/src/assets/images/click-show-table.png +0 -0
  10. package/packages/src/assets/images/more.png +0 -0
  11. package/packages/src/assets/images/pdf-new.png +0 -0
  12. package/packages/src/components/DictTag/index.vue +12 -2
  13. package/packages/src/components/FileUpload/contract-drag-new.vue +99 -10
  14. package/packages/src/i18n/en/message.json +305 -0
  15. package/packages/src/i18n/index.js +38 -0
  16. package/packages/src/i18n/zh-CN/message.json +305 -0
  17. package/packages/src/index.js +13 -1
  18. package/packages/src/utils/index.js +35 -0
  19. package/packages/src/utils/request.js +120 -146
  20. package/packages/src/views/biz/bizFileInfo/PAYMENT_VOUCHER(/"payment_voucher/", /"/344/273/230/346/254/276/345/207/255/350/257/201.ini" +222 -0
  21. package/packages/src/views/biz/bizFileInfo/contract copy.vue +1711 -0
  22. package/packages/src/views/biz/bizFileInfo/contract.vue +1783 -986
  23. package/packages/src/views/biz/bizFileInfo/contractFile/BillOfLadingNoTab.vue +114 -0
  24. package/packages/src/views/biz/bizFileInfo/contractFile/ContentTitle.vue +102 -0
  25. package/packages/src/views/biz/bizFileInfo/contractFile/IMGPreviewCheckBox.vue +308 -0
  26. package/packages/src/views/biz/bizFileInfo/contractFile/Progress.vue +85 -0
  27. package/packages/src/views/biz/bizFileInfo/contractFile/ProgressDetail.vue +123 -0
  28. package/packages/src/views/biz/bizFileInfo/contractFile/SectionSlot.vue +83 -0
  29. package/packages/src/views/biz/bizFileInfo/contractFile/ShowAndHide.vue +178 -0
  30. package/packages/src/views/biz/bizFileInfo/fileShow copy.vue +321 -0
  31. package/packages/src/views/biz/bizFileInfo/fileShow.vue +143 -47
  32. package/packages/src/views/biz/bizFileInfo/fileShowClaim.vue +1 -1
  33. package/packages/src/views/biz/bizShipment/add.vue +223 -75
  34. package/packages/src/views/biz/bizShipment/referenceAlert.vue +168 -0
  35. package/packages/src/views/biz/contractTracing/addSubCompany.vue +106 -169
  36. package/packages/src/views/biz/contractTracing/billInfo.vue +191 -332
  37. package/packages/src/views/biz/contractTracing/companyBanks.vue +228 -0
  38. package/packages/src/views/biz/contractTracing/contractInfo.vue +1 -1
  39. package/packages/src/views/biz/contractTracing/contractPdf.vue +7 -4
  40. package/packages/src/views/biz/contractTracing/contractSummary.vue +20 -7
  41. package/packages/src/views/biz/contractTracing/contractTracingDetail copy.vue +107 -0
  42. package/packages/src/views/biz/contractTracing/contractTracingDetail.vue +229 -9
  43. package/packages/src/views/biz/contractTracing/editBill.vue +236 -363
  44. package/packages/src/views/biz/contractTracing/purchaseInvoiceUpload.vue +153 -7
  45. package/packages/src/views/biz/contractTracing/shipmentPurchaseAmount.vue +8 -2
  46. package/packages/src/views/biz/contractTracing/subCompanyDialog.vue +202 -176
  47. package/packages/src/views/components/RegionPicker/Distpicker.vue +459 -0
  48. package/packages/src/views/components/RegionPicker/districts.js +4641 -0
  49. package/packages/src/views/test.vue +3 -3
  50. package/packages/src/views/biz/contractTracing/association.vue +0 -189
  51. package/packages/src/views/biz/contractTracing/chargingDialog.vue +0 -84
  52. package/packages/src/views/biz/contractTracing/contract.vue +0 -1276
  53. package/packages/src/views/biz/contractTracing/disputeRecord.vue +0 -311
  54. package/packages/src/views/biz/contractTracing/edit.vue +0 -205
  55. package/packages/src/views/biz/contractTracing/sendDrafEmail.vue +0 -120
  56. package/packages/src/views/biz/contractTracing/shipment.vue +0 -601
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <div v-if="saleContract && saleContract.submitFlag">
3
+ <div v-if="billData && billData.submitFlag">
4
4
  <div class="info" id="printPdf" v-if="!printModel">
5
5
  <el-form :model="form" ref="form" size="mini" :rules="rules">
6
6
  <div v-if="form.shipperFlag">
@@ -8,39 +8,29 @@
8
8
  <el-row>
9
9
  <el-col :span="8">
10
10
  <el-form-item :label="$t('contract.company') + ':'">
11
- {{
12
- form.shipperCompanyName
13
- }}
11
+ {{ form.shipperCompanyName }}
14
12
  </el-form-item>
15
13
  </el-col>
16
14
  <el-col :span="8">
17
15
  <el-form-item :label="$t('contract.taxId') + ':'">
18
- {{
19
- form.shipperTaxNumber
20
- }}
16
+ {{ form.shipperTaxNumber }}
21
17
  </el-form-item>
22
18
  </el-col>
23
19
  <el-col :span="8">
24
20
  <el-form-item :label="$t('contract.address') + ':'">
25
- {{
26
- form.shipperAddress
27
- }}
21
+ {{ form.shipperAddress }}
28
22
  </el-form-item>
29
23
  </el-col>
30
24
  </el-row>
31
25
  <el-row>
32
26
  <el-col :span="8">
33
27
  <el-form-item :label="$t('contract.contact') + ':'">
34
- {{
35
- form.shipperContact
36
- }}
28
+ {{ form.shipperContact }}
37
29
  </el-form-item>
38
30
  </el-col>
39
31
  <el-col :span="8">
40
32
  <el-form-item :label="$t('contract.phoneNumber') + ':'">
41
- {{
42
- form.shipperPhoneNumber
43
- }}
33
+ {{ form.shipperPhoneNumber }}
44
34
  </el-form-item>
45
35
  </el-col>
46
36
  </el-row>
@@ -49,9 +39,7 @@
49
39
  <el-row>
50
40
  <el-col :span="20">
51
41
  <div style="white-space: pre-line !important">
52
- {{
53
- form.shipperEmail
54
- }}
42
+ {{ form.shipperEmail }}
55
43
  </div>
56
44
  </el-col>
57
45
  </el-row>
@@ -61,63 +49,44 @@
61
49
  </div>
62
50
  <el-row>
63
51
  <el-col :span="22">
64
- <div class="sub-title mb20">{{ $t('contract.consigneeInfo') }}</div>
52
+ <span class="sub-title mb20">{{ $t('contract.consigneeInfo') }}</span>
53
+ <span v-if="billData.blConfirmFlag == '2'" style="font-size: 16px; color: red; font-weight: bold; padding-left: 10px"> 已作废 </span>
65
54
  </el-col>
66
- <el-col :span="2">
55
+ <el-col v-if="billData.blConfirmFlag != '2'" :span="2">
67
56
  <el-button type="text" @click="editBill">
68
- {{
69
- $t("contractDetail.edit")
70
- }}
57
+ {{ $t('contractDetail.edit') }}
71
58
  </el-button>
72
59
  </el-col>
73
60
  </el-row>
74
61
  <el-row>
75
62
  <el-col :span="8">
76
- <el-form-item :label="$t('contract.company') +':'">
77
- {{
78
- this.form.deliveryCompany
79
- ? this.form.deliveryCompany.companyEnglishName
80
- : ""
81
- }}
63
+ <el-form-item :label="$t('contract.company') + ':'">
64
+ {{ this.form.deliveryCompany ? this.form.deliveryCompany.companyEnglishName : '' }}
82
65
  </el-form-item>
83
66
  </el-col>
84
67
  <el-col :span="8">
85
- <el-form-item :label="$t('contract.taxId') +':'">
86
- {{
87
- this.form.deliveryCompany
88
- ? this.form.deliveryCompany.taxNumber
89
- : ""
90
- }}
68
+ <el-form-item :label="$t('contract.taxId') + ':'">
69
+ {{ this.form.deliveryCompany ? this.form.deliveryCompany.taxNumber : '' }}
91
70
  </el-form-item>
92
71
  </el-col>
93
72
  <el-col :span="8">
94
- <el-form-item :label="$t('contract.address') +':'">
95
- {{
96
- this.form.deliveryCompany
97
- ? this.form.deliveryCompany.address
98
- : ""
99
- }}
73
+ <el-form-item :label="$t('contract.address') + ':'">
74
+ {{ this.form.deliveryCompany ? this.form.deliveryCompany.address : '' }}
100
75
  </el-form-item>
101
76
  </el-col>
102
77
  </el-row>
103
78
  <el-row>
104
79
  <el-col :span="8">
105
- <el-form-item :label="$t('contract.contact') +':'">
106
- {{
107
- this.form.deliveryCompany
108
- ? this.form.deliveryCompany.contact
109
- : ""
110
- }}
80
+ <el-form-item :label="$t('contract.contact') + ':'">
81
+ {{ this.form.deliveryCompany ? this.form.deliveryCompany.contact : '' }}
111
82
  </el-form-item>
112
83
  </el-col>
113
84
  <el-col :span="8">
114
- <el-form-item :label="$t('contract.phoneNumber') +':'">
85
+ <el-form-item :label="$t('contract.phoneNumber') + ':'">
115
86
  {{
116
- this.form.deliveryCompany &&
117
- this.form.deliveryCompany.phoneNumber &&
118
- this.form.deliveryCompany.phoneNumber.length > 0
119
- ? this.form.deliveryCompany.phoneNumber.join("/")
120
- : ""
87
+ this.form.deliveryCompany && this.form.deliveryCompany.phoneNumber && this.form.deliveryCompany.phoneNumber.length > 0
88
+ ? this.form.deliveryCompany.phoneNumber.join('/')
89
+ : ''
121
90
  }}
122
91
  </el-form-item>
123
92
  </el-col>
@@ -125,43 +94,29 @@
125
94
  <el-row>
126
95
  <el-col :span="isMobile ? 24 : 8">
127
96
  <el-form-item label="GST NUMBER:">
128
- {{
129
- this.form.deliveryCompany ?
130
- this.form.deliveryCompany.gstNumber
131
- : ''
132
- }}
97
+ {{ this.form.deliveryCompany ? this.form.deliveryCompany.gstNumber : '' }}
133
98
  </el-form-item>
134
99
  </el-col>
135
100
  <el-col :span="isMobile ? 24 : 8">
136
101
  <el-form-item label="PAN NO.:">
137
- {{
138
- this.form.deliveryCompany ?
139
- this.form.deliveryCompany.panNo
140
- : ''
141
- }}
102
+ {{ this.form.deliveryCompany ? this.form.deliveryCompany.panNo : '' }}
142
103
  </el-form-item>
143
104
  </el-col>
144
105
  <el-col :span="isMobile ? 24 : 8">
145
106
  <el-form-item label="IEC CODE:">
146
- {{
147
- this.form.deliveryCompany ?
148
- this.form.deliveryCompany.iecCode
149
- : ''
150
- }}
107
+ {{ this.form.deliveryCompany ? this.form.deliveryCompany.iecCode : '' }}
151
108
  </el-form-item>
152
- </el-col>
153
- </el-row>email
109
+ </el-col> </el-row
110
+ >email
154
111
  <el-row>
155
- <el-form-item :label="$t('contract.email') +':'">
112
+ <el-form-item :label="$t('contract.email') + ':'">
156
113
  <el-row>
157
114
  <el-col :span="20">
158
115
  <div style="white-space: pre-line !important">
159
116
  {{
160
- this.form.deliveryCompany &&
161
- this.form.deliveryCompany.email &&
162
- this.form.deliveryCompany.email.length > 0
163
- ? this.form.deliveryCompany.email.join("\n")
164
- : ""
117
+ this.form.deliveryCompany && this.form.deliveryCompany.email && this.form.deliveryCompany.email.length > 0
118
+ ? this.form.deliveryCompany.email.join('\n')
119
+ : ''
165
120
  }}
166
121
  </div>
167
122
  </el-col>
@@ -173,52 +128,34 @@
173
128
  <div class="sub-title mb20">{{ $t('contract.firstNotifier') }}</div>
174
129
  <el-row>
175
130
  <el-col :span="8">
176
- <el-form-item :label="$t('contract.company') +':'">
177
- {{
178
- this.form.notifierCompany
179
- ? this.form.notifierCompany.companyEnglishName
180
- : ""
181
- }}
131
+ <el-form-item :label="$t('contract.company') + ':'">
132
+ {{ this.form.notifierCompany ? this.form.notifierCompany.companyEnglishName : '' }}
182
133
  </el-form-item>
183
134
  </el-col>
184
135
  <el-col :span="8">
185
- <el-form-item :label="$t('contract.taxId') +':'">
186
- {{
187
- this.form.notifierCompany
188
- ? this.form.notifierCompany.taxNumber
189
- : ""
190
- }}
136
+ <el-form-item :label="$t('contract.taxId') + ':'">
137
+ {{ this.form.notifierCompany ? this.form.notifierCompany.taxNumber : '' }}
191
138
  </el-form-item>
192
139
  </el-col>
193
140
  <el-col :span="8">
194
- <el-form-item :label="$t('contract.address') +':'">
195
- {{
196
- this.form.notifierCompany
197
- ? this.form.notifierCompany.address
198
- : ""
199
- }}
141
+ <el-form-item :label="$t('contract.address') + ':'">
142
+ {{ this.form.notifierCompany ? this.form.notifierCompany.address : '' }}
200
143
  </el-form-item>
201
144
  </el-col>
202
145
  </el-row>
203
146
 
204
147
  <el-row>
205
148
  <el-col :span="8">
206
- <el-form-item :label="$t('contract.contact') +':'">
207
- {{
208
- this.form.notifierCompany
209
- ? this.form.notifierCompany.contact
210
- : ""
211
- }}
149
+ <el-form-item :label="$t('contract.contact') + ':'">
150
+ {{ this.form.notifierCompany ? this.form.notifierCompany.contact : '' }}
212
151
  </el-form-item>
213
152
  </el-col>
214
153
  <el-col :span="8">
215
- <el-form-item :label="$t('contract.phoneNumber') +':'">
154
+ <el-form-item :label="$t('contract.phoneNumber') + ':'">
216
155
  {{
217
- this.form.notifierCompany &&
218
- this.form.notifierCompany.phoneNumber &&
219
- this.form.notifierCompany.phoneNumber.length > 0
220
- ? this.form.notifierCompany.phoneNumber.join("/")
221
- : ""
156
+ this.form.notifierCompany && this.form.notifierCompany.phoneNumber && this.form.notifierCompany.phoneNumber.length > 0
157
+ ? this.form.notifierCompany.phoneNumber.join('/')
158
+ : ''
222
159
  }}
223
160
  </el-form-item>
224
161
  </el-col>
@@ -227,43 +164,29 @@
227
164
  <el-row>
228
165
  <el-col :span="isMobile ? 24 : 8">
229
166
  <el-form-item label="GST NUMBER:">
230
- {{
231
- this.form.notifierCompany ?
232
- this.form.notifierCompany.gstNumber
233
- : ''
234
- }}
167
+ {{ this.form.notifierCompany ? this.form.notifierCompany.gstNumber : '' }}
235
168
  </el-form-item>
236
169
  </el-col>
237
170
  <el-col :span="isMobile ? 24 : 8">
238
171
  <el-form-item label="PAN NO.:">
239
- {{
240
- this.form.notifierCompany ?
241
- this.form.notifierCompany.panNo
242
- : ''
243
- }}
172
+ {{ this.form.notifierCompany ? this.form.notifierCompany.panNo : '' }}
244
173
  </el-form-item>
245
174
  </el-col>
246
175
  <el-col :span="isMobile ? 24 : 8">
247
176
  <el-form-item label="IEC CODE:">
248
- {{
249
- this.form.notifierCompany ?
250
- this.form.notifierCompany.iecCode
251
- : ''
252
- }}
177
+ {{ this.form.notifierCompany ? this.form.notifierCompany.iecCode : '' }}
253
178
  </el-form-item>
254
179
  </el-col>
255
180
  </el-row>
256
181
  <el-row>
257
- <el-form-item :label="$t('contract.email') +':'">
182
+ <el-form-item :label="$t('contract.email') + ':'">
258
183
  <el-row>
259
184
  <el-col :span="20">
260
185
  <div style="white-space: pre-line !important">
261
186
  {{
262
- this.form.notifierCompany &&
263
- this.form.notifierCompany.email &&
264
- this.form.notifierCompany.email.length > 0
265
- ? this.form.notifierCompany.email.join("\n")
266
- : ""
187
+ this.form.notifierCompany && this.form.notifierCompany.email && this.form.notifierCompany.email.length > 0
188
+ ? this.form.notifierCompany.email.join('\n')
189
+ : ''
267
190
  }}
268
191
  </div>
269
192
  </el-col>
@@ -275,23 +198,17 @@
275
198
  <el-row>
276
199
  <el-col :span="8">
277
200
  <el-form-item :label="$t('contract.company') + ':'">
278
- {{
279
- "TTYY INTERNATIONAL LIMITED"
280
- }}
201
+ {{ 'TTYY INTERNATIONAL LIMITED' }}
281
202
  </el-form-item>
282
203
  </el-col>
283
204
  <el-col :span="8">
284
205
  <el-form-item :label="$t('contract.taxId') + ':'">
285
- {{
286
- "73855725-000-23-0"
287
- }}
206
+ {{ '73855725-000-23-0' }}
288
207
  </el-form-item>
289
208
  </el-col>
290
209
  <el-col :span="8">
291
210
  <el-form-item :label="$t('contract.address') + ':'">
292
- {{
293
- "FLAT/RM 07, 12/F, CHEVALIER COMMERCIAL CENTRE, 8 WANG HOI ROAD, KOWLOON BAY"
294
- }}
211
+ {{ 'FLAT/RM 07, 12/F, CHEVALIER COMMERCIAL CENTRE, 8 WANG HOI ROAD, KOWLOON BAY' }}
295
212
  </el-form-item>
296
213
  </el-col>
297
214
  </el-row>
@@ -299,43 +216,27 @@
299
216
  <el-row>
300
217
  <el-col :span="8">
301
218
  <el-form-item :label="$t('contract.contact') + ':'">
302
- {{
303
- "Ms. Zhou"
304
- }}
219
+ {{ 'Ms. Zhou' }}
305
220
  </el-form-item>
306
221
  </el-col>
307
222
  <el-col :span="8">
308
223
  <el-form-item :label="$t('contract.phoneNumber') + ':'">
309
- {{
310
- "0085221267435"
311
- }}
224
+ {{ '00-852 53816912' }}
312
225
  </el-form-item>
313
226
  </el-col>
314
227
  <el-col :span="8"></el-col>
315
228
  </el-row>
316
229
 
317
230
  <el-row>
318
- <el-form-item :label="$t('contract.email') + ':'">{{ "info@tyzltech.com" }}</el-form-item>
231
+ <el-form-item :label="$t('contract.email') + ':'">{{ 'info@tyzltech.com' }}</el-form-item>
319
232
  </el-row>
320
233
  <el-divider></el-divider>
321
234
  <div class="sub-title mb20">{{ $t('contract.otherInfo') }}</div>
322
235
 
323
236
  <el-row>
324
- <el-row
325
- v-for="(buyCompanyBillGood, index) in form.buyerCompanyBillGoods"
326
- :key="index"
327
- class="mt5"
328
- >
237
+ <el-row v-for="(buyCompanyBillGood, index) in form.buyerCompanyBillGoods" :key="index" class="mt5">
329
238
  <el-col :span="3">
330
- <div
331
- style="
332
- height: 26px;
333
- margin-top: -1px;
334
- text-align: center;
335
- line-height: 28px;
336
- font-size: 14px;
337
- "
338
- >{{ $t('contract.option') + " " + (index + 1) }}</div>
239
+ <div style="height: 26px; margin-top: -1px; text-align: center; line-height: 28px; font-size: 14px">{{ $t('contract.option') + ' ' + (index + 1) }}</div>
339
240
  </el-col>
340
241
  <el-col :span="15">
341
242
  <el-form-item :label="$t('contract.product') + ':'">{{ buyCompanyBillGood.goodsName }}</el-form-item>
@@ -346,25 +247,23 @@
346
247
  </el-row>
347
248
  </el-row>
348
249
 
349
- <el-form-item :label="$t('contractDetail.destination') + ':'">{{ contract.destination }}</el-form-item>
250
+ <el-form-item v-if="contract && contract.freightTerms && contract.freightTerms != 'EXW'" :label="$t('contractDetail.destination') + ':'">{{
251
+ contract.destination
252
+ }}</el-form-item>
253
+ <el-form-item v-else :label="'EXW Address' + ':'">{{ contract.exw }}</el-form-item>
254
+
255
+ <el-form-item v-if="contract && contract.freightTerms && contract.freightTerms != 'EXW'" :label="$t('contract.terminal') + ':'">{{
256
+ form.terminal
257
+ }}</el-form-item>
350
258
 
351
- <el-form-item :label="$t('contract.terminal') + ':'">{{ form.terminal }}</el-form-item>
352
-
353
259
  <el-form-item :label="$t('contract.shippingMarks') + ':'">{{ form.shippingMark }}</el-form-item>
354
260
 
355
261
  <el-form-item :label="$t('contract.remark') + ':'" prop="blRemark">
356
- <div
357
- style="white-space: pre-line !important"
358
- >{{ "\n" + (form && form.blRemark ? form.blRemark : '') }}</div>
262
+ <div style="white-space: pre-line !important">{{ '\n' + (form && form.blRemark ? form.blRemark : '') }}</div>
359
263
  </el-form-item>
360
264
  <el-form-item :label="$t('contract.attachments') + ':'" prop="billPictures">
361
265
  <div v-for="(item, i) in form.billPictures" :key="i" class="file-download-link mr10">
362
- <el-link
363
- :href="item.generateUrl"
364
- type="primary"
365
- target="_blank"
366
- underline
367
- >{{ item.fileName || '下载文件' }}</el-link>
266
+ <el-link :href="item.generateUrl" type="primary" target="_blank" underline>{{ item.fileName || '下载文件' }}</el-link>
368
267
  </div>
369
268
  </el-form-item>
370
269
  </el-form>
@@ -387,26 +286,9 @@
387
286
  <div style="text-align: center; margin-top: 50px">
388
287
  <svg-icon icon-class="un-submit" style="height: 100px; width: 100px" />
389
288
  </div>
390
- <div
391
- style="
392
- text-align: center;
393
- margin-top: 20px;
394
- font-weight: bold;
395
- font-size: 25px;
396
- "
397
- >The buyer has not provided the required Bill of Lading information.</div>
398
- <div
399
- style="
400
- margin-left: 50px;
401
- margin-right: 50px;
402
- color: grey;
403
- font-size: 25px;
404
- font-weight: bold;
405
- text-align: center;
406
- "
407
- >
408
- Once the buyer submits the Bill of Lading information, you will be able
409
- to view it at this location.
289
+ <div style="text-align: center; margin-top: 20px; font-weight: bold; font-size: 25px">The buyer has not provided the required Bill of Lading information.</div>
290
+ <div style="margin-left: 50px; margin-right: 50px; color: grey; font-size: 25px; font-weight: bold; text-align: center">
291
+ Once the buyer submits the Bill of Lading information, you will be able to view it at this location.
410
292
  </div>
411
293
  </div>
412
294
 
@@ -415,34 +297,44 @@
415
297
  </template>
416
298
 
417
299
  <script>
418
- import {
419
- getBizDealRecordByAskId,
420
- updateBizDealRecord,
421
- } from '../../../api/biz/bizDealRecord';
422
- import { exportPdf } from '../../../utils/pdf';
423
- import { listBizContractCompany } from '../../../api/biz/bizContractCompany';
424
- import BillPdf from './billPdf.vue';
425
- import { listCompanyBillGoods } from '../../../api/biz/bizCompanyBillGoods';
426
- import EditBill from './editBill.vue';
427
- import { getSaleContractInfo } from '../../../api/biz/bizContract';
300
+ // import { getBizDealRecordByAskId, updateBizDealRecord } from '../../../api/biz/bizDealRecord'
301
+ import { exportPdf } from '../../../utils/pdf'
302
+ import { listBizContractCompany } from '../../../api/biz/bizContractCompany'
303
+ import BillPdf from './billPdf.vue'
304
+ import { listCompanyBillGoods } from '../../../api/biz/bizCompanyBillGoods'
305
+ import EditBill from './editBill.vue'
306
+ // import { getSaleContractInfo } from '../../../api/biz/bizContract'
428
307
 
429
308
  export default {
430
309
  name: 'BillInfo',
431
310
  props: {
432
311
  contract: {
433
312
  type: Object,
434
- default: null,
313
+ default: null
435
314
  },
436
315
  channel: {
437
316
  type: String,
438
- default: '',
317
+ default: ''
439
318
  },
319
+ // 提单指令数据
320
+ billData: {
321
+ type: Object,
322
+ default: null
323
+ }
440
324
  },
441
325
  components: { BillPdf, EditBill },
326
+ watch: {
327
+ billData: {
328
+ handler(val) {
329
+ this.getDealRecord(this.contract.askId)
330
+ },
331
+ immediate: true
332
+ }
333
+ },
442
334
  data() {
443
335
  return {
444
336
  //
445
- saleContract: null,
337
+ // saleContract: null,
446
338
  // 遮罩层
447
339
  loading: true,
448
340
  // 弹出层标题
@@ -455,9 +347,9 @@ export default {
455
347
  buyerCompanyBillGoods: [
456
348
  {
457
349
  goodsName: '',
458
- hsCode: '',
459
- },
460
- ],
350
+ hsCode: ''
351
+ }
352
+ ]
461
353
  },
462
354
  printModel: false,
463
355
  //
@@ -474,135 +366,113 @@ export default {
474
366
  shippingMark: [{ required: true, trigger: 'blur' }],
475
367
  deliveryCompanyId: [{ required: true, trigger: 'blur' }],
476
368
  notifierCompanyId: [{ required: true, trigger: 'blur' }],
477
- goodsName: [{ required: true, trigger: 'blur' }],
369
+ goodsName: [{ required: true, trigger: 'blur' }]
478
370
  },
479
- isMobile: document.body.clientWidth <= 768,
480
- };
371
+ isMobile: document.body.clientWidth <= 768
372
+ }
481
373
  },
482
374
  created() {
483
- const { contractId, printModel } = this.$route.query;
484
- this.contractId = contractId;
485
- this.getDealRecord(this.contract.askId);
375
+ const { contractId, printModel } = this.$route.query
376
+ this.contractId = contractId
377
+ this.getDealRecord(this.contract.askId)
486
378
  if (printModel == 1) {
487
- this.printModel = true;
379
+ this.printModel = true
488
380
  }
489
- this.getSaleContractInfo(this.contract.dealId);
381
+ // this.getSaleContractInfo(this.contract.dealId)
490
382
  },
491
383
  methods: {
492
- getSaleContractInfo(dealId) {
493
- getSaleContractInfo(dealId).then((res) => {
494
- this.saleContract = res.data;
495
- });
496
- },
384
+ // getSaleContractInfo(dealId) {
385
+ // getSaleContractInfo(dealId).then((res) => {
386
+ // this.saleContract = res.data
387
+ // })
388
+ // },
497
389
  edit() {
498
- this.getDealRecord(this.contract.askId);
390
+ // this.getDealRecord(this.contract.askId)
391
+ // 通知外层刷新数据
392
+ this.$emit('refresh')
499
393
  },
500
394
  editBill() {
501
- this.$refs.editBill.handleEdit(
502
- this.contract.contractId,
503
- this.form.dealId
504
- );
395
+ this.$refs.editBill.handleEdit(this.billData.contractId, this.form.dealId)
505
396
  },
506
397
  //子公司更新
507
398
  changeSubCompanyList() {
508
- this.getContractCompanyList(this.form.buyerCompanyId);
399
+ this.getContractCompanyList(this.form.buyerCompanyId)
509
400
  },
510
401
  //子组件更新
511
402
  changeBillGoods() {
512
- this.getCompanyBillGoods(this.form.buyerCompanyId);
403
+ this.getCompanyBillGoods(this.form.buyerCompanyId)
513
404
  },
514
405
  //
515
406
  handleBillGoods(companyId) {
516
- this.$refs.billGoods.handleShow(companyId);
407
+ this.$refs.billGoods.handleShow(companyId)
517
408
  },
518
409
  //选中提单货物时
519
410
  changeBillGood(val, index) {
520
- const billGood = this.billGoodsList.find((i) => i.goodsName == val);
521
- this.form.buyerCompanyBillGoods[index].hsCode = billGood.hsCode;
411
+ const billGood = this.billGoodsList.find((i) => i.goodsName == val)
412
+ this.form.buyerCompanyBillGoods[index].hsCode = billGood.hsCode
522
413
  },
523
414
  //添加提单货物
524
415
  addBillGoods() {
525
416
  this.form.buyerCompanyBillGoods.push({
526
417
  goodsName: '',
527
- hsCode: '',
528
- });
418
+ hsCode: ''
419
+ })
529
420
  },
530
421
  //删除提单货物
531
422
  deleteBillGoods(index) {
532
- this.form.buyerCompanyBillGoods.splice(index, 1);
423
+ this.form.buyerCompanyBillGoods.splice(index, 1)
533
424
  },
534
425
  //获取公司提单货物
535
426
  getCompanyBillGoods(companyId) {
536
427
  listCompanyBillGoods({ companyId: companyId }).then((res) => {
537
- const billGoodsList = res.rows;
538
- this.billGoodsList = billGoodsList;
428
+ const billGoodsList = res.rows
429
+ this.billGoodsList = billGoodsList
539
430
  if (!this.form.buyerCompanyBillGoods) {
540
- const defaultBillGoods =
541
- billGoodsList.filter((item) => item.defaultFlag).length > 0
542
- ? billGoodsList.filter((item) => item.defaultFlag)[0]
543
- : null;
431
+ const defaultBillGoods = billGoodsList.filter((item) => item.defaultFlag).length > 0 ? billGoodsList.filter((item) => item.defaultFlag)[0] : null
544
432
  this.form.buyerCompanyBillGoods.push({
545
433
  goodsName: defaultBillGoods.goodsName,
546
- hsCode: defaultBillGoods.hsCode,
547
- });
434
+ hsCode: defaultBillGoods.hsCode
435
+ })
548
436
  }
549
- });
437
+ })
550
438
  },
551
439
  //更改收货人或者通知人公司时 相应显示变更
552
440
  changeSubCompany(val, type) {
553
441
  if (type == 'delivery') {
554
- this.form.deliveryCompany = this.deliveryCompanyList.filter(
555
- (item) => item.contractCompanyId == val
556
- )[0];
442
+ this.form.deliveryCompany = this.deliveryCompanyList.filter((item) => item.contractCompanyId == val)[0]
557
443
  }
558
444
  if (type == 'notifier') {
559
- this.form.notifierCompany = this.notifierCompanyList.filter(
560
- (item) => item.contractCompanyId == val
561
- )[0];
445
+ this.form.notifierCompany = this.notifierCompanyList.filter((item) => item.contractCompanyId == val)[0]
562
446
  }
563
447
  },
564
448
  //获取收货人公司与通知人公司
565
449
  getContractCompanyList(companyId) {
566
450
  listBizContractCompany({ companyId: companyId }).then((res) => {
567
- const contractCompanyList = res.rows;
568
- this.deliveryCompanyList = contractCompanyList.filter(
569
- (item) => item.companyType == 'delivery'
570
- );
571
- this.notifierCompanyList = contractCompanyList.filter(
572
- (item) => item.companyType == 'notifier'
573
- );
451
+ const contractCompanyList = res.rows
452
+ this.deliveryCompanyList = contractCompanyList.filter((item) => item.companyType == 'delivery')
453
+ this.notifierCompanyList = contractCompanyList.filter((item) => item.companyType == 'notifier')
574
454
 
575
- const defaultDeliveryCompany = this.deliveryCompanyList.find(
576
- (item) => item.defaultFlag
577
- );
455
+ const defaultDeliveryCompany = this.deliveryCompanyList.find((item) => item.defaultFlag)
578
456
 
579
- const notifierDeliveryCompany = this.notifierCompanyList.find(
580
- (item) => item.defaultFlag
581
- );
457
+ const notifierDeliveryCompany = this.notifierCompanyList.find((item) => item.defaultFlag)
582
458
  //成交没收货人公司取默认 否则取收货人公司信息
583
459
  if (!this.form.deliveryCompanyId && defaultDeliveryCompany) {
584
- this.form.deliveryCompanyId =
585
- defaultDeliveryCompany.contractCompanyId;
586
- this.form.deliveryCompany = defaultDeliveryCompany;
460
+ this.form.deliveryCompanyId = defaultDeliveryCompany.contractCompanyId
461
+ this.$set(this.form, 'deliveryCompany', defaultDeliveryCompany)
587
462
  } else {
588
- const deliveryCompany = contractCompanyList.find(
589
- (item) => item.contractCompanyId == this.form.deliveryCompanyId
590
- );
591
- this.$set(this.form, 'deliveryCompany', deliveryCompany);
463
+ const deliveryCompany = contractCompanyList.find((item) => item.contractCompanyId == this.form.deliveryCompanyId)
464
+ this.$set(this.form, 'deliveryCompany', deliveryCompany)
592
465
  }
593
466
 
594
467
  //成交没通知人公司取默认 否则取通知人公司信息
595
468
  if (!this.form.notifierCompanyId && notifierDeliveryCompany) {
596
- this.form.notifierCompanyId =
597
- notifierDeliveryCompany.contractCompanyId;
598
- this.form.notifierCompany = notifierDeliveryCompany;
469
+ this.form.notifierCompanyId = notifierDeliveryCompany.contractCompanyId
470
+ this.$set(this.form, 'notifierCompany', notifierDeliveryCompany)
599
471
  } else {
600
- const notifierCompany = contractCompanyList.find(
601
- (item) => item.contractCompanyId == this.form.notifierCompanyId
602
- );
603
- this.$set(this.form, 'notifierCompany', notifierCompany);
472
+ const notifierCompany = contractCompanyList.find((item) => item.contractCompanyId == this.form.notifierCompanyId)
473
+ this.$set(this.form, 'notifierCompany', notifierCompany)
604
474
  }
605
- });
475
+ })
606
476
  },
607
477
  // 表单重置
608
478
  reset() {
@@ -677,64 +547,63 @@ export default {
677
547
  notifierCompanyId: null,
678
548
  shippingMark: null,
679
549
  blRemark: null,
680
- buyerCompanyBillGoods: null,
681
- };
682
- this.resetForm('form');
550
+ buyerCompanyBillGoods: null
551
+ }
552
+ this.resetForm('form')
683
553
  },
684
554
  getDealRecord(askId) {
685
- this.loading = false;
686
- this.reset();
687
- getBizDealRecordByAskId(askId).then((response) => {
688
- this.form = response.data;
689
- if (this.form.buyerCompanyBillGoods) {
690
- this.form.buyerCompanyBillGoods = JSON.parse(
691
- this.form.buyerCompanyBillGoods
692
- );
693
- } else {
694
- this.form.buyerCompanyBillGoods = [];
695
- this.addBillGoods();
555
+ // 使用新接口,传递进来的数据!
556
+ this.form = this.billData
557
+ // this.loading = false
558
+ // this.reset()
559
+ // getBizDealRecordByAskId(askId).then((response) => {
560
+ // this.form = response.data
561
+ if (this.form.buyerCompanyBillGoods) {
562
+ if (typeof this.form.buyerCompanyBillGoods === 'string') {
563
+ this.form.buyerCompanyBillGoods = JSON.parse(this.form.buyerCompanyBillGoods)
696
564
  }
697
-
698
- this.getContractCompanyList(this.form.buyerCompanyId);
699
- this.getCompanyBillGoods(this.form.buyerCompanyId);
700
- this.form.dealRecordDetailList.map((item) => {
701
- if (item.imageList) {
702
- item.askCover = item.imageList.toString();
703
- }
704
- });
705
- this.loading = true;
706
- });
565
+ } else {
566
+ this.form.buyerCompanyBillGoods = []
567
+ this.addBillGoods()
568
+ }
569
+ this.getContractCompanyList(this.form.buyerCompanyId)
570
+ this.getCompanyBillGoods(this.form.buyerCompanyId)
571
+ // this.form.dealRecordDetailList.map((item) => {
572
+ // if (item.imageList) {
573
+ // item.askCover = item.imageList.toString()
574
+ // }
575
+ // })
576
+ // this.loading = true
577
+ // })
707
578
  },
708
579
  /** 提交按钮 */
709
580
  submitForm() {
710
581
  this.$refs['form'].validate((valid) => {
711
582
  if (valid) {
712
583
  if (this.form.dealId != null) {
713
- var deal = JSON.parse(JSON.stringify(this.form));
714
- deal.buyerCompanyBillGoods = JSON.stringify(
715
- deal.buyerCompanyBillGoods
716
- );
584
+ var deal = JSON.parse(JSON.stringify(this.form))
585
+ deal.buyerCompanyBillGoods = JSON.stringify(deal.buyerCompanyBillGoods)
717
586
  updateDealRecord(deal).then((response) => {
718
- this.$modal.msgSuccess('保存成功');
719
- });
587
+ this.$modal.msgSuccess('保存成功')
588
+ })
720
589
  }
721
590
  }
722
- });
591
+ })
723
592
  },
724
593
  //设置打印model为true
725
594
  setPrintModel(val) {
726
- this.printModel = val;
727
- return Promise.resolve();
595
+ this.printModel = val
596
+ return Promise.resolve()
728
597
  },
729
598
  /** 下载 */
730
599
  handleExportPdf() {
731
600
  this.setPrintModel(true)
732
601
  .then(() => {
733
- exportPdf('.billPdf', 'bill');
602
+ exportPdf('.billPdf', 'bill')
734
603
  })
735
604
  .then(() => {
736
- this.printModel = false;
737
- });
605
+ this.printModel = false
606
+ })
738
607
  },
739
608
 
740
609
  //导出按钮
@@ -743,35 +612,25 @@ export default {
743
612
  this.download(
744
613
  'biz/contract/downBill',
745
614
  {
746
- contractId: this.contract.contractId,
747
- templateType: command,
615
+ contractId: this.billData.contractId,
616
+ templateType: command
748
617
  },
749
- `${
750
- 'BLI-' +
751
- this.contract.contractNo +
752
- '_' +
753
- this.parseTime(new Date(), '{y}{m}{d}')
754
- }.xlsx`
755
- );
618
+ `${'BLI-' + this.billData.contractNo + '_' + this.parseTime(new Date(), '{y}{m}{d}')}.xlsx`
619
+ )
756
620
  }
757
621
  if (command == 'PDF') {
758
622
  this.download(
759
623
  'biz/contract/downBill',
760
624
  {
761
- contractId: this.contract.contractId,
762
- templateType: command,
625
+ contractId: this.billData.contractId,
626
+ templateType: command
763
627
  },
764
- `${
765
- 'BLI-' +
766
- this.contract.contractNo +
767
- '_' +
768
- this.parseTime(new Date(), '{y}{m}{d}')
769
- }.pdf`
770
- );
628
+ `${'BLI-' + this.billData.contractNo + '_' + this.parseTime(new Date(), '{y}{m}{d}')}.pdf`
629
+ )
771
630
  }
772
- },
773
- },
774
- };
631
+ }
632
+ }
633
+ }
775
634
  </script>
776
635
  <style lang="scss" scoped>
777
636
  .info {