bxs-tools-ui 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1538,8 +1538,11 @@ function productDataHandler(prodData, prodVerifyData, personData) {
1538
1538
  return [2, prodData];
1539
1539
  }
1540
1540
  productVerifyData = null;
1541
- if (!prodData.multipleInsured) return [3, 2];
1542
- return [4, multipleInsuredHandler(prodData, personData).catch(function () { })];
1541
+ if (prodData.multipleInsured) {
1542
+ multipleInsuredHandler(personData);
1543
+ }
1544
+ if (!(prodData.feeValidateMode === 'single')) return [3, 2];
1545
+ return [4, getSingleInsurancesVerifyData(prodData, personData).catch(function () { })];
1543
1546
  case 1:
1544
1547
  productVerifyData = _b.sent();
1545
1548
  return [3, 3];
@@ -1734,62 +1737,58 @@ function productDataHandler(prodData, prodVerifyData, personData) {
1734
1737
  });
1735
1738
  });
1736
1739
  }
1737
- function multipleInsuredHandler(prodData, personData) {
1740
+ function multipleInsuredHandler(personData) {
1741
+ var personOrderList = personData.personOrderList;
1742
+ if (!(personOrderList && personOrderList.length)) {
1743
+ return null;
1744
+ }
1745
+ var insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
1746
+ if (!insured2Info) {
1747
+ var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
1748
+ var insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
1749
+ if (insuredIndex >= 0) {
1750
+ var person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
1751
+ person.key = 'insured2Info';
1752
+ person.eleOrderList.forEach(function (e) {
1753
+ if (e.key === 'title') {
1754
+ e.isDisabled = false;
1755
+ e.value = true;
1756
+ e.label = '第二被保人信息';
1757
+ }
1758
+ });
1759
+ personOrderList.splice(insuredIndex + 1, 0, person);
1760
+ }
1761
+ }
1762
+ return personData;
1763
+ }
1764
+ function getSingleInsurancesVerifyData(prodData, personData) {
1738
1765
  var _a, _b;
1739
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __awaiter */ "b"])(this, void 0, void 0, function () {
1740
- var personOrderList, insured2Info, insuredInfo, insuredIndex, person, insuredList, insuranceIdList, productVerifyData;
1741
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "e"])(this, function (_c) {
1742
- switch (_c.label) {
1743
- case 0:
1744
- personOrderList = personData.personOrderList;
1745
- if (!(personOrderList && personOrderList.length)) {
1746
- return [2, null];
1747
- }
1748
- insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
1749
- if (!insured2Info) {
1750
- insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
1751
- insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
1752
- if (insuredIndex >= 0) {
1753
- person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
1754
- person.key = 'insured2Info';
1755
- person.eleOrderList.forEach(function (e) {
1756
- if (e.key === 'title') {
1757
- e.isDisabled = false;
1758
- e.value = true;
1759
- e.label = '第二被保人信息';
1760
- }
1761
- });
1762
- personOrderList.splice(insuredIndex + 1, 0, person);
1763
- }
1764
- }
1765
- insuredList = personOrderList
1766
- .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
1767
- .filter(function (p) {
1768
- var _a;
1769
- var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
1770
- return title && title.value;
1771
- })
1772
- .map(function (p) {
1773
- var _a, _b;
1774
- return {
1775
- key: p.key,
1776
- sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
1777
- age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
1778
- };
1779
- });
1780
- insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
1781
- (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
1782
- return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
1783
- }, []);
1784
- return [4, getAndCacheInsurancesVerifyData({
1785
- insuredList: insuredList,
1786
- insuranceIdList: insuranceIdList
1787
- })];
1788
- case 1:
1789
- productVerifyData = _c.sent();
1790
- return [2, productVerifyData];
1791
- }
1792
- });
1766
+ var personOrderList = personData.personOrderList;
1767
+ if (!(personOrderList && personOrderList.length)) {
1768
+ return null;
1769
+ }
1770
+ var insuredList = personOrderList
1771
+ .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
1772
+ .filter(function (p) {
1773
+ var _a;
1774
+ var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
1775
+ return title && title.value;
1776
+ })
1777
+ .map(function (p) {
1778
+ var _a, _b;
1779
+ return {
1780
+ key: p.key,
1781
+ sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
1782
+ age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
1783
+ };
1784
+ });
1785
+ var insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
1786
+ (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
1787
+ return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
1788
+ }, []);
1789
+ return getAndCacheInsurancesVerifyData({
1790
+ insuredList: insuredList,
1791
+ insuranceIdList: insuranceIdList
1793
1792
  });
1794
1793
  }
