[FIX]解决建议书历史遗留bug-年龄校验28天未校验住

This commit is contained in:
yuweiqi
2020-01-22 17:11:52 +08:00
parent 0b22ad0275
commit eecc6957d8
2 changed files with 19 additions and 8 deletions

View File

@@ -766,10 +766,7 @@ export default {
}
} else if (factor.type == 1) {
if (factor.code == 'inputPrem') {
trialInfo['prem'] = factor.moneyUnit == undefined ? Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].displayAmount) * Number
(item.productTrialYearDTOS[this.payEndYearColumnsIndex].moneyUnit) : Number(factor.displayAmount) * Number(factor.moneyUnit)
console.log('==== ', Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].displayAmount))
trialInfo['prem'] = this.isTrial == '0' ? Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].displayAmount) * Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].moneyUnit) : Number(factor.displayAmount) * Number(factor.moneyUnit)
} else {
if (item.isRemit == 0) {
trialInfo['amt'] = Number(factor.displayAmount) * Number(factor.moneyUnit)

View File

@@ -51,7 +51,10 @@
placeholder="被保人职业"
/>
<select-radio class="border-bottom" :radios="medicalRadio" label="有无社保" :value.sync="insured.medical"></select-radio>
<div class="border-bottom"><van-field :readonly="disabled" v-model="insured.age" clearable label="年龄" placeholder="被保人年龄" /></div>
<div class="border-bottom">
<van-field :readonly="disabled" :value="ageShow" @input="changeAge($event)" clearable label="年龄" placeholder="被保人年龄" />
</div>
<!-- <div class="border-bottom"><van-field :readonly="disabled" v-model="insured.age" clearable label="年龄" placeholder="被保人年龄" /></div> -->
<van-field v-model="insured.mobile" :readonly="disabled" clearable label="手机号码" name="手机号码" placeholder="被保人手机号码" v-validate="'mobile'" />
<van-button type="danger" @click="nextStep" class="bottom-btn fs16">下一步</van-button>
@@ -69,6 +72,7 @@ import { CellGroup, Field, Dialog, Toast } from 'vant'
import getAge from '@/assets/js/utils/age.js'
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
import { checkSex, checkRelation } from './rule'
export default {
data() {
return {
@@ -111,7 +115,8 @@ export default {
customerShowPicker: false,
occupationShowPicker: false,
currentPopupIndex: '',
disabled: false
disabled: false,
ageShow: '' //被保人显示年龄
}
},
@@ -136,6 +141,11 @@ export default {
this.insured.medical = '0'
}
},
//设置被保人年龄显示 如果this.insured.age为 -1时显示为空不为1时显示为正常输入值
changeAge(val) {
this.ageShow = val == '-1' ? '0' : val
this.insured.age = val
},
selectClick(index) {
this.currentPopupIndex = index
let title = ''
@@ -304,20 +314,24 @@ export default {
hiddenRight: '1'
}
})
let { customerName, customerSex, birthday, customerPhone, age, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data
console.log('data == ', data)
let { customerName, customerSex, birthday, customerPhone, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data
let age = getAge.getAge(data['birthday'], new Date())
let insured = {
mobile: customerPhone,
birthday,
sex: String(customerSex),
name: customerName,
occupationName,
age: age ? age : '',
age: age,
occupationCode,
lifeGrade,
healthGrade,
medical: socialSecurity ? socialSecurity : '0'
}
console.log('insured.age', insured.age)
Object.assign(this.insured, insured)
console.log('insured == ', insured)
}
},