mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-24 12:32:53 +08:00
Merge branch 'hotfix_Electric' into release/1226
# Conflicts: # src/views/ebiz/sale/AddBeneficiaryInfo.vue
This commit is contained in:
@@ -231,10 +231,12 @@ export default {
|
||||
routerUrl = '/sale/beneficiary'
|
||||
localStorage.beneficiaryInfo = ''
|
||||
localStorage.fromAddBeneficiaryInfo = ''
|
||||
localStorage.removeItem('applicant')
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#' + routerUrl
|
||||
url: location.origin + '/#' + routerUrl,
|
||||
needRefresh:'1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: routerUrl
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="relationToAppnt"
|
||||
readonly
|
||||
required
|
||||
readonly
|
||||
label="是被保人的"
|
||||
name="是被保人的"
|
||||
right-icon="arrow"
|
||||
@@ -13,6 +13,13 @@
|
||||
v-validate="'required'"
|
||||
@click="toSelect('7')"
|
||||
/>
|
||||
<div class="relative border-bt fs14 p10 flex align-center">
|
||||
<van-checkbox
|
||||
v-model="userInfo.asAppntAddress"
|
||||
@change="asAppntAddress"
|
||||
:disabled="Insured"
|
||||
>同投保人</van-checkbox>
|
||||
</div>
|
||||
<customer-picker
|
||||
@on-choose="chooseCustomer"
|
||||
v-validate="'required|name'"
|
||||
@@ -48,8 +55,7 @@
|
||||
:readonly="isInsured"
|
||||
v-validate="'required'"
|
||||
@blur="getRelatedData(userInfo.idNo)"
|
||||
>
|
||||
</van-field>
|
||||
></van-field>
|
||||
<FieldDatePicter
|
||||
v-validate="'required'"
|
||||
label="出生日期"
|
||||
@@ -89,10 +95,21 @@
|
||||
:readonly="isInsured || idLimit"
|
||||
></FieldDatePicter>
|
||||
<div class="border-bt relative fs14 p10 flex align-center">
|
||||
<van-checkbox v-model="userInfo.effectiveDateType" class="fr" :disabled="effectiveDateTypeAble" @change="effectiveDataTypeChange">长期</van-checkbox>
|
||||
<van-checkbox
|
||||
v-model="userInfo.effectiveDateType"
|
||||
class="fr"
|
||||
:disabled="effectiveDateTypeAble"
|
||||
@change="effectiveDataTypeChange"
|
||||
>长期</van-checkbox>
|
||||
</div>
|
||||
<!-- <van-field v-model="userInfo.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" :readonly="isInsured" /> -->
|
||||
<select-radio :radios="sexRadio" required label="性别" :value.sync="userInfo.sex" :disabled="isInsured"></select-radio>
|
||||
<select-radio
|
||||
:radios="sexRadio"
|
||||
required
|
||||
label="性别"
|
||||
:value.sync="userInfo.sex"
|
||||
:disabled="isInsured"
|
||||
></select-radio>
|
||||
<van-field
|
||||
:value="userInfo.nativeplace | idToText('nativeplace')"
|
||||
readonly
|
||||
@@ -136,9 +153,9 @@
|
||||
maxlength="30"
|
||||
:readonly="isInsured"
|
||||
/> -->
|
||||
<div class="relative border-bt fs14 p10 flex align-center">
|
||||
<!-- <div class="relative border-bt fs14 p10 flex align-center">
|
||||
<van-checkbox v-model="userInfo.asAppntAddress" @change="asAppntAddress" :disabled="isInsured">同投保人</van-checkbox>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <van-field v-model="userInfo.email" required label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable :readonly="isInsured" /> -->
|
||||
<!-- <occupation-picker
|
||||
:value.sync="userInfo.occupationCode"
|
||||
@@ -178,10 +195,10 @@
|
||||
</van-cell-group>
|
||||
<!-- 工作信息 -->
|
||||
<!-- <van-cell-group>
|
||||
</van-cell-group> -->
|
||||
</van-cell-group>-->
|
||||
<!-- 家庭信息 -->
|
||||
<!-- <van-cell-group>
|
||||
</van-cell-group> -->
|
||||
</van-cell-group>-->
|
||||
<van-button type="danger" class="bottom-btn" @click="nextStep" v-no-more-click="1000">添加</van-button>
|
||||
|
||||
<!-- 字段选择 -->
|
||||
@@ -231,7 +248,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
effectiveDateTypeAble: false, //长期按钮是否禁用
|
||||
effectiveDateTypeAble: true, //长期按钮是否禁用
|
||||
isScan: false, //是否显示证件扫描组件
|
||||
sexRadio: [
|
||||
{
|
||||
@@ -255,7 +272,7 @@ export default {
|
||||
degree: '',
|
||||
socialSecurity: '',
|
||||
taxIdentity: '',
|
||||
areaName: '',
|
||||
// areaName: '',
|
||||
areaValue: '110101',
|
||||
certiexpiredateRequired: true, //证件截止日期是否需要校验
|
||||
certiexpiredateShow: true, //证件截止日期是否可以选择
|
||||
@@ -271,12 +288,12 @@ export default {
|
||||
// certificateValidate: '', //证件起始日期
|
||||
certiexpiredate: '', //证件到期时间
|
||||
effectiveDateType: false, //是否长期
|
||||
asAppntAddress: false, //同投保人地址
|
||||
asAppntAddress: false, //同投保人
|
||||
occupationCode: '',
|
||||
occupationName: '',
|
||||
// mobile: '',
|
||||
workcompany: '', //工作单位
|
||||
village: '',
|
||||
// village: '',
|
||||
// province: '',
|
||||
// city: '',
|
||||
// area: '',
|
||||
@@ -293,7 +310,8 @@ export default {
|
||||
areaList: areaList,
|
||||
occupationShowPicker: false,
|
||||
customerShowPicker: false, //客户列表展示
|
||||
isInsured: false, //是被保人本人,
|
||||
isInsured: false, //是投保人本人,
|
||||
Insured: false, //投保人本人按钮是否置灰
|
||||
idLimit: false //证件起止日期是否只读
|
||||
// 开飞机的小历悦
|
||||
// area: '',
|
||||
@@ -302,7 +320,15 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
// intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
// })
|
||||
window.appCallBack = this.appCallBack
|
||||
if (localStorage.applicant == '1' || localStorage.relationToAppnt == '1') {
|
||||
this.Insured = true
|
||||
} else {
|
||||
this.Insured = false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//监听名字变化
|
||||
@@ -350,6 +376,13 @@ export default {
|
||||
// })
|
||||
// },
|
||||
appCallBack() {
|
||||
this.$jump({
|
||||
flag: 'goBack',
|
||||
extra: {
|
||||
refresh: '1', //是否返回后刷新0:否,1:是
|
||||
index:'-1'
|
||||
}
|
||||
})
|
||||
this.$jump({
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
@@ -376,7 +409,7 @@ export default {
|
||||
//弹框选择
|
||||
toSelect(pickerType, valueKey) {
|
||||
//同被保人不允许编辑
|
||||
if (this.isInsured && pickerType != '7') {
|
||||
if (this.isInsured) {
|
||||
return
|
||||
}
|
||||
//pickerType 1、国家地区 2、证件类型 3、文化程度 4、有无社保 5、税收居民身份 6、婚姻状况
|
||||
@@ -433,62 +466,62 @@ export default {
|
||||
} else if (this.pickerType == '6') {
|
||||
;[this.userInfo.marriage, this.marriage] = [value.id, value.text]
|
||||
} else if (this.pickerType == '7') {
|
||||
//如果受益人是被保人本人
|
||||
if (value.id == 1) {
|
||||
//获取投保人数据
|
||||
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
|
||||
if (res.result == 0) {
|
||||
this.isInsured = true
|
||||
//获取被保人信息
|
||||
let insuredInfo = res.orderDTO.insuredDTOs[0]
|
||||
for (let key in this.userInfo) {
|
||||
this.userInfo[key] = insuredInfo[key]
|
||||
}
|
||||
console.log(this.userInfo)
|
||||
// //如果受益人是被保人本人
|
||||
// if (value.id == 1) {
|
||||
// //获取投保人数据
|
||||
// getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
|
||||
// if (res.result == 0) {
|
||||
// this.isInsured = true
|
||||
// //获取被保人信息
|
||||
// let insuredInfo = res.orderDTO.insuredDTOs[0]
|
||||
// for (let key in this.userInfo) {
|
||||
// this.userInfo[key] = insuredInfo[key]
|
||||
// }
|
||||
// console.log(this.userInfo)
|
||||
|
||||
setTimeout(() => {
|
||||
// this.userInfo.city = insuredInfo.homeCity //家庭市
|
||||
// this.userInfo.area = insuredInfo.homeArea //家庭区
|
||||
// this.userInfo.province = insuredInfo.homeProvince //家庭省
|
||||
// this.areaName = getAreaName([{ code: insuredInfo.homeProvince }, { code: insuredInfo.homeCity }, { code: insuredInfo.homeArea }]) //家庭地址
|
||||
this.userInfo.village = insuredInfo.homeAddress //家庭详细地址
|
||||
}, 0)
|
||||
// // setTimeout(() => {
|
||||
// // this.userInfo.city = insuredInfo.homeCity //家庭市
|
||||
// // this.userInfo.area = insuredInfo.homeArea //家庭区
|
||||
// // this.userInfo.province = insuredInfo.homeProvince //家庭省
|
||||
// // this.areaName = getAreaName([{ code: insuredInfo.homeProvince }, { code: insuredInfo.homeCity }, { code: insuredInfo.homeArea }]) //家庭地址
|
||||
// // this.userInfo.village = insuredInfo.homeAddress //家庭详细地址
|
||||
// // }, 0)
|
||||
|
||||
//受益人类型
|
||||
this.userInfo.bnfType = '0'
|
||||
//是否长期
|
||||
this.userInfo.effectiveDateType = insuredInfo.effectiveDateType == 'false' ? false : true
|
||||
//受益顺序
|
||||
this.userInfo.bnfOrder = '1'
|
||||
// //受益人类型
|
||||
// this.userInfo.bnfType = '0'
|
||||
// //是否长期
|
||||
// this.userInfo.effectiveDateType = insuredInfo.effectiveDateType == 'false' ? false : true
|
||||
// //受益顺序
|
||||
// this.userInfo.bnfOrder = '1'
|
||||
|
||||
//长期判断
|
||||
if (this.userInfo.idType == '1') {
|
||||
// 计算年龄
|
||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
// 长期按钮是否禁用
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
;[this.userInfo.relationToInsured, this.relationToAppnt] = [value.id, value.text]
|
||||
// console.log(this.userInfo)
|
||||
})
|
||||
// console.log(JSON.parse(localStorage.saleInsuredPersonInfo))
|
||||
// this.userInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
|
||||
// this.userInfo.bnfOrder = '1'
|
||||
} else {
|
||||
this.isInsured = false
|
||||
for (var key in this.userInfo) {
|
||||
if (!['nativeplace', 'sex', 'idType', 'bnfOrder', 'bnfType'].includes(key)) {
|
||||
this.userInfo[key] = ''
|
||||
}
|
||||
}
|
||||
this.areaName = ''
|
||||
;[this.userInfo.relationToInsured, this.relationToAppnt] = [value.id, value.text]
|
||||
}
|
||||
// ;[this.userInfo.relationToInsured, this.relationToAppnt] = [value.id, value.text]
|
||||
// //长期判断
|
||||
// if (this.userInfo.idType == '1') {
|
||||
// // 计算年龄
|
||||
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
// // 长期按钮是否禁用
|
||||
// this.effectiveDateTypeAble = age <= 45
|
||||
// }
|
||||
// } else {
|
||||
// this.$toast(res.resultMessage)
|
||||
// }
|
||||
// ;[this.userInfo.relationToInsured, this.relationToAppnt] = [value.id, value.text]
|
||||
// // console.log(this.userInfo)
|
||||
// })
|
||||
// // console.log(JSON.parse(localStorage.saleInsuredPersonInfo))
|
||||
// // this.userInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
|
||||
// // this.userInfo.bnfOrder = '1'
|
||||
// } else {
|
||||
this.isInsured = false
|
||||
// for (var key in this.userInfo) {
|
||||
// if (!['nativeplace', 'sex', 'idType', 'bnfOrder', 'bnfType'].includes(key)) {
|
||||
// this.userInfo[key] = ''
|
||||
// }
|
||||
// }
|
||||
// this.areaName = ''
|
||||
;[this.userInfo.relationToInsured, this.relationToAppnt] = [value.id, value.text]
|
||||
}
|
||||
// ;[this.userInfo.relationToInsured, this.relationToAppnt] = [value.id, value.text]
|
||||
// }
|
||||
},
|
||||
//证件起始截止日期
|
||||
onDateConfirm(val, type) {
|
||||
@@ -595,12 +628,12 @@ export default {
|
||||
this.userInfo.occupationName = data.occupationName //职业类别名称
|
||||
this.userInfo.lifeGrade = data.lifeGrade //寿险等级
|
||||
this.userInfo.healthGrade = data.healthGrade //健康等级
|
||||
// this.userInfo.mobile = data.customerPhone //移动电话
|
||||
// this.userInfo.email = data.email //电子邮箱
|
||||
this.userInfo.province = data.homeProvince //家庭省
|
||||
this.userInfo.city = data.homeCity //家庭市
|
||||
this.userInfo.area = data.homeArea //家庭区
|
||||
this.userInfo.village = data.homeAddress //家庭详细地址
|
||||
this.userInfo.mobile = data.customerPhone //移动电话
|
||||
this.userInfo.email = data.email //电子邮箱
|
||||
// this.userInfo.province = data.homeProvince //家庭省
|
||||
// this.userInfo.city = data.homeCity //家庭市
|
||||
// this.userInfo.area = data.homeArea //家庭区
|
||||
// this.userInfo.village = data.homeAddress //家庭详细地址
|
||||
// if (data.homeProvince.length) {
|
||||
// this.areaName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
|
||||
// }
|
||||
@@ -616,7 +649,8 @@ export default {
|
||||
nextStep() {
|
||||
// 计算年龄
|
||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
|
||||
let relationToAppnt = localStorage.relationToAppnt
|
||||
let insuredDetail = JSON.parse(localStorage.insuredDetail)
|
||||
// //被保人不是已婚
|
||||
// if (this.insuredMarriage != '1') {
|
||||
// return this.$toast('与投保人关系不正确')
|
||||
@@ -627,14 +661,19 @@ export default {
|
||||
// if (insuredSex == appntSex) {
|
||||
// return this.$toast('性别输入有误')
|
||||
// }
|
||||
|
||||
console.log(this.userInfo.idType)
|
||||
|
||||
console.log(insuredDetail)
|
||||
// 页面跳转
|
||||
this.$validator.validate().then(valid => {
|
||||
if (true === valid) {
|
||||
//与被保人关系是配偶
|
||||
// 受益人是被保人的配偶
|
||||
if (this.userInfo.relationToInsured == '2') {
|
||||
// 受益人与投保人都是被保人的配偶时
|
||||
if (this.userInfo.relationToInsured == '2' && relationToAppnt == '2') {
|
||||
if (this.userInfo.name != insuredDetail.name || this.userInfo.sex != insuredDetail.sex || this.userInfo.idNo != insuredDetail.idNo) {
|
||||
return this.$toast('受益人数据不合法,请重新输入')
|
||||
}
|
||||
}
|
||||
//与被保人关系是配偶
|
||||
let insuredInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
|
||||
//如果投保人不是已婚
|
||||
if (insuredInfo.marriage != '1') {
|
||||
@@ -651,6 +690,14 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
// 受益人是被保人的父母,被保人是投保人的子女时
|
||||
if (this.userInfo.relationToInsured == '3' && relationToAppnt == '4') {
|
||||
if (this.userInfo.sex == insuredDetail.sex) {
|
||||
if (this.userInfo.name != insuredDetail.name || this.userInfo.idNo != insuredDetail.idNo) {
|
||||
return this.$toast('受益人数据不合法,请重新输入')
|
||||
}
|
||||
}
|
||||
}
|
||||
//如果证件类型是身份证
|
||||
if (this.userInfo.idType == '1') {
|
||||
//校验性别是否与身份证号码位相符
|
||||
@@ -786,11 +833,14 @@ export default {
|
||||
// 保存 新增的受益人信息 以及页面跳转字段
|
||||
localStorage.beneficiaryInfo = JSON.stringify(beneficiaries)
|
||||
localStorage.fromAddBeneficiaryInfo = true
|
||||
|
||||
if (this.userInfo.asAppntAddress == true) {
|
||||
localStorage.applicant = '1'
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/beneficiary'
|
||||
url: location.origin + '/#/sale/beneficiary',
|
||||
needRefresh:'1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/beneficiary'
|
||||
@@ -801,51 +851,106 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
//区域选择
|
||||
sureArea(area, type) {
|
||||
switch (type) {
|
||||
case '1': //单位地址
|
||||
this.areaName = getAreaName(area)
|
||||
;[this.userInfo.province, this.userInfo.city, this.userInfo.area] = [area[0].code, area[1].code, area[2].code]
|
||||
this.areaShow = false
|
||||
break
|
||||
}
|
||||
},
|
||||
chooseArea() {
|
||||
if (this.isInsured) {
|
||||
return
|
||||
}
|
||||
this.areaShow = true
|
||||
},
|
||||
// //区域选择
|
||||
// sureArea(area, type) {
|
||||
// switch (type) {
|
||||
// case '1': //单位地址
|
||||
// this.areaName = getAreaName(area)
|
||||
// ;[this.userInfo.province, this.userInfo.city, this.userInfo.area] = [area[0].code, area[1].code, area[2].code]
|
||||
// this.areaShow = false
|
||||
// break
|
||||
// }
|
||||
// },
|
||||
// chooseArea() {
|
||||
// if (this.isInsured) {
|
||||
// return
|
||||
// }
|
||||
// this.areaShow = true
|
||||
// },
|
||||
// 证件扫描
|
||||
goScan() {
|
||||
this.isScan = true
|
||||
},
|
||||
//联系地址同投保人
|
||||
async asAppntAddress(val) {
|
||||
//选中时
|
||||
// //联系地址同投保人
|
||||
// async asAppntAddress(val) {
|
||||
// //选中时
|
||||
// if (val) {
|
||||
// let res = await getOrderDetail({ orderNo: localStorage.orderNo })
|
||||
// // console.log(res)
|
||||
// if (res.result == 0) {
|
||||
// //省市区
|
||||
// ;[this.userInfo.province, this.userInfo.city, this.userInfo.area] = [
|
||||
// res.orderDTO.appntDTO.province,
|
||||
// res.orderDTO.appntDTO.city,
|
||||
// res.orderDTO.appntDTO.area
|
||||
// ]
|
||||
// //同投保人联系地址
|
||||
// this.areaName = getAreaName([{ code: this.userInfo.province }, { code: this.userInfo.city }, { code: this.userInfo.area }])
|
||||
// //详细地址
|
||||
// this.userInfo.village = res.orderDTO.appntDTO.village
|
||||
// } else {
|
||||
// this.$toast(res.resultMessage)
|
||||
// }
|
||||
// } else {
|
||||
// // 清空地址
|
||||
// this.areaName = ''
|
||||
// this.userInfo.village = ''
|
||||
// this.userInfo.province = this.userInfo.city = this.userInfo.area = ''
|
||||
// }
|
||||
// },
|
||||
|
||||
//勾选投保人
|
||||
asAppntAddress(val) {
|
||||
console.log(val)
|
||||
if (val) {
|
||||
let res = await getOrderDetail({ orderNo: localStorage.orderNo })
|
||||
// console.log(res)
|
||||
if (res.result == 0) {
|
||||
//省市区
|
||||
;[this.userInfo.province, this.userInfo.city, this.userInfo.area] = [
|
||||
res.orderDTO.appntDTO.province,
|
||||
res.orderDTO.appntDTO.city,
|
||||
res.orderDTO.appntDTO.area
|
||||
]
|
||||
//同投保人联系地址
|
||||
this.areaName = getAreaName([{ code: this.userInfo.province }, { code: this.userInfo.city }, { code: this.userInfo.area }])
|
||||
//详细地址
|
||||
this.userInfo.village = res.orderDTO.appntDTO.village
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
if (localStorage.relationToAppnt == '2') {
|
||||
;[this.userInfo.relationToInsured, this.relationToAppnt] = ['2', '配偶']
|
||||
} else if (localStorage.relationToAppnt == '4') {
|
||||
;[this.userInfo.relationToInsured, this.relationToAppnt] = ['3', '父母']
|
||||
} else if (localStorage.relationToAppnt == '3') {
|
||||
;[this.userInfo.relationToInsured, this.relationToAppnt] = ['4', '子女']
|
||||
}
|
||||
|
||||
this.isInsured = true
|
||||
let insuredDetail = JSON.parse(localStorage.insuredDetail)
|
||||
this.userInfo.name = insuredDetail.name //姓名
|
||||
this.userInfo.sex = insuredDetail.sex //性别
|
||||
this.userInfo.nativeplace = insuredDetail.nativeplace //国家地区
|
||||
this.userInfo.birthday = insuredDetail.birthday //出生日期
|
||||
this.userInfo.idType = insuredDetail.idType //证件类型
|
||||
this.userInfo.idNo = insuredDetail.idNo //证件号码
|
||||
this.userInfo.certificateValidate = insuredDetail.certificateValidate //证件起始日期
|
||||
this.userInfo.certiexpiredate = insuredDetail.certiexpiredate //证件截止日期
|
||||
// this.userInfo.effectiveDateType = insuredDetail.effectiveDateType == '9999-01-01' //是否长期
|
||||
let age = utilsAge.getAge(insuredDetail.birthday, new Date())
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if (age > 45) {
|
||||
this.userInfo.effectiveDateType = true
|
||||
}
|
||||
this.idLimit = true
|
||||
this.userInfo.occupationCode = insuredDetail.occupationCode //职业类别编码
|
||||
this.userInfo.occupationName = insuredDetail.occupationName //职业类别名称
|
||||
this.userInfo.mobile = insuredDetail.mobile //联系电话
|
||||
this.userInfo.email = insuredDetail.email //电子邮箱
|
||||
} else {
|
||||
// 清空地址
|
||||
this.areaName = ''
|
||||
this.userInfo.village = ''
|
||||
this.userInfo.province = this.userInfo.city = this.userInfo.area = ''
|
||||
this.isInsured = false
|
||||
this.userInfo.relationToInsured = ''
|
||||
this.relationToAppnt = ''
|
||||
this.userInfo.name = '' //姓名
|
||||
this.userInfo.sex = '0' //性别
|
||||
this.userInfo.nativeplace = '1' //国家地区
|
||||
this.userInfo.birthday = '' //出生日期
|
||||
this.userInfo.idType = '1' //证件类型
|
||||
this.userInfo.idNo = '' //证件号码
|
||||
this.userInfo.certificateValidate = '' //证件起始日期
|
||||
this.userInfo.certiexpiredate = '' //证件截止日期
|
||||
this.effectiveDateTypeAble = true
|
||||
this.userInfo.effectiveDateType = false
|
||||
this.idLimit = false
|
||||
this.userInfo.occupationCode = '' //职业类别编码
|
||||
this.userInfo.occupationName = '' //职业类别名称
|
||||
this.userInfo.mobile = '' //联系电话
|
||||
this.userInfo.email = '' //电子邮箱
|
||||
}
|
||||
},
|
||||
//长期状态改变时
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
<div class="beneficiary-container">
|
||||
<div h10></div>
|
||||
<div class="fs14 flex justify-content-s pv12 ph15 van-hairline--bottom">
|
||||
<label class="c-gray-dark">被保险人</label><span class="c-gray-darker">{{ insuredPerson }}</span>
|
||||
<label class="c-gray-dark">被保险人</label>
|
||||
<span class="c-gray-darker">{{ insuredPerson }}</span>
|
||||
</div>
|
||||
<div class="fs14 pv12 ph15 van-hairline--bottom flex">
|
||||
<label class="c-gray-dark">身故受益人</label>
|
||||
<div class="ml20 c-gray-darker">
|
||||
<van-radio-group v-model="type" class="flex" @change="radioChange">
|
||||
<van-radio name="1">法定受益人 </van-radio>
|
||||
<van-radio name="1">法定受益人</van-radio>
|
||||
|
||||
<van-radio name="2" class="ml10">指定受益人</van-radio>
|
||||
</van-radio-group>
|
||||
@@ -21,7 +22,12 @@
|
||||
<div class="bg-white p15">
|
||||
<div class="flex justify-content-s c-gray-darker">
|
||||
<div>
|
||||
<img src="@/assets/images/bnf_avatar.png" width="40" height="40" class="radius50 v-middle" />
|
||||
<img
|
||||
src="@/assets/images/bnf_avatar.png"
|
||||
width="40"
|
||||
height="40"
|
||||
class="radius50 v-middle"
|
||||
/>
|
||||
<span class="ml10 c-gray-base">{{ item.name }}</span>
|
||||
</div>
|
||||
<van-icon name="delete" size="20" @click="deleteBeneficiary(index)" />
|
||||
@@ -37,9 +43,7 @@
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="add-btn mt20 text-center p15 c-gray-base" @click="add">
|
||||
+ 添加指定受益人
|
||||
</div>
|
||||
<div class="add-btn mt20 text-center p15 c-gray-base" @click="add">+ 添加指定受益人</div>
|
||||
</div>
|
||||
<van-button type="danger" class="bottom-btn" @click="nextStep">下一步</van-button>
|
||||
</div>
|
||||
@@ -92,6 +96,10 @@ export default {
|
||||
this.insuredPerson = JSON.parse(localStorage.saleInsuredPersonInfo).name
|
||||
},
|
||||
mounted() {
|
||||
// EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
// intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
// })
|
||||
// window.appCallBack = this.appCallBack
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
@@ -99,6 +107,15 @@ export default {
|
||||
next()
|
||||
},
|
||||
methods: {
|
||||
// appCallBack() {
|
||||
// this.$jump({
|
||||
// flag: 'goBack',
|
||||
// extra: {
|
||||
// refresh: '1', //是否返回后刷新0:否,1:是
|
||||
// index: '-1'
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
//告知信息
|
||||
nextStep() {
|
||||
if (this.type == 2 && this.beneficiaries.length == 0) {
|
||||
@@ -134,6 +151,7 @@ export default {
|
||||
saveOrUpdateOrderInfo(data).then(res => {
|
||||
// console.log(res)
|
||||
if (res.result == 0) {
|
||||
localStorage.removeItem('applicant')
|
||||
//页面跳转
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
@@ -189,6 +207,9 @@ export default {
|
||||
|
||||
// console.log('删除受益人')
|
||||
console.log(this.beneficiaries[index].idNo)
|
||||
if (this.beneficiaries[index].asAppntAddress == true) {
|
||||
localStorage.removeItem('applicant')
|
||||
}
|
||||
|
||||
// 删除 localStorage 中的对应数据
|
||||
// console.log(this.beneficiaries)
|
||||
@@ -203,6 +224,7 @@ export default {
|
||||
|
||||
// 删除页面中的对应数据
|
||||
this.beneficiaries.splice(index, 1)
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
|
||||
@@ -959,6 +959,7 @@ export default {
|
||||
// console.log(this.userInfo)
|
||||
|
||||
localStorage.orderNo = resultData.orderNo
|
||||
localStorage.insuredDetail = JSON.stringify(this.userInfo)
|
||||
//清理计时器
|
||||
window.clearInterval(this.timeId)
|
||||
this.timeId = null
|
||||
|
||||
@@ -439,7 +439,7 @@ export default {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/insuredInfo'
|
||||
url: location.origin + '/#/sale/insuredInfo',
|
||||
},
|
||||
routerInfo: { path: '/sale/insuredInfo' }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user