Commit 74e7aa0b authored by 郭志伟's avatar 郭志伟

fix: 华贵试算提示问题修复

parent cb98ee30
......@@ -110,7 +110,7 @@ export default {
this.$emit(DATA_CHANGE_EVENT, this.formData);
},
resetFormItemVal(key, val) {
if (this.formData.birth && this.formData[key] && !val) {
if (this.formData.birth && val && this.formData[key] === val) {
switch (key) {
case "amountInsured":
this.$notify({ type: "warning", message: "已超出该年龄承保的最高保额,请重新选择" });
......
export default {
data() {
return {
ageIndexCache: "",
isAgeIndexChange: false
};
},
computed: {
// 场景不同暂不做整合
// age() {
......@@ -16,6 +22,7 @@ export default {
},
ageIndex() {
const { age } = this;
let _index = 0;
const ageRangeList = [
[18, 35],
[31, 35],
......@@ -27,9 +34,17 @@ export default {
];
// 特殊情况
if (31 <= age && age <= 35) {
return 1;
_index = 1;
} else {
_index = ageRangeList.findIndex(item => item[0] <= age && age <= item[1]);
}
return ageRangeList.findIndex(item => item[0] <= age && age <= item[1]);
if (this.ageIndexCache !== _index) {
this.ageIndexCache = _index;
this.isAgeIndexChange = true;
} else {
this.isAgeIndexChange = false;
}
return _index;
},
amountOptions() {
const { ageIndex, countOptions } = this;
......
......@@ -919,7 +919,7 @@ export default {
resetFormItemVal(key, val) {
const currentIdNo = this.getRealIdNo();
const birthday = this.getBirthDate(currentIdNo);
if (birthday && this.formData.productItem[key] && !val) {
if (birthday && this.formData.productItem[key] === val && val) {
switch (key) {
case "amountInsured":
this.$notify({ type: "warning", message: "已超出该年龄承保的最高保额,请重新选择" });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment