bxs-tools-ui 1.3.8 → 1.3.10

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.
@@ -103,6 +103,8 @@ html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{font-family:system
103
103
  text-align: center;
104
104
  border-radius: 50px;
105
105
  background: rgba(0, 0, 0, 0.04);
106
+ white-space: nowrap;
107
+ overflow: hidden;
106
108
  }
107
109
  .bxt-aat-interest-form .bxt-aatif-item .bxt-aatifi-right .bxt-aatifi-right-options > span.active {
108
110
  color: #0a64fe;
@@ -111,7 +113,6 @@ html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{font-family:system
111
113
  }
112
114
  .bxt-aat-interest-form .bxt-aatif-item .bxt-aatifi-right .bxt-aatifi-right-custom {
113
115
  position: relative;
114
- margin-top: 6px;
115
116
  margin-bottom: 9px;
116
117
  padding: 12px;
117
118
  background: #f4f8ff;
@@ -138,18 +139,6 @@ html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{font-family:system
138
139
  border: 1px solid #d3d3d3;
139
140
  background: #f5f5f5;
140
141
  }
141
- .bxt-aat-interest-form .bxt-aatif-item .bxt-aatifi-right .bxt-aatifi-right-custom::before {
142
- position: absolute;
143
- top: -4px;
144
- left: 20%;
145
- display: inline-block;
146
- width: 10px;
147
- height: 10px;
148
- background: #f4f8ff;
149
- content: '';
150
- -webkit-transform: rotate(45deg);
151
- transform: rotate(45deg);
152
- }
153
142
 
154
143
  :root {
155
144
 
@@ -956,8 +956,8 @@ module.exports = _typeof, module.exports.__esModule = true, module.exports["defa
956
956
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
957
957
 
958
958
  "use strict";
959
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_5337f8c8_prod_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93);
960
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_5337f8c8_prod_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_5337f8c8_prod_lang_css___WEBPACK_IMPORTED_MODULE_0__);
959
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_45d693a2_prod_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93);
960
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_45d693a2_prod_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_45d693a2_prod_lang_css___WEBPACK_IMPORTED_MODULE_0__);
961
961
  /* unused harmony reexport * */
962
962
 
963
963
 
@@ -2909,6 +2909,13 @@ function initInterestData(data) {
2909
2909
  }
2910
2910
  return data;
2911
2911
  }
2912
+ function getBonusDesc(option) {
2913
+ var desc = "".concat(option.description, " ").concat((option.value * 100).toFixed(2), "%");
2914
+ if (option.description.search(/\$/) !== -1) {
2915
+ return "".concat(option.description.replace('$', ''));
2916
+ }
2917
+ return desc;
2918
+ }
2912
2919
  function initInterestFormValues(values, data) {
2913
2920
  if (!values) {
2914
2921
  return values;
@@ -2973,13 +2980,6 @@ function convertInterestFormValues(values, data) {
2973
2980
  };
2974
2981
  return formValues;
2975
2982
  }
2976
- function getBonusDesc(option) {
2977
- var desc = "".concat(option.description, "(").concat((option.value * 100).toFixed(2), "%)");
2978
- if (option.description.search(/\$/) !== -1) {
2979
- return "".concat(option.description.replace('$', ''));
2980
- }
2981
- return desc;
2982
- }
2983
2983
  function getBeginYearOpts(values) {
2984
2984
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2985
2985
  var data = options.data,
@@ -3186,9 +3186,9 @@ function calcColumnsWidth(tableData) {
3186
3186
  // EXTERNAL MODULE: ./packages/components/form-item/select-item.vue + 4 modules
3187
3187
  var select_item = __webpack_require__(17);
3188
3188
 
3189
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/add-and-take/components/interest-items.vue?vue&type=template&id=5337f8c8&
3189
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/add-and-take/components/interest-items.vue?vue&type=template&id=45d693a2&
3190
3190
 
3191
- var interest_itemsvue_type_template_id_5337f8c8_render = function render() {
3191
+ var interest_itemsvue_type_template_id_45d693a2_render = function render() {
3192
3192
  var _vm = this,
3193
3193
  _c = _vm._self._c,
3194
3194
  _setup = _vm._self._setupProxy;
@@ -3252,7 +3252,9 @@ var interest_itemsvue_type_template_id_5337f8c8_render = function render() {
3252
3252
  return _vm.onInputItemValue(item);
3253
3253
  }],
3254
3254
  "change": function change($event) {
3255
- return _vm.onChangeItemValue(item);
3255
+ _vm.$nextTick(function () {
3256
+ return _vm.onChangeItemValue(item);
3257
+ });
3256
3258
  },
3257
3259
  "blur": function blur($event) {
3258
3260
  return _vm.$forceUpdate();
@@ -3268,9 +3270,9 @@ var interest_itemsvue_type_template_id_5337f8c8_render = function render() {
3268
3270
  }, [_c('span', [_vm._v(_vm._s(item.tips))])]) : _vm._e()]) : _vm._e()])]);
3269
3271
  }), 0) : _vm._e();
3270
3272
  };
3271
- var interest_itemsvue_type_template_id_5337f8c8_staticRenderFns = [];
3273
+ var interest_itemsvue_type_template_id_45d693a2_staticRenderFns = [];
3272
3274
 
3273
- // CONCATENATED MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=template&id=5337f8c8&
3275
+ // CONCATENATED MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=template&id=45d693a2&
3274
3276
 
3275
3277
  // CONCATENATED MODULE: ./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./packages/add-and-take/components/interest-items.vue?vue&type=script&lang=ts&
3276
3278
 
