bxs-tools-ui 1.1.0-2 → 1.1.0-3

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.
@@ -1180,7 +1180,7 @@ function initInsuranceData(insData) {
1180
1180
  }
1181
1181
  if (e.optConf && e.optConf.length) {
1182
1182
  var options = [];
1183
- for (var i = e.optConf[0]; i < e.optConf[1]; i += (e.optConf[2] && e.optConf[2] && e.optConf[2].step) || 1) {
1183
+ for (var i = e.optConf[0]; i <= e.optConf[1]; i += (e.optConf[2] && e.optConf[2] && e.optConf[2].step) || 1) {
1184
1184
  options.push({
1185
1185
  val: e.optConf[2] && e.optConf[2].valfix ? "" + i + e.optConf[2].valfix : i,
1186
1186
  desc: e.optConf[2] && e.optConf[2].desc ? e.optConf[2].desc.replace(/{{&&}}/, i) : i
@@ -1354,8 +1354,8 @@ function restrictElementsInInsurance(_a) {
1354
1354
  var valRange_1 = eleRestricts && eleRestricts[0] && eleRestricts[0][eleData.key];
1355
1355
  if (valRange_1 && valRange_1.length) {
1356
1356
  if (eleData.opts) {
1357
- eleData.opts.filter(function (o) {
1358
- if (valRange_1.indexOf(o.val) === -1) {
1357
+ eleData.opts.forEach(function (o) {
1358
+ if (!valRange_1.find(function (v) { return v.val === o.val; })) {
1359
1359
  o.isInvalid = true;
1360
1360
  }
1361
1361
  });
@@ -1481,6 +1481,15 @@ function initPersonData(inputData, verifyData) {
1481
1481
  { val: 1, desc: '男' },
1482
1482
  { val: 2, desc: '女' }
1483
1483
  ];
1484
+ if (e.opts && e.opts.length) {
1485
+ e.options = e.opts.map(function (o) { return ({
1486
+ val: o.val,
1487
+ desc: o.desc
1488
+ }); });
1489
+ }
1490
+ if (!e.options.find(function (o) { return o.val === e.value; })) {
1491
+ e.value = e.options[0].val;
1492
+ }
1484
1493
  e.isDisabled = person.key === 'spouseInfo';
1485
1494
  break;
1486
1495
  }
@@ -1798,48 +1807,50 @@ function normalizeComponent (
1798
1807
 
1799
1808
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "h", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["e"]; });
1800
1809
 
1801
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "i", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["f"]; });
1810
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "j", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["f"]; });
1802
1811
 
1803
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "k", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["g"]; });
1812
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "l", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["g"]; });
1804
1813
 
1805
1814
  /* harmony import */ var _person__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1806
1815
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "e", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["a"]; });
1807
1816
 
1808
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "j", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["b"]; });
1817
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "k", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["b"]; });
1809
1818
 
1810
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "n", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["c"]; });
1819
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "o", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["c"]; });
1811
1820
 
1812
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "r", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["d"]; });
1821
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "s", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["d"]; });
1813
1822
 
1814
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "x", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["e"]; });
1823
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "y", function() { return _person__WEBPACK_IMPORTED_MODULE_1__["e"]; });
1815
1824
 
1816
1825
  /* harmony import */ var _product__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
1817
1826
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["a"]; });
1818
1827
 
1819
1828
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["b"]; });
1820
1829
 
1821
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "o", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["c"]; });
1830
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "i", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["c"]; });
1822
1831
 
1823
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "q", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["d"]; });
1832
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "p", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["d"]; });
1824
1833
 
1825
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "s", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["e"]; });
1834
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "r", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["e"]; });
1826
1835
 
1827
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "u", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["f"]; });
1836
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "t", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["f"]; });
1828
1837
 
1829
1838
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "v", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["g"]; });
1830
1839
 
1831
1840
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "w", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["h"]; });
1832
1841
 
1833
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "y", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["i"]; });
1842
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "x", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["i"]; });
1843
+
1844
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "z", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["j"]; });
1834
1845
 
1835
1846
  /* harmony import */ var _insurance__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
1836
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "l", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["a"]; });
1847
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "m", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["a"]; });
1837
1848
 
