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

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.
@@ -11,82 +11,55 @@
11
11
  <el-card class="box-card">
12
12
  <el-row>
13
13
  <el-col :span="12">
14
- {{
15
- $t("contractDetail.contractNo") +
16
- ":" +
17
- (this.contract && this.contract.contractNo
18
- ? this.contract.contractNo
19
- : "")
20
- }}
14
+ {{ $t('contractDetail.contractNo') + ':' + (this.contract && this.contract.contractNo ? this.contract.contractNo : '') }}
21
15
  </el-col>
22
16
  <el-col v-if="channel !== 'official-website'" :span="12">
23
- <div
24
- v-if="
25
- contract.contractSignTime &&
26
- isOvertime(contract.contractSignTime, 14)
27
- "
28
- >
17
+ <div v-if="contract.contractSignTime && isOvertime(contract.contractSignTime, 14)">
29
18
  {{
30
- depositStatus == "not_received"
31
- ? "【超时未收定金】提醒:您已于【" +
32
- utc2local(contract.contractSignTime, "YYYY-MM-DD") +
33
- "】 签订合同,定金款已超过【" +
34
- getDays(contract.contractSignTime) +
35
- "】天未收到"
36
- : depositStatus == "not_paid"
37
- ? "【超时未付定金】提醒:您已于【" +
38
- utc2local(contract.contractSignTime, "YYYY-MM-DD") +
39
- "】 签订合同,定金款已超过【" +
40
- getDays(contract.contractSignTime) +
41
- "】天未支付"
42
- : ""
19
+ depositStatus == 'not_received'
20
+ ? '【超时未收定金】提醒:您已于【' +
21
+ utc2local(contract.contractSignTime, 'YYYY-MM-DD') +
22
+ '】 签订合同,定金款已超过【' +
23
+ getDays(contract.contractSignTime) +
24
+ '】天未收到'
25
+ : depositStatus == 'not_paid'
26
+ ? '【超时未付定金】提醒:您已于【' +
27
+ utc2local(contract.contractSignTime, 'YYYY-MM-DD') +
28
+ '】 签订合同,定金款已超过【' +
29
+ getDays(contract.contractSignTime) +
30
+ '】天未支付'
31
+ : ''
43
32
  }}
44
33
  </div>
45
- <div
46
- v-if="
47
- contract.contractSignTime &&
48
- isOvertime(contract.contractSignTime, contract.latestShipment)
49
- "
50
- >
34
+ <div v-if="contract.contractSignTime && isOvertime(contract.contractSignTime, contract.latestShipment)">
51
35
  {{
52
- deliveryStatus != "all_shipment"
53
- ? "【超时未发货】提醒:当前合同约定签订后【" +
54
- contract.latestShipment +
55
- "】天发货;目前距合同签订【" +
56
- getDays(contract.contractSignTime) +
57
- "】天,卖家仍未全部发货;"
58
- : "" + ""
36
+ deliveryStatus != 'all_shipment'
37
+ ? '【超时未发货】提醒:当前合同约定签订后【' +
38
+ contract.latestShipment +
39
+ '】天发货;目前距合同签订【' +
40
+ getDays(contract.contractSignTime) +
41
+ '】天,卖家仍未全部发货;'
42
+ : '' + ''
59
43
  }}
60
44
  </div>
61
- <div
62
- v-if="
63
- deliveryStatus == 'all_shipment' &&
64
- depositStatus == 'not_received'
65
- "
66
- >{{ "【已发货未收定金】提醒:卖家已全部发货,定金款仍未收到" }}</div>
45
+ <div v-if="deliveryStatus == 'all_shipment' && depositStatus == 'not_received'">{{ '【已发货未收定金】提醒:卖家已全部发货,定金款仍未收到' }}</div>
67
46
  </el-col>
68
47
  </el-row>
69
48
  <el-row v-if="channel !== 'official-website'">
70
- {{
71
- $t("contractDetail.relatedContract") +
72
- ":" +
73
- getContractNos(
74
- (this.contract && this.contract.associationContractList) || []
75
- )
76
- }}
49
+ {{ $t('contractDetail.relatedContract') + ':' + getContractNos((this.contract && this.contract.associationContractList) || []) }}
77
50
  </el-row>
78
51
  </el-card>
79
52
 
80
53
  <el-card style="margin-top: 5px">
81
54
  <div slot="header" class="clearfix">
82
- <span>{{ $t("contractDetail.dealSummary") }}</span>
55
+ <span>{{ $t('contractDetail.dealSummary') }}</span>
83
56
  <!-- <el-button style="float: right; padding: 3px 0" type="text"
84
57
  >操作按钮</el-button
85
58
  >-->
86
59
  </div>
87
60
  <el-form :model="dealRecord">
88
61
  <el-card>
89
- <div slot="header" class="clearfix">{{ $t("contractDetail.askOverview") }}</div>
62
+ <div slot="header" class="clearfix">{{ $t('contractDetail.askOverview') }}</div>
90
63
  <el-row>
91
64
  <el-col :span="8">
92
65
  <el-form-item :label="$t('contractDetail.askId')">{{ dealRecord.askId }}</el-form-item>
@@ -100,44 +73,26 @@
100
73
  </el-row>
101
74
  <el-row>
102
75
  <el-col :span="8">
103
- <el-form-item
104
- :label="$t('contractDetail.loadingCountry')"
105
- >{{ getCountryName("loading") }}</el-form-item>
76
+ <el-form-item :label="$t('contractDetail.loadingCountry')">{{ getCountryName('loading') }}</el-form-item>
106
77
  </el-col>
107
78
  <el-col :span="8">
108
- <el-form-item
109
- :label="$t('contractDetail.originCountry')"
110
- >{{ getCountryName("country") }}</el-form-item>
79
+ <el-form-item :label="$t('contractDetail.originCountry')">{{ getCountryName('country') }}</el-form-item>
111
80
  </el-col>
112
81
  <el-col :span="8">
113
82
  <el-form-item :label="$t('contractDetail.shipmentDays')">
114
- {{
115
- $t("contractDetail.tip1") +
116
- "[" +
117
- dealRecord.shipmentDays +
118
- "]" +
119
- $t("contractDetail.tip2")
120
- }}
83
+ {{ $t('contractDetail.tip1') + '[' + dealRecord.shipmentDays + ']' + $t('contractDetail.tip2') }}
121
84
  </el-form-item>
122
85
  </el-col>
123
86
  </el-row>
124
87
  <el-row>
125
88
  <el-col :span="8">
126
89
  <el-form-item :label="$t('contractDetail.tip3')">
127
- {{
128
- dealRecord.originCertificateFlag
129
- ? $t("contractDetail.yes")
130
- : $t("contractDetail.no")
131
- }}
90
+ {{ dealRecord.originCertificateFlag ? $t('contractDetail.yes') : $t('contractDetail.no') }}
132
91
  </el-form-item>
133
92
  </el-col>
134
93
  <el-col :span="8">
135
94
  <el-form-item :label="$t('contractDetail.tip4')">
136
- {{
137
- dealRecord.customsRejectionFlag
138
- ? $t("contractDetail.yes")
139
- : $t("contractDetail.no")
140
- }}
95
+ {{ dealRecord.customsRejectionFlag ? $t('contractDetail.yes') : $t('contractDetail.no') }}
141
96
  </el-form-item>
142
97
  </el-col>
143
98
  </el-row>
@@ -146,9 +101,7 @@
146
101
  <el-form-item :label="$t('contractDetail.paymentType')">{{ dealRecord.paymentType }}</el-form-item>
147
102
  </el-col>
148
103
  <el-col :span="8">
149
- <el-form-item
150
- :label="$t('contractDetail.destination')"
151
- >{{ dealRecord.buyerDestination }}</el-form-item>
104
+ <el-form-item :label="$t('contractDetail.destination')">{{ dealRecord.buyerDestination }}</el-form-item>
152
105
  </el-col>
