bxs-tools-ui 3.2.0-0 → 3.2.0-2
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/add-and-take/index.js +13 -3
- package/es/adjust-baoe/index.js +3 -2
- package/es/index.js +171 -161
- package/es/insure-calculate/index.js +1 -0
- package/es/person-info/index.js +122 -146
- package/es/product-info/index.js +136 -152
- package/es/share-sheet/index.js +16 -4
- package/es/utils/index.js +144 -154
- package/lib/add-and-take/index.js +13 -3
- package/lib/adjust-baoe/index.js +3 -2
- package/lib/index.js +171 -161
- package/lib/insure-calculate/index.js +1 -0
- package/lib/person-info/index.js +122 -146
- package/lib/product-info/index.js +136 -152
- package/lib/share-sheet/index.js +16 -4
- package/lib/utils/index.js +144 -154
- package/package.json +1 -4
- package/packages/add-and-take/readme.md +162 -256
- package/packages/adjust-baoe/readme.md +118 -83
- package/packages/business-card/readme.md +91 -28
- package/packages/bxs-utils/planbook/common.ts +48 -20
- package/packages/bxs-utils/planbook/person.ts +1 -1
- package/packages/bxs-utils/planbook/product.ts +70 -124
- package/packages/bxs-utils/readme.md +407 -425
- package/packages/canvas-poster/readme.md +123 -83
- package/packages/index.ts +1 -1
- package/packages/insure-calculate/readme.md +185 -129
- package/packages/person-info/index.vue +6 -1
- package/packages/person-info/readme.md +149 -134
- package/packages/planbook-input/helper.js +9 -4
- package/packages/planbook-input/index.vue +5 -1
- package/packages/planbook-input/readme.md +143 -84
- package/packages/product-info/index.vue +12 -3
- package/packages/product-info/readme.md +130 -69
package/es/person-info/index.js
CHANGED
|
@@ -1041,7 +1041,7 @@ function getHuomianPeriodValue() {
|
|
|
1041
1041
|
* @author Lizhao <lz@winbaoxian.com>
|
|
1042
1042
|
* @date 2022-04-25
|
|
1043
1043
|
* @param {number} value 必传
|
|
1044
|
-
* @returns {string}
|
|
1044
|
+
* @returns {number|string} 满足条件时返回单位为万的字符串,否则返回原数值
|
|
1045
1045
|
* @example
|
|
1046
1046
|
* converUnit10000(1000)
|
|
1047
1047
|
* // returns 1000
|
|
@@ -1099,7 +1099,7 @@ function deepCopy(obj) {
|
|
|
1099
1099
|
* **根据生日算年龄**
|
|
1100
1100
|
* @author Lizhao <lz@winbaoxian.com>
|
|
1101
1101
|
* @date 2022-04-25
|
|
1102
|
-
* @param {Date|timestamp|dateStr} birth
|
|
1102
|
+
* @param {Date|timestamp|dateStr} birth 必传。时间字符串或时间戳
|
|
1103
1103
|
* @param {Date|timestamp|dateStr} cDate 可不传。指定时间,不传默认为当前时间
|
|
1104
1104
|
* @returns {number} 年龄
|
|
1105
1105
|
* @example
|
|
@@ -1145,7 +1145,9 @@ function getExpressionParamMap(personData, product, ins, options) {
|
|
|
1145
1145
|
// 通用信息
|
|
1146
1146
|
customVariable: null,
|
|
1147
1147
|
// 自定义变量
|
|
1148
|
-
cv: null
|
|
1148
|
+
cv: null,
|
|
1149
|
+
// 简写,自定义变量
|
|
1150
|
+
t: {} // 事件目标
|
|
1149
1151
|
};
|
|
1150
1152
|
if (personData) {
|
|
1151
1153
|
var insuredInfo = (personData.personOrderList || []).find(function (p) {
|
|
@@ -1193,8 +1195,13 @@ function getExpressionParamMap(personData, product, ins, options) {
|
|
|
1193
1195
|
});
|
|
1194
1196
|
}
|
|
1195
1197
|
}
|
|
1196
|
-
if (options
|
|
1197
|
-
|
|
1198
|
+
if (options) {
|
|
1199
|
+
if (options.planbookId) {
|
|
1200
|
+
map.planbookId = options.planbookId;
|
|
1201
|
+
}
|
|
1202
|
+
if (options.eventTarget) {
|
|
1203
|
+
map.t = options.eventTarget;
|
|
1204
|
+
}
|
|
1198
1205
|
}
|
|
1199
1206
|
if (ins && ins.customVariableExp) {
|
|
1200
1207
|
var exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2');
|
|
@@ -1225,11 +1232,12 @@ function executeElementRule(personData, product, ins, ele) {
|
|
|
1225
1232
|
}
|
|
1226
1233
|
if (['cmCommonSelect', 'cmCommonRadioBtn', 'cmCommonRadio', 'cmCommonCheckbox'].includes(ele.componentName)) {
|
|
1227
1234
|
if (ele.defaultValueExp) {
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1235
|
+
var _exp = ele.defaultValueExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
1236
|
+
var expValue = eval(_exp);
|
|
1237
|
+
if (!['', null, undefined].includes(expValue)) {
|
|
1238
|
+
newEleMap.value = expValue;
|
|
1232
1239
|
}
|
|
1240
|
+
consoleLogWhenEnable("".concat(ele.key, ": defaultValueExp"), _exp, newEleMap.value);
|
|
1233
1241
|
}
|
|
1234
1242
|
if (ele.underwriteExp) {
|
|
1235
1243
|
var _exp2 = ele.underwriteExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
@@ -1257,11 +1265,12 @@ function executeElementRule(personData, product, ins, ele) {
|
|
|
1257
1265
|
}
|
|
1258
1266
|
if (['cmCommonInput'].includes(ele.componentName)) {
|
|
1259
1267
|
if (ele.defaultValueExp) {
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1268
|
+
var _exp3 = ele.defaultValueExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
1269
|
+
var _expValue = eval(_exp3);
|
|
1270
|
+
if (!['', null, undefined].includes(_expValue)) {
|
|
1271
|
+
newEleMap.value = _expValue;
|
|
1264
1272
|
}
|
|
1273
|
+
consoleLogWhenEnable("".concat(ele.key, ": defaultValueExp"), _exp3, newEleMap.value);
|
|
1265
1274
|
}
|
|
1266
1275
|
if (ele.minExp) {
|
|
1267
1276
|
var _exp4 = ele.minExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
@@ -1431,7 +1440,7 @@ function setPersonAgeOptions(personData) {
|
|
|
1431
1440
|
* @author Lizhao <lz@winbaoxian.com>
|
|
1432
1441
|
* @date 2022-04-26
|
|
1433
1442
|
* @param {IPbPersons} allPersonsData 必传。所有人员数据
|
|
1434
|
-
* @param {null|string} type 可不传。
|
|
1443
|
+
* @param {null|string|string[]} type 可不传。
|
|
1435
1444
|
* 不传,人员数据按原结构返回;
|
|
1436
1445
|
* 字符串,返回指定的人员数据;
|
|
1437
1446
|
* 数组,以数组形式,返回多个人员数据。
|
|
@@ -9719,10 +9728,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
9719
9728
|
* @author Lizhao <lz@winbaoxian.com>
|
|
9720
9729
|
* @date 2022-04-26
|
|
9721
9730
|
* @param {IPbProduct} prodData 必传。产品数据(单个)
|
|
9722
|
-
* @param {object}
|
|
9731
|
+
* @param {object} prodVerifyData 必传。产品校验条件(单个)
|
|
9723
9732
|
* @param {IPbPersons} personData 必传。人员信息,包括被保人、投保人、投保人配偶
|
|
9724
|
-
* @param {object} parmas
|
|
9725
|
-
* @returns {IPbProduct} 产品数据(单个)
|
|
9733
|
+
* @param {object} [parmas] 可不传。补充参数,目前只有 planbookId
|
|
9734
|
+
* @returns {Promise<IPbProduct>} 产品数据(单个)
|
|
9726
9735
|
*/
|
|
9727
9736
|
function productDataHandler(_x, _x2, _x3, _x4) {
|
|
9728
9737
|
return _productDataHandler.apply(this, arguments);
|
|
@@ -9730,6 +9739,7 @@ function productDataHandler(_x, _x2, _x3, _x4) {
|
|
|
9730
9739
|
|
|
9731
9740
|
/**
|
|
9732
9741
|
* **处理多被保人**
|
|
9742
|
+
* @ignore
|
|
9733
9743
|
* @author Lizhao <lz@winbaoxian.com>
|
|
9734
9744
|
* @date 2024-02-28
|
|
9735
9745
|
* @param {IPbPersons} personData 必传。人员信息,包括被保人、投保人、投保人配偶
|
|
@@ -9737,7 +9747,7 @@ function productDataHandler(_x, _x2, _x3, _x4) {
|
|
|
9737
9747
|
*/
|
|
9738
9748
|
function _productDataHandler() {
|
|
9739
9749
|
_productDataHandler = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(prodData, prodVerifyData, personData, parmas) {
|
|
9740
|
-
var productVerifyData, hasProduct, hasVerifyData, hasPersonData, personOrderList, _prodData$mulInsOrder3;
|
|
9750
|
+
var productVerifyData, _parmas$eventTarget, insuranceKey, elementKey, groupInsurance, groupInsuranceIdEle, subInsurances, hasProduct, hasVerifyData, hasPersonData, personOrderList, _prodData$mulInsOrder3;
|
|
9741
9751
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
9742
9752
|
while (1) switch (_context.prev = _context.next) {
|
|
9743
9753
|
case 0:
|
|
@@ -9764,6 +9774,29 @@ function _productDataHandler() {
|
|
|
9764
9774
|
case 3:
|
|
9765
9775
|
productVerifyData = prodVerifyData;
|
|
9766
9776
|
case 4:
|
|
9777
|
+
// 组合险种特殊处理:当用户点击组合险种的子险种选项时,将其他子险种的标题设置为未选中状态
|
|
9778
|
+
if (parmas && parmas.eventTarget) {
|
|
9779
|
+
_parmas$eventTarget = parmas.eventTarget, insuranceKey = _parmas$eventTarget.insuranceKey, elementKey = _parmas$eventTarget.elementKey;
|
|
9780
|
+
if (insuranceKey && elementKey === 'insuranceId') {
|
|
9781
|
+
groupInsurance = (prodData.mulInsOrderList || []).find(function (ins) {
|
|
9782
|
+
return ins.key === insuranceKey;
|
|
9783
|
+
});
|
|
9784
|
+
groupInsuranceIdEle = ((groupInsurance === null || groupInsurance === void 0 ? void 0 : groupInsurance.eleOrderList) || []).find(function (e) {
|
|
9785
|
+
return e.key === 'insuranceId';
|
|
9786
|
+
});
|
|
9787
|
+
subInsurances = (prodData.mulInsOrderList || []).filter(function (ins) {
|
|
9788
|
+
return ins.groupKey === insuranceKey;
|
|
9789
|
+
});
|
|
9790
|
+
subInsurances.forEach(function (ins) {
|
|
9791
|
+
var titleEle = (ins.eleOrderList || []).find(function (e) {
|
|
9792
|
+
return e.key === 'title';
|
|
9793
|
+
});
|
|
9794
|
+
if (titleEle && groupInsuranceIdEle && !Array.isArray(titleEle.value)) {
|
|
9795
|
+
titleEle.value = groupInsuranceIdEle.value === ins.key;
|
|
9796
|
+
}
|
|
9797
|
+
});
|
|
9798
|
+
}
|
|
9799
|
+
}
|
|
9767
9800
|
hasProduct = prodData.mulInsOrderList;
|
|
9768
9801
|
hasVerifyData = productVerifyData && Object.keys(productVerifyData).length;
|
|
9769
9802
|
hasPersonData = personData && personData.personOrderList;
|
|
@@ -10048,6 +10081,7 @@ function multipleInsuredHandler(personData) {
|
|
|
10048
10081
|
|
|
10049
10082
|
/**
|
|
10050
10083
|
* 请求返回当前产品、当前条件的费率数据
|
|
10084
|
+
* @ignore
|
|
10051
10085
|
* @author Lizhao <lz@winbaoxian.com>
|
|
10052
10086
|
* @date 2024-02-28
|
|
10053
10087
|
* @param {IPbProduct} prodData 必传。产品数据(单个)
|
|
@@ -10115,6 +10149,7 @@ function getSingleInsurancesVerifyData(prodData, personData) {
|
|
|
10115
10149
|
|
|
10116
10150
|
/**
|
|
10117
10151
|
* **多被保人,获取并缓存多个险种信息的费率信息**
|
|
10152
|
+
* @ignore
|
|
10118
10153
|
* @author Lizhao <lz@winbaoxian.com>
|
|
10119
10154
|
* @date 2023-12-28
|
|
10120
10155
|
* @param { any } params 必传。接口请求信息
|
|
@@ -10231,40 +10266,21 @@ function setCommonInfo(prodData) {
|
|
|
10231
10266
|
* @returns {IPbProduct} 产品数据(单个)
|
|
10232
10267
|
*/
|
|
10233
10268
|
function setGroupInsurance(prodData) {
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
var groupInsuranceList = prodData && prodData.mulInsOrderList && prodData.mulInsOrderList.filter(function (ins) {
|
|
10238
|
-
return !!ins.groupKey;
|
|
10239
|
-
});
|
|
10240
|
-
if (!groupInsuranceList || !groupInsuranceList.length) {
|
|
10241
|
-
return prodData;
|
|
10242
|
-
}
|
|
10243
|
-
var oldGroupInsList = prodData.mulInsOrderList.filter(function (ins) {
|
|
10244
|
-
return ins.isGroup;
|
|
10245
|
-
});
|
|
10246
|
-
var newGroupInsMap = {};
|
|
10247
|
-
//清空险种列表中的已有的险种组合
|
|
10248
|
-
prodData.mulInsOrderList = prodData.mulInsOrderList.filter(function (ins) {
|
|
10269
|
+
var mulInsOrderList = prodData && prodData.mulInsOrderList ? prodData.mulInsOrderList : [];
|
|
10270
|
+
// 清空险种列表中的已有的险种组合
|
|
10271
|
+
prodData.mulInsOrderList = mulInsOrderList.filter(function (ins) {
|
|
10249
10272
|
return !ins.isGroup;
|
|
10250
10273
|
});
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
var
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
return e.key === 'title';
|
|
10262
|
-
});
|
|
10263
|
-
oldInsuranceIdEle = oldGroupIns.eleOrderList.find(function (e) {
|
|
10264
|
-
return e.key === 'insuranceId';
|
|
10265
|
-
});
|
|
10266
|
-
}
|
|
10267
|
-
if (ins.groupKey) {
|
|
10274
|
+
|
|
10275
|
+
// 多险种选一,或多险种选多。生成一个组合,如多个险种合成豁免险
|
|
10276
|
+
var groupInsuranceList = mulInsOrderList.filter(function (ins) {
|
|
10277
|
+
return !!ins.groupKey;
|
|
10278
|
+
});
|
|
10279
|
+
if (groupInsuranceList.length) {
|
|
10280
|
+
var newGroupInsMap = {};
|
|
10281
|
+
groupInsuranceList.filter(function (ins) {
|
|
10282
|
+
return ins.groupKey;
|
|
10283
|
+
}).forEach(function (ins) {
|
|
10268
10284
|
newGroupInsMap[ins.groupKey] = newGroupInsMap[ins.groupKey] || {
|
|
10269
10285
|
key: ins.groupKey,
|
|
10270
10286
|
name: ins.groupName,
|
|
@@ -10272,19 +10288,19 @@ function setGroupInsurance(prodData) {
|
|
|
10272
10288
|
isGroup: true,
|
|
10273
10289
|
eleOrderList: [{
|
|
10274
10290
|
key: 'title',
|
|
10275
|
-
value:
|
|
10291
|
+
value: false,
|
|
10276
10292
|
isDisabled: false,
|
|
10277
10293
|
componentName: 'cmCommonTitle',
|
|
10278
10294
|
labelName: ins.groupName
|
|
10279
10295
|
}, {
|
|
10280
10296
|
key: 'insuranceId',
|
|
10281
|
-
value:
|
|
10297
|
+
value: ins.isCheckbox ? [] : null,
|
|
10282
10298
|
componentName: ins.isCheckbox ? 'cmCommonCheckbox' : 'cmCommonRadio',
|
|
10283
10299
|
opts: []
|
|
10284
10300
|
}]
|
|
10285
10301
|
};
|
|
10286
10302
|
|
|
10287
|
-
//
|
|
10303
|
+
// 将子险种转换成险种组合的选项
|
|
10288
10304
|
var titleEle = ins.eleOrderList.find(function (e) {
|
|
10289
10305
|
return e.key === 'title';
|
|
10290
10306
|
});
|
|
@@ -10297,119 +10313,73 @@ function setGroupInsurance(prodData) {
|
|
|
10297
10313
|
desc: titleEle.labelName,
|
|
10298
10314
|
isDisabled: titleEle.isDisabled
|
|
10299
10315
|
});
|
|
10300
|
-
}
|
|
10301
|
-
});
|
|
10302
|
-
|
|
10303
|
-
// 处理组合险中的逻辑,并加入到产品险种列表中
|
|
10304
|
-
var _loop = function _loop(k) {
|
|
10305
|
-
var nGroupTitle = newGroupInsMap[k].eleOrderList.find(function (e) {
|
|
10306
|
-
return e.key === 'title';
|
|
10307
10316
|
});
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
nGroupTitle.isDisabled = true;
|
|
10319
|
-
} else {
|
|
10320
|
-
nGroupTitle.isDisabled = false;
|
|
10321
|
-
}
|
|
10322
|
-
}
|
|
10323
|
-
var groupInsList = prodData.mulInsOrderList.filter(function (ins) {
|
|
10317
|
+
|
|
10318
|
+
// 处理组合险中的逻辑,并加入到产品险种列表中
|
|
10319
|
+
var _loop = function _loop(k) {
|
|
10320
|
+
var nGroupTitleEle = newGroupInsMap[k].eleOrderList.find(function (e) {
|
|
10321
|
+
return e.key === 'title';
|
|
10322
|
+
});
|
|
10323
|
+
var nGroupInsuranceIdEle = newGroupInsMap[k].eleOrderList.find(function (e) {
|
|
10324
|
+
return e.key === 'insuranceId';
|
|
10325
|
+
});
|
|
10326
|
+
var groupInsList = mulInsOrderList.filter(function (ins) {
|
|
10324
10327
|
return ins.groupKey == k;
|
|
10325
10328
|
});
|
|
10326
|
-
if (
|
|
10327
|
-
// 如果组合险中有一款是必选的,则整个组合险为选中状态
|
|
10328
|
-
if (groupInsList.some(function (ins) {
|
|
10329
|
-
var subTitle = ins.eleOrderList.find(function (e) {
|
|
10330
|
-
return e.key === 'title';
|
|
10331
|
-
});
|
|
10332
|
-
return ins.required && subTitle && !subTitle.isDisabled;
|
|
10333
|
-
})) {
|
|
10334
|
-
nGroupTitle.value = true;
|
|
10335
|
-
nGroupTitle.isDisabled = true;
|
|
10336
|
-
}
|
|
10337
|
-
|
|
10338
|
-
// 初始化时,设置组合险默认值
|
|
10329
|
+
if (nGroupTitleEle && nGroupInsuranceIdEle && groupInsList.length) {
|
|
10339
10330
|
var notDisabledInsurances = groupInsList.filter(function (ins) {
|
|
10340
|
-
var
|
|
10331
|
+
var titleEle = (ins.eleOrderList || []).find(function (e) {
|
|
10341
10332
|
return e.key === 'title';
|
|
10342
10333
|
});
|
|
10343
|
-
return
|
|
10334
|
+
return titleEle && !titleEle.isDisabled;
|
|
10344
10335
|
});
|
|
10345
|
-
var checkedInsurances = notDisabledInsurances.
|
|
10346
|
-
var
|
|
10347
|
-
return
|
|
10336
|
+
var checkedInsurances = notDisabledInsurances.filter(function (ins) {
|
|
10337
|
+
var titleEle = (ins.eleOrderList || []).find(function (ele) {
|
|
10338
|
+
return ele.key === 'title';
|
|
10348
10339
|
});
|
|
10349
|
-
return
|
|
10340
|
+
return titleEle && titleEle.value;
|
|
10350
10341
|
});
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
}
|
|
10363
|
-
if (nGroupInsuranceId) {
|
|
10364
|
-
if (nGroupInsuranceId.value) {
|
|
10365
|
-
if (nGroupInsuranceId.value.constructor === Array) {
|
|
10366
|
-
if (nGroupInsuranceId.opts) {
|
|
10367
|
-
nGroupInsuranceId.opts = nGroupInsuranceId.opts.filter(function (opt) {
|
|
10368
|
-
return nGroupInsuranceId.value.indexOf(opt.val) !== -1 && !opt.isDisabled;
|
|
10369
|
-
});
|
|
10370
|
-
}
|
|
10371
|
-
} else {
|
|
10372
|
-
var opt = nGroupInsuranceId.opts.find(function (o) {
|
|
10373
|
-
return o.val === nGroupInsuranceId.value;
|
|
10374
|
-
});
|
|
10375
|
-
if (opt && opt.isDisabled) {
|
|
10376
|
-
nGroupInsuranceId.value = '';
|
|
10377
|
-
}
|
|
10378
|
-
}
|
|
10379
|
-
}
|
|
10380
|
-
if (nGroupInsuranceId.value) {
|
|
10381
|
-
var checkedIns = prodData.mulInsOrderList.find(function (ins) {
|
|
10382
|
-
return ins.key === nGroupInsuranceId.value;
|
|
10342
|
+
var hasRequiredIns = notDisabledInsurances.some(function (ins) {
|
|
10343
|
+
return ins.required;
|
|
10344
|
+
});
|
|
10345
|
+
var checkedInsurance = checkedInsurances[0];
|
|
10346
|
+
// hasRequiredIns:如果组合险中有一款是必选的,则整个组合险为选中状态
|
|
10347
|
+
// 所有险种都不可选,则组合险不可修改且不选中。否则,组合险种可选
|
|
10348
|
+
nGroupTitleEle.value = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).some(function (opt) {
|
|
10349
|
+
return !opt.isDisabled;
|
|
10350
|
+
});
|
|
10351
|
+
nGroupTitleEle.isDisabled = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).every(function (opt) {
|
|
10352
|
+
return !!opt.isDisabled;
|
|
10383
10353
|
});
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10354
|
+
nGroupInsuranceIdEle.value = checkedInsurance ? checkedInsurance.key : null;
|
|
10355
|
+
|
|
10356
|
+
//将当前选中险种的部分数据复制到组合险中
|
|
10357
|
+
if (checkedInsurance) {
|
|
10358
|
+
// 定义组件险中的元素:自身eleOrderList + 所选险种的eleOrderList(不包含标题)
|
|
10359
|
+
var keys = ['code', 'groupKey', 'groupName', 'isFollowing', 'key', 'name', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData'];
|
|
10360
|
+
for (var ck in checkedInsurance) {
|
|
10361
|
+
if (!keys.includes(ck)) {
|
|
10389
10362
|
if (ck === 'eleOrderList') {
|
|
10390
|
-
newGroupInsMap[k][ck] = newGroupInsMap[k][ck].concat(
|
|
10363
|
+
newGroupInsMap[k][ck] = newGroupInsMap[k][ck].concat(checkedInsurance[ck].filter(function (ele) {
|
|
10391
10364
|
return ele.key !== 'title';
|
|
10392
10365
|
}));
|
|
10393
10366
|
} else {
|
|
10394
|
-
newGroupInsMap[k][ck] =
|
|
10367
|
+
newGroupInsMap[k][ck] = checkedInsurance[ck];
|
|
10395
10368
|
}
|
|
10396
10369
|
}
|
|
10397
10370
|
}
|
|
10398
10371
|
}
|
|
10399
10372
|
}
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
if (
|
|
10404
|
-
index
|
|
10373
|
+
var index = mulInsOrderList.findLastIndex(function (ins) {
|
|
10374
|
+
return ins.groupKey === k;
|
|
10375
|
+
});
|
|
10376
|
+
if (index >= 0) {
|
|
10377
|
+
prodData.mulInsOrderList.splice(index + 1, 0, newGroupInsMap[k]);
|
|
10405
10378
|
}
|
|
10406
|
-
}
|
|
10407
|
-
|
|
10408
|
-
|
|
10379
|
+
};
|
|
10380
|
+
for (var k in newGroupInsMap) {
|
|
10381
|
+
_loop(k);
|
|
10409
10382
|
}
|
|
10410
|
-
};
|
|
10411
|
-
for (var k in newGroupInsMap) {
|
|
10412
|
-
_loop(k);
|
|
10413
10383
|
}
|
|
10414
10384
|
return prodData;
|
|
10415
10385
|
}
|
|
@@ -12070,6 +12040,7 @@ var BxtPersonInfo = (_dec = Component({
|
|
|
12070
12040
|
params,
|
|
12071
12041
|
allPersonsData,
|
|
12072
12042
|
productGroupList,
|
|
12043
|
+
eventTarget,
|
|
12073
12044
|
promises,
|
|
12074
12045
|
_args = arguments;
|
|
12075
12046
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
@@ -12085,6 +12056,10 @@ var BxtPersonInfo = (_dec = Component({
|
|
|
12085
12056
|
case 1:
|
|
12086
12057
|
allPersonsData = inputData.personData;
|
|
12087
12058
|
productGroupList = inputData.productGroupList || [];
|
|
12059
|
+
eventTarget = {
|
|
12060
|
+
personKey: personData.key,
|
|
12061
|
+
elementKey: ele.key
|
|
12062
|
+
};
|
|
12088
12063
|
if (!allPersonsData) {
|
|
12089
12064
|
_context.next = 2;
|
|
12090
12065
|
break;
|
|
@@ -12102,7 +12077,8 @@ var BxtPersonInfo = (_dec = Component({
|
|
|
12102
12077
|
g.prodOrderList.map(function (p) {
|
|
12103
12078
|
clearAddAndTakeAndAdjustBaoeData(p);
|
|
12104
12079
|
promises.push(productDataHandler(p, get(verifyData, "[".concat(p.key, "]")), allPersonsData, {
|
|
12105
|
-
planbookId: get(params, 'planbookId')
|
|
12080
|
+
planbookId: get(params, 'planbookId'),
|
|
12081
|
+
eventTarget: eventTarget
|
|
12106
12082
|
}));
|
|
12107
12083
|
});
|
|
12108
12084
|
});
|