@@ -3283,7 +3285,7 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3283
3285
  Object(tslib_es6["d" /* __extends */])(InterestItem, _super);
3284
3286
  function InterestItem() {
3285
3287
  var _this = _super !== null && _super.apply(this, arguments) || this;
3286
- _this.highestRate = 6;
3288
+ _this.MAX_RATE_VALUE = 6;
3287
3289
  _this.historyRateList = [];
3288
3290
  return _this;
3289
3291
  }
@@ -3296,7 +3298,7 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3296
3298
  });
3297
3299
  Object.defineProperty(InterestItem.prototype, "interestItems", {
3298
3300
  get: function () {
3299
- var _a = this, isShowBounsRate = _a.isShowBounsRate, interestInitData = _a.interestInitData, formValue = _a.formValue, params = _a.params, highestRate = _a.highestRate, historyRateList = _a.historyRateList;
3301
+ var _a = this, isShowBounsRate = _a.isShowBounsRate, interestInitData = _a.interestInitData, formValue = _a.formValue, params = _a.params, MAX_RATE_VALUE = _a.MAX_RATE_VALUE, historyRateList = _a.historyRateList;
3300
3302
  if (!interestInitData) {
3301
3303
  return [];
3302
3304
  }
@@ -3315,14 +3317,15 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3315
3317
  var _latestBonusRate = Object(lodash["get"])(_bonusRateData, 'latestYearBonusRate') || Object(lodash["get"])(_bonusRateData, 'latestEndBonusRate');
3316
3318
  var _highestBonusRate = Math.max(Object(lodash["get"])(_bonusRateData, 'highestYearBonusRate') || 0, Object(lodash["get"])(_bonusRateData, 'highestEndBonusRate') || 0);
3317
3319
  if (_latestBonusRate) {
3318
- var _customBonusRate = Object(lodash["get"])(formValue, 'customBonusRate');
3320
+ var _customBonusRate = Object(lodash["get"])(formValue, 'customBonusRate') || _latestBonusRate;
3319
3321
  _bonusOptions.push({
3320
3322
  value: '_custom',
3321
- description: "\u7EA2\u5229\u5229\u76CA\u5B9E\u73B0\u7387" + (_customBonusRate ? ' ' + _customBonusRate + '%' : '')
3323
+ description: "\u7EA2\u5229\u5B9E\u73B0\u7387" + (_customBonusRate ? ' ' + _customBonusRate + '%' : '')
3322
3324
  });
3323
3325
  _bonusItem.maxlength = 3;
3324
3326
  _bonusItem.placeholder = "0 - " + _highestBonusRate;
3325
3327
  _bonusItem.recommendValue = _latestBonusRate;
3328
+ _bonusItem.maxValue = _highestBonusRate;
3326
3329
  _bonusItem.tips = "\u4EE5\u5B98\u7F51\u6700\u8FD1\u7EA2\u5229\u5B9E\u73B0\u7387" + _latestBonusRate + "%\u6F14\u793A";
3327
3330
  }
3328
3331
  }
@@ -3340,15 +3343,16 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3340
3343
  stat: 'zjlqblyqh',
3341
3344
  title: Object(lodash["get"])(interestInitData, 'rate.title'),
3342
3345
  recommendValue: _customRate,
3346
+ maxValue: MAX_RATE_VALUE,
3343
3347
  maxlength: 4,
3344
- placeholder: "0.00 - " + highestRate.toFixed(2),
3345
- tips: _lastHistoryRate ? "\u4EE5\u5B98\u7F51\u6700\u8FD1\u8D26\u6237\u5229\u7387" + _lastHistoryRate + "%\u6F14\u793A" : '',
3348
+ placeholder: "0.00 - " + MAX_RATE_VALUE.toFixed(2),
3349
+ tips: _lastHistoryRate ? "\u4EE5\u5B98\u7F51\u6700\u8FD1\u8D26\u6237\u5229\u7387" + _lastHistoryRate.toFixed(2) + "%\u6F14\u793A" : '',
3346
3350
  options: _rateOptions
3347
3351
  };
3348
3352
  var _isShowcustomRateOption = Object(lodash["get"])(_initFormValues, 'customRate') && _customOption3;
3349
3353
  if (_isShowcustomRateOption) {
3350
3354
  _customOption3.value = '_custom';
3351
- _customOption3.description = _customOption3.description.replace(/\((.+)%\)$/, _customRate ? "(" + _customRate.toFixed(2) + "%)" : '');
3355
+ _customOption3.description = _customOption3.description.replace(/(\d|\.)+/, !isNaN(Number(_customRate)) ? " " + _customRate.toFixed(2) : '');
3352
3356
  }
3353
3357
  _items.push(_rateItem);
3354
3358
  }
@@ -3399,12 +3403,12 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3399
3403
  var _recommendValue = Object(lodash["get"])(item, 'recommendValue');