1838
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "m", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["b"]; });
1849
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "n", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["b"]; });
1839
1850
 
1840
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "p", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["c"]; });
1851
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "q", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["c"]; });
1841
1852
 
1842
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "t", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["d"]; });
1853
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "u", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["d"]; });
1843
1854
 
1844
1855
 
1845
1856
 
@@ -1856,13 +1867,14 @@ if (document && document.cookie && document.cookie.match('LIZHAO_DEBUG_CONSOLE_F
1856
1867
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1857
1868
 
1858
1869
  "use strict";
1859
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return initProductData; });
1860
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return productDataHandler; });
1861
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return setCommonInfo; });
1862
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setGroupInsurance; });
1863
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isHideProduct; });
1864
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return verifyProductRules; });
1865
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return restrictInsurancesInProduct; });
1870
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initProductData; });
1871
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return productDataHandler; });
1872
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getElementVerifyFromProductVerify; });
1873
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setCommonInfo; });
1874
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return setGroupInsurance; });
1875
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isHideProduct; });
1876
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return verifyProductRules; });
1877
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return restrictInsurancesInProduct; });
1866
1878
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return convertProductData; });
1867
1879
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return clearAddAndTakeAndAdjustBaoeData; });
1868
1880
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
@@ -1889,17 +1901,16 @@ function initProductData(prodData) {
1889
1901
  return prodData;
1890
1902
  }
