bxs-tools-ui 3.2.0 → 3.3.0
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/README.md +20 -20
- package/es/add-and-take/index.css +1 -1
- package/es/add-and-take/index.js +283 -64
- package/es/adjust-baoe/index.css +1 -1
- package/es/adjust-baoe/index.js +444 -195
- package/es/business-card/index.css +1 -1
- package/es/business-card/index.js +1 -0
- package/es/canvas-poster/index.css +1 -1
- package/es/canvas-poster/index.js +1 -0
- package/es/index.css +1 -1
- package/es/index.js +936 -824
- package/es/insure-calculate/index.css +1 -1
- package/es/insure-calculate/index.js +438 -265
- package/es/person-info/index.css +1 -1
- package/es/person-info/index.js +296 -1370
- package/es/product-info/index.css +1 -1
- package/es/product-info/index.js +644 -548
- package/es/share-sheet/index.css +1 -1
- package/es/share-sheet/index.js +313 -21
- package/es/utils/index.js +530 -429
- package/lib/add-and-take/index.css +1 -1
- package/lib/add-and-take/index.js +283 -64
- package/lib/adjust-baoe/index.css +1 -1
- package/lib/adjust-baoe/index.js +441 -194
- package/lib/business-card/index.css +1 -1
- package/lib/business-card/index.js +1 -0
- package/lib/canvas-poster/index.css +1 -1
- package/lib/canvas-poster/index.js +1 -0
- package/lib/index.css +1 -1
- package/lib/index.js +939 -826
- package/lib/insure-calculate/index.css +1 -1
- package/lib/insure-calculate/index.js +438 -268
- package/lib/person-info/index.css +1 -1
- package/lib/person-info/index.js +295 -1372
- package/lib/product-info/index.css +1 -1
- package/lib/product-info/index.js +645 -550
- package/lib/share-sheet/index.css +1 -1
- package/lib/share-sheet/index.js +313 -25
- package/lib/utils/index.js +531 -433
- package/package.json +9 -7
- package/packages/add-and-take/components/interest-form.less +144 -0
- package/packages/add-and-take/components/interest-form.vue +179 -179
- package/packages/add-and-take/components/interest-items.less +87 -0
- package/packages/add-and-take/components/interest-items.vue +67 -80
- package/packages/add-and-take/components/interest-table.less +111 -0
- package/packages/add-and-take/components/interest-table.vue +31 -31
- package/packages/add-and-take/constant.ts +2 -2
- package/packages/add-and-take/demo/index.vue +89 -86
- package/packages/add-and-take/handler.ts +52 -57
- package/packages/add-and-take/index.less +69 -0
- package/packages/add-and-take/index.vue +156 -156
- package/packages/add-and-take/readme.md +87 -98
- package/packages/adjust-baoe/demo/index.vue +37 -47
- package/packages/adjust-baoe/index.less +125 -0
- package/packages/adjust-baoe/index.vue +134 -147
- package/packages/adjust-baoe/readme.md +35 -45
- package/packages/business-card/demo/index.vue +7 -7
- package/packages/business-card/index.less +100 -0
- package/packages/business-card/index.vue +18 -21
- package/packages/business-card/readme.md +46 -53
- package/packages/bxs-utils/demo/index.vue +2 -2
- package/packages/bxs-utils/index.ts +5 -5
- package/packages/bxs-utils/planbook/common.ts +56 -92
- package/packages/bxs-utils/planbook/index.ts +4 -4
- package/packages/bxs-utils/planbook/insurance.ts +137 -127
- package/packages/bxs-utils/planbook/person.ts +143 -147
- package/packages/bxs-utils/planbook/product.ts +473 -509
- package/packages/bxs-utils/readme.md +94 -84
- package/packages/bxs-utils/trade/index.js +1 -1
- package/packages/bxs-utils/trade/insureCalculate.js +91 -204
- package/packages/canvas-poster/demo/index.vue +9 -13
- package/packages/canvas-poster/index.less +5 -0
- package/packages/canvas-poster/index.vue +68 -79
- package/packages/canvas-poster/readme.md +106 -109
- package/packages/index.ts +1 -1
- package/packages/insure-calculate/demo/index.vue +20 -20
- package/packages/insure-calculate/index.less +366 -0
- package/packages/insure-calculate/index.vue +305 -329
- package/packages/insure-calculate/readme.md +99 -106
- package/packages/person-info/crm-popup.vue +81 -80
- package/packages/person-info/demo/index.vue +25 -37
- package/packages/person-info/index-inline.less +11 -0
- package/packages/person-info/index.vue +53 -83
- package/packages/person-info/readme.md +109 -115
- package/packages/planbook-input/components/footer.less +54 -0
- package/packages/planbook-input/components/footer.vue +8 -64
- package/packages/planbook-input/components/handler.js +33 -44
- package/packages/planbook-input/components/product-table.less +235 -0
- package/packages/planbook-input/components/product-table.vue +114 -108
- package/packages/planbook-input/demo/index.vue +3 -3
- package/packages/planbook-input/helper.js +852 -465
- package/packages/planbook-input/index.less +30 -0
- package/packages/planbook-input/index.vue +86 -103
- package/packages/planbook-input/readme.md +72 -90
- package/packages/product-info/demo/constant.js +1 -1
- package/packages/product-info/demo/index.vue +31 -43
- package/packages/product-info/index.less +271 -0
- package/packages/product-info/index.vue +198 -210
- package/packages/product-info/readme.md +72 -75
- package/packages/share-sheet/constant.js +4 -4
- package/packages/share-sheet/demo/index.vue +10 -10
- package/packages/share-sheet/handler.js +14 -14
- package/packages/share-sheet/index.less +201 -0
- package/packages/share-sheet/index.vue +39 -39
- package/packages/share-sheet/readme.md +121 -127
- package/src/api/add-and-take.js +45 -0
- package/src/api/adjust-baoe.js +16 -0
- package/src/api/index.js +6 -0
- package/src/api/planbook.js +93 -0
- package/src/api/request.js +211 -0
- package/src/api/trade.js +56 -0
- package/src/api/user.js +18 -0
- package/src/components/common/common-age-birthday.less +66 -0
- package/src/components/common/common-age-birthday.vue +27 -95
- package/src/components/common/common-popup.less +81 -0
- package/src/components/common/common-popup.vue +12 -96
- package/src/components/common/common-radio.less +75 -0
- package/src/components/common/common-radio.vue +13 -91
- package/src/components/common/common-select.less +13 -0
- package/src/components/common/common-select.vue +21 -38
- package/src/components/common/common-title.less +115 -0
- package/src/components/common/common-title.vue +24 -24
- package/src/js/loading.js +6 -6
- package/src/js/md5Token.js +38 -44
- package/src/js/utils.js +45 -53
- package/src/js/variables.js +47 -25
- package/src/style/base.less +18 -0
- package/src/style/color.less +40 -0
- package/src/style/variables.less +21 -42
- package/packages/add-and-take/api.ts +0 -70
- package/packages/add-and-take/components/interest-form.css +0 -146
- package/packages/add-and-take/components/interest-items.css +0 -87
- package/packages/add-and-take/components/interest-table.css +0 -113
- package/packages/add-and-take/index.css +0 -70
- package/packages/adjust-baoe/index.css +0 -123
- package/packages/business-card/index.css +0 -101
- package/packages/canvas-poster/index.css +0 -5
- package/packages/insure-calculate/index.css +0 -368
- package/packages/planbook-input/api.js +0 -29
- package/packages/planbook-input/components/product-table.css +0 -236
- package/packages/planbook-input/index.css +0 -31
- package/packages/product-info/index.css +0 -264
- package/packages/share-sheet/index.css +0 -203
- package/src/components/common/common-title.css +0 -116
- package/src/js/request.js +0 -64
- package/src/style/apply.css +0 -25
- package/src/style/base.css +0 -36
- package/src/style/color.css +0 -74
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
.bxt_aat_interest_items {
|
|
2
|
+
padding-top: 9px;
|
|
3
|
+
font-size: 13px;
|
|
4
|
+
|
|
5
|
+
& input {
|
|
6
|
+
border: none;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
background: transparent;
|
|
9
|
+
appearance: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
& .bxt_aatii_item {
|
|
13
|
+
display: flex;
|
|
14
|
+
margin-right: 10px;
|
|
15
|
+
margin-bottom: 9px;
|
|
16
|
+
border-radius: 6px;
|
|
17
|
+
|
|
18
|
+
& .bxt_aatii_item_left {
|
|
19
|
+
flex: 0 0 5em;
|
|
20
|
+
margin-top: 3px;
|
|
21
|
+
margin-right: 7px;
|
|
22
|
+
margin-bottom: 12px;
|
|
23
|
+
color: #999;
|
|
24
|
+
text-align: right;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
& .bxt_aatii_item_right {
|
|
28
|
+
flex: 1;
|
|
29
|
+
|
|
30
|
+
& .bxt_aatii_item_right_options {
|
|
31
|
+
& > span {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
width: 42%;
|
|
34
|
+
margin: 0 9px 9px 0;
|
|
35
|
+
padding: 3px 6px;
|
|
36
|
+
text-align: center;
|
|
37
|
+
border-radius: 50px;
|
|
38
|
+
background: rgba(0, 0, 0, 0.04);
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
& > span.active {
|
|
44
|
+
color: #0a64fe;
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
background: #e6effe;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
& .bxt_aatii_item_right_custom {
|
|
51
|
+
position: relative;
|
|
52
|
+
margin-bottom: 9px;
|
|
53
|
+
padding: 12px;
|
|
54
|
+
background: #f4f8ff;
|
|
55
|
+
border-radius: 6px;
|
|
56
|
+
|
|
57
|
+
& .bxt_aatii_item_right_custom_input {
|
|
58
|
+
& input {
|
|
59
|
+
width: 110px;
|
|
60
|
+
padding: 3px 9px;
|
|
61
|
+
background: white;
|
|
62
|
+
margin-right: 6px;
|
|
63
|
+
border: 1px solid #e6e6e6;
|
|
64
|
+
border-radius: 50px;
|
|
65
|
+
vertical-align: middle;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
& span {
|
|
69
|
+
vertical-align: middle;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
& .bxt_aatii_item_right_custom_tips {
|
|
74
|
+
& span {
|
|
75
|
+
display: inline-block;
|
|
76
|
+
margin-top: 12px;
|
|
77
|
+
padding: 3px 9px;
|
|
78
|
+
border-radius: 50px;
|
|
79
|
+
color: #666;
|
|
80
|
+
border: 1px solid #d3d3d3;
|
|
81
|
+
background: #f5f5f5;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -46,9 +46,10 @@
|
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
48
|
<script>
|
|
49
|
-
import { get as _get, cloneDeep } from 'lodash'
|
|
50
|
-
import { Toast } from 'vant'
|
|
51
|
-
import { initInterestFormValues } from '../handler'
|
|
49
|
+
import { get as _get, cloneDeep } from 'lodash'
|
|
50
|
+
import { Toast } from 'vant'
|
|
51
|
+
import { initInterestFormValues } from '../handler'
|
|
52
|
+
import './interest-items.less'
|
|
52
53
|
|
|
53
54
|
export default {
|
|
54
55
|
props: {
|
|
@@ -79,58 +80,54 @@ export default {
|
|
|
79
80
|
cpFormValue: cloneDeep(this.formValue),
|
|
80
81
|
MAX_RATE_VALUE: 6,
|
|
81
82
|
historyRateList: []
|
|
82
|
-
}
|
|
83
|
+
}
|
|
83
84
|
},
|
|
84
85
|
computed: {
|
|
85
86
|
isShowBounsRate() {
|
|
86
|
-
return this.type !== 'reduceBaof' && this.scene === 3
|
|
87
|
+
return this.type !== 'reduceBaof' && this.scene === 3
|
|
87
88
|
},
|
|
88
89
|
interestItems() {
|
|
89
|
-
const { isShowBounsRate, interestInitData, formValue, params, MAX_RATE_VALUE, historyRateList } = this
|
|
90
|
+
const { isShowBounsRate, interestInitData, formValue, params, MAX_RATE_VALUE, historyRateList } = this
|
|
90
91
|
if (!interestInitData) {
|
|
91
|
-
return []
|
|
92
|
+
return []
|
|
92
93
|
}
|
|
93
|
-
const _items = []
|
|
94
|
-
const _bonusLength = _get(interestInitData, 'bonus.opts.length')
|
|
95
|
-
const _bonusRateData = _get(interestInitData, 'bonusRateData')
|
|
94
|
+
const _items = []
|
|
95
|
+
const _bonusLength = _get(interestInitData, 'bonus.opts.length')
|
|
96
|
+
const _bonusRateData = _get(interestInitData, 'bonusRateData')
|
|
96
97
|
if (_bonusLength) {
|
|
97
|
-
const _bonusOptions = cloneDeep(_get(interestInitData, 'bonus.opts', []) || [])
|
|
98
|
+
const _bonusOptions = cloneDeep(_get(interestInitData, 'bonus.opts', []) || [])
|
|
98
99
|
const _bonusItem = {
|
|
99
100
|
key: 'bonus',
|
|
100
101
|
stat: 'zjlqbfhqh',
|
|
101
102
|
title: _get(interestInitData, 'bonus.title', ''),
|
|
102
103
|
options: _bonusOptions
|
|
103
|
-
}
|
|
104
|
+
}
|
|
104
105
|
if (isShowBounsRate && _bonusRateData) {
|
|
105
|
-
const _latestBonusRate =
|
|
106
|
-
|
|
107
|
-
const _highestBonusRate = Math.max(
|
|
108
|
-
_get(_bonusRateData, 'highestYearBonusRate') || 0,
|
|
109
|
-
_get(_bonusRateData, 'highestEndBonusRate') || 0
|
|
110
|
-
);
|
|
106
|
+
const _latestBonusRate = _get(_bonusRateData, 'latestYearBonusRate') || _get(_bonusRateData, 'latestEndBonusRate')
|
|
107
|
+
const _highestBonusRate = Math.max(_get(_bonusRateData, 'highestYearBonusRate') || 0, _get(_bonusRateData, 'highestEndBonusRate') || 0)
|
|
111
108
|
if (_latestBonusRate) {
|
|
112
|
-
const _customBonusRate = _get(formValue, 'customBonusRate') || _latestBonusRate
|
|
109
|
+
const _customBonusRate = _get(formValue, 'customBonusRate') || _latestBonusRate
|
|
113
110
|
_bonusOptions.push({
|
|
114
111
|
value: '_custom',
|
|
115
112
|
description: `红利实现率${_customBonusRate ? ` ${_customBonusRate}%` : ''}`
|
|
116
|
-
})
|
|
117
|
-
_bonusItem.maxlength = 3
|
|
118
|
-
_bonusItem.placeholder = `0 - ${_highestBonusRate}
|
|
119
|
-
_bonusItem.recommendValue = _latestBonusRate
|
|
120
|
-
_bonusItem.maxValue = _highestBonusRate
|
|
121
|
-
_bonusItem.tips = `以官网最近红利实现率${_latestBonusRate}
|
|
113
|
+
})
|
|
114
|
+
_bonusItem.maxlength = 3
|
|
115
|
+
_bonusItem.placeholder = `0 - ${_highestBonusRate}`
|
|
116
|
+
_bonusItem.recommendValue = _latestBonusRate
|
|
117
|
+
_bonusItem.maxValue = _highestBonusRate
|
|
118
|
+
_bonusItem.tips = `以官网最近红利实现率${_latestBonusRate}%演示`
|
|
122
119
|
}
|
|
123
120
|
}
|
|
124
|
-
_items.push(_bonusItem)
|
|
121
|
+
_items.push(_bonusItem)
|
|
125
122
|
}
|
|
126
123
|
|
|
127
|
-
const _initFormValues = initInterestFormValues(params, interestInitData)
|
|
128
|
-
const _rateOptions = cloneDeep(_get(interestInitData, 'rate.opts', []) || [])
|
|
129
|
-
const _rateLength = _get(interestInitData, 'rate.opts.length')
|
|
130
|
-
const _customOption3 = _get(_rateOptions, '[3]')
|
|
124
|
+
const _initFormValues = initInterestFormValues(params, interestInitData)
|
|
125
|
+
const _rateOptions = cloneDeep(_get(interestInitData, 'rate.opts', []) || [])
|
|
126
|
+
const _rateLength = _get(interestInitData, 'rate.opts.length')
|
|
127
|
+
const _customOption3 = _get(_rateOptions, '[3]')
|
|
131
128
|
if (_rateLength) {
|
|
132
|
-
const _lastHistoryRate = _get(historyRateList, `[${historyRateList.length - 1}].rate`)
|
|
133
|
-
const _customRate = _get(formValue, 'customRate') || _lastHistoryRate
|
|
129
|
+
const _lastHistoryRate = _get(historyRateList, `[${historyRateList.length - 1}].rate`)
|
|
130
|
+
const _customRate = _get(formValue, 'customRate') || _lastHistoryRate
|
|
134
131
|
const _rateItem = {
|
|
135
132
|
key: 'rate',
|
|
136
133
|
stat: 'zjlqblyqh',
|
|
@@ -141,111 +138,101 @@ export default {
|
|
|
141
138
|
placeholder: `0.00 - ${MAX_RATE_VALUE.toFixed(2)}`,
|
|
142
139
|
tips: _lastHistoryRate ? `以官网最近账户利率${_lastHistoryRate.toFixed(2)}%演示` : '',
|
|
143
140
|
options: _rateOptions
|
|
144
|
-
}
|
|
141
|
+
}
|
|
145
142
|
|
|
146
|
-
const _isShowcustomRateOption = _get(_initFormValues, 'customRate') && _customOption3
|
|
143
|
+
const _isShowcustomRateOption = _get(_initFormValues, 'customRate') && _customOption3
|
|
147
144
|
if (_isShowcustomRateOption) {
|
|
148
|
-
_customOption3.value = '_custom'
|
|
149
|
-
_customOption3.description = _customOption3.description.replace(
|
|
150
|
-
/(\d|\.)+/,
|
|
151
|
-
!isNaN(Number(_customRate)) ? ` ${_customRate.toFixed(2)}` : ''
|
|
152
|
-
);
|
|
145
|
+
_customOption3.value = '_custom'
|
|
146
|
+
_customOption3.description = _customOption3.description.replace(/(\d|\.)+/, !isNaN(Number(_customRate)) ? ` ${_customRate.toFixed(2)}` : '')
|
|
153
147
|
}
|
|
154
148
|
|
|
155
|
-
_items.push(_rateItem)
|
|
149
|
+
_items.push(_rateItem)
|
|
156
150
|
}
|
|
157
|
-
return _items
|
|
151
|
+
return _items
|
|
158
152
|
}
|
|
159
153
|
},
|
|
160
154
|
methods: {
|
|
161
155
|
onClickOptions(item, option) {
|
|
162
|
-
const { formValue } = this
|
|
163
|
-
const oFormValue = cloneDeep(formValue)
|
|
164
|
-
formValue[item.key] = option.value
|
|
165
|
-
const _recommendValue = _get(item, 'recommendValue')
|
|
156
|
+
const { formValue } = this
|
|
157
|
+
const oFormValue = cloneDeep(formValue)
|
|
158
|
+
formValue[item.key] = option.value
|
|
159
|
+
const _recommendValue = _get(item, 'recommendValue')
|
|
166
160
|
if (option.value === '_custom') {
|
|
167
161
|
if (item.key === 'bonus') {
|
|
168
162
|
if (!formValue.customBonusRate && _recommendValue) {
|
|
169
|
-
formValue.customBonusRate = _recommendValue
|
|
163
|
+
formValue.customBonusRate = _recommendValue
|
|
170
164
|
}
|
|
171
165
|
}
|
|
172
166
|
if (item.key === 'rate') {
|
|
173
167
|
if (!formValue.customRate && _recommendValue) {
|
|
174
|
-
formValue.customRate = _recommendValue
|
|
168
|
+
formValue.customRate = _recommendValue
|
|
175
169
|
}
|
|
176
170
|
}
|
|
177
171
|
}
|
|
178
|
-
this.$emit('change', formValue, oFormValue)
|
|
172
|
+
this.$emit('change', formValue, oFormValue)
|
|
179
173
|
},
|
|
180
174
|
onClickRecommendValue(item) {
|
|
181
|
-
const { formValue, historyRateList } = this
|
|
182
|
-
const _recommendValue = _get(item, 'recommendValue')
|
|
175
|
+
const { formValue, historyRateList } = this
|
|
176
|
+
const _recommendValue = _get(item, 'recommendValue')
|
|
183
177
|
if (_recommendValue) {
|
|
184
178
|
if (item.key === 'bonus') {
|
|
185
|
-
formValue.customBonusRate = _recommendValue
|
|
179
|
+
formValue.customBonusRate = _recommendValue
|
|
186
180
|
}
|
|
187
181
|
if (item.key === 'rate') {
|
|
188
|
-
const _lastHistoryRate = _get(historyRateList, `[${historyRateList.length - 1}].rate`)
|
|
189
|
-
formValue.customRate = _lastHistoryRate
|
|
182
|
+
const _lastHistoryRate = _get(historyRateList, `[${historyRateList.length - 1}].rate`)
|
|
183
|
+
formValue.customRate = _lastHistoryRate
|
|
190
184
|
}
|
|
191
185
|
}
|
|
192
|
-
this.$emit('change', formValue)
|
|
186
|
+
this.$emit('change', formValue)
|
|
193
187
|
},
|
|
194
188
|
onInputItemValue(item) {
|
|
195
|
-
const { formValue } = this
|
|
196
|
-
const _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate'
|
|
189
|
+
const { formValue } = this
|
|
190
|
+
const _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate'
|
|
197
191
|
if (formValue[_key]) {
|
|
198
192
|
if (item.key === 'bonus') {
|
|
199
193
|
if (!/^\d{1,3}$/.test(formValue[_key])) {
|
|
200
|
-
formValue[_key] = null
|
|
194
|
+
formValue[_key] = null
|
|
201
195
|
}
|
|
202
196
|
}
|
|
203
197
|
if (item.key === 'rate') {
|
|
204
198
|
if (!/^\d?\.?\d{0,2}$/.test(formValue[_key])) {
|
|
205
|
-
formValue[_key] = null
|
|
199
|
+
formValue[_key] = null
|
|
206
200
|
}
|
|
207
201
|
}
|
|
208
202
|
}
|
|
209
203
|
},
|
|
210
204
|
onChangeItemValue(item) {
|
|
211
|
-
const { cpFormValue } = this
|
|
212
|
-
const _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate'
|
|
205
|
+
const { cpFormValue } = this
|
|
206
|
+
const _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate'
|
|
213
207
|
if (item.maxValue && cpFormValue[_key] > item.maxValue) {
|
|
214
|
-
cpFormValue[_key] = item.maxValue
|
|
208
|
+
cpFormValue[_key] = item.maxValue
|
|
215
209
|
}
|
|
216
210
|
return this.validate([item.key])
|
|
217
211
|
.then(() => {
|
|
218
|
-
this.$emit('change', this.cpFormValue)
|
|
212
|
+
this.$emit('change', this.cpFormValue)
|
|
219
213
|
})
|
|
220
214
|
.catch(err => {
|
|
221
|
-
Toast(err)
|
|
222
|
-
})
|
|
215
|
+
Toast(err)
|
|
216
|
+
})
|
|
223
217
|
},
|
|
224
218
|
validate(keys) {
|
|
225
|
-
const { formValue, interestInitData, interestItems, MAX_RATE_VALUE } = this
|
|
226
|
-
const _keys = keys || (interestItems || []).map(e => e.key)
|
|
227
|
-
const _bonusRateData = _get(interestInitData, 'bonusRateData')
|
|
228
|
-
const _highestBonusRate = Math.max(
|
|
229
|
-
_get(_bonusRateData, 'highestYearBonusRate') || 0,
|
|
230
|
-
_get(_bonusRateData, 'highestEndBonusRate') || 0
|
|
231
|
-
);
|
|
219
|
+
const { formValue, interestInitData, interestItems, MAX_RATE_VALUE } = this
|
|
220
|
+
const _keys = keys || (interestItems || []).map(e => e.key)
|
|
221
|
+
const _bonusRateData = _get(interestInitData, 'bonusRateData')
|
|
222
|
+
const _highestBonusRate = Math.max(_get(_bonusRateData, 'highestYearBonusRate') || 0, _get(_bonusRateData, 'highestEndBonusRate') || 0)
|
|
232
223
|
for (const k in _keys) {
|
|
233
|
-
const _key = _keys[k]
|
|
224
|
+
const _key = _keys[k]
|
|
234
225
|
if (formValue[_key] === '_custom') {
|
|
235
226
|
if (_key === 'bonus' && formValue.customBonusRate && formValue.customBonusRate > _highestBonusRate) {
|
|
236
|
-
return Promise.reject(`红利实现率不能大于${_highestBonusRate}%`)
|
|
227
|
+
return Promise.reject(`红利实现率不能大于${_highestBonusRate}%`)
|
|
237
228
|
}
|
|
238
229
|
if (_key === 'rate' && formValue.customRate && formValue.customRate > MAX_RATE_VALUE) {
|
|
239
|
-
return Promise.reject(`账户利率不能大于${MAX_RATE_VALUE.toFixed(2)}%`)
|
|
230
|
+
return Promise.reject(`账户利率不能大于${MAX_RATE_VALUE.toFixed(2)}%`)
|
|
240
231
|
}
|
|
241
232
|
}
|
|
242
233
|
}
|
|
243
|
-
return Promise.resolve(formValue)
|
|
234
|
+
return Promise.resolve(formValue)
|
|
244
235
|
}
|
|
245
236
|
}
|
|
246
|
-
}
|
|
237
|
+
}
|
|
247
238
|
</script>
|
|
248
|
-
|
|
249
|
-
<style>
|
|
250
|
-
@import './interest-items.css';
|
|
251
|
-
</style>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.bxt_aat_interest_table {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow-x: auto;
|
|
4
|
+
|
|
5
|
+
&::-webkit-scrollbar {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&::after {
|
|
10
|
+
content: '';
|
|
11
|
+
display: block;
|
|
12
|
+
height: calc(59px + env(safe-area-inset-bottom));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
& table {
|
|
16
|
+
width: 100%;
|
|
17
|
+
table-layout: fixed;
|
|
18
|
+
border-collapse: separate;
|
|
19
|
+
border-spacing: 0;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
color: var(--bxt-text-primary);
|
|
22
|
+
text-align: left;
|
|
23
|
+
|
|
24
|
+
& tr {
|
|
25
|
+
& td {
|
|
26
|
+
padding: 6px 4px;
|
|
27
|
+
border-top: 1px solid var(--bxt-line-split);
|
|
28
|
+
border-left: 1px solid var(--bxt-line-split);
|
|
29
|
+
box-sizing: content-box;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
|
|
32
|
+
& .bxt_aatit_purpose,
|
|
33
|
+
& .bxt_aatit_purpose2 {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
margin-left: 2px;
|
|
36
|
+
padding: 2px 2px;
|
|
37
|
+
line-height: 100%;
|
|
38
|
+
color: var(--bxt-primary);
|
|
39
|
+
border-radius: 2px;
|
|
40
|
+
background: rgba(10, 100, 254, 0.1);
|
|
41
|
+
transform: scale(0.8333);
|
|
42
|
+
transform-origin: left center;
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& td:nth-child(1),
|
|
48
|
+
& td:nth-child(2) {
|
|
49
|
+
width: 1.8em;
|
|
50
|
+
color: var(--bxt-text-patch);
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
& td:nth-child(3),
|
|
55
|
+
& td:nth-child(4) {
|
|
56
|
+
width: 5.5em;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
& td:last-child {
|
|
60
|
+
border-right: 1px solid var(--bxt-line-split);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& td.edit {
|
|
64
|
+
color: var(--bxt-primary);
|
|
65
|
+
text-decoration: underline;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
& td.disabled {
|
|
69
|
+
color: var(--bxt-text-disabled);
|
|
70
|
+
text-decoration: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
& td.year {
|
|
74
|
+
position: sticky;
|
|
75
|
+
left: 0;
|
|
76
|
+
z-index: 1;
|
|
77
|
+
will-change: scroll-position;
|
|
78
|
+
background: white;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
& td.age {
|
|
82
|
+
position: sticky;
|
|
83
|
+
left: calc(2em + 8px);
|
|
84
|
+
z-index: 1;
|
|
85
|
+
will-change: scroll-position;
|
|
86
|
+
background: white;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
& tr:first-child {
|
|
91
|
+
position: sticky;
|
|
92
|
+
top: 0;
|
|
93
|
+
z-index: 2;
|
|
94
|
+
will-change: scroll-position;
|
|
95
|
+
|
|
96
|
+
& td {
|
|
97
|
+
font-weight: bold;
|
|
98
|
+
text-align: center;
|
|
99
|
+
background-color: #f2f3f5;
|
|
100
|
+
border: 0;
|
|
101
|
+
white-space: normal;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
& tr:last-child {
|
|
106
|
+
& td {
|
|
107
|
+
border-bottom: 1px solid var(--bxt-line-split);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
</template>
|
|
70
70
|
|
|
71
71
|
<script>
|
|
72
|
-
import { get as _get, cloneDeep } from 'lodash'
|
|
73
|
-
import { formatNumberToThousand } from 'packages/bxs-utils/planbook/index'
|
|
74
|
-
import { calcColumnsWidth } from '../handler'
|
|
75
|
-
import './interest-table.
|
|
72
|
+
import { get as _get, cloneDeep } from 'lodash'
|
|
73
|
+
import { formatNumberToThousand } from 'packages/bxs-utils/planbook/index'
|
|
74
|
+
import { calcColumnsWidth } from '../handler'
|
|
75
|
+
import './interest-table.less'
|
|
76
76
|
|
|
77
77
|
export default {
|
|
78
78
|
props: {
|
|
@@ -92,65 +92,65 @@ export default {
|
|
|
92
92
|
},
|
|
93
93
|
computed: {
|
|
94
94
|
detailData() {
|
|
95
|
-
const self = this
|
|
96
|
-
const { type, addAndTakeDetailData } = self
|
|
97
|
-
const detailKeys = type === 'reduceBaof' ? ['draw_max'] : ['take_max']
|
|
98
|
-
const detailData = cloneDeep(addAndTakeDetailData || []).filter(d => !detailKeys.includes(d.key))
|
|
95
|
+
const self = this
|
|
96
|
+
const { type, addAndTakeDetailData } = self
|
|
97
|
+
const detailKeys = type === 'reduceBaof' ? ['draw_max'] : ['take_max']
|
|
98
|
+
const detailData = cloneDeep(addAndTakeDetailData || []).filter(d => !detailKeys.includes(d.key))
|
|
99
99
|
detailData.forEach(d => {
|
|
100
|
-
d.values = d.values && d.values.map(v => (v ? Math.round(v) : v))
|
|
101
|
-
})
|
|
102
|
-
return detailData
|
|
100
|
+
d.values = d.values && d.values.map(v => (v ? Math.round(v) : v))
|
|
101
|
+
})
|
|
102
|
+
return detailData
|
|
103
103
|
},
|
|
104
104
|
addAndTakeTable() {
|
|
105
|
-
const { insuredAge, interestInitData, detailData } = this
|
|
105
|
+
const { insuredAge, interestInitData, detailData } = this
|
|
106
106
|
if (!interestInitData || !detailData.length) {
|
|
107
|
-
return []
|
|
107
|
+
return []
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
const tableHeaderData = {
|
|
111
111
|
year: '年度',
|
|
112
112
|
age: '年龄'
|
|
113
|
-
}
|
|
113
|
+
}
|
|
114
114
|
detailData.forEach((d, i) => {
|
|
115
115
|
// 为解决接口返回的数组中key相同的问题
|
|
116
116
|
if (!['add', 'take', 'draw_value', 'draw_value2'].includes(d.key)) {
|
|
117
|
-
d.uniKey = `${d.key}_${i}
|
|
117
|
+
d.uniKey = `${d.key}_${i}`
|
|
118
118
|
}
|
|
119
|
-
tableHeaderData[d.uniKey || d.key] = (d.name || '').replace(/([((](.*)[))])$/, '<br/>$1')
|
|
120
|
-
})
|
|
119
|
+
tableHeaderData[d.uniKey || d.key] = (d.name || '').replace(/([((](.*)[))])$/, '<br/>$1')
|
|
120
|
+
})
|
|
121
121
|
|
|
122
|
-
const { startPolicyNo, startIndex, reduceIndex } = interestInitData
|
|
123
|
-
const maxlength = detailData.reduce((a, b) => Math.max(a, b.values ? b.values.length : 0), 0)
|
|
124
|
-
let tableData = []
|
|
122
|
+
const { startPolicyNo, startIndex, reduceIndex } = interestInitData
|
|
123
|
+
const maxlength = detailData.reduce((a, b) => Math.max(a, b.values ? b.values.length : 0), 0)
|
|
124
|
+
let tableData = []
|
|
125
125
|
for (let i = 0; i < maxlength; i++) {
|
|
126
126
|
const record = {
|
|
127
127
|
year: i + (startPolicyNo || 1), // 年度
|
|
128
128
|
age: insuredAge + (startIndex || 0) + i + 1 // 年龄
|
|
129
|
-
}
|
|
129
|
+
}
|
|
130
130
|
detailData.map(item => {
|
|
131
131
|
if (item.values) {
|
|
132
|
-
record[item.uniKey || item.key] = formatNumberToThousand(item.values[i] || 0)
|
|
132
|
+
record[item.uniKey || item.key] = formatNumberToThousand(item.values[i] || 0)
|
|
133
133
|
}
|
|
134
134
|
if (item.details) {
|
|
135
135
|
if (item.key === 'draw_value2') {
|
|
136
|
-
record.purpose2 = item.details[i] || ''
|
|
136
|
+
record.purpose2 = item.details[i] || ''
|
|
137
137
|
} else {
|
|
138
|
-
record.purpose = item.details[i] || ''
|
|
138
|
+
record.purpose = item.details[i] || ''
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
})
|
|
142
|
-
tableData.push(record)
|
|
141
|
+
})
|
|
142
|
+
tableData.push(record)
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
if (reduceIndex) {
|
|
146
|
-
tableData = tableData.filter(e => e.year > reduceIndex)
|
|
146
|
+
tableData = tableData.filter(e => e.year > reduceIndex)
|
|
147
147
|
}
|
|
148
|
-
tableData.unshift(tableHeaderData)
|
|
149
|
-
return tableData
|
|
148
|
+
tableData.unshift(tableHeaderData)
|
|
149
|
+
return tableData
|
|
150
150
|
},
|
|
151
151
|
columnWidthObj() {
|
|
152
|
-
return calcColumnsWidth(this.addAndTakeTable)
|
|
152
|
+
return calcColumnsWidth(this.addAndTakeTable)
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
}
|
|
155
|
+
}
|
|
156
156
|
</script>
|