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
|
@@ -113,15 +113,16 @@
|
|
|
113
113
|
</div>
|
|
114
114
|
</template>
|
|
115
115
|
<script lang="ts">
|
|
116
|
-
import Vue from 'vue'
|
|
117
|
-
import { get as _get } from 'lodash'
|
|
118
|
-
import { Component, Prop } from 'vue-property-decorator'
|
|
119
|
-
import { convertEleOrderListToObj, personDataHandler
|
|
120
|
-
import CommonTitle from '
|
|
121
|
-
import CommonRadio from '
|
|
122
|
-
import CommonSelect from '
|
|
123
|
-
import CommonAgeBirthday from '
|
|
124
|
-
import CrmPopup from 'packages/person-info/crm-popup.vue'
|
|
116
|
+
import Vue from 'vue'
|
|
117
|
+
import { get as _get } from 'lodash'
|
|
118
|
+
import { Component, Prop } from 'vue-property-decorator'
|
|
119
|
+
import { convertEleOrderListToObj, personDataHandler } from 'packages/bxs-utils/index'
|
|
120
|
+
import CommonTitle from '../../src/components/common/common-title.vue'
|
|
121
|
+
import CommonRadio from '../../src/components/common/common-radio.vue'
|
|
122
|
+
import CommonSelect from '../../src/components/common/common-select.vue'
|
|
123
|
+
import CommonAgeBirthday from '../../src/components/common/common-age-birthday.vue'
|
|
124
|
+
import CrmPopup from 'packages/person-info/crm-popup.vue'
|
|
125
|
+
import './index-inline.less'
|
|
125
126
|
|
|
126
127
|
@Component({
|
|
127
128
|
name: 'BxtPersonInfo',
|
|
@@ -134,145 +135,114 @@ import CrmPopup from 'packages/person-info/crm-popup.vue';
|
|
|
134
135
|
}
|
|
135
136
|
})
|
|
136
137
|
export default class BxtPersonInfo extends Vue {
|
|
137
|
-
isShowCrmPersonPop = false
|
|
138
|
+
isShowCrmPersonPop = false
|
|
138
139
|
@Prop({
|
|
139
140
|
default: () => ({})
|
|
140
141
|
})
|
|
141
|
-
|
|
142
|
+
user: any
|
|
142
143
|
|
|
143
144
|
@Prop({
|
|
144
145
|
default: () => ({})
|
|
145
146
|
})
|
|
146
|
-
|
|
147
|
+
inputData: any
|
|
147
148
|
|
|
148
149
|
@Prop({
|
|
149
150
|
default: () => ({})
|
|
150
151
|
})
|
|
151
|
-
|
|
152
|
+
verifyData: any
|
|
152
153
|
|
|
153
154
|
@Prop({
|
|
154
155
|
default: () => ({})
|
|
155
156
|
})
|
|
156
|
-
|
|
157
|
+
personData: any
|
|
158
|
+
|
|
159
|
+
@Prop({
|
|
160
|
+
default: () => ({})
|
|
161
|
+
})
|
|
162
|
+
params: any
|
|
157
163
|
|
|
158
164
|
@Prop({
|
|
159
165
|
default: false
|
|
160
166
|
})
|
|
161
|
-
isShowCrmPerson!: boolean
|
|
167
|
+
isShowCrmPerson!: boolean
|
|
162
168
|
|
|
163
169
|
get personForm() {
|
|
164
|
-
return convertEleOrderListToObj(this.personData)
|
|
170
|
+
return convertEleOrderListToObj(this.personData)
|
|
165
171
|
}
|
|
166
172
|
|
|
167
173
|
get birthdayElement() {
|
|
168
|
-
const elementList = _get(this, 'personData.eleOrderList') || []
|
|
169
|
-
const element = elementList.find(e => e.key === 'birthday')
|
|
170
|
-
return element
|
|
174
|
+
const elementList = _get(this, 'personData.eleOrderList') || []
|
|
175
|
+
const element = elementList.find(e => e.key === 'birthday')
|
|
176
|
+
return element
|
|
171
177
|
}
|
|
172
178
|
|
|
173
179
|
isShowPersonElement(person, ele) {
|
|
174
|
-
const title = person.eleOrderList.find(e => e.key === 'title')
|
|
175
|
-
let bool = title && title.value
|
|
180
|
+
const title = person.eleOrderList.find(e => e.key === 'title')
|
|
181
|
+
let bool = title && title.value
|
|
176
182
|
if (!bool) {
|
|
177
|
-
return false
|
|
183
|
+
return false
|
|
178
184
|
}
|
|
179
185
|
if (person.key === 'applicantInfo' && ele.key !== 'applicantAndInsuredSame') {
|
|
180
|
-
const applicantSame = person.eleOrderList.find(e => e.key === 'applicantAndInsuredSame')
|
|
186
|
+
const applicantSame = person.eleOrderList.find(e => e.key === 'applicantAndInsuredSame')
|
|
181
187
|
if (applicantSame) {
|
|
182
|
-
bool = !applicantSame.value
|
|
188
|
+
bool = !applicantSame.value
|
|
183
189
|
}
|
|
184
190
|
}
|
|
185
|
-
return bool
|
|
191
|
+
return bool
|
|
186
192
|
}
|
|
187
193
|
onClickLabel(ele) {
|
|
188
|
-
this.$emit('clickLabel', this.personData, ele)
|
|
194
|
+
this.$emit('clickLabel', this.personData, ele)
|
|
189
195
|
}
|
|
190
196
|
onClickIcon(id) {
|
|
191
|
-
const inputDom: any = document.querySelector(`#${id}`)
|
|
192
|
-
inputDom.focus()
|
|
197
|
+
const inputDom: any = document.querySelector(`#${id}`)
|
|
198
|
+
inputDom.focus()
|
|
193
199
|
}
|
|
194
200
|
async change(ele: any = {}) {
|
|
195
|
-
const { inputData, personData
|
|
201
|
+
const { inputData, personData } = this
|
|
196
202
|
if (!inputData) {
|
|
197
|
-
return
|
|
203
|
+
return
|
|
198
204
|
}
|
|
199
|
-
const allPersonsData = inputData.personData
|
|
200
|
-
const productGroupList = inputData.productGroupList || [];
|
|
201
|
-
const eventTarget = {
|
|
202
|
-
personKey: personData.key,
|
|
203
|
-
elementKey: ele.key
|
|
204
|
-
};
|
|
205
|
-
|
|
205
|
+
const allPersonsData = inputData.personData
|
|
206
206
|
if (allPersonsData) {
|
|
207
|
-
personDataHandler(allPersonsData)
|
|
207
|
+
personDataHandler(allPersonsData)
|
|
208
208
|
if (personData.key === 'applicantInfo') {
|
|
209
209
|
if (ele.key === 'applicantAndInsuredSame' && !ele.value) {
|
|
210
|
-
personData.cid = null
|
|
210
|
+
personData.cid = null
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
const promises: any = [];
|
|
215
|
-
productGroupList
|
|
216
|
-
.filter(g => g.prodOrderList)
|
|
217
|
-
.forEach(g => {
|
|
218
|
-
g.prodOrderList.map(p => {
|
|
219
|
-
clearAddAndTakeAndAdjustBaoeData(p);
|
|
220
|
-
promises.push(
|
|
221
|
-
productDataHandler(p, _get(verifyData, `[${p.key}]`), allPersonsData, {
|
|
222
|
-
planbookId: _get(params, 'planbookId'),
|
|
223
|
-
eventTarget
|
|
224
|
-
})
|
|
225
|
-
);
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
await Promise.all(promises);
|
|
229
213
|
}
|
|
230
214
|
if (personData.key && ele.key && !['age'].includes(ele.key)) {
|
|
231
|
-
window.WeiyiStatSDK && window.WeiyiStatSDK.submit(`${personData.key}_${ele.key}`)
|
|
215
|
+
window.WeiyiStatSDK && window.WeiyiStatSDK.submit(`${personData.key}_${ele.key}`)
|
|
232
216
|
}
|
|
233
|
-
this.$emit('change', personData, ele)
|
|
217
|
+
this.$emit('change', personData, ele)
|
|
234
218
|
}
|
|
235
219
|
validate() {
|
|
236
220
|
if (!this.personForm.title) {
|
|
237
|
-
return Promise.resolve()
|
|
221
|
+
return Promise.resolve()
|
|
238
222
|
}
|
|
239
223
|
return new Promise((resolve, reject) => {
|
|
240
|
-
const refPersonForm: any = this.$refs.personForm
|
|
224
|
+
const refPersonForm: any = this.$refs.personForm
|
|
241
225
|
return refPersonForm
|
|
242
226
|
?.validate()
|
|
243
227
|
.then(valid => {
|
|
244
228
|
if (!valid) {
|
|
245
|
-
resolve(valid)
|
|
246
|
-
return
|
|
229
|
+
resolve(valid)
|
|
230
|
+
return
|
|
247
231
|
}
|
|
248
|
-
reject()
|
|
232
|
+
reject()
|
|
249
233
|
})
|
|
250
234
|
.catch(err => {
|
|
251
|
-
reject(err)
|
|
252
|
-
})
|
|
253
|
-
})
|
|
235
|
+
reject(err)
|
|
236
|
+
})
|
|
237
|
+
})
|
|
254
238
|
}
|
|
255
239
|
closeKeyBoard() {
|
|
256
|
-
const activeElement: any = document.activeElement
|
|
240
|
+
const activeElement: any = document.activeElement
|
|
257
241
|
if (!activeElement) {
|
|
258
|
-
return false
|
|
242
|
+
return false
|
|
259
243
|
}
|
|
260
|
-
activeElement.blur()
|
|
261
|
-
return false
|
|
244
|
+
activeElement.blur()
|
|
245
|
+
return false
|
|
262
246
|
}
|
|
263
247
|
}
|
|
264
248
|
</script>
|
|
265
|
-
<style lang="postcss">
|
|
266
|
-
@import 'base.css';
|
|
267
|
-
@import 'color.css';
|
|
268
|
-
|
|
269
|
-
.bxt-person-info {
|
|
270
|
-
& .van-form {
|
|
271
|
-
background: #fff;
|
|
272
|
-
|
|
273
|
-
& .van-cell::after {
|
|
274
|
-
border-bottom: 0;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
</style>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
计划书投保页的人员信息模块,基于服务端下发的 `eleOrderList` 动态渲染表单元素,支持性别、年龄、生日等字段的展示与编辑。
|
|
4
4
|
|
|
5
5
|
> 数据来源:访问[计划书初始化 API](http://app.winbaoxian.cn/planBook/V2/getInitData?insuranceTypeId=6128) 查看示例数据。
|
|
6
|
+
>
|
|
6
7
|
> - `inputData`:`data → initData → inputData`
|
|
7
8
|
> - `verifyData`:`data → verifyData`
|
|
8
9
|
> - `personData`:`data → initData → inputData → personData → personOrderList[0]`
|
|
@@ -26,90 +27,85 @@ export default {
|
|
|
26
27
|
|
|
27
28
|
```html
|
|
28
29
|
<template>
|
|
29
|
-
<PersonInfo
|
|
30
|
-
:input-data="inputData"
|
|
31
|
-
:verify-data="verifyData"
|
|
32
|
-
:person-data="personData"
|
|
33
|
-
@change="changePersonInfo"
|
|
34
|
-
/>
|
|
30
|
+
<PersonInfo :input-data="inputData" :verify-data="verifyData" :person-data="personData" @change="changePersonInfo" />
|
|
35
31
|
</template>
|
|
36
32
|
|
|
37
33
|
<script>
|
|
38
|
-
import { PersonInfo } from 'bxs-tools-ui';
|
|
39
|
-
|
|
40
|
-
export default {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
34
|
+
import { PersonInfo } from 'bxs-tools-ui';
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
components: { PersonInfo },
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
inputData: null,
|
|
41
|
+
verifyData: null,
|
|
42
|
+
personData: {
|
|
43
|
+
eleOrderList: [
|
|
44
|
+
{
|
|
45
|
+
isImport: true,
|
|
46
|
+
value: true,
|
|
47
|
+
key: 'title',
|
|
48
|
+
isDisabled: false,
|
|
49
|
+
componentName: 'cmCommonTitle',
|
|
50
|
+
label: '投保人信息'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: 'applicantAndInsuredSame',
|
|
54
|
+
value: 0,
|
|
55
|
+
label: '投被保人',
|
|
56
|
+
componentName: 'cmCommonRadio',
|
|
57
|
+
options: [
|
|
58
|
+
{ val: 0, desc: '非同一人' },
|
|
59
|
+
{ val: 1, desc: '是同一人' }
|
|
60
|
+
],
|
|
61
|
+
isDisabled: null,
|
|
62
|
+
isHide: null
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
value: 1,
|
|
66
|
+
key: 'sex',
|
|
67
|
+
label: '性别',
|
|
68
|
+
componentName: 'cmCommonRadio',
|
|
69
|
+
options: [
|
|
70
|
+
{ val: 1, desc: '男' },
|
|
71
|
+
{ val: 2, desc: '女' }
|
|
72
|
+
],
|
|
73
|
+
isDisabled: false,
|
|
74
|
+
isHide: false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
value: 30,
|
|
78
|
+
key: 'age',
|
|
79
|
+
label: '年龄',
|
|
80
|
+
componentName: 'cmCommonSelect',
|
|
81
|
+
placeholder: '请选择年龄',
|
|
82
|
+
options: [
|
|
83
|
+
{ val: 18, desc: '18岁' },
|
|
84
|
+
{ val: 19, desc: '19岁' }
|
|
85
|
+
],
|
|
86
|
+
isHide: false
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: 'birthday',
|
|
90
|
+
value: null,
|
|
91
|
+
label: '生日',
|
|
92
|
+
componentName: 'cmCommonDate',
|
|
93
|
+
placeholder: '请选择生日',
|
|
94
|
+
minDate: new Date(2000, 0, 1),
|
|
95
|
+
maxDate: new Date(),
|
|
96
|
+
defaulValue: new Date(2020, 11, 1),
|
|
97
|
+
isHide: false
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
changePersonInfo(personData, eleData) {
|
|
105
|
+
console.log(`${eleData.label} -> ${eleData.value}`);
|
|
104
106
|
}
|
|
105
|
-
};
|
|
106
|
-
},
|
|
107
|
-
methods: {
|
|
108
|
-
changePersonInfo(personData, eleData) {
|
|
109
|
-
console.log(`${eleData.label} -> ${eleData.value}`);
|
|
110
107
|
}
|
|
111
|
-
}
|
|
112
|
-
};
|
|
108
|
+
};
|
|
113
109
|
</script>
|
|
114
110
|
```
|
|
115
111
|
|
|
@@ -117,55 +113,53 @@ export default {
|
|
|
117
113
|
|
|
118
114
|
### Attributes
|
|
119
115
|
|
|
120
|
-
| 参数
|
|
121
|
-
|
|
|
122
|
-
| `input-data`
|
|
123
|
-
| `person-data`
|
|
124
|
-
| `verify-data`
|
|
125
|
-
| `is-show-crm-person` | 可选,是否显示修改 CRM 人员信息的按钮
|
|
126
|
-
| `params`
|
|
127
|
-
|
|
116
|
+
| 参数 | 说明 | 类型 | 默认值 |
|
|
117
|
+
| -------------------- | ---------------------------------------------------------------- | ------- | ------- |
|
|
118
|
+
| `input-data` | 必传,计划书初始化数据;不传则不执行模块内部的人员逻辑与产品逻辑 | Object | `{}` |
|
|
119
|
+
| `person-data` | 必传,人员数据结构,见 PersonData 对象 | Object | `{}` |
|
|
120
|
+
| `verify-data` | 可选,计划书限制条件;不传则不执行模块内部的产品逻辑 | Object | `{}` |
|
|
121
|
+
| `is-show-crm-person` | 可选,是否显示修改 CRM 人员信息的按钮 | Boolean | `false` |
|
|
122
|
+
| `params` | 可选,附加信息 | Object | `{}` |
|
|
128
123
|
|
|
129
124
|
#### PersonData 对象
|
|
130
125
|
|
|
131
|
-
| 参数
|
|
132
|
-
|
|
|
133
|
-
| `eleOrderList` | 必传,人员信息的元素数据,见 EleOrderList 数组 | Array | —
|
|
134
|
-
|
|
126
|
+
| 参数 | 说明 | 类型 | 默认值 |
|
|
127
|
+
| -------------- | ---------------------------------------------- | ----- | ------ |
|
|
128
|
+
| `eleOrderList` | 必传,人员信息的元素数据,见 EleOrderList 数组 | Array | — |
|
|
135
129
|
|
|
136
130
|
#### EleOrderList 数组(单项)
|
|
137
131
|
|
|
138
|
-
| 参数
|
|
139
|
-
|
|
|
140
|
-
| `key`
|
|
141
|
-
| `value`
|
|
142
|
-
| `componentName` | 必传,对应渲染组件(`cmCommonTitle` / `cmCommonInput` / `cmCommonRadio` / `cmCommonSelect` / `cmAgeBirthday`) | String
|
|
143
|
-
| `label`
|
|
144
|
-
| `placeholder`
|
|
145
|
-
| `options`
|
|
146
|
-
| `rules`
|
|
147
|
-
| `labelIcon`
|
|
148
|
-
| `maxlength`
|
|
149
|
-
| `minDate`
|
|
150
|
-
| `maxDate`
|
|
151
|
-
| `defaulValue`
|
|
152
|
-
| `isHide`
|
|
153
|
-
| `isDisabled`
|
|
154
|
-
| `isImport`
|
|
132
|
+
| 参数 | 说明 | 类型 | 默认值 |
|
|
133
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------- | --------------- | ------ |
|
|
134
|
+
| `key` | 必传,元素关键字 | String | — |
|
|
135
|
+
| `value` | 必传,元素当前值 | String / Number | — |
|
|
136
|
+
| `componentName` | 必传,对应渲染组件(`cmCommonTitle` / `cmCommonInput` / `cmCommonRadio` / `cmCommonSelect` / `cmAgeBirthday`) | String | — |
|
|
137
|
+
| `label` | 元素名称 | String | — |
|
|
138
|
+
| `placeholder` | 元素占位符 | String | — |
|
|
139
|
+
| `options` | 元素选项列表(`cmCommonRadio` / `cmCommonSelect` / `cmAgeBirthday` 适用) | Array | — |
|
|
140
|
+
| `rules` | 校验规则(基于 vant van-form) | Array | — |
|
|
141
|
+
| `labelIcon` | 标签右侧图标 class 名(`cmCommonInput` 适用) | String | — |
|
|
142
|
+
| `maxlength` | 输入最大长度,默认 9(`cmCommonInput` 适用) | Number | `9` |
|
|
143
|
+
| `minDate` | 日期最小范围(`cmAgeBirthday` 适用) | Date | — |
|
|
144
|
+
| `maxDate` | 日期最大范围(`cmAgeBirthday` 适用) | Date | — |
|
|
145
|
+
| `defaulValue` | 日期默认值(`cmAgeBirthday` 适用) | Date | — |
|
|
146
|
+
| `isHide` | 必传,是否隐藏元素 | Boolean | — |
|
|
147
|
+
| `isDisabled` | 必传,元素值是否不可修改 | Boolean | — |
|
|
148
|
+
| `isImport` | 预留字段 | Boolean | — |
|
|
155
149
|
|
|
156
150
|
---
|
|
157
151
|
|
|
158
152
|
### Methods
|
|
159
153
|
|
|
160
|
-
| 方法名
|
|
161
|
-
|
|
|
162
|
-
| `validate` | 表单校验,通过 `$refs` 调用,返回 Promise;若当前人员的 `title` 为 `false`(折叠状态)则跳过校验 | —
|
|
154
|
+
| 方法名 | 说明 | 参数 |
|
|
155
|
+
| ---------- | ------------------------------------------------------------------------------------------------ | ---- |
|
|
156
|
+
| `validate` | 表单校验,通过 `$refs` 调用,返回 Promise;若当前人员的 `title` 为 `false`(折叠状态)则跳过校验 | — |
|
|
163
157
|
|
|
164
158
|
---
|
|
165
159
|
|
|
166
160
|
### Events
|
|
167
161
|
|
|
168
|
-
| 事件名
|
|
169
|
-
|
|
|
170
|
-
| `change`
|
|
171
|
-
| `clickLabel` | 点击 `cmCommonInput` 元素的标签区域时触发 | `Function(personData, eleData)`
|
|
162
|
+
| 事件名 | 说明 | 回调参数 |
|
|
163
|
+
| ------------ | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
164
|
+
| `change` | 任一元素的值变化时触发 | `Function(personData, eleData)`;`personData` 为 PersonData 对象,`eleData` 为当前变化的元素(EleOrderList 单项) |
|
|
165
|
+
| `clickLabel` | 点击 `cmCommonInput` 元素的标签区域时触发 | `Function(personData, eleData)` |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.bxt-input-footer {
|
|
2
|
+
position: fixed;
|
|
3
|
+
bottom: 0;
|
|
4
|
+
width: 100%;
|
|
5
|
+
z-index: 100;
|
|
6
|
+
border-top: 1px solid var(--bxt-line-split);
|
|
7
|
+
background: var(--bxt-bg-minor);
|
|
8
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
9
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
10
|
+
box-sizing: content-box;
|
|
11
|
+
|
|
12
|
+
& ul {
|
|
13
|
+
display: flex;
|
|
14
|
+
padding: 6px 10px;
|
|
15
|
+
|
|
16
|
+
& li {
|
|
17
|
+
flex: 2;
|
|
18
|
+
|
|
19
|
+
& .bxt-footer-info {
|
|
20
|
+
color: var(--bxt-text-primary);
|
|
21
|
+
|
|
22
|
+
& .bxt-info-title {
|
|
23
|
+
margin-top: 2px;
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
& .bxt-info-baofei {
|
|
28
|
+
font-size: 20px;
|
|
29
|
+
color: var(--bxt-feature-minor);
|
|
30
|
+
|
|
31
|
+
& em {
|
|
32
|
+
font-style: normal;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
& .bxt-footer-btn {
|
|
39
|
+
padding: 10px 12px;
|
|
40
|
+
background: var(--bxt-primary);
|
|
41
|
+
border-radius: 6px;
|
|
42
|
+
color: #fff;
|
|
43
|
+
font-size: 13px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:last-child {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex: 1;
|
|
49
|
+
justify-content: flex-end;
|
|
50
|
+
align-items: center;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -16,9 +16,11 @@
|
|
|
16
16
|
</footer>
|
|
17
17
|
</template>
|
|
18
18
|
<script lang="ts">
|
|
19
|
-
import Vue from 'vue'
|
|
20
|
-
import { Component, Prop } from 'vue-property-decorator'
|
|
21
|
-
import { calcTotalBaof } from 'packages/bxs-utils/index'
|
|
19
|
+
import Vue from 'vue'
|
|
20
|
+
import { Component, Prop } from 'vue-property-decorator'
|
|
21
|
+
import { calcTotalBaof } from 'packages/bxs-utils/index'
|
|
22
|
+
import './footer.less'
|
|
23
|
+
|
|
22
24
|
@Component({
|
|
23
25
|
name: 'BxtInputFooter',
|
|
24
26
|
components: {}
|
|
@@ -27,72 +29,14 @@ export default class BxtInputFooter extends Vue {
|
|
|
27
29
|
@Prop({
|
|
28
30
|
default: () => ({})
|
|
29
31
|
})
|
|
30
|
-
inputData: any
|
|
32
|
+
inputData: any
|
|
31
33
|
|
|
32
34
|
// 计算属性
|
|
33
35
|
get totalBaoFei() {
|
|
34
|
-
return calcTotalBaof(this.inputData.productGroupList)
|
|
36
|
+
return calcTotalBaof(this.inputData.productGroupList)
|
|
35
37
|
}
|
|
36
38
|
createPlanbook() {
|
|
37
|
-
this.$emit('createPlanbook')
|
|
39
|
+
this.$emit('createPlanbook')
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
</script>
|
|
41
|
-
<style lang="postcss">
|
|
42
|
-
@import 'base.css';
|
|
43
|
-
@import '../index.css';
|
|
44
|
-
|
|
45
|
-
.bxt-input-footer {
|
|
46
|
-
position: fixed;
|
|
47
|
-
bottom: 0;
|
|
48
|
-
width: 100%;
|
|
49
|
-
z-index: 100;
|
|
50
|
-
border-top: 1px solid var(--color-line-split);
|
|
51
|
-
background: var(--color-bg-minor);
|
|
52
|
-
padding-bottom: constant(safe-area-inset-bottom);
|
|
53
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
54
|
-
box-sizing: content-box;
|
|
55
|
-
|
|
56
|
-
& ul {
|
|
57
|
-
display: flex;
|
|
58
|
-
padding: 6px 10px;
|
|
59
|
-
|
|
60
|
-
& li {
|
|
61
|
-
flex: 2;
|
|
62
|
-
|
|
63
|
-
& .bxt-footer-info {
|
|
64
|
-
color: var(--color-text-primary);
|
|
65
|
-
|
|
66
|
-
& .bxt-info-title {
|
|
67
|
-
margin-top: 2px;
|
|
68
|
-
font-size: 12px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
& .bxt-info-baofei {
|
|
72
|
-
font-size: 20px;
|
|
73
|
-
color: var(--color-feature-minor);
|
|
74
|
-
|
|
75
|
-
& em {
|
|
76
|
-
font-size: 12px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
& .bxt-footer-btn {
|
|
82
|
-
padding: 10px 12px;
|
|
83
|
-
background: var(--color-primary);
|
|
84
|
-
border-radius: 6px;
|
|
85
|
-
color: #fff;
|
|
86
|
-
font-size: 13px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&:last-child {
|
|
90
|
-
display: flex;
|
|
91
|
-
flex: 1;
|
|
92
|
-
justify-content: flex-end;
|
|
93
|
-
align-items: center;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
</style>
|