3400
3404
  if (option.value === '_custom') {
3401
3405
  if (item.key === 'bonus') {
3402
- if (!formValue.customBonusRate || _recommendValue) {
3406
+ if (!formValue.customBonusRate && _recommendValue) {
3403
3407
  formValue.customBonusRate = _recommendValue;
3404
3408
  }
3405
3409
  }
3406
3410
  if (item.key === 'rate') {
3407
- if (!formValue.customRate || _recommendValue) {
3411
+ if (!formValue.customRate && _recommendValue) {
3408
3412
  formValue.customRate = _recommendValue;
3409
3413
  }
3410
3414
  }
@@ -3412,20 +3416,21 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3412
3416
  this.$emit('change', formValue);
3413
3417
  };
3414
3418
  InterestItem.prototype.onClickRecommendValue = function (item) {
3415
- var formValue = this.formValue;
3419
+ var _a = this, formValue = _a.formValue, historyRateList = _a.historyRateList;
3416
3420
  var _recommendValue = Object(lodash["get"])(item, 'recommendValue');
3417
3421
  if (_recommendValue) {
3418
3422
  if (item.key === 'bonus') {
3419
3423
  formValue.customBonusRate = _recommendValue;
3420
3424
  }
3421
3425
  if (item.key === 'rate') {
3422
- formValue.customRate = _recommendValue;
3426
+ var _lastHistoryRate = Object(lodash["get"])(historyRateList, "[" + (historyRateList.length - 1) + "].rate");
3427
+ formValue.customRate = _lastHistoryRate;
3423
3428
  }
3424
3429
  }
3425
3430
  this.$emit('change', formValue);
3426
3431
  };
3427
3432
  InterestItem.prototype.onInputItemValue = function (item) {
3428
- var _a = this, formValue = _a.formValue, highestRate = _a.highestRate;
3433
+ var formValue = this.formValue;
3429
3434
  var _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate';
3430
3435
  if (formValue[_key]) {
3431
3436
  if (item.key === 'bonus') {
@@ -3437,14 +3442,16 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3437
3442
  if (!/^\d{0,1}\.?\d{0,2}$/.test(formValue[_key])) {
3438
3443
  formValue[_key] = null;
3439
3444
  }
3440
- if (formValue[_key] > highestRate) {
3441
- formValue[_key] = highestRate;
3442
- }
3443
3445
  }
3444
3446
  }
3445
3447
  };
3446
3448
  InterestItem.prototype.onChangeItemValue = function (item) {
3447
3449
  var _this = this;
3450
+ var formValue = this.formValue;
3451
+ var _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate';
3452
+ if (item.maxValue && formValue[_key] > item.maxValue) {
3453
+ formValue[_key] = item.maxValue;
3454
+ }
3448
3455
  return this.validate([item.key])
3449
3456
  .then(function () {
3450
3457
  _this.$emit('change', _this.formValue);
@@ -3454,7 +3461,7 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3454
3461
  });
3455
3462
  };
3456
3463
  InterestItem.prototype.validate = function (keys) {
3457
- var _a = this, formValue = _a.formValue, interestInitData = _a.interestInitData, interestItems = _a.interestItems, highestRate = _a.highestRate;
3464
+ var _a = this, formValue = _a.formValue, interestInitData = _a.interestInitData, interestItems = _a.interestItems, MAX_RATE_VALUE = _a.MAX_RATE_VALUE;
3458
3465
  var _keys = keys || (interestItems || []).map(function (e) { return e.key; });
3459
3466
  var _bonusRateData = Object(lodash["get"])(interestInitData, 'bonusRateData');
3460
3467
  var _highestBonusRate = Math.max(Object(lodash["get"])(_bonusRateData, 'highestYearBonusRate') || 0, Object(lodash["get"])(_bonusRateData, 'highestEndBonusRate') || 0);
@@ -3462,10 +3469,10 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3462
3469
  var _key = _keys[k];
3463
3470
  if (formValue[_key] === '_custom') {
3464
3471
  if (_key === 'bonus' && formValue.customBonusRate && formValue.customBonusRate > _highestBonusRate) {
3465
- return Promise.reject("\u7EA2\u5229\u5B9E\u73B0\u7387\u4E0D\u80FD\u5927\u4E8E" + _highestBonusRate);
3472
+ return Promise.reject("\u7EA2\u5229\u5B9E\u73B0\u7387\u4E0D\u80FD\u5927\u4E8E" + _highestBonusRate + "%");
3466
3473
  }
3467
- if (_key === 'rate' && formValue.customRate && formValue.customRate > highestRate) {
3468
- return Promise.reject('请输入假定利率');
3474
+ if (_key === 'rate' && formValue.customRate && formValue.customRate > MAX_RATE_VALUE) {
3475
+ return Promise.reject("\u8D26\u6237\u5229\u7387\u4E0D\u80FD\u5927\u4E8E" + MAX_RATE_VALUE.toFixed(2) + "%");
3469
3476
  }
3470
3477
  }
3471
3478
  }
@@ -3519,8 +3526,8 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
3519
3526
 
3520
3527
  // CONCATENATED MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=script&lang=ts&
3521
3528
  /* harmony default export */ var components_interest_itemsvue_type_script_lang_ts_ = (interest_itemsvue_type_script_lang_ts_);
3522
- // EXTERNAL MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=style&index=0&id=5337f8c8&prod&lang=css&
3523
- var interest_itemsvue_type_style_index_0_id_5337f8c8_prod_lang_css_ = __webpack_require__(124);
3529
+ // EXTERNAL MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=style&index=0&id=45d693a2&prod&lang=css&
3530
+ var interest_itemsvue_type_style_index_0_id_45d693a2_prod_lang_css_ = __webpack_require__(124);
3524
3531
 
3525
3532
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3526
3533
  var componentNormalizer = __webpack_require__(9);
@@ -3536,8 +3543,8 @@ var componentNormalizer = __webpack_require__(9);
3536
3543
 
3537
3544
  var component = Object(componentNormalizer["a" /* default */])(
3538
3545
  components_interest_itemsvue_type_script_lang_ts_,
3539
- interest_itemsvue_type_template_id_5337f8c8_render,
3540
- interest_itemsvue_type_template_id_5337f8c8_staticRenderFns,
3546
+ interest_itemsvue_type_template_id_45d693a2_render,
3547
+ interest_itemsvue_type_template_id_45d693a2_staticRenderFns,
3541
3548
  false,
3542
3549
  null,
3543
3550
  null,
package/lib/index.css CHANGED
@@ -103,6 +103,8 @@ html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{font-family:system
103
103
  text-align: center;
104
104
  border-radius: 50px;
105
105
  background: rgba(0, 0, 0, 0.04);
106
+ white-space: nowrap;
107
+ overflow: hidden;
106
108
  }
107
109
  .bxt-aat-interest-form .bxt-aatif-item .bxt-aatifi-right .bxt-aatifi-right-options > span.active {
108
110
  color: #0a64fe;
@@ -111,7 +113,6 @@ html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{font-family:system
111
113
  }
112
114
  .bxt-aat-interest-form .bxt-aatif-item .bxt-aatifi-right .bxt-aatifi-right-custom {
113
115
  position: relative;
114
- margin-top: 6px;
115
116
  margin-bottom: 9px;
116
117
  padding: 12px;
117
118
  background: #f4f8ff;
@@ -138,18 +139,6 @@ html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{font-family:system
138
139
  border: 1px solid #d3d3d3;
139
140
  background: #f5f5f5;
140
141
  }
141
- .bxt-aat-interest-form .bxt-aatif-item .bxt-aatifi-right .bxt-aatifi-right-custom::before {
142
- position: absolute;
143
- top: -4px;
144
- left: 20%;
145
- display: inline-block;
146
- width: 10px;
147
- height: 10px;
148
- background: #f4f8ff;
149
- content: '';
150
- -webkit-transform: rotate(45deg);
151
- transform: rotate(45deg);
152
- }
153
142
 
154
143
  :root {
155
144
 
package/lib/index.js CHANGED
@@ -25614,8 +25614,8 @@ module.exports = _toPrimitive, module.exports.__esModule = true, module.exports[
25614
25614
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
25615
25615
 
25616
25616
  "use strict";
25617
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_5337f8c8_prod_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52);
25618
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_5337f8c8_prod_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_5337f8c8_prod_lang_css___WEBPACK_IMPORTED_MODULE_0__);
25617
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_45d693a2_prod_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52);
25618
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_45d693a2_prod_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_interest_items_vue_vue_type_style_index_0_id_45d693a2_prod_lang_css___WEBPACK_IMPORTED_MODULE_0__);
25619
25619
  /* unused harmony reexport * */
25620
25620
 
25621
25621
 
@@ -34961,6 +34961,13 @@ function initInterestData(data) {
34961
34961
  }
34962
34962
  return data;
34963
34963
  }
34964
+ function getBonusDesc(option) {
34965
+ var desc = "".concat(option.description, " ").concat((option.value * 100).toFixed(2), "%");
34966
+ if (option.description.search(/\$/) !== -1) {
34967
+ return "".concat(option.description.replace('$', ''));
34968
+ }
34969
+ return desc;
34970
+ }
34964
34971
  function initInterestFormValues(values, data) {
34965
34972
  if (!values) {
34966
34973
  return values;
@@ -35025,13 +35032,6 @@ function convertInterestFormValues(values, data) {
35025
35032
  };
35026
35033
  return formValues;
35027
35034
  }
35028
- function getBonusDesc(option) {
35029
- var desc = "".concat(option.description, "(").concat((option.value * 100).toFixed(2), "%)");
35030
- if (option.description.search(/\$/) !== -1) {
35031
- return "".concat(option.description.replace('$', ''));
35032
- }
35033
- return desc;
35034
- }
35035
35035
  function getBeginYearOpts(values) {
35036
35036
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
35037
35037
  var data = options.data,
@@ -35490,9 +35490,9 @@ var component = normalizeComponent(
35490
35490
  )
35491
35491
 
35492
35492
  /* harmony default export */ var select_item = (component.exports);
35493
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/add-and-take/components/interest-items.vue?vue&type=template&id=5337f8c8&
35493
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/add-and-take/components/interest-items.vue?vue&type=template&id=45d693a2&
35494
35494
 
35495
- var interest_itemsvue_type_template_id_5337f8c8_render = function render() {
35495
+ var interest_itemsvue_type_template_id_45d693a2_render = function render() {
35496
35496
  var _vm = this,
35497
35497
  _c = _vm._self._c,
35498
35498
  _setup = _vm._self._setupProxy;
@@ -35556,7 +35556,9 @@ var interest_itemsvue_type_template_id_5337f8c8_render = function render() {
35556
35556
  return _vm.onInputItemValue(item);
35557
35557
  }],
35558
35558
  "change": function change($event) {
35559
- return _vm.onChangeItemValue(item);
35559
+ _vm.$nextTick(function () {
35560
+ return _vm.onChangeItemValue(item);
35561
+ });
35560
35562
  },
35561
35563
  "blur": function blur($event) {
35562
35564
  return _vm.$forceUpdate();
@@ -35572,9 +35574,9 @@ var interest_itemsvue_type_template_id_5337f8c8_render = function render() {
35572
35574
  }, [_c('span', [_vm._v(_vm._s(item.tips))])]) : _vm._e()]) : _vm._e()])]);
