bxs-tools-ui 1.3.4 → 1.3.6
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/add-and-take/index.js +6 -7
- package/lib/adjust-baoe/index.js +6 -7
- package/lib/bxs-utils/index.js +464 -465
- package/lib/index.js +68 -43
- package/lib/insure-calculate/index.js +946 -947
- package/lib/person-info/index.js +1290 -1264
- package/lib/product-info/index.js +489 -469
- package/package.json +1 -1
- package/packages/bxs-utils/planbook/person.ts +2 -3
- package/packages/components/form-item/title-item.vue +14 -1
- package/packages/person-info/index.vue +16 -6
- package/packages/product-info/index.vue +1 -2
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ export function initPersonData(inputData : IPbInput, verifyData : any) : void {
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
person.createArchive = person.createArchive || false
|
|
29
|
+
person.cid = person.cid || null
|
|
29
30
|
if (!person.eleOrderList.find(e => e.key === 'name')) {
|
|
30
31
|
person.eleOrderList.splice(1, 0, {
|
|
31
32
|
key: 'name',
|
|
@@ -198,9 +199,7 @@ export function personDataHandler(allPersonsData : IPbPersons) : IPbPersons {
|
|
|
198
199
|
if (['title', 'applicantAndInsuredSame'].includes(ele.key)) {
|
|
199
200
|
return;
|
|
200
201
|
}
|
|
201
|
-
|
|
202
|
-
person.cid = applicantSame.value ? insuredData.cid : undefined
|
|
203
|
-
}
|
|
202
|
+
person.cid = applicantSame.value ? insuredData.cid : person.cid
|
|
204
203
|
if (applicantSame.value && insuredData.eleOrderList) {
|
|
205
204
|
const insuredEle = insuredData.eleOrderList.find(e => e.key === ele.key);
|
|
206
205
|
if (insuredEle) {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
>{{ label }}</span
|
|
18
18
|
>
|
|
19
19
|
<span
|
|
20
|
-
v-if="
|
|
20
|
+
v-if="isShowCrmModifyButton"
|
|
21
21
|
class="bxt-title-persion-modify"
|
|
22
22
|
:data-stat-id="dataStatId"
|
|
23
23
|
@click="$emit('modify')"
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
import Vue from 'vue';
|
|
47
47
|
import { Component, Model, Prop, Watch } from 'vue-property-decorator';
|
|
48
48
|
import { Checkbox } from 'bxs-ui-vue';
|
|
49
|
+
import { convertEleOrderListToObj } from 'packages/bxs-utils/index';
|
|
49
50
|
@Component({
|
|
50
51
|
name: 'BxtTitleItem',
|
|
51
52
|
components: {
|
|
@@ -57,6 +58,11 @@ export default class BxtTitleItem extends Vue {
|
|
|
57
58
|
@Model('input', {})
|
|
58
59
|
value!: boolean;
|
|
59
60
|
|
|
61
|
+
@Prop({
|
|
62
|
+
default: {}
|
|
63
|
+
})
|
|
64
|
+
personData!: any;
|
|
65
|
+
|
|
60
66
|
@Prop({
|
|
61
67
|
default: false
|
|
62
68
|
})
|
|
@@ -99,6 +105,13 @@ export default class BxtTitleItem extends Vue {
|
|
|
99
105
|
watchValue(val: boolean) {
|
|
100
106
|
this.currentValue = val;
|
|
101
107
|
}
|
|
108
|
+
|
|
109
|
+
get isShowCrmModifyButton() {
|
|
110
|
+
const { value, personData, isShowCrmPerson } = this;
|
|
111
|
+
const personInfo = convertEleOrderListToObj(personData);
|
|
112
|
+
return isShowCrmPerson && value && (personData.key === 'insuredInfo' || !personInfo.applicantAndInsuredSame);
|
|
113
|
+
}
|
|
114
|
+
|
|
102
115
|
created() {
|
|
103
116
|
this.currentValue = this.value;
|
|
104
117
|
}
|
|
@@ -193,6 +193,7 @@ export default class BxtPersonInfo extends Vue {
|
|
|
193
193
|
get personForm() {
|
|
194
194
|
return convertEleOrderListToObj(this.personData);
|
|
195
195
|
}
|
|
196
|
+
|
|
196
197
|
isShowPersonElement(person, ele) {
|
|
197
198
|
const title = person.eleOrderList.find(e => e.key === 'title');
|
|
198
199
|
let bool = title && title.value;
|
|
@@ -215,25 +216,34 @@ export default class BxtPersonInfo extends Vue {
|
|
|
215
216
|
inputDom.focus();
|
|
216
217
|
}
|
|
217
218
|
change(ele: any = {}) {
|
|
218
|
-
const
|
|
219
|
-
|
|
219
|
+
const { inputData, personData, verifyData } = this;
|
|
220
|
+
if (!inputData) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const allPersonsData = inputData.personData;
|
|
224
|
+
const productGroupList = inputData.productGroupList;
|
|
220
225
|
|
|
221
226
|
if (allPersonsData) {
|
|
222
227
|
personDataHandler(allPersonsData);
|
|
228
|
+
if (personData.key === 'applicantInfo') {
|
|
229
|
+
if (ele.key === 'applicantAndInsuredSame' && !ele.value) {
|
|
230
|
+
personData.cid = null;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
223
233
|
if (productGroupList) {
|
|
224
234
|
productGroupList.forEach(g => {
|
|
225
235
|
g.prodOrderList &&
|
|
226
236
|
g.prodOrderList.map(p => {
|
|
227
237
|
clearAddAndTakeAndAdjustBaoeData(p);
|
|
228
|
-
productDataHandler(p,
|
|
238
|
+
productDataHandler(p, verifyData && verifyData[p.key], allPersonsData);
|
|
229
239
|
});
|
|
230
240
|
});
|
|
231
241
|
}
|
|
232
242
|
}
|
|
233
|
-
if (
|
|
234
|
-
window.WeiyiStatSDK && window.WeiyiStatSDK.submit(`${
|
|
243
|
+
if (personData.key && ele.key && !['age'].includes(ele.key)) {
|
|
244
|
+
window.WeiyiStatSDK && window.WeiyiStatSDK.submit(`${personData.key}_${ele.key}`);
|
|
235
245
|
}
|
|
236
|
-
this.$emit('change',
|
|
246
|
+
this.$emit('change', personData, ele);
|
|
237
247
|
}
|
|
238
248
|
validate() {
|
|
239
249
|
if (!this.personForm.title) {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
>
|
|
30
30
|
<template v-for="ele in ins.eleOrderList">
|
|
31
31
|
<template v-if="['cmCommonTitle'].includes(ele.componentName)">
|
|
32
|
-
<bxs-form-item :key="ins.key + ele.key">
|
|
32
|
+
<bxs-form-item :prop="ele.key" :key="ins.key + ele.key">
|
|
33
33
|
<TitleItem
|
|
34
34
|
v-model="ele.value"
|
|
35
35
|
:code="ins.code"
|
|
@@ -336,7 +336,6 @@ export default class BxtProductInfo extends Vue {
|
|
|
336
336
|
setTimeout(() => {
|
|
337
337
|
const refInsuranceForm: any = _get(this.$refs, `insuranceForm${insData.key}[0]`);
|
|
338
338
|
if (refInsuranceForm) {
|
|
339
|
-
console.log(this.productForm[insData.key]);
|
|
340
339
|
refInsuranceForm.validate(eleData.key);
|
|
341
340
|
}
|
|
342
341
|
}, 300);
|