1795
1794
  var getAndCacheInsurancesVerifyData = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["memoize"])(function (params) {
@@ -19686,8 +19686,11 @@ function productDataHandler(prodData, prodVerifyData, personData) {
19686
19686
  return [2, prodData];
19687
19687
  }
19688
19688
  productVerifyData = null;
19689
- if (!prodData.multipleInsured) return [3, 2];
19690
- return [4, multipleInsuredHandler(prodData, personData).catch(function () { })];
19689
+ if (prodData.multipleInsured) {
19690
+ multipleInsuredHandler(personData);
19691
+ }
19692
+ if (!(prodData.feeValidateMode === 'single')) return [3, 2];
19693
+ return [4, getSingleInsurancesVerifyData(prodData, personData).catch(function () { })];
19691
19694
  case 1:
19692
19695
  productVerifyData = _b.sent();
19693
19696
  return [3, 3];
@@ -19882,62 +19885,58 @@ function productDataHandler(prodData, prodVerifyData, personData) {
19882
19885
  });
19883
19886
  });
19884
19887
  }
19885
- function multipleInsuredHandler(prodData, personData) {
19888
+ function multipleInsuredHandler(personData) {
19889
+ var personOrderList = personData.personOrderList;
19890
+ if (!(personOrderList && personOrderList.length)) {
19891
+ return null;
19892
+ }
19893
+ var insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
19894
+ if (!insured2Info) {
19895
+ var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
19896
+ var insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
19897
+ if (insuredIndex >= 0) {
19898
+ var person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
19899
+ person.key = 'insured2Info';
19900
+ person.eleOrderList.forEach(function (e) {
19901
+ if (e.key === 'title') {
19902
+ e.isDisabled = false;
19903
+ e.value = true;
19904
+ e.label = '第二被保人信息';
19905
+ }
19906
+ });
19907
+ personOrderList.splice(insuredIndex + 1, 0, person);
19908
+ }
19909
+ }
19910
+ return personData;
19911
+ }
19912
+ function getSingleInsurancesVerifyData(prodData, personData) {
19886
19913
  var _a, _b;
19887
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __awaiter */ "b"])(this, void 0, void 0, function () {
19888
- var personOrderList, insured2Info, insuredInfo, insuredIndex, person, insuredList, insuranceIdList, productVerifyData;
19889
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "e"])(this, function (_c) {
19890
- switch (_c.label) {
19891
- case 0:
19892
- personOrderList = personData.personOrderList;
19893
- if (!(personOrderList && personOrderList.length)) {
19894
- return [2, null];
19895
- }
19896
- insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
19897
- if (!insured2Info) {
19898
- insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
19899
- insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
19900
- if (insuredIndex >= 0) {
19901
- person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
19902
- person.key = 'insured2Info';
19903
- person.eleOrderList.forEach(function (e) {
19904
- if (e.key === 'title') {
19905
- e.isDisabled = false;
19906
- e.value = true;
19907
- e.label = '第二被保人信息';
19908
- }
19909
- });
19910
- personOrderList.splice(insuredIndex + 1, 0, person);
19911
- }
19912
- }
19913
- insuredList = personOrderList
19914
- .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
19915
- .filter(function (p) {
19916
- var _a;
19917
- var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
19918
- return title && title.value;
19919
- })
19920
- .map(function (p) {
19921
- var _a, _b;
19922
- return {
19923
- key: p.key,
19924
- sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
19925
- age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
19926
- };
19927
- });
19928
- insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
19929
- (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
19930
- return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
19931
- }, []);
19932
- return [4, getAndCacheInsurancesVerifyData({
19933
- insuredList: insuredList,
19934
- insuranceIdList: insuranceIdList
19935
- })];
19936
- case 1:
19937
- productVerifyData = _c.sent();
19938
- return [2, productVerifyData];
19939
- }
19940
- });
19914
+ var personOrderList = personData.personOrderList;
19915
+ if (!(personOrderList && personOrderList.length)) {
19916
+ return null;
19917
+ }
19918
+ var insuredList = personOrderList
19919
+ .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
19920
+ .filter(function (p) {
19921
+ var _a;
19922
+ var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
19923
+ return title && title.value;
19924
+ })
19925
+ .map(function (p) {
19926
+ var _a, _b;
19927
+ return {
19928
+ key: p.key,
19929
+ sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
19930
+ age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
19931
+ };
19932
+ });
19933
+ var insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
19934
+ (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
19935
+ return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
19936
+ }, []);
19937
+ return getAndCacheInsurancesVerifyData({
19938
+ insuredList: insuredList,
19939
+ insuranceIdList: insuranceIdList
19941
19940
  });
19942
19941
  }