35573
35575
  }), 0) : _vm._e();
35574
35576
  };
35575
- var interest_itemsvue_type_template_id_5337f8c8_staticRenderFns = [];
35577
+ var interest_itemsvue_type_template_id_45d693a2_staticRenderFns = [];
35576
35578
 
35577
- // CONCATENATED MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=template&id=5337f8c8&
35579
+ // CONCATENATED MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=template&id=45d693a2&
35578
35580
 
35579
35581
  // CONCATENATED MODULE: ./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./packages/add-and-take/components/interest-items.vue?vue&type=script&lang=ts&
35580
35582
 
@@ -35587,7 +35589,7 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35587
35589
  Object(tslib_es6["d" /* __extends */])(InterestItem, _super);
35588
35590
  function InterestItem() {
35589
35591
  var _this = _super !== null && _super.apply(this, arguments) || this;
35590
- _this.highestRate = 6;
35592
+ _this.MAX_RATE_VALUE = 6;
35591
35593
  _this.historyRateList = [];
35592
35594
  return _this;
35593
35595
  }
@@ -35600,7 +35602,7 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35600
35602
  });
35601
35603
  Object.defineProperty(InterestItem.prototype, "interestItems", {
35602
35604
  get: function () {
35603
- var _a = this, isShowBounsRate = _a.isShowBounsRate, interestInitData = _a.interestInitData, formValue = _a.formValue, params = _a.params, highestRate = _a.highestRate, historyRateList = _a.historyRateList;
35605
+ var _a = this, isShowBounsRate = _a.isShowBounsRate, interestInitData = _a.interestInitData, formValue = _a.formValue, params = _a.params, MAX_RATE_VALUE = _a.MAX_RATE_VALUE, historyRateList = _a.historyRateList;
35604
35606
  if (!interestInitData) {
35605
35607
  return [];
35606
35608
  }
@@ -35619,14 +35621,15 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35619
35621
  var _latestBonusRate = Object(lodash["get"])(_bonusRateData, 'latestYearBonusRate') || Object(lodash["get"])(_bonusRateData, 'latestEndBonusRate');
35620
35622
  var _highestBonusRate = Math.max(Object(lodash["get"])(_bonusRateData, 'highestYearBonusRate') || 0, Object(lodash["get"])(_bonusRateData, 'highestEndBonusRate') || 0);
35621
35623
  if (_latestBonusRate) {
35622
- var _customBonusRate = Object(lodash["get"])(formValue, 'customBonusRate');
35624
+ var _customBonusRate = Object(lodash["get"])(formValue, 'customBonusRate') || _latestBonusRate;
35623
35625
  _bonusOptions.push({
35624
35626
  value: '_custom',
35625
- description: "\u7EA2\u5229\u5229\u76CA\u5B9E\u73B0\u7387" + (_customBonusRate ? ' ' + _customBonusRate + '%' : '')
35627
+ description: "\u7EA2\u5229\u5B9E\u73B0\u7387" + (_customBonusRate ? ' ' + _customBonusRate + '%' : '')
35626
35628
  });
35627
35629
  _bonusItem.maxlength = 3;
35628
35630
  _bonusItem.placeholder = "0 - " + _highestBonusRate;
35629
35631
  _bonusItem.recommendValue = _latestBonusRate;
35632
+ _bonusItem.maxValue = _highestBonusRate;
35630
35633
  _bonusItem.tips = "\u4EE5\u5B98\u7F51\u6700\u8FD1\u7EA2\u5229\u5B9E\u73B0\u7387" + _latestBonusRate + "%\u6F14\u793A";
35631
35634
  }
35632
35635
  }
@@ -35644,15 +35647,16 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35644
35647
  stat: 'zjlqblyqh',
35645
35648
  title: Object(lodash["get"])(interestInitData, 'rate.title'),
35646
35649
  recommendValue: _customRate,
35650
+ maxValue: MAX_RATE_VALUE,
35647
35651
  maxlength: 4,
35648
- placeholder: "0.00 - " + highestRate.toFixed(2),
35649
- tips: _lastHistoryRate ? "\u4EE5\u5B98\u7F51\u6700\u8FD1\u8D26\u6237\u5229\u7387" + _lastHistoryRate + "%\u6F14\u793A" : '',
35652
+ placeholder: "0.00 - " + MAX_RATE_VALUE.toFixed(2),
35653
+ tips: _lastHistoryRate ? "\u4EE5\u5B98\u7F51\u6700\u8FD1\u8D26\u6237\u5229\u7387" + _lastHistoryRate.toFixed(2) + "%\u6F14\u793A" : '',
35650
35654
  options: _rateOptions
35651
35655
  };
35652
35656
  var _isShowcustomRateOption = Object(lodash["get"])(_initFormValues, 'customRate') && _customOption3;
35653
35657
  if (_isShowcustomRateOption) {
35654
35658
  _customOption3.value = '_custom';
35655
- _customOption3.description = _customOption3.description.replace(/\((.+)%\)$/, _customRate ? "(" + _customRate.toFixed(2) + "%)" : '');
35659
+ _customOption3.description = _customOption3.description.replace(/(\d|\.)+/, !isNaN(Number(_customRate)) ? " " + _customRate.toFixed(2) : '');
35656
35660
  }
35657
35661
  _items.push(_rateItem);
35658
35662
  }