153
106
  </el-row>
154
107
  <el-row>
@@ -157,19 +110,12 @@
157
110
  <el-row>
158
111
  <el-col :span="18">
159
112
  <el-form-item :label="$t('contractDetail.preferredQuoteMethod')">
160
- {{
161
- getPreferredQuoteMethodLabel(dealRecord.preferredQuoteMethod)
162
- }}
113
+ {{ getPreferredQuoteMethodLabel(dealRecord) }}
163
114
  </el-form-item>
164
115
  </el-col>
165
116
  <!-- 买家点价 -->
166
117
  <el-col :span="6">
167
- <div
168
- class="share"
169
- v-if="showPricing"
170
- style="right:100px;"
171
- @click.stop="openPriceFix"
172
- >{{ $t('index.priceFix') }}</div>
118
+ <div class="share" v-if="showPricing" style="right: 100px" @click.stop="openPriceFix">{{ $t('index.priceFix') }}</div>
173
119
  </el-col>
174
120
  </el-row>
175
121
  </el-card>
@@ -180,29 +126,20 @@
180
126
  </div>
181
127
  <el-row>
182
128
  <el-col :span="12">
183
- <div class="text item">{{ "卖方" }}</div>
129
+ <div class="text item">{{ '卖方' }}</div>
184
130
  <el-form-item label="公司名称" prop="sellerCompanyName">{{ dealRecord.sellerCompanyName }}</el-form-item>
185
131
  <el-form-item label="公司地址">{{ dealRecord.sellerCompanyAddress }}</el-form-item>
186
132
  <el-form-item label="联系人">
187
- {{
188
- dealRecord.contactLastname + " " + dealRecord.contactFirstname
189
- }}
133
+ {{ dealRecord.contactLastname + ' ' + dealRecord.contactFirstname }}
190
134
  </el-form-item>
191
135
  </el-col>
192
136
  <el-col :span="12">
193
- <div class="text item">{{ "买方" }}</div>
137
+ <div class="text item">{{ '买方' }}</div>
194
138
  <el-form-item label="公司名称" prop="buyerCompanyName">
195
- {{
196
- dealRecord.buyerCompanyName || dealRecord.buyerCompanyNameCn
197
- }}
139
+ {{ dealRecord.buyerCompanyName || dealRecord.buyerCompanyNameCn }}
198
140
  </el-form-item>
199
- <el-form-item
200
- label="公司地址"
201
- prop="buyerCompanyName"
202
- >{{ dealRecord.buyerCompanyAddress }}</el-form-item>
203
- <el-form-item
204
- label="联系人"
205
- >{{ dealRecord.buyerLastname + " " + dealRecord.buyerFirstname }}</el-form-item>
141
+ <el-form-item label="公司地址" prop="buyerCompanyName">{{ dealRecord.buyerCompanyAddress }}</el-form-item>
142
+ <el-form-item label="联系人">{{ dealRecord.buyerLastname + ' ' + dealRecord.buyerFirstname }}</el-form-item>
206
143
  </el-col>
207
144
  </el-row>
208
145
  </el-card>
@@ -210,9 +147,7 @@
210
147
  <el-card class="mt5">
211
148
  <div slot="header" class="clearfix">
212
149
  <span class="text item">
213
- {{
214
- $t("contractDetail.commodityInfo")
215
- }}
150
+ {{ $t('contractDetail.commodityInfo') }}
216
151
  </span>
217
152
  </div>
218
153
  <el-table
@@ -227,214 +162,78 @@
227
162
  <image-preview :src="scope.row.askCover" :width="50" :height="50" />
228
163
  </template>
229
164
  </el-table-column>
230
- <el-table-column
231
- prop="askName"
232
- :label="$t('contractDetail.askName')"
233
- :width="channel === 'official-website' ? 200 : 100"
234
- ></el-table-column>
235
- <el-table-column
236
- v-if="channel !== 'official-website'"
237
- :label="$t('contractDetail.categoryName')"
238
- prop="categoryName"
239
- ></el-table-column>
240
- <el-table-column
241
- v-if="channel !== 'official-website'"
242
- :label="$t('contractDetail.subCategory')"
243
- prop="subCategoryName"
244
- width="110"
245
- ></el-table-column>
246
- <el-table-column
247
- :label="$t('contractDetail.packaging')"
248
- prop="packingMethod"
249
- width="90"
250
- />
251
- <el-table-column
252
- prop="descriptions"
253
- :label="$t('contractDetail.description')"
254
- :width="channel === 'official-website' ? 200 : 160"
255
- ></el-table-column>
165
+ <el-table-column prop="askName" :label="$t('contractDetail.askName')" :width="channel === 'official-website' ? 200 : 100"></el-table-column>
166
+ <el-table-column v-if="channel !== 'official-website'" :label="$t('contractDetail.categoryName')" prop="categoryName"></el-table-column>
167
+ <el-table-column v-if="channel !== 'official-website'" :label="$t('contractDetail.subCategory')" prop="subCategoryName" width="110"></el-table-column>
168
+ <el-table-column :label="$t('contractDetail.packaging')" prop="packingMethod" width="90" />
169
+ <el-table-column prop="descriptions" :label="$t('contractDetail.description')" :width="channel === 'official-website' ? 200 : 160"></el-table-column>
256
170
  <el-table-column prop="weight" :label="$t('contractDetail.weight')" width="120px"></el-table-column>
257
- <el-table-column
258
- v-if="channel !== 'official-website'"
259
- prop="sllerPrice"
260
- :label="$t('contractDetail.sellerPrice')"
261
- width="120"
262
- >
171
+ <el-table-column v-if="channel !== 'official-website'" prop="sllerPrice" :label="$t('contractDetail.sellerPrice')" width="120">
263
172
  <template slot-scope="scope">
264
- <span v-if="dealRecord.quoteType == 'FIXED'">{{ "$" + scope.row.sllerPrice }}</span>
265
- <span
266
- v-else-if="dealRecord.quoteType == 'CMX'"
267
- >{{ "CMX - " + scope.row.sllerPrice }}</span>
268
- <span v-else>{{ scope.row.sllerPrice + "%LME" }}</span>
173
+ <span v-if="dealRecord.quoteType == 'FIXED'">{{ '$' + scope.row.sllerPrice }}</span>
174
+ <span v-else-if="dealRecord.quoteType == 'CMX'">{{ 'CMX - ' + scope.row.sllerPrice }}</span>
175
+ <span v-else>{{ scope.row.sellerPriceFormula || scope.row.sllerPrice + '%LME' }}</span>
269
176
  </template>
270
177
  </el-table-column>
271
- <el-table-column
272
- prop="quotePrice"
273
- :label="$t('contractDetail.quotePrice')"
274
- :width="channel === 'official-website' ? 180 : 120"
275
- >
178
+ <el-table-column prop="quotePrice" :label="$t('contractDetail.quotePrice')" :width="channel === 'official-website' ? 180 : 120">
276
179
  <template slot-scope="scope">
277
- <span v-if="dealRecord.quoteType == 'FIXED'">{{ "$" + scope.row.quotePrice }}</span>
278
- <span
279
- v-else-if="dealRecord.quoteType == 'CMX'"
280
- >{{ "CMX - " + scope.row.quotePrice }}</span>
281
- <span v-else>{{ scope.row.quotePrice + "%LME" }}</span>
180
+ <span v-if="dealRecord.quoteType == 'FIXED'">{{ '$' + scope.row.quotePrice }}</span>
181
+ <span v-else-if="dealRecord.quoteType == 'CMX'">{{ 'CMX - ' + scope.row.quotePrice }}</span>
182
+ <span v-else>{{ scope.row.quotePriceFormula || scope.row.quotePrice + '%LME' }}</span>
282
183
  </template>
283
184
  </el-table-column>
