bxs-tools-ui 3.2.0-2 → 3.2.0-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.js CHANGED
@@ -9781,7 +9781,7 @@ function initElementValidateRules(ele, productData) {
9781
9781
  max: max || Infinity,
9782
9782
  message: message,
9783
9783
  validator: function validator(value, rule) {
9784
- return !value || value >= rule.min && value <= rule.max;
9784
+ return (value || value === 0) && value >= rule.min && value <= rule.max;
9785
9785
  }
9786
9786
  });
9787
9787
  }
@@ -9792,7 +9792,7 @@ function initElementValidateRules(ele, productData) {
9792
9792
  multiple: ele.multi,
9793
9793
  message: "\u8BF7\u8F93\u5165".concat(ele.multi, "\u500D\u6570"),
9794
9794
  validator: function validator(value, rule) {
9795
- return !value || !(value % rule.multiple);
9795
+ return (value || value === 0) && !(value % rule.multiple);
9796
9796
  }
9797
9797
  });
9798
9798
  }
@@ -10053,7 +10053,7 @@ function _productDataHandler() {
10053
10053
  var titleEle = (ins.eleOrderList || []).find(function (e) {
10054
10054
  return e.key === 'title';
10055
10055
  });
10056
- if (titleEle && groupInsuranceIdEle && !Array.isArray(titleEle.value)) {
10056
+ if (titleEle && groupInsuranceIdEle && !Array.isArray(groupInsuranceIdEle.value)) {
10057
10057
  titleEle.value = groupInsuranceIdEle.value === ins.key;
10058
10058
  }
10059
10059
  });