19943
19942
  var getAndCacheInsurancesVerifyData = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["memoize"])(function (params) {
@@ -19949,8 +19949,11 @@ function productDataHandler(prodData, prodVerifyData, personData) {
19949
19949
  return [2, prodData];
19950
19950
  }
19951
19951
  productVerifyData = null;
19952
- if (!prodData.multipleInsured) return [3, 2];
19953
- return [4, multipleInsuredHandler(prodData, personData).catch(function () { })];
19952
+ if (prodData.multipleInsured) {
19953
+ multipleInsuredHandler(personData);
19954
+ }
19955
+ if (!(prodData.feeValidateMode === 'single')) return [3, 2];
19956
+ return [4, getSingleInsurancesVerifyData(prodData, personData).catch(function () { })];
19954
19957
  case 1:
19955
19958
  productVerifyData = _b.sent();
19956
19959
  return [3, 3];
@@ -20145,62 +20148,58 @@ function productDataHandler(prodData, prodVerifyData, personData) {
20145
20148
  });
20146
20149
  });
20147
20150
  }
20148
- function multipleInsuredHandler(prodData, personData) {
20151
+ function multipleInsuredHandler(personData) {
20152
+ var personOrderList = personData.personOrderList;
20153
+ if (!(personOrderList && personOrderList.length)) {
20154
+ return null;
20155
+ }
20156
+ var insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
20157
+ if (!insured2Info) {
20158
+ var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
20159
+ var insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
20160
+ if (insuredIndex >= 0) {
20161
+ var person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
20162
+ person.key = 'insured2Info';
20163
+ person.eleOrderList.forEach(function (e) {
20164
+ if (e.key === 'title') {
20165
+ e.isDisabled = false;
20166
+ e.value = true;
20167
+ e.label = '第二被保人信息';
20168
+ }
20169
+ });
20170
+ personOrderList.splice(insuredIndex + 1, 0, person);
20171
+ }
20172
+ }
20173
+ return personData;
20174
+ }
20175
+ function getSingleInsurancesVerifyData(prodData, personData) {
20149
20176
  var _a, _b;
20150
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __awaiter */ "b"])(this, void 0, void 0, function () {
20151
- var personOrderList, insured2Info, insuredInfo, insuredIndex, person, insuredList, insuranceIdList, productVerifyData;
20152
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "e"])(this, function (_c) {
20153
- switch (_c.label) {
20154
- case 0:
20155
- personOrderList = personData.personOrderList;
20156
- if (!(personOrderList && personOrderList.length)) {
20157
- return [2, null];
20158
- }
20159
- insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
20160
- if (!insured2Info) {
20161
- insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
20162
- insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
20163
- if (insuredIndex >= 0) {
20164
- person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
20165
- person.key = 'insured2Info';
20166
- person.eleOrderList.forEach(function (e) {
20167
- if (e.key === 'title') {
20168
- e.isDisabled = false;
20169
- e.value = true;
20170
- e.label = '第二被保人信息';
20171
- }
20172
- });
20173
- personOrderList.splice(insuredIndex + 1, 0, person);
20174
- }
20175
- }
20176
- insuredList = personOrderList
20177
- .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
20178
- .filter(function (p) {
20179
- var _a;
20180
- var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
20181
- return title && title.value;
20182
- })
20183
- .map(function (p) {
20184
- var _a, _b;
20185
- return {
20186
- key: p.key,
20187
- sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
20188
- age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
20189
- };
20190
- });
20191
- insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
20192
- (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
20193
- return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
20194
- }, []);
20195
- return [4, getAndCacheInsurancesVerifyData({
20196
- insuredList: insuredList,
20197
- insuranceIdList: insuranceIdList
20198
- })];
20199
- case 1:
20200
- productVerifyData = _c.sent();
20201
- return [2, productVerifyData];
20202
- }
20203
- });
20177
+ var personOrderList = personData.personOrderList;
20178
+ if (!(personOrderList && personOrderList.length)) {
20179
+ return null;
20180
+ }
20181
+ var insuredList = personOrderList
20182
+ .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
20183
+ .filter(function (p) {
20184
+ var _a;
20185
+ var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
20186
+ return title && title.value;
20187
+ })
20188
+ .map(function (p) {
20189
+ var _a, _b;
20190
+ return {
20191
+ key: p.key,
20192
+ sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
20193
+ age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
20194
+ };
20195
+ });
20196
+ var insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
20197
+ (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
20198
+ return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
20199
+ }, []);
20200
+ return getAndCacheInsurancesVerifyData({
20201
+ insuredList: insuredList,
20202
+ insuranceIdList: insuranceIdList
20204
20203
  });
20205
20204
  }
