doctor-admin-components 1.0.13-beta.2 → 1.0.13-beta.4

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.
@@ -521,7 +521,7 @@ export default {
521
521
  billInfoSummary: {
522
522
  type: Object,
523
523
  default: () => {
524
- return {}
524
+ return null
525
525
  }
526
526
  }
527
527
  },
@@ -967,7 +967,9 @@ export default {
967
967
  }
968
968
  })
969
969
  }
970
- } else {
970
+ }
971
+ if (this.billInfoSummary) {
972
+ alert('1111')
971
973
  this.addContainerRow()
972
974
  }
973
975
 
@@ -11,7 +11,7 @@
11
11
  <span v-else="contract.contractStatus === 'signed'">
12
12
  {{ $t('contractDetail.signed') }}
13
13
  </span>
14
- <span v-else>{{ $t('contractDetail.Pending_Confirmation') }}</span>
14
+ <span>{{ $t('contractDetail.Pending_Confirmation') }}</span>
15
15
  <!-- 作废 -->
16
16
  <!-- <dict-tag
17
17
  v-if="dict.type.contract_status == 'voided'"
@@ -2,22 +2,13 @@
2
2
  <div class="app-container">
3
3
  <div class="info" id="printPdf">
4
4
  <div class="type">
5
- {{
6
- contract.contractType == "sale"
7
- ? "Sales Contract"
8
- : "Purchase Contract"
9
- }}
5
+ {{ contract.contractType == 'sale' ? 'Sales Contract' : 'Purchase Contract' }}
10
6
  </div>
11
7
  <div class="title">TTYY INTERNATIONAL LIMITED</div>
12
- <div class="sub-title mb20">
13
- FLAT/RM 07, 12/F, CHEVALIER COMMERCIAL CENTRE 8, WANG HOI ROAD, KOWLOON
14
- BAY, KL, HONG KONG
15
- </div>
8
+ <div class="sub-title mb20">FLAT/RM 07, 12/F, CHEVALIER COMMERCIAL CENTRE 8, WANG HOI ROAD, KOWLOON BAY, KL, HONG KONG</div>
16
9
  <el-row class="mb10">
17
10
  <el-col :span="5">
18
- {{
19
- contract.contractType == "sale" ? "Sales Order #:" : "Purchase Order"
20
- }}
11
+ {{ contract.contractType == 'sale' ? 'Sales Order #:' : 'Purchase Order' }}
21
12
  </el-col>
22
13
  <el-col :span="7">{{ contract.contractNo }}</el-col>
23
14
  <el-col :span="5">{{ `Reference#: ${contract.reference}` }}</el-col>
@@ -53,12 +44,7 @@
53
44
  <el-table-column label="Quantity" align="center" prop="weight">
54
45
  <template slot-scope="scope">{{ scope.row.weight }}MT</template>
55
46
  </el-table-column>
56
- <el-table-column
57
- v-if="contract.quoteType == 'FIXED'"
58
- label="Unit Price/MT"
59
- align="center"
60
- width="200"
61
- >
47
+ <el-table-column v-if="contract.quoteType == 'FIXED'" label="Unit Price/MT" align="center" width="200">
62
48
  <template slot-scope="{ row }">
63
49
  <span v-if="contract.contractType == 'sale'">${{ row.quotePrice }}</span>
64
50
  <span v-else>${{ row.sllerPrice }}</span>
@@ -66,34 +52,19 @@
66
52
  </el-table-column>
67
53
 
68
54
  <!-- CMX 都显示 -->
69
- <el-table-column
70
- v-if="contract.quoteType == 'CMX'"
71
- label="Unit Price/MT"
72
- align="center"
73
- width="200"
74
- >
55
+ <el-table-column v-if="isCmx(contract.quoteType)" label="Unit Price/MT" align="center" width="200">
75
56
  <template slot-scope="{ row }">