1891
1903
  function productDataHandler(prodData, productVerifyData, personData) {
1904
+ var _a;
1905
+ var hasProduct = prodData && prodData.mulInsOrderList;
1906
+ var hasVerifyData = productVerifyData && Object.keys(productVerifyData).length;
1907
+ var hasPersonData = personData && personData.personOrderList;
1892
1908
  var personOrderList = null;
1893
- if (prodData &&
1894
- prodData.mulInsOrderList &&
1895
- productVerifyData &&
1896
- Object.keys(productVerifyData).length &&
1897
- personData &&
1898
- personData &&
1899
- personData.personOrderList) {
1909
+ if (hasProduct && hasVerifyData && hasPersonData) {
1900
1910
  personOrderList = Object(_person__WEBPACK_IMPORTED_MODULE_2__[/* convertPersonData */ "a"])(personData, personData.personOrderList.map(function (p) { return p.key; }));
1901
1911
  setCommonInfo(prodData);
1902
- prodData.mulInsOrderList.forEach(function (ins, ii, insList) {
1912
+ (_a = prodData.mulInsOrderList) === null || _a === void 0 ? void 0 : _a.forEach(function (ins, ii, insList) {
1913
+ var _a, _b, _c;
1903
1914
  Object(_insurance__WEBPACK_IMPORTED_MODULE_3__[/* insuranceDataHandler */ "c"])(ins, prodData);
1904
1915
  var insuranceVerifyData = productVerifyData[ins.key];
1905
1916
  if (!insuranceVerifyData) {
@@ -1908,40 +1919,37 @@ function productDataHandler(prodData, productVerifyData, personData) {
1908
1919
  }
1909
1920
  return;
1910
1921
  }
1911
- var isTouHuomianIns = ins.huomian == 'touHuomian' || ins.huomian == 'shuangHuomian';
1922
+ var isTouHuomianIns = ins.huomian === 'touHuomian' || ins.huomian === 'shuangHuomian';
1912
1923
  var insuredInfo = personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
1913
1924
  var applicantInfo = personOrderList.find(function (p) { return p.key === 'applicantInfo'; });
1914
1925
  var personType = isTouHuomianIns ? 'applicantInfo' : 'insuredInfo';
1915
1926
  if (isTouHuomianIns && ins.allowSamePerson) {
1916
1927
  personType = applicantInfo && applicantInfo.title ? 'applicantInfo' : 'insuredInfo';
1917
1928
  }
1918
- var curPersonInfo = personOrderList.find(function (p) { return p.key === personType; });
1919
- var curCondition = null;
1920
- if (curPersonInfo) {
1921
- curCondition = insuranceVerifyData.find(function (verify) {
1922
- return verify.sex === curPersonInfo.sex && curPersonInfo.age >= verify.minAge && curPersonInfo.age <= verify.maxAge;
1929
+ var targetPerson = personOrderList.find(function (p) { return p.key === personType; });
1930
+ var personCondition = null;
1931
+ if (targetPerson) {
1932
+ personCondition = insuranceVerifyData.find(function (v) {
1933
+ return targetPerson.sex === v.sex && targetPerson.age >= v.minAge && targetPerson.age <= v.maxAge;
1923
1934
  });
1924
- if (curCondition) {
1925
- curCondition = curCondition.conditionData;
1926
- if (isTouHuomianIns && ins.allowSamePerson && curCondition.key === 'samePerson') {
1927
- curCondition = curCondition.samePerson.find(function (verify) { return verify.value == (applicantInfo.title ? 0 : 1); });
1935
+ if (personCondition) {
1936
+ personCondition = personCondition.conditionData;
1937
+ var isSamePerson = isTouHuomianIns && ins.allowSamePerson && personCondition.key === 'samePerson';
1938
+ if (isSamePerson) {
1939
+ personCondition = personCondition.samePerson.find(function (c) { return c.value == (applicantInfo.title ? 0 : 1); });
1928
1940
  }
1929
1941
  }
1930
1942
  }
1931
- var eleTitle = ins.eleOrderList.find(function (e) { return e.key === 'title'; });
1932
- var backupCondi = null;
1943
+ var curCondition = personCondition;
1944
+ var eleTitle = (_a = ins.eleOrderList) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.key === 'title'; });
1933
1945
  var _loop_1 = function () {
1934
- if (!curCondition ||
1935
- (isTouHuomianIns && !ins.allowSamePerson && (!curPersonInfo.title || curPersonInfo.applicantAndInsuredSame))) {
1946
+ var isNotAllowSelect = !curCondition ||
1947
+ (isTouHuomianIns && !ins.allowSamePerson && (!targetPerson.title || targetPerson.applicantAndInsuredSame));
1948
+ if (isNotAllowSelect) {
1936
1949
  eleTitle.isDisabled = true;
1937
1950
  eleTitle.value = false;
1938
1951
  if (window.DEBUG_TEMP_CONSOLE_FLAG) {
1939
- if (curCondition) {
1940
- console.log(eleTitle.labelName + "-" + 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");
1941
- }
1942
- else {
1943
- console.log(eleTitle.labelName + "-" + ins.key + ": \u8D39\u7387\u4E0D\u5B58\u5728\uFF01");
1944
- }
1952
+ console.log(curCondition ? eleTitle.labelName + "-" + 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" : eleTitle.labelName + "-" + ins.key + ": \u8D39\u7387\u4E0D\u5B58\u5728\uFF01");
1945
1953
  }
1946
1954
  }
1947
1955
  else {
@@ -1954,111 +1962,116 @@ function productDataHandler(prodData, productVerifyData, personData) {
1954
1962
  }
1955
1963
  }
1956
1964
  }
1957
- if (curCondition) {
1958
- var eleData_1 = ins.eleOrderList.find(function (e) { return e.key === curCondition.key; });
1959
- var commonData = prodData.mulInsOrderList.find(function (ins) { return ins.key === 'common'; });
1960
- if (!eleData_1 && commonData && commonData.eleOrderList) {
1961
- eleData_1 = commonData.eleOrderList.find(function (e) { return e.key === curCondition.key; });
1965
+ if (!curCondition) {
1966
+ return "break";
1967
+ }
1968
+ var eleData = (_b = ins.eleOrderList) === null || _b === void 0 ? void 0 : _b.find(function (e) { return e.key === curCondition.key; });
1969
+ var commonData = insList.find(function (ins) { return ins.key === 'common'; });
1970
+ if (!eleData && commonData && commonData.eleOrderList) {
1971
+ eleData = commonData.eleOrderList.find(function (e) { return e.key === curCondition.key; });
1972
+ }
1973
+ if (!eleData) {
1974
+ if (window.DEBUG_TEMP_CONSOLE_FLAG) {
1975
+ console.log(ins.name + " - " + (curCondition && curCondition.key) + "\u5143\u7D20\u4E0D\u5B58\u5728\uFF1A");
1962
1976
  }
1963
- var eleCondi = curCondition[curCondition.key];
1964
- if (eleData_1) {
1965
- if (eleData_1.isHide && !eleData_1.isDisabled && ins.refInsuranceId && ins.refInsuranceId != -2) {
1966
- var refInsData = null;
1967
- if (ins.refInsuranceId === -1) {
1968
- refInsData = insList[0].key === 'common' ? insList[1] : insList[0];
1969
- }
1970
- else {
1971
- refInsData = insList.find(function (ins) { return ins.key === ins.refInsuranceId; });
1972
- }
1973
- if (refInsData) {
1974
- var refEleData = refInsData.eleOrderList && refInsData.eleOrderList.find(function (e) { return e.key === eleData_1.key; });
1975
- if (refEleData) {
1976
- var refTitleData = refInsData.eleOrderList && refInsData.eleOrderList.find(function (e) { return e.key === 'title'; });
1977
- if (refInsData && refTitleData.isDisabled) {
1978
- eleTitle.isDisabled = true;
1979
- }
1980
- if (ins.huomian && eleData_1.key == 'pPeriod') {
1981
- eleData_1.value = Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* getHuomianPeriodValue */ "f"])(refEleData.value, ins.pMinus, ins.huomian === 'touHuomian' ? insuredInfo.age : curPersonInfo.age);
1982
- }
1983
- else {
1984
- eleData_1.value = refEleData.value;
1985
- }
1986
- }
1987
- else {
1988
- if (window.DEBUG_TEMP_CONSOLE_FLAG) {
1989
- console.log(ins.name + "-" + ins.key + "\uFF1A\u5173\u8054\u9669\u79CD" + ins.refInsuranceId + "\u4E0D\u5B58\u5728");
1990
- }
1991
- }
1992
- }
1977
+ curCondition = null;
1978
+ return "break";
1979
+ }
1980
+ var eleCondi = curCondition[curCondition.key];
1981
+ var isBeGovernedEle = eleData.isHide && !eleData.isDisabled && ins.refInsuranceId && Number(ins.refInsuranceId) !== -2;
1982
+ if (isBeGovernedEle) {
1983
+ var refInsData = null;
1984
+ if (Number(ins.refInsuranceId) === -1) {
1985
+ refInsData = insList[0].key === 'common' ? insList[1] : insList[0];
1986
+ }
1987
+ else {
1988
+ refInsData = insList.find(function (ins) { return ins.key == ins.refInsuranceId; });
1989
+ }
1990
+ var refEleData = refInsData && refInsData.eleOrderList && refInsData.eleOrderList.find(function (e) { return e.key === eleData.key; });
1991
+ if (refEleData) {
1992
+ if (ins.huomian && eleData.key == 'pPeriod') {
1993
+ eleData.value = Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* getHuomianPeriodValue */ "f"])(refEleData.value, ins.pMinus, ins.huomian === 'touHuomian' ? insuredInfo.age : targetPerson.age);
1993
1994
  }
1994
1995
  else {
1995
- var backupOpts_1 = [];
1996
- if (eleData_1.opts && eleData_1.opts.length) {
1997
- backupOpts_1 = eleData_1.opts.slice(0);
1998
- }
1999
- eleData_1.opts = [];
2000
- eleCondi.forEach(function (condi) {
2001
- if (condi.value !== undefined && condi.desc !== undefined) {
2002
- var backupOpt = backupOpts_1.find(function (o) { return o.val == condi.value; });
2003
- eleData_1.opts.push({
2004
- val: condi.value,
2005
- desc: condi.desc,
2006
- isHide: (backupOpt && backupOpt.isHide) || null,
2007
- isDisabled: (backupOpt && backupOpt.isDisabled) || null,
2008
- isInvalid: null
2009
- });
2010
- }
2011
- });
2012
- if (eleData_1.opts.length) {
2013
- if (eleData_1.opts.every(function (ele) { return ele.val != eleData_1.value; })) {
2014
- if (eleData_1.key === 'pPeriod') {
2015
- var filterOpts = eleData_1.opts.filter(function (opt) { return !opt.isHide && !opt.isDisabled; });
2016
- if (filterOpts.length) {
2017
- eleData_1.value = eleData_1.opts[filterOpts.length - 1].val;
2018
- }
2019
- }
2020
- else {
2021
- eleData_1.value = eleData_1.opts[0].val;
2022
- }
2023
- }
2024
- }
1996
+ eleData.value = refEleData.value;
1997
+ }
1998
+ }
1999
+ else {
2000
+ if (window.DEBUG_TEMP_CONSOLE_FLAG) {
2001
+ console.log(ins.name + "-" + ins.key + "\uFF1A\u5173\u8054\u9669\u79CD" + ins.refInsuranceId + "\u4E0D\u5B58\u5728");
2025
2002
  }
2026
- curCondition = eleCondi.find(function (eleCondi) { return eleCondi.value === eleData_1.value; });
2027
- var eleIndex = ins.eleOrderList.findIndex(function (ele) { return ele.key === eleData_1.key; });
2028
- if (!curCondition && backupCondi && eleData_1 && eleIndex >= 1) {
2029
- var preCondi = backupCondi.find(function (preCondi) { return preCondi[eleData_1.key] && preCondi[eleData_1.key].some(function (condi) { return condi.value === eleData_1.value; }); });
2030
- if (preCondi) {
2031
- curCondition = preCondi[eleData_1.key];
2032
- ins.eleOrderList[eleIndex - 1].value = preCondi.value;
2003
+ }
2004
+ }
2005
+ else {
2006
+ var backupOpts_1 = eleData.opts && eleData.opts.length ? eleData.opts.slice(0) : [];
2007
+ eleData.opts = eleCondi.filter(function (c) { return c.value !== undefined && c.desc !== undefined; }).map(function (c) {
2008
+ var option = backupOpts_1.find(function (o) { return o.val == c.value; });
2009
+ return {
2010
+ val: c.value,
2011
+ desc: c.desc,
2012
+ isHide: (option && option.isHide) || null,
2013
+ isDisabled: (option && option.isDisabled) || null,
2014
+ isInvalid: null
2015
+ };
2016
+ });
2017
+ var isNoOption = eleData.opts && eleData.opts.length && eleData.opts.every(function (ele) { return ele.val != eleData.value; });
2018
+ if (isNoOption) {
2019
+ if (eleData.key === 'pPeriod') {
2020
+ var filterOpts = (_c = eleData.opts) === null || _c === void 0 ? void 0 : _c.filter(function (opt) { return !opt.isHide && !opt.isDisabled; });
2021
+ if (filterOpts && filterOpts.length) {
2022
+ eleData.value = filterOpts[filterOpts.length - 1].val;
2033
2023
  }
2034
2024
  }
2035
- if (eleData_1 && eleData_1.isHide && !eleData_1.isDisabled && eleIndex >= 1 && backupCondi) {
2036
- var preEleData = ins.eleOrderList[eleIndex - 1];
2037
- if (preEleData && preEleData.opts && preEleData.opts.length) {
2038
- var opts_1 = [];
2039
- backupCondi.forEach(function (condi) {
2040
- if (curCondition && condi[eleData_1.key] && condi[eleData_1.key].some(function (c) { return c.value == eleData_1.value; })) {
2041
- opts_1.push({
2042
- val: condi.value,
2043
- desc: condi.desc
2044
- });
2045
- }
2046
- });
2047
- preEleData.opts = opts_1;
2025
+ else {
2026
+ if (eleData.opts && eleData.opts.length) {
2027
+ eleData.value = eleData.opts[0].val;
2048
2028
  }
2049
2029
  }
2050
- backupCondi = eleCondi;
2051
2030
  }
2052
- else {
2053
- if (window.DEBUG_TEMP_CONSOLE_FLAG) {
2054
- console.log(ins.name + " - " + (curCondition && curCondition.key) + "\u5143\u7D20\u4E0D\u5B58\u5728\uFF1A");
2031
+ }
2032
+ curCondition = eleCondi.find(function (eleCondi) { return eleCondi.value == eleData.value; });
2033
+ var eleIndex = ins.eleOrderList.findIndex(function (ele) { return ele.key === eleData.key; });
2034
+ var prevElement;
2035
+ if (eleIndex >= 1) {
2036
+ prevElement = ins.eleOrderList[eleIndex - 1];
2037
+ }
2038
+ if (prevElement) {
2039
+ if (!curCondition) {
2040
+ var prevEleVerify = getElementVerifyFromProductVerify(personCondition, insList, { insuranceKey: ins.key, elementKey: prevElement.key });
2041
+ 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; }); });
2042
+ if (onePrevEleVerify) {
2043
+ prevElement.value = onePrevEleVerify.value;
2044
+ curCondition = onePrevEleVerify[eleData.key];
2045
+ }
2046
+ }
2047
+ var isNeedReverseFilter = eleData.isHide && !eleData.isDisabled && prevElement.opts && prevElement.opts.length;
2048
+ if (isNeedReverseFilter) {
2049
+ var prevEleVerify = getElementVerifyFromProductVerify(personCondition, insList, { insuranceKey: ins.key, elementKey: prevElement.key });
2050
+ if (prevEleVerify) {
2051
+ prevElement.opts = prevEleVerify.filter(function (v) {
2052
+ var _a;
2053
+ var elementVerify = getElementVerifyFromProductVerify(personCondition, insList, (_a = {
2054
+ insuranceKey: ins.key,
2055
+ elementKey: eleData.key
2056
+ },
2057
+ _a[prevElement.key] = v.value,
2058
+ _a));
2059
+ return elementVerify && elementVerify.some(function (c) { return c.value == eleData.value; });
2060
+ }).map(function (v) { return ({
2061
+ val: v.value,
2062
+ desc: v.desc,
2063
+ isHide: null,
2064
+ isDisabled: null,
2065
+ isInvalid: null
2066
+ }); });
2055
2067
  }
2056
- curCondition = null;
2057
2068
  }
2058
2069
  }
2059
2070
  };
2060
2071
  do {
2061
- _loop_1();
2072
+ var state_1 = _loop_1();
2073
+ if (state_1 === "break")
2074
+ break;
2062
2075
  } while (curCondition && curCondition.key && curCondition[curCondition.key]);
2063
2076
  });
2064
2077
  }
@@ -2066,6 +2079,26 @@ function productDataHandler(prodData, productVerifyData, personData) {
2066
2079
  isHideProduct(prodData, productVerifyData, personOrderList);
2067
2080
  return prodData;
2068
2081
  }
2082
+ function getElementVerifyFromProductVerify(verify, insurances, option) {
2083
+ if (!verify || !verify.key || !verify[verify.key] || !insurances || !option) {
2084
+ return verify;
2085
+ }
2086
+ var insuranceInfo = {};
2087
+ insurances.forEach(function (ins) {
2088
+ if (['common', option.insuranceKey].includes(ins.key)) {
2089
+ insuranceInfo = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, insuranceInfo), Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* convertEleOrderListToObj */ "c"])(ins));
2090
+ }
2091
+ });
2092
+ insuranceInfo = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, insuranceInfo), option);
2093
+ var temp = verify;
2094
+ while (temp && temp.key && temp.key !== option.elementKey) {
2095
+ temp = temp[temp.key].find(function (v) { return v.value == insuranceInfo[temp.key]; });
2096
+ }
2097
+ if (temp && temp[option.elementKey]) {
2098
+ return temp[option.elementKey];
2099
+ }
2100
+ return temp;
2101
+ }
2069
2102
  function setCommonInfo(prodData) {
2070
2103
  if (!prodData || !prodData.mulInsOrderList) {
2071
2104
  return prodData;
@@ -2140,6 +2173,7 @@ function setGroupInsurance(prodData) {
2140
2173
  var insuranceIdEle = newGroupInsMap[ins.groupKey].eleOrderList.find(function (e) { return e.key === 'insuranceId'; });
2141
2174
  insuranceIdEle.opts.push({
2142
2175
  val: ins.key,
2176
+ code: ins.code,
2143
2177
  desc: titleEle.labelName,
2144
2178
  isDisabled: titleEle.isDisabled
2145
2179
  });
@@ -2218,7 +2252,15 @@ function setGroupInsurance(prodData) {
2218
2252
  }
2219
2253
  }
2220
2254
  }
2221
- prodData.mulInsOrderList.push(newGroupInsMap[k]);
2255
+ var index = -1;
2256
+ prodData.mulInsOrderList.forEach(function (ins, i) {
2257
+ if (ins.groupKey === k) {
2258
+ index = i;
2259
+ }
2260
+ });
2261
+ if (index >= 0) {
2262
+ prodData.mulInsOrderList.splice(index + 1, 0, newGroupInsMap[k]);
2263
+ }
2222
2264
  };
2223
2265
  for (var k in newGroupInsMap) {
2224
2266
  _loop_2(k);
@@ -6836,14 +6878,14 @@ module.exports = baseIsSet;
6836
6878
  // ESM COMPAT FLAG
6837
6879
  __webpack_require__.r(__webpack_exports__);
6838
6880
 
6839
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/add-and-take/index.vue?vue&type=template&id=5a4c9adc&
6881
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/add-and-take/index.vue?vue&type=template&id=d319ce72&
6840
6882
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.initAddAndTakeData && _vm.initAddAndTakeData.data && _vm.initAddAndTakeData.data.length)?_c('div',{class:{
6841
6883
  'bxt-add-and-take': true,
6842
6884
  'bxt-add-and-take--footer': _vm.footer
6843
6885
  }},[(_vm.mName === 'Table')?_c('div',{staticClass:"bxt-aat-table"},[(['addAndTake', 'add', 'take'].includes(_vm.type))?_c('div',{staticClass:"bxt-aat-bonus"},[_c('p',{staticClass:"bxt-aat-bonus-tips"},[_vm._v("\n 因合规需求,低档收益下账户金额足够才能设置领取:\n ")]),_c('ul',{staticClass:"bxt-aat-bonus-type"},[_vm._l((['bonus', 'rate']),function(field){return [(_vm.initAddAndTakeData[field] && _vm.initAddAndTakeData[field].opts)?_c('li',{key:field},[_c('SelectItem',{attrs:{"options":_vm.initAddAndTakeData[field].opts.map(function (o) { return ({
6844
6886
  val: o.value,
6845
6887
  desc: field === 'bonus' ? o.description : _vm.getBonusDesc(o)
6846
- }); }),"disabled":"true","right-icon":"arrow-right"},model:{value:(_vm.initAddAndTakeData[field].value),callback:function ($$v) {_vm.$set(_vm.initAddAndTakeData[field], "value", _vm._n($$v))},expression:"initAddAndTakeData[field].value"}})],1):_vm._e()]})],2)]):_vm._e(),_c('table',{staticClass:"bxt-aat-table-content"},[_c('thead',[_c('tr',[_c('th',[_vm._v("年度")]),_c('th',[_vm._v("年龄")]),(['addAndTake', 'add'].includes(_vm.type))?_c('th',[_vm._v("当年追加")]):_vm._e(),(['addAndTake', 'take', 'reduceBaof'].includes(_vm.type))?_c('th',[_vm._v("\n "+_vm._s(_vm.type === 'reduceBaof' ? '领取金额' : '当年领取')+"\n ")]):_vm._e(),_c('th',[_vm._v(_vm._s(_vm.type === 'reduceBaof' ? '现金价值' : '账户价值'))])])]),_c('tbody',_vm._l((_vm.addAndTakeTable),function(tr){return _c('tr',{key:JSON.stringify(tr)},[_c('td',[_c('span',[_vm._v(_vm._s(tr[0] + _vm.initAddAndTakeData.startPolicyNo - 1))])]),_c('td',[_c('span',[_vm._v(_vm._s(tr[1]))])]),(['addAndTake', 'add'].includes(_vm.type))?_c('td',{staticClass:"bxt-aat-table-cell-amount",on:{"click":function($event){return _vm.onClickToForm('add', tr)}}},[_c('span',{class:{ 'value-unequal-zero': tr[2] !== 0 }},[_vm._v(_vm._s(tr[2]))]),(tr[2] !== 0)?_c('i',{staticClass:"iconfont icon-close_circle_surface",on:{"click":function($event){$event.stopPropagation();return _vm.updateData({
6888
+ }); }),"disabled":"true","right-icon":"arrow-right"},model:{value:(_vm.initAddAndTakeData[field].opts[0].value),callback:function ($$v) {_vm.$set(_vm.initAddAndTakeData[field].opts[0], "value", _vm._n($$v))},expression:"initAddAndTakeData[field].opts[0].value"}})],1):_vm._e()]})],2)]):_vm._e(),_c('table',{staticClass:"bxt-aat-table-content"},[_c('thead',[_c('tr',[_c('th',[_vm._v("年度")]),_c('th',[_vm._v("年龄")]),(['addAndTake', 'add'].includes(_vm.type))?_c('th',[_vm._v("当年追加")]):_vm._e(),(['addAndTake', 'take', 'reduceBaof'].includes(_vm.type))?_c('th',[_vm._v("\n "+_vm._s(_vm.type === 'reduceBaof' ? '领取金额' : '当年领取')+"\n ")]):_vm._e(),_c('th',[_vm._v(_vm._s(_vm.type === 'reduceBaof' ? '现金价值' : '账户价值'))])])]),_c('tbody',_vm._l((_vm.addAndTakeTable),function(tr){return _c('tr',{key:JSON.stringify(tr)},[_c('td',[_c('span',[_vm._v(_vm._s(tr[0] + _vm.initAddAndTakeData.startPolicyNo - 1))])]),_c('td',[_c('span',[_vm._v(_vm._s(tr[1]))])]),(['addAndTake', 'add'].includes(_vm.type))?_c('td',{staticClass:"bxt-aat-table-cell-amount",on:{"click":function($event){return _vm.onClickToForm('add', tr)}}},[_c('span',{class:{ 'value-unequal-zero': tr[2] !== 0 }},[_vm._v(_vm._s(tr[2]))]),(tr[2] !== 0)?_c('i',{staticClass:"iconfont icon-close_circle_surface",on:{"click":function($event){$event.stopPropagation();return _vm.updateData({
6847
6889
  type: 'add',
6848
6890
  beginYear: tr[0],
6849
6891
  endYear: tr[0]
@@ -6862,7 +6904,7 @@ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._sel
6862
6904
  var staticRenderFns = []
6863
6905
 
6864
6906
 
6865
- // CONCATENATED MODULE: ./packages/add-and-take/index.vue?vue&type=template&id=5a4c9adc&
6907
+ // CONCATENATED MODULE: ./packages/add-and-take/index.vue?vue&type=template&id=d319ce72&
6866
6908
 
6867
6909
  // EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
6868
6910
  var tslib_es6 = __webpack_require__(0);
@@ -7228,15 +7270,16 @@ var add_and_takevue_type_script_lang_ts_AddAndTake = (function (_super) {
7228
7270
  };
7229
7271
  AddAndTake.prototype.getAddAndTakeData = function (values) {
7230
7272
  var _this = this;
7273
+ var _a;
7231
7274
  if (values === void 0) { values = null; }
7232
- var _a = this, params = _a.params, type = _a.type, IS_PRODUCT_ENV = _a.IS_PRODUCT_ENV, personData = _a.personData, productData = _a.productData, insuranceData = _a.insuranceData, bonusType = _a.bonusType, accountDataKey = _a.accountDataKey, accountData = _a.accountData;
7275
+ var _b = this, params = _b.params, type = _b.type, IS_PRODUCT_ENV = _b.IS_PRODUCT_ENV, personData = _b.personData, productData = _b.productData, insuranceData = _b.insuranceData, bonusType = _b.bonusType, accountDataKey = _b.accountDataKey, accountData = _b.accountData;
7233
7276
  var cloneProductData = Object(planbook["f" /* convertProductData */])(cloneDeep_default()(productData));
7234
7277
  var caclAccountData = rebuildAccountData(values, cloneDeep_default()(accountData));
7235
- var deleteProdKeys = ['hadChoice', 'hide', 'totalBaof', 'insShowArr', 'autoImport'];
7278
+ var deleteProdKeys = ['hadChoice', 'hide', 'totalBaof', 'insShowArr', 'autoImport', 'adjustBaoeData'];
7236
7279
  deleteProdKeys.forEach(function (ele) {
7237
7280
  delete cloneProductData[ele];
7238
7281
  });
7239
- cloneProductData.mulInsOrderList.forEach(function (ins) {
7282
+ (_a = cloneProductData.mulInsOrderList) === null || _a === void 0 ? void 0 : _a.forEach(function (ins) {
7240
7283
  var deleteInsKeys = [
7241
7284
  'isFollowing',
7242
7285
  'pPeriodDesc',