20206
20205
  var getAndCacheInsurancesVerifyData = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["memoize"])(function (params) {
package/lib/index.js CHANGED
@@ -23011,8 +23011,11 @@ function productDataHandler(prodData, prodVerifyData, personData) {
23011
23011
  return [2, prodData];
23012
23012
  }
23013
23013
  productVerifyData = null;
23014
- if (!prodData.multipleInsured) return [3, 2];
23015
- return [4, multipleInsuredHandler(prodData, personData).catch(function () { })];
23014
+ if (prodData.multipleInsured) {
23015
+ multipleInsuredHandler(personData);
23016
+ }
23017
+ if (!(prodData.feeValidateMode === 'single')) return [3, 2];
23018
+ return [4, getSingleInsurancesVerifyData(prodData, personData).catch(function () { })];
23016
23019
  case 1:
23017
23020
  productVerifyData = _b.sent();
23018
23021
  return [3, 3];
@@ -23207,62 +23210,58 @@ function productDataHandler(prodData, prodVerifyData, personData) {
23207
23210
  });
23208
23211
  });
23209
23212
  }
23210
- function multipleInsuredHandler(prodData, personData) {
23213
+ function multipleInsuredHandler(personData) {
23214
+ var personOrderList = personData.personOrderList;
23215
+ if (!(personOrderList && personOrderList.length)) {
23216
+ return null;
23217
+ }
23218
+ var insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
23219
+ if (!insured2Info) {
23220
+ var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
23221
+ var insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
23222
+ if (insuredIndex >= 0) {
23223
+ var person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
23224
+ person.key = 'insured2Info';
23225
+ person.eleOrderList.forEach(function (e) {
23226
+ if (e.key === 'title') {
23227
+ e.isDisabled = false;
23228
+ e.value = true;
23229
+ e.label = '第二被保人信息';
23230
+ }
23231
+ });
23232
+ personOrderList.splice(insuredIndex + 1, 0, person);
23233
+ }
23234
+ }
23235
+ return personData;
23236
+ }
23237
+ function getSingleInsurancesVerifyData(prodData, personData) {
23211
23238
  var _a, _b;
23212
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __awaiter */ "b"])(this, void 0, void 0, function () {
23213
- var personOrderList, insured2Info, insuredInfo, insuredIndex, person, insuredList, insuranceIdList, productVerifyData;
23214
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "e"])(this, function (_c) {
23215
- switch (_c.label) {
23216
- case 0:
23217
- personOrderList = personData.personOrderList;
23218
- if (!(personOrderList && personOrderList.length)) {
23219
- return [2, null];
23220
- }
23221
- insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
23222
- if (!insured2Info) {
23223
- insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
23224
- insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
23225
- if (insuredIndex >= 0) {
23226
- person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
23227
- person.key = 'insured2Info';
23228
- person.eleOrderList.forEach(function (e) {
23229
- if (e.key === 'title') {
23230
- e.isDisabled = false;
23231
- e.value = true;
23232
- e.label = '第二被保人信息';
23233
- }
23234
- });
23235
- personOrderList.splice(insuredIndex + 1, 0, person);
23236
- }
23237
- }
23238
- insuredList = personOrderList
23239
- .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
23240
- .filter(function (p) {
23241
- var _a;
23242
- var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
23243
- return title && title.value;
23244
- })
23245
- .map(function (p) {
23246
- var _a, _b;
23247
- return {
23248
- key: p.key,
23249
- sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
23250
- age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
23251
- };
23252
- });
23253
- insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
23254
- (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
23255
- return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
23256
- }, []);
23257
- return [4, getAndCacheInsurancesVerifyData({
23258
- insuredList: insuredList,
23259
- insuranceIdList: insuranceIdList
23260
- })];
23261
- case 1:
23262
- productVerifyData = _c.sent();
23263
- return [2, productVerifyData];
23264
- }
23265
- });
23239
+ var personOrderList = personData.personOrderList;
23240
+ if (!(personOrderList && personOrderList.length)) {
23241
+ return null;
23242
+ }
23243
+ var insuredList = personOrderList
23244
+ .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
23245
+ .filter(function (p) {
23246
+ var _a;
23247
+ var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
23248
+ return title && title.value;
23249
+ })
23250
+ .map(function (p) {
23251
+ var _a, _b;
23252
+ return {
23253
+ key: p.key,
23254
+ sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
23255
+ age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
23256
+ };
23257
+ });
23258
+ var insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
23259
+ (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
23260
+ return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
23261
+ }, []);
23262
+ return getAndCacheInsurancesVerifyData({
23263
+ insuredList: insuredList,
23264
+ insuranceIdList: insuranceIdList
23266
23265
  });
