bxs-tools-ui 3.3.1 → 3.3.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/index.js +14 -19
- package/es/product-info/index.js +13 -18
- package/es/utils/index.js +12 -17
- package/lib/index.js +14 -19
- package/lib/product-info/index.js +13 -18
- package/lib/utils/index.js +12 -17
- package/package.json +1 -1
- package/packages/bxs-utils/planbook/common.ts +0 -8
- package/packages/bxs-utils/planbook/product.ts +12 -8
- package/packages/index.ts +1 -1
- package/packages/planbook-input/helper.js +35 -33
package/es/index.js
CHANGED
|
@@ -9132,10 +9132,6 @@ function getExpressionParamMap(personData, product, ins, options) {
|
|
|
9132
9132
|
// 当前险种
|
|
9133
9133
|
common: {},
|
|
9134
9134
|
// 通用信息
|
|
9135
|
-
customVariable: null,
|
|
9136
|
-
// 自定义变量
|
|
9137
|
-
cv: null,
|
|
9138
|
-
// 简写,自定义变量
|
|
9139
9135
|
t: {} // 事件目标
|
|
9140
9136
|
};
|
|
9141
9137
|
if (personData) {
|
|
@@ -9198,11 +9194,6 @@ function getExpressionParamMap(personData, product, ins, options) {
|
|
|
9198
9194
|
map.executeSource = options.executeSource;
|
|
9199
9195
|
}
|
|
9200
9196
|
}
|
|
9201
|
-
if (ins && ins.customVariableExp) {
|
|
9202
|
-
var exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2');
|
|
9203
|
-
map.customVariable = eval(exp);
|
|
9204
|
-
map.cv = map.customVariable;
|
|
9205
|
-
}
|
|
9206
9197
|
return map;
|
|
9207
9198
|
}
|
|
9208
9199
|
function executeElementRule(personData, product, ins, ele) {
|
|
@@ -10520,14 +10511,18 @@ function _productDataHandler() {
|
|
|
10520
10511
|
_ret = _loop2();
|
|
10521
10512
|
if (_ret === 0) break;
|
|
10522
10513
|
} while (curCondition && curCondition.key && curCondition[curCondition.key]);
|
|
10523
|
-
|
|
10524
|
-
ins.eleOrderList
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10514
|
+
try {
|
|
10515
|
+
if (Array.isArray(ins.eleOrderList)) {
|
|
10516
|
+
ins.eleOrderList.forEach(function (ele) {
|
|
10517
|
+
var newEleMap = executeElementRule(personData, prodData, ins, ele, parmas);
|
|
10518
|
+
for (var k in newEleMap) {
|
|
10519
|
+
ele[k] = newEleMap[k];
|
|
10520
|
+
}
|
|
10521
|
+
});
|
|
10522
|
+
insuranceDataHandler(ins, prodData);
|
|
10523
|
+
}
|
|
10524
|
+
} catch (error) {
|
|
10525
|
+
console.error(error);
|
|
10531
10526
|
}
|
|
10532
10527
|
});
|
|
10533
10528
|
}
|
|
@@ -46857,7 +46852,7 @@ function _createdProductDataToCalc() {
|
|
|
46857
46852
|
productForm.mulInsOrderList = productForm.mulInsOrderList.map(function (ins) {
|
|
46858
46853
|
var tempIns = {};
|
|
46859
46854
|
for (var _k2 in ins) {
|
|
46860
|
-
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'payModeDesc', 'payModePremiumDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'shmInsData', 'totalBaof',
|
|
46855
|
+
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'payModeDesc', 'payModePremiumDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'shmInsData', 'totalBaof',
|
|
46861
46856
|
// 'calcResultExp', // 不能删除,后面有依赖
|
|
46862
46857
|
'revalidateFlag'].includes(_k2)) {
|
|
46863
46858
|
tempIns[_k2] = ins[_k2];
|
|
@@ -48463,7 +48458,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
48463
48458
|
install(window.Vue);
|
|
48464
48459
|
}
|
|
48465
48460
|
const index = {
|
|
48466
|
-
version: '3.3.
|
|
48461
|
+
version: '3.3.2',
|
|
48467
48462
|
install: install
|
|
48468
48463
|
};
|
|
48469
48464
|
|
package/es/product-info/index.js
CHANGED
|
@@ -9434,10 +9434,6 @@ function getExpressionParamMap(personData, product, ins, options) {
|
|
|
9434
9434
|
// 当前险种
|
|
9435
9435
|
common: {},
|
|
9436
9436
|
// 通用信息
|
|
9437
|
-
customVariable: null,
|
|
9438
|
-
// 自定义变量
|
|
9439
|
-
cv: null,
|
|
9440
|
-
// 简写,自定义变量
|
|
9441
9437
|
t: {} // 事件目标
|
|
9442
9438
|
};
|
|
9443
9439
|
if (personData) {
|
|
@@ -9500,11 +9496,6 @@ function getExpressionParamMap(personData, product, ins, options) {
|
|
|
9500
9496
|
map.executeSource = options.executeSource;
|
|
9501
9497
|
}
|
|
9502
9498
|
}
|
|
9503
|
-
if (ins && ins.customVariableExp) {
|
|
9504
|
-
var exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2');
|
|
9505
|
-
map.customVariable = eval(exp);
|
|
9506
|
-
map.cv = map.customVariable;
|
|
9507
|
-
}
|
|
9508
9499
|
return map;
|
|
9509
9500
|
}
|
|
9510
9501
|
function executeElementRule(personData, product, ins, ele) {
|
|
@@ -10246,14 +10237,18 @@ function _productDataHandler() {
|
|
|
10246
10237
|
_ret = _loop2();
|
|
10247
10238
|
if (_ret === 0) break;
|
|
10248
10239
|
} while (curCondition && curCondition.key && curCondition[curCondition.key]);
|
|
10249
|
-
|
|
10250
|
-
ins.eleOrderList
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10240
|
+
try {
|
|
10241
|
+
if (Array.isArray(ins.eleOrderList)) {
|
|
10242
|
+
ins.eleOrderList.forEach(function (ele) {
|
|
10243
|
+
var newEleMap = executeElementRule(personData, prodData, ins, ele, parmas);
|
|
10244
|
+
for (var k in newEleMap) {
|
|
10245
|
+
ele[k] = newEleMap[k];
|
|
10246
|
+
}
|
|
10247
|
+
});
|
|
10248
|
+
insuranceDataHandler(ins, prodData);
|
|
10249
|
+
}
|
|
10250
|
+
} catch (error) {
|
|
10251
|
+
console.error(error);
|
|
10257
10252
|
}
|
|
10258
10253
|
});
|
|
10259
10254
|
}
|
|
@@ -10999,7 +10994,7 @@ function _createdProductDataToCalc() {
|
|
|
10999
10994
|
productForm.mulInsOrderList = productForm.mulInsOrderList.map(function (ins) {
|
|
11000
10995
|
var tempIns = {};
|
|
11001
10996
|
for (var _k2 in ins) {
|
|
11002
|
-
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'payModeDesc', 'payModePremiumDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'shmInsData', 'totalBaof',
|
|
10997
|
+
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'payModeDesc', 'payModePremiumDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'shmInsData', 'totalBaof',
|
|
11003
10998
|
// 'calcResultExp', // 不能删除,后面有依赖
|
|
11004
10999
|
'revalidateFlag'].includes(_k2)) {
|
|
11005
11000
|
tempIns[_k2] = ins[_k2];
|
package/es/utils/index.js
CHANGED
|
@@ -281,10 +281,6 @@ function getExpressionParamMap(personData, product, ins, options) {
|
|
|
281
281
|
// 当前险种
|
|
282
282
|
common: {},
|
|
283
283
|
// 通用信息
|
|
284
|
-
customVariable: null,
|
|
285
|
-
// 自定义变量
|
|
286
|
-
cv: null,
|
|
287
|
-
// 简写,自定义变量
|
|
288
284
|
t: {} // 事件目标
|
|
289
285
|
};
|
|
290
286
|
if (personData) {
|
|
@@ -347,11 +343,6 @@ function getExpressionParamMap(personData, product, ins, options) {
|
|
|
347
343
|
map.executeSource = options.executeSource;
|
|
348
344
|
}
|
|
349
345
|
}
|
|
350
|
-
if (ins && ins.customVariableExp) {
|
|
351
|
-
var exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2');
|
|
352
|
-
map.customVariable = eval(exp);
|
|
353
|
-
map.cv = map.customVariable;
|
|
354
|
-
}
|
|
355
346
|
return map;
|
|
356
347
|
}
|
|
357
348
|
function executeElementRule(personData, product, ins, ele) {
|
|
@@ -10420,14 +10411,18 @@ function _productDataHandler() {
|
|
|
10420
10411
|
_ret = _loop2();
|
|
10421
10412
|
if (_ret === 0) break;
|
|
10422
10413
|
} while (curCondition && curCondition.key && curCondition[curCondition.key]);
|
|
10423
|
-
|
|
10424
|
-
ins.eleOrderList
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10414
|
+
try {
|
|
10415
|
+
if (Array.isArray(ins.eleOrderList)) {
|
|
10416
|
+
ins.eleOrderList.forEach(function (ele) {
|
|
10417
|
+
var newEleMap = executeElementRule(personData, prodData, ins, ele, parmas);
|
|
10418
|
+
for (var k in newEleMap) {
|
|
10419
|
+
ele[k] = newEleMap[k];
|
|
10420
|
+
}
|
|
10421
|
+
});
|
|
10422
|
+
insuranceDataHandler(ins, prodData);
|
|
10423
|
+
}
|
|
10424
|
+
} catch (error) {
|
|
10425
|
+
console.error(error);
|
|
10431
10426
|
}
|
|
10432
10427
|
});
|
|
10433
10428
|
}
|
package/lib/index.js
CHANGED
|
@@ -9115,10 +9115,6 @@
|
|
|
9115
9115
|
// 当前险种
|
|
9116
9116
|
common: {},
|
|
9117
9117
|
// 通用信息
|
|
9118
|
-
customVariable: null,
|
|
9119
|
-
// 自定义变量
|
|
9120
|
-
cv: null,
|
|
9121
|
-
// 简写,自定义变量
|
|
9122
9118
|
t: {} // 事件目标
|
|
9123
9119
|
};
|
|
9124
9120
|
if (personData) {
|
|
@@ -9181,11 +9177,6 @@
|
|
|
9181
9177
|
map.executeSource = options.executeSource;
|
|
9182
9178
|
}
|
|
9183
9179
|
}
|
|
9184
|
-
if (ins && ins.customVariableExp) {
|
|
9185
|
-
var exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2');
|
|
9186
|
-
map.customVariable = eval(exp);
|
|
9187
|
-
map.cv = map.customVariable;
|
|
9188
|
-
}
|
|
9189
9180
|
return map;
|
|
9190
9181
|
}
|
|
9191
9182
|
function executeElementRule(personData, product, ins, ele) {
|
|
@@ -10503,14 +10494,18 @@
|
|
|
10503
10494
|
_ret = _loop2();
|
|
10504
10495
|
if (_ret === 0) break;
|
|
10505
10496
|
} while (curCondition && curCondition.key && curCondition[curCondition.key]);
|
|
10506
|
-
|
|
10507
|
-
ins.eleOrderList
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10497
|
+
try {
|
|
10498
|
+
if (Array.isArray(ins.eleOrderList)) {
|
|
10499
|
+
ins.eleOrderList.forEach(function (ele) {
|
|
10500
|
+
var newEleMap = executeElementRule(personData, prodData, ins, ele, parmas);
|
|
10501
|
+
for (var k in newEleMap) {
|
|
10502
|
+
ele[k] = newEleMap[k];
|
|
10503
|
+
}
|
|
10504
|
+
});
|
|
10505
|
+
insuranceDataHandler(ins, prodData);
|
|
10506
|
+
}
|
|
10507
|
+
} catch (error) {
|
|
10508
|
+
console.error(error);
|
|
10514
10509
|
}
|
|
10515
10510
|
});
|
|
10516
10511
|
}
|
|
@@ -46840,7 +46835,7 @@
|
|
|
46840
46835
|
productForm.mulInsOrderList = productForm.mulInsOrderList.map(function (ins) {
|
|
46841
46836
|
var tempIns = {};
|
|
46842
46837
|
for (var _k2 in ins) {
|
|
46843
|
-
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'payModeDesc', 'payModePremiumDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'shmInsData', 'totalBaof',
|
|
46838
|
+
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'payModeDesc', 'payModePremiumDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'shmInsData', 'totalBaof',
|
|
46844
46839
|
// 'calcResultExp', // 不能删除,后面有依赖
|
|
46845
46840
|
'revalidateFlag'].includes(_k2)) {
|
|
46846
46841
|
tempIns[_k2] = ins[_k2];
|
|
@@ -48446,7 +48441,7 @@
|
|
|
48446
48441
|
install(window.Vue);
|
|
48447
48442
|
}
|
|
48448
48443
|
var index = {
|
|
48449
|
-
version: '3.3.
|
|
48444
|
+
version: '3.3.2',
|
|
48450
48445
|
install: install
|
|
48451
48446
|
};
|
|
48452
48447
|
|
|
@@ -9430,10 +9430,6 @@
|
|
|
9430
9430
|
// 当前险种
|
|
9431
9431
|
common: {},
|
|
9432
9432
|
// 通用信息
|
|
9433
|
-
customVariable: null,
|
|
9434
|
-
// 自定义变量
|
|
9435
|
-
cv: null,
|
|
9436
|
-
// 简写,自定义变量
|
|
9437
9433
|
t: {} // 事件目标
|
|
9438
9434
|
};
|
|
9439
9435
|
if (personData) {
|
|
@@ -9496,11 +9492,6 @@
|
|
|
9496
9492
|
map.executeSource = options.executeSource;
|
|
9497
9493
|
}
|
|
9498
9494
|
}
|
|
9499
|
-
if (ins && ins.customVariableExp) {
|
|
9500
|
-
var exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2');
|
|
9501
|
-
map.customVariable = eval(exp);
|
|
9502
|
-
map.cv = map.customVariable;
|
|
9503
|
-
}
|
|
9504
9495
|
return map;
|
|
9505
9496
|
}
|
|
9506
9497
|
function executeElementRule(personData, product, ins, ele) {
|
|
@@ -10242,14 +10233,18 @@
|
|
|
10242
10233
|
_ret = _loop2();
|
|
10243
10234
|
if (_ret === 0) break;
|
|
10244
10235
|
} while (curCondition && curCondition.key && curCondition[curCondition.key]);
|
|
10245
|
-
|
|
10246
|
-
ins.eleOrderList
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10236
|
+
try {
|
|
10237
|
+
if (Array.isArray(ins.eleOrderList)) {
|
|
10238
|
+
ins.eleOrderList.forEach(function (ele) {
|
|
10239
|
+
var newEleMap = executeElementRule(personData, prodData, ins, ele, parmas);
|
|
10240
|
+
for (var k in newEleMap) {
|
|
10241
|
+
ele[k] = newEleMap[k];
|
|
10242
|
+
}
|
|
10243
|
+
});
|
|
10244
|
+
insuranceDataHandler(ins, prodData);
|
|
10245
|
+
}
|
|
10246
|
+
} catch (error) {
|
|
10247
|
+
console.error(error);
|
|
10253
10248
|
}
|
|
10254
10249
|
});
|
|
10255
10250
|
}
|
|
@@ -10995,7 +10990,7 @@
|
|
|
10995
10990
|
productForm.mulInsOrderList = productForm.mulInsOrderList.map(function (ins) {
|
|
10996
10991
|
var tempIns = {};
|
|
10997
10992
|
for (var _k2 in ins) {
|
|
10998
|
-
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'payModeDesc', 'payModePremiumDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'shmInsData', 'totalBaof',
|
|
10993
|
+
if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'payModeDesc', 'payModePremiumDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'shmInsData', 'totalBaof',
|
|
10999
10994
|
// 'calcResultExp', // 不能删除,后面有依赖
|
|
11000
10995
|
'revalidateFlag'].includes(_k2)) {
|
|
11001
10996
|
tempIns[_k2] = ins[_k2];
|
package/lib/utils/index.js
CHANGED
|
@@ -280,10 +280,6 @@
|
|
|
280
280
|
// 当前险种
|
|
281
281
|
common: {},
|
|
282
282
|
// 通用信息
|
|
283
|
-
customVariable: null,
|
|
284
|
-
// 自定义变量
|
|
285
|
-
cv: null,
|
|
286
|
-
// 简写,自定义变量
|
|
287
283
|
t: {} // 事件目标
|
|
288
284
|
};
|
|
289
285
|
if (personData) {
|
|
@@ -346,11 +342,6 @@
|
|
|
346
342
|
map.executeSource = options.executeSource;
|
|
347
343
|
}
|
|
348
344
|
}
|
|
349
|
-
if (ins && ins.customVariableExp) {
|
|
350
|
-
var exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2');
|
|
351
|
-
map.customVariable = eval(exp);
|
|
352
|
-
map.cv = map.customVariable;
|
|
353
|
-
}
|
|
354
345
|
return map;
|
|
355
346
|
}
|
|
356
347
|
function executeElementRule(personData, product, ins, ele) {
|
|
@@ -10419,14 +10410,18 @@
|
|
|
10419
10410
|
_ret = _loop2();
|
|
10420
10411
|
if (_ret === 0) break;
|
|
10421
10412
|
} while (curCondition && curCondition.key && curCondition[curCondition.key]);
|
|
10422
|
-
|
|
10423
|
-
ins.eleOrderList
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10413
|
+
try {
|
|
10414
|
+
if (Array.isArray(ins.eleOrderList)) {
|
|
10415
|
+
ins.eleOrderList.forEach(function (ele) {
|
|
10416
|
+
var newEleMap = executeElementRule(personData, prodData, ins, ele, parmas);
|
|
10417
|
+
for (var k in newEleMap) {
|
|
10418
|
+
ele[k] = newEleMap[k];
|
|
10419
|
+
}
|
|
10420
|
+
});
|
|
10421
|
+
insuranceDataHandler(ins, prodData);
|
|
10422
|
+
}
|
|
10423
|
+
} catch (error) {
|
|
10424
|
+
console.error(error);
|
|
10430
10425
|
}
|
|
10431
10426
|
});
|
|
10432
10427
|
}
|
package/package.json
CHANGED
|
@@ -255,8 +255,6 @@ export function getExpressionParamMap(personData: IPbPersons, product: IPbProduc
|
|
|
255
255
|
m: {}, // 主险
|
|
256
256
|
me: {}, // 当前险种
|
|
257
257
|
common: {}, // 通用信息
|
|
258
|
-
customVariable: null, // 自定义变量
|
|
259
|
-
cv: null, // 简写,自定义变量
|
|
260
258
|
t: {} // 事件目标
|
|
261
259
|
}
|
|
262
260
|
|
|
@@ -309,12 +307,6 @@ export function getExpressionParamMap(personData: IPbPersons, product: IPbProduc
|
|
|
309
307
|
map.executeSource = options.executeSource
|
|
310
308
|
}
|
|
311
309
|
}
|
|
312
|
-
|
|
313
|
-
if (ins && ins.customVariableExp) {
|
|
314
|
-
const exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2')
|
|
315
|
-
map.customVariable = eval(exp)
|
|
316
|
-
map.cv = map.customVariable
|
|
317
|
-
}
|
|
318
310
|
return map
|
|
319
311
|
}
|
|
320
312
|
|
|
@@ -259,14 +259,18 @@ export async function productDataHandler(prodData: IPbProduct, prodVerifyData: a
|
|
|
259
259
|
}
|
|
260
260
|
} while (curCondition && curCondition.key && curCondition[curCondition.key])
|
|
261
261
|
|
|
262
|
-
|
|
263
|
-
ins.eleOrderList
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
262
|
+
try {
|
|
263
|
+
if (Array.isArray(ins.eleOrderList)) {
|
|
264
|
+
ins.eleOrderList.forEach((ele: IInsElement) => {
|
|
265
|
+
const newEleMap = executeElementRule(personData, prodData, ins, ele, parmas)
|
|
266
|
+
for (const k in newEleMap) {
|
|
267
|
+
ele[k] = newEleMap[k]
|
|
268
|
+
}
|
|
269
|
+
})
|
|
270
|
+
insuranceDataHandler(ins, prodData)
|
|
271
|
+
}
|
|
272
|
+
} catch (error) {
|
|
273
|
+
console.error(error)
|
|
270
274
|
}
|
|
271
275
|
})
|
|
272
276
|
}
|
package/packages/index.ts
CHANGED
|
@@ -239,7 +239,6 @@ export async function createdProductDataToCalc(inputData, options = {}) {
|
|
|
239
239
|
'groupName',
|
|
240
240
|
'shmInsData',
|
|
241
241
|
'totalBaof',
|
|
242
|
-
'customVariableExp',
|
|
243
242
|
// 'calcResultExp', // 不能删除,后面有依赖
|
|
244
243
|
'revalidateFlag'
|
|
245
244
|
].includes(k)
|
|
@@ -585,36 +584,38 @@ export async function calcProductData(inputData, options, cb) {
|
|
|
585
584
|
}
|
|
586
585
|
|
|
587
586
|
// 计算结果校验
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
587
|
+
try {
|
|
588
|
+
const mulInsOrderList = _get(currentProduct, 'mulInsOrderList') || []
|
|
589
|
+
const hasCalcResultExp = mulInsOrderList.some(ins => ins.calcResultExp)
|
|
590
|
+
if (hasCalcResultExp) {
|
|
591
|
+
let errorMessage = ''
|
|
592
|
+
mulInsOrderList
|
|
593
|
+
.filter(ins => ins.calcResultExp)
|
|
594
|
+
.forEach(ins => {
|
|
595
|
+
if (!errorMessage) {
|
|
596
|
+
const paramMap = getExpressionParamMap(inputData.personData, currentProduct, ins, options)
|
|
597
|
+
if (paramMap) {
|
|
598
|
+
try {
|
|
599
|
+
const exp = ins.calcResultExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'paramMap.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'paramMap.$2')
|
|
600
|
+
errorMessage = eval(exp)
|
|
601
|
+
console.log('计算结果约束结果: ', errorMessage)
|
|
602
|
+
} catch (error) {
|
|
603
|
+
console.log('计算结果约束公式: ', ins.calcResultExp)
|
|
604
|
+
console.error(error)
|
|
605
|
+
}
|
|
607
606
|
}
|
|
608
607
|
}
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
}
|
|
608
|
+
})
|
|
609
|
+
if (errorMessage) {
|
|
610
|
+
commitProductCalcError(productUniqueKey, errorMessage)
|
|
611
|
+
return Promise.reject({
|
|
612
|
+
type: 'calcResultError',
|
|
613
|
+
message: errorMessage
|
|
614
|
+
})
|
|
615
|
+
}
|
|
617
616
|
}
|
|
617
|
+
} catch (error) {
|
|
618
|
+
console.error(error)
|
|
618
619
|
}
|
|
619
620
|
}
|
|
620
621
|
|
|
@@ -912,7 +913,7 @@ export function cleanNeedlessResultData(resultData) {
|
|
|
912
913
|
})
|
|
913
914
|
if (Array.isArray(p.mulInsOrderList)) {
|
|
914
915
|
p.mulInsOrderList.forEach(ins => {
|
|
915
|
-
const noNeedInsuranceKeys = ['isFollowing', 'isCheckbox', 'condotionList', '
|
|
916
|
+
const noNeedInsuranceKeys = ['isFollowing', 'isCheckbox', 'condotionList', 'calcResultExp', 'revalidateFlag']
|
|
916
917
|
noNeedInsuranceKeys.forEach(k => {
|
|
917
918
|
if (k in ins) {
|
|
918
919
|
delete ins[k]
|
|
@@ -986,14 +987,15 @@ export function setupUnderwriteRuleToInsuranceList(list) {
|
|
|
986
987
|
return getUnderwriteEffectiveRules(insuranceIds).then(data => {
|
|
987
988
|
if (Array.isArray(data)) {
|
|
988
989
|
data.forEach(rule => {
|
|
989
|
-
const { insruanceId, eleRules } = rule
|
|
990
|
+
const { insruanceId, customVariableExp, eleRules } = rule
|
|
990
991
|
const insurance = list.find(ins => ins.key === insruanceId)
|
|
991
992
|
if (insurance) {
|
|
992
|
-
const
|
|
993
|
+
const customVariableExpStr = customVariableExp ? `;${customVariableExp};` : ''
|
|
994
|
+
const insExpKeys = ['calcResultExp', 'revalidateFlag']
|
|
993
995
|
insExpKeys
|
|
994
996
|
.filter(k => k in rule)
|
|
995
997
|
.forEach(key => {
|
|
996
|
-
insurance[key] = rule[key]
|
|
998
|
+
insurance[key] = rule[key] && key === 'calcResultExp' ? customVariableExpStr + rule[key] : rule[key]
|
|
997
999
|
})
|
|
998
1000
|
const eleOrderList = insurance.eleOrderList || []
|
|
999
1001
|
if (eleOrderList && Array.isArray(eleRules)) {
|
|
@@ -1004,7 +1006,7 @@ export function setupUnderwriteRuleToInsuranceList(list) {
|
|
|
1004
1006
|
eleExpkeys
|
|
1005
1007
|
.filter(k => k in eleRule)
|
|
1006
1008
|
.forEach(key => {
|
|
1007
|
-
ele[key] = eleRule[key]
|
|
1009
|
+
ele[key] = eleRule[key] ? customVariableExpStr + eleRule[key] : eleRule[key]
|
|
1008
1010
|
})
|
|
1009
1011
|
}
|
|
1010
1012
|
})
|