284
- <el-table-column
285
- prop="totalQuote"
286
- :label="$t('contractDetail.totalQuote')"
287
- :width="channel === 'official-website' ? 180 : 120"
288
- ></el-table-column>
185
+ <el-table-column prop="totalQuote" :label="$t('contractDetail.totalQuote')" :width="channel === 'official-website' ? 180 : 120"></el-table-column>
289
186
  </el-table>
290
187
  </el-card>
291
188
  </el-form>
292
189
 
293
190
  <el-card class="mt5">
294
191
  <div slot="header" class="clearfix">
295
- <span class="text item">{{ $t("contractDetail.invoiceInfo") }}</span>
192
+ <span class="text item">{{ $t('contractDetail.invoiceInfo') }}</span>
296
193
  <el-button style="float: right; padding: 3px 0" type="text" @click="collectInvoice">
297
- {{ $t("contractDetail.closeInvoiceInfo") }}
194
+ {{ $t('contractDetail.closeInvoiceInfo') }}
298
195
  <i class="el-icon-arrow-down"></i>
299
196
  </el-button>
300
- <el-button
301
- v-if="channel !== 'official-website'"
302
- style="padding: 3px 0"
303
- type="text"
304
- @click="viceDocuments"
305
- >{{ $t("contractDetail.viewPaymentInfo") }}</el-button>
197
+ <el-button v-if="channel !== 'official-website'" style="padding: 3px 0" type="text" @click="viceDocuments">{{
198
+ $t('contractDetail.viewPaymentInfo')
199
+ }}</el-button>
306
200
  </div>
307
201
  <el-table :data="invoiceList" v-if="invoiceActive">
308
- <el-table-column
309
- :label="$t('contractDetail.invoiceNo')"
310
- align="center"
311
- prop="invoiceNo"
312
- width="165"
313
- />
314
- <el-table-column
315
- :label="$t('contractDetail.contractNo')"
316
- align="center"
317
- prop="contractNo"
318
- width="155"
319
- />
320
- <el-table-column
321
- :label="$t('contractDetail.invoiceType')"
322
- align="center"
323
- prop="invoiceType"
324
- width="120"
325
- >
202
+ <el-table-column :label="$t('contractDetail.invoiceNo')" align="center" prop="invoiceNo" width="165" />
203
+ <el-table-column :label="$t('contractDetail.contractNo')" align="center" prop="contractNo" width="155" />
204
+ <el-table-column :label="$t('contractDetail.invoiceType')" align="center" prop="invoiceType" width="120">
326
205
  <template slot-scope="scope">
327
206
  <dict-tag :options="dict.type.contract_type" :value="scope.row.invoiceType" />
328
207
  </template>
329
208
  </el-table-column>
330
- <el-table-column
331
- :label="$t('contractDetail.invoiceSpecies')"
332
- align="center"
333
- prop="invoiceSpecies"
334
- width="120"
335
- >
209
+ <el-table-column :label="$t('contractDetail.invoiceSpecies')" align="center" prop="invoiceSpecies" width="120">
336
210
  <template slot-scope="scope">
337
211
  <dict-tag :options="dict.type.invoice_species" :value="scope.row.invoiceSpecies" />
338
212
  </template>
339
213
  </el-table-column>
340
214
  <el-table-column :label="$t('contractDetail.invoiceDate')" prop="createTime" width="120"></el-table-column>
341
- <el-table-column
342
- :label="$t('contractDetail.issuer')"
343
- align="center"
344
- prop="billCompanyName"
345
- width="150"
346
- :show-overflow-tooltip="true"
347
- />
348
- <el-table-column
349
- :label="$t('contractDetail.billTo')"
350
- align="center"
351
- prop="receiveCompanyName"
352
- width="150"
353
- :show-overflow-tooltip="true"
354
- />
355
- <el-table-column
356
- v-if="channel !== 'official-website'"
357
- label="未付/未收金额"
358
- align="center"
359
- prop="remainingAmount"
360
- width="120"
361
- />
362
- <el-table-column
363
- v-if="channel !== 'official-website'"
364
- label="已付/已收金额"
365
- align="center"
366
- prop="remainingAmount"
367
- width="120"
368
- >
215
+ <el-table-column :label="$t('contractDetail.issuer')" align="center" prop="billCompanyName" width="150" :show-overflow-tooltip="true" />
216
+ <el-table-column :label="$t('contractDetail.billTo')" align="center" prop="receiveCompanyName" width="150" :show-overflow-tooltip="true" />
217
+ <el-table-column v-if="channel !== 'official-website'" label="未付/未收金额" align="center" prop="remainingAmount" width="120" />
218
+ <el-table-column v-if="channel !== 'official-website'" label="已付/已收金额" align="center" prop="remainingAmount" width="120">
369
219
  <template slot-scope="{ row }">{{ row.amount - row.remainingAmount }}</template>
370
220
  </el-table-column>
371
- <el-table-column
372
- v-if="channel !== 'official-website'"
373
- label="总金额"
374
- align="center"
375
- prop="amount"
376
- width="100"
377
- />
221
+ <el-table-column v-if="channel !== 'official-website'" label="总金额" align="center" prop="amount" width="100" />
378
222
 
379
223
  <!-- 官网 -->
380
- <el-table-column
381
- v-if="channel == 'official-website'"
382
- :label="$t('contract.Payable_Amount')"
383
- align="center"
384
- prop="amount"
385
- width="100"
386
- />
387
- <el-table-column
388
- v-if="channel == 'official-website'"
389
- :label="$t('contract.Amount_Paid')"
390
- align="center"
391
- prop="amount"
392
- width="100"
393
- >
224
+ <el-table-column v-if="channel == 'official-website'" :label="$t('contract.Payable_Amount')" align="center" prop="amount" width="100" />
225
+ <el-table-column v-if="channel == 'official-website'" :label="$t('contract.Amount_Paid')" align="center" prop="amount" width="100">
394
226
  <template slot-scope="{ row }">{{ row.amount - row.remainingAmount }}</template>
395
227
  </el-table-column>
396
- <el-table-column
397
- v-if="channel == 'official-website'"
398
- :label="$t('contract.Balance_Due')"
399
- align="center"
400
- prop="remainingAmount"
401
- width="100"
402
- />
403
- <el-table-column
404
- :label="$t('contractDetail.quoteType')"
405
- align="center"
406
- prop="quoteType"
407
- width="120"
408
- />
228
+ <el-table-column v-if="channel == 'official-website'" :label="$t('contract.Balance_Due')" align="center" prop="remainingAmount" width="100" />
229
+ <el-table-column :label="$t('contractDetail.quoteType')" align="center" prop="quoteType" width="120" />
409
230
 
410
- <el-table-column
411
- :label="$t('contractDetail.paymentTerms')"
412
- align="center"
413
- prop="paymentTerms"
414
- show-overflow-tooltip
415
- width="120"
416
- />
231
+ <el-table-column :label="$t('contractDetail.paymentTerms')" align="center" prop="paymentTerms" show-overflow-tooltip width="120" />
417
232
 
418
- <el-table-column
419
- v-if="channel !== 'official-website'"
420
- :label="$t('contractDetail.remark')"
421
- align="center"
422
- prop="remark"
423
- show-overflow-tooltip
424
- />
425
- <el-table-column
426
- :label="$t('contractDetail.operate')"
427
- v-if="channel !== 'official-website'"
428
- >
233
+ <el-table-column v-if="channel !== 'official-website'" :label="$t('contractDetail.remark')" align="center" prop="remark" show-overflow-tooltip />
234
+ <el-table-column :label="$t('contractDetail.operate')" v-if="channel !== 'official-website'">
429
235
  <template slot-scope="{ row }">
430
- <el-button
431
- v-if="
432
- contract.contractType == 'sale' &&
433
- row.invoiceSpecies != 'proforma'
434
- "
435
- type="text"
436
- @click="handleUrge(row)"
437
- >一键催款</el-button>
236
+ <el-button v-if="contract.contractType == 'sale' && row.invoiceSpecies != 'proforma'" type="text" @click="handleUrge(row)">一键催款</el-button>
438
237
  </template>