23267
23266
  }
23268
23267
  var getAndCacheInsurancesVerifyData = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["memoize"])(function (params) {
@@ -20679,8 +20679,11 @@ function productDataHandler(prodData, prodVerifyData, personData) {
20679
20679
  return [2, prodData];
20680
20680
  }
20681
20681
  productVerifyData = null;
20682
- if (!prodData.multipleInsured) return [3, 2];
20683
- return [4, multipleInsuredHandler(prodData, personData).catch(function () { })];
20682
+ if (prodData.multipleInsured) {
20683
+ multipleInsuredHandler(personData);
20684
+ }
20685
+ if (!(prodData.feeValidateMode === 'single')) return [3, 2];
20686
+ return [4, getSingleInsurancesVerifyData(prodData, personData).catch(function () { })];
20684
20687
  case 1:
20685
20688
  productVerifyData = _b.sent();
20686
20689
  return [3, 3];
@@ -20875,62 +20878,58 @@ function productDataHandler(prodData, prodVerifyData, personData) {
20875
20878
  });
20876
20879
  });
20877
20880
  }
20878
- function multipleInsuredHandler(prodData, personData) {
20881
+ function multipleInsuredHandler(personData) {
20882
+ var personOrderList = personData.personOrderList;
20883
+ if (!(personOrderList && personOrderList.length)) {
20884
+ return null;
20885
+ }
20886
+ var insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
20887
+ if (!insured2Info) {
20888
+ var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
20889
+ var insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
20890
+ if (insuredIndex >= 0) {
20891
+ var person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
20892
+ person.key = 'insured2Info';
20893
+ person.eleOrderList.forEach(function (e) {
20894
+ if (e.key === 'title') {
20895
+ e.isDisabled = false;
20896
+ e.value = true;
20897
+ e.label = '第二被保人信息';
20898
+ }
20899
+ });
20900
+ personOrderList.splice(insuredIndex + 1, 0, person);
20901
+ }
20902
+ }
20903
+ return personData;
20904
+ }
20905
+ function getSingleInsurancesVerifyData(prodData, personData) {
20879
20906
  var _a, _b;
20880
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __awaiter */ "b"])(this, void 0, void 0, function () {
20881
- var personOrderList, insured2Info, insuredInfo, insuredIndex, person, insuredList, insuranceIdList, productVerifyData;
20882
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "e"])(this, function (_c) {
20883
- switch (_c.label) {
20884
- case 0:
20885
- personOrderList = personData.personOrderList;
20886
- if (!(personOrderList && personOrderList.length)) {
20887
- return [2, null];
20888
- }
20889
- insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
20890
- if (!insured2Info) {
20891
- insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
20892
- insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
20893
- if (insuredIndex >= 0) {
20894
- person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
20895
- person.key = 'insured2Info';
20896
- person.eleOrderList.forEach(function (e) {
20897
- if (e.key === 'title') {
20898
- e.isDisabled = false;
20899
- e.value = true;
20900
- e.label = '第二被保人信息';
20901
- }
20902
- });
20903
- personOrderList.splice(insuredIndex + 1, 0, person);
20904
- }
20905
- }
20906
- insuredList = personOrderList
20907
- .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
20908
- .filter(function (p) {
20909
- var _a;
20910
- var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
20911
- return title && title.value;
20912
- })
20913
- .map(function (p) {
20914
- var _a, _b;
20915
- return {
20916
- key: p.key,
20917
- sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
20918
- age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
20919
- };
20920
- });
20921
- insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
20922
- (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
20923
- return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
20924
- }, []);
20925
- return [4, getAndCacheInsurancesVerifyData({
20926
- insuredList: insuredList,
20927
- insuranceIdList: insuranceIdList
20928
- })];
20929
- case 1:
20930
- productVerifyData = _c.sent();
20931
- return [2, productVerifyData];
20932
- }
20933
- });
20907
+ var personOrderList = personData.personOrderList;
20908
+ if (!(personOrderList && personOrderList.length)) {
20909
+ return null;
20910
+ }
20911
+ var insuredList = personOrderList
20912
+ .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
20913
+ .filter(function (p) {
20914
+ var _a;
20915
+ var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
20916
+ return title && title.value;
20917
+ })
20918
+ .map(function (p) {
20919
+ var _a, _b;
20920
+ return {
20921
+ key: p.key,
20922
+ sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
20923
+ age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
20924
+ };
20925
+ });
20926
+ var insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
20927
+ (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
20928
+ return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
20929
+ }, []);
20930
+ return getAndCacheInsurancesVerifyData({
20931
+ insuredList: insuredList,
20932
+ insuranceIdList: insuranceIdList
20934
20933
  });
