bxs-tools-ui 3.2.0-2 → 3.2.0-3
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/es/index.js +83 -66
- package/es/person-info/index.js +13 -2
- package/es/product-info/index.js +82 -65
- package/es/utils/index.js +13 -2
- package/lib/index.js +83 -66
- package/lib/person-info/index.js +13 -2
- package/lib/product-info/index.js +82 -65
- package/lib/utils/index.js +13 -2
- package/package.json +1 -1
- package/packages/bxs-utils/planbook/product.ts +8 -2
- package/packages/index.ts +1 -1
- package/packages/product-info/index.vue +27 -29
|
@@ -78,7 +78,7 @@ export async function productDataHandler(prodData : IPbProduct, prodVerifyData :
|
|
|
78
78
|
const subInsurances = (prodData.mulInsOrderList || []).filter(ins => ins.groupKey === insuranceKey)
|
|
79
79
|
subInsurances.forEach(ins => {
|
|
80
80
|
const titleEle = (ins.eleOrderList || []).find(e => e.key === 'title')
|
|
81
|
-
if (titleEle && groupInsuranceIdEle && !Array.isArray(
|
|
81
|
+
if (titleEle && groupInsuranceIdEle && !Array.isArray(groupInsuranceIdEle.value)) {
|
|
82
82
|
titleEle.value = groupInsuranceIdEle.value === ins.key
|
|
83
83
|
}
|
|
84
84
|
})
|
|
@@ -543,6 +543,9 @@ export function setGroupInsurance(prodData : IPbProduct) : IPbProduct {
|
|
|
543
543
|
|
|
544
544
|
// 处理组合险中的逻辑,并加入到产品险种列表中
|
|
545
545
|
for (let k in newGroupInsMap) {
|
|
546
|
+
const oldGroupInsurance = mulInsOrderList.find(ins => ins.key === k)
|
|
547
|
+
const oldGroupTitleElement = oldGroupInsurance ? oldGroupInsurance.eleOrderList?.find(e => e.key === 'title') : null
|
|
548
|
+
const oldGroupTitleValue = oldGroupTitleElement ? oldGroupTitleElement.value : null
|
|
546
549
|
const nGroupTitleEle = newGroupInsMap[k].eleOrderList.find(e => e.key === 'title');
|
|
547
550
|
const nGroupInsuranceIdEle = newGroupInsMap[k].eleOrderList.find(e => e.key === 'insuranceId');
|
|
548
551
|
const groupInsList = mulInsOrderList.filter((ins : IProdInsurance) => ins.groupKey == k);
|
|
@@ -559,7 +562,10 @@ export function setGroupInsurance(prodData : IPbProduct) : IPbProduct {
|
|
|
559
562
|
const checkedInsurance = checkedInsurances[0]
|
|
560
563
|
// hasRequiredIns:如果组合险中有一款是必选的,则整个组合险为选中状态
|
|
561
564
|
// 所有险种都不可选,则组合险不可修改且不选中。否则,组合险种可选
|
|
562
|
-
nGroupTitleEle.value =
|
|
565
|
+
nGroupTitleEle.value = oldGroupTitleValue === false ? oldGroupTitleValue : (nGroupInsuranceIdEle.opts || []).some(opt => !opt.isDisabled)
|
|
566
|
+
if (hasRequiredIns) {
|
|
567
|
+
nGroupTitleEle.value = hasRequiredIns
|
|
568
|
+
}
|
|
563
569
|
nGroupTitleEle.isDisabled = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).every(opt => !!opt.isDisabled)
|
|
564
570
|
nGroupInsuranceIdEle.value = checkedInsurance ? checkedInsurance.key : null
|
|
565
571
|
|
package/packages/index.ts
CHANGED
|
@@ -306,12 +306,6 @@ export default class BxtProductInfo extends Vue {
|
|
|
306
306
|
if (!['title'].includes(eleData.key)) {
|
|
307
307
|
this.requiestRecommendValues();
|
|
308
308
|
}
|
|
309
|
-
setTimeout(() => {
|
|
310
|
-
const refInsuranceForm: any = _get(this.$refs, `insuranceForm${insData.key}[0]`);
|
|
311
|
-
if (refInsuranceForm) {
|
|
312
|
-
refInsuranceForm.validate(eleData.key);
|
|
313
|
-
}
|
|
314
|
-
}, 300);
|
|
315
309
|
this.$nextTick(async () => {
|
|
316
310
|
const errorMsg = await this.changeProduct(this.productData, options);
|
|
317
311
|
this.$emit(
|
|
@@ -363,31 +357,35 @@ export default class BxtProductInfo extends Vue {
|
|
|
363
357
|
eleData
|
|
364
358
|
});
|
|
365
359
|
if (!errorMsg) {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
360
|
+
await this.validate()
|
|
361
|
+
.then(async () => {
|
|
362
|
+
const hasRevalidateFlag = (_get(productData, 'mulInsOrderList') || []).some(ins => ins.revalidateFlag);
|
|
363
|
+
if (hasRevalidateFlag && $listeners.reCalculate) {
|
|
364
|
+
await new Promise<any>((resolve, reject) => {
|
|
365
|
+
this.$emit(
|
|
366
|
+
'reCalculate',
|
|
367
|
+
inputData,
|
|
368
|
+
{
|
|
369
|
+
planbookId,
|
|
370
|
+
publicPbUuid,
|
|
371
|
+
groupKey,
|
|
372
|
+
productKey,
|
|
373
|
+
isIgnoreError: true,
|
|
374
|
+
eventTarget
|
|
375
|
+
},
|
|
376
|
+
resolve,
|
|
377
|
+
reject
|
|
378
|
+
);
|
|
379
|
+
}).catch(err => {
|
|
380
|
+
errorMsg = _get(err, '[0].message') || _get(err, 'message');
|
|
381
|
+
});
|
|
382
|
+
await productDataHandler(productData, productVerifyData, personData, {
|
|
373
383
|
planbookId,
|
|
374
|
-
publicPbUuid,
|
|
375
|
-
groupKey,
|
|
376
|
-
productKey,
|
|
377
|
-
isIgnoreError: true,
|
|
378
384
|
eventTarget
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}).catch(err => {
|
|
384
|
-
errorMsg = _get(err, '[0].message') || _get(err, 'message');
|
|
385
|
-
});
|
|
386
|
-
await productDataHandler(productData, productVerifyData, personData, {
|
|
387
|
-
planbookId,
|
|
388
|
-
eventTarget
|
|
389
|
-
});
|
|
390
|
-
}
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
})
|
|
388
|
+
.catch(() => {});
|
|
391
389
|
}
|
|
392
390
|
return errorMsg;
|
|
393
391
|
}
|