439
238
  </el-table-column>
440
239
  </el-table>
@@ -443,176 +242,91 @@
443
242
  <el-card class="mt5">
444
243
  <el-collapse v-model="shipmentActiveName" accordion>
445
244
  <el-collapse-item name="0">
446
- <template slot="title">{{ $t("contractDetail.shipping") }}</template>
245
+ <template slot="title">{{ $t('contractDetail.shipping') }}</template>
447
246
  <el-row v-if="channel !== 'official-website'" class="mb10">
448
247
  <el-col :span="2">
449
248
  <el-button type="primary" size="small" @click="handleShipmentStatus('shipped')">全部发货</el-button>
450
249
  </el-col>
451
250
  <el-col :span="2">
452
- <el-button
453
- type="primary"
454
- size="small"
455
- @click="handleShipmentStatus('arrived_port')"
456
- >全部到港</el-button>
251
+ <el-button type="primary" size="small" @click="handleShipmentStatus('arrived_port')">全部到港</el-button>
457
252
  </el-col>
458
253
  <el-col :span="2">
459
- <el-button
460
- type="primary"
461
- size="small"
462
- @click="handleShipmentStatus('delivered')"
463
- >全部到货</el-button>
254
+ <el-button type="primary" size="small" @click="handleShipmentStatus('delivered')">全部到货</el-button>
464
255
  </el-col>
465
256
  </el-row>
466
257
  <el-table :data="shipmentList" default-expand-all>
467
258
  <el-table-column type="expand" v-if="channel == 'official-website'">
468
259
  <template slot-scope="{ row }" v-if="row && row.claimList && row.claimList.length">
469
260
  <div class="claim-list">
470
- <div>
471
- {{ $t("contract.Claim_records") }}({{
472
- row.claimList.length
473
- }})
474
- </div>
475
- <div
476
- class="claim-report"
477
- v-for="(claimItem, index) in row.claimList"
478
- :key="index"
479
- >
261
+ <div>{{ $t('contract.Claim_records') }}({{ row.claimList.length }})</div>
262
+ <div class="claim-report" v-for="(claimItem, index) in row.claimList" :key="index">
480
263
  <div style="display: flex">
481
264
  <div class="claim-report-info-wrap">
482
- <div class="claim-report-info-wrap-item">
483
- {{ $t("contract.Claim_ID") }}:{{
484
- claimItem.claimNo
485
- }}
486
- </div>
487
- <div class="claim-report-info-wrap-item">
488
- {{ $t("contract.Claim_Type") }}:{{
489
- claimTypeFun(claimItem.type)
490
- }}
491
- </div>
492
- <div class="claim-report-info-wrap-item">
493
- {{ $t("contract.Claim_status") }}:{{
494
- claimStatusFun(claimItem.status)
495
- }}
496
- </div>
265
+ <div class="claim-report-info-wrap-item">{{ $t('contract.Claim_ID') }}:{{ claimItem.claimNo }}</div>
266
+ <div class="claim-report-info-wrap-item">{{ $t('contract.Claim_Type') }}:{{ claimTypeFun(claimItem.type) }}</div>
267
+ <div class="claim-report-info-wrap-item">{{ $t('contract.Claim_status') }}:{{ claimStatusFun(claimItem.status) }}</div>
497
268
  </div>
498
- <div
499
- style="width: 50px"
500
- class="view"
501
- @click.stop="viewFun(claimItem)"
502
- >{{ $t("contract.View") }}</div>
269
+ <div style="width: 50px" class="view" @click.stop="viewFun(claimItem)">{{ $t('contract.View') }}</div>
503
270
  </div>
504
271
  <div class="claim-report-info-wrap">
505
- <div class="claim-report-info-wrap-item">
506
- {{ $t("contract.create_time") }}:{{
507
- parseTime(claimItem.createTime)
508
- }}
509
- </div>
510
- <div class="claim-report-info-wrap-item">
511
- {{ $t("contract.commitTime") }}:{{
512
- parseTime(claimItem.commitTime)
513
- }}
514
- </div>
272
+ <div class="claim-report-info-wrap-item">{{ $t('contract.create_time') }}:{{ parseTime(claimItem.createTime) }}</div>
273
+ <div class="claim-report-info-wrap-item">{{ $t('contract.commitTime') }}:{{ parseTime(claimItem.commitTime) }}</div>
515
274
  </div>
516
275
  </div>
517
276
  </div>
518
277
  </template>
519
278
  </el-table-column>
520
- <el-table-column
521
- :label="$t('contractDetail.billOfLadingNo')"
522
- align="center"
523
- prop="billOfLadingNo"
524
- width="130"
525
- >
279
+ <el-table-column :label="$t('contractDetail.billOfLadingNo')" align="center" prop="billOfLadingNo" width="130">
526
280
  <template slot-scope="scope">
527
- <el-button
528
- type="text"
529
- @click="openShipmentDetail(scope.row)"
530
- >{{ scope.row.billOfLadingNo }}</el-button>
281
+ <el-button type="text" @click="openShipmentDetail(scope.row)">{{ scope.row.billOfLadingNo }}</el-button>
531
282
  </template>
532
283
  </el-table-column>
533
284
  <el-table-column :label="$t('contractDetail.conrainerNo')" align="center" width="130">
534
285
  <template slot-scope="{ row }">
535
- <div style="white-space: pre-line !important">{{ row.containerNoList.join("\n") }}</div>
286
+ <div style="white-space: pre-line !important">{{ row.containerNoList.join('\n') }}</div>
536
287
  </template>
537
288
  </el-table-column>
538
- <el-table-column
539
- :label="$t('contractDetail.shipmentStatus')"
540
- align="center"
541
- width="130"
542
- >
289
+ <el-table-column :label="$t('contractDetail.shipmentStatus')" align="center" width="130">
543
290
  <template slot-scope="scope">
544
291
  <dict-tag :options="dict.type.shipment_status" :value="scope.row.shipmentStatus" />
545
292
  </template>
546
293
  </el-table-column>
547
- <el-table-column
548
- :label="$t('contractDetail.chargingStatus')"
549
- align="center"
550
- width="130"
551
- >
294
+ <el-table-column :label="$t('contractDetail.chargingStatus')" align="center" width="130">
552
295
  <template slot-scope="scope">
553
296
  <dict-tag :options="dict.type.charging_status" :value="scope.row.chargingStatus" />
554
297
  </template>
555
298
  </el-table-column>
556
- <el-table-column
557
- :label="$t('contractDetail.destination')"
558
- align="center"
559
- prop="destinationPort"
560
- width="150"
561
- />
299
+ <el-table-column :label="$t('contractDetail.destination')" align="center" prop="destinationPort" width="150" />
562
300
  <el-table-column label="ETD" align="center" prop="etd" width="180">
563
301
  <template slot-scope="scope">
564
- <span>{{ parseTime(scope.row.etd, "{y}-{m}-{d}") }}</span>
302
+ <span>{{ parseTime(scope.row.etd, '{y}-{m}-{d}') }}</span>
565
303
  </template>
566
304
  </el-table-column>
567
305
  <el-table-column label="ETA" align="center" prop="eta" width="180">
568
306
  <template slot-scope="scope">
569
- <span>{{ parseTime(scope.row.eta, "{y}-{m}-{d}") }}</span>
307
+ <span>{{ parseTime(scope.row.eta, '{y}-{m}-{d}') }}</span>
570
308
  </template>
571
309
  </el-table-column>
572
- <el-table-column
573
- v-if="channel !== 'official-website'"
574
- label="实际到港日"
575
- align="center"
576
- prop="actualArrivalDate"
577
- width="180"
578
- >
310
+ <el-table-column v-if="channel !== 'official-website'" label="实际到港日" align="center" prop="actualArrivalDate" width="180">
579
311
  <template slot-scope="scope">
