mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 19:16:43 +08:00
feat: 添加投保人信息补充
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="calculate-premium-container pt10 pb100 redRadioCheckbox">
|
||||
<!--用户信息详情-->
|
||||
<insured-message-info :insuredInfo="saleInsuredPersonInfo" v-if="showSaleInsuredPersionInfo"/>
|
||||
<!--投保人信息详情-->
|
||||
<insured-message-info :insuredInfo="saleInsuredInfo" v-if="persionMessageInfo" type="applicant" />
|
||||
<!--被保人信息详情-->
|
||||
<insured-message-info :insuredInfo="saleInsuredPersonInfo" v-if="persionMessageInfo" type="insured" />
|
||||
|
||||
<div v-for="(item, index) in chooseProducts" :key="index" class="ph10 bg-white">
|
||||
<div class="flex justify-content-s align-items-c border-bottom pv10">
|
||||
@@ -470,7 +472,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
components:{
|
||||
components: {
|
||||
AddtionRiskList,
|
||||
[Tag.name]: Tag,
|
||||
[Icon.name]: Icon,
|
||||
@@ -492,7 +494,7 @@ export default {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
showSaleInsuredPersionInfo:{
|
||||
persionMessageInfo: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
@@ -513,13 +515,13 @@ export default {
|
||||
productIndex: '',
|
||||
calFactorIndex: '',
|
||||
premiumData: [], //试算
|
||||
saleInsuredInfo: {},
|
||||
saleInsuredInfo: syncLocalstorageData(
|
||||
{ sex: '0', birthday: '' }, //投保人信息
|
||||
{ name: 'saleInsuredInfo' }
|
||||
),
|
||||
saleInsuredPersonInfo: syncLocalstorageData(
|
||||
{
|
||||
sex: '0',
|
||||
birthday: ""
|
||||
}, //投保人信息,
|
||||
{ name: 'saleInsuredPersonInfo'}
|
||||
{ sex: '0', birthday: '' }, //投保人信息
|
||||
{ name: 'saleInsuredPersonInfo' }
|
||||
),
|
||||
trialList: [],
|
||||
popupShow: false,
|
||||
@@ -583,7 +585,7 @@ export default {
|
||||
console.log(res, info)
|
||||
if (res !== -1) {
|
||||
return res.length === keys.length
|
||||
}else return false
|
||||
} else return false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -3607,7 +3609,15 @@ export default {
|
||||
handler: function(obj) {
|
||||
const { birthday } = obj
|
||||
this.saleInsuredPersonInfo.insuredAge = utilsAge.getAge(birthday, new Date())
|
||||
console.log('当前年龄是 ', this.saleInsuredPersonInfo.insuredAge)
|
||||
console.log('投保人当前年龄是 ', this.saleInsuredPersonInfo.insuredAge)
|
||||
}
|
||||
},
|
||||
saleInsuredInfo: {
|
||||
deep: true,
|
||||
handler: function(obj) {
|
||||
const { birthday } = obj
|
||||
this.saleInsuredInfo.insuredAge = utilsAge.getAge(birthday, new Date())
|
||||
console.log('被保人当前年龄是 ', this.saleInsuredPersonInfo.insuredAge)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ export default {
|
||||
sex: '0',
|
||||
relationToAppnt: ''
|
||||
})
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'insured'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -32,8 +36,13 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
insuredInfo: {
|
||||
handler: function() {
|
||||
}, deep: true
|
||||
handler: function() {},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
factorLabel() {
|
||||
return this.type === "applicant" ? "" :"投保人"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -52,6 +61,7 @@ export default {
|
||||
<template>
|
||||
<div class="insured-message-container">
|
||||
<van-field
|
||||
v-if="type === 'insured'"
|
||||
:value="insuredInfo.relationToAppnt | idToText('relationToAppnt')"
|
||||
readonly
|
||||
required
|
||||
@@ -64,16 +74,16 @@ export default {
|
||||
/>
|
||||
<FieldDatePicter
|
||||
v-validate="'required'"
|
||||
label="出生日期"
|
||||
:label=" factorLabel + '出生日期'"
|
||||
required
|
||||
name="出生日期"
|
||||
:name="factorLabel+'出生日期'"
|
||||
:value.sync="insuredInfo.birthday"
|
||||
:maxDate="new Date()"
|
||||
type="date"
|
||||
:flag="true"
|
||||
@confirm="handleApplyBirthday"
|
||||
/>
|
||||
<select-radio required :radios="sexRadio" label="性别" name="性别" :value.sync="insuredInfo.sex" />
|
||||
<select-radio required :radios="sexRadio" :label="factorLabel+'性别'" :name="factorLabel+'性别'" :value.sync="insuredInfo.sex" />
|
||||
|
||||
<!-- 字段选择 -->
|
||||
<van-popup v-model="popupShow" position="bottom">
|
||||
|
||||
Reference in New Issue
Block a user