bxs-tools-ui 1.0.21 → 1.0.25
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.
- package/lib/business-card/index.js +2 -2
- package/lib/bxs-utils/index.js +4 -3
- package/lib/canvas-poster/index.js +2 -2
- package/lib/index.css +2 -2
- package/lib/index.js +101 -115
- package/lib/insure-calculate/index.css +1 -1
- package/lib/insure-calculate/index.js +31 -61
- package/lib/person-info/index.css +1 -1
- package/lib/person-info/index.js +45 -21
- package/lib/product-info/index.css +1 -1
- package/lib/product-info/index.js +19 -24
- package/package.json +5 -15
- package/packages/business-card/demo/index.vue +2 -8
- package/packages/business-card/index.vue +6 -28
- package/packages/bxs-utils/planbook/common.js +2 -4
- package/packages/bxs-utils/planbook/insurance.js +16 -62
- package/packages/bxs-utils/planbook/person.js +22 -74
- package/packages/bxs-utils/planbook/product.js +65 -233
- package/packages/bxs-utils/trade/insureCalculate.js +11 -43
- package/packages/canvas-poster/demo/index.vue +2 -7
- package/packages/canvas-poster/index.vue +5 -37
- package/packages/components/form-item/select-item.vue +5 -17
- package/packages/components/form-item/title-item.vue +3 -8
- package/packages/insure-calculate/demo/index.vue +1 -4
- package/packages/insure-calculate/index.vue +52 -183
- package/packages/person-info/index.vue +35 -21
- package/packages/planbook-input/components/footer.vue +1 -2
- package/packages/planbook-input/components/product-table.vue +7 -17
- package/packages/planbook-input/helper.js +19 -75
- package/packages/planbook-input/index.vue +8 -28
- package/packages/product-info/demo/index.vue +2 -12
- package/packages/product-info/index.vue +8 -31
- package/src/js/md5Token.js +6 -8
- package/src/js/request.js +11 -9
- package/src/js/utils.js +3 -7
|
@@ -5,45 +5,25 @@
|
|
|
5
5
|
<header class="bxt-component-header">
|
|
6
6
|
<span class="bxt-component-header_title">{{ title }}</span>
|
|
7
7
|
<span @click="closeInsureCalculate">
|
|
8
|
-
<bxs-icon
|
|
9
|
-
class="bxt-component-header_close"
|
|
10
|
-
name="close"
|
|
11
|
-
></bxs-icon>
|
|
8
|
+
<bxs-icon class="bxt-component-header_close" name="close"></bxs-icon>
|
|
12
9
|
</span>
|
|
13
10
|
</header>
|
|
14
11
|
</slot>
|
|
15
12
|
</div>
|
|
16
|
-
<div
|
|
17
|
-
class="bxt-
|
|
18
|
-
:class="{ 'bxt-mb50': showFooter }"
|
|
19
|
-
v-if="widgets && widgets.length"
|
|
20
|
-
>
|
|
21
|
-
<div
|
|
22
|
-
v-for="(item, index) in widgets"
|
|
23
|
-
:key="item.label + item.riskCode + index"
|
|
24
|
-
class="bxt-insure-calculte"
|
|
25
|
-
>
|
|
13
|
+
<div class="bxt-component-container" :class="{ 'bxt-mb50': showFooter }" v-if="widgets && widgets.length">
|
|
14
|
+
<div v-for="(item, index) in widgets" :key="item.label + item.riskCode + index" class="bxt-insure-calculte">
|
|
26
15
|
<!-- 自定义文本展示 -->
|
|
27
|
-
<div
|
|
28
|
-
v-if="item.type === 'v-text' && item.hidden === 0"
|
|
29
|
-
class="bxt-block bxt-text bxt-bb1"
|
|
30
|
-
>
|
|
16
|
+
<div v-if="item.type === 'v-text' && item.hidden === 0" class="bxt-block bxt-text bxt-bb1">
|
|
31
17
|
<span class="bxt-mr15 bxt-flex1 bxt-fs30">{{ item.label }}</span>
|
|
32
18
|
<span class="bxt-fs13">{{ item.name }}</span>
|
|
33
19
|
</div>
|
|
34
20
|
<!-- 文本展示 -->
|
|
35
|
-
<div
|
|
36
|
-
v-if="item.type === 'text' && item.hidden === 0"
|
|
37
|
-
class="bxt-block bxt-text bxt-bb1"
|
|
38
|
-
>
|
|
21
|
+
<div v-if="item.type === 'text' && item.hidden === 0" class="bxt-block bxt-text bxt-bb1">
|
|
39
22
|
<span class="bxt-mr15 bxt-flex1 bxt-fs30">{{ item.label }}</span>
|
|
40
23
|
<span class="bxt-fs13">{{ item.name }}</span>
|
|
41
24
|
</div>
|
|
42
25
|
<!-- checkbox选择项 -->
|
|
43
|
-
<div
|
|
44
|
-
v-if="item.type === 'select_checkbox' && item.hidden === 0"
|
|
45
|
-
class="bxt-block bxt-select-content"
|
|
46
|
-
>
|
|
26
|
+
<div v-if="item.type === 'select_checkbox' && item.hidden === 0" class="bxt-block bxt-select-content">
|
|
47
27
|
<span class="bxt-mr15 bxt-flex1 bxt-fs30">{{ item.label }}</span>
|
|
48
28
|
<div class="bxt-select-content-box">
|
|
49
29
|
<template v-for="(it, optsIndex) in item.opts[item.key]">
|
|
@@ -67,10 +47,7 @@
|
|
|
67
47
|
</div>
|
|
68
48
|
</div>
|
|
69
49
|
<!-- 半浮层选择项 index -->
|
|
70
|
-
<div
|
|
71
|
-
class="bxt-block bxt-bb1"
|
|
72
|
-
v-if="item.type === 'select_picker' && item.hidden === 0"
|
|
73
|
-
>
|
|
50
|
+
<div class="bxt-block bxt-bb1" v-if="item.type === 'select_picker' && item.hidden === 0">
|
|
74
51
|
<span class="bxt-mr15 bxt-flex1 bxt-fs30">{{ item.label }}</span>
|
|
75
52
|
<div class="bxt-flex-center" @click="openPicker(item)">
|
|
76
53
|
<div class="bxt-select-text bxt-fs13">
|
|
@@ -82,10 +59,7 @@
|
|
|
82
59
|
<div v-if="item.type === 'select_number_range' && item.hidden === 0">
|
|
83
60
|
<div class="bxt-block bxt-bb1">
|
|
84
61
|
<span class="bxt-mr15 bxt-flex1 bxt-fs30">{{ item.label }}</span>
|
|
85
|
-
<div
|
|
86
|
-
class="bxt-flex-center"
|
|
87
|
-
@click="openSelectNumberRangePicker(item)"
|
|
88
|
-
>
|
|
62
|
+
<div class="bxt-flex-center" @click="openSelectNumberRangePicker(item)">
|
|
89
63
|
<div class="bxt-select-text bxt-fs13">
|
|
90
64
|
{{ item.opts[item.key][item.index].name }}
|
|
91
65
|
</div>
|
|
@@ -108,27 +82,15 @@
|
|
|
108
82
|
</div>
|
|
109
83
|
</div>
|
|
110
84
|
<!-- 日历 -->
|
|
111
|
-
<div
|
|
112
|
-
class="bxt-block bxt-calendar bxt-bb1"
|
|
113
|
-
v-if="item.type === 'calendar' && item.hidden === 0"
|
|
114
|
-
>
|
|
85
|
+
<div class="bxt-block bxt-calendar bxt-bb1" v-if="item.type === 'calendar' && item.hidden === 0">
|
|
115
86
|
<span class="bxt-mr15 bxt-flex1">{{ item.label }}</span>
|
|
116
|
-
<div
|
|
117
|
-
class="bxt-flex-center bxt-calendar-text bxt-fs13"
|
|
118
|
-
@click="openDatePicker(item)"
|
|
119
|
-
>
|
|
87
|
+
<div class="bxt-flex-center bxt-calendar-text bxt-fs13" @click="openDatePicker(item)">
|
|
120
88
|
<div class="bxt-minwidth-70">{{ item.current.v }}</div>
|
|
121
|
-
<img
|
|
122
|
-
class="bxt-signin"
|
|
123
|
-
src="//media.winbaoxian.com/autoUpload/common/signin_0e67230840f371a.png"
|
|
124
|
-
/>
|
|
89
|
+
<img class="bxt-signin" src="//media.winbaoxian.com/autoUpload/common/signin_0e67230840f371a.png" />
|
|
125
90
|
</div>
|
|
126
91
|
</div>
|
|
127
92
|
<!-- 职业 -->
|
|
128
|
-
<div
|
|
129
|
-
class="bxt-block bxt-bb1"
|
|
130
|
-
v-if="item.type === 'profession' && item.hidden === 0"
|
|
131
|
-
>
|
|
93
|
+
<div class="bxt-block bxt-bb1" v-if="item.type === 'profession' && item.hidden === 0">
|
|
132
94
|
<span class="bxt-mr15 bxt-flex1 bxt-fs30">{{ item.label }}</span>
|
|
133
95
|
<div class="bxt-flex-center bxt-fs13">
|
|
134
96
|
<span class="bxt-color-3 bxt-mr15">{{ item.tv }}</span>
|
|
@@ -136,22 +98,14 @@
|
|
|
136
98
|
</div>
|
|
137
99
|
</div>
|
|
138
100
|
<!-- 地址 -->
|
|
139
|
-
<div
|
|
140
|
-
class="bxt-block bxt-bb1"
|
|
141
|
-
v-if="item.type === 'address' && item.hidden === 0"
|
|
142
|
-
>
|
|
101
|
+
<div class="bxt-block bxt-bb1" v-if="item.type === 'address' && item.hidden === 0">
|
|
143
102
|
<span class="bxt-mr15 bxt-flex1 bxt-fs30">{{ item.label }}</span>
|
|
144
103
|
<div class="bxt-flex-center bxt-fs13">
|
|
145
|
-
<span class="bxt-color-3 bxt-red" @click="showAddress(item)">{{
|
|
146
|
-
item.tv || '请选择投保地区'
|
|
147
|
-
}}</span>
|
|
104
|
+
<span class="bxt-color-3 bxt-red" @click="showAddress(item)">{{ item.tv || '请选择投保地区' }}</span>
|
|
148
105
|
</div>
|
|
149
106
|
</div>
|
|
150
107
|
<!--输入框-->
|
|
151
|
-
<div
|
|
152
|
-
class="bxt-block bxt-input bxt-bb1"
|
|
153
|
-
v-if="item.type === 'input_number_range' && item.hidden === 0"
|
|
154
|
-
>
|
|
108
|
+
<div class="bxt-block bxt-input bxt-bb1" v-if="item.type === 'input_number_range' && item.hidden === 0">
|
|
155
109
|
<span class="bxt-mr15 bxt-flex1 bxt-fs30">{{ item.label }}</span>
|
|
156
110
|
<div class="bxt-fs13">
|
|
157
111
|
<div class="bxt-input-box">
|
|
@@ -180,9 +134,7 @@
|
|
|
180
134
|
>
|
|
181
135
|
<div class="bxt-content bxt-bb1">
|
|
182
136
|
<div class="bxt-block-term">
|
|
183
|
-
<span class="bxt-mr15 bxt-flex1 bxt-fs30 bxt-lh12">{{
|
|
184
|
-
item.name
|
|
185
|
-
}}</span>
|
|
137
|
+
<span class="bxt-mr15 bxt-flex1 bxt-fs30 bxt-lh12">{{ item.name }}</span>
|
|
186
138
|
<div class="bxt-flex-center bxt-fs13">
|
|
187
139
|
<span class="bxt-value">{{ item.termValue }}</span>
|
|
188
140
|
<template v-if="!!item.content">
|
|
@@ -195,12 +147,7 @@
|
|
|
195
147
|
</template>
|
|
196
148
|
</div>
|
|
197
149
|
</div>
|
|
198
|
-
<div
|
|
199
|
-
class="bxt-des"
|
|
200
|
-
v-show="item.toggle"
|
|
201
|
-
v-if="!!item.content"
|
|
202
|
-
v-html="item.content"
|
|
203
|
-
></div>
|
|
150
|
+
<div class="bxt-des" v-show="item.toggle" v-if="!!item.content" v-html="item.content"></div>
|
|
204
151
|
</div>
|
|
205
152
|
</div>
|
|
206
153
|
</template>
|
|
@@ -225,39 +172,19 @@
|
|
|
225
172
|
:prevent-scroll-through="true"
|
|
226
173
|
/>
|
|
227
174
|
<!-- bxs组件:地址查询 -->
|
|
228
|
-
<bxs-area
|
|
229
|
-
v-model="isShowArea"
|
|
230
|
-
:area-select="defaultArea"
|
|
231
|
-
:area-data="areaData"
|
|
232
|
-
@confirm="confirmArea"
|
|
233
|
-
>
|
|
234
|
-
</bxs-area>
|
|
175
|
+
<bxs-area v-model="isShowArea" :area-select="defaultArea" :area-data="areaData" @confirm="confirmArea"> </bxs-area>
|
|
235
176
|
</div>
|
|
236
177
|
</template>
|
|
237
178
|
<script lang="ts">
|
|
238
179
|
import { Component, Prop, Vue } from 'vue-property-decorator';
|
|
239
180
|
import { parseTime } from '@src/js/utils.js';
|
|
240
|
-
import {
|
|
241
|
-
Picker,
|
|
242
|
-
DatetimePicker,
|
|
243
|
-
ProfessionList,
|
|
244
|
-
Toast,
|
|
245
|
-
Icon,
|
|
246
|
-
Button,
|
|
247
|
-
Area,
|
|
248
|
-
Input
|
|
249
|
-
} from 'bxs-ui-vue';
|
|
181
|
+
import { Picker, DatetimePicker, ProfessionList, Toast, Icon, Button, Area, Input } from 'bxs-ui-vue';
|
|
250
182
|
import 'bxs-ui-vue/lib/index.css';
|
|
251
183
|
Vue.use(Picker);
|
|
252
184
|
Vue.use(DatetimePicker);
|
|
253
185
|
Vue.use(Toast);
|
|
254
186
|
|
|
255
|
-
import {
|
|
256
|
-
insureCalculate,
|
|
257
|
-
hasPlanParams,
|
|
258
|
-
getUuid,
|
|
259
|
-
getAddress
|
|
260
|
-
} from 'packages/bxs-utils/index.js';
|
|
187
|
+
import { insureCalculate, hasPlanParams, getUuid, getAddress } from 'packages/bxs-utils/index.js';
|
|
261
188
|
|
|
262
189
|
const defaultCalculateData: any = {
|
|
263
190
|
widgets: [],
|
|
@@ -429,9 +356,7 @@ export default class InsureCalculate extends Vue {
|
|
|
429
356
|
// 初始化试算
|
|
430
357
|
this.hasInit = true;
|
|
431
358
|
const postParams = {
|
|
432
|
-
current_data: this.hasCalculateData
|
|
433
|
-
? this.calculateData.current_data
|
|
434
|
-
: null,
|
|
359
|
+
current_data: this.hasCalculateData ? this.calculateData.current_data : null,
|
|
435
360
|
product_id: this.productId,
|
|
436
361
|
scenario: 'h5Widget'
|
|
437
362
|
};
|
|
@@ -555,9 +480,7 @@ export default class InsureCalculate extends Vue {
|
|
|
555
480
|
vm.formateAreaData(vm.list);
|
|
556
481
|
vm.isShowArea = true;
|
|
557
482
|
} else {
|
|
558
|
-
vm.$toast(
|
|
559
|
-
addressData && addressData.message ? addressData.message : ''
|
|
560
|
-
);
|
|
483
|
+
vm.$toast(addressData && addressData.message ? addressData.message : '');
|
|
561
484
|
}
|
|
562
485
|
} catch (error) {
|
|
563
486
|
vm.$toast(error && error.info ? error.info : '地址信息获取失败');
|
|
@@ -595,20 +518,12 @@ export default class InsureCalculate extends Vue {
|
|
|
595
518
|
let orginTarget;
|
|
596
519
|
if (currTarget.duty) {
|
|
597
520
|
orginTarget = self.widgets.find(
|
|
598
|
-
item =>
|
|
599
|
-
item.riskCode === currTarget.riskCode &&
|
|
600
|
-
item.key === currTarget.key &&
|
|
601
|
-
item.duty === currTarget.duty
|
|
521
|
+
item => item.riskCode === currTarget.riskCode && item.key === currTarget.key && item.duty === currTarget.duty
|
|
602
522
|
);
|
|
603
523
|
} else {
|
|
604
|
-
orginTarget = this.widgets.find(
|
|
605
|
-
item =>
|
|
606
|
-
item.riskCode === currTarget.riskCode && item.key === currTarget.key
|
|
607
|
-
);
|
|
524
|
+
orginTarget = this.widgets.find(item => item.riskCode === currTarget.riskCode && item.key === currTarget.key);
|
|
608
525
|
}
|
|
609
|
-
const defaultValue = item.index
|
|
610
|
-
? [item.opts[item.key][item.index].name]
|
|
611
|
-
: [null];
|
|
526
|
+
const defaultValue = item.index ? [item.opts[item.key][item.index].name] : [null];
|
|
612
527
|
self.$picker({
|
|
613
528
|
title: item.label,
|
|
614
529
|
valueKey: 'name',
|
|
@@ -632,13 +547,8 @@ export default class InsureCalculate extends Vue {
|
|
|
632
547
|
console.log('openSelectNumberRangePicker', item);
|
|
633
548
|
let self: any = this;
|
|
634
549
|
const currTarget = item;
|
|
635
|
-
const orginTarget = self.widgets.find(
|
|
636
|
-
|
|
637
|
-
item.riskCode === currTarget.riskCode && item.key === currTarget.key
|
|
638
|
-
);
|
|
639
|
-
const defaultValue = item.index
|
|
640
|
-
? [item.opts[item.key][item.index].name]
|
|
641
|
-
: [null];
|
|
550
|
+
const orginTarget = self.widgets.find(item => item.riskCode === currTarget.riskCode && item.key === currTarget.key);
|
|
551
|
+
const defaultValue = item.index ? [item.opts[item.key][item.index].name] : [null];
|
|
642
552
|
self.$picker({
|
|
643
553
|
title: item.label,
|
|
644
554
|
valueKey: 'name',
|
|
@@ -678,12 +588,8 @@ export default class InsureCalculate extends Vue {
|
|
|
678
588
|
console.log('openDatePicker', item);
|
|
679
589
|
let self: any = this;
|
|
680
590
|
const currTarget = item;
|
|
681
|
-
const orginTarget = self.widgets.find(
|
|
682
|
-
|
|
683
|
-
item.riskCode === currTarget.riskCode && item.key === currTarget.key
|
|
684
|
-
);
|
|
685
|
-
const defaultValue =
|
|
686
|
-
item.current && item.current.v ? new Date(item.current.v) : new Date();
|
|
591
|
+
const orginTarget = self.widgets.find(item => item.riskCode === currTarget.riskCode && item.key === currTarget.key);
|
|
592
|
+
const defaultValue = item.current && item.current.v ? new Date(item.current.v) : new Date();
|
|
687
593
|
self.$datetime({
|
|
688
594
|
title: item.label,
|
|
689
595
|
value: defaultValue,
|
|
@@ -704,16 +610,10 @@ export default class InsureCalculate extends Vue {
|
|
|
704
610
|
let orginTarget;
|
|
705
611
|
if (currTarget.duty) {
|
|
706
612
|
orginTarget = this.widgets.find(
|
|
707
|
-
item =>
|
|
708
|
-
item.riskCode === currTarget.riskCode &&
|
|
709
|
-
item.key === currTarget.key &&
|
|
710
|
-
item.duty === currTarget.duty
|
|
613
|
+
item => item.riskCode === currTarget.riskCode && item.key === currTarget.key && item.duty === currTarget.duty
|
|
711
614
|
);
|
|
712
615
|
} else {
|
|
713
|
-
orginTarget = this.widgets.find(
|
|
714
|
-
item =>
|
|
715
|
-
item.riskCode === currTarget.riskCode && item.key === currTarget.key
|
|
716
|
-
);
|
|
616
|
+
orginTarget = this.widgets.find(item => item.riskCode === currTarget.riskCode && item.key === currTarget.key);
|
|
717
617
|
}
|
|
718
618
|
orginTarget.current.v = currClickItem.value;
|
|
719
619
|
this.handleSaveCalculate(item);
|
|
@@ -723,8 +623,7 @@ export default class InsureCalculate extends Vue {
|
|
|
723
623
|
const currValue = Number(item.current.v);
|
|
724
624
|
const self = this;
|
|
725
625
|
if (currValue < item.minValue || currValue > item.maxValue) {
|
|
726
|
-
item.errorMessage =
|
|
727
|
-
'请输入' + item.minValue + '到' + item.maxValue + '之间的整数';
|
|
626
|
+
item.errorMessage = '请输入' + item.minValue + '到' + item.maxValue + '之间的整数';
|
|
728
627
|
} else if (currValue % item.step !== 0) {
|
|
729
628
|
item.errorMessage = '请输入' + item.step + '的倍数';
|
|
730
629
|
} else {
|
|
@@ -772,40 +671,30 @@ export default class InsureCalculate extends Vue {
|
|
|
772
671
|
// 增加current字段,保存current_data的数据
|
|
773
672
|
if (item.duty) {
|
|
774
673
|
item.current = current = currentData.find(
|
|
775
|
-
it =>
|
|
776
|
-
it.k === item.key && it.risk === item.riskCode && item.duty === it.d
|
|
674
|
+
it => it.k === item.key && it.risk === item.riskCode && item.duty === it.d
|
|
777
675
|
);
|
|
778
676
|
} else {
|
|
779
|
-
item.current = current = currentData.find(
|
|
780
|
-
it => it.k === item.key && it.risk === item.riskCode
|
|
781
|
-
);
|
|
677
|
+
item.current = current = currentData.find(it => it.k === item.key && it.risk === item.riskCode);
|
|
782
678
|
}
|
|
783
|
-
if (
|
|
784
|
-
|
|
785
|
-
item.opts &&
|
|
786
|
-
item.opts[item.key]
|
|
787
|
-
) {
|
|
788
|
-
const isNumberRange = item.opts[item.key].some(
|
|
789
|
-
it => it.opt_type === 'number_range'
|
|
790
|
-
);
|
|
679
|
+
if ((item.type === 'select' || item.type === 'input') && item.opts && item.opts[item.key]) {
|
|
680
|
+
const isNumberRange = item.opts[item.key].some(it => it.opt_type === 'number_range');
|
|
791
681
|
if (isNumberRange) {
|
|
792
682
|
item.type = `${item.type}_number_range`;
|
|
793
683
|
}
|
|
794
684
|
}
|
|
795
685
|
// 投保年龄是区间的修正
|
|
796
|
-
if (
|
|
797
|
-
item.type === 'select' &&
|
|
798
|
-
item.key === 'detail_age' &&
|
|
799
|
-
current &&
|
|
800
|
-
current.sv
|
|
801
|
-
) {
|
|
686
|
+
if (item.type === 'select' && item.key === 'detail_age' && current && current.sv) {
|
|
802
687
|
item.current.v = current.sv;
|
|
803
688
|
}
|
|
804
689
|
if (~item.key.indexOf('#')) {
|
|
805
690
|
if (!item.opts) {
|
|
806
691
|
item.opts = {};
|
|
692
|
+
} else if (!item.opts[item.key]) {
|
|
693
|
+
let key = item.key.split('#')[0];
|
|
694
|
+
if (item.opts[key]) {
|
|
695
|
+
item.opts[item.key] = item.opts[key];
|
|
696
|
+
}
|
|
807
697
|
}
|
|
808
|
-
item.key = item.key.split('#')[0];
|
|
809
698
|
}
|
|
810
699
|
switch (item.type) {
|
|
811
700
|
case 'v-text':
|
|
@@ -883,9 +772,7 @@ export default class InsureCalculate extends Vue {
|
|
|
883
772
|
}
|
|
884
773
|
});
|
|
885
774
|
}
|
|
886
|
-
const curr = item.opts[item.key].find(
|
|
887
|
-
it => it.opt_type === 'number_range'
|
|
888
|
-
);
|
|
775
|
+
const curr = item.opts[item.key].find(it => it.opt_type === 'number_range');
|
|
889
776
|
if (curr) {
|
|
890
777
|
this.$set(item, 'showInput', true);
|
|
891
778
|
this.$set(item, 'minValue', Number(curr.value.split('-')[0]));
|
|
@@ -923,9 +810,7 @@ export default class InsureCalculate extends Vue {
|
|
|
923
810
|
this.defaultArea = current.v;
|
|
924
811
|
const arrAddress = this.getArea(this.list, '', []);
|
|
925
812
|
if (arrAddress && arrAddress.length) {
|
|
926
|
-
const currAddress = arrAddress.find(
|
|
927
|
-
item => String(item.areaCode) === String(current.v)
|
|
928
|
-
);
|
|
813
|
+
const currAddress = arrAddress.find(item => String(item.areaCode) === String(current.v));
|
|
929
814
|
if (currAddress && currAddress.areaCode) {
|
|
930
815
|
item.tv = currAddress.des;
|
|
931
816
|
}
|
|
@@ -994,11 +879,7 @@ export default class InsureCalculate extends Vue {
|
|
|
994
879
|
let cityCopy = [];
|
|
995
880
|
if (hasCounty) {
|
|
996
881
|
county.forEach(item => {
|
|
997
|
-
if (
|
|
998
|
-
this.returnClassify.findIndex(
|
|
999
|
-
v => v == item.classify || !item.classify
|
|
1000
|
-
) > -1
|
|
1001
|
-
) {
|
|
882
|
+
if (this.returnClassify.findIndex(v => v == item.classify || !item.classify) > -1) {
|
|
1002
883
|
countyCopy.push(item);
|
|
1003
884
|
}
|
|
1004
885
|
});
|
|
@@ -1008,11 +889,7 @@ export default class InsureCalculate extends Vue {
|
|
|
1008
889
|
} else {
|
|
1009
890
|
if (hasCity) {
|
|
1010
891
|
city.forEach(item => {
|
|
1011
|
-
if (
|
|
1012
|
-
this.returnClassify.findIndex(
|
|
1013
|
-
v => v == item.classify || !item.classify
|
|
1014
|
-
) > -1
|
|
1015
|
-
) {
|
|
892
|
+
if (this.returnClassify.findIndex(v => v == item.classify || !item.classify) > -1) {
|
|
1016
893
|
cityCopy.push(item);
|
|
1017
894
|
}
|
|
1018
895
|
});
|
|
@@ -1058,10 +935,7 @@ export default class InsureCalculate extends Vue {
|
|
|
1058
935
|
this.widgets.forEach(item => {
|
|
1059
936
|
if (item.index === undefined) {
|
|
1060
937
|
currentData.push(item.current);
|
|
1061
|
-
} else if (
|
|
1062
|
-
(item.index || Number(item.index) === 0) &&
|
|
1063
|
-
!item.showInput
|
|
1064
|
-
) {
|
|
938
|
+
} else if ((item.index || Number(item.index) === 0) && !item.showInput) {
|
|
1065
939
|
const temp = JSON.parse(JSON.stringify(item.current));
|
|
1066
940
|
temp.v = item.opts[item.key][item.index].value;
|
|
1067
941
|
currentData.push(temp);
|
|
@@ -1095,18 +969,13 @@ export default class InsureCalculate extends Vue {
|
|
|
1095
969
|
this.isDevelop = this.isDev;
|
|
1096
970
|
}
|
|
1097
971
|
if (this.isDevelop) {
|
|
1098
|
-
this.getCalculateApi =
|
|
1099
|
-
|
|
1100
|
-
this.getAreaCodeApi =
|
|
1101
|
-
'https://insurance2a-api.wyins.net.cn/api/product/data/getAreaCode';
|
|
972
|
+
this.getCalculateApi = 'https://insurance2a-api.wyins.net.cn/api/product/data/calculate';
|
|
973
|
+
this.getAreaCodeApi = 'https://insurance2a-api.wyins.net.cn/api/product/data/getAreaCode';
|
|
1102
974
|
this.getUuidApi = 'http://app.winbaoxian.cn/planBook/common/currentUser';
|
|
1103
975
|
} else {
|
|
1104
|
-
this.getCalculateApi =
|
|
1105
|
-
|
|
1106
|
-
this.
|
|
1107
|
-
'https://insurance2a-api.wyins.net/api/product/data/getAreaCode';
|
|
1108
|
-
this.getUuidApi =
|
|
1109
|
-
'https://app.winbaoxian.com/planBook/common/currentUser';
|
|
976
|
+
this.getCalculateApi = 'https://insurance2a-api.wyins.net/api/product/data/calculate';
|
|
977
|
+
this.getAreaCodeApi = 'https://insurance2a-api.wyins.net/api/product/data/getAreaCode';
|
|
978
|
+
this.getUuidApi = 'https://app.winbaoxian.com/planBook/common/currentUser';
|
|
1110
979
|
}
|
|
1111
980
|
}
|
|
1112
981
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="bxt-person-info">
|
|
3
|
-
<bxs-form
|
|
4
|
-
class="bxt-person-info-form"
|
|
5
|
-
ref="personForm"
|
|
6
|
-
:model="personForm"
|
|
7
|
-
:is-content-vertical-alignment="false"
|
|
8
|
-
>
|
|
3
|
+
<bxs-form class="bxt-person-info-form" ref="personForm" :model="personForm" :is-content-vertical-alignment="false">
|
|
9
4
|
<template v-for="ele in personData.eleOrderList">
|
|
10
5
|
<template v-if="ele.componentName === 'cmCommonTitle'">
|
|
11
6
|
<bxs-form-item :key="ele.key">
|
|
@@ -41,12 +36,7 @@
|
|
|
41
36
|
</bxs-radio-group>
|
|
42
37
|
</bxs-form-item>
|
|
43
38
|
</template>
|
|
44
|
-
<template
|
|
45
|
-
v-if="
|
|
46
|
-
ele.componentName === 'cmCommonSelect' ||
|
|
47
|
-
ele.componentName === 'cmCommonDate'
|
|
48
|
-
"
|
|
49
|
-
>
|
|
39
|
+
<template v-if="ele.componentName === 'cmCommonSelect' || ele.componentName === 'cmCommonDate'">
|
|
50
40
|
<bxs-form-item
|
|
51
41
|
v-if="isCheckedPerson(personData) && !ele.isHide"
|
|
52
42
|
:key="ele.key"
|
|
@@ -62,8 +52,14 @@
|
|
|
62
52
|
:title="ele.label"
|
|
63
53
|
:options="ele.options"
|
|
64
54
|
:placeholder="ele.placeholder"
|
|
65
|
-
right-icon="
|
|
55
|
+
:right-icon="
|
|
56
|
+
ele.key === 'age' && personData.eleOrderList.find(ele => ele.key === 'birthday')
|
|
57
|
+
? 'calendar'
|
|
58
|
+
: 'arrow-right'
|
|
59
|
+
"
|
|
60
|
+
:icon-color="ele.iconColor"
|
|
66
61
|
@change="change(ele)"
|
|
62
|
+
@clickIcon="clickIcon"
|
|
67
63
|
/>
|
|
68
64
|
</bxs-form-item>
|
|
69
65
|
</template>
|
|
@@ -73,16 +69,14 @@
|
|
|
73
69
|
</template>
|
|
74
70
|
<script lang="ts">
|
|
75
71
|
import Vue from 'vue';
|
|
76
|
-
import {
|
|
77
|
-
|
|
78
|
-
personDataHandler,
|
|
79
|
-
productDataHandler
|
|
80
|
-
} from 'packages/bxs-utils/index.js';
|
|
72
|
+
import { convertEleOrderListToObj, personDataHandler, productDataHandler } from 'packages/bxs-utils/index.js';
|
|
73
|
+
import { parseTime } from '@src/js/utils.js';
|
|
81
74
|
import { Component, Prop } from 'vue-property-decorator';
|
|
82
75
|
import { Form, FormItem, Input, RadioGroup, Radio } from 'bxs-ui-vue';
|
|
83
76
|
import SelectItem from 'packages/components/form-item/select-item.vue';
|
|
84
77
|
import TitleItem from 'packages/components/form-item/title-item.vue';
|
|
85
78
|
import 'bxs-ui-vue/esm/index.css';
|
|
79
|
+
|
|
86
80
|
@Component({
|
|
87
81
|
name: 'BxtPersonInfo',
|
|
88
82
|
components: {
|
|
@@ -132,15 +126,35 @@ export default class BxtPersonInfo extends Vue {
|
|
|
132
126
|
productGroupList.forEach(g => {
|
|
133
127
|
g.prodOrderList &&
|
|
134
128
|
g.prodOrderList.map(p => {
|
|
135
|
-
productDataHandler(p,
|
|
136
|
-
this.verifyData && this.verifyData[p.key],
|
|
137
|
-
allPersonsData);
|
|
129
|
+
productDataHandler(p, this.verifyData && this.verifyData[p.key], allPersonsData);
|
|
138
130
|
});
|
|
139
131
|
});
|
|
140
132
|
}
|
|
141
133
|
}
|
|
142
134
|
this.$emit('change', this.personData, ele);
|
|
143
135
|
}
|
|
136
|
+
clickIcon(ele): any {
|
|
137
|
+
let self: any = this;
|
|
138
|
+
if (ele.disabled) {
|
|
139
|
+
return 0;
|
|
140
|
+
}
|
|
141
|
+
if (ele.key === 'age') {
|
|
142
|
+
const birthday = self.personData.eleOrderList.find(ele => ele.key === 'birthday');
|
|
143
|
+
let defaultValue = birthday.value ? new Date(birthday.value) : birthday.defaulValue || new Date();
|
|
144
|
+
self.$datetime({
|
|
145
|
+
value: defaultValue,
|
|
146
|
+
type: 'date',
|
|
147
|
+
minDate: birthday.minDate,
|
|
148
|
+
maxDate: birthday.maxDate,
|
|
149
|
+
confirmButtonColor: '#508cee',
|
|
150
|
+
confirm(data) {
|
|
151
|
+
birthday.value = parseTime(data, '{y}/{m}/{d}');
|
|
152
|
+
self.change(birthday);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
144
158
|
}
|
|
145
159
|
</script>
|
|
146
160
|
<style lang="postcss">
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
<div class="bxt-footer-info">
|
|
14
14
|
<p class="bxt-info-title">首年总保费</p>
|
|
15
15
|
<p class="bxt-info-baofei">
|
|
16
|
-
{{ totalBaoFei.toFixed(2).split('.')[0]
|
|
17
|
-
}}<em>.{{ totalBaoFei.toFixed(2).split('.')[1] }}元</em>
|
|
16
|
+
{{ totalBaoFei.toFixed(2).split('.')[0] }}<em>.{{ totalBaoFei.toFixed(2).split('.')[1] }}元</em>
|
|
18
17
|
</p>
|
|
19
18
|
</div>
|
|
20
19
|
</li>
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="['bxt-product-show', `bxt-product-id-${productData.key}`]"
|
|
4
|
-
v-if="productData"
|
|
5
|
-
>
|
|
2
|
+
<div :class="['bxt-product-show', `bxt-product-id-${productData.key}`]" v-if="productData">
|
|
6
3
|
<div class="bxt-product-show-container" :key="productData.key">
|
|
7
4
|
<header class="bxt-product-header">
|
|
8
|
-
<p
|
|
9
|
-
:class="[
|
|
10
|
-
'bxt-product-header-title',
|
|
11
|
-
isShowDeleteBtn() ? 'bxt-product-header-title--delete' : ''
|
|
12
|
-
]"
|
|
13
|
-
>
|
|
5
|
+
<p :class="['bxt-product-header-title', isShowDeleteBtn() ? 'bxt-product-header-title--delete' : '']">
|
|
14
6
|
{{ productData.titleName }}
|
|
15
7
|
</p>
|
|
16
8
|
<div class="bxt-product-header-btn">
|
|
@@ -139,11 +131,7 @@ export default class BxtProductTable extends Vue {
|
|
|
139
131
|
this.groupData &&
|
|
140
132
|
this.groupData.prodOrderList &&
|
|
141
133
|
this.groupData.prodOrderList.findIndex(p => p.key === this.productKey);
|
|
142
|
-
return
|
|
143
|
-
this.productData.hadChoice &&
|
|
144
|
-
!this.productData.required &&
|
|
145
|
-
index >= this.groupData.defNum
|
|
146
|
-
);
|
|
134
|
+
return this.productData.hadChoice && !this.productData.required && index >= this.groupData.defNum;
|
|
147
135
|
}
|
|
148
136
|
overlayClose() {
|
|
149
137
|
// 单击确定按钮关闭时,不用还原数据
|
|
@@ -168,12 +156,14 @@ export default class BxtProductTable extends Vue {
|
|
|
168
156
|
this.isShowProductSheet = true;
|
|
169
157
|
}
|
|
170
158
|
confirm(prod) {
|
|
171
|
-
this.$emit(
|
|
159
|
+
this.$emit(
|
|
160
|
+
'confirm',
|
|
172
161
|
{
|
|
173
162
|
groupKey: this.groupKey,
|
|
174
163
|
productKey: this.productKey
|
|
175
164
|
},
|
|
176
|
-
this
|
|
165
|
+
this
|
|
166
|
+
);
|
|
177
167
|
}
|
|
178
168
|
close() {
|
|
179
169
|
this.isCkConfirm = true;
|