580
312
  <span>
581
- {{
582
- parseTime(scope.row.actualArrivalDate, "{y}-{m}-{d}")
583
- }}
313
+ {{ parseTime(scope.row.actualArrivalDate, '{y}-{m}-{d}') }}
584
314
  </span>
585
315
  </template>
586
316
  </el-table-column>
587
317
 
588
- <el-table-column
589
- label="对应合同"
590
- align="center"
591
- width="160px"
592
- v-if="channel !== 'official-website'"
593
- >
318
+ <el-table-column label="对应合同" align="center" width="160px" v-if="channel !== 'official-website'">
594
319
  <template slot-scope="scope">
595
320
  <span v-if="contract.contract == 'sale'">
596
- <el-button
597
- type="text"
598
- @click="viewContractDetail(scope.row.saleContractNo)"
599
- >{{ scope.row.saleContractNo }}</el-button>
321
+ <el-button type="text" @click="viewContractDetail(scope.row.saleContractNo)">{{ scope.row.saleContractNo }}</el-button>
600
322
  </span>
601
323
  <span v-else>
602
- <el-button
603
- type="text"
604
- @click="viewContractDetail(scope.row.purchaseContractNo)"
605
- >{{ scope.row.purchaseContractNo }}</el-button>
324
+ <el-button type="text" @click="viewContractDetail(scope.row.purchaseContractNo)">{{ scope.row.purchaseContractNo }}</el-button>
606
325
  </span>
607
326
  </template>
608
327
  </el-table-column>
609
328
 
610
- <el-table-column
611
- :label="$t('contractDetail.operate')"
612
- align="center"
613
- class-name="small-padding fixed-width"
614
- width="300px"
615
- >
329
+ <el-table-column :label="$t('contractDetail.operate')" align="center" class-name="small-padding fixed-width" width="300px">
616
330
  <template slot-scope="scope">
617
331
  <el-button
618
332
  v-if="channel == 'official-website'"
@@ -620,29 +334,23 @@
620
334
  type="primary"
621
335
  style="padding-left: 5px; padding-right: 5px"
622
336
  @click.stop="activeNameFun(scope.$index)"
623
- >{{ $t("contract.Track_Shipment") }}</el-button>
337
+ >{{ $t('contract.Track_Shipment') }}</el-button
338
+ >
624
339
  <!-- v-if="channel == 'official-website' && scope.row.showFallbackQuality" -->
625
340
  <el-button
626
- v-if="
627
- channel == 'official-website' &&
628
- scope.row.showFallbackQuality
629
- "
341
+ v-if="channel == 'official-website' && scope.row.showFallbackQuality"
630
342
  size="mini"
631
343
  type="primary"
632
344
  style="padding-left: 5px; padding-right: 5px"
633
345
  @click.stop="qualityFeedback(scope.row)"
634
- >{{ $t("contract.Quality_Feedback") }}</el-button>
346
+ >{{ $t('contract.Quality_Feedback') }}</el-button
347
+ >
635
348
  </template>
636
349
  </el-table-column>
637
350
  </el-table>
638
351
 
639
352
  <el-tabs v-model="activeName" type="card">
640
- <el-tab-pane
641
- v-for="(item, index) in shipmentList"
642
- :key="index"
643
- :name="index.toString()"
644
- :label="item.billOfLadingNo"
645
- >
353
+ <el-tab-pane v-for="(item, index) in shipmentList" :key="index" :name="index.toString()" :label="item.billOfLadingNo">
646
354
  <iframe :src="getGeekYumPage(item)" width="1100" height="600"></iframe>
647
355
  </el-tab-pane>
648
356
  </el-tabs>
@@ -656,26 +364,13 @@
656
364
  </template>
657
365
 
658
366
  <script>
659
- import { mapGetters } from 'vuex';
660
- import {
661
- getBizDealRecordByAskId,
662
- orderTracing,
663
- } from '../../../api/biz/bizDealRecord';
664
- import {
665
- getBizContract,
666
- getBizContractByNo,
667
- } from '../../../api/biz/bizContract';
668
- import {
669
- listBizInvoice,
670
- getInfoWithShipment,
671
- } from '../../../api/biz/bizInvoice';
672
- import {
673
- listBizShipment,
674
- getGeekYumToken,
675
- updateAllShipmentStatus,
676
- } from '../../../api/biz/bizShipment';
677
- import { listContainerWithInvoice } from '../../../api/biz/bizContainer';
678
- import ShipmentDetail from '../bizShipment/detail.vue';
367
+ import { mapGetters } from 'vuex'
368
+ import { getBizDealRecordByAskId, orderTracing } from '../../../api/biz/bizDealRecord'
369
+ import { getBizContract, getBizContractByNo } from '../../../api/biz/bizContract'
370
+ import { listBizInvoice, getInfoWithShipment } from '../../../api/biz/bizInvoice'
371
+ import { listBizShipment, getGeekYumToken, updateAllShipmentStatus } from '../../../api/biz/bizShipment'
372
+ import { listContainerWithInvoice } from '../../../api/biz/bizContainer'
373
+ import ShipmentDetail from '../bizShipment/detail.vue'
679
374
 
680
375
  export default {
681
376
  name: 'ContractSummary',
@@ -689,15 +384,15 @@ export default {
689
384
  'cmx_month',
690
385
  'contract_type',
691
386
  'shipment_status',
692
- 'charging_status',
387
+ 'charging_status'
693
388
  ],
694
389
  mixins: [],
695
390
  components: { ShipmentDetail },
696
391
  props: {
697
392
  channel: {
698
393
  type: String,
699
- default: '',
700
- },
394
+ default: ''
395
+ }
701
396
  },
702
397
  data() {
703
398
  return {
@@ -714,24 +409,24 @@ export default {
714
409
  preferredQuoteMethod: {
715
410
  fixed: {
716
411
  label: 'FIXED',
717
- labelZh: '固定价',
412
+ labelZh: '固定价'
718
413
  },
719
414
  lme_seller: {
720
415
  label: "LME(seller's option to fix)",
721
- labelZh: 'LME活价(卖家点价)',
416
+ labelZh: 'LME活价(卖家点价)'
722
417
  },
723
418
  lme_buyer: {
724
419
  label: "LME(buyer's option to fix)",
725
- labelZh: 'LME活价(买家点价)',
420
+ labelZh: 'LME活价(买家点价)'
726
421
  },
727
422
  cmx_buyer: {
728
423
  label: "CMX(seller's option to fix)",
729
- labelZh: 'CMX活价(卖家点价))',
424
+ labelZh: 'CMX活价(卖家点价))'
730
425
  },
731
426
  cmx_seller: {
732
427
  label: "CMX(buyer's option to fix)",
733
- labelZh: 'CMX活价(买家点价)',
734
- },
428
+ labelZh: 'CMX活价(买家点价)'
429
+ }
735
430
  },
736
431
  accessToken: '',
737
432
  claimList: [
@@ -769,30 +464,29 @@ export default {
769
464
  lastOperationTime: null,
770
465
  isDeleted: false,
771
466
  createTime: '2023-08-16T02:14:23',
772
- updateTime: '2023-08-16T10:14:27',
773
- },
467
+ updateTime: '2023-08-16T10:14:27'
468
+ }
774
469
  ],
775
- showPricing: false,
776
- };
470
+ showPricing: false
471
+ }
777
472
  },
778
473
  computed: {},
779
474
  watch: {},