76
- <span v-if="contract.contractType == 'sale'">$(CMX-{{ row.quotePrice }})*2204.62</span>
77
- <span v-else>$(CMX-{{ row.sllerPrice }})*2204.62</span>
57
+ <span v-if="contract.contractType == 'sale'">{{ `$(${contract.quoteType}-${row.quotePrice})*2204.62` }}</span>
58
+ <span v-else>{{ `$(${contract.quoteType}-${row.sllerPrice})*2204.62` }}</span>
78
59
  </template>
79
60
  </el-table-column>
80
61
  <!-- LME -->
81
- <el-table-column
82
- v-if="contract.quoteType == 'LME'"
83
- label="Unit Price/MT"
84
- align="center"
85
- width="200"
86
- >
62
+ <el-table-column v-if="isLme(contract.quoteType)" label="Unit Price/MT" align="center" width="200">
87
63
  <template slot-scope="{ row }">
88
- <span v-if="contract.contractType == 'sale'">$(LME 3M *{{ row.quotePrice }}%)</span>
89
- <span v-else>$(LME 3M *{{ row.sllerPrice }}%)</span>
64
+ <span v-if="contract.contractType == 'sale'">{{ ` $(${contract.quoteType} *${row.quotePrice}%) ` }}</span>
65
+ <span v-else>{{ `$(${contract.quoteType} *${row.sllerPrice}%)` }}</span>
90
66
  </template>
91
67
  </el-table-column>
92
-
93
- <!-- CMX 都显示 CMX Month-->
94
- <el-table-column v-if="contract.quoteType == 'CMX'" label="CMX Month" align="center">
95
- <template slot-scope="scope">{{ scope.row.cmxMonth }}</template>
96
- </el-table-column>
97
68
  <el-table-column label="Service fee/MT" align="center">
98
69
  <template slot-scope="scope">${{ scope.row.serviceFee }}</template>
99
70
  </el-table-column>
@@ -101,74 +72,21 @@
101
72
  <!-- 采购合同 FIXED -->
102
73
  <el-table-column label="Net Unit Price/MT" align="center">
103
74
  <template slot-scope="scope">
104
- <span
105
- v-if="
106
- contract.quoteType == 'FIXED' &&
107
- contract.contractType == 'purchase'
108
- "
109
- >
110
- {{
111
- "$" + (scope.row.sllerPrice - Number(scope.row.serviceFee))
112
- }}
75
+ <span v-if="contract.quoteType == 'FIXED' && contract.contractType == 'purchase'">{{ '$' + (scope.row.sllerPrice - Number(scope.row.serviceFee)) }}</span>
76
+ <span v-else-if="contract.quoteType == 'FIXED' && contract.contractType == 'sale'">
77
+ {{ '$' + (Number(scope.row.quotePrice) + Number(scope.row.serviceFee)) }}
113
78
  </span>
114
- <span
115
- v-else-if="
116
- contract.quoteType == 'FIXED' &&
117
- contract.contractType == 'sale'
118
- "
119
- >
120
- {{
121
- "$" +
122
- (Number(scope.row.quotePrice) +
123
- Number(scope.row.serviceFee))
124
- }}
79
+ <span v-else-if="isLme(contract.quoteType) && contract.contractType == 'purchase'">
80
+ {{ '$(' + contract.quoteType + ' * ' + scope.row.sllerPrice + '%) - $' + Number(scope.row.serviceFee) }}
125
81
  </span>
126
- <span
127
- v-else-if="
128
- contract.quoteType == 'LME' &&
129
- contract.contractType == 'purchase'
130
- "
131
- >
132
- {{
133
- "$(LME 3M * " +
134
- scope.row.sllerPrice +
135
- "%) - $" +
136
- Number(scope.row.serviceFee)
137
- }}
82
+ <span v-else-if="isLme(contract.quoteType) && contract.contractType == 'sale'">
83
+ {{ '$(' + contract.quoteType + ' * ' + scope.row.quotePrice + '%) + $' + Number(scope.row.serviceFee) }}
138
84
  </span>