20935
20934
  }
20936
20935
  var getAndCacheInsurancesVerifyData = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["memoize"])(function (params) {
@@ -20679,8 +20679,11 @@ function productDataHandler(prodData, prodVerifyData, personData) {
20679
20679
  return [2, prodData];
20680
20680
  }
20681
20681
  productVerifyData = null;
20682
- if (!prodData.multipleInsured) return [3, 2];
20683
- return [4, multipleInsuredHandler(prodData, personData).catch(function () { })];
20682
+ if (prodData.multipleInsured) {
20683
+ multipleInsuredHandler(personData);
20684
+ }
20685
+ if (!(prodData.feeValidateMode === 'single')) return [3, 2];
20686
+ return [4, getSingleInsurancesVerifyData(prodData, personData).catch(function () { })];
20684
20687
  case 1:
20685
20688
  productVerifyData = _b.sent();
20686
20689
  return [3, 3];
@@ -20875,62 +20878,58 @@ function productDataHandler(prodData, prodVerifyData, personData) {
20875
20878
  });
20876
20879
  });
20877
20880
  }
20878
- function multipleInsuredHandler(prodData, personData) {
20881
+ function multipleInsuredHandler(personData) {
20882
+ var personOrderList = personData.personOrderList;
20883
+ if (!(personOrderList && personOrderList.length)) {
20884
+ return null;
20885
+ }
20886
+ var insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
20887
+ if (!insured2Info) {
20888
+ var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
20889
+ var insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
20890
+ if (insuredIndex >= 0) {
20891
+ var person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
20892
+ person.key = 'insured2Info';
20893
+ person.eleOrderList.forEach(function (e) {
20894
+ if (e.key === 'title') {
20895
+ e.isDisabled = false;
20896
+ e.value = true;
20897
+ e.label = '第二被保人信息';
20898
+ }
20899
+ });
20900
+ personOrderList.splice(insuredIndex + 1, 0, person);
20901
+ }
20902
+ }
20903
+ return personData;
20904
+ }
20905
+ function getSingleInsurancesVerifyData(prodData, personData) {
20879
20906
  var _a, _b;
20880
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __awaiter */ "b"])(this, void 0, void 0, function () {
20881
- var personOrderList, insured2Info, insuredInfo, insuredIndex, person, insuredList, insuranceIdList, productVerifyData;
20882
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "e"])(this, function (_c) {
20883
- switch (_c.label) {
20884
- case 0:
20885
- personOrderList = personData.personOrderList;
20886
- if (!(personOrderList && personOrderList.length)) {
20887
- return [2, null];
20888
- }
20889
- insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
20890
- if (!insured2Info) {
20891
- insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
20892
- insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
20893
- if (insuredIndex >= 0) {
20894
- person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
20895
- person.key = 'insured2Info';
20896
- person.eleOrderList.forEach(function (e) {
20897
- if (e.key === 'title') {
20898
- e.isDisabled = false;
20899
- e.value = true;
20900
- e.label = '第二被保人信息';
20901
- }
20902
- });
20903
- personOrderList.splice(insuredIndex + 1, 0, person);
20904
- }
20905
- }
20906
- insuredList = personOrderList
20907
- .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
20908
- .filter(function (p) {
20909
- var _a;
20910
- var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
20911
- return title && title.value;
20912
- })
20913
- .map(function (p) {
20914
- var _a, _b;
20915
- return {
20916
- key: p.key,
20917
- sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
20918
- age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
20919
- };
20920
- });
20921
- insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
20922
- (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
20923
- return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
20924
- }, []);
20925
- return [4, getAndCacheInsurancesVerifyData({
20926
- insuredList: insuredList,
20927
- insuranceIdList: insuranceIdList
20928
- })];
20929
- case 1:
20930
- productVerifyData = _c.sent();
20931
- return [2, productVerifyData];
20932
- }
20933
- });
20907
+ var personOrderList = personData.personOrderList;
20908
+ if (!(personOrderList && personOrderList.length)) {
20909
+ return null;
20910
+ }
20911
+ var insuredList = personOrderList
20912
+ .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
20913
+ .filter(function (p) {
20914
+ var _a;
20915
+ var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
20916
+ return title && title.value;
20917
+ })
20918
+ .map(function (p) {
20919
+ var _a, _b;
20920
+ return {
20921
+ key: p.key,
20922
+ sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
20923
+ age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
20924
+ };
20925
+ });
20926
+ var insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
20927
+ (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
20928
+ return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
20929
+ }, []);
20930
+ return getAndCacheInsurancesVerifyData({
20931
+ insuredList: insuredList,
20932
+ insuranceIdList: insuranceIdList
20934
20933
  });