780
475
  created() {
781
- const contractId = this.$route.params && this.$route.params.contractId;
782
- this.contractId = contractId;
783
- const deliveryStatus =
784
- this.$route.query && this.$route.query.deliveryStatus;
785
- this.deliveryStatus = deliveryStatus;
786
- const depositStatus = this.$route.query && this.$route.query.depositStatus;
787
- this.depositStatus = depositStatus;
788
- this.getData();
789
- this.getGeekYumToken();
476
+ const contractId = this.$route.params && this.$route.params.contractId
477
+ this.contractId = contractId
478
+ const deliveryStatus = this.$route.query && this.$route.query.deliveryStatus
479
+ this.deliveryStatus = deliveryStatus
480
+ const depositStatus = this.$route.query && this.$route.query.depositStatus
481
+ this.depositStatus = depositStatus
482
+ this.getData()
483
+ this.getGeekYumToken()
790
484
  },
791
485
  computed: {
792
486
  ...mapGetters(['language']),
793
487
  isChina() {
794
- return ['zh-CN', 'zh-TW', 'zh'].includes(this.language);
795
- },
488
+ return ['zh-CN', 'zh-TW', 'zh'].includes(this.language)
489
+ }
796
490
  },
797
491
  methods: {
798
492
  /**
@@ -804,19 +498,19 @@ export default {
804
498
  const claimTypeMap = {
805
499
  1: {
806
500
  cn: '重量索赔',
807
- en: 'Weight claim',
501
+ en: 'Weight claim'
808
502
  },
809
503
  2: {
810
504
  cn: '质量索赔',
811
- en: 'Quality claim',
505
+ en: 'Quality claim'
812
506
  },
813
507
  3: {
814
508
  cn: '重量索赔+质量索赔',
815
- en: 'Weight claim + Quality claim',
816
- },
817
- };
818
- const obj = claimTypeMap[type || '1'];
819
- return this.$store?.state.locale === 'en' ? obj.en : obj.cn;
509
+ en: 'Weight claim + Quality claim'
510
+ }
511
+ }
512
+ const obj = claimTypeMap[type || '1']
513
+ return this.$store?.state.locale === 'en' ? obj.en : obj.cn
820
514
  },
821
515
 
822
516
  /**
@@ -829,22 +523,22 @@ export default {
829
523
  1: {
830
524
  code: 1,
831
525
  cn: '待提交',
832
- en: 'Pending',
526
+ en: 'Pending'
833
527
  },
834
528
  2: {
835
529
  code: 2,
836
530
  en: 'In Progress',
837
- cn: '处理中',
531
+ cn: '处理中'
838
532
  },
839
533
  3: {
840
534
  code: 3,
841
535
  en: 'Completed',
842
- cn: '已结束',
843
- },
844
- };
845
- const obj = claimTypeMap[type || '1'];
536
+ cn: '已结束'
537
+ }
538
+ }
539
+ const obj = claimTypeMap[type || '1']
846
540
 
847
- return this.$store?.state.locale === 'en' ? obj.en : obj.cn;
541
+ return this.$store?.state.locale === 'en' ? obj.en : obj.cn
848
542
  },
849
543
 
850
544
  /**
@@ -852,127 +546,112 @@ export default {
852
546
  * @return {*}
853
547
  */
854
548
  qualityFeedback(row) {
855
- this.$buryingPoint({ data: { funcKey: 'click_feedback' } });
549
+ this.$buryingPoint({ data: { funcKey: 'click_feedback' } })
856
550
 
857
551
  this.$store.commit('setBillNoInfo', {
858
552
  eta: row.eta,
859
553
  billNo: row.billOfLadingNo,
860
- shipmentId: row.shipmentId,
861
- });
862
- this.$store.commit('setFeedbackDialogVisible', true);
554
+ shipmentId: row.shipmentId
555
+ })
556
+ this.$store.commit('setFeedbackDialogVisible', true)
863
557
  },
864
558
  viewFun(row) {
865
- this.$buryingPoint({ data: { funcKey: 'click_claim_edit' } });
559
+ this.$buryingPoint({ data: { funcKey: 'click_claim_edit' } })
866
560
  if (row.type === 1) {
867
561
  this.$router.push({
868
562
  path: '/claim-edit-weight',
869
563
  query: {
870
- claimId: row.id,
871
- },
872
- });
564
+ claimId: row.id
565
+ }
566
+ })
873
567
  }
874
568
 
875
569
  if (row.type === 2) {
876
570
  this.$router.push({
877
571
  path: '/claim-edit-quality',
878
572
  query: {
879
- claimId: row.id,
880
- },
881
- });
573
+ claimId: row.id
574
+ }
575
+ })
882
576
  }
883
577
 
884
578
  if (row.type === 3) {
885
579
  this.$router.push({
886
580
  path: '/claim-edit-both',
887
581
  query: {
888
- claimId: row.id,
889
- },
890
- });
582
+ claimId: row.id
583
+ }
584
+ })
891
585
  }
892
586
  },
893
587
  getCountryName(type) {
894
588
  if (type == 'loading') {
895
- return this.isChina
896
- ? this.dealRecord?.loadingCountryNameCn
897
- : this.dealRecord?.loadingCountryNameEn;
589
+ return this.isChina ? this.dealRecord?.loadingCountryNameCn : this.dealRecord?.loadingCountryNameEn
898
590
  } else {
899
- return this.isChina
900
- ? this.dealRecord?.originCountryNameCn
901
- : this.dealRecord?.originCountryNameEn;
591
+ return this.isChina ? this.dealRecord?.originCountryNameCn : this.dealRecord?.originCountryNameEn
902
592
  }
903
593
  },
904
594
  openShipmentDetail(row) {
905
- this.$refs.shipmentDetail.handleShow(row);
595
+ this.$refs.shipmentDetail.handleShow(row)
906
596
  },
907
597
  //查看合同详情
908
598
 
909
599
  viewContractDetail(contractNo) {
910
600
  getBizContractByNo(contractNo).then((res) => {
911
601
  this.$router.push({
912
- path: '/contract/tracing/detail/' + res.data.contractId,
913
- });
914
- });
602
+ path: '/contract/tracing/detail/' + res.data.contractId
603
+ })
604
+ })
915
605
  },
916
606
  //查看收付款列表
917
607
  viceDocuments() {
918
608
  this.$router.push({
919
609
  name: 'Documents',
920
- params: { contractNo: this.contract.contractNo },
921
- });
610
+ params: { contractNo: this.contract.contractNo }
611
+ })
922
612
  },
923
613
  //收起展开发票
924
614
  collectInvoice() {
925
- this.invoiceActive = !this.invoiceActive;
615
+ this.invoiceActive = !this.invoiceActive
926
616
  },
927
617
  //一键催款
928
618
  handleUrge(row) {
929
- const invoiceId = row.id;
619
+ const invoiceId = row.id
930
620
  if (row.invoiceSpecies == 'provision') {
931
621
  this.$confirm('该发票未点价,是否需要点价后再催款?', '点价确认', {
932
622
  distinguishCancelAndClose: true,
933
623
  confirmButtonText: '去点价',
934
624
  cancelButtonText: '直接催款',
935
- type: 'warning',
625
+ type: 'warning'
936
626
  })
937
627
  .then(() => {
938
628
  this.$router.push({
939
629
  name: 'Invoice',
940
- params: { invoiceNo: row.invoiceNo },
941
- });
630
+ params: { invoiceNo: row.invoiceNo }
631
+ })
942
632
  })
943
633
  .catch((action) => {
944
- action === 'cancel' ? this.copyCall(invoiceId) : '';
945
- });
634
+ action === 'cancel' ? this.copyCall(invoiceId) : ''
635
+ })
946
636
  } else {
947
- this.copyCall(invoiceId);
637
+ this.copyCall(invoiceId)
948
638
  }
949
639
  },
950
640
  //复制一键催款