@@ -10579,6 +10579,14 @@ function setGroupInsurance(prodData) {
10579
10579
 
10580
10580
  // 处理组合险中的逻辑,并加入到产品险种列表中
10581
10581
  var _loop = function _loop(k) {
10582
+ var _oldGroupInsurance$el;
10583
+ var oldGroupInsurance = mulInsOrderList.find(function (ins) {
10584
+ return ins.key === k;
10585
+ });
10586
+ var oldGroupTitleElement = oldGroupInsurance ? (_oldGroupInsurance$el = oldGroupInsurance.eleOrderList) === null || _oldGroupInsurance$el === void 0 ? void 0 : _oldGroupInsurance$el.find(function (e) {
10587
+ return e.key === 'title';
10588
+ }) : null;
10589
+ var oldGroupTitleValue = oldGroupTitleElement ? oldGroupTitleElement.value : null;
10582
10590
  var nGroupTitleEle = newGroupInsMap[k].eleOrderList.find(function (e) {
10583
10591
  return e.key === 'title';
10584
10592
  });
@@ -10607,9 +10615,12 @@ function setGroupInsurance(prodData) {
10607
10615
  var checkedInsurance = checkedInsurances[0];
10608
10616
  // hasRequiredIns:如果组合险中有一款是必选的,则整个组合险为选中状态
10609
10617
  // 所有险种都不可选,则组合险不可修改且不选中。否则,组合险种可选
10610
- nGroupTitleEle.value = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).some(function (opt) {
10618
+ nGroupTitleEle.value = oldGroupTitleValue === false ? oldGroupTitleValue : (nGroupInsuranceIdEle.opts || []).some(function (opt) {
10611
10619
  return !opt.isDisabled;
10612
10620
  });
10621
+ if (hasRequiredIns) {
10622
+ nGroupTitleEle.value = hasRequiredIns;
10623
+ }
10613
10624
  nGroupTitleEle.isDisabled = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).every(function (opt) {
10614
10625
  return !!opt.isDisabled;
10615
10626
  });
@@ -46975,12 +46986,6 @@ var BxtProductInfo = (_dec = Component({
46975
46986
  if (!['title'].includes(eleData.key)) {
46976
46987
  this.requiestRecommendValues();
46977
46988
  }
46978
- setTimeout(function () {
46979
- var refInsuranceForm = get$3(_this4.$refs, "insuranceForm".concat(insData.key, "[0]"));
46980
- if (refInsuranceForm) {
46981
- refInsuranceForm.validate(eleData.key);
46982
- }
46983
- }, 300);
46984
46989
  this.$nextTick(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
46985
46990
  var errorMsg;
46986
46991
  return _regeneratorRuntime.wrap(function (_context2) {
@@ -47012,11 +47017,11 @@ var BxtProductInfo = (_dec = Component({
47012
47017
  }, {
47013
47018
  key: "changeProduct",
47014
47019
  value: function () {
47015
- var _changeProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(productData, options) {
47020
+ var _changeProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(productData, options) {
47016
47021
  var _this5 = this;
47017
- var $listeners, inputData, verifyData, personData, groupKey, productKey, params, type, insData, eleData, planbookId, publicPbUuid, productVerifyData, eventTarget, errorMsg, hasRevalidateFlag;
47018
- return _regeneratorRuntime.wrap(function (_context3) {
47019
- while (1) switch (_context3.prev = _context3.next) {
47022
+ var $listeners, inputData, verifyData, personData, groupKey, productKey, params, type, insData, eleData, planbookId, publicPbUuid, productVerifyData, eventTarget, errorMsg;
47023
+ return _regeneratorRuntime.wrap(function (_context4) {
47024
+ while (1) switch (_context4.prev = _context4.next) {
47020
47025
  case 0:
47021
47026
  $listeners = this.$listeners, inputData = this.inputData, verifyData = this.verifyData, personData = this.personData, groupKey = this.groupKey, productKey = this.productKey, params = this.params;
47022
47027
  type = options.type, insData = options.insData, eleData = options.eleData;
@@ -47031,7 +47036,7 @@ var BxtProductInfo = (_dec = Component({
47031
47036
  if (type === 'change') {
47032
47037
  clearAddAndTakeAndAdjustBaoeData(productData);
47033
47038
  }
47034
- _context3.next = 1;
47039
+ _context4.next = 1;
47035
47040
  return productDataHandler(productData, productVerifyData, personData, {
47036
47041
  planbookId: planbookId,
47037
47042
  eventTarget: eventTarget
@@ -47049,42 +47054,54 @@ var BxtProductInfo = (_dec = Component({
47049
47054
  eleData: eleData
47050
47055
  });
47051
47056
  if (errorMsg) {
47052
- _context3.next = 3;
47053
- break;
47054
- }
47055
- hasRevalidateFlag = (get$3(productData, 'mulInsOrderList') || []).some(function (ins) {
47056
- return ins.revalidateFlag;
47057
- });
47058
- if (!(hasRevalidateFlag && $listeners.reCalculate)) {
47059
- _context3.next = 3;
47057
+ _context4.next = 2;
47060
47058
  break;
47061
47059
  }
47062
- _context3.next = 2;
47063
- return new Promise(function (resolve, reject) {
47064
- _this5.$emit('reCalculate', inputData, {
47065
- planbookId: planbookId,
47066
- publicPbUuid: publicPbUuid,
47067
- groupKey: groupKey,
47068
- productKey: productKey,
47069
- isIgnoreError: true,
47070
- eventTarget: eventTarget
47071
- }, resolve, reject);
47072
- }).catch(function (err) {
47073
- errorMsg = get$3(err, '[0].message') || get$3(err, 'message');
47074
- });
47060
+ _context4.next = 2;
47061
+ return this.validate().then(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
47062
+ var hasRevalidateFlag;
47063
+ return _regeneratorRuntime.wrap(function (_context3) {
47064
+ while (1) switch (_context3.prev = _context3.next) {
47065
+ case 0:
47066
+ hasRevalidateFlag = (get$3(productData, 'mulInsOrderList') || []).some(function (ins) {
47067
+ return ins.revalidateFlag;
47068
+ });
47069
+ if (!(hasRevalidateFlag && $listeners.reCalculate)) {
47070
+ _context3.next = 2;
47071
+ break;
47072
+ }
47073
+ _context3.next = 1;
47074
+ return new Promise(function (resolve, reject) {
47075
+ _this5.$emit('reCalculate', inputData, {
47076
+ planbookId: planbookId,
47077
+ publicPbUuid: publicPbUuid,
47078
+ groupKey: groupKey,
47079
+ productKey: productKey,
47080
+ isIgnoreError: true,
47081
+ eventTarget: eventTarget
47082
+ }, resolve, reject);
47083
+ }).catch(function (err) {
47084
+ errorMsg = get$3(err, '[0].message') || get$3(err, 'message');
47085
+ });
47086
+ case 1:
47087
+ _context3.next = 2;
47088
+ return productDataHandler(productData, productVerifyData, personData, {
47089
+ planbookId: planbookId,
47090
+ eventTarget: eventTarget
47091
+ });
47092
+ case 2:
47093
+ case "end":
47094
+ return _context3.stop();
47095
+ }
47096
+ }, _callee3);
47097
+ }))).catch(function () {});
47075
47098
  case 2:
47076
- _context3.next = 3;
47077
- return productDataHandler(productData, productVerifyData, personData, {
47078
- planbookId: planbookId,
47079
- eventTarget: eventTarget
47080
- });
47099
+ return _context4.abrupt("return", errorMsg);
47081
47100
  case 3:
47082
- return _context3.abrupt("return", errorMsg);
47083
- case 4:
47084
47101
  case "end":
47085
- return _context3.stop();
47102
+ return _context4.stop();
47086
47103
  }
47087
- }, _callee3, this);
47104
+ }, _callee4, this);
47088
47105
  }));
47089
47106
  function changeProduct(_x, _x2) {
47090
47107
  return _changeProduct.apply(this, arguments);
@@ -47219,16 +47236,16 @@ var BxtProductInfo = (_dec = Component({
47219
47236
  }, {
47220
47237
  key: "validate",
47221
47238
  value: function () {
47222
- var _validate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
47239
+ var _validate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
47223
47240
  var $refs, filterInsuranceList, insKeys;
47224
- return _regeneratorRuntime.wrap(function (_context4) {
47225
- while (1) switch (_context4.prev = _context4.next) {
47241
+ return _regeneratorRuntime.wrap(function (_context5) {
47242
+ while (1) switch (_context5.prev = _context5.next) {
47226
47243
  case 0:
47227
47244
  $refs = this.$refs, filterInsuranceList = this.filterInsuranceList;
47228
47245
  insKeys = filterInsuranceList.map(function (ins) {
47229
47246
  return ins.key;
47230
47247
  });
47231
- return _context4.abrupt("return", new Promise(function (resolve, reject) {
47248
+ return _context5.abrupt("return", new Promise(function (resolve, reject) {
47232
47249
  setTimeout(function () {
47233
47250
  var promises = [];
47234
47251
  var _iterator = _createForOfIteratorHelper(insKeys),
@@ -47255,9 +47272,9 @@ var BxtProductInfo = (_dec = Component({
47255
47272
  }));
47256
47273
  case 1:
47257
47274
  case "end":
47258
- return _context4.stop();
47275
+ return _context5.stop();
47259
47276
  }
47260
- }, _callee4, this);
47277
+ }, _callee5, this);
47261
47278
  }));
47262
47279
  function validate() {
47263
47280
  return _validate.apply(this, arguments);
@@ -47286,27 +47303,27 @@ var BxtProductInfo = (_dec = Component({
47286
47303
  }, {
47287
47304
  key: "requiestRecommendValues",
47288
47305
  value: function () {
47289
- var _requiestRecommendValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
47306
+ var _requiestRecommendValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
47290
47307
  var self, showRecommendValue, recommendValuesCache, inputData, groupData, productData, url, calcData, reqParams, calcInputData, calcProductData;
47291
- return _regeneratorRuntime.wrap(function (_context5) {
47292
- while (1) switch (_context5.prev = _context5.next) {
47308
+ return _regeneratorRuntime.wrap(function (_context6) {
47309
+ while (1) switch (_context6.prev = _context6.next) {
47293
47310
  case 0:
47294
47311
  self = this;
47295
47312
  showRecommendValue = self.showRecommendValue, recommendValuesCache = self.recommendValuesCache, inputData = self.inputData, groupData = self.groupData, productData = self.productData;
47296
47313
  if (showRecommendValue) {
47297
- _context5.next = 1;
47314
+ _context6.next = 1;
47298
47315
  break;
47299
47316
  }
47300
- return _context5.abrupt("return");
47317
+ return _context6.abrupt("return");
47301
47318
  case 1:
47302
47319
  url = "".concat(PLANBOOK_API_HOSTNAME, "/planBook/input/calculate/recommend");
47303
- _context5.next = 2;
47320
+ _context6.next = 2;
47304
47321
  return createdProductDataToCalc(inputData, {
47305
47322
  groupKey: groupData.key,
47306
47323
  productKey: productData.key
47307
47324
  }).catch(function () {});
47308
47325
  case 2:
47309
- calcData = _context5.sent;
47326
+ calcData = _context6.sent;
47310
47327
  reqParams = [];
47311
47328
  calcInputData = calcData && JSON.parse(calcData.jd);
47312
47329
  calcProductData = calcInputData && calcInputData.productGroupList[0].prodOrderList[0];
@@ -47320,13 +47337,13 @@ var BxtProductInfo = (_dec = Component({
47320
47337
  });
47321
47338
  }
47322
47339
  if (!recommendValuesCache[JSON.stringify(reqParams)]) {
47323
- _context5.next = 3;
47340
+ _context6.next = 3;
47324
47341
  break;
47325
47342
  }
47326
47343
  self.recommendValues = recommendValuesCache[JSON.stringify(reqParams)];
47327
- return _context5.abrupt("return");
47344
+ return _context6.abrupt("return");
47328
47345
  case 3:
47329
- return _context5.abrupt("return", fetch(url, {
47346
+ return _context6.abrupt("return", fetch(url, {
47330
47347
  method: 'POST',
47331
47348
  credentials: 'include',
47332
47349
  headers: {
@@ -47336,10 +47353,10 @@ var BxtProductInfo = (_dec = Component({
47336
47353
  body: JSON.stringify(reqParams)
47337
47354
  }).then(function (response) {
47338
47355
  return response.json();
47339
- }).then(function (_ref3) {
47340
- var success = _ref3.success,
47341
- data = _ref3.data,
47342
- info = _ref3.info;
47356
+ }).then(function (_ref4) {
47357
+ var success = _ref4.success,
47358
+ data = _ref4.data,
47359
+ info = _ref4.info;
47343
47360
  if (!success || !data) {
47344
47361
  self.$toast(info);
47345
47362
  return Promise.reject();
@@ -47380,9 +47397,9 @@ var BxtProductInfo = (_dec = Component({
47380
47397
  }));
47381
47398
  case 4:
47382
47399
  case "end":
47383
- return _context5.stop();
47400
+ return _context6.stop();
47384
47401
  }
47385
- }, _callee5, this);
47402
+ }, _callee6, this);
47386
47403
  }));
47387
47404
  function requiestRecommendValues() {
47388
47405
  return _requiestRecommendValues.apply(this, arguments);
@@ -48335,7 +48352,7 @@ if (typeof window !== 'undefined' && window.Vue) {
48335
48352
  install(window.Vue);
48336
48353
  }
48337
48354
  const index = {
48338
- version: '3.2.0-2',
48355
+ version: '3.2.0-4',
48339
48356
  install: install
48340
48357
  };
48341
48358
 
@@ -9628,7 +9628,7 @@ function initElementValidateRules(ele, productData) {
9628
9628
  max: max || Infinity,
9629
9629
  message: message,
9630
9630
  validator: function validator(value, rule) {
9631
- return !value || value >= rule.min && value <= rule.max;
9631
+ return (value || value === 0) && value >= rule.min && value <= rule.max;
9632
9632
  }
9633
9633
  });
9634
9634
  }
@@ -9639,7 +9639,7 @@ function initElementValidateRules(ele, productData) {
9639
9639
  multiple: ele.multi,
9640
9640
  message: "\u8BF7\u8F93\u5165".concat(ele.multi, "\u500D\u6570"),
9641
9641
  validator: function validator(value, rule) {
9642
- return !value || !(value % rule.multiple);
9642
+ return (value || value === 0) && !(value % rule.multiple);
9643
9643
  }
9644
9644
  });
9645
9645
  }
@@ -9791,7 +9791,7 @@ function _productDataHandler() {
9791
9791
  var titleEle = (ins.eleOrderList || []).find(function (e) {
9792
9792
  return e.key === 'title';
9793
9793
  });
9794
- if (titleEle && groupInsuranceIdEle && !Array.isArray(titleEle.value)) {
9794
+ if (titleEle && groupInsuranceIdEle && !Array.isArray(groupInsuranceIdEle.value)) {
9795
9795
  titleEle.value = groupInsuranceIdEle.value === ins.key;
9796
9796
  }
9797
9797
  });
@@ -10317,6 +10317,14 @@ function setGroupInsurance(prodData) {
10317
10317
 
10318
10318
  // 处理组合险中的逻辑,并加入到产品险种列表中
10319
10319
  var _loop = function _loop(k) {
10320
+ var _oldGroupInsurance$el;
10321
+ var oldGroupInsurance = mulInsOrderList.find(function (ins) {
10322
+ return ins.key === k;
10323
+ });
10324
+ var oldGroupTitleElement = oldGroupInsurance ? (_oldGroupInsurance$el = oldGroupInsurance.eleOrderList) === null || _oldGroupInsurance$el === void 0 ? void 0 : _oldGroupInsurance$el.find(function (e) {
10325
+ return e.key === 'title';
10326
+ }) : null;
10327
+ var oldGroupTitleValue = oldGroupTitleElement ? oldGroupTitleElement.value : null;
10320
10328
  var nGroupTitleEle = newGroupInsMap[k].eleOrderList.find(function (e) {
10321
10329
  return e.key === 'title';
10322
10330
  });
@@ -10345,9 +10353,12 @@ function setGroupInsurance(prodData) {
10345
10353
  var checkedInsurance = checkedInsurances[0];
10346
10354
  // hasRequiredIns:如果组合险中有一款是必选的,则整个组合险为选中状态
10347
10355
  // 所有险种都不可选,则组合险不可修改且不选中。否则,组合险种可选
10348
- nGroupTitleEle.value = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).some(function (opt) {
10356
+ nGroupTitleEle.value = oldGroupTitleValue === false ? oldGroupTitleValue : (nGroupInsuranceIdEle.opts || []).some(function (opt) {
10349
10357
  return !opt.isDisabled;
10350
10358
  });
10359
+ if (hasRequiredIns) {
10360
+ nGroupTitleEle.value = hasRequiredIns;
10361
+ }
10351
10362
  nGroupTitleEle.isDisabled = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).every(function (opt) {
10352
10363
  return !!opt.isDisabled;
10353
10364
  });
@@ -9521,7 +9521,7 @@ function initElementValidateRules(ele, productData) {
9521
9521
  max: max || Infinity,
9522
9522
  message: message,
9523
9523
  validator: function validator(value, rule) {
9524
- return !value || value >= rule.min && value <= rule.max;
9524
+ return (value || value === 0) && value >= rule.min && value <= rule.max;
9525
9525
  }
9526
9526
  });
9527
9527
  }
@@ -9532,7 +9532,7 @@ function initElementValidateRules(ele, productData) {
9532
9532
  multiple: ele.multi,
9533
9533
  message: "\u8BF7\u8F93\u5165".concat(ele.multi, "\u500D\u6570"),
9534
9534
  validator: function validator(value, rule) {
9535
- return !value || !(value % rule.multiple);
9535
+ return (value || value === 0) && !(value % rule.multiple);
9536
9536
  }
9537
9537
  });
9538
9538
  }
@@ -9765,7 +9765,7 @@ function _productDataHandler() {
9765
9765
  var titleEle = (ins.eleOrderList || []).find(function (e) {
9766
9766
  return e.key === 'title';
9767
9767
  });
9768
- if (titleEle && groupInsuranceIdEle && !Array.isArray(titleEle.value)) {
9768
+ if (titleEle && groupInsuranceIdEle && !Array.isArray(groupInsuranceIdEle.value)) {
9769
9769
  titleEle.value = groupInsuranceIdEle.value === ins.key;
9770
9770
  }
9771
9771
  });
@@ -10291,6 +10291,14 @@ function setGroupInsurance(prodData) {
10291
10291
 
10292
10292
  // 处理组合险中的逻辑,并加入到产品险种列表中
10293
10293
  var _loop = function _loop(k) {
10294
+ var _oldGroupInsurance$el;
10295
+ var oldGroupInsurance = mulInsOrderList.find(function (ins) {
10296
+ return ins.key === k;
10297
+ });
10298
+ var oldGroupTitleElement = oldGroupInsurance ? (_oldGroupInsurance$el = oldGroupInsurance.eleOrderList) === null || _oldGroupInsurance$el === void 0 ? void 0 : _oldGroupInsurance$el.find(function (e) {
10299
+ return e.key === 'title';
10300
+ }) : null;
10301
+ var oldGroupTitleValue = oldGroupTitleElement ? oldGroupTitleElement.value : null;
10294
10302
  var nGroupTitleEle = newGroupInsMap[k].eleOrderList.find(function (e) {
10295
10303
  return e.key === 'title';
10296
10304
  });
@@ -10319,9 +10327,12 @@ function setGroupInsurance(prodData) {
10319
10327
  var checkedInsurance = checkedInsurances[0];
10320
10328
  // hasRequiredIns:如果组合险中有一款是必选的,则整个组合险为选中状态
10321
10329
  // 所有险种都不可选,则组合险不可修改且不选中。否则,组合险种可选
10322
- nGroupTitleEle.value = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).some(function (opt) {
10330
+ nGroupTitleEle.value = oldGroupTitleValue === false ? oldGroupTitleValue : (nGroupInsuranceIdEle.opts || []).some(function (opt) {
10323
10331
  return !opt.isDisabled;
10324
10332
  });
10333
+ if (hasRequiredIns) {
10334
+ nGroupTitleEle.value = hasRequiredIns;
10335
+ }
10325
10336
  nGroupTitleEle.isDisabled = hasRequiredIns || (nGroupInsuranceIdEle.opts || []).every(function (opt) {
10326
10337
  return !!opt.isDisabled;
10327
10338
  });
@@ -11922,12 +11933,6 @@ var BxtProductInfo = (_dec = Component({
11922
11933
  if (!['title'].includes(eleData.key)) {
11923
11934
  this.requiestRecommendValues();
11924
11935
  }
11925
- setTimeout(function () {
11926
- var refInsuranceForm = get(_this4.$refs, "insuranceForm".concat(insData.key, "[0]"));
11927
- if (refInsuranceForm) {
11928
- refInsuranceForm.validate(eleData.key);
11929
- }
11930
- }, 300);
11931
11936
  this.$nextTick(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
11932
11937
  var errorMsg;
11933
11938
  return _regeneratorRuntime.wrap(function (_context2) {
@@ -11959,11 +11964,11 @@ var BxtProductInfo = (_dec = Component({
11959
11964
  }, {
11960
11965
  key: "changeProduct",
11961
11966
  value: function () {
11962
- var _changeProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(productData, options) {
11967
+ var _changeProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(productData, options) {
11963
11968
  var _this5 = this;
11964
- var $listeners, inputData, verifyData, personData, groupKey, productKey, params, type, insData, eleData, planbookId, publicPbUuid, productVerifyData, eventTarget, errorMsg, hasRevalidateFlag;
11965
- return _regeneratorRuntime.wrap(function (_context3) {
11966
- while (1) switch (_context3.prev = _context3.next) {
11969
+ var $listeners, inputData, verifyData, personData, groupKey, productKey, params, type, insData, eleData, planbookId, publicPbUuid, productVerifyData, eventTarget, errorMsg;
11970
+ return _regeneratorRuntime.wrap(function (_context4) {
11971
+ while (1) switch (_context4.prev = _context4.next) {
11967
11972
  case 0:
11968
11973
  $listeners = this.$listeners, inputData = this.inputData, verifyData = this.verifyData, personData = this.personData, groupKey = this.groupKey, productKey = this.productKey, params = this.params;
11969
11974
  type = options.type, insData = options.insData, eleData = options.eleData;
@@ -11978,7 +11983,7 @@ var BxtProductInfo = (_dec = Component({
11978
11983
  if (type === 'change') {
11979
11984
  clearAddAndTakeAndAdjustBaoeData(productData);
11980
11985
  }
11981
- _context3.next = 1;
11986
+ _context4.next = 1;
11982
11987
  return productDataHandler(productData, productVerifyData, personData, {
11983
11988
  planbookId: planbookId,
11984
11989
  eventTarget: eventTarget
@@ -11996,42 +12001,54 @@ var BxtProductInfo = (_dec = Component({
11996
12001
  eleData: eleData
11997
12002
  });
11998
12003
  if (errorMsg) {
11999
- _context3.next = 3;
12000
- break;
12001
- }
12002
- hasRevalidateFlag = (get(productData, 'mulInsOrderList') || []).some(function (ins) {
12003
- return ins.revalidateFlag;
12004
- });
12005
- if (!(hasRevalidateFlag && $listeners.reCalculate)) {
12006
- _context3.next = 3;
12004
+ _context4.next = 2;
12007
12005
  break;
12008
12006
  }
12009
- _context3.next = 2;
12010
- return new Promise(function (resolve, reject) {
12011
- _this5.$emit('reCalculate', inputData, {
12012
- planbookId: planbookId,
12013
- publicPbUuid: publicPbUuid,
12014
- groupKey: groupKey,
12015
- productKey: productKey,
12016
- isIgnoreError: true,
12017
- eventTarget: eventTarget
12018
- }, resolve, reject);
12019
- }).catch(function (err) {
12020
- errorMsg = get(err, '[0].message') || get(err, 'message');
12021
- });
12007
+ _context4.next = 2;
12008
+ return this.validate().then(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
12009
+ var hasRevalidateFlag;
12010
+ return _regeneratorRuntime.wrap(function (_context3) {
12011
+ while (1) switch (_context3.prev = _context3.next) {
12012
+ case 0:
12013
+ hasRevalidateFlag = (get(productData, 'mulInsOrderList') || []).some(function (ins) {
12014
+ return ins.revalidateFlag;
12015
+ });
12016
+ if (!(hasRevalidateFlag && $listeners.reCalculate)) {
12017
+ _context3.next = 2;
12018
+ break;
12019
+ }
12020
+ _context3.next = 1;
12021
+ return new Promise(function (resolve, reject) {
12022
+ _this5.$emit('reCalculate', inputData, {
12023
+ planbookId: planbookId,
12024
+ publicPbUuid: publicPbUuid,
12025
+ groupKey: groupKey,
12026
+ productKey: productKey,
12027
+ isIgnoreError: true,
12028
+ eventTarget: eventTarget
12029
+ }, resolve, reject);
12030
+ }).catch(function (err) {
12031
+ errorMsg = get(err, '[0].message') || get(err, 'message');
12032
+ });
12033
+ case 1:
12034
+ _context3.next = 2;
12035
+ return productDataHandler(productData, productVerifyData, personData, {
12036
+ planbookId: planbookId,
12037
+ eventTarget: eventTarget
12038
+ });
12039
+ case 2:
12040
+ case "end":
12041
+ return _context3.stop();
12042
+ }
12043
+ }, _callee3);
12044
+ }))).catch(function () {});
12022
12045
  case 2:
12023
- _context3.next = 3;
12024
- return productDataHandler(productData, productVerifyData, personData, {
12025
- planbookId: planbookId,
12026
- eventTarget: eventTarget
12027
- });
12046
+ return _context4.abrupt("return", errorMsg);
12028
12047
  case 3:
12029
- return _context3.abrupt("return", errorMsg);
12030
- case 4:
12031
12048
  case "end":
12032
- return _context3.stop();
12049
+ return _context4.stop();
12033
12050
  }
12034
- }, _callee3, this);
12051
+ }, _callee4, this);
12035
12052
  }));
12036
12053
  function changeProduct(_x, _x2) {
12037
12054
  return _changeProduct.apply(this, arguments);
@@ -12166,16 +12183,16 @@ var BxtProductInfo = (_dec = Component({
12166
12183
  }, {
12167
12184
  key: "validate",
12168
12185
  value: function () {
12169
- var _validate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
12186
+ var _validate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
12170
12187
  var $refs, filterInsuranceList, insKeys;
12171
- return _regeneratorRuntime.wrap(function (_context4) {
12172
- while (1) switch (_context4.prev = _context4.next) {
12188
+ return _regeneratorRuntime.wrap(function (_context5) {
12189
+ while (1) switch (_context5.prev = _context5.next) {
12173
12190
  case 0:
12174
12191
  $refs = this.$refs, filterInsuranceList = this.filterInsuranceList;
12175
12192
  insKeys = filterInsuranceList.map(function (ins) {
12176
12193
  return ins.key;
12177
12194
  });
12178
- return _context4.abrupt("return", new Promise(function (resolve, reject) {
12195
+ return _context5.abrupt("return", new Promise(function (resolve, reject) {
12179
12196
  setTimeout(function () {
12180
12197
  var promises = [];
12181
12198
  var _iterator = _createForOfIteratorHelper(insKeys),
@@ -12202,9 +12219,9 @@ var BxtProductInfo = (_dec = Component({
12202
12219
  }));
12203
12220
  case 1:
12204
12221
  case "end":
12205
- return _context4.stop();
12222
+ return _context5.stop();
12206
12223
  }
12207
- }, _callee4, this);
12224
+ }, _callee5, this);
12208
12225
  }));
12209
12226
  function validate() {
12210
12227
  return _validate.apply(this, arguments);
@@ -12233,27 +12250,27 @@ var BxtProductInfo = (_dec = Component({
12233
12250
  }, {
12234
12251
  key: "requiestRecommendValues",
12235
12252
  value: function () {
12236
- var _requiestRecommendValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
12253
+ var _requiestRecommendValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
12237
12254
  var self, showRecommendValue, recommendValuesCache, inputData, groupData, productData, url, calcData, reqParams, calcInputData, calcProductData;
12238
- return _regeneratorRuntime.wrap(function (_context5) {
12239
- while (1) switch (_context5.prev = _context5.next) {
12255
+ return _regeneratorRuntime.wrap(function (_context6) {
12256
+ while (1) switch (_context6.prev = _context6.next) {
12240
12257
  case 0:
12241
12258
  self = this;
12242
12259
  showRecommendValue = self.showRecommendValue, recommendValuesCache = self.recommendValuesCache, inputData = self.inputData, groupData = self.groupData, productData = self.productData;
12243
12260
  if (showRecommendValue) {
12244
- _context5.next = 1;
12261
+ _context6.next = 1;
12245
12262
  break;
12246
12263
  }
12247
- return _context5.abrupt("return");
12264
+ return _context6.abrupt("return");
12248
12265
  case 1:
12249
12266
  url = "".concat(PLANBOOK_API_HOSTNAME, "/planBook/input/calculate/recommend");
12250
- _context5.next = 2;
12267
+ _context6.next = 2;
12251
12268
  return createdProductDataToCalc(inputData, {
12252
12269
  groupKey: groupData.key,
12253
12270
  productKey: productData.key
12254
12271
  }).catch(function () {});
12255
12272
  case 2:
12256
- calcData = _context5.sent;
12273
+ calcData = _context6.sent;
12257
12274
  reqParams = [];
12258
12275
  calcInputData = calcData && JSON.parse(calcData.jd);
12259
12276
  calcProductData = calcInputData && calcInputData.productGroupList[0].prodOrderList[0];
@@ -12267,13 +12284,13 @@ var BxtProductInfo = (_dec = Component({
12267
12284
  });
12268
12285
  }
12269
12286
  if (!recommendValuesCache[JSON.stringify(reqParams)]) {
12270
- _context5.next = 3;
12287
+ _context6.next = 3;
12271
12288
  break;
12272
12289
  }
12273
12290
  self.recommendValues = recommendValuesCache[JSON.stringify(reqParams)];
12274
- return _context5.abrupt("return");
12291
+ return _context6.abrupt("return");
12275
12292
  case 3:
12276
- return _context5.abrupt("return", fetch(url, {
12293
+ return _context6.abrupt("return", fetch(url, {
12277
12294
  method: 'POST',
12278
12295
  credentials: 'include',
12279
12296
  headers: {
@@ -12283,10 +12300,10 @@ var BxtProductInfo = (_dec = Component({
12283
12300
  body: JSON.stringify(reqParams)
12284
12301
  }).then(function (response) {
12285
12302
  return response.json();
12286
- }).then(function (_ref3) {
12287
- var success = _ref3.success,
12288
- data = _ref3.data,
12289
- info = _ref3.info;
12303
+ }).then(function (_ref4) {
12304
+ var success = _ref4.success,
12305
+ data = _ref4.data,
12306
+ info = _ref4.info;
12290
12307
  if (!success || !data) {
12291
12308
  self.$toast(info);
12292
12309
  return Promise.reject();
@@ -12327,9 +12344,9 @@ var BxtProductInfo = (_dec = Component({
12327
12344
  }));
12328
12345
  case 4:
12329
12346
  case "end":
12330
- return _context5.stop();
12347
+ return _context6.stop();
12331
12348
  }
12332
- }, _callee5, this);
12349
+ }, _callee6, this);
12333
12350
  }));
12334
12351
  function requiestRecommendValues() {
12335
12352
  return _requiestRecommendValues.apply(this, arguments);