@@ -35703,12 +35707,12 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35703
35707
  var _recommendValue = Object(lodash["get"])(item, 'recommendValue');
35704
35708
  if (option.value === '_custom') {
35705
35709
  if (item.key === 'bonus') {
35706
- if (!formValue.customBonusRate || _recommendValue) {
35710
+ if (!formValue.customBonusRate && _recommendValue) {
35707
35711
  formValue.customBonusRate = _recommendValue;
35708
35712
  }
35709
35713
  }
35710
35714
  if (item.key === 'rate') {
35711
- if (!formValue.customRate || _recommendValue) {
35715
+ if (!formValue.customRate && _recommendValue) {
35712
35716
  formValue.customRate = _recommendValue;
35713
35717
  }
35714
35718
  }
@@ -35716,20 +35720,21 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35716
35720
  this.$emit('change', formValue);
35717
35721
  };
35718
35722
  InterestItem.prototype.onClickRecommendValue = function (item) {
35719
- var formValue = this.formValue;
35723
+ var _a = this, formValue = _a.formValue, historyRateList = _a.historyRateList;
35720
35724
  var _recommendValue = Object(lodash["get"])(item, 'recommendValue');
35721
35725
  if (_recommendValue) {
35722
35726
  if (item.key === 'bonus') {
35723
35727
  formValue.customBonusRate = _recommendValue;
35724
35728
  }
35725
35729
  if (item.key === 'rate') {
35726
- formValue.customRate = _recommendValue;
35730
+ var _lastHistoryRate = Object(lodash["get"])(historyRateList, "[" + (historyRateList.length - 1) + "].rate");
35731
+ formValue.customRate = _lastHistoryRate;
35727
35732
  }
35728
35733
  }
35729
35734
  this.$emit('change', formValue);
35730
35735
  };
35731
35736
  InterestItem.prototype.onInputItemValue = function (item) {
35732
- var _a = this, formValue = _a.formValue, highestRate = _a.highestRate;
35737
+ var formValue = this.formValue;
35733
35738
  var _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate';
35734
35739
  if (formValue[_key]) {
35735
35740
  if (item.key === 'bonus') {
@@ -35741,14 +35746,16 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35741
35746
  if (!/^\d{0,1}\.?\d{0,2}$/.test(formValue[_key])) {
35742
35747
  formValue[_key] = null;
35743
35748
  }
35744
- if (formValue[_key] > highestRate) {
35745
- formValue[_key] = highestRate;
35746
- }
35747
35749
  }
35748
35750
  }
35749
35751
  };
35750
35752
  InterestItem.prototype.onChangeItemValue = function (item) {
35751
35753
  var _this = this;
35754
+ var formValue = this.formValue;
35755
+ var _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate';
35756
+ if (item.maxValue && formValue[_key] > item.maxValue) {
35757
+ formValue[_key] = item.maxValue;
35758
+ }
35752
35759
  return this.validate([item.key])
35753
35760
  .then(function () {
35754
35761
  _this.$emit('change', _this.formValue);
@@ -35758,7 +35765,7 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35758
35765
  });
35759
35766
  };
35760
35767
  InterestItem.prototype.validate = function (keys) {
35761
- var _a = this, formValue = _a.formValue, interestInitData = _a.interestInitData, interestItems = _a.interestItems, highestRate = _a.highestRate;
35768
+ var _a = this, formValue = _a.formValue, interestInitData = _a.interestInitData, interestItems = _a.interestItems, MAX_RATE_VALUE = _a.MAX_RATE_VALUE;
35762
35769
  var _keys = keys || (interestItems || []).map(function (e) { return e.key; });
35763
35770
  var _bonusRateData = Object(lodash["get"])(interestInitData, 'bonusRateData');
35764
35771
  var _highestBonusRate = Math.max(Object(lodash["get"])(_bonusRateData, 'highestYearBonusRate') || 0, Object(lodash["get"])(_bonusRateData, 'highestEndBonusRate') || 0);
@@ -35766,10 +35773,10 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35766
35773
  var _key = _keys[k];
35767
35774
  if (formValue[_key] === '_custom') {
35768
35775
  if (_key === 'bonus' && formValue.customBonusRate && formValue.customBonusRate > _highestBonusRate) {
35769
- return Promise.reject("\u7EA2\u5229\u5B9E\u73B0\u7387\u4E0D\u80FD\u5927\u4E8E" + _highestBonusRate);
35776
+ return Promise.reject("\u7EA2\u5229\u5B9E\u73B0\u7387\u4E0D\u80FD\u5927\u4E8E" + _highestBonusRate + "%");
35770
35777
  }
35771
- if (_key === 'rate' && formValue.customRate && formValue.customRate > highestRate) {
35772
- return Promise.reject('请输入假定利率');
35778
+ if (_key === 'rate' && formValue.customRate && formValue.customRate > MAX_RATE_VALUE) {
35779
+ return Promise.reject("\u8D26\u6237\u5229\u7387\u4E0D\u80FD\u5927\u4E8E" + MAX_RATE_VALUE.toFixed(2) + "%");
35773
35780
  }
35774
35781
  }
35775
35782
  }
@@ -35823,8 +35830,8 @@ var interest_itemsvue_type_script_lang_ts_InterestItem = (function (_super) {
35823
35830
 
35824
35831
  // CONCATENATED MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=script&lang=ts&
35825
35832
  /* harmony default export */ var components_interest_itemsvue_type_script_lang_ts_ = (interest_itemsvue_type_script_lang_ts_);
35826
- // EXTERNAL MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=style&index=0&id=5337f8c8&prod&lang=css&
35827
- var interest_itemsvue_type_style_index_0_id_5337f8c8_prod_lang_css_ = __webpack_require__(97);
35833
+ // EXTERNAL MODULE: ./packages/add-and-take/components/interest-items.vue?vue&type=style&index=0&id=45d693a2&prod&lang=css&
35834
+ var interest_itemsvue_type_style_index_0_id_45d693a2_prod_lang_css_ = __webpack_require__(97);
35828
35835
 
35829
35836
  // CONCATENATED MODULE: ./packages/add-and-take/components/interest-items.vue
35830
35837
 
@@ -35837,8 +35844,8 @@ var interest_itemsvue_type_style_index_0_id_5337f8c8_prod_lang_css_ = __webpack_
35837
35844
 
35838
35845
  var interest_items_component = normalizeComponent(
35839
35846
  components_interest_itemsvue_type_script_lang_ts_,
35840
- interest_itemsvue_type_template_id_5337f8c8_render,
35841
- interest_itemsvue_type_template_id_5337f8c8_staticRenderFns,
35847
+ interest_itemsvue_type_template_id_45d693a2_render,
35848
+ interest_itemsvue_type_template_id_45d693a2_staticRenderFns,
35842
35849
  false,
35843
35850
  null,
35844
35851
  null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bxs-tools-ui",
3
- "version": "1.3.8",
3
+ "version": "1.3.10",
4
4
  "description": "微易前端业务组件",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -35,6 +35,8 @@
35
35
  text-align: center;
36
36
  border-radius: 50px;
37
37
  background: rgba(0, 0, 0, 0.04);
38
+ white-space: nowrap;
39
+ overflow: hidden;
38
40
  }
39
41
 
40
42
  & > span.active {
@@ -46,7 +48,6 @@
46
48
 
47
49
  & .bxt-aatifi-right-custom {
48
50
  position: relative;
49
- margin-top: 6px;
50
51
  margin-bottom: 9px;
51
52
  padding: 12px;
52
53
  background: #f4f8ff;
@@ -80,18 +81,6 @@
80
81
  }
81
82
  }
82
83
  }
83
-
84
- & .bxt-aatifi-right-custom::before {
85
- position: absolute;
86
- top: -4px;
87
- left: 20%;
88
- display: inline-block;
89
- width: 10px;
90
- height: 10px;
91
- background: #f4f8ff;
92
- content: '';
93
- transform: rotate(45deg);
94
- }
95
84
  }
96
85
  }
97
86
  }
@@ -38,7 +38,7 @@
38
38
  :maxlength="item.maxlength"
39
39
  :placeholder="item.placeholder"
40
40
  @input="onInputItemValue(item)"
41
- @change="onChangeItemValue(item)"
41
+ @change="$nextTick(() => onChangeItemValue(item))"
42
42
  />
43
43
  <span> % </span>
44
44
  </div>
@@ -94,7 +94,7 @@ export default class InterestItem extends Vue {
94
94
  })