951
641
  copyCall(invoiceId) {
952
642
  getInfoWithShipment(invoiceId).then((res) => {
953
- var invoice = res.data;
954
- const contractNo = invoice.contractNo || '待补充';
955
- const invoiceNoTitle =
956
- invoice.invoiceSpecies == 'provision'
957
- ? 'PROVISION INVOICE'
958
- : 'FIXED INVOICE' || '待补充';
959
- const invoiceNoTitleZh =
960
- invoice.invoiceSpecies == 'provision'
961
- ? '临时发票号'
962
- : '正式发票号' || '待补充';
963
- const invoiceNo = invoice.invoiceNo || '待补充';
964
- const value = invoice.amount || '待补充';
965
- const blNumber = invoice.billOfLadingNo || '待补充';
966
- const containerNo = invoice.containerNoList || '待补充';
967
- const eta = this.parseTime(invoice.eta, '{y}-{m}-{d}') || '待补充';
968
- const pod =
969
- (invoice.terminal ? invoice.terminal : '') + invoice?.destination;
970
- const askNames = invoice.containerDetailList
971
- .map((item) => item.askName)
972
- .join('/');
973
- const englishText = `更新时间 ${
974
- invoice.geekUpdateTime || invoice.shipmentCreateTime
975
- }
643
+ var invoice = res.data
644
+ const contractNo = invoice.contractNo || '待补充'
645
+ const invoiceNoTitle = invoice.invoiceSpecies == 'provision' ? 'PROVISION INVOICE' : 'FIXED INVOICE' || '待补充'
646
+ const invoiceNoTitleZh = invoice.invoiceSpecies == 'provision' ? '临时发票号' : '正式发票号' || '待补充'
647
+ const invoiceNo = invoice.invoiceNo || '待补充'
648
+ const value = invoice.amount || '待补充'
649
+ const blNumber = invoice.billOfLadingNo || '待补充'
650
+ const containerNo = invoice.containerNoList || '待补充'
651
+ const eta = this.parseTime(invoice.eta, '{y}-{m}-{d}') || '待补充'
652
+ const pod = (invoice.terminal ? invoice.terminal : '') + invoice?.destination
653
+ const askNames = invoice.containerDetailList.map((item) => item.askName).join('/')
654
+ const englishText = `更新时间 ${invoice.geekUpdateTime || invoice.shipmentCreateTime}
976
655
  Attention: Arrive notice. Please arrange the payment within 7 days after receiving this notice, in order to obtain telex BL and avoid unnecessary demurrage charges.
977
656
  TO: ${invoice.receiveCompanyName || '待补充'}
978
657
  Contract #: ${contractNo}
@@ -994,63 +673,55 @@ ${invoiceNoTitleZh}:${invoiceNo}
994
673
  预计到港:${eta}
995
674
  目的港: ${pod}
996
675
  品名: ${askNames}
997
- `;
676
+ `
998
677
 
999
678
  // 创建临时 <textarea> 元素,将链接写入其中
1000
- const textArea = document.createElement('textarea');
1001
- textArea.value = englishText;
679
+ const textArea = document.createElement('textarea')
680
+ textArea.value = englishText
1002
681
 
1003
- document.body.appendChild(textArea);
682
+ document.body.appendChild(textArea)
1004
683
 
1005
684
  // 选中并复制链接
1006
- textArea.select();
1007
- document.execCommand('copy');
685
+ textArea.select()
686
+ document.execCommand('copy')
1008
687
 
1009
688
  // 将 <textarea> 元素删除
1010
- document.body.removeChild(textArea);
1011
- this.$modal.msgSuccess('已复制到剪切板');
1012
- });
689
+ document.body.removeChild(textArea)
690
+ this.$modal.msgSuccess('已复制到剪切板')
691
+ })
1013
692
  },
1014
693
  //处理装运状态
1015
694
  handleShipmentStatus(status) {
1016
- let statusCn =
1017
- status == 'shipped'
1018
- ? '全部发货'
1019
- : status == 'arrived_port'
1020
- ? '全部到港'
1021
- : '全部到货';
695
+ let statusCn = status == 'shipped' ? '全部发货' : status == 'arrived_port' ? '全部到港' : '全部到货'
1022
696
 
1023
697
  this.$prompt('', '请填写手动' + statusCn + '的原因', {
1024
698
  confirmButtonText: '确定',
1025
699
  cancelButtonText: '取消',
1026
700
  inputType: 'textarea',
1027
- inputPlaceholder:
1028
- '请添加手动变为' +
1029
- statusCn +
1030
- '原因。填写后,可以在合同详情-备注里展示。',
701
+ inputPlaceholder: '请添加手动变为' + statusCn + '原因。填写后,可以在合同详情-备注里展示。'
1031
702
  })
1032
703
  .then(({ value }) => {
1033
704
  updateAllShipmentStatus({
1034
705
  contractId: this.contract.contractId,
1035
706
  shipmentStatus: status,
1036
- remark: value,
707
+ remark: value
1037
708
  }).then(() => {
1038
709
  this.$message({
1039
710
  type: 'success',
1040
- message: '变更成功',
1041
- });
1042
- this.getData();
1043
- });
711
+ message: '变更成功'
712
+ })
713
+ this.getData()
714
+ })
1044
715
  })
1045
716
  .catch((e) => {
1046
717
  this.$message({
1047
718
  type: 'info',
1048
- message: e,
1049
- });
1050
- });
719
+ message: e
720
+ })
721
+ })
1051
722
  },
1052
723
  getGeekYumPage(shipment) {
1053
- console.log(shipment);
724
+ console.log(shipment)
1054
725
  if (shipment.subNo) {
1055
726
  let url =
1056
727
  'https://tracking.geekyum.com/shipping/detail?bizNo=' +
@@ -1058,68 +729,49 @@ ${invoiceNoTitleZh}:${invoiceNo}
1058
729
  '&bizType=1&subNo=' +
1059
730
  shipment.subNo.toString() +
1060
731
  '&access_token=' +
1061
- this.accessToken;
1062
- url = url + (this.isChina ? '&lang=zh' : '&lang=en');
1063
- console.log(url);
1064
- return url;
732
+ this.accessToken
733
+ url = url + (this.isChina ? '&lang=zh' : '&lang=en')
734
+ console.log(url)
735
+ return url
1065
736
  }
1066
737
  },
1067
738
  getGeekYumToken() {
1068
739
  getGeekYumToken().then((res) => {
1069
- this.accessToken = res.msg;
1070
- });
740
+ this.accessToken = res.msg
741
+ })
1071
742
  },
1072
743
  getDays(date) {
1073
- const targetDate = new Date(date);
1074
- const currentDate = new Date();
744
+ const targetDate = new Date(date)
745
+ const currentDate = new Date()
1075
746
 
1076
747
  // 计算时间差,返回毫秒数
1077
- const timeDifference = currentDate.getTime() - targetDate.getTime();
748
+ const timeDifference = currentDate.getTime() - targetDate.getTime()
1078
749
 
1079
750
  // 将毫秒数转换为天数
1080
- const daysDifference = Math.ceil(timeDifference / (1000 * 60 * 60 * 24));
1081
- return daysDifference;
751
+ const daysDifference = Math.ceil(timeDifference / (1000 * 60 * 60 * 24))
752
+ return daysDifference
1082
753
  },
1083
754
  //是否超时
1084
755
  isOvertime(date, days) {
1085
- const targetDate = new Date(date);
1086
- const currentDate = new Date();
756
+ const targetDate = new Date(date)
757
+ const currentDate = new Date()
1087
758
 
1088
759
  // 添加14天
1089
- targetDate.setDate(targetDate.getDate() + days);
760
+ targetDate.setDate(targetDate.getDate() + days)
1090
761
 
1091
762
  if (targetDate < currentDate) {
1092
- return true;
763
+ return true
1093
764
  } else {
1094
- return false;
765
+ return false
1095
766
  }
1096
767
  },
