bxs-tools-ui 3.1.3 → 3.2.0-1
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 +2 -4
- package/es/adjust-baoe/index.js +3 -5
- package/es/index.js +378 -190
- package/es/insure-calculate/index.js +2 -4
- package/es/person-info/index.js +285 -150
- package/es/product-info/index.js +353 -173
- package/es/share-sheet/index.js +2 -4
- package/es/utils/index.js +285 -154
- package/lib/add-and-take/index.js +2 -4
- package/lib/adjust-baoe/index.js +3 -5
- package/lib/index.js +378 -190
- package/lib/insure-calculate/index.js +2 -4
- package/lib/person-info/index.js +285 -150
- package/lib/product-info/index.js +353 -173
- package/lib/share-sheet/index.js +2 -4
- package/lib/utils/index.js +288 -153
- package/package.json +1 -1
- package/packages/add-and-take/demo/index.vue +2 -2
- package/packages/bxs-utils/planbook/common.ts +150 -0
- package/packages/bxs-utils/planbook/index.ts +1 -4
- package/packages/bxs-utils/planbook/person.ts +2 -4
- package/packages/bxs-utils/planbook/product.ts +84 -140
- package/packages/index.ts +1 -1
- package/packages/person-info/index.vue +6 -1
- package/packages/planbook-input/components/product-table.vue +8 -9
- package/packages/planbook-input/helper.js +140 -12
- package/packages/planbook-input/index.vue +44 -10
- package/packages/product-info/index.vue +51 -8
package/es/product-info/index.js
CHANGED
|
@@ -8949,6 +8949,14 @@ function getUrlParams(url) {
|
|
|
8949
8949
|
return _searchStr ? QS.parse(_searchStr) : {};
|
|
8950
8950
|
}
|
|
8951
8951
|
|
|
8952
|
+
var enableLizhaoDebug = document && document.cookie && document.cookie.match('ENABLE_LIZHAO_DEBUG=1');
|
|
8953
|
+
function consoleLogWhenEnable() {
|
|
8954
|
+
if (enableLizhaoDebug) {
|
|
8955
|
+
var _console;
|
|
8956
|
+
(_console = console).log.apply(_console, arguments);
|
|
8957
|
+
}
|
|
8958
|
+
}
|
|
8959
|
+
|
|
8952
8960
|
/**
|
|
8953
8961
|
* **将对象下的 eleOrderList 数组中的子元素下的 value,转换为 key-value 键值对**
|
|
8954
8962
|
* @author Lizhao <lz@winbaoxian.com>
|
|
@@ -9149,6 +9157,174 @@ function getAgeFromBirth(birth, cDate) {
|
|
|
9149
9157
|
}
|
|
9150
9158
|
return age;
|
|
9151
9159
|
}
|
|
9160
|
+
function getExpressionParamMap(personData, product, ins, options) {
|
|
9161
|
+
var map = {
|
|
9162
|
+
planbookId: null,
|
|
9163
|
+
// 计划书id
|
|
9164
|
+
productId: null,
|
|
9165
|
+
// 产品id
|
|
9166
|
+
insured: {},
|
|
9167
|
+
// 被保人
|
|
9168
|
+
insured2: {},
|
|
9169
|
+
// 第二被保人
|
|
9170
|
+
applicant: {},
|
|
9171
|
+
// 投保人
|
|
9172
|
+
recipient: {},
|
|
9173
|
+
// 收件人
|
|
9174
|
+
p: {},
|
|
9175
|
+
// 当前产品
|
|
9176
|
+
m: {},
|
|
9177
|
+
// 主险
|
|
9178
|
+
me: {},
|
|
9179
|
+
// 当前险种
|
|
9180
|
+
common: {},
|
|
9181
|
+
// 通用信息
|
|
9182
|
+
customVariable: null,
|
|
9183
|
+
// 自定义变量
|
|
9184
|
+
cv: null,
|
|
9185
|
+
// 简写,自定义变量
|
|
9186
|
+
t: {} // 事件目标
|
|
9187
|
+
};
|
|
9188
|
+
if (personData) {
|
|
9189
|
+
var insuredInfo = (personData.personOrderList || []).find(function (p) {
|
|
9190
|
+
return p.key === 'insuredInfo';
|
|
9191
|
+
});
|
|
9192
|
+
var insured2Info = (personData.personOrderList || []).find(function (p) {
|
|
9193
|
+
return p.key === 'insured2Info';
|
|
9194
|
+
});
|
|
9195
|
+
var applicantInfo = (personData.personOrderList || []).find(function (p) {
|
|
9196
|
+
return p.key === 'applicantInfo';
|
|
9197
|
+
});
|
|
9198
|
+
var recipientInfo = personData !== null && personData !== void 0 && personData.recipientInfo ? personData.recipientInfo : null;
|
|
9199
|
+
map.insured = insuredInfo ? convertEleOrderListToObj(insuredInfo) : {};
|
|
9200
|
+
map.insured2 = insured2Info ? convertEleOrderListToObj(insured2Info) : {};
|
|
9201
|
+
map.applicant = applicantInfo ? convertEleOrderListToObj(applicantInfo) : {};
|
|
9202
|
+
map.recipient = recipientInfo ? convertEleOrderListToObj(recipientInfo) : {};
|
|
9203
|
+
}
|
|
9204
|
+
if (ins) {
|
|
9205
|
+
map.me = ins ? convertEleOrderListToObj(ins) : {};
|
|
9206
|
+
map["i".concat(ins.key)] = ins;
|
|
9207
|
+
}
|
|
9208
|
+
if (product) {
|
|
9209
|
+
map.productId = product.key;
|
|
9210
|
+
Object.keys(product).filter(function (k) {
|
|
9211
|
+
return !['mulInsOrderList'].includes(k);
|
|
9212
|
+
}).forEach(function (k) {
|
|
9213
|
+
map.p[k] = product[k];
|
|
9214
|
+
});
|
|
9215
|
+
if (Array.isArray(product.mulInsOrderList)) {
|
|
9216
|
+
var common = product.mulInsOrderList.find(function (item) {
|
|
9217
|
+
return item.key === 'common';
|
|
9218
|
+
});
|
|
9219
|
+
var insuranceList = product.mulInsOrderList.filter(function (item) {
|
|
9220
|
+
return !['common'].includes(item.key);
|
|
9221
|
+
}).map(function (item) {
|
|
9222
|
+
return convertEleOrderListToObj(item);
|
|
9223
|
+
});
|
|
9224
|
+
map.m = insuranceList[0] ? insuranceList[0] : {};
|
|
9225
|
+
map.me = ins && ins.key ? insuranceList.find(function (e) {
|
|
9226
|
+
return e.key === ins.key;
|
|
9227
|
+
}) || {} : {};
|
|
9228
|
+
map.common = common ? convertEleOrderListToObj(common) : {};
|
|
9229
|
+
insuranceList.forEach(function (item) {
|
|
9230
|
+
map["i".concat(item.key)] = item;
|
|
9231
|
+
});
|
|
9232
|
+
}
|
|
9233
|
+
}
|
|
9234
|
+
if (options) {
|
|
9235
|
+
if (options.planbookId) {
|
|
9236
|
+
map.planbookId = options.planbookId;
|
|
9237
|
+
}
|
|
9238
|
+
if (options.eventTarget) {
|
|
9239
|
+
map.t = options.eventTarget;
|
|
9240
|
+
}
|
|
9241
|
+
}
|
|
9242
|
+
if (ins && ins.customVariableExp) {
|
|
9243
|
+
var exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2');
|
|
9244
|
+
map.customVariable = eval(exp);
|
|
9245
|
+
map.cv = map.customVariable;
|
|
9246
|
+
}
|
|
9247
|
+
return map;
|
|
9248
|
+
}
|
|
9249
|
+
function executeElementRule(personData, product, ins, ele) {
|
|
9250
|
+
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
9251
|
+
var paramMap = getExpressionParamMap(personData, product, ins, options);
|
|
9252
|
+
var newEleMap = {};
|
|
9253
|
+
if (paramMap) {
|
|
9254
|
+
if (['cmCommonTitle'].includes(ele.componentName)) {
|
|
9255
|
+
if (ele.underwriteExp) {
|
|
9256
|
+
var exp = ele.underwriteExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
9257
|
+
var evalValue = eval(exp);
|
|
9258
|
+
if (Array.isArray(evalValue)) {
|
|
9259
|
+
if ([0, 1].includes(evalValue[0])) {
|
|
9260
|
+
newEleMap.value = evalValue[0] === 1;
|
|
9261
|
+
}
|
|
9262
|
+
if ([0, 1].includes(evalValue[1])) {
|
|
9263
|
+
newEleMap.isDisabled = evalValue[1] === 0;
|
|
9264
|
+
}
|
|
9265
|
+
}
|
|
9266
|
+
consoleLogWhenEnable("".concat(ele.key, ": underwriteExp"), exp, evalValue);
|
|
9267
|
+
}
|
|
9268
|
+
}
|
|
9269
|
+
if (['cmCommonSelect', 'cmCommonRadioBtn', 'cmCommonRadio', 'cmCommonCheckbox'].includes(ele.componentName)) {
|
|
9270
|
+
if (ele.defaultValueExp) {
|
|
9271
|
+
if (ele.value !== 0 && !ele.value && paramMap.t.elementKey !== ele.key) {
|
|
9272
|
+
var _exp = ele.defaultValueExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
9273
|
+
newEleMap.value = eval(_exp);
|
|
9274
|
+
consoleLogWhenEnable("".concat(ele.key, ": defaultValueExp"), _exp, newEleMap.value);
|
|
9275
|
+
}
|
|
9276
|
+
}
|
|
9277
|
+
if (ele.underwriteExp) {
|
|
9278
|
+
var _exp2 = ele.underwriteExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
9279
|
+
var _evalValue = eval(_exp2);
|
|
9280
|
+
if (Array.isArray(_evalValue) && Array.isArray(ele.opts)) {
|
|
9281
|
+
if (_evalValue.length === 2) {
|
|
9282
|
+
newEleMap.opts = (ele.opts || []).filter(function (o) {
|
|
9283
|
+
return o.val >= _evalValue[0] && o.val <= _evalValue[1];
|
|
9284
|
+
});
|
|
9285
|
+
} else {
|
|
9286
|
+
newEleMap.opts = (ele.opts || []).filter(function (o) {
|
|
9287
|
+
return _evalValue.includes(o.val);
|
|
9288
|
+
});
|
|
9289
|
+
}
|
|
9290
|
+
}
|
|
9291
|
+
if (Array.isArray(newEleMap.opts)) {
|
|
9292
|
+
if (newEleMap.opts.length && !newEleMap.opts.some(function (o) {
|
|
9293
|
+
return o.val === ele.value;
|
|
9294
|
+
})) {
|
|
9295
|
+
newEleMap.value = newEleMap.opts[0].val;
|
|
9296
|
+
}
|
|
9297
|
+
}
|
|
9298
|
+
consoleLogWhenEnable("".concat(ele.key, ": underwriteExp"), _exp2, _evalValue);
|
|
9299
|
+
}
|
|
9300
|
+
}
|
|
9301
|
+
if (['cmCommonInput'].includes(ele.componentName)) {
|
|
9302
|
+
if (ele.defaultValueExp) {
|
|
9303
|
+
if (ele.value !== 0 && !ele.value && paramMap.t.elementKey !== ele.key) {
|
|
9304
|
+
var _exp3 = ele.defaultValueExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
9305
|
+
newEleMap.value = eval(_exp3);
|
|
9306
|
+
consoleLogWhenEnable("".concat(ele.key, ": defaultValueExp"), _exp3, newEleMap.value);
|
|
9307
|
+
}
|
|
9308
|
+
}
|
|
9309
|
+
if (ele.minExp) {
|
|
9310
|
+
var _exp4 = ele.minExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
9311
|
+
newEleMap.min = eval(_exp4);
|
|
9312
|
+
consoleLogWhenEnable("".concat(ele.key, ": minExp"), _exp4, newEleMap.min);
|
|
9313
|
+
}
|
|
9314
|
+
if (ele.maxExp) {
|
|
9315
|
+
var _exp5 = ele.maxExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
9316
|
+
newEleMap.max = eval(_exp5);
|
|
9317
|
+
consoleLogWhenEnable("".concat(ele.key, ": maxExp"), _exp5, newEleMap.max);
|
|
9318
|
+
}
|
|
9319
|
+
if (ele.multiExp) {
|
|
9320
|
+
var _exp6 = ele.multiExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2');
|
|
9321
|
+
newEleMap.multi = eval(_exp6);
|
|
9322
|
+
consoleLogWhenEnable("".concat(ele.key, ": multiExp"), _exp6, newEleMap.multi);
|
|
9323
|
+
}
|
|
9324
|
+
}
|
|
9325
|
+
}
|
|
9326
|
+
return newEleMap;
|
|
9327
|
+
}
|
|
9152
9328
|
|
|
9153
9329
|
/**
|
|
9154
9330
|
* **转换人员数据**
|
|
@@ -9230,8 +9406,8 @@ function _toConsumableArray(r) {
|
|
|
9230
9406
|
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread();
|
|
9231
9407
|
}
|
|
9232
9408
|
|
|
9233
|
-
function ownKeys$
|
|
9234
|
-
function _objectSpread$
|
|
9409
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9410
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9235
9411
|
|
|
9236
9412
|
/**
|
|
9237
9413
|
* **处理险种数据**
|
|
@@ -9452,7 +9628,7 @@ function restrictElementsInInsurance(_ref4) {
|
|
|
9452
9628
|
var insuranceInfo = convertEleOrderListToObj(insData);
|
|
9453
9629
|
var insVerifyData;
|
|
9454
9630
|
if (insuredInfo) {
|
|
9455
|
-
insVerifyData = _objectSpread$
|
|
9631
|
+
insVerifyData = _objectSpread$2({
|
|
9456
9632
|
sex: insuredInfo.sex,
|
|
9457
9633
|
age: insuredInfo.age
|
|
9458
9634
|
}, insuranceInfo);
|
|
@@ -9510,8 +9686,8 @@ function restrictElementsInInsurance(_ref4) {
|
|
|
9510
9686
|
return errorMsg;
|
|
9511
9687
|
}
|
|
9512
9688
|
|
|
9513
|
-
function ownKeys$
|
|
9514
|
-
function _objectSpread$
|
|
9689
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9690
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9515
9691
|
|
|
9516
9692
|
/**
|
|
9517
9693
|
* **处理产品数据(单个)**
|
|
@@ -9542,7 +9718,7 @@ function productDataHandler(_x, _x2, _x3, _x4) {
|
|
|
9542
9718
|
*/
|
|
9543
9719
|
function _productDataHandler() {
|
|
9544
9720
|
_productDataHandler = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(prodData, prodVerifyData, personData, parmas) {
|
|
9545
|
-
var productVerifyData, hasProduct, hasVerifyData, hasPersonData, personOrderList, _prodData$mulInsOrder3;
|
|
9721
|
+
var productVerifyData, _parmas$eventTarget, insuranceKey, elementKey, groupInsurance, groupInsuranceIdEle, subInsurances, hasProduct, hasVerifyData, hasPersonData, personOrderList, _prodData$mulInsOrder3;
|
|
9546
9722
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
9547
9723
|
while (1) switch (_context.prev = _context.next) {
|
|
9548
9724
|
case 0:
|
|
@@ -9569,6 +9745,29 @@ function _productDataHandler() {
|
|
|
9569
9745
|
case 3:
|
|
9570
9746
|
productVerifyData = prodVerifyData;
|
|
9571
9747
|
case 4:
|
|
9748
|
+
// 组合险种特殊处理:当用户点击组合险种的子险种选项时,将其他子险种的标题设置为未选中状态
|
|
9749
|
+
if (parmas && parmas.eventTarget) {
|
|
9750
|
+
_parmas$eventTarget = parmas.eventTarget, insuranceKey = _parmas$eventTarget.insuranceKey, elementKey = _parmas$eventTarget.elementKey;
|
|
9751
|
+
if (insuranceKey && elementKey === 'insuranceId') {
|
|
9752
|
+
groupInsurance = (prodData.mulInsOrderList || []).find(function (ins) {
|
|
9753
|
+
return ins.key === insuranceKey;
|
|
9754
|
+
});
|
|
9755
|
+
groupInsuranceIdEle = ((groupInsurance === null || groupInsurance === void 0 ? void 0 : groupInsurance.eleOrderList) || []).find(function (e) {
|
|
9756
|
+
return e.key === 'insuranceId';
|
|
9757
|
+
});
|
|
9758
|
+
subInsurances = (prodData.mulInsOrderList || []).filter(function (ins) {
|
|
9759
|
+
return ins.groupKey === insuranceKey;
|
|
9760
|
+
});
|
|
9761
|
+
subInsurances.forEach(function (ins) {
|
|
9762
|
+
var titleEle = (ins.eleOrderList || []).find(function (e) {
|
|
9763
|
+
return e.key === 'title';
|
|
9764
|
+
});
|
|
9765
|
+
if (titleEle && groupInsuranceIdEle && !Array.isArray(titleEle.value)) {
|
|
9766
|
+
titleEle.value = groupInsuranceIdEle.value === ins.key;
|
|
9767
|
+
}
|
|
9768
|
+
});
|
|
9769
|
+
}
|
|
9770
|
+
}
|
|
9572
9771
|
hasProduct = prodData.mulInsOrderList;
|
|
9573
9772
|
hasVerifyData = productVerifyData && Object.keys(productVerifyData).length;
|
|
9574
9773
|
hasPersonData = personData && personData.personOrderList;
|
|
@@ -9583,8 +9782,8 @@ function _productDataHandler() {
|
|
|
9583
9782
|
insuranceDataHandler(ins, prodData);
|
|
9584
9783
|
var insuranceVerifyData = productVerifyData[ins.key];
|
|
9585
9784
|
if (!insuranceVerifyData) {
|
|
9586
|
-
if (
|
|
9587
|
-
|
|
9785
|
+
if (ins.key !== 'common') {
|
|
9786
|
+
consoleLogWhenEnable("".concat(prodData.titleName, "-").concat(prodData.key, " -> ").concat(ins.name, "-").concat(ins.key, ": \u5F53\u524D\u9669\u79CD\u6CA1\u6709\u8D39\u7387\u8868"));
|
|
9588
9787
|
}
|
|
9589
9788
|
return;
|
|
9590
9789
|
}
|
|
@@ -9636,9 +9835,7 @@ function _productDataHandler() {
|
|
|
9636
9835
|
if (isNotAllowSelect) {
|
|
9637
9836
|
eleTitle.isDisabled = true;
|
|
9638
9837
|
eleTitle.value = false;
|
|
9639
|
-
|
|
9640
|
-
console.log(curCondition ? "".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u5B58\u5728\uFF01\u4F46\u6295\u4FDD\u4EBA\u672A\u9009\u4E2D\u6216\u6295\u88AB\u4FDD\u4EBA\u4E3A\u540C\u4E00\u4EBA\uFF0C\u8BE5\u8C41\u514D\u9669\uFF08\u4E0D\u80FD\u9644\u52A0\u5230\u88AB\u4FDD\u4EBA\uFF09\u4E0D\u53EF\u9009") : "".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u4E0D\u5B58\u5728\uFF01"));
|
|
9641
|
-
}
|
|
9838
|
+
consoleLogWhenEnable(curCondition ? "".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u5B58\u5728\uFF01\u4F46\u6295\u4FDD\u4EBA\u672A\u9009\u4E2D\u6216\u6295\u88AB\u4FDD\u4EBA\u4E3A\u540C\u4E00\u4EBA\uFF0C\u8BE5\u8C41\u514D\u9669\uFF08\u4E0D\u80FD\u9644\u52A0\u5230\u88AB\u4FDD\u4EBA\uFF09\u4E0D\u53EF\u9009") : "".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u4E0D\u5B58\u5728\uFF01"));
|
|
9642
9839
|
} else {
|
|
9643
9840
|
// 存在费率,险种可选
|
|
9644
9841
|
eleTitle.isDisabled = false;
|
|
@@ -9646,9 +9843,7 @@ function _productDataHandler() {
|
|
|
9646
9843
|
if (ins.required && (!ins.groupKey || ins.isCheckbox)) {
|
|
9647
9844
|
eleTitle.value = true;
|
|
9648
9845
|
eleTitle.isDisabled = true;
|
|
9649
|
-
|
|
9650
|
-
console.log("".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u5B58\u5728\uFF0C\u9669\u79CD\u4E3A\u5FC5\u9009\u9669\u4E14(\u4E3A\u975E\u7EC4\u5408\u9669\u6216\u4E3A\u591A\u9009\u4E00\u9669\u79CD)"));
|
|
9651
|
-
}
|
|
9846
|
+
consoleLogWhenEnable("".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u5B58\u5728\uFF0C\u9669\u79CD\u4E3A\u5FC5\u9009\u9669\u4E14(\u4E3A\u975E\u7EC4\u5408\u9669\u6216\u4E3A\u591A\u9009\u4E00\u9669\u79CD)"));
|
|
9652
9847
|
}
|
|
9653
9848
|
}
|
|
9654
9849
|
if (!curCondition) {
|
|
@@ -9667,9 +9862,7 @@ function _productDataHandler() {
|
|
|
9667
9862
|
});
|
|
9668
9863
|
}
|
|
9669
9864
|
if (!eleData) {
|
|
9670
|
-
|
|
9671
|
-
console.log("".concat(ins.name, " - ").concat(curCondition && curCondition.key, "\u5143\u7D20\u4E0D\u5B58\u5728\uFF1A"));
|
|
9672
|
-
}
|
|
9865
|
+
consoleLogWhenEnable("".concat(ins.name, " - ").concat(curCondition && curCondition.key, "\u5143\u7D20\u4E0D\u5B58\u5728\uFF1A"));
|
|
9673
9866
|
curCondition = null;
|
|
9674
9867
|
return 0; // break
|
|
9675
9868
|
}
|
|
@@ -9698,9 +9891,7 @@ function _productDataHandler() {
|
|
|
9698
9891
|
eleData.value = refEleData.value;
|
|
9699
9892
|
}
|
|
9700
9893
|
} else {
|
|
9701
|
-
|
|
9702
|
-
console.log("".concat(ins.name, "-").concat(ins.key, "\uFF1A\u5173\u8054\u9669\u79CD").concat(ins.refInsuranceId, "\u4E0D\u5B58\u5728"));
|
|
9703
|
-
}
|
|
9894
|
+
consoleLogWhenEnable("".concat(ins.name, "-").concat(ins.key, "\uFF1A\u5173\u8054\u9669\u79CD").concat(ins.refInsuranceId, "\u4E0D\u5B58\u5728"));
|
|
9704
9895
|
}
|
|
9705
9896
|
} else {
|
|
9706
9897
|
var backupOpts = eleData.opts && eleData.opts.length ? eleData.opts.slice(0) : [];
|
|
@@ -9769,9 +9960,7 @@ function _productDataHandler() {
|
|
|
9769
9960
|
if (!curCondition) {
|
|
9770
9961
|
eleTitle.isDisabled = true;
|
|
9771
9962
|
eleTitle.value = false;
|
|
9772
|
-
|
|
9773
|
-
console.log("".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u4E0D\u5B58\u5728\uFF01"));
|
|
9774
|
-
}
|
|
9963
|
+
consoleLogWhenEnable("".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u4E0D\u5B58\u5728\uFF01"));
|
|
9775
9964
|
}
|
|
9776
9965
|
|
|
9777
9966
|
// 如果当前元素是隐藏的且不可修改,则过滤上一元素的选项,即,删除上一元素中不包含当前元素值的选项。
|
|
@@ -9808,6 +9997,15 @@ function _productDataHandler() {
|
|
|
9808
9997
|
_ret = _loop2();
|
|
9809
9998
|
if (_ret === 0) break;
|
|
9810
9999
|
} while (curCondition && curCondition.key && curCondition[curCondition.key]);
|
|
10000
|
+
if (Array.isArray(ins.eleOrderList)) {
|
|
10001
|
+
ins.eleOrderList.forEach(function (ele) {
|
|
10002
|
+
var newEleMap = executeElementRule(personData, prodData, ins, ele, parmas);
|
|
10003
|
+
for (var k in newEleMap) {
|
|
10004
|
+
ele[k] = newEleMap[k];
|
|
10005
|
+
}
|
|
10006
|
+
});
|
|
10007
|
+
insuranceDataHandler(ins, prodData);
|
|
10008
|
+
}
|
|
9811
10009
|
});
|
|
9812
10010
|
}
|
|
9813
10011
|
setGroupInsurance(prodData);
|
|
@@ -9956,10 +10154,10 @@ function getElementVerifyFromProductVerify(verify, insurances, option) {
|
|
|
9956
10154
|
var insuranceInfo = {};
|
|
9957
10155
|
insurances.forEach(function (ins) {
|
|
9958
10156
|
if (['common', option.insuranceKey].includes(ins.key)) {
|
|
9959
|
-
insuranceInfo = _objectSpread$
|
|
10157
|
+
insuranceInfo = _objectSpread$1(_objectSpread$1({}, insuranceInfo), convertEleOrderListToObj(ins));
|
|
9960
10158
|
}
|
|
9961
10159
|
});
|
|
9962
|
-
insuranceInfo = _objectSpread$
|
|
10160
|
+
insuranceInfo = _objectSpread$1(_objectSpread$1({}, insuranceInfo), option);
|
|
9963
10161
|
var temp = verify;
|
|
9964
10162
|
var hasElementKey = verify.key === option.elementKey;
|
|
9965
10163
|
while (temp && temp.key && temp.key !== option.elementKey) {
|
|
@@ -10037,40 +10235,21 @@ function setCommonInfo(prodData) {
|
|
|
10037
10235
|
* @returns {IPbProduct} 产品数据(单个)
|
|
10038
10236
|
*/
|
|
10039
10237
|
function setGroupInsurance(prodData) {
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
var groupInsuranceList = prodData && prodData.mulInsOrderList && prodData.mulInsOrderList.filter(function (ins) {
|
|
10044
|
-
return !!ins.groupKey;
|
|
10045
|
-
});
|
|
10046
|
-
if (!groupInsuranceList || !groupInsuranceList.length) {
|
|
10047
|
-
return prodData;
|
|
10048
|
-
}
|
|
10049
|
-
var oldGroupInsList = prodData.mulInsOrderList.filter(function (ins) {
|
|
10050
|
-
return ins.isGroup;
|
|
10051
|
-
});
|
|
10052
|
-
var newGroupInsMap = {};
|
|
10053
|
-
//清空险种列表中的已有的险种组合
|
|
10054
|
-
prodData.mulInsOrderList = prodData.mulInsOrderList.filter(function (ins) {
|
|
10238
|
+
var mulInsOrderList = prodData && prodData.mulInsOrderList ? prodData.mulInsOrderList : [];
|
|
10239
|
+
// 清空险种列表中的已有的险种组合
|
|
10240
|
+
prodData.mulInsOrderList = mulInsOrderList.filter(function (ins) {
|
|
10055
10241
|
return !ins.isGroup;
|
|
10056
10242
|
});
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
var
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
return e.key === 'title';
|
|
10068
|
-
});
|
|
10069
|
-
oldInsuranceIdEle = oldGroupIns.eleOrderList.find(function (e) {
|
|
10070
|
-
return e.key === 'insuranceId';
|
|
10071
|
-
});
|
|
10072
|
-
}
|
|
10073
|
-
if (ins.groupKey) {
|
|
10243
|
+
|
|
10244
|
+
// 多险种选一,或多险种选多。生成一个组合,如多个险种合成豁免险
|
|
10245
|
+
var groupInsuranceList = mulInsOrderList.filter(function (ins) {
|
|
10246
|
+
return !!ins.groupKey;
|
|
10247
|
+
});
|
|
10248
|
+
if (groupInsuranceList.length) {
|
|
10249
|
+
var newGroupInsMap = {};
|
|
10250
|
+
groupInsuranceList.filter(function (ins) {
|
|
10251
|
+
return ins.groupKey;
|
|
10252
|
+
}).forEach(function (ins) {
|
|
10074
10253
|
newGroupInsMap[ins.groupKey] = newGroupInsMap[ins.groupKey] || {
|
|
10075
10254
|
key: ins.groupKey,
|
|
10076
10255
|
name: ins.groupName,
|
|
@@ -10078,19 +10257,19 @@ function setGroupInsurance(prodData) {
|
|
|
10078
10257
|
isGroup: true,
|
|
10079
10258
|
eleOrderList: [{
|
|
10080
10259
|
key: 'title',
|
|
10081
|
-
value:
|
|
10260
|
+
value: false,
|
|
10082
10261
|
isDisabled: false,
|
|
10083
10262
|
componentName: 'cmCommonTitle',
|
|
10084
10263
|
labelName: ins.groupName
|
|
10085
10264
|
}, {
|
|
10086
10265
|
key: 'insuranceId',
|
|
10087
|
-
value:
|
|
10266
|
+
value: ins.isCheckbox ? [] : null,
|
|
10088
10267
|
componentName: ins.isCheckbox ? 'cmCommonCheckbox' : 'cmCommonRadio',
|
|
10089
10268
|
opts: []
|
|
10090
10269
|
}]
|
|
10091
10270
|
};
|
|
10092
10271
|
|
|
10093
|
-
//
|
|
10272
|
+
// 将子险种转换成险种组合的选项
|
|
10094
10273
|
var titleEle = ins.eleOrderList.find(function (e) {
|
|
10095
10274
|
return e.key === 'title';
|
|
10096
10275
|
});
|
|
@@ -10103,119 +10282,73 @@ function setGroupInsurance(prodData) {
|
|
|
10103
10282
|
desc: titleEle.labelName,
|
|
10104
10283
|
isDisabled: titleEle.isDisabled
|
|
10105
10284
|
});
|
|
10106
|
-
}
|
|
10107
|
-
});
|
|
10108
|
-
|
|
10109
|
-
// 处理组合险中的逻辑,并加入到产品险种列表中
|
|
10110
|
-
var _loop = function _loop(k) {
|
|
10111
|
-
var nGroupTitle = newGroupInsMap[k].eleOrderList.find(function (e) {
|
|
10112
|
-
return e.key === 'title';
|
|
10113
|
-
});
|
|
10114
|
-
var nGroupInsuranceId = newGroupInsMap[k].eleOrderList.find(function (e) {
|
|
10115
|
-
return e.key === 'insuranceId';
|
|
10116
10285
|
});
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
}
|
|
10128
|
-
}
|
|
10129
|
-
var groupInsList = prodData.mulInsOrderList.filter(function (ins) {
|
|
10286
|
+
|
|
10287
|
+
// 处理组合险中的逻辑,并加入到产品险种列表中
|
|
10288
|
+
var _loop = function _loop(k) {
|
|
10289
|
+
var nGroupTitleEle = newGroupInsMap[k].eleOrderList.find(function (e) {
|
|
10290
|
+
return e.key === 'title';
|
|
10291
|
+
});
|
|
10292
|
+
var nGroupInsuranceIdEle = newGroupInsMap[k].eleOrderList.find(function (e) {
|
|
10293
|
+
return e.key === 'insuranceId';
|
|
10294
|
+
});
|
|
10295
|
+
var groupInsList = mulInsOrderList.filter(function (ins) {
|
|
10130
10296
|
return ins.groupKey == k;
|
|
10131
10297
|
});
|
|
10132
|
-
if (
|
|
10133
|
-
// 如果组合险中有一款是必选的,则整个组合险为选中状态
|
|
10134
|
-
if (groupInsList.some(function (ins) {
|
|
10135
|
-
var subTitle = ins.eleOrderList.find(function (e) {
|
|
10136
|
-
return e.key === 'title';
|
|
10137
|
-
});
|
|
10138
|
-
return ins.required && subTitle && !subTitle.isDisabled;
|
|
10139
|
-
})) {
|
|
10140
|
-
nGroupTitle.value = true;
|
|
10141
|
-
nGroupTitle.isDisabled = true;
|
|
10142
|
-
}
|
|
10143
|
-
|
|
10144
|
-
// 初始化时,设置组合险默认值
|
|
10298
|
+
if (nGroupTitleEle && nGroupInsuranceIdEle && groupInsList.length) {
|
|
10145
10299
|
var notDisabledInsurances = groupInsList.filter(function (ins) {
|
|
10146
|
-
var
|
|
10300
|
+
var titleEle = (ins.eleOrderList || []).find(function (e) {
|
|
10147
10301
|
return e.key === 'title';
|
|
10148
10302
|
});
|
|
10149
|
-
return
|
|
10303
|
+
return titleEle && !titleEle.isDisabled;
|
|
10150
10304
|
});
|
|
10151
|
-
var checkedInsurances = notDisabledInsurances.
|
|
10152
|
-
var
|
|
10153
|
-
return
|
|
10305
|
+
var checkedInsurances = notDisabledInsurances.filter(function (ins) {
|
|
10306
|
+
var titleEle = (ins.eleOrderList || []).find(function (ele) {
|
|
10307
|
+
return ele.key === 'title';
|
|
10154
10308
|
});
|
|
10155
|
-
return
|
|
10309
|
+
return titleEle && titleEle.value;
|
|
10156
10310
|
});
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
}
|
|
10169
|
-
if (nGroupInsuranceId) {
|
|
10170
|
-
if (nGroupInsuranceId.value) {
|
|
10171
|
-
if (nGroupInsuranceId.value.constructor === Array) {
|
|
10172
|
-
if (nGroupInsuranceId.opts) {
|
|
10173
|
-
nGroupInsuranceId.opts = nGroupInsuranceId.opts.filter(function (opt) {
|
|
10174
|
-
return nGroupInsuranceId.value.indexOf(opt.val) !== -1 && !opt.isDisabled;
|
|
10175
|
-
});
|
|
10176
|
-
}
|
|
10177
|
-
} else {
|
|
10178
|
-
var opt = nGroupInsuranceId.opts.find(function (o) {
|
|
10179
|
-
return o.val === nGroupInsuranceId.value;
|
|
10180
|
-
});
|
|
10181
|
-
if (opt && opt.isDisabled) {
|
|
10182
|
-
nGroupInsuranceId.value = '';
|
|
10183
|
-
}
|
|
10184
|
-
}
|
|
10185
|
-
}
|
|
10186
|
-
if (nGroupInsuranceId.value) {
|
|
10187
|
-
var checkedIns = prodData.mulInsOrderList.find(function (ins) {
|
|
10188
|
-
return ins.key === nGroupInsuranceId.value;
|
|
10311
|
+
var hasRequiredIns = notDisabledInsurances.some(function (ins) {
|
|
10312
|
+
return ins.required;
|
|
10313
|
+
});
|
|
10314
|
+
var checkedInsurance = checkedInsurances[0];
|
|
10315
|
+
// hasRequiredIns:如果组合险中有一款是必选的,则整个组合险为选中状态
|
|
10316
|
+
// 所有险种都不可选,则组合险不可修改且不选中。否则,组合险种可选
|
|
10317
|
+
nGroupTitleEle.value = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).some(function (opt) {
|
|
10318
|
+
return !opt.isDisabled;
|
|
10319
|
+
});
|
|
10320
|
+
nGroupTitleEle.isDisabled = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).every(function (opt) {
|
|
10321
|
+
return !!opt.isDisabled;
|
|
10189
10322
|
});
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10323
|
+
nGroupInsuranceIdEle.value = checkedInsurance ? checkedInsurance.key : null;
|
|
10324
|
+
|
|
10325
|
+
//将当前选中险种的部分数据复制到组合险中
|
|
10326
|
+
if (checkedInsurance) {
|
|
10327
|
+
// 定义组件险中的元素:自身eleOrderList + 所选险种的eleOrderList(不包含标题)
|
|
10328
|
+
var keys = ['code', 'groupKey', 'groupName', 'isFollowing', 'key', 'name', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData'];
|
|
10329
|
+
for (var ck in checkedInsurance) {
|
|
10330
|
+
if (!keys.includes(ck)) {
|
|
10195
10331
|
if (ck === 'eleOrderList') {
|
|
10196
|
-
newGroupInsMap[k][ck] = newGroupInsMap[k][ck].concat(
|
|
10332
|
+
newGroupInsMap[k][ck] = newGroupInsMap[k][ck].concat(checkedInsurance[ck].filter(function (ele) {
|
|
10197
10333
|
return ele.key !== 'title';
|
|
10198
10334
|
}));
|
|
10199
10335
|
} else {
|
|
10200
|
-
newGroupInsMap[k][ck] =
|
|
10336
|
+
newGroupInsMap[k][ck] = checkedInsurance[ck];
|
|
10201
10337
|
}
|
|
10202
10338
|
}
|
|
10203
10339
|
}
|
|
10204
10340
|
}
|
|
10205
10341
|
}
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
if (
|
|
10210
|
-
index
|
|
10342
|
+
var index = mulInsOrderList.findLastIndex(function (ins) {
|
|
10343
|
+
return ins.groupKey === k;
|
|
10344
|
+
});
|
|
10345
|
+
if (index >= 0) {
|
|
10346
|
+
prodData.mulInsOrderList.splice(index + 1, 0, newGroupInsMap[k]);
|
|
10211
10347
|
}
|
|
10212
|
-
}
|
|
10213
|
-
|
|
10214
|
-
|
|
10348
|
+
};
|
|
10349
|
+
for (var k in newGroupInsMap) {
|
|
10350
|
+
_loop(k);
|
|
10215
10351
|
}
|
|
10216
|
-
};
|
|
10217
|
-
for (var k in newGroupInsMap) {
|
|
10218
|
-
_loop(k);
|
|
10219
10352
|
}
|
|
10220
10353
|
return prodData;
|
|
10221
10354
|
}
|
|
@@ -10477,7 +10610,7 @@ function convertProductData(prodData) {
|
|
|
10477
10610
|
if (!prodData.mulInsOrderList) {
|
|
10478
10611
|
return prodData;
|
|
10479
10612
|
}
|
|
10480
|
-
var productData = _objectSpread$
|
|
10613
|
+
var productData = _objectSpread$1(_objectSpread$1({}, prodData), {}, {
|
|
10481
10614
|
common: {},
|
|
10482
10615
|
mulInsOrderList: []
|
|
10483
10616
|
});
|
|
@@ -10490,7 +10623,7 @@ function convertProductData(prodData) {
|
|
|
10490
10623
|
if (insuranceData.title && !insuranceData.groupKey) {
|
|
10491
10624
|
if (insuranceData.isGroup) {
|
|
10492
10625
|
//组合险,则遍历其所选中的险种,并转换数据
|
|
10493
|
-
var insuranceId = insuranceData.insuranceId
|
|
10626
|
+
var insuranceId = Array.isArray(insuranceData.insuranceId) ? insuranceData.insuranceId : [insuranceData.insuranceId];
|
|
10494
10627
|
insuranceId.forEach(function (insId) {
|
|
10495
10628
|
var checkedIns = prodData.mulInsOrderList.find(function (p) {
|
|
10496
10629
|
return p.key === insId;
|
|
@@ -10551,10 +10684,6 @@ function clearAddAndTakeAndAdjustBaoeData(productData) {
|
|
|
10551
10684
|
return productData;
|
|
10552
10685
|
}
|
|
10553
10686
|
|
|
10554
|
-
if (document && document.cookie && document.cookie.match('LIZHAO_DEBUG_CONSOLE_FLAG=1')) {
|
|
10555
|
-
window.DEBUG_TEMP_CONSOLE_FLAG = true;
|
|
10556
|
-
}
|
|
10557
|
-
|
|
10558
10687
|
function showLoading() {
|
|
10559
10688
|
if (IS_CPPOC_HOST) {
|
|
10560
10689
|
_Toast.loading({
|
|
@@ -10626,8 +10755,8 @@ service.interceptors.response.use(function (response) {
|
|
|
10626
10755
|
return Promise.reject(error);
|
|
10627
10756
|
});
|
|
10628
10757
|
|
|
10629
|
-
function ownKeys
|
|
10630
|
-
function _objectSpread
|
|
10758
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10759
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10631
10760
|
function createMd5Token(reqData, obj) {
|
|
10632
10761
|
var personList = reqData.personData.personOrderList;
|
|
10633
10762
|
var signInfo = {};
|
|
@@ -10686,7 +10815,7 @@ function createMd5Token(reqData, obj) {
|
|
|
10686
10815
|
// signMd5: MD5(signInfoTx)
|
|
10687
10816
|
// }))
|
|
10688
10817
|
|
|
10689
|
-
return CryptoJS.AES.encrypt(JSON.stringify(_objectSpread
|
|
10818
|
+
return CryptoJS.AES.encrypt(JSON.stringify(_objectSpread(_objectSpread({}, signInfo), {}, {
|
|
10690
10819
|
signMd5: MD5(signInfoTx)
|
|
10691
10820
|
})), CryptoJS.enc.Utf8.parse('67u3Dg5fcc06UntP'), {
|
|
10692
10821
|
mode: CryptoJS.mode.ECB,
|
|
@@ -10713,7 +10842,7 @@ function createdProductDataToCalc(inputData) {
|
|
|
10713
10842
|
productForm.mulInsOrderList = productForm.mulInsOrderList.map(function (ins) {
|
|
10714
10843
|
var tempIns = {};
|
|
10715
10844
|
for (var _k2 in ins) {
|
|
10716
|
-
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName'].includes(_k2)) {
|
|
10845
|
+
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'customVariableExp', 'calcResultExp', 'revalidateFlag'].includes(_k2)) {
|
|
10717
10846
|
tempIns[_k2] = ins[_k2];
|
|
10718
10847
|
}
|
|
10719
10848
|
}
|
|
@@ -11631,8 +11760,6 @@ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor
|
|
|
11631
11760
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
11632
11761
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11633
11762
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11634
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11635
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11636
11763
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11637
11764
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11638
11765
|
var BxtProductInfo = (_dec = Component({
|
|
@@ -11828,27 +11955,74 @@ var BxtProductInfo = (_dec = Component({
|
|
|
11828
11955
|
key: "changeProduct",
|
|
11829
11956
|
value: function () {
|
|
11830
11957
|
var _changeProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(productData, options) {
|
|
11958
|
+
var _this5 = this;
|
|
11959
|
+
var $listeners, inputData, verifyData, personData, groupKey, productKey, params, type, insData, eleData, planbookId, publicPbUuid, productVerifyData, eventTarget, errorMsg, hasRevalidateFlag;
|
|
11831
11960
|
return _regeneratorRuntime.wrap(function (_context3) {
|
|
11832
11961
|
while (1) switch (_context3.prev = _context3.next) {
|
|
11833
11962
|
case 0:
|
|
11834
|
-
|
|
11963
|
+
$listeners = this.$listeners, inputData = this.inputData, verifyData = this.verifyData, personData = this.personData, groupKey = this.groupKey, productKey = this.productKey, params = this.params;
|
|
11964
|
+
type = options.type, insData = options.insData, eleData = options.eleData;
|
|
11965
|
+
planbookId = get(params, 'planbookId');
|
|
11966
|
+
publicPbUuid = get(params, 'publicPbUuid');
|
|
11967
|
+
productVerifyData = get(verifyData, "[".concat(productKey, "]"));
|
|
11968
|
+
eventTarget = {
|
|
11969
|
+
insuranceKey: get(insData, 'key') || null,
|
|
11970
|
+
insuranceCode: get(insData, 'code') || null,
|
|
11971
|
+
elementKey: get(eleData, 'key') || null
|
|
11972
|
+
};
|
|
11973
|
+
if (type === 'change') {
|
|
11835
11974
|
clearAddAndTakeAndAdjustBaoeData(productData);
|
|
11836
11975
|
}
|
|
11837
11976
|
_context3.next = 1;
|
|
11838
|
-
return productDataHandler(productData,
|
|
11839
|
-
planbookId:
|
|
11977
|
+
return productDataHandler(productData, productVerifyData, personData, {
|
|
11978
|
+
planbookId: planbookId,
|
|
11979
|
+
eventTarget: eventTarget
|
|
11840
11980
|
});
|
|
11841
11981
|
case 1:
|
|
11842
|
-
if (
|
|
11843
|
-
this.createInsuranceInputResultEle(
|
|
11982
|
+
if (type === 'change') {
|
|
11983
|
+
this.createInsuranceInputResultEle(insData, eleData);
|
|
11844
11984
|
} else {
|
|
11845
11985
|
this.createInsuranceInputResultEle();
|
|
11846
11986
|
}
|
|
11847
|
-
|
|
11848
|
-
personData:
|
|
11849
|
-
productData: productData
|
|
11850
|
-
|
|
11987
|
+
errorMsg = verifyProductRules({
|
|
11988
|
+
personData: personData,
|
|
11989
|
+
productData: productData,
|
|
11990
|
+
insData: insData,
|
|
11991
|
+
eleData: eleData
|
|
11992
|
+
});
|
|
11993
|
+
if (errorMsg) {
|
|
11994
|
+
_context3.next = 3;
|
|
11995
|
+
break;
|
|
11996
|
+
}
|
|
11997
|
+
hasRevalidateFlag = (get(productData, 'mulInsOrderList') || []).some(function (ins) {
|
|
11998
|
+
return ins.revalidateFlag;
|
|
11999
|
+
});
|
|
12000
|
+
if (!(hasRevalidateFlag && $listeners.reCalculate)) {
|
|
12001
|
+
_context3.next = 3;
|
|
12002
|
+
break;
|
|
12003
|
+
}
|
|
12004
|
+
_context3.next = 2;
|
|
12005
|
+
return new Promise(function (resolve, reject) {
|
|
12006
|
+
_this5.$emit('reCalculate', inputData, {
|
|
12007
|
+
planbookId: planbookId,
|
|
12008
|
+
publicPbUuid: publicPbUuid,
|
|
12009
|
+
groupKey: groupKey,
|
|
12010
|
+
productKey: productKey,
|
|
12011
|
+
isIgnoreError: true,
|
|
12012
|
+
eventTarget: eventTarget
|
|
12013
|
+
}, resolve, reject);
|
|
12014
|
+
}).catch(function (err) {
|
|
12015
|
+
errorMsg = get(err, '[0].message') || get(err, 'message');
|
|
12016
|
+
});
|
|
11851
12017
|
case 2:
|
|
12018
|
+
_context3.next = 3;
|
|
12019
|
+
return productDataHandler(productData, productVerifyData, personData, {
|
|
12020
|
+
planbookId: planbookId,
|
|
12021
|
+
eventTarget: eventTarget
|
|
12022
|
+
});
|
|
12023
|
+
case 3:
|
|
12024
|
+
return _context3.abrupt("return", errorMsg);
|
|
12025
|
+
case 4:
|
|
11852
12026
|
case "end":
|
|
11853
12027
|
return _context3.stop();
|
|
11854
12028
|
}
|
|
@@ -12413,6 +12587,12 @@ var __vue_render__ = function __vue_render__() {
|
|
|
12413
12587
|
insData: ins,
|
|
12414
12588
|
eleData: ele
|
|
12415
12589
|
});
|
|
12590
|
+
},
|
|
12591
|
+
"clear": function clear($event) {
|
|
12592
|
+
return _vm.onChange({
|
|
12593
|
+
insData: ins,
|
|
12594
|
+
eleData: ele
|
|
12595
|
+
});
|
|
12416
12596
|
}
|
|
12417
12597
|
},
|
|
12418
12598
|
scopedSlots: _vm._u([!ele.isDisabled ? {
|