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
@@ -0,0 +1,459 @@
1
+ <template>
2
+ <div :class="wrapper">
3
+ <template v-if="type !== 'mobile'">
4
+ <label>
5
+ <select @change="getCities" v-model="currentProvince" :disabled="disabled || provinceDisabled">
6
+ <option :value="placeholders.province">{{ placeholders.province }}</option>
7
+ <option
8
+ v-for="(item, index) in provinces"
9
+ :value="item"
10
+ :key="index"
11
+ >
12
+ {{ item }}
13
+ </option>
14
+ </select>
15
+ </label>
16
+ <template v-if="!onlyProvince">
17
+ <label>
18
+ <select
19
+ @change="getAreas"
20
+ v-model="currentCity"
21
+ :disabled="disabled || cityDisabled"
22
+ >
23
+ <option :value="placeholders.city">{{ placeholders.city }}</option>
24
+ <option
25
+ v-for="(item, index) in cities"
26
+ :value="item"
27
+ :key="index"
28
+ >
29
+ {{ item }}
30
+ </option>
31
+ </select>
32
+ </label>
33
+ <label>
34
+ <select v-if="!hideArea" v-model="currentArea" :disabled="disabled || areaDisabled">
35
+ <option :value="placeholders.area">{{ placeholders.area }}</option>
36
+ <option v-for="(item, index) in areas "
37
+ :value="item"
38
+ :key="index">
39
+ {{ item }}
40
+ </option>
41
+ </select>
42
+ </label>
43
+ </template>
44
+ </template>
45
+ <template v-else>
46
+ <div :class="addressHeader">
47
+ <ul>
48
+ <li :class="{'active': tab === 1}" @click="resetProvince">{{ currentProvince && !staticPlaceholder ? currentProvince : placeholders.province }}</li>
49
+ <template v-if="!onlyProvince">
50
+ <li v-if="showCityTab" :class="{'active': tab === 2}" @click="resetCity">{{ currentCity && !staticPlaceholder ? currentCity : placeholders.city }}</li>
51
+ <li v-if="showAreaTab && !hideArea" :class="{'active': tab === 3}">{{ currentArea && !staticPlaceholder ? currentArea : placeholders.area }}</li>
52
+ </template>
53
+ </ul>
54
+ </div>
55
+ <div :class="addressContainer">
56
+ <ul v-if="tab === 1">
57
+ <li v-for="(item, index) in provinces"
58
+ :class="{'active': item === currentProvince}"
59
+ @click="chooseProvince(item)"
60
+ :key="index">
61
+ {{ item }}
62
+ </li>
63
+ </ul>
64
+ <template v-if="!onlyProvince">
65
+ <ul v-if="tab === 2">
66
+ <li v-for="(item, index) in cities"
67
+ :class="{'active': item === currentCity}"
68
+ @click="chooseCity(item)"
69
+ :key="index">
70
+ {{ item }}
71
+ </li>
72
+ </ul>
73
+ <ul v-if="tab === 3 && !hideArea">
74
+ <li v-for="(item, index) in areas"
75
+ :class="{'active': item === currentArea}"
76
+ @click="chooseArea(item)"
77
+ :key="index">
78
+ {{ item }}
79
+ </li>
80
+ </ul>
81
+ </template>
82
+ </div>
83
+ </template>
84
+ </div>
85
+ </template>
86
+
87
+ <script>
88
+ import DISTRICTS from './districts';
89
+
90
+ const DEFAULT_CODE = 100000;
91
+
92
+ export default {
93
+ name: 'VDistpicker',
94
+ props: {
95
+ province: { type: [String, Number], default: '' },
96
+ city: { type: [String, Number], default: '' },
97
+ area: { type: [String, Number], default: '' },
98
+ type: { type: String, default: '' },
99
+ hideArea: { type: Boolean, default: false },
100
+ onlyProvince: { type: Boolean, default: false },
101
+ staticPlaceholder: { type: Boolean, default: false },
102
+ placeholders: {
103
+ type: Object,
104
+ default() {
105
+ return {
106
+ province: this.$t('distpicker.province'),
107
+ city: this.$t('distpicker.city'),
108
+ area: this.$t('distpicker.area')
109
+ }
110
+ }
111
+ },
112
+ districts: {
113
+ type: [Array, Object],
114
+ default() {
115
+ return DISTRICTS
116
+ }
117
+ },
118
+ disabled: { type: Boolean, default: false },
119
+ provinceDisabled: { type: Boolean, default: false },
120
+ cityDisabled: { type: Boolean, default: false },
121
+ areaDisabled: { type: Boolean, default: false },
122
+ addressHeader: { type: String, default: 'address-header' },
123
+ addressContainer: { type: String, default: 'address-container' },
124
+ wrapper: { type: String, default: 'distpicker-address-wrapper' },
125
+ },
126
+ data() {
127
+ return {
128
+ tab: 1,
129
+ showCityTab: false,
130
+ showAreaTab: false,
131
+ provinces: [],
132
+ cities: [],
133
+ areas: [],
134
+ currentProvince: this.determineType(this.province) || this.placeholders.province,
135
+ currentCity: this.determineType(this.city) || this.placeholders.city,
136
+ currentArea: this.determineType(this.area) || this.placeholders.area,
137
+ }
138
+ },
139
+ created() {
140
+ if (this.type !== 'mobile') {
141
+ this.provinces = this.getDistricts()
142
+ this.cities = this.province ? this.getDistricts(this.getAreaCode(this.determineType(this.province))) : []
143
+ let directCity= this.isDirectCity(this.province,this.city)
144
+ this.areas = this.city ? this.getDistricts(this.getAreaCode(this.determineType(this.city), directCity ? this.determineType(this.city) : this.area, 'city')) : []
145
+ } else {
146
+ if (this.area && !this.hideArea && !this.onlyProvince) {
147
+ this.tab = 3
148
+ this.showCityTab = true
149
+ this.showAreaTab = true
150
+ let directCity= this.isDirectCity(this.province,this.city)
151
+ this.areas = this.getDistricts(this.getAreaCode(this.determineType(this.city), directCity ? this.determineType(this.city) : this.area, 'city'))
152
+ } else if (this.city && this.hideArea && !this.onlyProvince) {
153
+ this.tab = 2
154
+ this.showCityTab = true
155
+ this.cities = this.getDistricts(this.getAreaCode(this.determineType(this.province)))
156
+ } else {
157
+ this.provinces = this.getDistricts()
158
+ }
159
+ }
160
+ },
161
+ watch: {
162
+ currentProvince(vaule) {
163
+ this.$emit('province', this.setData(vaule, 'province'))
164
+
165
+ if (this.onlyProvince) {
166
+ this.emit('selected')
167
+ }
168
+ },
169
+ currentCity(value) {
170
+ this.$emit('city', this.setData(value, 'city', this.currentProvince))
171
+
172
+ if (value != this.placeholders.city && this.hideArea) {
173
+ this.emit('selected')
174
+ }
175
+ },
176
+ currentArea(value) {
177
+ this.$emit('area', this.setData(value, 'area', this.currentProvince, true))
178
+
179
+ if (value != this.placeholders.area) {
180
+ this.emit('selected')
181
+ }
182
+ },
183
+ province(value) {
184
+ this.currentProvince = this.province || this.placeholders.province
185
+ this.cities = this.determineValue('province', this.currentProvince, this.placeholders.province)
186
+ },
187
+ city(value) {
188
+ this.currentCity = this.city || this.placeholders.city
189
+ this.areas = this.determineValue('city', this.currentCity, this.placeholders.city, this.currentProvince)
190
+ },
191
+ area(value) {
192
+ this.currentArea = this.area || this.placeholders.area
193
+ },
194
+ },
195
+ methods: {
196
+ setData(value, type, check = '', isArea = false) {
197
+ let code
198
+
199
+ if (isArea) {
200
+ code = this.getCodeByArea(value)
201
+ } else {
202
+ code = this.getAreaCode(value, check, type)
203
+ }
204
+
205
+ return {
206
+ code: code,
207
+ value: value,
208
+ }
209
+ },
210
+ getCodeByArea(value) {
211
+ let areas_map = {};
212
+ let arr_keys = Object.keys(this.areas);
213
+ for (let i = 0; i < arr_keys.length; i++) {
214
+ let arr_key = arr_keys[i];
215
+ let arr_value = this.areas[arr_key];
216
+ areas_map[arr_value] = arr_key;
217
+ }
218
+ return areas_map[value];
219
+ },
220
+ emit(name) {
221
+ let data = {
222
+ province: this.setData(this.currentProvince, 'province')
223
+ }
224
+
225
+ if (!this.onlyProvince) {
226
+ this.$set(data, 'city', this.setData(this.currentCity, 'city', this.currentProvince))
227
+ }
228
+
229
+ if (!this.onlyProvince || this.hideArea) {
230
+ this.$set(data, 'area', this.setData(this.currentArea, 'area', this.currentProvince, true))
231
+ }
232
+
233
+ this.$emit(name, data)
234
+ },
235
+ getCities() {
236
+ this.currentCity = this.placeholders.city
237
+ this.currentArea = this.placeholders.area
238
+ this.cities = this.determineValue('province', this.currentProvince, this.placeholders.province)
239
+ this.cleanList('areas')
240
+ if (this.cities.length === 0) {
241
+ this.emit('selected')
242
+ this.tab = 1
243
+ this.showCityTab = false
244
+ }
245
+ },
246
+ getAreas() {
247
+ this.currentArea = this.placeholders.area
248
+ this.areas = this.determineValue('city', this.currentCity, this.placeholders.city, this.currentProvince)
249
+ if (this.areas.length === 0) {
250
+ this.emit('selected')
251
+ this.tab = 2
252
+ this.showAreaTab = false
253
+ }
254
+ },
255
+ resetProvince() {
256
+ this.tab = 1
257
+ this.provinces = this.getDistricts()
258
+ this.showCityTab = false
259
+ this.showAreaTab = false
260
+ },
261
+ resetCity() {
262
+ this.tab = 2
263
+ this.showCityTab = true
264
+ this.showAreaTab = false
265
+ this.getCities()
266
+ },
267
+ chooseProvince(name) {
268
+ this.currentProvince = name
269
+ if (this.onlyProvince) return
270
+ this.tab = 2
271
+ this.showCityTab = true
272
+ this.showAreaTab = false
273
+ this.getCities()
274
+ },
275
+ chooseCity(name) {
276
+ this.currentCity = name
277
+ if (this.hideArea) return
278
+ this.tab = 3
279
+ this.showCityTab = true
280
+ this.showAreaTab = true
281
+ this.getAreas()
282
+ },
283
+ chooseArea(name) {
284
+ this.currentArea = name
285
+ },
286
+ getAreaCodeByPreCode(name, preCode) {
287
+ let codes = []
288
+
289
+ for(let x in this.districts) {
290
+ for(let y in this.districts[x]) {
291
+ if(name === this.districts[x][y]) {
292
+ codes.push(y)
293
+ }
294
+ }
295
+ }
296
+
297
+ if (codes.length > 1) {
298
+ let index
299
+ codes.forEach((item, i) => {
300
+ if (preCode.length === 2 && item.slice(0, 2) === preCode || preCode.length === 4 && item.slice(0, 4) !== preCode) {
301
+ index = i
302
+ }
303
+ })
304
+
305
+ return codes[index]
306
+ } else {
307
+ return codes[0]
308
+ }
309
+ },
310
+ getAreaCode(name, check = '', type = '') {
311
+ for(let x in this.districts) {
312
+ for(let y in this.districts[x]) {
313
+ if(name === this.districts[x][y]) {
314
+ if (check.length > 0) {
315
+ let code = y
316
+
317
+ if (check) {
318
+ let preCode = type === 'city' ? this.getAreaCode(this.currentProvince).slice(0, 2) : y.slice(0, 2)
319
+
320
+ code = this.getAreaCodeByPreCode(name, preCode)
321
+ }
322
+
323
+ if (!code || y.slice(0, 2) !== code.slice(0, 2)) {
324
+ continue
325
+ } else {
326
+ return code
327
+ }
328
+ } else {
329
+ return y
330
+ }
331
+ }
332
+ }
333
+ }
334
+ },
335
+ getCodeValue(code) {
336
+ for(let x in this.districts) {
337
+ for(let y in this.districts[x]) {
338
+ if(code === parseInt(y)) {
339
+ return this.districts[x][y]
340
+ }
341
+ }
342
+ }
343
+ },
344
+ getDistricts(code = DEFAULT_CODE) {
345
+ return this.districts[code] || []
346
+ },
347
+ determineValue(type, currentValue, placeholderValue, check = '') {
348
+ if(currentValue === placeholderValue) {
349
+ return []
350
+ } else {
351
+ return this.getDistricts(this.getAreaCode(currentValue, check, type))
352
+ }
353
+ },
354
+ determineType(value) {
355
+ if(typeof value === 'number') {
356
+ return this.getCodeValue(value)
357
+ }
358
+
359
+ return value
360
+ },
361
+ cleanList(name) {
362
+ this[name] = []
363
+ },
364
+ isDirectCity(province,city) {
365
+ if( province && city ){
366
+ return this.determineType(this.province) === this.determineType(this.city)
367
+ }
368
+ return false
369
+ },
370
+ }
371
+ }
372
+ </script>
373
+
374
+ <style lang="scss" scoped>
375
+ .distpicker-address-wrapper {
376
+ color: #9caebf;
377
+ width: 600px;
378
+ @media screen and (max-width: 768px) {
379
+ width: 300px;
380
+ }
381
+
382
+ label {
383
+ margin-right:10px
384
+ }
385
+ select {
386
+ padding: .3rem .75rem;
387
+ height: 36px;
388
+ font-size: 1rem;
389
+ line-height: 36px;
390
+ color: #464a4c;
391
+ background-color: #fff;
392
+ background-image: none;
393
+ -webkit-background-clip: padding-box;
394
+ background-clip: padding-box;
395
+ border: 1px solid rgba(0,0,0,.15);
396
+ border-radius: .25rem;
397
+ -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
398
+ // transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
399
+ -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
400
+ // transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
401
+ transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
402
+
403
+ option {
404
+ font-weight: normal;
405
+ display: block;
406
+ white-space: pre;
407
+ min-height: 1.2em;
408
+ padding: 0 2px 1px;
409
+ }
410
+ }
411
+ ul {
412
+ margin: 0;
413
+ padding: 0;
414
+
415
+ li {
416
+ list-style: none;
417
+ }
418
+ }
419
+ .address-header {
420
+ background-color: #fff;
421
+
422
+ ul {
423
+ display: flex;
424
+ justify-content: space-around;
425
+ align-items: stretch;
426
+
427
+ li {
428
+ display: inline-block;
429
+ padding: 10px 10px 7px;
430
+
431
+ &.active {
432
+ border-bottom: #52697f solid 3px;
433
+ color: #52697f;
434
+ }
435
+ }
436
+ }
437
+ }
438
+ .address-container {
439
+ background-color: #fff;
440
+
441
+ ul {
442
+ height: 100%;
443
+ overflow: auto;
444
+
445
+ li {
446
+ padding: 8px 10px;
447
+ border-top: 1px solid #f6f6f6;
448
+
449
+ &.active {
450
+ color: #52697f;
451
+ }
452
+ }
453
+ }
454
+ }
455
+ }
456
+ .disabled-color{
457
+ background: #f8f8f8;
458
+ }
459
+ </style>