1097
- getPreferredQuoteMethodLabel(val) {
1098
- var preferredQuote = val?.split(',');
1099
- if (preferredQuote) {
1100
- return preferredQuote
1101
- ?.map((i) => {
1102
- return this.isChina
1103
- ? this.preferredQuoteMethod[i]?.labelZh
1104
- : this.preferredQuoteMethod[i].label;
1105
- })
1106
- .join();
1107
- } else {
1108
- return '';
1109
- }
768
+ getPreferredQuoteMethodLabel(form) {
769
+ return form?.preferredQuoteMethod
1110
770
  },
1111
771
  getContractNos(contractList) {
1112
772
  return contractList?.map((i) => {
1113
- return (
1114
- i.contractNo +
1115
- ' ' +
1116
- this.selectDictLabelMapFun(
1117
- this.dict.type.contract_status,
1118
- i.contractStatus
1119
- ) +
1120
- ';'
1121
- );
1122
- });
773
+ return i.contractNo + ' ' + this.selectDictLabelMapFun(this.dict.type.contract_status, i.contractStatus) + ';'
774
+ })
1123
775
  },
1124
776
 
1125
777
  /**
@@ -1130,26 +782,26 @@ ${invoiceNoTitleZh}:${invoiceNo}
1130
782
  */
1131
783
  selectDictLabelMapFun(contract_status, contractStatus) {
1132
784
  if (contractStatus == 'voided') {
1133
- return this.$t('contractDetail.voided');
785
+ return this.$t('contractDetail.voided')
1134
786
  } else if (contractStatus == 'signed') {
1135
- return this.$t('contractDetail.signed');
787
+ return this.$t('contractDetail.signed')
1136
788
  } else {
1137
- return this.$t('contractDetail.Pending_Confirmation');
789
+ return this.$t('contractDetail.Pending_Confirmation')
1138
790
  }
1139
791
  },
1140
792
  getData() {
1141
793
  getBizContract(this.contractId)
1142
794
  .then((res) => {
1143
- this.contract = res.data;
795
+ this.contract = res.data
1144
796
  })
1145
797
  .then(() => {
1146
798
  getBizDealRecordByAskId(this.contract.askId).then((response) => {
1147
- this.dealRecord = response.data;
799
+ this.dealRecord = response.data
1148
800
  this.dealRecord.dealRecordDetailList.map((item) => {
1149
801
  if (item.imageList) {
1150
- item.askCover = item.imageList.toString();
802
+ item.askCover = item.imageList.toString()
1151
803
  }
1152
- });
804
+ })
1153
805
 
1154
806
  if (this.dealRecord.askId && this.channel == 'official-website') {
1155
807
  orderTracing({ askId: this.dealRecord.askId })
@@ -1157,98 +809,98 @@ ${invoiceNoTitleZh}:${invoiceNo}
1157
809
  if (res.code == 200) {
1158
810
  res?.data?.contracts?.forEach((element) => {
1159
811
  if (element.showPricing) {
1160
- this.showPricing = true;
812
+ this.showPricing = true
1161
813
  }
1162
- });
814
+ })
1163
815
  }
1164
816
  })
1165
817
  .catch((err) => {
1166
- console.log(err);
1167
- });
818
+ console.log(err)
819
+ })
1168
820
  }
1169
- });
821
+ })
1170
822
  listBizInvoice({
1171
- contractId: this.contractId,
823
+ contractId: this.contractId
1172
824
  }).then((response) => {
1173
- this.invoiceList = response.rows;
1174
- });
1175
- var queryParams = {};
825
+ this.invoiceList = response.rows
826
+ })
827
+ var queryParams = {}
1176
828
  if (this.contract.contractType == 'sale') {
1177
- queryParams.saleContractId = this.contractId;
829
+ queryParams.saleContractId = this.contractId
1178
830
  } else {
1179
- queryParams.purchaseContractId = this.contractId;
831
+ queryParams.purchaseContractId = this.contractId
1180
832
  }
1181
833
  listContainerWithInvoice(queryParams).then((res) => {
1182
- var shipmentList = this.processData(res.rows);
1183
- this.shipmentList = shipmentList;
1184
- });
1185
- });
834
+ var shipmentList = this.processData(res.rows)
835
+ this.shipmentList = shipmentList
836
+ })
837
+ })
1186
838
  },
1187
839
  //数据处理
1188
840
  processData(data) {
1189
- const shipmentMap = {}; // 使用对象来存储shipmentId和containerNoList的映射
1190
- const processedData = [];
841
+ const shipmentMap = {} // 使用对象来存储shipmentId和containerNoList的映射
842
+ const processedData = []
1191
843
 
1192
844
  for (const item of data) {
1193
- const shipmentId = item.shipmentId;
845
+ const shipmentId = item.shipmentId
1194
846
 
1195
847
  // 如果shipmentId在shipmentMap中不存在,则初始化containerNoList为空数组
1196
848
  if (!shipmentMap.hasOwnProperty(shipmentId)) {
1197
849
  shipmentMap[shipmentId] = {
1198
850
  shipmentId: shipmentId,
1199
851
  containerNoList: [],
1200
- showFallbackQuality: false, // 默认为false
1201
- };
852
+ showFallbackQuality: false // 默认为false
853
+ }
1202
854
  }
1203
855
 
1204
856
  // 将containerNo添加到相应的shipmentId的containerNoList中
1205
- shipmentMap[shipmentId].containerNoList.push(item.containerNo);
857
+ shipmentMap[shipmentId].containerNoList.push(item.containerNo)
1206
858
 
1207
859
  // 如果showFallbackQuality为true,则将shipment的showFallbackQuality设置为true
1208
860
  if (item.showFallbackQuality === true) {
1209
- shipmentMap[shipmentId].showFallbackQuality = true;
861
+ shipmentMap[shipmentId].showFallbackQuality = true
1210
862
  }
1211
863
 
1212
864
  // 将其他需要保留的字段合并到shipmentMap中
1213
- Object.assign(shipmentMap[shipmentId], item);
865
+ Object.assign(shipmentMap[shipmentId], item)
1214
866
  }
1215
867
 
1216
868
  // 将shipmentMap中的值转换为数组形式并添加到processedData中
1217
869
  for (const key in shipmentMap) {
1218
870
  if (shipmentMap.hasOwnProperty(key)) {
1219
- processedData.push(shipmentMap[key]);
871
+ processedData.push(shipmentMap[key])
1220
872
  }
1221
873
  }
1222
- console.log('===processedData==', processedData);
1223
- return processedData;
874
+ console.log('===processedData==', processedData)
875
+ return processedData
1224
876
  },
1225
877
 
1226
878
  //获取合同信息
1227
879
  getContract(contractId) {
1228
880
  getBizContract(contractId).then((res) => {
1229
- this.contract = res.data;
1230
- });
881
+ this.contract = res.data
882
+ })
1231
883
  },
1232
884
  getDealRecord(askId) {
1233
885
  getBizDealRecordByAskId(askId).then((response) => {
1234
- this.dealRecord = response.data;
886
+ this.dealRecord = response.data
1235
887
  this.dealRecord.dealRecordDetailList.map((item) => {
1236
888
  if (item.imageList) {
1237
- item.askCover = item.imageList.toString();
889
+ item.askCover = item.imageList.toString()
1238
890
  }
1239
- });
1240
- });
891
+ })
892
+ })
1241
893
  },
1242
894
  activeNameFun(v) {
1243
- this.activeName = '' + v;
895
+ this.activeName = '' + v
1244
896
  },
1245
897
  openPriceFix() {
1246
- this.$buryingPoint({ data: { funcKey: 'click_fixprice_buyer' } });
1247
- this.$store.commit('setPriceFixAskId', this.contract.askId);
1248
- this.$store.commit('setFixPriceDialogVisible', true);
1249
- },
1250
- },
1251
- };
898
+ this.$buryingPoint({ data: { funcKey: 'click_fixprice_buyer' } })
899
+ this.$store.commit('setPriceFixAskId', this.contract.askId)
900
+ this.$store.commit('setFixPriceDialogVisible', true)
901
+ }
902
+ }
903
+ }
1252
904
  </script>
1253
905
 
1254
906
  <style scoped lang="scss">