20935
20934
  }
20936
20935
  var getAndCacheInsurancesVerifyData = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["memoize"])(function (params) {
@@ -21436,8 +21436,11 @@ function productDataHandler(prodData, prodVerifyData, personData) {
21436
21436
  return [2, prodData];
21437
21437
  }
21438
21438
  productVerifyData = null;
21439
- if (!prodData.multipleInsured) return [3, 2];
21440
- return [4, multipleInsuredHandler(prodData, personData).catch(function () { })];
21439
+ if (prodData.multipleInsured) {
21440
+ multipleInsuredHandler(personData);
21441
+ }
21442
+ if (!(prodData.feeValidateMode === 'single')) return [3, 2];
21443
+ return [4, getSingleInsurancesVerifyData(prodData, personData).catch(function () { })];
21441
21444
  case 1:
21442
21445
  productVerifyData = _b.sent();
21443
21446
  return [3, 3];
@@ -21632,62 +21635,58 @@ function productDataHandler(prodData, prodVerifyData, personData) {
21632
21635
  });
21633
21636
  });
21634
21637
  }
21635
- function multipleInsuredHandler(prodData, personData) {
21638
+ function multipleInsuredHandler(personData) {
21639
+ var personOrderList = personData.personOrderList;
21640
+ if (!(personOrderList && personOrderList.length)) {
21641
+ return null;
21642
+ }
21643
+ var insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
21644
+ if (!insured2Info) {
21645
+ var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
21646
+ var insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
21647
+ if (insuredIndex >= 0) {
21648
+ var person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
21649
+ person.key = 'insured2Info';
21650
+ person.eleOrderList.forEach(function (e) {
21651
+ if (e.key === 'title') {
21652
+ e.isDisabled = false;
21653
+ e.value = true;
21654
+ e.label = '第二被保人信息';
21655
+ }
21656
+ });
21657
+ personOrderList.splice(insuredIndex + 1, 0, person);
21658
+ }
21659
+ }
21660
+ return personData;
21661
+ }
21662
+ function getSingleInsurancesVerifyData(prodData, personData) {
21636
21663
  var _a, _b;
21637
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __awaiter */ "b"])(this, void 0, void 0, function () {
21638
- var personOrderList, insured2Info, insuredInfo, insuredIndex, person, insuredList, insuranceIdList, productVerifyData;
21639
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "e"])(this, function (_c) {
21640
- switch (_c.label) {
21641
- case 0:
21642
- personOrderList = personData.personOrderList;
21643
- if (!(personOrderList && personOrderList.length)) {
21644
- return [2, null];
21645
- }
21646
- insured2Info = personOrderList.find(function (p) { return p.key === 'insured2Info'; });
21647
- if (!insured2Info) {
21648
- insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
21649
- insuredIndex = personOrderList.findIndex(function (p) { return p.key === 'insuredInfo'; });
21650
- if (insuredIndex >= 0) {
21651
- person = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["cloneDeep"])(insuredInfo);
21652
- person.key = 'insured2Info';
21653
- person.eleOrderList.forEach(function (e) {
21654
- if (e.key === 'title') {
21655
- e.isDisabled = false;
21656
- e.value = true;
21657
- e.label = '第二被保人信息';
21658
- }
21659
- });
21660
- personOrderList.splice(insuredIndex + 1, 0, person);
21661
- }
21662
- }
21663
- insuredList = personOrderList
21664
- .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
21665
- .filter(function (p) {
21666
- var _a;
21667
- var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
21668
- return title && title.value;
21669
- })
21670
- .map(function (p) {
21671
- var _a, _b;
21672
- return {
21673
- key: p.key,
21674
- sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
21675
- age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
21676
- };
21677
- });
21678
- insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
21679
- (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
21680
- return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
21681
- }, []);
21682
- return [4, getAndCacheInsurancesVerifyData({
21683
- insuredList: insuredList,
21684
- insuranceIdList: insuranceIdList
21685
- })];
21686
- case 1:
21687
- productVerifyData = _c.sent();
21688
- return [2, productVerifyData];
21689
- }
21690
- });
21664
+ var personOrderList = personData.personOrderList;
21665
+ if (!(personOrderList && personOrderList.length)) {
21666
+ return null;
21667
+ }
21668
+ var insuredList = personOrderList
21669
+ .filter(function (p) { return ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList; })
21670
+ .filter(function (p) {
21671
+ var _a;
21672
+ var title = (_a = p.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
21673
+ return title && title.value;
21674
+ })
21675
+ .map(function (p) {
21676
+ var _a, _b;
21677
+ return {
21678
+ key: p.key,
21679
+ sex: (_a = (p.eleOrderList || []).find(function (e) { return e.key === 'sex'; })) === null || _a === void 0 ? void 0 : _a.value,
21680
+ age: (_b = (p.eleOrderList || []).find(function (e) { return e.key === 'age'; })) === null || _b === void 0 ? void 0 : _b.value
21681
+ };
21682
+ });
21683
+ var insuranceIdList = (_a = convertProductData(prodData).mulInsOrderList) === null || _a === void 0 ? void 0 : _a.map(function (ins) { return ins.key; });
21684
+ (_b = prodData === null || prodData === void 0 ? void 0 : prodData.mulInsOrderList) === null || _b === void 0 ? void 0 : _b.reduce(function (list, ins) {
21685
+ return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
21686
+ }, []);
21687
+ return getAndCacheInsurancesVerifyData({
21688
+ insuredList: insuredList,
21689
+ insuranceIdList: insuranceIdList
21691
21690
  });
21692
21691
  }