139
- <span
140
- v-else-if="
141
- contract.quoteType == 'LME' &&
142
- contract.contractType == 'sale'
143
- "
144
- >
145
- {{
146
- "$(LME 3M * " +
147
- scope.row.quotePrice +
148
- "%) + $" +
149
- Number(scope.row.serviceFee)
150
- }}
151
- </span>
152
- <span
153
- v-else-if="
154
- contract.quoteType == 'CMX' &&
155
- contract.contractType == 'purchase'
156
- "
157
- >
158
- {{
159
- "${(CMX-" +
160
- scope.row.sllerPrice +
161
- ")*2204.62} - $" +
162
- Number(scope.row.serviceFee)
163
- }}
85
+ <span v-else-if="isCmx(contract.quoteType) && contract.contractType == 'purchase'">
86
+ {{ '${(' + contract.quoteType + '-' + scope.row.sllerPrice + ')*2204.62} - $' + Number(scope.row.serviceFee) }}
164
87
  </span>
165
88
  <span v-else>
166
- {{
167
- "${(CMX-" +
168
- scope.row.quotePrice +
169
- ")*2204.62} + $" +
170
- Number(scope.row.serviceFee)
171
- }}
89
+ {{ '${(' + contract.quoteType + '-' + scope.row.quotePrice + ')*2204.62} + $' + Number(scope.row.serviceFee) }}
172
90
  </span>
173
91
  </template>
174
92
  </el-table-column>
@@ -180,25 +98,15 @@
180
98
  <el-descriptions-item label="Service Fee">{{ contract.serviceFee }}</el-descriptions-item>
181
99
  <el-descriptions-item label="Freight Terms">{{ contract.freightTerms }}</el-descriptions-item>
182
100
  <el-descriptions-item label="Payment Terms">
183
- <div
184
- v-if="(contract.balanceDays || contract.balanceDays == 0)
185
- && contract.balance && contract.balancePaymentType && contract.balancePaymentForm"
186
- >
187
- <span v-if="contract.deposit">
188
- Deposit ratio {{ contract.deposit }}%
189
- {{ contract.depositDays }} days
190
- {{ contract.depositPaymentForm }} and
191
- </span>
192
- {{ contract.balance }}%
193
- balance {{ contract.balancePaymentType }} paid
194
- {{ contract.balanceDays }} days {{ contract.balancePaymentForm }}
101
+ <div v-if="(contract.balanceDays || contract.balanceDays == 0) && contract.balance && contract.balancePaymentType && contract.balancePaymentForm">
102
+ <span v-if="contract.deposit"> Deposit ratio {{ contract.deposit }}% {{ contract.depositDays }} days {{ contract.depositPaymentForm }} and </span>
103
+ {{ contract.balance }}% balance {{ contract.balancePaymentType }} paid {{ contract.balanceDays }} days {{ contract.balancePaymentForm }}
195
104
  {{ contract.otherPaymentTerm }}
196
105
  </div>
197
106
  <div v-else>{{ contract.otherPaymentTerm }}</div>
198
107
  </el-descriptions-item>
199
108
  <el-descriptions-item label="Price Fixing Option">
200
- {{ contract.livePriceDays }} Days {{ contract.livePriceForm }} cargo
201
- arrives at POD in
109
+ {{ contract.livePriceDays }} Days {{ contract.livePriceForm }} cargo arrives at POD in
202
110
  {{ contract.livePriceUsertype }}
203
111
  {{ contract.livePriceType }}'s option
204
112
  </el-descriptions-item>
@@ -216,31 +124,18 @@
216
124
  More or less &lt; {{ contract.toleranceFloat * 100 }}%
217
125
  <br />
218
126
  </el-descriptions-item>
219
- <el-descriptions-item label="Latest shipment">
220
- within {{ contract.latestShipment }} days of the contract signed
221
- date
222
- </el-descriptions-item>
127
+ <el-descriptions-item label="Latest shipment"> within {{ contract.latestShipment }} days of the contract signed date </el-descriptions-item>
223
128
  <el-descriptions-item label="Required documents">
224
129
  <el-tag :key="tag" v-for="tag in dynamicTags" class="mr5">{{ tag }}</el-tag>
225
130
  </el-descriptions-item>
226
131
  <el-descriptions-item label="Weight Tolerance">{{ contract.weightTolerance }}%</el-descriptions-item>
