mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 18:06:44 +08:00
【建议书优化需求】试算页面不填写姓名时展示性别+年龄,如:男30岁(不落库)
This commit is contained in:
@@ -607,7 +607,14 @@ export default {
|
||||
//获取被保险人信息
|
||||
if (this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) {
|
||||
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||
if (this.isFrom == 'proposal' && !this.saleInsuredPersonInfo.name) {
|
||||
this.saleInsuredPersonInfo.age = this.saleInsuredPersonInfo.insuredAge
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
let sex = this.saleInsuredPersonInfo.sex == '0'?'男':'女'
|
||||
this.saleInsuredPersonInfo.name = sex + this.saleInsuredPersonInfo.age
|
||||
}
|
||||
}
|
||||
|
||||
// this.cvalidateFlag = (this.activeType == 'KMH'||this.activeType == 'SQY') && this.isFrom != 'proposal'
|
||||
// this.cvalidateStr = this.cvalidateFlag?this.activeType == 'KMH'?'2021-01-01':this.activeType == 'SQY'?'2021-06-01':'':''
|
||||
//GFRS-2552【需求】关于金掌桂投保流程增设指定生效日按钮的申请
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
class="border-bottom"
|
||||
@nameChange="nameChange"
|
||||
@on-choose="chooseCustomer"
|
||||
v-validate="'required|name'"
|
||||
:required="true"
|
||||
name="投保人"
|
||||
label="姓名"
|
||||
@on-click="selectClick('1')"
|
||||
@@ -122,6 +120,11 @@ export default {
|
||||
}
|
||||
let res = await getDetail(proposalInfoDTO)
|
||||
this.appntDTO = res.content[0].appntDTO
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
if(!this.appntDTO.name){
|
||||
let sex = this.appntDTO.sex == '0'?'男':'女'
|
||||
this.appntDTO.name = sex+this.appntDTO.age
|
||||
}
|
||||
}
|
||||
},
|
||||
stepIn() {
|
||||
@@ -245,6 +248,12 @@ export default {
|
||||
},
|
||||
|
||||
nextStep() {
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
let sex = this.appntDTO.sex == '0'?'男':'女'
|
||||
let name = sex + this.appntDTO.age
|
||||
if(this.appntDTO.name == name){
|
||||
this.appntDTO.name = ''
|
||||
}
|
||||
this.appntDTO.age = String(this.appntDTO.age)
|
||||
this.$validator.validate().then(valid => {
|
||||
if (true === valid) {
|
||||
@@ -291,6 +300,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
body{
|
||||
overscroll-behavior-y: contain;
|
||||
}
|
||||
.proposal-appnt {
|
||||
.van-cell:not(:last-child)::after {
|
||||
display: none;
|
||||
|
||||
@@ -151,6 +151,11 @@ export default {
|
||||
this.proposalInfo = res.content[0]
|
||||
if (this.chooseList != null) {
|
||||
this.chooseList.forEach(v => {
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
if(!v.name){
|
||||
let sex = v.sex == '0'?'男':'女'
|
||||
v.name = sex + v.insuredAge
|
||||
}
|
||||
//addtion数组中筛选出附加险
|
||||
v.riskDTOLst.forEach(s => {
|
||||
s.addtion = []
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
class="border-bottom"
|
||||
@nameChange="nameChange"
|
||||
@on-choose="chooseCustomer"
|
||||
v-validate="'required|name'"
|
||||
name="被保险人"
|
||||
required
|
||||
:readonly="disabled"
|
||||
label="姓名"
|
||||
@on-click="selectClick('1')"
|
||||
@@ -106,7 +104,7 @@ export default {
|
||||
currentTime: beforeDate.getBeforeDays(28),
|
||||
insured: {
|
||||
name: '',
|
||||
age: '',
|
||||
insuredAge: '',
|
||||
sex: '0',
|
||||
birthday: '',
|
||||
occupationCode: '',
|
||||
@@ -134,7 +132,7 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
watch: {
|
||||
'insured.age': {
|
||||
'insured.insuredAge': {
|
||||
handler(newVal) {
|
||||
this.ageShow = newVal == '-1' ? '' : newVal
|
||||
},
|
||||
@@ -153,10 +151,15 @@ export default {
|
||||
//如果是投被同人 就将投保人信息存入被保险人信息
|
||||
this.disabled = true
|
||||
this.insured = Object.assign(this.insured, JSON.parse(this.$CacheUtils.getLocItem('proposalAppnt')))
|
||||
this.insured.age = getAge.getAge(this.insured.birthday, new Date())
|
||||
this.insured.insuredAge = getAge.getAge(this.insured.birthday, new Date())
|
||||
this.insured.medical = localStorage.orderNoSocialSecurity === '1' ? '1' : '0'
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
if(!this.insured.name){
|
||||
let sex = this.insured.sex == '0'?'男':'女'
|
||||
this.insured.name = sex + this.insured.insuredAge
|
||||
}
|
||||
}
|
||||
this.ageShow = this.insured.age == '-1' ? '0' : this.insured.age
|
||||
this.ageShow = this.insured.insuredAge == '-1' ? '0' : this.insured.insuredAge
|
||||
this.$jump({
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
@@ -171,7 +174,7 @@ export default {
|
||||
//设置被保险人年龄显示 如果this.insured.age为 -1时显示为空,不为1时显示为正常输入值
|
||||
changeAgeInput(val) {
|
||||
// this.ageShow = val == '-1' ? '0' : val
|
||||
this.insured.age = val
|
||||
this.insured.insuredAge = val
|
||||
},
|
||||
selectClick(index) {
|
||||
this.currentPopupIndex = index
|
||||
@@ -236,8 +239,8 @@ export default {
|
||||
this.insured.name = data
|
||||
},
|
||||
dateConfirm(data) {
|
||||
let age = getAge.getAge(data, new Date())
|
||||
this.insured.age = age
|
||||
let insuredAge = getAge.getAge(data, new Date())
|
||||
this.insured.insuredAge = insuredAge
|
||||
},
|
||||
//点击下一步
|
||||
nextStep() {
|
||||
@@ -245,12 +248,12 @@ export default {
|
||||
|
||||
//localStorage.setItem('proposalMedical', this.insured.medical == '0' ? '1' : '0')
|
||||
localStorage.proposalMedical = this.insured.medical == '0' ? '1' : '0'
|
||||
this.insured.age = String(this.insured.age)
|
||||
this.insured.insuredAge = String(this.insured.insuredAge)
|
||||
let cacheSex = JSON.parse(this.$CacheUtils.getLocItem('proposalAppnt')).sex
|
||||
let localSex = this.insured.sex
|
||||
let relation = this.localInfo.relationToAppnt
|
||||
let resultSex = checkSex(cacheSex, localSex, relation)
|
||||
let resultRelation = checkRelation(relation, this.insured.age)
|
||||
let resultRelation = checkRelation(relation, this.insured.insuredAge)
|
||||
if (!resultSex) {
|
||||
return Toast.fail('被保险人性别有误')
|
||||
}
|
||||
@@ -321,6 +324,12 @@ export default {
|
||||
},
|
||||
//主流程
|
||||
mainPath() {
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
let sex = this.insured.sex == '0'?'男':'女'
|
||||
let name = sex + this.insured.insuredAge
|
||||
if(this.insured.name == name){
|
||||
this.insured.name = ''
|
||||
}
|
||||
let proposalOrderNo = this.$route.query.proposalOrderNo || this.$CacheUtils.getLocItem('proposalNo') || ''
|
||||
localStorage.isFrom = 'proposal'
|
||||
let insuredInfo = {}
|
||||
@@ -351,9 +360,9 @@ export default {
|
||||
})
|
||||
console.log('data == ', data)
|
||||
let { customerName, customerSex, birthday, customerPhone, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data
|
||||
let age = ''
|
||||
let insuredAge = ''
|
||||
try {
|
||||
age = getAge.getAge(data['birthday'], new Date())
|
||||
insuredAge = getAge.getAge(data['birthday'], new Date())
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -363,13 +372,13 @@ export default {
|
||||
sex: customerSex ? customerSex.toString() : '0',
|
||||
name: customerName,
|
||||
occupationName: occupationName,
|
||||
age: age,
|
||||
insuredAge: insuredAge,
|
||||
occupationCode: occupationCode,
|
||||
lifeGrade: lifeGrade,
|
||||
healthGrade: healthGrade,
|
||||
medical: socialSecurity ? socialSecurity : '0'
|
||||
}
|
||||
console.log('insured.age', insured.age)
|
||||
console.log('insured.insuredAge', insured.insuredAge)
|
||||
Object.assign(this.insured, insured)
|
||||
console.log('insured == ', insured)
|
||||
}
|
||||
|
||||
@@ -482,6 +482,11 @@ export default {
|
||||
this.pageShowInfo.showInsuredDTO
|
||||
this.pageShowInfo.insuredDTOs.map(item => {
|
||||
if (item.insuredId == insureId) {
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
if(!item.name){
|
||||
let sex = item.sex == '0'?'男':'女'
|
||||
item.name = sex + item.insuredAge
|
||||
}
|
||||
this.pageShowInfo.showInsuredDTO = item
|
||||
that.$forceUpdate()
|
||||
return
|
||||
@@ -697,6 +702,11 @@ export default {
|
||||
orderDTO.insuredDTOs.forEach(v => {
|
||||
//根据数据字典 获取当前值
|
||||
v.age = getAge.getAge(v.birthdayLabel, new Date())
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
if(!v.name){
|
||||
let sex = v.sex == '0'?'男':'女'
|
||||
v.name = sex + v.insuredAge
|
||||
}
|
||||
v.riskDTOLstNew = []
|
||||
v.riskDTOLst.forEach(risk => {
|
||||
if (risk.isMainRisk == '0') {
|
||||
|
||||
Reference in New Issue
Block a user