21693
21692
  var getAndCacheInsurancesVerifyData = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["memoize"])(function (params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bxs-tools-ui",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "微易前端业务组件",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -57,7 +57,10 @@ export async function productDataHandler(prodData : IPbProduct, prodVerifyData :
57
57
  }
58
58
  let productVerifyData : any = null
59
59
  if (prodData.multipleInsured) {
60
- productVerifyData = await multipleInsuredHandler(prodData, personData).catch(() => {})
60
+ multipleInsuredHandler(personData)
61
+ }
62
+ if (prodData.feeValidateMode === 'single') {
63
+ productVerifyData = await getSingleInsurancesVerifyData(prodData, personData).catch(() => {})
61
64
  } else {
62
65
  productVerifyData = prodVerifyData
63
66
  }
@@ -272,16 +275,13 @@ export async function productDataHandler(prodData : IPbProduct, prodVerifyData :
272
275
  }
273
276
 
274
277
  /**
275
- * **处理多被保人,返回产品费率**
276
- * - 是否新增第二被保人信息
277
- * - 请求多被保人产品的费率
278
+ * **处理多被保人**
278
279
  * @author Lizhao <lz@winbaoxian.com>
279
- * @date 2023-12-28
280
- * @param {IPbProduct} prodData 必传。产品数据(单个)
280
+ * @date 2024-02-28
281
281
  * @param {IPbPersons} personData 必传。人员信息,包括被保人、投保人、投保人配偶
282
- * @returns 产品费率
282
+ * @returns 人员信息
283
283
  */
284
- async function multipleInsuredHandler (prodData : IPbProduct, personData : IPbPersons) {
284
+ function multipleInsuredHandler (personData : IPbPersons) {
285
285
  const personOrderList : IPbPerson [] = personData.personOrderList
286
286
  if (!(personOrderList && personOrderList.length)) {
287
287
  return null
@@ -303,6 +303,22 @@ async function multipleInsuredHandler (prodData : IPbProduct, personData : IPbPe
303
303
  personOrderList.splice(insuredIndex + 1, 0, person)
304
304
  }
305
305
  }
306
+ return personData
307
+ }
308
+
309
+ /**
310
+ * 请求返回当前产品、当前条件的费率数据
311
+ * @author Lizhao <lz@winbaoxian.com>
312
+ * @date 2024-02-28
313
+ * @param {IPbProduct} prodData 必传。产品数据(单个)
314
+ * @param {IPbPersons} personData 必传。人员信息,包括被保人、投保人、投保人配偶
315
+ * @returns 请求函数的 Promise
316
+ */
317
+ function getSingleInsurancesVerifyData (prodData : IPbProduct, personData : IPbPersons) {
318
+ const personOrderList : IPbPerson [] = personData.personOrderList
319
+ if (!(personOrderList && personOrderList.length)) {
320
+ return null
321
+ }
306
322
 
307
323
  const insuredList = personOrderList
308
324
  .filter((p : IPbPerson) => ['insuredInfo', 'insured2Info'].includes(p.key) && p.eleOrderList )
@@ -321,11 +337,10 @@ async function multipleInsuredHandler (prodData : IPbProduct, personData : IPbPe
321
337
  prodData?.mulInsOrderList?.reduce((list : any, ins : IProdInsurance) => {
322
338
  return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key)
323
339
  }, []);
324
- const productVerifyData = await getAndCacheInsurancesVerifyData({
340
+ return getAndCacheInsurancesVerifyData({
325
341
  insuredList,
326
342
  insuranceIdList
327
343
  })
328
- return productVerifyData
329
344
  }
330
345
 
331
346
  /**
package/src/.DS_Store ADDED
Binary file