bxs-tools-ui 2.0.4 → 2.0.5
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 +1269 -1210
- package/lib/adjust-baoe/index.js +1264 -1247
- package/lib/bxs-utils/index.js +1260 -1232
- package/lib/index.js +1282 -1288
- package/lib/insure-calculate/index.js +1274 -1244
- package/lib/person-info/index.js +1262 -1234
- package/lib/product-info/index.js +646 -614
- package/package.json +1 -1
- package/packages/add-and-take/api.ts +2 -3
- package/packages/adjust-baoe/demo/index.vue +4 -14
- package/packages/adjust-baoe/index.vue +6 -30
- package/packages/bxs-utils/trade/insureCalculate.js +3 -16
- package/packages/insure-calculate/demo/index.vue +1 -1
- package/packages/insure-calculate/index.vue +11 -40
- package/packages/person-info/demo/index.vue +3 -7
- package/packages/planbook-input/api.js +2 -1
- package/packages/planbook-input/components/product-table.vue +0 -1
- package/packages/planbook-input/helper.js +5 -11
- package/packages/planbook-input/index.vue +16 -20
- package/packages/product-info/demo/index.vue +4 -10
- package/packages/product-info/index.vue +2 -2
- package/src/js/variables.js +34 -8
package/lib/adjust-baoe/index.js
CHANGED
|
@@ -18490,7 +18490,7 @@ function isPromise(obj) {
|
|
|
18490
18490
|
else {}
|
|
18491
18491
|
}.call(this));
|
|
18492
18492
|
|
|
18493
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
18493
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(26), __webpack_require__(38)(module)))
|
|
18494
18494
|
|
|
18495
18495
|
/***/ }),
|
|
18496
18496
|
/* 4 */
|
|
@@ -18893,6 +18893,63 @@ function restrictElementsInInsurance(_a) {
|
|
|
18893
18893
|
/* 11 */
|
|
18894
18894
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
18895
18895
|
|
|
18896
|
+
"use strict";
|
|
18897
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return IS_PRODUCT_ENV; });
|
|
18898
|
+
/* unused harmony export IS_DEVELOP_ENV */
|
|
18899
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return IS_LOCALHOST_ENV; });
|
|
18900
|
+
/* unused harmony export IS_UAT_ENV */
|
|
18901
|
+
/* unused harmony export IS_ENABLE_DEBUG */
|
|
18902
|
+
/* unused harmony export MAIN_DOMAIN */
|
|
18903
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return APP_HOSTNAME; });
|
|
18904
|
+
/* unused harmony export CONTENT_HOSTNAME */
|
|
18905
|
+
/* unused harmony export CLIENT_HOSTNAME */
|
|
18906
|
+
/* unused harmony export TOOL_API_HOSTNAME */
|
|
18907
|
+
/* unused harmony export INTERACTION_HOSTNAME */
|
|
18908
|
+
/* unused harmony export PBF_HOSTNAME */
|
|
18909
|
+
/* unused harmony export POLICY_INSPECTION_HOSTNAME */
|
|
18910
|
+
/* unused harmony export BROKER_HOSTNAME */
|
|
18911
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return PLANBOOK_API_HOSTNAME; });
|
|
18912
|
+
/* unused harmony export CRM_HOSTNAME */
|
|
18913
|
+
/* unused harmony export WX_HOSTNAME */
|
|
18914
|
+
/* unused harmony export URL_PARAM */
|
|
18915
|
+
/* unused harmony export getUrlParams */
|
|
18916
|
+
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
|
|
18917
|
+
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_0__);
|
|
18918
|
+
|
|
18919
|
+
var hostname = window && window.location && window.location.hostname || '';
|
|
18920
|
+
var IS_PRODUCT_ENV = hostname.search(/(winbaoxian|ai-baoxiaozhu)\.com/) !== -1;
|
|
18921
|
+
var IS_DEVELOP_ENV = hostname.search(/(winbaoxian|ai-baoxiaozhu)\.cn/) !== -1;
|
|
18922
|
+
var IS_LOCALHOST_ENV = hostname.search(/localhost|192\.168|127\.0\.0\.1|dev\.winbaoxian\.cn/) !== -1;
|
|
18923
|
+
var IS_UAT_ENV = hostname.includes("pbf-uat.");
|
|
18924
|
+
var IS_ENABLE_DEBUG = !IS_PRODUCT_ENV;
|
|
18925
|
+
if (IS_ENABLE_DEBUG) {
|
|
18926
|
+
console.error("\u975E\u7EBF\u4E0A\u73AF\u5883\uFF0C\u9ED8\u8BA4\u5F00\u542F\u8C03\u8BD5\u6A21\u5F0F");
|
|
18927
|
+
}
|
|
18928
|
+
var topDomain = IS_PRODUCT_ENV ? 'com' : 'cn';
|
|
18929
|
+
var secondDomain = hostname.includes('ai-baoxiaozhu') ? 'ai-baoxiaozhu' : 'winbaoxian';
|
|
18930
|
+
var MAIN_DOMAIN = "".concat(secondDomain, ".").concat(topDomain);
|
|
18931
|
+
var APP_HOSTNAME = "https://app.".concat(MAIN_DOMAIN);
|
|
18932
|
+
var CONTENT_HOSTNAME = "https://content.".concat(MAIN_DOMAIN);
|
|
18933
|
+
var CLIENT_HOSTNAME = "https://client.".concat(MAIN_DOMAIN);
|
|
18934
|
+
var TOOL_API_HOSTNAME = "https://tool-api.".concat(MAIN_DOMAIN);
|
|
18935
|
+
var INTERACTION_HOSTNAME = "https://interaction-api.".concat(MAIN_DOMAIN);
|
|
18936
|
+
var PBF_HOSTNAME = "https://pbf.".concat(MAIN_DOMAIN);
|
|
18937
|
+
var POLICY_INSPECTION_HOSTNAME = "https://policy-inspection.".concat(MAIN_DOMAIN);
|
|
18938
|
+
var BROKER_HOSTNAME = "https://broker-2a.wyins.net".concat(IS_PRODUCT_ENV ? '' : '.cn');
|
|
18939
|
+
var PLANBOOK_API_HOSTNAME = "https://bxs-planbook-api".concat(IS_UAT_ENV ? '-uat' : '', ".").concat(MAIN_DOMAIN);
|
|
18940
|
+
var CRM_HOSTNAME = "https://wechat-crm.".concat(MAIN_DOMAIN);
|
|
18941
|
+
var WX_HOSTNAME = "https://wx.".concat(MAIN_DOMAIN);
|
|
18942
|
+
var URL_PARAM = getUrlParams();
|
|
18943
|
+
function getUrlParams(url) {
|
|
18944
|
+
var _url = url || location.search || '';
|
|
18945
|
+
var _searchStr = _url.split('?')[1];
|
|
18946
|
+
return _searchStr ? qs__WEBPACK_IMPORTED_MODULE_0___default.a.parse(_searchStr) : {};
|
|
18947
|
+
}
|
|
18948
|
+
|
|
18949
|
+
/***/ }),
|
|
18950
|
+
/* 12 */
|
|
18951
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
18952
|
+
|
|
18896
18953
|
"use strict";
|
|
18897
18954
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return initPersonData; });
|
|
18898
18955
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return personDataHandler; });
|
|
@@ -19202,9 +19259,27 @@ function convertPersonData(allPersonsData, type) {
|
|
|
19202
19259
|
|
|
19203
19260
|
|
|
19204
19261
|
/***/ }),
|
|
19205
|
-
/* 12 */,
|
|
19206
19262
|
/* 13 */,
|
|
19207
|
-
/* 14
|
|
19263
|
+
/* 14 */,
|
|
19264
|
+
/* 15 */
|
|
19265
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
19266
|
+
|
|
19267
|
+
"use strict";
|
|
19268
|
+
|
|
19269
|
+
|
|
19270
|
+
var stringify = __webpack_require__(39);
|
|
19271
|
+
var parse = __webpack_require__(68);
|
|
19272
|
+
var formats = __webpack_require__(23);
|
|
19273
|
+
|
|
19274
|
+
module.exports = {
|
|
19275
|
+
formats: formats,
|
|
19276
|
+
parse: parse,
|
|
19277
|
+
stringify: stringify
|
|
19278
|
+
};
|
|
19279
|
+
|
|
19280
|
+
|
|
19281
|
+
/***/ }),
|
|
19282
|
+
/* 16 */
|
|
19208
19283
|
/***/ (function(module, exports, __webpack_require__) {
|
|
19209
19284
|
|
|
19210
19285
|
/* WEBPACK VAR INJECTION */(function(global) {var hasMap = typeof Map === 'function' && Map.prototype;
|
|
@@ -19752,10 +19827,10 @@ function arrObjKeys(obj, inspect) {
|
|
|
19752
19827
|
return xs;
|
|
19753
19828
|
}
|
|
19754
19829
|
|
|
19755
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
19830
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(26)))
|
|
19756
19831
|
|
|
19757
19832
|
/***/ }),
|
|
19758
|
-
/*
|
|
19833
|
+
/* 17 */
|
|
19759
19834
|
/***/ (function(module, exports, __webpack_require__) {
|
|
19760
19835
|
|
|
19761
19836
|
"use strict";
|
|
@@ -19767,9 +19842,9 @@ module.exports = Function.prototype.bind || implementation;
|
|
|
19767
19842
|
|
|
19768
19843
|
|
|
19769
19844
|
/***/ }),
|
|
19770
|
-
/*
|
|
19771
|
-
/*
|
|
19772
|
-
/*
|
|
19845
|
+
/* 18 */,
|
|
19846
|
+
/* 19 */,
|
|
19847
|
+
/* 20 */
|
|
19773
19848
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
19774
19849
|
|
|
19775
19850
|
"use strict";
|
|
@@ -19790,7 +19865,7 @@ module.exports = Function.prototype.bind || implementation;
|
|
|
19790
19865
|
|
|
19791
19866
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "m", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["h"]; });
|
|
19792
19867
|
|
|
19793
|
-
/* harmony import */ var _person__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
19868
|
+
/* harmony import */ var _person__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
|
|
19794
19869
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "e", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["a"]; });
|
|
19795
19870
|
|
|
19796
19871
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "l", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["b"]; });
|
|
@@ -19801,7 +19876,7 @@ module.exports = Function.prototype.bind || implementation;
|
|
|
19801
19876
|
|
|
19802
19877
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "z", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["e"]; });
|
|
19803
19878
|
|
|
19804
|
-
/* harmony import */ var _product__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
19879
|
+
/* harmony import */ var _product__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36);
|
|
19805
19880
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["a"]; });
|
|
19806
19881
|
|
|
19807
19882
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["b"]; });
|
|
@@ -19841,7 +19916,7 @@ if (document && document.cookie && document.cookie.match('LIZHAO_DEBUG_CONSOLE_F
|
|
|
19841
19916
|
|
|
19842
19917
|
|
|
19843
19918
|
/***/ }),
|
|
19844
|
-
/*
|
|
19919
|
+
/* 21 */
|
|
19845
19920
|
/***/ (function(module, exports, __webpack_require__) {
|
|
19846
19921
|
|
|
19847
19922
|
"use strict";
|
|
@@ -19849,7 +19924,7 @@ if (document && document.cookie && document.cookie.match('LIZHAO_DEBUG_CONSOLE_F
|
|
|
19849
19924
|
|
|
19850
19925
|
var undefined;
|
|
19851
19926
|
|
|
19852
|
-
var $Object = __webpack_require__(
|
|
19927
|
+
var $Object = __webpack_require__(28);
|
|
19853
19928
|
|
|
19854
19929
|
var $Error = __webpack_require__(43);
|
|
19855
19930
|
var $EvalError = __webpack_require__(44);
|
|
@@ -19876,7 +19951,7 @@ var getEvalledConstructor = function (expressionSyntax) {
|
|
|
19876
19951
|
} catch (e) {}
|
|
19877
19952
|
};
|
|
19878
19953
|
|
|
19879
|
-
var $gOPD = __webpack_require__(
|
|
19954
|
+
var $gOPD = __webpack_require__(29);
|
|
19880
19955
|
var $defineProperty = __webpack_require__(58);
|
|
19881
19956
|
|
|
19882
19957
|
var throwTypeError = function () {
|
|
@@ -19902,11 +19977,11 @@ var ThrowTypeError = $gOPD
|
|
|
19902
19977
|
var hasSymbols = __webpack_require__(59)();
|
|
19903
19978
|
|
|
19904
19979
|
var getProto = __webpack_require__(61);
|
|
19905
|
-
var $ObjectGPO = __webpack_require__(
|
|
19906
|
-
var $ReflectGPO = __webpack_require__(
|
|
19980
|
+
var $ObjectGPO = __webpack_require__(31);
|
|
19981
|
+
var $ReflectGPO = __webpack_require__(30);
|
|
19907
19982
|
|
|
19908
|
-
var $apply = __webpack_require__(
|
|
19909
|
-
var $call = __webpack_require__(
|
|
19983
|
+
var $apply = __webpack_require__(33);
|
|
19984
|
+
var $call = __webpack_require__(22);
|
|
19910
19985
|
|
|
19911
19986
|
var needsEval = {};
|
|
19912
19987
|
|
|
@@ -20087,7 +20162,7 @@ var LEGACY_ALIASES = {
|
|
|
20087
20162
|
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
20088
20163
|
};
|
|
20089
20164
|
|
|
20090
|
-
var bind = __webpack_require__(
|
|
20165
|
+
var bind = __webpack_require__(17);
|
|
20091
20166
|
var hasOwn = __webpack_require__(66);
|
|
20092
20167
|
var $concat = bind.call($call, Array.prototype.concat);
|
|
20093
20168
|
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
@@ -20226,7 +20301,7 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|
|
20226
20301
|
|
|
20227
20302
|
|
|
20228
20303
|
/***/ }),
|
|
20229
|
-
/*
|
|
20304
|
+
/* 22 */
|
|
20230
20305
|
/***/ (function(module, exports, __webpack_require__) {
|
|
20231
20306
|
|
|
20232
20307
|
"use strict";
|
|
@@ -20237,7 +20312,7 @@ module.exports = Function.prototype.call;
|
|
|
20237
20312
|
|
|
20238
20313
|
|
|
20239
20314
|
/***/ }),
|
|
20240
|
-
/*
|
|
20315
|
+
/* 23 */
|
|
20241
20316
|
/***/ (function(module, exports, __webpack_require__) {
|
|
20242
20317
|
|
|
20243
20318
|
"use strict";
|
|
@@ -20267,27 +20342,9 @@ module.exports = {
|
|
|
20267
20342
|
|
|
20268
20343
|
|
|
20269
20344
|
/***/ }),
|
|
20270
|
-
/* 22 */
|
|
20271
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
20272
|
-
|
|
20273
|
-
"use strict";
|
|
20274
|
-
|
|
20275
|
-
|
|
20276
|
-
var stringify = __webpack_require__(39);
|
|
20277
|
-
var parse = __webpack_require__(68);
|
|
20278
|
-
var formats = __webpack_require__(21);
|
|
20279
|
-
|
|
20280
|
-
module.exports = {
|
|
20281
|
-
formats: formats,
|
|
20282
|
-
parse: parse,
|
|
20283
|
-
stringify: stringify
|
|
20284
|
-
};
|
|
20285
|
-
|
|
20286
|
-
|
|
20287
|
-
/***/ }),
|
|
20288
|
-
/* 23 */,
|
|
20289
20345
|
/* 24 */,
|
|
20290
|
-
/* 25
|
|
20346
|
+
/* 25 */,
|
|
20347
|
+
/* 26 */
|
|
20291
20348
|
/***/ (function(module, exports) {
|
|
20292
20349
|
|
|
20293
20350
|
var g;
|
|
@@ -20313,1253 +20370,1233 @@ module.exports = g;
|
|
|
20313
20370
|
|
|
20314
20371
|
|
|
20315
20372
|
/***/ }),
|
|
20316
|
-
/*
|
|
20317
|
-
/***/ (function(module,
|
|
20373
|
+
/* 27 */
|
|
20374
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20318
20375
|
|
|
20319
20376
|
"use strict";
|
|
20320
|
-
|
|
20321
|
-
|
|
20322
|
-
|
|
20323
|
-
|
|
20324
|
-
|
|
20325
|
-
|
|
20326
|
-
|
|
20327
|
-
var
|
|
20328
|
-
|
|
20329
|
-
|
|
20330
|
-
var
|
|
20331
|
-
|
|
20332
|
-
var
|
|
20333
|
-
|
|
20377
|
+
|
|
20378
|
+
|
|
20379
|
+
var GetIntrinsic = __webpack_require__(21);
|
|
20380
|
+
var callBound = __webpack_require__(34);
|
|
20381
|
+
var inspect = __webpack_require__(16);
|
|
20382
|
+
|
|
20383
|
+
var $TypeError = __webpack_require__(9);
|
|
20384
|
+
var $Map = GetIntrinsic('%Map%', true);
|
|
20385
|
+
|
|
20386
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
|
|
20387
|
+
var $mapGet = callBound('Map.prototype.get', true);
|
|
20388
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
|
|
20389
|
+
var $mapSet = callBound('Map.prototype.set', true);
|
|
20390
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
20391
|
+
var $mapHas = callBound('Map.prototype.has', true);
|
|
20392
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
20393
|
+
var $mapDelete = callBound('Map.prototype.delete', true);
|
|
20394
|
+
/** @type {<K, V>(thisArg: Map<K, V>) => number} */
|
|
20395
|
+
var $mapSize = callBound('Map.prototype.size', true);
|
|
20396
|
+
|
|
20397
|
+
/** @type {import('.')} */
|
|
20398
|
+
module.exports = !!$Map && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
|
|
20399
|
+
/** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
|
|
20400
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
20401
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
20402
|
+
|
|
20403
|
+
/** @type {Map<K, V> | undefined} */ var $m;
|
|
20404
|
+
|
|
20405
|
+
/** @type {Channel} */
|
|
20406
|
+
var channel = {
|
|
20407
|
+
assert: function (key) {
|
|
20408
|
+
if (!channel.has(key)) {
|
|
20409
|
+
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
20410
|
+
}
|
|
20411
|
+
},
|
|
20412
|
+
'delete': function (key) {
|
|
20413
|
+
if ($m) {
|
|
20414
|
+
var result = $mapDelete($m, key);
|
|
20415
|
+
if ($mapSize($m) === 0) {
|
|
20416
|
+
$m = void undefined;
|
|
20417
|
+
}
|
|
20418
|
+
return result;
|
|
20419
|
+
}
|
|
20420
|
+
return false;
|
|
20421
|
+
},
|
|
20422
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
20423
|
+
if ($m) {
|
|
20424
|
+
return $mapGet($m, key);
|
|
20425
|
+
}
|
|
20426
|
+
},
|
|
20427
|
+
has: function (key) {
|
|
20428
|
+
if ($m) {
|
|
20429
|
+
return $mapHas($m, key);
|
|
20430
|
+
}
|
|
20431
|
+
return false;
|
|
20432
|
+
},
|
|
20433
|
+
set: function (key, value) {
|
|
20434
|
+
if (!$m) {
|
|
20435
|
+
// @ts-expect-error TS can't handle narrowing a variable inside a closure
|
|
20436
|
+
$m = new $Map();
|
|
20437
|
+
}
|
|
20438
|
+
$mapSet($m, key, value);
|
|
20439
|
+
}
|
|
20440
|
+
};
|
|
20441
|
+
|
|
20442
|
+
// @ts-expect-error TODO: figure out why TS is erroring here
|
|
20443
|
+
return channel;
|
|
20444
|
+
};
|
|
20445
|
+
|
|
20334
20446
|
|
|
20335
20447
|
/***/ }),
|
|
20336
|
-
/*
|
|
20337
|
-
/***/ (function(module,
|
|
20448
|
+
/* 28 */
|
|
20449
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20338
20450
|
|
|
20339
20451
|
"use strict";
|
|
20340
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initProductData; });
|
|
20341
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return productDataHandler; });
|
|
20342
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getElementVerifyFromProductVerify; });
|
|
20343
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setCommonInfo; });
|
|
20344
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return setGroupInsurance; });
|
|
20345
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isHideProduct; });
|
|
20346
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return verifyProductRules; });
|
|
20347
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return restrictInsurancesInProduct; });
|
|
20348
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return convertProductData; });
|
|
20349
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return clearAddAndTakeAndAdjustBaoeData; });
|
|
20350
|
-
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
20351
|
-
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
|
|
20352
|
-
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
|
|
20353
|
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
|
|
20354
|
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
|
|
20355
|
-
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
|
|
20356
|
-
/* harmony import */ var _person__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(11);
|
|
20357
|
-
/* harmony import */ var _insurance__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
|
|
20358
20452
|
|
|
20359
20453
|
|
|
20454
|
+
/** @type {import('.')} */
|
|
20455
|
+
module.exports = Object;
|
|
20360
20456
|
|
|
20361
20457
|
|
|
20458
|
+
/***/ }),
|
|
20459
|
+
/* 29 */
|
|
20460
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20362
20461
|
|
|
20462
|
+
"use strict";
|
|
20363
20463
|
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
Object(_insurance__WEBPACK_IMPORTED_MODULE_5__[/* initInsuranceData */ "b"])(ins);
|
|
20376
|
-
});
|
|
20377
|
-
return prodData;
|
|
20464
|
+
|
|
20465
|
+
/** @type {import('.')} */
|
|
20466
|
+
var $gOPD = __webpack_require__(57);
|
|
20467
|
+
|
|
20468
|
+
if ($gOPD) {
|
|
20469
|
+
try {
|
|
20470
|
+
$gOPD([], 'length');
|
|
20471
|
+
} catch (e) {
|
|
20472
|
+
// IE 8 has a broken gOPD
|
|
20473
|
+
$gOPD = null;
|
|
20474
|
+
}
|
|
20378
20475
|
}
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20412
|
-
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
20419
|
-
|
|
20420
|
-
|
|
20421
|
-
|
|
20422
|
-
|
|
20423
|
-
|
|
20424
|
-
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
|
|
20431
|
-
|
|
20432
|
-
|
|
20433
|
-
|
|
20434
|
-
|
|
20435
|
-
|
|
20436
|
-
|
|
20437
|
-
|
|
20438
|
-
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
|
|
20445
|
-
|
|
20446
|
-
|
|
20447
|
-
|
|
20448
|
-
|
|
20449
|
-
|
|
20450
|
-
|
|
20451
|
-
|
|
20452
|
-
|
|
20453
|
-
|
|
20454
|
-
|
|
20455
|
-
|
|
20456
|
-
|
|
20457
|
-
|
|
20458
|
-
|
|
20459
|
-
|
|
20460
|
-
|
|
20461
|
-
|
|
20462
|
-
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20469
|
-
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20475
|
-
|
|
20476
|
-
|
|
20477
|
-
|
|
20478
|
-
|
|
20479
|
-
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
refInsData = insList[0].key === 'common' ? insList[1] : insList[0];
|
|
20483
|
-
}
|
|
20484
|
-
else {
|
|
20485
|
-
refInsData = insList.find(function (ins) { return ins.key == ins.refInsuranceId; });
|
|
20486
|
-
}
|
|
20487
|
-
var refEleData = refInsData && refInsData.eleOrderList && refInsData.eleOrderList.find(function (e) { return e.key === eleData.key; });
|
|
20488
|
-
if (refEleData) {
|
|
20489
|
-
if (ins.huomian && eleData.key == 'pPeriod') {
|
|
20490
|
-
eleData.value = Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* getHuomianPeriodValue */ "g"])(refEleData.value, ins.pMinus, ins.huomian === 'touHuomian' ? insuredInfo.age : targetPerson.age);
|
|
20491
|
-
}
|
|
20492
|
-
else {
|
|
20493
|
-
eleData.value = refEleData.value;
|
|
20494
|
-
}
|
|
20495
|
-
}
|
|
20496
|
-
else {
|
|
20497
|
-
if (window.DEBUG_TEMP_CONSOLE_FLAG) {
|
|
20498
|
-
console.log("".concat(ins.name, "-").concat(ins.key, "\uFF1A\u5173\u8054\u9669\u79CD").concat(ins.refInsuranceId, "\u4E0D\u5B58\u5728"));
|
|
20499
|
-
}
|
|
20500
|
-
}
|
|
20501
|
-
}
|
|
20502
|
-
else {
|
|
20503
|
-
var backupOpts_1 = eleData.opts && eleData.opts.length ? eleData.opts.slice(0) : [];
|
|
20504
|
-
eleData.opts = eleCondi.filter(function (c) { return c.value !== undefined && c.desc !== undefined; }).map(function (c) {
|
|
20505
|
-
var option = backupOpts_1.find(function (o) { return o.val == c.value; });
|
|
20506
|
-
return {
|
|
20507
|
-
val: c.value,
|
|
20508
|
-
desc: c.desc || c.value,
|
|
20509
|
-
isHide: (option && option.isHide) || null,
|
|
20510
|
-
isDisabled: (option && option.isDisabled) || null,
|
|
20511
|
-
isInvalid: null
|
|
20512
|
-
};
|
|
20513
|
-
});
|
|
20514
|
-
var isNoOption = eleData.opts && eleData.opts.length && eleData.opts.every(function (ele) { return ele.val != eleData.value; });
|
|
20515
|
-
if (isNoOption) {
|
|
20516
|
-
if (eleData.key === 'pPeriod') {
|
|
20517
|
-
var filterOpts = (_c = eleData.opts) === null || _c === void 0 ? void 0 : _c.filter(function (opt) { return !opt.isHide && !opt.isDisabled; });
|
|
20518
|
-
if (filterOpts && filterOpts.length) {
|
|
20519
|
-
eleData.value = filterOpts[filterOpts.length - 1].val;
|
|
20520
|
-
}
|
|
20521
|
-
}
|
|
20522
|
-
else {
|
|
20523
|
-
if (eleData.opts && eleData.opts.length) {
|
|
20524
|
-
eleData.value = eleData.opts[0].val;
|
|
20525
|
-
}
|
|
20526
|
-
}
|
|
20527
|
-
}
|
|
20528
|
-
}
|
|
20529
|
-
curCondition = eleCondi.find(function (eleCondi) { return eleCondi.value == eleData.value; });
|
|
20530
|
-
var eleIndex = ins.eleOrderList.findIndex(function (ele) { return ele.key === eleData.key; });
|
|
20531
|
-
var prevElement;
|
|
20532
|
-
if (eleIndex >= 1) {
|
|
20533
|
-
prevElement = ins.eleOrderList[eleIndex - 1];
|
|
20534
|
-
}
|
|
20535
|
-
if (prevElement) {
|
|
20536
|
-
if (!curCondition) {
|
|
20537
|
-
var prevEleVerify = getElementVerifyFromProductVerify(personCondition, insList, { insuranceKey: ins.key, elementKey: prevElement.key });
|
|
20538
|
-
var onePrevEleVerify = prevEleVerify === null || prevEleVerify === void 0 ? void 0 : prevEleVerify.find(function (v) { return v[eleData.key] && v[eleData.key].some(function (condi) { return condi.value === eleData.value; }); });
|
|
20539
|
-
if (onePrevEleVerify) {
|
|
20540
|
-
prevElement.value = onePrevEleVerify.value;
|
|
20541
|
-
curCondition = onePrevEleVerify[eleData.key];
|
|
20542
|
-
}
|
|
20543
|
-
}
|
|
20544
|
-
if (!curCondition) {
|
|
20545
|
-
eleTitle.isDisabled = true;
|
|
20546
|
-
eleTitle.value = false;
|
|
20547
|
-
if (window.DEBUG_TEMP_CONSOLE_FLAG) {
|
|
20548
|
-
console.log("".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u4E0D\u5B58\u5728\uFF01"));
|
|
20549
|
-
}
|
|
20550
|
-
}
|
|
20551
|
-
var isNeedReverseFilter = eleData.isHide && !eleData.isDisabled && prevElement.opts && prevElement.opts.length;
|
|
20552
|
-
if (isNeedReverseFilter) {
|
|
20553
|
-
var prevEleVerify = getElementVerifyFromProductVerify(personCondition, insList, { insuranceKey: ins.key, elementKey: prevElement.key });
|
|
20554
|
-
if (prevEleVerify) {
|
|
20555
|
-
prevElement.opts = prevEleVerify.filter(function (v) {
|
|
20556
|
-
var _a;
|
|
20557
|
-
var elementVerify = getElementVerifyFromProductVerify(personCondition, insList, (_a = {
|
|
20558
|
-
insuranceKey: ins.key,
|
|
20559
|
-
elementKey: eleData.key
|
|
20560
|
-
},
|
|
20561
|
-
_a[prevElement.key] = v.value,
|
|
20562
|
-
_a));
|
|
20563
|
-
return elementVerify && elementVerify.some(function (c) { return c.value == eleData.value; });
|
|
20564
|
-
}).map(function (v) { return ({
|
|
20565
|
-
val: v.value,
|
|
20566
|
-
desc: v.desc || v.value,
|
|
20567
|
-
isHide: null,
|
|
20568
|
-
isDisabled: null,
|
|
20569
|
-
isInvalid: null
|
|
20570
|
-
}); });
|
|
20571
|
-
}
|
|
20572
|
-
}
|
|
20573
|
-
}
|
|
20574
|
-
};
|
|
20575
|
-
do {
|
|
20576
|
-
var state_1 = _loop_1();
|
|
20577
|
-
if (state_1 === "break")
|
|
20578
|
-
break;
|
|
20579
|
-
} while (curCondition && curCondition.key && curCondition[curCondition.key]);
|
|
20580
|
-
});
|
|
20581
|
-
}
|
|
20582
|
-
setGroupInsurance(prodData);
|
|
20583
|
-
isHideProduct(prodData, productVerifyData, personOrderList);
|
|
20584
|
-
return [2, prodData];
|
|
20585
|
-
}
|
|
20586
|
-
});
|
|
20587
|
-
});
|
|
20588
|
-
}
|
|
20589
|
-
function multipleInsuredHandler(personData) {
|
|
20590
|
-
var personOrderList = personData.personOrderList;
|
|
20591
|
-
if (!(personOrderList && personOrderList.length)) {
|
|
20592
|
-
return null;
|
|
20476
|
+
|
|
20477
|
+
module.exports = $gOPD;
|
|
20478
|
+
|
|
20479
|
+
|
|
20480
|
+
/***/ }),
|
|
20481
|
+
/* 30 */
|
|
20482
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20483
|
+
|
|
20484
|
+
"use strict";
|
|
20485
|
+
|
|
20486
|
+
|
|
20487
|
+
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
20488
|
+
module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
20489
|
+
|
|
20490
|
+
|
|
20491
|
+
/***/ }),
|
|
20492
|
+
/* 31 */
|
|
20493
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20494
|
+
|
|
20495
|
+
"use strict";
|
|
20496
|
+
|
|
20497
|
+
|
|
20498
|
+
var $Object = __webpack_require__(28);
|
|
20499
|
+
|
|
20500
|
+
/** @type {import('./Object.getPrototypeOf')} */
|
|
20501
|
+
module.exports = $Object.getPrototypeOf || null;
|
|
20502
|
+
|
|
20503
|
+
|
|
20504
|
+
/***/ }),
|
|
20505
|
+
/* 32 */
|
|
20506
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20507
|
+
|
|
20508
|
+
"use strict";
|
|
20509
|
+
|
|
20510
|
+
|
|
20511
|
+
var bind = __webpack_require__(17);
|
|
20512
|
+
var $TypeError = __webpack_require__(9);
|
|
20513
|
+
|
|
20514
|
+
var $call = __webpack_require__(22);
|
|
20515
|
+
var $actualApply = __webpack_require__(64);
|
|
20516
|
+
|
|
20517
|
+
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|
20518
|
+
module.exports = function callBindBasic(args) {
|
|
20519
|
+
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
20520
|
+
throw new $TypeError('a function is required');
|
|
20521
|
+
}
|
|
20522
|
+
return $actualApply(bind, $call, args);
|
|
20523
|
+
};
|
|
20524
|
+
|
|
20525
|
+
|
|
20526
|
+
/***/ }),
|
|
20527
|
+
/* 33 */
|
|
20528
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20529
|
+
|
|
20530
|
+
"use strict";
|
|
20531
|
+
|
|
20532
|
+
|
|
20533
|
+
/** @type {import('./functionApply')} */
|
|
20534
|
+
module.exports = Function.prototype.apply;
|
|
20535
|
+
|
|
20536
|
+
|
|
20537
|
+
/***/ }),
|
|
20538
|
+
/* 34 */
|
|
20539
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20540
|
+
|
|
20541
|
+
"use strict";
|
|
20542
|
+
|
|
20543
|
+
|
|
20544
|
+
var GetIntrinsic = __webpack_require__(21);
|
|
20545
|
+
|
|
20546
|
+
var callBindBasic = __webpack_require__(32);
|
|
20547
|
+
|
|
20548
|
+
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
|
|
20549
|
+
var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);
|
|
20550
|
+
|
|
20551
|
+
/** @type {import('.')} */
|
|
20552
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
20553
|
+
/* eslint no-extra-parens: 0 */
|
|
20554
|
+
|
|
20555
|
+
var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));
|
|
20556
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
20557
|
+
return callBindBasic(/** @type {const} */ ([intrinsic]));
|
|
20558
|
+
}
|
|
20559
|
+
return intrinsic;
|
|
20560
|
+
};
|
|
20561
|
+
|
|
20562
|
+
|
|
20563
|
+
/***/ }),
|
|
20564
|
+
/* 35 */
|
|
20565
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
20566
|
+
|
|
20567
|
+
"use strict";
|
|
20568
|
+
|
|
20569
|
+
|
|
20570
|
+
var formats = __webpack_require__(23);
|
|
20571
|
+
|
|
20572
|
+
var has = Object.prototype.hasOwnProperty;
|
|
20573
|
+
var isArray = Array.isArray;
|
|
20574
|
+
|
|
20575
|
+
var hexTable = (function () {
|
|
20576
|
+
var array = [];
|
|
20577
|
+
for (var i = 0; i < 256; ++i) {
|
|
20578
|
+
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
20593
20579
|
}
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
|
|
20603
|
-
|
|
20604
|
-
|
|
20605
|
-
|
|
20580
|
+
|
|
20581
|
+
return array;
|
|
20582
|
+
}());
|
|
20583
|
+
|
|
20584
|
+
var compactQueue = function compactQueue(queue) {
|
|
20585
|
+
while (queue.length > 1) {
|
|
20586
|
+
var item = queue.pop();
|
|
20587
|
+
var obj = item.obj[item.prop];
|
|
20588
|
+
|
|
20589
|
+
if (isArray(obj)) {
|
|
20590
|
+
var compacted = [];
|
|
20591
|
+
|
|
20592
|
+
for (var j = 0; j < obj.length; ++j) {
|
|
20593
|
+
if (typeof obj[j] !== 'undefined') {
|
|
20594
|
+
compacted.push(obj[j]);
|
|
20606
20595
|
}
|
|
20607
|
-
}
|
|
20608
|
-
|
|
20596
|
+
}
|
|
20597
|
+
|
|
20598
|
+
item.obj[item.prop] = compacted;
|
|
20609
20599
|
}
|
|
20610
20600
|
}
|
|
20611
|
-
|
|
20612
|
-
|
|
20613
|
-
function
|
|
20614
|
-
var
|
|
20615
|
-
|
|
20616
|
-
|
|
20617
|
-
|
|
20618
|
-
return null;
|
|
20619
|
-
}
|
|
20620
|
-
var pbId = prodData.isTemp || (prodData.policyType === 'single_insurance') ? null : parmas.planbookId;
|
|
20621
|
-
var productId = prodData.policyType === 'single_insurance' ? null : prodData.key;
|
|
20622
|
-
var insuredList = personOrderList
|
|
20623
|
-
.filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
|
|
20624
|
-
.filter(function (p) {
|
|
20625
|
-
var _a;
|
|
20626
|
-
var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
|
|
20627
|
-
return title && title.value;
|
|
20628
|
-
})
|
|
20629
|
-
.map(function (p) {
|
|
20630
|
-
var _a, _b;
|
|
20631
|
-
return {
|
|
20632
|
-
key: p.key,
|
|
20633
|
-
sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
|
|
20634
|
-
age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
|
|
20635
|
-
};
|
|
20636
|
-
});
|
|
20637
|
-
var insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
|
|
20638
|
-
(_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
|
|
20639
|
-
return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
|
|
20640
|
-
}, []);
|
|
20641
|
-
return getAndCacheInsurancesVerifyData({
|
|
20642
|
-
pbId: pbId,
|
|
20643
|
-
productId: productId,
|
|
20644
|
-
insuredList: insuredList,
|
|
20645
|
-
insuranceIdList: insuranceIdList
|
|
20646
|
-
});
|
|
20647
|
-
}
|
|
20648
|
-
var getAndCacheInsurancesVerifyData = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["memoize"])(function (params) {
|
|
20649
|
-
var IS_PRODUCT_ENV = location.hostname.search(/winbaoxian\.com/) !== -1;
|
|
20650
|
-
var url = "https://app.winbaoxian.".concat(IS_PRODUCT_ENV ? 'com' : 'cn', "/planBook/input/insurance/verifyData");
|
|
20651
|
-
return fetch(url, {
|
|
20652
|
-
method: 'POST',
|
|
20653
|
-
credentials: 'include',
|
|
20654
|
-
headers: {
|
|
20655
|
-
Accept: 'application/json, text/plain, */*',
|
|
20656
|
-
'Content-Type': 'application/json;'
|
|
20657
|
-
},
|
|
20658
|
-
body: JSON.stringify(params)
|
|
20659
|
-
})
|
|
20660
|
-
.then(function (response) { return response.json(); })
|
|
20661
|
-
.then(function (_a) {
|
|
20662
|
-
var success = _a.success, data = _a.data;
|
|
20663
|
-
if (!success || !data) {
|
|
20664
|
-
return Promise.reject();
|
|
20601
|
+
};
|
|
20602
|
+
|
|
20603
|
+
var arrayToObject = function arrayToObject(source, options) {
|
|
20604
|
+
var obj = options && options.plainObjects ? { __proto__: null } : {};
|
|
20605
|
+
for (var i = 0; i < source.length; ++i) {
|
|
20606
|
+
if (typeof source[i] !== 'undefined') {
|
|
20607
|
+
obj[i] = source[i];
|
|
20665
20608
|
}
|
|
20666
|
-
return Promise.resolve(data);
|
|
20667
|
-
})
|
|
20668
|
-
.catch(function () { });
|
|
20669
|
-
}, function (params) { return qs__WEBPACK_IMPORTED_MODULE_1___default.a.stringify(params); });
|
|
20670
|
-
function getElementVerifyFromProductVerify(verify, insurances, option) {
|
|
20671
|
-
if (!verify || !verify.key || !verify[verify.key] || !insurances || !option) {
|
|
20672
|
-
return verify;
|
|
20673
20609
|
}
|
|
20674
|
-
|
|
20675
|
-
|
|
20676
|
-
|
|
20677
|
-
|
|
20678
|
-
|
|
20679
|
-
|
|
20680
|
-
|
|
20681
|
-
|
|
20682
|
-
var hasElementKey = verify.key === option.elementKey;
|
|
20683
|
-
while (temp && temp.key && temp.key !== option.elementKey) {
|
|
20684
|
-
temp = temp[temp.key].find(function (v) { return v.value == insuranceInfo[temp.key]; });
|
|
20685
|
-
if (temp && temp.key === option.elementKey) {
|
|
20686
|
-
hasElementKey = true;
|
|
20687
|
-
}
|
|
20610
|
+
|
|
20611
|
+
return obj;
|
|
20612
|
+
};
|
|
20613
|
+
|
|
20614
|
+
var merge = function merge(target, source, options) {
|
|
20615
|
+
/* eslint no-param-reassign: 0 */
|
|
20616
|
+
if (!source) {
|
|
20617
|
+
return target;
|
|
20688
20618
|
}
|
|
20689
|
-
|
|
20690
|
-
|
|
20619
|
+
|
|
20620
|
+
if (typeof source !== 'object' && typeof source !== 'function') {
|
|
20621
|
+
if (isArray(target)) {
|
|
20622
|
+
target.push(source);
|
|
20623
|
+
} else if (target && typeof target === 'object') {
|
|
20624
|
+
if (
|
|
20625
|
+
(options && (options.plainObjects || options.allowPrototypes))
|
|
20626
|
+
|| !has.call(Object.prototype, source)
|
|
20627
|
+
) {
|
|
20628
|
+
target[source] = true;
|
|
20629
|
+
}
|
|
20630
|
+
} else {
|
|
20631
|
+
return [target, source];
|
|
20632
|
+
}
|
|
20633
|
+
|
|
20634
|
+
return target;
|
|
20691
20635
|
}
|
|
20692
|
-
|
|
20693
|
-
|
|
20636
|
+
|
|
20637
|
+
if (!target || typeof target !== 'object') {
|
|
20638
|
+
return [target].concat(source);
|
|
20694
20639
|
}
|
|
20695
|
-
|
|
20696
|
-
|
|
20697
|
-
|
|
20698
|
-
|
|
20699
|
-
return prodData;
|
|
20640
|
+
|
|
20641
|
+
var mergeTarget = target;
|
|
20642
|
+
if (isArray(target) && !isArray(source)) {
|
|
20643
|
+
mergeTarget = arrayToObject(target, options);
|
|
20700
20644
|
}
|
|
20701
|
-
|
|
20702
|
-
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20706
|
-
|
|
20707
|
-
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
20645
|
+
|
|
20646
|
+
if (isArray(target) && isArray(source)) {
|
|
20647
|
+
source.forEach(function (item, i) {
|
|
20648
|
+
if (has.call(target, i)) {
|
|
20649
|
+
var targetItem = target[i];
|
|
20650
|
+
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
20651
|
+
target[i] = merge(targetItem, item, options);
|
|
20652
|
+
} else {
|
|
20653
|
+
target.push(item);
|
|
20654
|
+
}
|
|
20655
|
+
} else {
|
|
20656
|
+
target[i] = item;
|
|
20712
20657
|
}
|
|
20713
20658
|
});
|
|
20714
|
-
|
|
20715
|
-
});
|
|
20716
|
-
if (!common.eleOrderList.length) {
|
|
20717
|
-
return prodData;
|
|
20718
|
-
}
|
|
20719
|
-
prodData.mulInsOrderList = prodData.mulInsOrderList.filter(function (ins) { return ins.key !== 'common'; });
|
|
20720
|
-
prodData.mulInsOrderList.unshift(common);
|
|
20721
|
-
if (prodData.mulInsOrderList[1]) {
|
|
20722
|
-
prodData.mulInsOrderList[1].isFollowing = true;
|
|
20659
|
+
return target;
|
|
20723
20660
|
}
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
|
|
20728
|
-
|
|
20661
|
+
|
|
20662
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
20663
|
+
var value = source[key];
|
|
20664
|
+
|
|
20665
|
+
if (has.call(acc, key)) {
|
|
20666
|
+
acc[key] = merge(acc[key], value, options);
|
|
20667
|
+
} else {
|
|
20668
|
+
acc[key] = value;
|
|
20669
|
+
}
|
|
20670
|
+
return acc;
|
|
20671
|
+
}, mergeTarget);
|
|
20672
|
+
};
|
|
20673
|
+
|
|
20674
|
+
var assign = function assignSingleSource(target, source) {
|
|
20675
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
20676
|
+
acc[key] = source[key];
|
|
20677
|
+
return acc;
|
|
20678
|
+
}, target);
|
|
20679
|
+
};
|
|
20680
|
+
|
|
20681
|
+
var decode = function (str, defaultDecoder, charset) {
|
|
20682
|
+
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
20683
|
+
if (charset === 'iso-8859-1') {
|
|
20684
|
+
// unescape never throws, no try...catch needed:
|
|
20685
|
+
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
20729
20686
|
}
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
return
|
|
20687
|
+
// utf-8
|
|
20688
|
+
try {
|
|
20689
|
+
return decodeURIComponent(strWithoutPlus);
|
|
20690
|
+
} catch (e) {
|
|
20691
|
+
return strWithoutPlus;
|
|
20733
20692
|
}
|
|
20734
|
-
|
|
20735
|
-
|
|
20736
|
-
|
|
20737
|
-
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
|
|
20745
|
-
|
|
20746
|
-
|
|
20747
|
-
|
|
20748
|
-
|
|
20749
|
-
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
|
|
20760
|
-
|
|
20761
|
-
|
|
20762
|
-
|
|
20763
|
-
|
|
20764
|
-
|
|
20765
|
-
|
|
20766
|
-
|
|
20767
|
-
|
|
20768
|
-
|
|
20769
|
-
|
|
20770
|
-
|
|
20771
|
-
|
|
20772
|
-
|
|
20773
|
-
|
|
20774
|
-
|
|
20775
|
-
|
|
20776
|
-
|
|
20777
|
-
|
|
20778
|
-
|
|
20779
|
-
var nGroupInsuranceId = newGroupInsMap[k].eleOrderList.find(function (e) { return e.key === 'insuranceId'; });
|
|
20780
|
-
if (nGroupTitle && nGroupInsuranceId) {
|
|
20781
|
-
if (nGroupInsuranceId.opts && nGroupInsuranceId.opts.length) {
|
|
20782
|
-
if (nGroupInsuranceId.opts.every(function (opt) { return !!opt.isDisabled; })) {
|
|
20783
|
-
nGroupTitle.value = false;
|
|
20784
|
-
nGroupTitle.isDisabled = true;
|
|
20785
|
-
}
|
|
20786
|
-
else {
|
|
20787
|
-
nGroupTitle.isDisabled = false;
|
|
20788
|
-
}
|
|
20693
|
+
};
|
|
20694
|
+
|
|
20695
|
+
var limit = 1024;
|
|
20696
|
+
|
|
20697
|
+
/* eslint operator-linebreak: [2, "before"] */
|
|
20698
|
+
|
|
20699
|
+
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
20700
|
+
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
20701
|
+
// It has been adapted here for stricter adherence to RFC 3986
|
|
20702
|
+
if (str.length === 0) {
|
|
20703
|
+
return str;
|
|
20704
|
+
}
|
|
20705
|
+
|
|
20706
|
+
var string = str;
|
|
20707
|
+
if (typeof str === 'symbol') {
|
|
20708
|
+
string = Symbol.prototype.toString.call(str);
|
|
20709
|
+
} else if (typeof str !== 'string') {
|
|
20710
|
+
string = String(str);
|
|
20711
|
+
}
|
|
20712
|
+
|
|
20713
|
+
if (charset === 'iso-8859-1') {
|
|
20714
|
+
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
20715
|
+
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
|
20716
|
+
});
|
|
20717
|
+
}
|
|
20718
|
+
|
|
20719
|
+
var out = '';
|
|
20720
|
+
for (var j = 0; j < string.length; j += limit) {
|
|
20721
|
+
var segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
20722
|
+
var arr = [];
|
|
20723
|
+
|
|
20724
|
+
for (var i = 0; i < segment.length; ++i) {
|
|
20725
|
+
var c = segment.charCodeAt(i);
|
|
20726
|
+
if (
|
|
20727
|
+
c === 0x2D // -
|
|
20728
|
+
|| c === 0x2E // .
|
|
20729
|
+
|| c === 0x5F // _
|
|
20730
|
+
|| c === 0x7E // ~
|
|
20731
|
+
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
20732
|
+
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
20733
|
+
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
20734
|
+
|| (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
20735
|
+
) {
|
|
20736
|
+
arr[arr.length] = segment.charAt(i);
|
|
20737
|
+
continue;
|
|
20789
20738
|
}
|
|
20790
|
-
|
|
20791
|
-
if (
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
return ins.required && subTitle && !subTitle.isDisabled;
|
|
20795
|
-
})) {
|
|
20796
|
-
nGroupTitle.value = true;
|
|
20797
|
-
nGroupTitle.isDisabled = true;
|
|
20798
|
-
}
|
|
20799
|
-
var notDisabledInsurances = groupInsList.filter(function (ins) {
|
|
20800
|
-
var subTitle = ins.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
20801
|
-
return subTitle && !subTitle.isDisabled;
|
|
20802
|
-
});
|
|
20803
|
-
var checkedInsurances = notDisabledInsurances.find(function (ins) {
|
|
20804
|
-
var subTitle = ins.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
20805
|
-
return subTitle && subTitle.value;
|
|
20806
|
-
});
|
|
20807
|
-
if (!nGroupInsuranceId.value) {
|
|
20808
|
-
if (checkedInsurances) {
|
|
20809
|
-
nGroupInsuranceId.value = checkedInsurances.key;
|
|
20810
|
-
nGroupTitle.value = true;
|
|
20811
|
-
}
|
|
20812
|
-
else if (nGroupTitle.value) {
|
|
20813
|
-
if (notDisabledInsurances[0]) {
|
|
20814
|
-
nGroupInsuranceId.value = notDisabledInsurances[0].key;
|
|
20815
|
-
}
|
|
20816
|
-
}
|
|
20817
|
-
}
|
|
20739
|
+
|
|
20740
|
+
if (c < 0x80) {
|
|
20741
|
+
arr[arr.length] = hexTable[c];
|
|
20742
|
+
continue;
|
|
20818
20743
|
}
|
|
20819
|
-
|
|
20820
|
-
|
|
20821
|
-
|
|
20822
|
-
|
|
20823
|
-
|
|
20824
|
-
nGroupInsuranceId.opts = nGroupInsuranceId.opts.filter(function (opt) { return nGroupInsuranceId.value.indexOf(opt.val) !== -1 && !opt.isDisabled; });
|
|
20825
|
-
}
|
|
20826
|
-
}
|
|
20827
|
-
else {
|
|
20828
|
-
var opt = nGroupInsuranceId.opts.find(function (o) { return o.val === nGroupInsuranceId.value; });
|
|
20829
|
-
if (opt && opt.isDisabled) {
|
|
20830
|
-
nGroupInsuranceId.value = '';
|
|
20831
|
-
}
|
|
20832
|
-
}
|
|
20744
|
+
|
|
20745
|
+
if (c < 0x800) {
|
|
20746
|
+
arr[arr.length] = hexTable[0xC0 | (c >> 6)]
|
|
20747
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
20748
|
+
continue;
|
|
20833
20749
|
}
|
|
20834
|
-
|
|
20835
|
-
|
|
20836
|
-
|
|
20837
|
-
|
|
20838
|
-
|
|
20839
|
-
|
|
20840
|
-
newGroupInsMap[k][ck] = newGroupInsMap[k][ck].concat(checkedIns[ck].filter(function (ele) { return ele.key !== 'title'; }));
|
|
20841
|
-
}
|
|
20842
|
-
else {
|
|
20843
|
-
newGroupInsMap[k][ck] = checkedIns[ck];
|
|
20844
|
-
}
|
|
20845
|
-
}
|
|
20846
|
-
}
|
|
20847
|
-
}
|
|
20750
|
+
|
|
20751
|
+
if (c < 0xD800 || c >= 0xE000) {
|
|
20752
|
+
arr[arr.length] = hexTable[0xE0 | (c >> 12)]
|
|
20753
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
20754
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
20755
|
+
continue;
|
|
20848
20756
|
}
|
|
20757
|
+
|
|
20758
|
+
i += 1;
|
|
20759
|
+
c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));
|
|
20760
|
+
|
|
20761
|
+
arr[arr.length] = hexTable[0xF0 | (c >> 18)]
|
|
20762
|
+
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
20763
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
20764
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
20849
20765
|
}
|
|
20850
|
-
|
|
20851
|
-
|
|
20852
|
-
|
|
20853
|
-
|
|
20766
|
+
|
|
20767
|
+
out += arr.join('');
|
|
20768
|
+
}
|
|
20769
|
+
|
|
20770
|
+
return out;
|
|
20771
|
+
};
|
|
20772
|
+
|
|
20773
|
+
var compact = function compact(value) {
|
|
20774
|
+
var queue = [{ obj: { o: value }, prop: 'o' }];
|
|
20775
|
+
var refs = [];
|
|
20776
|
+
|
|
20777
|
+
for (var i = 0; i < queue.length; ++i) {
|
|
20778
|
+
var item = queue[i];
|
|
20779
|
+
var obj = item.obj[item.prop];
|
|
20780
|
+
|
|
20781
|
+
var keys = Object.keys(obj);
|
|
20782
|
+
for (var j = 0; j < keys.length; ++j) {
|
|
20783
|
+
var key = keys[j];
|
|
20784
|
+
var val = obj[key];
|
|
20785
|
+
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
20786
|
+
queue.push({ obj: obj, prop: key });
|
|
20787
|
+
refs.push(val);
|
|
20854
20788
|
}
|
|
20855
|
-
});
|
|
20856
|
-
if (index >= 0) {
|
|
20857
|
-
prodData.mulInsOrderList.splice(index + 1, 0, newGroupInsMap[k]);
|
|
20858
20789
|
}
|
|
20859
|
-
};
|
|
20860
|
-
for (var k in newGroupInsMap) {
|
|
20861
|
-
_loop_2(k);
|
|
20862
20790
|
}
|
|
20863
|
-
|
|
20864
|
-
|
|
20865
|
-
|
|
20866
|
-
|
|
20867
|
-
|
|
20868
|
-
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
|
|
20882
|
-
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20890
|
-
prodData.hadChoice = false;
|
|
20891
|
-
prodData.hide = true;
|
|
20892
|
-
prodData.totalBaof = null;
|
|
20791
|
+
|
|
20792
|
+
compactQueue(queue);
|
|
20793
|
+
|
|
20794
|
+
return value;
|
|
20795
|
+
};
|
|
20796
|
+
|
|
20797
|
+
var isRegExp = function isRegExp(obj) {
|
|
20798
|
+
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
20799
|
+
};
|
|
20800
|
+
|
|
20801
|
+
var isBuffer = function isBuffer(obj) {
|
|
20802
|
+
if (!obj || typeof obj !== 'object') {
|
|
20803
|
+
return false;
|
|
20804
|
+
}
|
|
20805
|
+
|
|
20806
|
+
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
20807
|
+
};
|
|
20808
|
+
|
|
20809
|
+
var combine = function combine(a, b) {
|
|
20810
|
+
return [].concat(a, b);
|
|
20811
|
+
};
|
|
20812
|
+
|
|
20813
|
+
var maybeMap = function maybeMap(val, fn) {
|
|
20814
|
+
if (isArray(val)) {
|
|
20815
|
+
var mapped = [];
|
|
20816
|
+
for (var i = 0; i < val.length; i += 1) {
|
|
20817
|
+
mapped.push(fn(val[i]));
|
|
20893
20818
|
}
|
|
20819
|
+
return mapped;
|
|
20894
20820
|
}
|
|
20895
|
-
return
|
|
20896
|
-
}
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
|
|
20901
|
-
|
|
20902
|
-
|
|
20903
|
-
|
|
20904
|
-
|
|
20905
|
-
|
|
20906
|
-
|
|
20907
|
-
|
|
20821
|
+
return fn(val);
|
|
20822
|
+
};
|
|
20823
|
+
|
|
20824
|
+
module.exports = {
|
|
20825
|
+
arrayToObject: arrayToObject,
|
|
20826
|
+
assign: assign,
|
|
20827
|
+
combine: combine,
|
|
20828
|
+
compact: compact,
|
|
20829
|
+
decode: decode,
|
|
20830
|
+
encode: encode,
|
|
20831
|
+
isBuffer: isBuffer,
|
|
20832
|
+
isRegExp: isRegExp,
|
|
20833
|
+
maybeMap: maybeMap,
|
|
20834
|
+
merge: merge
|
|
20835
|
+
};
|
|
20836
|
+
|
|
20837
|
+
|
|
20838
|
+
/***/ }),
|
|
20839
|
+
/* 36 */
|
|
20840
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
20841
|
+
|
|
20842
|
+
"use strict";
|
|
20843
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initProductData; });
|
|
20844
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return productDataHandler; });
|
|
20845
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getElementVerifyFromProductVerify; });
|
|
20846
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setCommonInfo; });
|
|
20847
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return setGroupInsurance; });
|
|
20848
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isHideProduct; });
|
|
20849
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return verifyProductRules; });
|
|
20850
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return restrictInsurancesInProduct; });
|
|
20851
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return convertProductData; });
|
|
20852
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return clearAddAndTakeAndAdjustBaoeData; });
|
|
20853
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
20854
|
+
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
|
|
20855
|
+
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
|
|
20856
|
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
|
|
20857
|
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
|
|
20858
|
+
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
|
|
20859
|
+
/* harmony import */ var _person__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12);
|
|
20860
|
+
/* harmony import */ var _insurance__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
|
|
20861
|
+
|
|
20862
|
+
|
|
20863
|
+
|
|
20864
|
+
|
|
20865
|
+
|
|
20866
|
+
|
|
20867
|
+
function initProductData(prodData) {
|
|
20868
|
+
prodData.hadChoice = false;
|
|
20869
|
+
prodData.insShowArr = null;
|
|
20870
|
+
prodData.totalBaof = null;
|
|
20871
|
+
if (!prodData.mulInsOrderList) {
|
|
20872
|
+
return prodData;
|
|
20908
20873
|
}
|
|
20909
|
-
if (
|
|
20910
|
-
|
|
20911
|
-
if (ins.eleOrderList) {
|
|
20912
|
-
ins.eleOrderList.forEach(function (ele) {
|
|
20913
|
-
errorMsg =
|
|
20914
|
-
errorMsg ||
|
|
20915
|
-
Object(_insurance__WEBPACK_IMPORTED_MODULE_5__[/* restrictElementsInInsurance */ "d"])({
|
|
20916
|
-
personOrderList: personOrderList,
|
|
20917
|
-
insData: ins,
|
|
20918
|
-
eleData: ele
|
|
20919
|
-
});
|
|
20920
|
-
});
|
|
20921
|
-
}
|
|
20922
|
-
});
|
|
20874
|
+
if (prodData.mulInsOrderList.some(function (ins) { return !!ins.adjustBaoe; })) {
|
|
20875
|
+
prodData.adjustBaoeData = prodData.adjustBaoeData || null;
|
|
20923
20876
|
}
|
|
20924
|
-
|
|
20877
|
+
prodData.mulInsOrderList.forEach(function (ins) {
|
|
20878
|
+
Object(_insurance__WEBPACK_IMPORTED_MODULE_5__[/* initInsuranceData */ "b"])(ins);
|
|
20879
|
+
});
|
|
20880
|
+
return prodData;
|
|
20925
20881
|
}
|
|
20926
|
-
function
|
|
20927
|
-
var
|
|
20928
|
-
|
|
20929
|
-
|
|
20930
|
-
|
|
20931
|
-
|
|
20932
|
-
|
|
20933
|
-
|
|
20934
|
-
|
|
20935
|
-
|
|
20936
|
-
|
|
20937
|
-
|
|
20938
|
-
|
|
20939
|
-
|
|
20940
|
-
|
|
20941
|
-
|
|
20942
|
-
|
|
20943
|
-
|
|
20944
|
-
|
|
20945
|
-
|
|
20946
|
-
|
|
20947
|
-
|
|
20948
|
-
|
|
20949
|
-
|
|
20950
|
-
|
|
20951
|
-
|
|
20952
|
-
|
|
20953
|
-
|
|
20954
|
-
|
|
20955
|
-
|
|
20956
|
-
|
|
20957
|
-
|
|
20958
|
-
|
|
20959
|
-
|
|
20960
|
-
|
|
20961
|
-
|
|
20962
|
-
|
|
20963
|
-
|
|
20964
|
-
|
|
20882
|
+
function productDataHandler(prodData, prodVerifyData, personData, parmas) {
|
|
20883
|
+
var _a;
|
|
20884
|
+
return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __awaiter */ "b"])(this, void 0, Promise, function () {
|
|
20885
|
+
var productVerifyData, hasProduct, hasVerifyData, hasPersonData, personOrderList;
|
|
20886
|
+
return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "e"])(this, function (_b) {
|
|
20887
|
+
switch (_b.label) {
|
|
20888
|
+
case 0:
|
|
20889
|
+
if (!prodData) {
|
|
20890
|
+
return [2, prodData];
|
|
20891
|
+
}
|
|
20892
|
+
productVerifyData = null;
|
|
20893
|
+
if (prodData.multipleInsured) {
|
|
20894
|
+
multipleInsuredHandler(personData);
|
|
20895
|
+
}
|
|
20896
|
+
if (!(prodData.feeValidateMode === 'single')) return [3, 2];
|
|
20897
|
+
return [4, getSingleInsurancesVerifyData(prodData, personData, parmas).catch(function () { })];
|
|
20898
|
+
case 1:
|
|
20899
|
+
productVerifyData = _b.sent();
|
|
20900
|
+
return [3, 3];
|
|
20901
|
+
case 2:
|
|
20902
|
+
productVerifyData = prodVerifyData;
|
|
20903
|
+
_b.label = 3;
|
|
20904
|
+
case 3:
|
|
20905
|
+
hasProduct = prodData.mulInsOrderList;
|
|
20906
|
+
hasVerifyData = productVerifyData && Object.keys(productVerifyData).length;
|
|
20907
|
+
hasPersonData = personData && personData.personOrderList;
|
|
20908
|
+
personOrderList = null;
|
|
20909
|
+
if (hasProduct && hasVerifyData && hasPersonData) {
|
|
20910
|
+
personOrderList = Object(_person__WEBPACK_IMPORTED_MODULE_4__[/* convertPersonData */ "a"])(personData, personData.personOrderList.map(function (p) { return p.key; }));
|
|
20911
|
+
setCommonInfo(prodData);
|
|
20912
|
+
(_a = prodData.mulInsOrderList) === null || _a === void 0 ? void 0 : _a.forEach(function (ins, ii, insList) {
|
|
20913
|
+
var _a, _b, _c;
|
|
20914
|
+
Object(_insurance__WEBPACK_IMPORTED_MODULE_5__[/* insuranceDataHandler */ "c"])(ins, prodData);
|
|
20915
|
+
var insuranceVerifyData = productVerifyData[ins.key];
|
|
20916
|
+
if (!insuranceVerifyData) {
|
|
20917
|
+
if (window.DEBUG_TEMP_CONSOLE_FLAG) {
|
|
20918
|
+
console.log("".concat(prodData.titleName, "-").concat(prodData.key, " -> ").concat(ins.name, "-").concat(ins.key, ": \u5F53\u524D\u9669\u79CD\u6CA1\u6709\u8D39\u7387\u8868"));
|
|
20919
|
+
}
|
|
20920
|
+
return;
|
|
20965
20921
|
}
|
|
20966
|
-
|
|
20967
|
-
|
|
20922
|
+
var isTouHuomianIns = ins.huomian === 'touHuomian' || ins.huomian === 'shuangHuomian';
|
|
20923
|
+
var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
|
|
20924
|
+
var applicantInfo = personOrderList.find(function (p) { return p.key === 'applicantInfo'; });
|
|
20925
|
+
var personType = isTouHuomianIns ? 'applicantInfo' : 'insuredInfo';
|
|
20926
|
+
if (isTouHuomianIns && ins.allowSamePerson) {
|
|
20927
|
+
personType = applicantInfo && applicantInfo.title ? 'applicantInfo' : 'insuredInfo';
|
|
20968
20928
|
}
|
|
20969
|
-
|
|
20970
|
-
|
|
20929
|
+
var targetPerson = personOrderList.find(function (p) { return p.key === personType; });
|
|
20930
|
+
var personCondition = null;
|
|
20931
|
+
if (targetPerson) {
|
|
20932
|
+
personCondition = insuranceVerifyData.find(function (v) {
|
|
20933
|
+
return targetPerson.sex === v.sex && targetPerson.age >= v.minAge && targetPerson.age <= v.maxAge;
|
|
20934
|
+
});
|
|
20935
|
+
if (personCondition) {
|
|
20936
|
+
personCondition = personCondition.conditionData;
|
|
20937
|
+
var isSamePerson = isTouHuomianIns && ins.allowSamePerson && personCondition.key === 'samePerson';
|
|
20938
|
+
if (isSamePerson) {
|
|
20939
|
+
personCondition = personCondition.samePerson.find(function (c) { return c.value == (applicantInfo.title ? 0 : 1); });
|
|
20940
|
+
}
|
|
20941
|
+
}
|
|
20971
20942
|
}
|
|
20972
|
-
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
|
|
20977
|
-
|
|
20978
|
-
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
? [
|
|
20983
|
-
rangeSelect_1[0] && Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* getNumberFromYear */ "h"])(rangeSelect_1[0], prodVerifyData.age),
|
|
20984
|
-
rangeSelect_1[1] && Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* getNumberFromYear */ "h"])(rangeSelect_1[1], prodVerifyData.age)
|
|
20985
|
-
]
|
|
20986
|
-
: Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* getNumberFromYear */ "h"])(rangeSelect_1, prodVerifyData.age);
|
|
20987
|
-
if (rangeSelect_1) {
|
|
20988
|
-
if (rangeSelect_1.constructor === Array) {
|
|
20989
|
-
opt.isHide =
|
|
20990
|
-
(rangeSelect_1[0] && optNum < rangeSelectNum[0]) || (rangeSelect_1[1] && optNum > rangeSelectNum[1]);
|
|
20943
|
+
var curCondition = personCondition;
|
|
20944
|
+
var eleTitle = (_a = ins.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
|
|
20945
|
+
var _loop_1 = function () {
|
|
20946
|
+
var isNotAllowSelect = !curCondition ||
|
|
20947
|
+
(isTouHuomianIns && !ins.allowSamePerson && (!targetPerson.title || targetPerson.applicantAndInsuredSame));
|
|
20948
|
+
if (isNotAllowSelect) {
|
|
20949
|
+
eleTitle.isDisabled = true;
|
|
20950
|
+
eleTitle.value = false;
|
|
20951
|
+
if (window.DEBUG_TEMP_CONSOLE_FLAG) {
|
|
20952
|
+
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"));
|
|
20991
20953
|
}
|
|
20992
|
-
|
|
20993
|
-
|
|
20954
|
+
}
|
|
20955
|
+
else {
|
|
20956
|
+
eleTitle.isDisabled = false;
|
|
20957
|
+
if (ins.required && (!ins.groupKey || ins.isCheckbox)) {
|
|
20958
|
+
eleTitle.value = true;
|
|
20959
|
+
eleTitle.isDisabled = true;
|
|
20960
|
+
if (window.DEBUG_TEMP_CONSOLE_FLAG) {
|
|
20961
|
+
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)"));
|
|
20962
|
+
}
|
|
20994
20963
|
}
|
|
20995
20964
|
}
|
|
20996
|
-
|
|
20997
|
-
|
|
20998
|
-
var validOptions = curEle.opts.filter(function (o) { return !o.isDisabled && !o.isHide && !o.isInvalid; });
|
|
20999
|
-
var activeOption = validOptions.find(function (o) { return o.val === curEle.value; });
|
|
21000
|
-
if (!activeOption && validOptions.length) {
|
|
21001
|
-
curEle.value = validOptions[0].val;
|
|
20965
|
+
if (!curCondition) {
|
|
20966
|
+
return "break";
|
|
21002
20967
|
}
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
|
|
21009
|
-
|
|
21010
|
-
|
|
21011
|
-
var rangeVal = eval(restrict.rCondition);
|
|
21012
|
-
if (rangeVal !== undefined && rangeVal !== null) {
|
|
21013
|
-
if (rangeVal.constructor === Array) {
|
|
21014
|
-
if (rangeVal[0] && curEle.value && curEle.value < rangeVal[0]) {
|
|
21015
|
-
errorMsg =
|
|
21016
|
-
restrict.rMsg || "".concat(curIns.name, "\u7684").concat(curEle.labelName, "\u4E0D\u5F97\u5C0F\u4E8E").concat(Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* converUnit10000 */ "b"])(rangeVal[0]));
|
|
20968
|
+
var eleData = (_b = ins.eleOrderList) === null || _b === void 0 ? void 0 : _b.find(function (e) { return e.key === curCondition.key; });
|
|
20969
|
+
var commonData = insList.find(function (ins) { return ins.key === 'common'; });
|
|
20970
|
+
if (!eleData && commonData && commonData.eleOrderList) {
|
|
20971
|
+
eleData = commonData.eleOrderList.find(function (e) { return e.key === curCondition.key; });
|
|
20972
|
+
}
|
|
20973
|
+
if (!eleData) {
|
|
20974
|
+
if (window.DEBUG_TEMP_CONSOLE_FLAG) {
|
|
20975
|
+
console.log("".concat(ins.name, " - ").concat(curCondition && curCondition.key, "\u5143\u7D20\u4E0D\u5B58\u5728\uFF1A"));
|
|
21017
20976
|
}
|
|
21018
|
-
|
|
21019
|
-
|
|
21020
|
-
|
|
20977
|
+
curCondition = null;
|
|
20978
|
+
return "break";
|
|
20979
|
+
}
|
|
20980
|
+
var eleCondi = curCondition[curCondition.key];
|
|
20981
|
+
var isBeGovernedEle = eleData.isHide && !eleData.isDisabled && ins.refInsuranceId && Number(ins.refInsuranceId) !== -2;
|
|
20982
|
+
if (isBeGovernedEle) {
|
|
20983
|
+
var refInsData = null;
|
|
20984
|
+
if (Number(ins.refInsuranceId) === -1) {
|
|
20985
|
+
refInsData = insList[0].key === 'common' ? insList[1] : insList[0];
|
|
20986
|
+
}
|
|
20987
|
+
else {
|
|
20988
|
+
refInsData = insList.find(function (ins) { return ins.key == ins.refInsuranceId; });
|
|
20989
|
+
}
|
|
20990
|
+
var refEleData = refInsData && refInsData.eleOrderList && refInsData.eleOrderList.find(function (e) { return e.key === eleData.key; });
|
|
20991
|
+
if (refEleData) {
|
|
20992
|
+
if (ins.huomian && eleData.key == 'pPeriod') {
|
|
20993
|
+
eleData.value = Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* getHuomianPeriodValue */ "g"])(refEleData.value, ins.pMinus, ins.huomian === 'touHuomian' ? insuredInfo.age : targetPerson.age);
|
|
20994
|
+
}
|
|
20995
|
+
else {
|
|
20996
|
+
eleData.value = refEleData.value;
|
|
20997
|
+
}
|
|
20998
|
+
}
|
|
20999
|
+
else {
|
|
21000
|
+
if (window.DEBUG_TEMP_CONSOLE_FLAG) {
|
|
21001
|
+
console.log("".concat(ins.name, "-").concat(ins.key, "\uFF1A\u5173\u8054\u9669\u79CD").concat(ins.refInsuranceId, "\u4E0D\u5B58\u5728"));
|
|
21002
|
+
}
|
|
21003
|
+
}
|
|
21004
|
+
}
|
|
21005
|
+
else {
|
|
21006
|
+
var backupOpts_1 = eleData.opts && eleData.opts.length ? eleData.opts.slice(0) : [];
|
|
21007
|
+
eleData.opts = eleCondi.filter(function (c) { return c.value !== undefined && c.desc !== undefined; }).map(function (c) {
|
|
21008
|
+
var option = backupOpts_1.find(function (o) { return o.val == c.value; });
|
|
21009
|
+
return {
|
|
21010
|
+
val: c.value,
|
|
21011
|
+
desc: c.desc || c.value,
|
|
21012
|
+
isHide: (option && option.isHide) || null,
|
|
21013
|
+
isDisabled: (option && option.isDisabled) || null,
|
|
21014
|
+
isInvalid: null
|
|
21015
|
+
};
|
|
21016
|
+
});
|
|
21017
|
+
var isNoOption = eleData.opts && eleData.opts.length && eleData.opts.every(function (ele) { return ele.val != eleData.value; });
|
|
21018
|
+
if (isNoOption) {
|
|
21019
|
+
if (eleData.key === 'pPeriod') {
|
|
21020
|
+
var filterOpts = (_c = eleData.opts) === null || _c === void 0 ? void 0 : _c.filter(function (opt) { return !opt.isHide && !opt.isDisabled; });
|
|
21021
|
+
if (filterOpts && filterOpts.length) {
|
|
21022
|
+
eleData.value = filterOpts[filterOpts.length - 1].val;
|
|
21023
|
+
}
|
|
21024
|
+
}
|
|
21025
|
+
else {
|
|
21026
|
+
if (eleData.opts && eleData.opts.length) {
|
|
21027
|
+
eleData.value = eleData.opts[0].val;
|
|
21028
|
+
}
|
|
21029
|
+
}
|
|
21021
21030
|
}
|
|
21022
21031
|
}
|
|
21023
|
-
|
|
21024
|
-
|
|
21025
|
-
|
|
21032
|
+
curCondition = eleCondi.find(function (eleCondi) { return eleCondi.value == eleData.value; });
|
|
21033
|
+
var eleIndex = ins.eleOrderList.findIndex(function (ele) { return ele.key === eleData.key; });
|
|
21034
|
+
var prevElement;
|
|
21035
|
+
if (eleIndex >= 1) {
|
|
21036
|
+
prevElement = ins.eleOrderList[eleIndex - 1];
|
|
21037
|
+
}
|
|
21038
|
+
if (prevElement) {
|
|
21039
|
+
if (!curCondition) {
|
|
21040
|
+
var prevEleVerify = getElementVerifyFromProductVerify(personCondition, insList, { insuranceKey: ins.key, elementKey: prevElement.key });
|
|
21041
|
+
var onePrevEleVerify = prevEleVerify === null || prevEleVerify === void 0 ? void 0 : prevEleVerify.find(function (v) { return v[eleData.key] && v[eleData.key].some(function (condi) { return condi.value === eleData.value; }); });
|
|
21042
|
+
if (onePrevEleVerify) {
|
|
21043
|
+
prevElement.value = onePrevEleVerify.value;
|
|
21044
|
+
curCondition = onePrevEleVerify[eleData.key];
|
|
21045
|
+
}
|
|
21046
|
+
}
|
|
21047
|
+
if (!curCondition) {
|
|
21048
|
+
eleTitle.isDisabled = true;
|
|
21049
|
+
eleTitle.value = false;
|
|
21050
|
+
if (window.DEBUG_TEMP_CONSOLE_FLAG) {
|
|
21051
|
+
console.log("".concat(eleTitle.labelName, "-").concat(ins.key, ": \u8D39\u7387\u4E0D\u5B58\u5728\uFF01"));
|
|
21052
|
+
}
|
|
21053
|
+
}
|
|
21054
|
+
var isNeedReverseFilter = eleData.isHide && !eleData.isDisabled && prevElement.opts && prevElement.opts.length;
|
|
21055
|
+
if (isNeedReverseFilter) {
|
|
21056
|
+
var prevEleVerify = getElementVerifyFromProductVerify(personCondition, insList, { insuranceKey: ins.key, elementKey: prevElement.key });
|
|
21057
|
+
if (prevEleVerify) {
|
|
21058
|
+
prevElement.opts = prevEleVerify.filter(function (v) {
|
|
21059
|
+
var _a;
|
|
21060
|
+
var elementVerify = getElementVerifyFromProductVerify(personCondition, insList, (_a = {
|
|
21061
|
+
insuranceKey: ins.key,
|
|
21062
|
+
elementKey: eleData.key
|
|
21063
|
+
},
|
|
21064
|
+
_a[prevElement.key] = v.value,
|
|
21065
|
+
_a));
|
|
21066
|
+
return elementVerify && elementVerify.some(function (c) { return c.value == eleData.value; });
|
|
21067
|
+
}).map(function (v) { return ({
|
|
21068
|
+
val: v.value,
|
|
21069
|
+
desc: v.desc || v.value,
|
|
21070
|
+
isHide: null,
|
|
21071
|
+
isDisabled: null,
|
|
21072
|
+
isInvalid: null
|
|
21073
|
+
}); });
|
|
21074
|
+
}
|
|
21026
21075
|
}
|
|
21027
21076
|
}
|
|
21028
|
-
}
|
|
21029
|
-
|
|
21030
|
-
|
|
21077
|
+
};
|
|
21078
|
+
do {
|
|
21079
|
+
var state_1 = _loop_1();
|
|
21080
|
+
if (state_1 === "break")
|
|
21081
|
+
break;
|
|
21082
|
+
} while (curCondition && curCondition.key && curCondition[curCondition.key]);
|
|
21083
|
+
});
|
|
21031
21084
|
}
|
|
21032
|
-
|
|
21085
|
+
setGroupInsurance(prodData);
|
|
21086
|
+
isHideProduct(prodData, productVerifyData, personOrderList);
|
|
21087
|
+
return [2, prodData];
|
|
21033
21088
|
}
|
|
21034
21089
|
});
|
|
21090
|
+
});
|
|
21091
|
+
}
|
|
21092
|
+
function multipleInsuredHandler(personData) {
|
|
21093
|
+
var personOrderList = personData.personOrderList;
|
|
21094
|
+
if (!(personOrderList && personOrderList.length)) {
|
|
21095
|
+
return null;
|
|
21035
21096
|
}
|
|
21036
|
-
return
|
|
21097
|
+
var insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
|
|
21098
|
+
if (!insured2Info) {
|
|
21099
|
+
var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
|
|
21100
|
+
var insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
|
|
21101
|
+
if (insuredIndex >= 0) {
|
|
21102
|
+
var person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
|
|
21103
|
+
person.key = 'insured2Info';
|
|
21104
|
+
person.eleOrderList.forEach(function (e) {
|
|
21105
|
+
if (e.key === 'title') {
|
|
21106
|
+
e.isDisabled = false;
|
|
21107
|
+
e.value = true;
|
|
21108
|
+
e.label = '第二被保人信息';
|
|
21109
|
+
}
|
|
21110
|
+
});
|
|
21111
|
+
personOrderList.splice(insuredIndex + 1, 0, person);
|
|
21112
|
+
}
|
|
21113
|
+
}
|
|
21114
|
+
return personData;
|
|
21037
21115
|
}
|
|
21038
|
-
function
|
|
21039
|
-
|
|
21040
|
-
|
|
21116
|
+
function getSingleInsurancesVerifyData(prodData, personData, parmas) {
|
|
21117
|
+
var _a, _b;
|
|
21118
|
+
if (parmas === void 0) { parmas = {}; }
|
|
21119
|
+
var personOrderList = personData.personOrderList;
|
|
21120
|
+
if (!(personOrderList && personOrderList.length)) {
|
|
21121
|
+
return null;
|
|
21041
21122
|
}
|
|
21042
|
-
|
|
21123
|
+
var pbId = prodData.isTemp || (prodData.policyType === 'single_insurance') ? null : parmas.planbookId;
|
|
21124
|
+
var productId = prodData.policyType === 'single_insurance' ? null : prodData.key;
|
|
21125
|
+
var insuredList = personOrderList
|
|
21126
|
+
.filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
|
|
21127
|
+
.filter(function (p) {
|
|
21128
|
+
var _a;
|
|
21129
|
+
var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
|
|
21130
|
+
return title && title.value;
|
|
21131
|
+
})
|
|
21132
|
+
.map(function (p) {
|
|
21133
|
+
var _a, _b;
|
|
21134
|
+
return {
|
|
21135
|
+
key: p.key,
|
|
21136
|
+
sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
|
|
21137
|
+
age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
|
|
21138
|
+
};
|
|
21139
|
+
});
|
|
21140
|
+
var insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
|
|
21141
|
+
(_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
|
|
21142
|
+
return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
|
|
21143
|
+
}, []);
|
|
21144
|
+
return getAndCacheInsurancesVerifyData({
|
|
21145
|
+
pbId: pbId,
|
|
21146
|
+
productId: productId,
|
|
21147
|
+
insuredList: insuredList,
|
|
21148
|
+
insuranceIdList: insuranceIdList
|
|
21149
|
+
});
|
|
21150
|
+
}
|
|
21151
|
+
var getAndCacheInsurancesVerifyData = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["memoize"])(function (params) {
|
|
21152
|
+
var IS_PRODUCT_ENV = location.hostname.search(/winbaoxian\.com/) !== -1;
|
|
21153
|
+
var url = "https://app.winbaoxian.".concat(IS_PRODUCT_ENV ? 'com' : 'cn', "/planBook/input/insurance/verifyData");
|
|
21154
|
+
return fetch(url, {
|
|
21155
|
+
method: 'POST',
|
|
21156
|
+
credentials: 'include',
|
|
21157
|
+
headers: {
|
|
21158
|
+
Accept: 'application/json, text/plain, */*',
|
|
21159
|
+
'Content-Type': 'application/json;'
|
|
21160
|
+
},
|
|
21161
|
+
body: JSON.stringify(params)
|
|
21162
|
+
})
|
|
21163
|
+
.then(function (response) { return response.json(); })
|
|
21164
|
+
.then(function (_a) {
|
|
21165
|
+
var success = _a.success, data = _a.data;
|
|
21166
|
+
if (!success || !data) {
|
|
21167
|
+
return Promise.reject();
|
|
21168
|
+
}
|
|
21169
|
+
return Promise.resolve(data);
|
|
21170
|
+
})
|
|
21171
|
+
.catch(function () { });
|
|
21172
|
+
}, function (params) { return qs__WEBPACK_IMPORTED_MODULE_1___default.a.stringify(params); });
|
|
21173
|
+
function getElementVerifyFromProductVerify(verify, insurances, option) {
|
|
21174
|
+
if (!verify || !verify.key || !verify[verify.key] || !insurances || !option) {
|
|
21175
|
+
return verify;
|
|
21176
|
+
}
|
|
21177
|
+
var insuranceInfo = {};
|
|
21178
|
+
insurances.forEach(function (ins) {
|
|
21179
|
+
if (['common', option.insuranceKey].includes(ins.key)) {
|
|
21180
|
+
insuranceInfo = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, insuranceInfo), Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* convertEleOrderListToObj */ "c"])(ins));
|
|
21181
|
+
}
|
|
21182
|
+
});
|
|
21183
|
+
insuranceInfo = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, insuranceInfo), option);
|
|
21184
|
+
var temp = verify;
|
|
21185
|
+
var hasElementKey = verify.key === option.elementKey;
|
|
21186
|
+
while (temp && temp.key && temp.key !== option.elementKey) {
|
|
21187
|
+
temp = temp[temp.key].find(function (v) { return v.value == insuranceInfo[temp.key]; });
|
|
21188
|
+
if (temp && temp.key === option.elementKey) {
|
|
21189
|
+
hasElementKey = true;
|
|
21190
|
+
}
|
|
21191
|
+
}
|
|
21192
|
+
if (!hasElementKey) {
|
|
21193
|
+
return null;
|
|
21194
|
+
}
|
|
21195
|
+
if (temp && temp[option.elementKey]) {
|
|
21196
|
+
return temp[option.elementKey];
|
|
21197
|
+
}
|
|
21198
|
+
return temp ? [temp] : null;
|
|
21199
|
+
}
|
|
21200
|
+
function setCommonInfo(prodData) {
|
|
21201
|
+
if (!prodData || !prodData.mulInsOrderList) {
|
|
21043
21202
|
return prodData;
|
|
21044
21203
|
}
|
|
21045
|
-
var
|
|
21046
|
-
|
|
21047
|
-
|
|
21048
|
-
|
|
21049
|
-
|
|
21204
|
+
var common = {
|
|
21205
|
+
key: 'common',
|
|
21206
|
+
eleOrderList: []
|
|
21207
|
+
};
|
|
21208
|
+
prodData.mulInsOrderList.forEach(function (ins) {
|
|
21209
|
+
if (!ins.eleOrderList) {
|
|
21050
21210
|
return;
|
|
21051
21211
|
}
|
|
21052
|
-
|
|
21053
|
-
if (
|
|
21054
|
-
|
|
21055
|
-
insuranceId.forEach(function (insId) {
|
|
21056
|
-
var checkedIns = prodData.mulInsOrderList.find(function (p) { return p.key === insId; });
|
|
21057
|
-
if (checkedIns) {
|
|
21058
|
-
var checkedInsData_1 = Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* convertEleOrderListToObj */ "c"])(checkedIns);
|
|
21059
|
-
insurance.eleOrderList &&
|
|
21060
|
-
insurance.eleOrderList.forEach(function (ele) {
|
|
21061
|
-
if (!['title', 'insuranceId'].includes(ele.key)) {
|
|
21062
|
-
checkedInsData_1[ele.key] = insuranceData[ele.key];
|
|
21063
|
-
}
|
|
21064
|
-
});
|
|
21065
|
-
productData.mulInsOrderList.push(Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* deepCopy */ "d"])(checkedInsData_1));
|
|
21066
|
-
}
|
|
21067
|
-
});
|
|
21068
|
-
return;
|
|
21212
|
+
ins.eleOrderList.forEach(function (ele) {
|
|
21213
|
+
if (ele.common && common.eleOrderList.every(function (e) { return e.key !== ele.key; })) {
|
|
21214
|
+
common.eleOrderList.push(ele);
|
|
21069
21215
|
}
|
|
21070
|
-
|
|
21071
|
-
}
|
|
21216
|
+
});
|
|
21217
|
+
ins.eleOrderList = ins.eleOrderList.filter(function (ele) { return !ele.common; });
|
|
21072
21218
|
});
|
|
21073
|
-
|
|
21219
|
+
if (!common.eleOrderList.length) {
|
|
21220
|
+
return prodData;
|
|
21221
|
+
}
|
|
21222
|
+
prodData.mulInsOrderList = prodData.mulInsOrderList.filter(function (ins) { return ins.key !== 'common'; });
|
|
21223
|
+
prodData.mulInsOrderList.unshift(common);
|
|
21224
|
+
if (prodData.mulInsOrderList[1]) {
|
|
21225
|
+
prodData.mulInsOrderList[1].isFollowing = true;
|
|
21226
|
+
}
|
|
21227
|
+
return prodData;
|
|
21074
21228
|
}
|
|
21075
|
-
function
|
|
21076
|
-
if (!
|
|
21077
|
-
return
|
|
21229
|
+
function setGroupInsurance(prodData) {
|
|
21230
|
+
if (!prodData.mulInsOrderList) {
|
|
21231
|
+
return prodData;
|
|
21078
21232
|
}
|
|
21079
|
-
|
|
21080
|
-
|
|
21233
|
+
var groupInsuranceList = prodData && prodData.mulInsOrderList && prodData.mulInsOrderList.filter(function (ins) { return !!ins.groupKey; });
|
|
21234
|
+
if (!groupInsuranceList || !groupInsuranceList.length) {
|
|
21235
|
+
return prodData;
|
|
21081
21236
|
}
|
|
21082
|
-
|
|
21083
|
-
|
|
21084
|
-
|
|
21085
|
-
|
|
21086
|
-
|
|
21087
|
-
|
|
21237
|
+
var oldGroupInsList = prodData.mulInsOrderList.filter(function (ins) { return ins.isGroup; });
|
|
21238
|
+
var newGroupInsMap = {};
|
|
21239
|
+
prodData.mulInsOrderList = prodData.mulInsOrderList.filter(function (ins) { return !ins.isGroup; });
|
|
21240
|
+
groupInsuranceList.forEach(function (ins) {
|
|
21241
|
+
var oldGroupIns = oldGroupInsList.find(function (gIns) { return gIns.key === ins.groupKey; });
|
|
21242
|
+
var oldTitleEle = {};
|
|
21243
|
+
var oldInsuranceIdEle = {};
|
|
21244
|
+
if (oldGroupIns && oldGroupIns.eleOrderList) {
|
|
21245
|
+
oldTitleEle = oldGroupIns.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
21246
|
+
oldInsuranceIdEle = oldGroupIns.eleOrderList.find(function (e) { return e.key === 'insuranceId'; });
|
|
21088
21247
|
}
|
|
21089
|
-
if (ins.
|
|
21090
|
-
ins.
|
|
21091
|
-
|
|
21248
|
+
if (ins.groupKey) {
|
|
21249
|
+
newGroupInsMap[ins.groupKey] = newGroupInsMap[ins.groupKey] || {
|
|
21250
|
+
key: ins.groupKey,
|
|
21251
|
+
name: ins.groupName,
|
|
21252
|
+
huomian: ins.huomian,
|
|
21253
|
+
isGroup: true,
|
|
21254
|
+
eleOrderList: [
|
|
21255
|
+
{
|
|
21256
|
+
key: 'title',
|
|
21257
|
+
value: (oldTitleEle && oldTitleEle.value) || false,
|
|
21258
|
+
isDisabled: false,
|
|
21259
|
+
componentName: 'cmCommonTitle',
|
|
21260
|
+
labelName: ins.groupName
|
|
21261
|
+
},
|
|
21262
|
+
{
|
|
21263
|
+
key: 'insuranceId',
|
|
21264
|
+
value: (oldInsuranceIdEle && oldInsuranceIdEle.value) || (ins.isCheckbox ? [] : ''),
|
|
21265
|
+
componentName: ins.isCheckbox ? 'cmCommonCheckbox' : 'cmCommonRadio',
|
|
21266
|
+
opts: []
|
|
21267
|
+
}
|
|
21268
|
+
]
|
|
21269
|
+
};
|
|
21270
|
+
var titleEle = ins.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
21271
|
+
var insuranceIdEle = newGroupInsMap[ins.groupKey].eleOrderList.find(function (e) { return e.key === 'insuranceId'; });
|
|
21272
|
+
insuranceIdEle.opts.push({
|
|
21273
|
+
val: ins.key,
|
|
21274
|
+
code: ins.code,
|
|
21275
|
+
desc: titleEle.labelName,
|
|
21276
|
+
isDisabled: titleEle.isDisabled
|
|
21092
21277
|
});
|
|
21093
21278
|
}
|
|
21094
21279
|
});
|
|
21095
|
-
|
|
21096
|
-
}
|
|
21097
|
-
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
|
|
21101
|
-
|
|
21102
|
-
|
|
21103
|
-
|
|
21104
|
-
|
|
21105
|
-
|
|
21106
|
-
|
|
21107
|
-
|
|
21108
|
-
var
|
|
21109
|
-
|
|
21110
|
-
|
|
21111
|
-
var
|
|
21112
|
-
|
|
21113
|
-
|
|
21114
|
-
|
|
21115
|
-
|
|
21116
|
-
|
|
21117
|
-
|
|
21118
|
-
var
|
|
21119
|
-
|
|
21120
|
-
|
|
21121
|
-
|
|
21122
|
-
var
|
|
21123
|
-
|
|
21124
|
-
|
|
21125
|
-
|
|
21126
|
-
|
|
21127
|
-
|
|
21128
|
-
|
|
21129
|
-
|
|
21130
|
-
|
|
21131
|
-
|
|
21132
|
-
|
|
21133
|
-
|
|
21134
|
-
|
|
21135
|
-
if (!channel.has(key)) {
|
|
21136
|
-
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
21137
|
-
}
|
|
21138
|
-
},
|
|
21139
|
-
'delete': function (key) {
|
|
21140
|
-
if ($m) {
|
|
21141
|
-
var result = $mapDelete($m, key);
|
|
21142
|
-
if ($mapSize($m) === 0) {
|
|
21143
|
-
$m = void undefined;
|
|
21144
|
-
}
|
|
21145
|
-
return result;
|
|
21146
|
-
}
|
|
21147
|
-
return false;
|
|
21148
|
-
},
|
|
21149
|
-
get: function (key) { // eslint-disable-line consistent-return
|
|
21150
|
-
if ($m) {
|
|
21151
|
-
return $mapGet($m, key);
|
|
21152
|
-
}
|
|
21153
|
-
},
|
|
21154
|
-
has: function (key) {
|
|
21155
|
-
if ($m) {
|
|
21156
|
-
return $mapHas($m, key);
|
|
21157
|
-
}
|
|
21158
|
-
return false;
|
|
21159
|
-
},
|
|
21160
|
-
set: function (key, value) {
|
|
21161
|
-
if (!$m) {
|
|
21162
|
-
// @ts-expect-error TS can't handle narrowing a variable inside a closure
|
|
21163
|
-
$m = new $Map();
|
|
21164
|
-
}
|
|
21165
|
-
$mapSet($m, key, value);
|
|
21166
|
-
}
|
|
21167
|
-
};
|
|
21168
|
-
|
|
21169
|
-
// @ts-expect-error TODO: figure out why TS is erroring here
|
|
21170
|
-
return channel;
|
|
21171
|
-
};
|
|
21172
|
-
|
|
21173
|
-
|
|
21174
|
-
/***/ }),
|
|
21175
|
-
/* 29 */
|
|
21176
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
21177
|
-
|
|
21178
|
-
"use strict";
|
|
21179
|
-
|
|
21180
|
-
|
|
21181
|
-
/** @type {import('.')} */
|
|
21182
|
-
module.exports = Object;
|
|
21183
|
-
|
|
21184
|
-
|
|
21185
|
-
/***/ }),
|
|
21186
|
-
/* 30 */
|
|
21187
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
21188
|
-
|
|
21189
|
-
"use strict";
|
|
21190
|
-
|
|
21191
|
-
|
|
21192
|
-
/** @type {import('.')} */
|
|
21193
|
-
var $gOPD = __webpack_require__(57);
|
|
21194
|
-
|
|
21195
|
-
if ($gOPD) {
|
|
21196
|
-
try {
|
|
21197
|
-
$gOPD([], 'length');
|
|
21198
|
-
} catch (e) {
|
|
21199
|
-
// IE 8 has a broken gOPD
|
|
21200
|
-
$gOPD = null;
|
|
21201
|
-
}
|
|
21202
|
-
}
|
|
21203
|
-
|
|
21204
|
-
module.exports = $gOPD;
|
|
21205
|
-
|
|
21206
|
-
|
|
21207
|
-
/***/ }),
|
|
21208
|
-
/* 31 */
|
|
21209
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
21210
|
-
|
|
21211
|
-
"use strict";
|
|
21212
|
-
|
|
21213
|
-
|
|
21214
|
-
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
21215
|
-
module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
/***/ }),
|
|
21219
|
-
/* 32 */
|
|
21220
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
21221
|
-
|
|
21222
|
-
"use strict";
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
var $Object = __webpack_require__(29);
|
|
21226
|
-
|
|
21227
|
-
/** @type {import('./Object.getPrototypeOf')} */
|
|
21228
|
-
module.exports = $Object.getPrototypeOf || null;
|
|
21229
|
-
|
|
21230
|
-
|
|
21231
|
-
/***/ }),
|
|
21232
|
-
/* 33 */
|
|
21233
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
21234
|
-
|
|
21235
|
-
"use strict";
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
var bind = __webpack_require__(15);
|
|
21239
|
-
var $TypeError = __webpack_require__(9);
|
|
21240
|
-
|
|
21241
|
-
var $call = __webpack_require__(20);
|
|
21242
|
-
var $actualApply = __webpack_require__(64);
|
|
21243
|
-
|
|
21244
|
-
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|
21245
|
-
module.exports = function callBindBasic(args) {
|
|
21246
|
-
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
21247
|
-
throw new $TypeError('a function is required');
|
|
21248
|
-
}
|
|
21249
|
-
return $actualApply(bind, $call, args);
|
|
21250
|
-
};
|
|
21251
|
-
|
|
21252
|
-
|
|
21253
|
-
/***/ }),
|
|
21254
|
-
/* 34 */
|
|
21255
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
21256
|
-
|
|
21257
|
-
"use strict";
|
|
21258
|
-
|
|
21259
|
-
|
|
21260
|
-
/** @type {import('./functionApply')} */
|
|
21261
|
-
module.exports = Function.prototype.apply;
|
|
21262
|
-
|
|
21263
|
-
|
|
21264
|
-
/***/ }),
|
|
21265
|
-
/* 35 */
|
|
21266
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
21267
|
-
|
|
21268
|
-
"use strict";
|
|
21269
|
-
|
|
21270
|
-
|
|
21271
|
-
var GetIntrinsic = __webpack_require__(19);
|
|
21272
|
-
|
|
21273
|
-
var callBindBasic = __webpack_require__(33);
|
|
21274
|
-
|
|
21275
|
-
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
|
|
21276
|
-
var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);
|
|
21277
|
-
|
|
21278
|
-
/** @type {import('.')} */
|
|
21279
|
-
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
21280
|
-
/* eslint no-extra-parens: 0 */
|
|
21281
|
-
|
|
21282
|
-
var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));
|
|
21283
|
-
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
21284
|
-
return callBindBasic(/** @type {const} */ ([intrinsic]));
|
|
21285
|
-
}
|
|
21286
|
-
return intrinsic;
|
|
21287
|
-
};
|
|
21288
|
-
|
|
21289
|
-
|
|
21290
|
-
/***/ }),
|
|
21291
|
-
/* 36 */
|
|
21292
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
21293
|
-
|
|
21294
|
-
"use strict";
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
var formats = __webpack_require__(21);
|
|
21298
|
-
|
|
21299
|
-
var has = Object.prototype.hasOwnProperty;
|
|
21300
|
-
var isArray = Array.isArray;
|
|
21301
|
-
|
|
21302
|
-
var hexTable = (function () {
|
|
21303
|
-
var array = [];
|
|
21304
|
-
for (var i = 0; i < 256; ++i) {
|
|
21305
|
-
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
21306
|
-
}
|
|
21307
|
-
|
|
21308
|
-
return array;
|
|
21309
|
-
}());
|
|
21310
|
-
|
|
21311
|
-
var compactQueue = function compactQueue(queue) {
|
|
21312
|
-
while (queue.length > 1) {
|
|
21313
|
-
var item = queue.pop();
|
|
21314
|
-
var obj = item.obj[item.prop];
|
|
21315
|
-
|
|
21316
|
-
if (isArray(obj)) {
|
|
21317
|
-
var compacted = [];
|
|
21318
|
-
|
|
21319
|
-
for (var j = 0; j < obj.length; ++j) {
|
|
21320
|
-
if (typeof obj[j] !== 'undefined') {
|
|
21321
|
-
compacted.push(obj[j]);
|
|
21280
|
+
var _loop_2 = function (k) {
|
|
21281
|
+
var nGroupTitle = newGroupInsMap[k].eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
21282
|
+
var nGroupInsuranceId = newGroupInsMap[k].eleOrderList.find(function (e) { return e.key === 'insuranceId'; });
|
|
21283
|
+
if (nGroupTitle && nGroupInsuranceId) {
|
|
21284
|
+
if (nGroupInsuranceId.opts && nGroupInsuranceId.opts.length) {
|
|
21285
|
+
if (nGroupInsuranceId.opts.every(function (opt) { return !!opt.isDisabled; })) {
|
|
21286
|
+
nGroupTitle.value = false;
|
|
21287
|
+
nGroupTitle.isDisabled = true;
|
|
21288
|
+
}
|
|
21289
|
+
else {
|
|
21290
|
+
nGroupTitle.isDisabled = false;
|
|
21291
|
+
}
|
|
21292
|
+
}
|
|
21293
|
+
var groupInsList = prodData.mulInsOrderList.filter(function (ins) { return ins.groupKey == k; });
|
|
21294
|
+
if (groupInsList && groupInsList.length) {
|
|
21295
|
+
if (groupInsList.some(function (ins) {
|
|
21296
|
+
var subTitle = ins.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
21297
|
+
return ins.required && subTitle && !subTitle.isDisabled;
|
|
21298
|
+
})) {
|
|
21299
|
+
nGroupTitle.value = true;
|
|
21300
|
+
nGroupTitle.isDisabled = true;
|
|
21301
|
+
}
|
|
21302
|
+
var notDisabledInsurances = groupInsList.filter(function (ins) {
|
|
21303
|
+
var subTitle = ins.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
21304
|
+
return subTitle && !subTitle.isDisabled;
|
|
21305
|
+
});
|
|
21306
|
+
var checkedInsurances = notDisabledInsurances.find(function (ins) {
|
|
21307
|
+
var subTitle = ins.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
21308
|
+
return subTitle && subTitle.value;
|
|
21309
|
+
});
|
|
21310
|
+
if (!nGroupInsuranceId.value) {
|
|
21311
|
+
if (checkedInsurances) {
|
|
21312
|
+
nGroupInsuranceId.value = checkedInsurances.key;
|
|
21313
|
+
nGroupTitle.value = true;
|
|
21314
|
+
}
|
|
21315
|
+
else if (nGroupTitle.value) {
|
|
21316
|
+
if (notDisabledInsurances[0]) {
|
|
21317
|
+
nGroupInsuranceId.value = notDisabledInsurances[0].key;
|
|
21318
|
+
}
|
|
21319
|
+
}
|
|
21322
21320
|
}
|
|
21323
21321
|
}
|
|
21324
|
-
|
|
21325
|
-
item.obj[item.prop] = compacted;
|
|
21326
21322
|
}
|
|
21327
|
-
|
|
21328
|
-
|
|
21329
|
-
|
|
21330
|
-
|
|
21331
|
-
|
|
21332
|
-
|
|
21333
|
-
|
|
21334
|
-
|
|
21323
|
+
if (nGroupInsuranceId) {
|
|
21324
|
+
if (nGroupInsuranceId.value) {
|
|
21325
|
+
if (nGroupInsuranceId.value.constructor === Array) {
|
|
21326
|
+
if (nGroupInsuranceId.opts) {
|
|
21327
|
+
nGroupInsuranceId.opts = nGroupInsuranceId.opts.filter(function (opt) { return nGroupInsuranceId.value.indexOf(opt.val) !== -1 && !opt.isDisabled; });
|
|
21328
|
+
}
|
|
21329
|
+
}
|
|
21330
|
+
else {
|
|
21331
|
+
var opt = nGroupInsuranceId.opts.find(function (o) { return o.val === nGroupInsuranceId.value; });
|
|
21332
|
+
if (opt && opt.isDisabled) {
|
|
21333
|
+
nGroupInsuranceId.value = '';
|
|
21334
|
+
}
|
|
21335
|
+
}
|
|
21336
|
+
}
|
|
21337
|
+
if (nGroupInsuranceId.value) {
|
|
21338
|
+
var checkedIns = prodData.mulInsOrderList.find(function (ins) { return ins.key === nGroupInsuranceId.value; });
|
|
21339
|
+
if (checkedIns) {
|
|
21340
|
+
for (var ck in checkedIns) {
|
|
21341
|
+
if (!['code', 'groupKey', 'groupName', 'isFollowing', 'key', 'name', 'accountData', 'reduceBaofData'].includes(ck)) {
|
|
21342
|
+
if (ck === 'eleOrderList') {
|
|
21343
|
+
newGroupInsMap[k][ck] = newGroupInsMap[k][ck].concat(checkedIns[ck].filter(function (ele) { return ele.key !== 'title'; }));
|
|
21344
|
+
}
|
|
21345
|
+
else {
|
|
21346
|
+
newGroupInsMap[k][ck] = checkedIns[ck];
|
|
21347
|
+
}
|
|
21348
|
+
}
|
|
21349
|
+
}
|
|
21350
|
+
}
|
|
21351
|
+
}
|
|
21335
21352
|
}
|
|
21336
|
-
|
|
21337
|
-
|
|
21338
|
-
|
|
21339
|
-
|
|
21340
|
-
|
|
21341
|
-
var merge = function merge(target, source, options) {
|
|
21342
|
-
/* eslint no-param-reassign: 0 */
|
|
21343
|
-
if (!source) {
|
|
21344
|
-
return target;
|
|
21345
|
-
}
|
|
21346
|
-
|
|
21347
|
-
if (typeof source !== 'object' && typeof source !== 'function') {
|
|
21348
|
-
if (isArray(target)) {
|
|
21349
|
-
target.push(source);
|
|
21350
|
-
} else if (target && typeof target === 'object') {
|
|
21351
|
-
if (
|
|
21352
|
-
(options && (options.plainObjects || options.allowPrototypes))
|
|
21353
|
-
|| !has.call(Object.prototype, source)
|
|
21354
|
-
) {
|
|
21355
|
-
target[source] = true;
|
|
21353
|
+
var index = -1;
|
|
21354
|
+
prodData.mulInsOrderList.forEach(function (ins, i) {
|
|
21355
|
+
if (ins.groupKey === k) {
|
|
21356
|
+
index = i;
|
|
21356
21357
|
}
|
|
21357
|
-
}
|
|
21358
|
-
|
|
21358
|
+
});
|
|
21359
|
+
if (index >= 0) {
|
|
21360
|
+
prodData.mulInsOrderList.splice(index + 1, 0, newGroupInsMap[k]);
|
|
21359
21361
|
}
|
|
21360
|
-
|
|
21361
|
-
|
|
21362
|
+
};
|
|
21363
|
+
for (var k in newGroupInsMap) {
|
|
21364
|
+
_loop_2(k);
|
|
21362
21365
|
}
|
|
21363
|
-
|
|
21364
|
-
|
|
21365
|
-
|
|
21366
|
+
return prodData;
|
|
21367
|
+
}
|
|
21368
|
+
function isHideProduct(prodData, productVerifyData, personOrderList) {
|
|
21369
|
+
var ageRangeProd = {};
|
|
21370
|
+
if (prodData && productVerifyData && Object.keys(productVerifyData).length && personOrderList) {
|
|
21371
|
+
if (prodData.mulInsOrderList) {
|
|
21372
|
+
var hasRequiredIns_1 = prodData.mulInsOrderList.some(function (ins) { return !!ins.required && productVerifyData[ins.key]; });
|
|
21373
|
+
prodData.mulInsOrderList.forEach(function (ins) {
|
|
21374
|
+
var insuranceVerifyData = productVerifyData[ins.key];
|
|
21375
|
+
if (insuranceVerifyData) {
|
|
21376
|
+
if ((!ins.huomian || ins.huomian == 'beiHuomian') && (!hasRequiredIns_1 || (hasRequiredIns_1 && ins.required))) {
|
|
21377
|
+
insuranceVerifyData.forEach(function (verify) {
|
|
21378
|
+
ageRangeProd[verify.sex] = ageRangeProd[verify.sex] || [];
|
|
21379
|
+
ageRangeProd[verify.sex] = [
|
|
21380
|
+
Math.min(ageRangeProd[verify.sex][0] === undefined ? verify.minAge : ageRangeProd[verify.sex][0], verify.minAge),
|
|
21381
|
+
Math.max(ageRangeProd[verify.sex][1] === undefined ? verify.maxAge : ageRangeProd[verify.sex][1], verify.maxAge)
|
|
21382
|
+
];
|
|
21383
|
+
});
|
|
21384
|
+
}
|
|
21385
|
+
}
|
|
21386
|
+
});
|
|
21387
|
+
}
|
|
21388
|
+
var _a = personOrderList.find(function (p) { return p.key === 'insuredInfo'; }), sex = _a.sex, age = _a.age;
|
|
21389
|
+
if (ageRangeProd[sex] && age >= ageRangeProd[sex][0] && age <= ageRangeProd[sex][1]) {
|
|
21390
|
+
prodData.hide = false;
|
|
21391
|
+
}
|
|
21392
|
+
else {
|
|
21393
|
+
prodData.hadChoice = false;
|
|
21394
|
+
prodData.hide = true;
|
|
21395
|
+
prodData.totalBaof = null;
|
|
21396
|
+
}
|
|
21366
21397
|
}
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21370
|
-
|
|
21398
|
+
return ageRangeProd;
|
|
21399
|
+
}
|
|
21400
|
+
function verifyProductRules(_a) {
|
|
21401
|
+
var personData = _a.personData, productData = _a.productData, insData = _a.insData, eleData = _a.eleData;
|
|
21402
|
+
var errorMsg = '';
|
|
21403
|
+
var personOrderList = Object(_person__WEBPACK_IMPORTED_MODULE_4__[/* convertPersonData */ "a"])(personData, personData.personOrderList.map(function (p) { return p.key; }));
|
|
21404
|
+
if (productData.restrictList && productData.restrictList.length) {
|
|
21405
|
+
errorMsg = restrictInsurancesInProduct({
|
|
21406
|
+
personOrderList: personOrderList,
|
|
21407
|
+
productData: productData,
|
|
21408
|
+
insData: insData,
|
|
21409
|
+
eleData: eleData
|
|
21410
|
+
});
|
|
21371
21411
|
}
|
|
21372
|
-
|
|
21373
|
-
|
|
21374
|
-
|
|
21375
|
-
|
|
21376
|
-
|
|
21377
|
-
|
|
21378
|
-
|
|
21379
|
-
|
|
21380
|
-
|
|
21412
|
+
if (!errorMsg && productData.mulInsOrderList) {
|
|
21413
|
+
productData.mulInsOrderList.forEach(function (ins) {
|
|
21414
|
+
if (ins.eleOrderList) {
|
|
21415
|
+
ins.eleOrderList.forEach(function (ele) {
|
|
21416
|
+
errorMsg =
|
|
21417
|
+
errorMsg ||
|
|
21418
|
+
Object(_insurance__WEBPACK_IMPORTED_MODULE_5__[/* restrictElementsInInsurance */ "d"])({
|
|
21419
|
+
personOrderList: personOrderList,
|
|
21420
|
+
insData: ins,
|
|
21421
|
+
eleData: ele
|
|
21422
|
+
});
|
|
21423
|
+
});
|
|
21424
|
+
}
|
|
21425
|
+
});
|
|
21426
|
+
}
|
|
21427
|
+
return errorMsg;
|
|
21428
|
+
}
|
|
21429
|
+
function restrictInsurancesInProduct(_a) {
|
|
21430
|
+
var personOrderList = _a.personOrderList, productData = _a.productData, insData = _a.insData, eleData = _a.eleData;
|
|
21431
|
+
var errorMsg = '';
|
|
21432
|
+
var restrictList = productData.restrictList;
|
|
21433
|
+
if (restrictList && restrictList.length) {
|
|
21434
|
+
restrictList.forEach(function (restrict) {
|
|
21435
|
+
var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
|
|
21436
|
+
var productInfo = convertProductData(productData);
|
|
21437
|
+
var prodVerifyData = {
|
|
21438
|
+
age: insuredInfo.age,
|
|
21439
|
+
sex: insuredInfo.sex,
|
|
21440
|
+
common: productInfo.common
|
|
21441
|
+
};
|
|
21442
|
+
productInfo.mulInsOrderList.forEach(function (ins) {
|
|
21443
|
+
prodVerifyData['i' + ins.key] = ins;
|
|
21444
|
+
});
|
|
21445
|
+
restrict.rCondition = restrict.rCondition.replace(/(%)(\d+)(\.*\w*)(%)/g, 'prodVerifyData.i$2$3');
|
|
21446
|
+
restrict.rCondition = restrict.rCondition.replace(/(%)(\w*\.*\w*)(%)/g, 'prodVerifyData.$2');
|
|
21447
|
+
var curIns = productData.mulInsOrderList.find(function (ins) { return ins.key === restrict.rInsKey; });
|
|
21448
|
+
var curEle = curIns ? {} : null;
|
|
21449
|
+
if (curIns) {
|
|
21450
|
+
curEle = curIns.eleOrderList.find(function (e) { return e.key === restrict.rEleKey; });
|
|
21451
|
+
}
|
|
21452
|
+
if (curEle) {
|
|
21453
|
+
switch (restrict.rType) {
|
|
21454
|
+
case 1:
|
|
21455
|
+
var isDisabled = curEle.isDisabled;
|
|
21456
|
+
var value = curEle.value;
|
|
21457
|
+
if (eval(restrict.rCondition)) {
|
|
21458
|
+
isDisabled = false;
|
|
21459
|
+
if (restrict.other && restrict.other.includes('required')) {
|
|
21460
|
+
value = true;
|
|
21461
|
+
isDisabled = true;
|
|
21462
|
+
}
|
|
21463
|
+
}
|
|
21464
|
+
else {
|
|
21465
|
+
isDisabled = true;
|
|
21466
|
+
if (restrict.other && restrict.other.includes('optional')) {
|
|
21467
|
+
isDisabled = false;
|
|
21468
|
+
}
|
|
21469
|
+
if (isDisabled) {
|
|
21470
|
+
value = false;
|
|
21471
|
+
}
|
|
21472
|
+
if (insData && eleData && restrict.rCondition.search(insData.key + '.' + eleData.key) !== -1) {
|
|
21473
|
+
value = false;
|
|
21474
|
+
}
|
|
21475
|
+
}
|
|
21476
|
+
curEle.isDisabled = isDisabled;
|
|
21477
|
+
curEle.value = value;
|
|
21478
|
+
break;
|
|
21479
|
+
case 2: {
|
|
21480
|
+
var rangeSelect_1 = eval(restrict.rCondition);
|
|
21481
|
+
if (rangeSelect_1 !== undefined && rangeSelect_1 !== null) {
|
|
21482
|
+
curEle.opts.forEach(function (opt) {
|
|
21483
|
+
var optNum = Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* getNumberFromYear */ "h"])(opt.val, prodVerifyData.age);
|
|
21484
|
+
var rangeSelectNum = rangeSelect_1.constructor === Array
|
|
21485
|
+
? [
|
|
21486
|
+
rangeSelect_1[0] && Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* getNumberFromYear */ "h"])(rangeSelect_1[0], prodVerifyData.age),
|
|
21487
|
+
rangeSelect_1[1] && Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* getNumberFromYear */ "h"])(rangeSelect_1[1], prodVerifyData.age)
|
|
21488
|
+
]
|
|
21489
|
+
: Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* getNumberFromYear */ "h"])(rangeSelect_1, prodVerifyData.age);
|
|
21490
|
+
if (rangeSelect_1) {
|
|
21491
|
+
if (rangeSelect_1.constructor === Array) {
|
|
21492
|
+
opt.isHide =
|
|
21493
|
+
(rangeSelect_1[0] && optNum < rangeSelectNum[0]) || (rangeSelect_1[1] && optNum > rangeSelectNum[1]);
|
|
21494
|
+
}
|
|
21495
|
+
else {
|
|
21496
|
+
opt.isHide = optNum > rangeSelectNum;
|
|
21497
|
+
}
|
|
21498
|
+
}
|
|
21499
|
+
});
|
|
21500
|
+
if (!(curEle.isHide && !curEle.isDisabled) && curEle.opts) {
|
|
21501
|
+
var validOptions = curEle.opts.filter(function (o) { return !o.isDisabled && !o.isHide && !o.isInvalid; });
|
|
21502
|
+
var activeOption = validOptions.find(function (o) { return o.val === curEle.value; });
|
|
21503
|
+
if (!activeOption && validOptions.length) {
|
|
21504
|
+
curEle.value = validOptions[0].val;
|
|
21505
|
+
}
|
|
21506
|
+
}
|
|
21507
|
+
}
|
|
21508
|
+
break;
|
|
21509
|
+
}
|
|
21510
|
+
case 3: {
|
|
21511
|
+
if ((!insData && !eleData) ||
|
|
21512
|
+
(restrict.rInsKey === insData.key && restrict.rEleKey === eleData.key) ||
|
|
21513
|
+
restrict.rCondition.search("prodVerifyData.i".concat(insData.key, ".").concat(eleData.key)) !== -1) {
|
|
21514
|
+
var rangeVal = eval(restrict.rCondition);
|
|
21515
|
+
if (rangeVal !== undefined && rangeVal !== null) {
|
|
21516
|
+
if (rangeVal.constructor === Array) {
|
|
21517
|
+
if (rangeVal[0] && curEle.value && curEle.value < rangeVal[0]) {
|
|
21518
|
+
errorMsg =
|
|
21519
|
+
restrict.rMsg || "".concat(curIns.name, "\u7684").concat(curEle.labelName, "\u4E0D\u5F97\u5C0F\u4E8E").concat(Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* converUnit10000 */ "b"])(rangeVal[0]));
|
|
21520
|
+
}
|
|
21521
|
+
if (rangeVal[1] && curEle.value && curEle.value > rangeVal[1]) {
|
|
21522
|
+
errorMsg =
|
|
21523
|
+
restrict.rMsg || "".concat(curIns.name, "\u7684").concat(curEle.labelName, "\u4E0D\u5F97\u5927\u4E8E").concat(Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* converUnit10000 */ "b"])(rangeVal[1]));
|
|
21524
|
+
}
|
|
21525
|
+
}
|
|
21526
|
+
else if (rangeVal.constructor === String || rangeVal.constructor === Number) {
|
|
21527
|
+
if (rangeVal) {
|
|
21528
|
+
curEle.value = rangeVal;
|
|
21529
|
+
}
|
|
21530
|
+
}
|
|
21531
|
+
}
|
|
21532
|
+
}
|
|
21533
|
+
break;
|
|
21534
|
+
}
|
|
21381
21535
|
}
|
|
21382
|
-
} else {
|
|
21383
|
-
target[i] = item;
|
|
21384
21536
|
}
|
|
21385
21537
|
});
|
|
21386
|
-
return target;
|
|
21387
|
-
}
|
|
21388
|
-
|
|
21389
|
-
return Object.keys(source).reduce(function (acc, key) {
|
|
21390
|
-
var value = source[key];
|
|
21391
|
-
|
|
21392
|
-
if (has.call(acc, key)) {
|
|
21393
|
-
acc[key] = merge(acc[key], value, options);
|
|
21394
|
-
} else {
|
|
21395
|
-
acc[key] = value;
|
|
21396
|
-
}
|
|
21397
|
-
return acc;
|
|
21398
|
-
}, mergeTarget);
|
|
21399
|
-
};
|
|
21400
|
-
|
|
21401
|
-
var assign = function assignSingleSource(target, source) {
|
|
21402
|
-
return Object.keys(source).reduce(function (acc, key) {
|
|
21403
|
-
acc[key] = source[key];
|
|
21404
|
-
return acc;
|
|
21405
|
-
}, target);
|
|
21406
|
-
};
|
|
21407
|
-
|
|
21408
|
-
var decode = function (str, defaultDecoder, charset) {
|
|
21409
|
-
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
21410
|
-
if (charset === 'iso-8859-1') {
|
|
21411
|
-
// unescape never throws, no try...catch needed:
|
|
21412
|
-
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
21413
|
-
}
|
|
21414
|
-
// utf-8
|
|
21415
|
-
try {
|
|
21416
|
-
return decodeURIComponent(strWithoutPlus);
|
|
21417
|
-
} catch (e) {
|
|
21418
|
-
return strWithoutPlus;
|
|
21419
|
-
}
|
|
21420
|
-
};
|
|
21421
|
-
|
|
21422
|
-
var limit = 1024;
|
|
21423
|
-
|
|
21424
|
-
/* eslint operator-linebreak: [2, "before"] */
|
|
21425
|
-
|
|
21426
|
-
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
21427
|
-
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
21428
|
-
// It has been adapted here for stricter adherence to RFC 3986
|
|
21429
|
-
if (str.length === 0) {
|
|
21430
|
-
return str;
|
|
21431
21538
|
}
|
|
21432
|
-
|
|
21433
|
-
|
|
21434
|
-
|
|
21435
|
-
|
|
21436
|
-
|
|
21437
|
-
string = String(str);
|
|
21539
|
+
return errorMsg;
|
|
21540
|
+
}
|
|
21541
|
+
function convertProductData(prodData) {
|
|
21542
|
+
if (!prodData) {
|
|
21543
|
+
return prodData;
|
|
21438
21544
|
}
|
|
21439
|
-
|
|
21440
|
-
|
|
21441
|
-
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
21442
|
-
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
|
21443
|
-
});
|
|
21545
|
+
if (!prodData.mulInsOrderList) {
|
|
21546
|
+
return prodData;
|
|
21444
21547
|
}
|
|
21445
|
-
|
|
21446
|
-
|
|
21447
|
-
|
|
21448
|
-
|
|
21449
|
-
|
|
21450
|
-
|
|
21451
|
-
for (var i = 0; i < segment.length; ++i) {
|
|
21452
|
-
var c = segment.charCodeAt(i);
|
|
21453
|
-
if (
|
|
21454
|
-
c === 0x2D // -
|
|
21455
|
-
|| c === 0x2E // .
|
|
21456
|
-
|| c === 0x5F // _
|
|
21457
|
-
|| c === 0x7E // ~
|
|
21458
|
-
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
21459
|
-
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
21460
|
-
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
21461
|
-
|| (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
21462
|
-
) {
|
|
21463
|
-
arr[arr.length] = segment.charAt(i);
|
|
21464
|
-
continue;
|
|
21465
|
-
}
|
|
21466
|
-
|
|
21467
|
-
if (c < 0x80) {
|
|
21468
|
-
arr[arr.length] = hexTable[c];
|
|
21469
|
-
continue;
|
|
21470
|
-
}
|
|
21471
|
-
|
|
21472
|
-
if (c < 0x800) {
|
|
21473
|
-
arr[arr.length] = hexTable[0xC0 | (c >> 6)]
|
|
21474
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
21475
|
-
continue;
|
|
21476
|
-
}
|
|
21477
|
-
|
|
21478
|
-
if (c < 0xD800 || c >= 0xE000) {
|
|
21479
|
-
arr[arr.length] = hexTable[0xE0 | (c >> 12)]
|
|
21480
|
-
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
21481
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
21482
|
-
continue;
|
|
21483
|
-
}
|
|
21484
|
-
|
|
21485
|
-
i += 1;
|
|
21486
|
-
c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));
|
|
21487
|
-
|
|
21488
|
-
arr[arr.length] = hexTable[0xF0 | (c >> 18)]
|
|
21489
|
-
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
21490
|
-
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
21491
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
21548
|
+
var productData = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, prodData), { common: {}, mulInsOrderList: [] });
|
|
21549
|
+
prodData.mulInsOrderList.forEach(function (insurance) {
|
|
21550
|
+
var insuranceData = Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* convertEleOrderListToObj */ "c"])(insurance);
|
|
21551
|
+
if (insuranceData.key == 'common') {
|
|
21552
|
+
productData.common = insuranceData;
|
|
21553
|
+
return;
|
|
21492
21554
|
}
|
|
21493
|
-
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
|
|
21499
|
-
|
|
21500
|
-
|
|
21501
|
-
|
|
21502
|
-
|
|
21503
|
-
|
|
21504
|
-
|
|
21505
|
-
|
|
21506
|
-
|
|
21507
|
-
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
var key = keys[j];
|
|
21511
|
-
var val = obj[key];
|
|
21512
|
-
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
21513
|
-
queue.push({ obj: obj, prop: key });
|
|
21514
|
-
refs.push(val);
|
|
21555
|
+
if (insuranceData.title && !insuranceData.groupKey) {
|
|
21556
|
+
if (insuranceData.isGroup) {
|
|
21557
|
+
var insuranceId = insuranceData.insuranceId.constructor == Array ? insuranceData.insuranceId : [insuranceData.insuranceId];
|
|
21558
|
+
insuranceId.forEach(function (insId) {
|
|
21559
|
+
var checkedIns = prodData.mulInsOrderList.find(function (p) { return p.key === insId; });
|
|
21560
|
+
if (checkedIns) {
|
|
21561
|
+
var checkedInsData_1 = Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* convertEleOrderListToObj */ "c"])(checkedIns);
|
|
21562
|
+
insurance.eleOrderList &&
|
|
21563
|
+
insurance.eleOrderList.forEach(function (ele) {
|
|
21564
|
+
if (!['title', 'insuranceId'].includes(ele.key)) {
|
|
21565
|
+
checkedInsData_1[ele.key] = insuranceData[ele.key];
|
|
21566
|
+
}
|
|
21567
|
+
});
|
|
21568
|
+
productData.mulInsOrderList.push(Object(_common__WEBPACK_IMPORTED_MODULE_3__[/* deepCopy */ "d"])(checkedInsData_1));
|
|
21569
|
+
}
|
|
21570
|
+
});
|
|
21571
|
+
return;
|
|
21515
21572
|
}
|
|
21573
|
+
productData.mulInsOrderList.push(insuranceData);
|
|
21516
21574
|
}
|
|
21575
|
+
});
|
|
21576
|
+
return productData;
|
|
21577
|
+
}
|
|
21578
|
+
function clearAddAndTakeAndAdjustBaoeData(productData) {
|
|
21579
|
+
if (!productData) {
|
|
21580
|
+
return productData;
|
|
21517
21581
|
}
|
|
21518
|
-
|
|
21519
|
-
|
|
21520
|
-
|
|
21521
|
-
return value;
|
|
21522
|
-
};
|
|
21523
|
-
|
|
21524
|
-
var isRegExp = function isRegExp(obj) {
|
|
21525
|
-
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
21526
|
-
};
|
|
21527
|
-
|
|
21528
|
-
var isBuffer = function isBuffer(obj) {
|
|
21529
|
-
if (!obj || typeof obj !== 'object') {
|
|
21530
|
-
return false;
|
|
21582
|
+
if (!productData.mulInsOrderList) {
|
|
21583
|
+
return productData;
|
|
21531
21584
|
}
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
21535
|
-
|
|
21536
|
-
|
|
21537
|
-
|
|
21538
|
-
};
|
|
21539
|
-
|
|
21540
|
-
var maybeMap = function maybeMap(val, fn) {
|
|
21541
|
-
if (isArray(val)) {
|
|
21542
|
-
var mapped = [];
|
|
21543
|
-
for (var i = 0; i < val.length; i += 1) {
|
|
21544
|
-
mapped.push(fn(val[i]));
|
|
21585
|
+
productData.adjustBaoeData = null;
|
|
21586
|
+
productData.mulInsOrderList.forEach(function (ins) {
|
|
21587
|
+
if (ins.accountData && ins.accountData.addAndTakeData) {
|
|
21588
|
+
ins.accountData.addAndTakeData.forEach(function (aat) {
|
|
21589
|
+
aat.adjustData = [];
|
|
21590
|
+
});
|
|
21545
21591
|
}
|
|
21546
|
-
|
|
21547
|
-
|
|
21548
|
-
|
|
21549
|
-
};
|
|
21550
|
-
|
|
21551
|
-
|
|
21552
|
-
|
|
21553
|
-
|
|
21554
|
-
combine: combine,
|
|
21555
|
-
compact: compact,
|
|
21556
|
-
decode: decode,
|
|
21557
|
-
encode: encode,
|
|
21558
|
-
isBuffer: isBuffer,
|
|
21559
|
-
isRegExp: isRegExp,
|
|
21560
|
-
maybeMap: maybeMap,
|
|
21561
|
-
merge: merge
|
|
21562
|
-
};
|
|
21592
|
+
if (ins.reduceBaof && ins.reduceBaofData) {
|
|
21593
|
+
ins.reduceBaofData.addAndTakeData.forEach(function (aat) {
|
|
21594
|
+
aat.adjustData = [];
|
|
21595
|
+
});
|
|
21596
|
+
}
|
|
21597
|
+
});
|
|
21598
|
+
return productData;
|
|
21599
|
+
}
|
|
21563
21600
|
|
|
21564
21601
|
|
|
21565
21602
|
/***/ }),
|
|
@@ -21599,8 +21636,8 @@ module.exports = function(module) {
|
|
|
21599
21636
|
|
|
21600
21637
|
|
|
21601
21638
|
var getSideChannel = __webpack_require__(40);
|
|
21602
|
-
var utils = __webpack_require__(
|
|
21603
|
-
var formats = __webpack_require__(
|
|
21639
|
+
var utils = __webpack_require__(35);
|
|
21640
|
+
var formats = __webpack_require__(23);
|
|
21604
21641
|
var has = Object.prototype.hasOwnProperty;
|
|
21605
21642
|
|
|
21606
21643
|
var arrayPrefixGenerators = {
|
|
@@ -21962,9 +21999,9 @@ module.exports = function (object, opts) {
|
|
|
21962
21999
|
|
|
21963
22000
|
|
|
21964
22001
|
var $TypeError = __webpack_require__(9);
|
|
21965
|
-
var inspect = __webpack_require__(
|
|
22002
|
+
var inspect = __webpack_require__(16);
|
|
21966
22003
|
var getSideChannelList = __webpack_require__(42);
|
|
21967
|
-
var getSideChannelMap = __webpack_require__(
|
|
22004
|
+
var getSideChannelMap = __webpack_require__(27);
|
|
21968
22005
|
var getSideChannelWeakMap = __webpack_require__(67);
|
|
21969
22006
|
|
|
21970
22007
|
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
|
@@ -22017,7 +22054,7 @@ module.exports = function getSideChannel() {
|
|
|
22017
22054
|
"use strict";
|
|
22018
22055
|
|
|
22019
22056
|
|
|
22020
|
-
var inspect = __webpack_require__(
|
|
22057
|
+
var inspect = __webpack_require__(16);
|
|
22021
22058
|
|
|
22022
22059
|
var $TypeError = __webpack_require__(9);
|
|
22023
22060
|
|
|
@@ -22405,8 +22442,8 @@ module.exports = function hasSymbols() {
|
|
|
22405
22442
|
"use strict";
|
|
22406
22443
|
|
|
22407
22444
|
|
|
22408
|
-
var reflectGetProto = __webpack_require__(
|
|
22409
|
-
var originalGetProto = __webpack_require__(
|
|
22445
|
+
var reflectGetProto = __webpack_require__(30);
|
|
22446
|
+
var originalGetProto = __webpack_require__(31);
|
|
22410
22447
|
|
|
22411
22448
|
var getDunderProto = __webpack_require__(62);
|
|
22412
22449
|
|
|
@@ -22439,8 +22476,8 @@ module.exports = reflectGetProto
|
|
|
22439
22476
|
"use strict";
|
|
22440
22477
|
|
|
22441
22478
|
|
|
22442
|
-
var callBind = __webpack_require__(
|
|
22443
|
-
var gOPD = __webpack_require__(
|
|
22479
|
+
var callBind = __webpack_require__(32);
|
|
22480
|
+
var gOPD = __webpack_require__(29);
|
|
22444
22481
|
|
|
22445
22482
|
var hasProtoAccessor;
|
|
22446
22483
|
try {
|
|
@@ -22567,10 +22604,10 @@ module.exports = function bind(that) {
|
|
|
22567
22604
|
"use strict";
|
|
22568
22605
|
|
|
22569
22606
|
|
|
22570
|
-
var bind = __webpack_require__(
|
|
22607
|
+
var bind = __webpack_require__(17);
|
|
22571
22608
|
|
|
22572
|
-
var $apply = __webpack_require__(
|
|
22573
|
-
var $call = __webpack_require__(
|
|
22609
|
+
var $apply = __webpack_require__(33);
|
|
22610
|
+
var $call = __webpack_require__(22);
|
|
22574
22611
|
var $reflectApply = __webpack_require__(65);
|
|
22575
22612
|
|
|
22576
22613
|
/** @type {import('./actualApply')} */
|
|
@@ -22597,7 +22634,7 @@ module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
|
22597
22634
|
|
|
22598
22635
|
var call = Function.prototype.call;
|
|
22599
22636
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
22600
|
-
var bind = __webpack_require__(
|
|
22637
|
+
var bind = __webpack_require__(17);
|
|
22601
22638
|
|
|
22602
22639
|
/** @type {import('.')} */
|
|
22603
22640
|
module.exports = bind.call(call, $hasOwn);
|
|
@@ -22610,10 +22647,10 @@ module.exports = bind.call(call, $hasOwn);
|
|
|
22610
22647
|
"use strict";
|
|
22611
22648
|
|
|
22612
22649
|
|
|
22613
|
-
var GetIntrinsic = __webpack_require__(
|
|
22614
|
-
var callBound = __webpack_require__(
|
|
22615
|
-
var inspect = __webpack_require__(
|
|
22616
|
-
var getSideChannelMap = __webpack_require__(
|
|
22650
|
+
var GetIntrinsic = __webpack_require__(21);
|
|
22651
|
+
var callBound = __webpack_require__(34);
|
|
22652
|
+
var inspect = __webpack_require__(16);
|
|
22653
|
+
var getSideChannelMap = __webpack_require__(27);
|
|
22617
22654
|
|
|
22618
22655
|
var $TypeError = __webpack_require__(9);
|
|
22619
22656
|
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
@@ -22701,7 +22738,7 @@ module.exports = $WeakMap
|
|
|
22701
22738
|
"use strict";
|
|
22702
22739
|
|
|
22703
22740
|
|
|
22704
|
-
var utils = __webpack_require__(
|
|
22741
|
+
var utils = __webpack_require__(35);
|
|
22705
22742
|
|
|
22706
22743
|
var has = Object.prototype.hasOwnProperty;
|
|
22707
22744
|
var isArray = Array.isArray;
|
|
@@ -24040,7 +24077,7 @@ var freeGlobal = typeof global == 'object' && global && global.Object === Object
|
|
|
24040
24077
|
|
|
24041
24078
|
module.exports = freeGlobal;
|
|
24042
24079
|
|
|
24043
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
24080
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(26)))
|
|
24044
24081
|
|
|
24045
24082
|
/***/ }),
|
|
24046
24083
|
/* 145 */
|
|
@@ -26590,8 +26627,8 @@ module.exports = baseIsSet;
|
|
|
26590
26627
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
26591
26628
|
|
|
26592
26629
|
"use strict";
|
|
26593
|
-
/* harmony import */ var
|
|
26594
|
-
/* harmony import */ var
|
|
26630
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_66de96f1_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(158);
|
|
26631
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_66de96f1_prod_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_66de96f1_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
26595
26632
|
/* unused harmony reexport * */
|
|
26596
26633
|
|
|
26597
26634
|
|
|
@@ -26638,7 +26675,7 @@ module.exports = baseIsSet;
|
|
|
26638
26675
|
// ESM COMPAT FLAG
|
|
26639
26676
|
__webpack_require__.r(__webpack_exports__);
|
|
26640
26677
|
|
|
26641
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/adjust-baoe/index.vue?vue&type=template&id=
|
|
26678
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/adjust-baoe/index.vue?vue&type=template&id=66de96f1
|
|
26642
26679
|
var render = function render() {
|
|
26643
26680
|
var _vm = this,
|
|
26644
26681
|
_c = _vm._self._c,
|
|
@@ -26779,13 +26816,13 @@ var render = function render() {
|
|
|
26779
26816
|
};
|
|
26780
26817
|
var staticRenderFns = [];
|
|
26781
26818
|
|
|
26782
|
-
// CONCATENATED MODULE: ./packages/adjust-baoe/index.vue?vue&type=template&id=
|
|
26819
|
+
// CONCATENATED MODULE: ./packages/adjust-baoe/index.vue?vue&type=template&id=66de96f1
|
|
26783
26820
|
|
|
26784
26821
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
|
|
26785
26822
|
var tslib_es6 = __webpack_require__(0);
|
|
26786
26823
|
|
|
26787
26824
|
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
|
26788
|
-
var lib = __webpack_require__(
|
|
26825
|
+
var lib = __webpack_require__(15);
|
|
26789
26826
|
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
|
26790
26827
|
|
|
26791
26828
|
// EXTERNAL MODULE: ./node_modules/vue-property-decorator/lib/vue-property-decorator.js + 1 modules
|
|
@@ -26802,10 +26839,10 @@ var external_root_bxs_commonjs_bxs_ui_vue_commonjs2_bxs_ui_vue_amd_bxs_ui_vue_ =
|
|
|
26802
26839
|
var bxs_ui_vue_lib = __webpack_require__(131);
|
|
26803
26840
|
|
|
26804
26841
|
// EXTERNAL MODULE: ./packages/bxs-utils/planbook/index.ts
|
|
26805
|
-
var planbook = __webpack_require__(
|
|
26842
|
+
var planbook = __webpack_require__(20);
|
|
26806
26843
|
|
|
26807
26844
|
// EXTERNAL MODULE: ./src/js/variables.js
|
|
26808
|
-
var variables = __webpack_require__(
|
|
26845
|
+
var variables = __webpack_require__(11);
|
|
26809
26846
|
|
|
26810
26847
|
// EXTERNAL MODULE: ./packages/components/form-item/select-item.vue + 4 modules
|
|
26811
26848
|
var select_item = __webpack_require__(79);
|
|
@@ -26938,9 +26975,7 @@ var adjust_baoevue_type_script_lang_ts_AdjustBaoe = (function (_super) {
|
|
|
26938
26975
|
var _loop_1 = function (k) {
|
|
26939
26976
|
var insData = insList.find(function (ins) { return ins[ins.code ? 'code' : 'key'] == k.replace(/baoe_/, ''); });
|
|
26940
26977
|
if (insData) {
|
|
26941
|
-
adjustData[k] = /(\(|\()([^\(\(]+)(\)|\))$/.exec(insData.name)
|
|
26942
|
-
? /(\(|\()([^\(\(]+)(\)|\))$/.exec(insData.name)[2]
|
|
26943
|
-
: insData.name;
|
|
26978
|
+
adjustData[k] = /(\(|\()([^\(\(]+)(\)|\))$/.exec(insData.name) ? /(\(|\()([^\(\(]+)(\)|\))$/.exec(insData.name)[2] : insData.name;
|
|
26944
26979
|
}
|
|
26945
26980
|
};
|
|
26946
26981
|
for (var k in adjustRecord) {
|
|
@@ -26950,8 +26985,7 @@ var adjust_baoevue_type_script_lang_ts_AdjustBaoe = (function (_super) {
|
|
|
26950
26985
|
};
|
|
26951
26986
|
AdjustBaoe.prototype.isModifyValue = function (adjust, key) {
|
|
26952
26987
|
var _this = this;
|
|
26953
|
-
return
|
|
26954
|
-
this.adjustBaoeData.some(function (ad) { return ad.age === adjust.age && ad[key] !== _this.defaultAdjustRecord[key]; }));
|
|
26988
|
+
return this.adjustBaoeData && this.adjustBaoeData.some(function (ad) { return ad.age === adjust.age && ad[key] !== _this.defaultAdjustRecord[key]; });
|
|
26955
26989
|
};
|
|
26956
26990
|
AdjustBaoe.prototype.checkAdjustBaoe = function () {
|
|
26957
26991
|
var _this = this;
|
|
@@ -26963,34 +26997,17 @@ var adjust_baoevue_type_script_lang_ts_AdjustBaoe = (function (_super) {
|
|
|
26963
26997
|
if (!this.adjustBaoeData) {
|
|
26964
26998
|
return Promise.resolve();
|
|
26965
26999
|
}
|
|
26966
|
-
var deleteProdKeys = [
|
|
26967
|
-
'hadChoice',
|
|
26968
|
-
'hide',
|
|
26969
|
-
'totalBaof',
|
|
26970
|
-
'insShowArr',
|
|
26971
|
-
'autoImport',
|
|
26972
|
-
'accountData',
|
|
26973
|
-
'adjustBaoeData'
|
|
26974
|
-
];
|
|
27000
|
+
var deleteProdKeys = ['hadChoice', 'hide', 'totalBaof', 'insShowArr', 'autoImport', 'accountData', 'adjustBaoeData'];
|
|
26975
27001
|
deleteProdKeys.forEach(function (ele) {
|
|
26976
27002
|
delete cloneProductData[ele];
|
|
26977
27003
|
});
|
|
26978
27004
|
(_a = cloneProductData.mulInsOrderList) === null || _a === void 0 ? void 0 : _a.forEach(function (ins) {
|
|
26979
|
-
var deleteInsKeys = [
|
|
26980
|
-
'isFollowing',
|
|
26981
|
-
'pPeriodDesc',
|
|
26982
|
-
'baoeDesc',
|
|
26983
|
-
'baofDesc',
|
|
26984
|
-
'iDurationDesc',
|
|
26985
|
-
'isCheckbox',
|
|
26986
|
-
'groupKey',
|
|
26987
|
-
'groupName'
|
|
26988
|
-
];
|
|
27005
|
+
var deleteInsKeys = ['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'isCheckbox', 'groupKey', 'groupName'];
|
|
26989
27006
|
deleteInsKeys.forEach(function (ele) {
|
|
26990
27007
|
delete ins[ele];
|
|
26991
27008
|
});
|
|
26992
27009
|
});
|
|
26993
|
-
var url = "
|
|
27010
|
+
var url = "".concat(variables["d" /* PLANBOOK_API_HOSTNAME */], "/planBook/").concat(params.publicPbUuid ? 'public' : 'V2', "/validateAccount/-1/low");
|
|
26994
27011
|
return fetch(url, {
|
|
26995
27012
|
method: 'POST',
|
|
26996
27013
|
credentials: 'include',
|
|
@@ -27167,8 +27184,8 @@ var adjust_baoevue_type_script_lang_ts_AdjustBaoe = (function (_super) {
|
|
|
27167
27184
|
|
|
27168
27185
|
// CONCATENATED MODULE: ./packages/adjust-baoe/index.vue?vue&type=script&lang=ts
|
|
27169
27186
|
/* harmony default export */ var packages_adjust_baoevue_type_script_lang_ts = (adjust_baoevue_type_script_lang_ts);
|
|
27170
|
-
// EXTERNAL MODULE: ./packages/adjust-baoe/index.vue?vue&type=style&index=0&id=
|
|
27171
|
-
var
|
|
27187
|
+
// EXTERNAL MODULE: ./packages/adjust-baoe/index.vue?vue&type=style&index=0&id=66de96f1&prod&lang=css
|
|
27188
|
+
var adjust_baoevue_type_style_index_0_id_66de96f1_prod_lang_css = __webpack_require__(245);
|
|
27172
27189
|
|
|
27173
27190
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
27174
27191
|
var componentNormalizer = __webpack_require__(7);
|