227
132
 
228
- <el-descriptions-item
229
- label="Quality certificate"
230
- v-if="contract.qualityCertificateSwitch"
231
- >{{ contract.qualityCertificate }}</el-descriptions-item>
133
+ <el-descriptions-item label="Quality certificate" v-if="contract.qualityCertificateSwitch">{{ contract.qualityCertificate }}</el-descriptions-item>
232
134
  <el-descriptions-item label="Claim" v-if="contract.claimSwitch">{{ contract.claim }}</el-descriptions-item>
233
135
 
234
- <el-descriptions-item
235
- label="Arbitration"
236
- v-if="contract.arbitrationSwitch"
237
- >{{ contract.arbitration }}</el-descriptions-item>
136
+ <el-descriptions-item label="Arbitration" v-if="contract.arbitrationSwitch">{{ contract.arbitration }}</el-descriptions-item>
238
137
  <el-descriptions-item label="Memo " v-if="contract.memoSwitch">{{ contract.memo }}</el-descriptions-item>
239
- <el-descriptions-item
240
- v-for="(item, index) in this.customClause"
241
- :label="item.title"
242
- :key="index"
243
- >{{ item.content }}</el-descriptions-item>
138
+ <el-descriptions-item v-for="(item, index) in this.customClause" :label="item.title" :key="index">{{ item.content }}</el-descriptions-item>
244
139
  </el-descriptions>
245
140
  <div class="sign">Please sign below and return.</div>
246
141
  <el-row :gutter="20">
@@ -252,12 +147,10 @@
252
147
  </el-col>
253
148
  </el-row>
254
149
  <div class="company-sign-title">Company Name:</div>
255
- <div
256
- class="company-sign-text"
257
- >{{ contract.supplierContractCompany.companyEnglishName }}</div>
150
+ <div class="company-sign-text">{{ contract.supplierContractCompany.companyEnglishName }}</div>
258
151
  <div class="company-sign-title">Signature:</div>
259
152
  <div class="company-sign-title">Date:</div>
260
- <div class="company-sign-text">{{ parseTime(contract.createTime, "{m}/{d}/{y}") }}</div>
153
+ <div class="company-sign-text">{{ parseTime(contract.createTime, '{m}/{d}/{y}') }}</div>
261
154
  </div>
262
155
  </el-col>
263
156
  <el-col :span="12">
@@ -271,15 +164,12 @@
271
164
  <div class="company-sign-text">{{ contract.buyContractCompany.companyEnglishName }}</div>
272
165
  <div class="company-sign-title">Signature:</div>
273
166
  <div class="company-sign-title">Date:</div>
274
- <div class="company-sign-text">{{ parseTime(contract.createTime, "{m}/{d}/{y}") }}</div>
167
+ <div class="company-sign-text">{{ parseTime(contract.createTime, '{m}/{d}/{y}') }}</div>
275
168
  </div>
276
169
  </el-col>
277
170
  </el-row>
278
171
  </div>
279
- <div style="margin-left: 100px; margin-top: 20px">
280
- FLAT/RM 07, 12/F, CHEVALIER COMMERCIAL CENTRE 8, WANG HOI ROAD, KOWLOON
281
- BAY, KL, HONG KONG
282
- </div>
172
+ <div style="margin-left: 100px; margin-top: 20px">FLAT/RM 07, 12/F, CHEVALIER COMMERCIAL CENTRE 8, WANG HOI ROAD, KOWLOON BAY, KL, HONG KONG</div>
283
173
  </div>
284
174
  <div class="footer" v-if="!printModel">
285
175
  <el-button type="primary" @click="handleExportPdf()">Export ( PDF format)</el-button>
@@ -287,8 +177,8 @@
287
177
  </div>
288
178
  </template>
289
179
 
290
- <script>
291
- import { exportPdf } from '../../../utils/pdf';
180
+ <script>
181
+ import { exportPdf } from '../../../utils/pdf'
292
182
 
