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