95
95
  params: any;
96
96
 
97
- highestRate = 6;
97
+ MAX_RATE_VALUE = 6;
98
98
  historyRateList: any = [];
99
99
 
100
100
  get isShowBounsRate() {
@@ -102,7 +102,7 @@ export default class InterestItem extends Vue {
102
102
  }
103
103
 
104
104
  get interestItems() {
105
- const { isShowBounsRate, interestInitData, formValue, params, highestRate, historyRateList } = this;
105
+ const { isShowBounsRate, interestInitData, formValue, params, MAX_RATE_VALUE, historyRateList } = this;
106
106
  if (!interestInitData) {
107
107
  return [];
108
108
  }
@@ -125,14 +125,15 @@ export default class InterestItem extends Vue {
125
125
  _get(_bonusRateData, 'highestEndBonusRate') || 0
126
126
  );
127
127
  if (_latestBonusRate) {
128
- const _customBonusRate = _get(formValue, 'customBonusRate');
128
+ const _customBonusRate = _get(formValue, 'customBonusRate') || _latestBonusRate;
129
129
  _bonusOptions.push({
130
130
  value: '_custom',
131
- description: `红利利益实现率${_customBonusRate ? ' ' + _customBonusRate + '%' : ''}`
131
+ description: `红利实现率${_customBonusRate ? ' ' + _customBonusRate + '%' : ''}`
132
132
  });
133
133
  _bonusItem.maxlength = 3;
134
134
  _bonusItem.placeholder = `0 - ${_highestBonusRate}`;
135
135
  _bonusItem.recommendValue = _latestBonusRate;
136
+ _bonusItem.maxValue = _highestBonusRate;
136
137
  _bonusItem.tips = `以官网最近红利实现率${_latestBonusRate}%演示`;
137
138
  }
138
139
  }
@@ -151,9 +152,10 @@ export default class InterestItem extends Vue {
151
152
  stat: 'zjlqblyqh',
152
153
  title: _get(interestInitData, 'rate.title'),
153
154
  recommendValue: _customRate,
155
+ maxValue: MAX_RATE_VALUE,
154
156
  maxlength: 4,
155
- placeholder: `0.00 - ${highestRate.toFixed(2)}`,
156
- tips: _lastHistoryRate ? `以官网最近账户利率${_lastHistoryRate}%演示` : '',
157
+ placeholder: `0.00 - ${MAX_RATE_VALUE.toFixed(2)}`,
158
+ tips: _lastHistoryRate ? `以官网最近账户利率${_lastHistoryRate.toFixed(2)}%演示` : '',
157
159
  options: _rateOptions
158
160
  };
159
161
 
@@ -161,8 +163,8 @@ export default class InterestItem extends Vue {
161
163
  if (_isShowcustomRateOption) {
162
164
  _customOption3.value = '_custom';
163
165
  _customOption3.description = _customOption3.description.replace(
164
- /\((.+)%\)$/,
165
- _customRate ? `(${_customRate.toFixed(2)}%)` : ''
166
+ /(\d|\.)+/,
167
+ !isNaN(Number(_customRate)) ? ` ${_customRate.toFixed(2)}` : ''
166
168
  );
167
169
  }
168
170
 
@@ -206,12 +208,12 @@ export default class InterestItem extends Vue {
206
208
  const _recommendValue = _get(item, 'recommendValue');
207
209
  if (option.value === '_custom') {
208
210
  if (item.key === 'bonus') {
209
- if (!formValue.customBonusRate || _recommendValue) {
211
+ if (!formValue.customBonusRate && _recommendValue) {
210
212
  formValue.customBonusRate = _recommendValue;
211
213
  }
212
214
  }
213
215
  if (item.key === 'rate') {
214
- if (!formValue.customRate || _recommendValue) {
216
+ if (!formValue.customRate && _recommendValue) {
215
217
  formValue.customRate = _recommendValue;
216
218
  }
217
219
  }
@@ -220,21 +222,22 @@ export default class InterestItem extends Vue {
220
222
  }
221
223
 
222
224
  onClickRecommendValue(item) {
223
- const { formValue } = this;
225
+ const { formValue, historyRateList } = this;
224
226
  const _recommendValue = _get(item, 'recommendValue');
225
227
  if (_recommendValue) {
226
228
  if (item.key === 'bonus') {
227
229
  formValue.customBonusRate = _recommendValue;
228
230
  }
229
231
  if (item.key === 'rate') {
230
- formValue.customRate = _recommendValue;
232
+ const _lastHistoryRate = _get(historyRateList, `[${historyRateList.length - 1}].rate`);
233
+ formValue.customRate = _lastHistoryRate;
231
234
  }
232
235
  }
233
236
  this.$emit('change', formValue);
234
237
  }
235
238
 
236
239
  onInputItemValue(item) {
237
- const { formValue, highestRate } = this;
240
+ const { formValue } = this;
238
241
  const _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate';
239
242
  if (formValue[_key]) {
240
243
  if (item.key === 'bonus') {
@@ -246,14 +249,16 @@ export default class InterestItem extends Vue {
246
249
  if (!/^\d{0,1}\.?\d{0,2}$/.test(formValue[_key])) {
247
250
  formValue[_key] = null;
248
251
  }
249
- if (formValue[_key] > highestRate) {
250
- formValue[_key] = highestRate;
251
- }
252
252
  }
253
253
  }
254
254
  }
255
255
 
256
256
  onChangeItemValue(item) {
257
+ const { formValue } = this;
258
+ const _key = item.key === 'bonus' ? 'customBonusRate' : 'customRate';
259
+ if (item.maxValue && formValue[_key] > item.maxValue) {
260
+ formValue[_key] = item.maxValue;
261
+ }
257
262
  return this.validate([item.key])
258
263
  .then(() => {
259
264
  this.$emit('change', this.formValue);
@@ -264,7 +269,7 @@ export default class InterestItem extends Vue {
264
269
  }
265
270
 
266
271
  validate(keys) {
267
- const { formValue, interestInitData, interestItems, highestRate } = this;
272
+ const { formValue, interestInitData, interestItems, MAX_RATE_VALUE } = this;
268
273
  const _keys = keys || (interestItems || []).map(e => e.key);
269
274
  const _bonusRateData = _get(interestInitData, 'bonusRateData');
270
275
  const _highestBonusRate = Math.max(
@@ -275,10 +280,10 @@ export default class InterestItem extends Vue {
275
280
  const _key = _keys[k];
276
281
  if (formValue[_key] === '_custom') {
277
282
  if (_key === 'bonus' && formValue.customBonusRate && formValue.customBonusRate > _highestBonusRate) {
278
- return Promise.reject(`红利实现率不能大于${_highestBonusRate}`);
283
+ return Promise.reject(`红利实现率不能大于${_highestBonusRate}%`);
279
284
  }
280
- if (_key === 'rate' && formValue.customRate && formValue.customRate > highestRate) {
281
- return Promise.reject('请输入假定利率');
285
+ if (_key === 'rate' && formValue.customRate && formValue.customRate > MAX_RATE_VALUE) {
286
+ return Promise.reject(`账户利率不能大于${MAX_RATE_VALUE.toFixed(2)}%`);
282
287
  }
283
288
  }
284
289
  }
@@ -33,6 +33,14 @@ export function initInterestData(data) {
33
33
  return data;
34
34
  }
35
35
 
36
+ export function getBonusDesc(option) {
37
+ let desc = `${option.description} ${(option.value * 100).toFixed(2)}%`;
38
+ if (option.description.search(/\$/) !== -1) {
39
+ return `${option.description.replace('$', '')}`;
40
+ }
41
+ return desc;
42
+ }
43
+
36
44
  export function initInterestFormValues(values, data) {
37
45
  if (!values) {
38
46
  return values;
@@ -100,14 +108,6 @@ export function convertInterestFormValues(values, data) {
100
108
  return formValues;
101
109
  }
102
110
 
103
- export function getBonusDesc(option) {
104
- let desc = `${option.description}(${(option.value * 100).toFixed(2)}%)`;
105
- if (option.description.search(/\$/) !== -1) {
106
- return `${option.description.replace('$', '')}`;
107
- }
108
- return desc;
109
- }
110
-
111
111
  export function getBeginYearOpts(values, options = {}) {
112
112
  const { data, startPolicyNo, startIndex, age, adjustData } = options;
113
113
  if (!data) {
@@ -163,8 +163,8 @@
163
163
  :scene="3"
164
164
  :input-data="inputData"
165
165
  :resultData="{
166
- // uuid: 'e34ac050a9f14bc2a821dd6833f803cf', // 7080-追加领取 uuid(测试)
167
- uuid: 'a25ae1bc496045248bb4082e31fa2aec', // 11661-减保领取 uuid(测试)
166
+ uuid: 'e34ac050a9f14bc2a821dd6833f803cf', // 7080-追加领取 uuid(测试)
167
+ // uuid: 'a25ae1bc496045248bb4082e31fa2aec', // 11661-减保领取 uuid(测试)
168
168
  // uuid: 'c387da25d0f34d35a4e40d1a1d27c5cb', // 5167-减保领取 uuid(测试)
169
169
  insuredAge: 30,
170
170
  accountData: {