293
183
  export default {
294
184
  name: 'ContractPdf',
@@ -298,30 +188,30 @@ export default {
298
188
  default: {
299
189
  buyerCompanyInfo: {
300
190
  companyEnglishName: '',
301
- address: '',
191
+ address: ''
302
192
  },
303
193
  buyContractCompanyId: null,
304
194
  buyContractCompany: { companyEnglishName: '', address: '' },
305
195
  supplierContractCompanyId: null,
306
196
  supplierContractCompany: {
307
197
  companyEnglishName: '',
308
- address: '',
198
+ address: ''
309
199
  },
310
200
  sellerCompanyInfo: {
311
201
  companyEnglishName: '',
312
- address: '',
202
+ address: ''
313
203
  },
314
- contractDetailList: [],
315
- },
204
+ contractDetailList: []
205
+ }
316
206
  },
317
207
  dynamicTags: {
318
208
  type: Array,
319
- default: () => [],
209
+ default: () => []
320
210
  },
321
211
  customClause: {
322
212
  type: Array,
323
- default: () => [],
324
- },
213
+ default: () => []
214
+ }
325
215
  },
326
216
  components: {},
327
217
  data() {
@@ -350,63 +240,63 @@ export default {
350
240
  countryDictList: [],
351
241
  //表单
352
242
  objectionForm: {
353
- objection: '',
243
+ objection: ''
354
244
  },
355
245
  objection: '',
356
- printModel: false,
357
- };
246
+ printModel: false
247
+ }
358
248
  },
359
249
  created() {},
360
250
  methods: {
361
251
  //设置打印model为true
362
252
  setPrintModel(val) {
363
- this.printModel = val;
364
- return Promise.resolve();
253
+ this.printModel = val
254
+ return Promise.resolve()
365
255
  },
366
256
  /** 下载合同 */
367
257
  handleExportPdf() {
368
258
  this.setPrintModel(true)
369
259
  .then(() => {
370
- exportPdf('.info', 'contract-No-' + this.contract.contractNo);
260
+ exportPdf('.info', 'contract-No-' + this.contract.contractNo)
371
261
  })
372
262
  .then(() => {
373
- this.printModel = false;
374
- });
263
+ this.printModel = false
264
+ })
375
265
  },
376
266
  getSummaries(param) {
377
- const { columns, data } = param;
378
- const sums = [];
267
+ const { columns, data } = param
268
+ const sums = []
379
269
  columns.forEach((column, index) => {
380
270
  if (index === 0) {
381
- sums[index] = 'Total';
382
- return;
271
+ sums[index] = 'Total'
272
+ return
383
273
  }
384
- const values = data.map((item) => Number(item[column.property]));
274
+ const values = data.map((item) => Number(item[column.property]))
385
275
  if (!values.every((value) => isNaN(value))) {
386
276
  sums[index] = values.reduce((prev, curr) => {
387
- const value = Number(curr);
277
+ const value = Number(curr)
388
278
  if (!isNaN(value)) {
389
- return prev + curr;
279
+ return prev + curr
390
280
  } else {
391
- return prev;
281
+ return prev
392
282
  }
393
- }, 0);
283
+ }, 0)
394
284
  if (index === 1) {
395
- sums[index] += 'MT';
285
+ sums[index] += 'MT'
396
286
  } else {
397
- sums[index] += '';
287
+ sums[index] += ''
398
288
  }
399
289
  } else {
400
- sums[index] = '';
290
+ sums[index] = ''
401
291
  }
402
- });
292
+ })
403
293
 
404
- return sums;
405
- },
406
- },
407
- };
294
+ return sums
295
+ }
296
+ }
297
+ }
408
298
  </script>
409
- <style lang="scss" scoped>
299
+ <style lang="scss" scoped>
410
300
  .app-container {
411
301
  padding: 0 20px;
412
302
 
@@ -828,8 +828,8 @@ export default {
828
828
  const claimTypeMap = {
829
829
  1: {
830
830
  code: 1,
831
- cn: '待生成',
832
- en: 'To be generated',
831
+ cn: '待提交',
832
+ en: 'Pending',
833
833
  },
834
834
  2: {
835
835
  code: 2,