[new] 新增保全-受益人变更功能,页面逻辑基本完成,部分页面因接口问题暂时无法继续开发

This commit is contained in:
tian.guangyuan
2020-04-15 13:06:33 +08:00
parent 324e81a001
commit 36cf165351
18 changed files with 863 additions and 1081 deletions

View File

@@ -33,3 +33,21 @@ export function customerInfo(data) {
data
})
}
//客户详情
// export function customerInfo(data) {
// return request({
// url: getUrl('/edor/customer/customerInfo', 0),
// method: 'post',
// data
// })
// }
//保单列表
export function policyList(data) {
return request({
url: getUrl('/edor/customer/policyList', 0),
method: 'post',
data
})
}

View File

@@ -2,6 +2,7 @@
let mockBaseUrl = 'http://rap2.taobao.org:38080/app/mock/250585/'
export default {
'/edor/customer/policyList': mockBaseUrl + '/edor/customer/policyList',
'/edor/customer/customerInfo': mockBaseUrl + '/edor/customer/customerInfo',
'/edor/customer/customerList': mockBaseUrl + '/edor/customer/customerList',
'/edor/item/change': mockBaseUrl + '/edor/item/change',

View File

@@ -11,6 +11,7 @@ const contacAgreement = () => import('@/views/ebiz/preserve/ContacAgreement')
const contactConfirmation = () => import('@/views/ebiz/preserve/ContactConfirmation')
const beneficiaryInfo = () => import('@/views/ebiz/preserve/BeneficiaryInfo')
const beneficiaryInfoAdd = () => import('@/views/ebiz/preserve/BeneficiaryInfoAdd')
const beneficiaryInfoDetail = () => import('@/views/ebiz/preserve/BeneficiaryInfoDetail')
const beneficiaryConfirmation = () => import('@/views/ebiz/preserve/BeneficiaryConfirmation')
const surrenderInfo = () => import('@/views/ebiz/preserve/SurrenderInfo')
const surrenderConfirmation = () => import('@/views/ebiz/preserve/SurrenderConfirmation')
@@ -80,6 +81,15 @@ export default [
index: 105
}
},
{
path: '/preserve/beneficiaryInfoDetail',
name: 'beneficiaryInfoDetail',
component: beneficiaryInfoDetail,
meta: {
title: '指定受益人信息',
index: 105
}
},
{
path: '/preserve/surrenderInfo',
name: 'surrenderInfo',

View File

@@ -1,4 +1,4 @@
<!--自动转账授权书-续期账号变更-->
<template>
<div class="auto-pay"></div>
</template>
</template>

View File

@@ -1,15 +1,15 @@
<!--受益人变更-保全代办确认-->
<!--受益人变更页-->
<template>
<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>
<span class="c-gray-darker">{{ insuredName }}</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 :disabled="true" v-model="type" class="flex" @change="radioChange">
<van-radio-group :disabled="isDisType" v-model="type" class="flex">
<van-radio name="1">法定受益人</van-radio>
<van-radio name="2" class="ml10">指定受益人</van-radio>
</van-radio-group>
@@ -19,15 +19,10 @@
<div class="fs14 beneficiary-list" v-if="type == 2">
<ul>
<li class="pv20 ph15 item" v-for="(item, index) in beneficiaries" :key="index">
<div class="bg-white p15">
<div class="bg-white p15" @click="detail(index)">
<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>
</div>
@@ -43,8 +38,6 @@
</li>
</ul>
</div>
<!-- 短信验证 -->
<!-- cancelButtonColor="#4FC6B3" -->
<van-dialog
v-model="show"
title="短信确认"
@@ -56,7 +49,7 @@
@cancel="clearTimer"
>
<p class="p10 fs14">向此手机发送验证码确认用户身份</p>
<p class="p10 fs14" style="border-bottom: 1px solid #ebedf0;">{{ '17512341234' | Mask }}</p>
<p class="p10 fs14" style="border-bottom: 1px solid #ebedf0;">{{ '15512341234' | Mask }}</p>
<van-cell-group class="flex align-items-c pr5 mb15">
<van-field maxlength="6" placeholder="请输入手机验证码" v-model="authCode" clearable label-width="0" />
<van-button type="danger" plain size="small" class="w160 p0" @click="getAuthCode" :disabled="codeDisabled" v-no-more-click="2000">
@@ -64,96 +57,89 @@
</van-button>
</van-cell-group>
</van-dialog>
<van-button type="danger" class="bottom-btn" @click="showAuth">提交申请</van-button>
<van-button type="danger" class="bottom-btn" @click="nextStep">提交申请</van-button>
</div>
</template>
<script>
import { RadioGroup, Radio, Icon, Dialog, Field, CellGroup } from 'vant'
import dataDictionary from '@/assets/js/utils/data-dictionary'
import { saveOrUpdateOrderInfo, getOrderDetail, getAuthCode } from '@/api/ebiz/sale/sale'
import { Field, CellGroup, RadioGroup, Radio, Icon, Dialog } from 'vant'
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
export default {
name: 'beneficiary',
name: 'BeneficiaryConfirmation',
components: {
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Icon.name]: Icon,
[Dialog.name]: Dialog
},
filters: {
Mask: function(value) {
if (value) {
return value.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
} else {
return ''
}
}
},
data() {
let feachData = {
surrenderDTOList: [
{
surrenderId: '',
edorapplyNo: '',
surrenderType: '2',
bnfDTOs: []
}
]
}
return {
type: '1',
show: false, // 获取短信验证码
codeDisabled: false, // 获取验证码按钮是否禁用
insuredPerson: '', //被保险人
isAssign: false, // 是否指定受益人
timeId: null, // 计时器ID
countDown: 60, // 倒计时
authCode: '', // 验证码
beneficiaries: [
// {
// name: '陈明',
// relationToAppnt: '1',
// beneRatio: '99'
// }
], // 指定受益人列表
bnfFlag: '0', // 受益人类型
bnfType: '0' // 0 身故受益人 1 身前受益人
feachData:feachData,
type: '',
isDisType: false,
policy: null,
insuredName: '', //被保险人
beneficiaries: [] // 指定受益人列表
}
},
created() {
// 是否从添加指定受益人页面跳转
if (localStorage.fromAddBeneficiaryInfo) {
this.type = '2'
this.beneficiaries = this.beneficiaries.concat(JSON.parse(localStorage.beneficiaryInfo))
this.type = '2'
console.log(this.beneficiaries)
}
//如果是从编辑进来
if (this.$route.query.edit) {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
if (res.result == 0) {
this.$utils.intLocalStorage(res)
// 获取保单列表存储的数据
this.policy = JSON.parse(localStorage['preserve-policy'])
this.insuredName = this.policy.insuredName
this.type = this.policy.bnfDTOs[0].bnfType
this.isDisType = true
this.beneficiaries = this.policy.bnfDTOs
},
mounted() {},
methods: {
//告知信息
nextStep() {
this.showAuth()
},
detail(index){
// edit=0
let path = '/preserve/BeneficiaryInfoDetail?edit=' + index
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + path
},
routerInfo: {
path: path
}
})
}
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) {
document.body.style.backgroundColor = ''
next()
},
methods: {
// appCallBack() {
// this.$jump({
// flag: 'goBack',
// extra: {
// refresh: '1', //是否返回后刷新01
// index: '-1'
// }
// })
// },
},
// 显示验证码 van-dialog
showAuth() {
this.show = true
},
//告知信息
nextStep() {
if (this.type == 2 && this.beneficiaries.length == 0) {
this.$toast('受益人列表不能为空')
return
}
},
// 获取短信验证码
getAuthCode() {
this.codeDisabled = true
@@ -166,7 +152,7 @@ export default {
this.countDown = 60
}
}, 1000)
getAuthCode({
operateType: 'appntInfoEntry',
sessionId: '',
@@ -178,7 +164,10 @@ export default {
if (res.result == 0) {
this.sessionId = res.sessionId
} else {
this.$toast(res.resultMessage)
this.$toast({
message: res.resultMessage,
onClose: this.showAuth
})
}
})
},
@@ -186,16 +175,6 @@ export default {
async authConfirm() {
//清理计时器
this.clearTimer()
// this.$dialog
// .alert({
// title: '提示',
// className: 'dialog-alert',
// message: '您所有保单的相应信息均将变更',
// confirmButtonColor: '#FFFFFF',
// })
// .then(() => {
// this.changeSubmit()
// })
this.changeSubmit()
},
// 清理计时器
@@ -205,184 +184,42 @@ export default {
this.countDown = 60
this.codeDisabled = false
},
//提交变更申请
async changeSubmit() {
// this.bnfFlag = this.type == 2 ? '1' : '0'
// //生成接口数据
// let data = {
// orderType: 'BNF_ORDER',
// orderDTO: {
// productDTO: null,
// orderInfoDTO: {
// bnfFlag: this.bnfFlag,
// orderNo: localStorage.orderNo
// },
// appntDTO: {},
// insuredDTOs: [
// {
// insuredId: JSON.parse(localStorage.saleInsuredPersonInfo).insuredId,
// bnfDTOs: this.beneficiaries
// }
// ],
// paymentDTO: {},
// orderAccountDTO: {},
// channelDTO: null,
// orderExpandDTO: null,
// thirdOrderDTO: null
// }
// }
// console.log(this.beneficiaries)
// //调接口保存受益人
// saveOrUpdateOrderInfo(data).then(res => {
// // console.log(res)
// if (res.result == 0) {
// localStorage.removeItem('applicant')
// //页面跳转
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/preserve/submitResult',
needRefresh: '1'
},
routerInfo: {
path: '/preserve/submitResult'
}
})
// } else {
// this.$toast(res.resultMessage)
// }
// })
},
//添加受益人
add() {
let beneRatio = 0
console.log(this.beneficiaries)
this.beneficiaries.forEach(item => {
beneRatio += parseInt(item.bnfLot)
})
console.log(beneRatio)
if (beneRatio >= 100) {
return this.$toast('受益份额已满~')
if (!this.sessionId) {
this.$toast({
message: '请先获取验证码',
onClose: this.showAuth
})
return
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/preserve/BeneficiaryInfoAdd'
},
routerInfo: {
path: '/preserve/BeneficiaryInfoAdd'
}
let res = await autchCodeCheck({
smsId: this.sessionId,
code: this.authCode
})
},
// 单选按钮切换
radioChange(val) {
console.log(val)
},
// 删除受益人
deleteBeneficiary(index) {
Dialog.confirm({
className: 'dialog-delete',
title: '提示',
message: '您确认要删除该受益人吗?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
// on confirm
// console.log('删除受益人')
console.log(this.beneficiaries[index].idNo)
if (this.beneficiaries[index].asAppntAddress == true) {
localStorage.removeItem('applicant')
if (res.result == 0) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/preserve/submitResult`,
backToFirst: '1'
},
routerInfo: {
path: `/preserve/submitResult`
}
// 删除 localStorage 中的对应数据
// console.log(this.beneficiaries)
let beneficiaries = JSON.parse(localStorage.beneficiaryInfo)
// console.log(JSON.parse(localStorage.beneficiaryInfo))
console.log(beneficiaries)
let delIdx = beneficiaries.findIndex(item => {
return item.idNo == this.beneficiaries[index].idNo
})
beneficiaries.splice(delIdx, 1)
localStorage.beneficiaryInfo = JSON.stringify(beneficiaries)
// 删除页面中的对应数据
this.beneficiaries.splice(index, 1)
})
.catch(() => {
// on cancel
return
} else {
this.show = false
this.$toast({
message: res.resultMessage,
onClose: this.showAuth
})
},
// 删除受益人
editBeneficiary(index) {
Dialog.confirm({
className: 'dialog-delete',
title: '提示',
message: '您确认要修改该受益人吗?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
// on confirm
// console.log('修改受益人')
console.log(this.beneficiaries[index].idNo)
if (this.beneficiaries[index].asAppntAddress == true) {
localStorage.removeItem('applicant')
}
// 修改 localStorage 中的对应数据
// console.log(this.beneficiaries)
let beneficiaries = JSON.parse(localStorage.beneficiaryInfo)
// console.log(JSON.parse(localStorage.beneficiaryInfo))
console.log(beneficiaries)
let delIdx = beneficiaries.findIndex(item => {
return item.idNo == this.beneficiaries[index].idNo
})
beneficiaries.splice(delIdx, 1)
localStorage.beneficiaryInfo = JSON.stringify(beneficiaries)
// 修改页面中的对应数据
this.beneficiaries.splice(index, 1)
})
.catch(() => {
// on cancel
return
})
},
//获取受益人列表
async getBeneficiaryList() {
const res = await getOrderDetail({ orderNo: localStorage.orderNo })
console.log(res)
if (res.result == 0 && res.orderDTO) {
this.beneficiaries = res.orderDTO.inuseredDTOs[0].bnfDTOs
}
}
},
beforeDestroy() {
//清理计时器
this.clearTimer()
},
filters: {
relationTransfer(relationIdx) {
let relationText = ''
dataDictionary.relationToAppnt.some(item => {
if (item.id == relationIdx) {
relationText = item.text
}
})
return relationText
},
Mask: function(value) {
if (value) {
return value.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
} else {
return ''
}
}
}
}
</script>

View File

@@ -4,12 +4,12 @@
<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>
<span class="c-gray-darker">{{ insuredName }}</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-group :disabled="isDisType" v-model="type" class="flex">
<van-radio name="1">法定受益人</van-radio>
<van-radio name="2" class="ml10">指定受益人</van-radio>
</van-radio-group>
@@ -22,12 +22,7 @@
<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>
<div>
@@ -54,10 +49,10 @@
<script>
import { RadioGroup, Radio, Icon, Dialog } from 'vant'
import dataDictionary from '@/assets/js/utils/data-dictionary'
import { saveOrUpdateOrderInfo, getOrderDetail } from '@/api/ebiz/sale/sale'
import { edorChange } from '@/api/ebiz/preserve/preserve'
export default {
name: 'beneficiary',
name: 'BeneficiaryInfo',
components: {
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
@@ -65,118 +60,72 @@ export default {
[Dialog.name]: Dialog
},
data() {
let feachData = {
surrenderDTOList: [
{
surrenderId: '',
edorapplyNo: '',
surrenderType: '2',
bnfDTOs: []
}
]
}
return {
type: '1',
insuredPerson: '', //被保险人
isAssign: false, // 是否指定受益人
beneficiaries: [
// {
// name: '陈明',
// relationToAppnt: '1',
// beneRatio: '99'
// }
], // 指定受益人列表
bnfFlag: '0', // 受益人类型
bnfType: '0' // 0 身故受益人 1 身前受益人
feachData:feachData,
type: '',
isDisType: false,
policy: null,
insuredName: '', //被保险人
beneficiaries: [] // 指定受益人列表
}
},
created() {
// 是否从添加指定受益人页面跳转
if (localStorage.fromAddBeneficiaryInfo) {
this.type = '2'
this.beneficiaries = this.beneficiaries.concat(JSON.parse(localStorage.beneficiaryInfo))
this.type = '2'
console.log(this.beneficiaries)
// 获取保单列表存储的数据
this.policy = JSON.parse(localStorage['preserve-policy'])
console.log(this.policy)
this.insuredName = this.policy.insuredName
this.type = this.policy.bnfDTOs[0].bnfType
if (this.type == 2) {
this.isDisType = true
}
//如果是从编辑进来
if (this.$route.query.edit) {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
if (res.result == 0) {
this.$utils.intLocalStorage(res)
}
})
}
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) {
document.body.style.backgroundColor = ''
next()
this.beneficiaries = this.policy.bnfDTOs
},
mounted() {},
methods: {
// appCallBack() {
// this.$jump({
// flag: 'goBack',
// extra: {
// refresh: '1', //是否返回后刷新01
// index: '-1'
// }
// })
// },
//告知信息
nextStep() {
if (this.type == 2 && this.beneficiaries.length == 0) {
this.$toast('受益人列表不能为空')
return
}
// this.bnfFlag = this.type == 2 ? '1' : '0'
// //生成接口数据
// let data = {
// orderType: 'BNF_ORDER',
// orderDTO: {
// productDTO: null,
// orderInfoDTO: {
// bnfFlag: this.bnfFlag,
// orderNo: localStorage.orderNo
// },
// appntDTO: {},
// insuredDTOs: [
// {
// insuredId: JSON.parse(localStorage.saleInsuredPersonInfo).insuredId,
// bnfDTOs: this.beneficiaries
// }
// ],
// paymentDTO: {},
// orderAccountDTO: {},
// channelDTO: null,
// orderExpandDTO: null,
// thirdOrderDTO: null
// }
// }
// console.log(this.beneficiaries)
// //调接口保存受益人
// saveOrUpdateOrderInfo(data).then(res => {
// // console.log(res)
// if (res.result == 0) {
// localStorage.removeItem('applicant')
// //页面跳转
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/preserve/HandleResult?entry=beneficiary',
needRefresh: '1'
},
routerInfo: {
path: '/preserve/HandleResult?entry=beneficiary'
}
})
// } else {
// this.$toast(res.resultMessage)
// }
// })
this.feachData.surrenderDTOList[0].bnfDTOs = this.beneficiaries
edorChange(this.feachData)
.then(res => {
if (res.result == 0) {
this.policy.bnfDTOs = this.beneficiaries
localStorage['preserve-policy'] = JSON.stringify(this.policy)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/preserve/HandleResult?entry=beneficiary'
},
routerInfo: '/preserve/HandleResult?entry=beneficiary'
})
} else {
this.$toast(res.resultMessage)
}
})
.catch(err => {
console.log(err)
})
},
//添加受益人
add() {
let beneRatio = 0
console.log(this.beneficiaries)
this.beneficiaries.forEach(item => {
beneRatio += parseInt(item.bnfLot)
beneRatio += parseFloat(item.bnfLot)
})
console.log(beneRatio)
if (beneRatio >= 100) {
@@ -192,10 +141,6 @@ export default {
}
})
},
// 单选按钮切换
radioChange(val) {
console.log(val)
},
// 删除受益人
deleteBeneficiary(index) {
Dialog.confirm({
@@ -206,92 +151,32 @@ export default {
confirmButtonColor: '#FFFFFF'
})
.then(() => {
// on confirm
// console.log('删除受益人')
console.log(this.beneficiaries[index].idNo)
if (this.beneficiaries[index].asAppntAddress == true) {
localStorage.removeItem('applicant')
}
// 删除 localStorage 中的对应数据
// console.log(this.beneficiaries)
let beneficiaries = JSON.parse(localStorage.beneficiaryInfo)
// console.log(JSON.parse(localStorage.beneficiaryInfo))
console.log(beneficiaries)
let delIdx = beneficiaries.findIndex(item => {
return item.idNo == this.beneficiaries[index].idNo
})
beneficiaries.splice(delIdx, 1)
localStorage.beneficiaryInfo = JSON.stringify(beneficiaries)
// 删除页面中的对应数据
this.beneficiaries.splice(index, 1)
this.policy.bnfDTOs = this.beneficiaries
localStorage['preserve-policy'] = JSON.stringify(this.policy)
})
.catch(() => {
// on cancel
return
})
},
// 删除受益人
// 编辑受益人
editBeneficiary(index) {
Dialog.confirm({
className: 'dialog-delete',
title: '提示',
message: '您确认要修改该受益人吗?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
// on confirm
// console.log('修改受益人')
console.log(this.beneficiaries[index].idNo)
if (this.beneficiaries[index].asAppntAddress == true) {
localStorage.removeItem('applicant')
}
// 修改 localStorage 中的对应数据
// console.log(this.beneficiaries)
let beneficiaries = JSON.parse(localStorage.beneficiaryInfo)
// console.log(JSON.parse(localStorage.beneficiaryInfo))
console.log(beneficiaries)
let delIdx = beneficiaries.findIndex(item => {
return item.idNo == this.beneficiaries[index].idNo
})
beneficiaries.splice(delIdx, 1)
localStorage.beneficiaryInfo = JSON.stringify(beneficiaries)
// 修改页面中的对应数据
this.beneficiaries.splice(index, 1)
})
.catch(() => {
// on cancel
return
})
},
//获取受益人列表
async getBeneficiaryList() {
const res = await getOrderDetail({ orderNo: localStorage.orderNo })
console.log(res)
if (res.result == 0 && res.orderDTO) {
this.beneficiaries = res.orderDTO.inuseredDTOs[0].bnfDTOs
}
}
},
filters: {
relationTransfer(relationIdx) {
let relationText = ''
dataDictionary.relationToAppnt.some(item => {
if (item.id == relationIdx) {
relationText = item.text
this.policy.bnfDTOs = this.beneficiaries
localStorage['preserve-policy'] = JSON.stringify(this.policy)
let path = '/preserve/BeneficiaryInfoAdd?edit=' + index
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + path
},
routerInfo: {
path: path
}
})
return relationText
}
}
},
filters: {}
}
</script>
<style lang="scss" scoped>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,309 @@
<template>
<div class="add-beneficiary-container pb50">
<!-- 基本信息 -->
<van-cell-group>
<van-field
:value="userInfo.relationToInsured | idToText('relationToAppnt')"
required
readonly
label="是被保险人的"
name="是被保险人的"
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
/>
<customer-picker
v-validate="'required|name'"
name="姓名"
label="姓名"
required
:value.sync="userInfo.name"
:parentShowPicker.sync="customerShowPicker"
readonly
></customer-picker>
<van-field
:value="userInfo.idType | idToText('idType')"
v-validate="'required'"
readonly
required
label="证件类型"
name="证件类型"
right-icon="arrow"
placeholder="请选择"
/>
<van-field
v-model="userInfo.idNo"
label="证件号码"
name="证件号码"
required
readonly
placeholder="请输入"
maxlength="18"
clearable
v-validate="'required'"
></van-field>
<!-- <FieldDatePicter
:v-validate="{ required: effectiveDateRequired }"
label="证件起始日期"
name="证件起始日期"
:required="isRequired"
:defaultDate="new Date()"
:value.sync="userInfo.certificateValidate"
type="date"
@confirm="onDateConfirm($event, '1')"
ref="certificateValidate"
:flag="certificateValidateShow"
:readonly="idLimit"
></FieldDatePicter> -->
<FieldDatePicter
:v-validate="{ required: effectiveDateRequired }"
label="证件截止日期"
name="证件截止日期"
:required="isRequired"
:defaultDate="new Date()"
:value.sync="userInfo.effectiveDate"
type="date"
@confirm="onDateConfirm($event, '1')"
ref="effectiveDate"
:flag="effectiveDateShow"
readonly
></FieldDatePicter>
<div class="border-bt relative fs14 p10 flex align-center">
<van-checkbox v-model="userInfo.effectiveDateType" class="fr" :disabled="true">长期</van-checkbox>
</div>
<select-radio :radios="sexRadio" disabled required label="性别" :value.sync="userInfo.sex"></select-radio>
<van-field
:value="userInfo.nationality | idToText('nativeplace')"
readonly
label="国家/地区"
name="国家/地区"
required
v-validate="'required'"
right-icon="arrow"
placeholder="请选择"
/>
<van-field
v-model="userInfo.bnfOrder"
required
readonly
label="受益顺序"
name="受益顺序"
placeholder="请输入"
v-validate="'required|onlyNumber'"
maxlength="1"
/>
<van-field
v-model="userInfo.bnfLot"
label="受益比例(%)"
name="受益比例"
placeholder="请输入"
required
readonly
v-validate="'required|onlyNumber'"
maxlength="3"
clearable
/>
<template v-if="false">
<van-field
v-model="userInfo.mobile"
clearable
label="联系电话"
name="联系电话"
required
readonly
placeholder="请输入"
v-validate="'required|mobile'"
maxlength="11"
/>
<van-field
v-model="areaName"
readonly
label="联系地址"
name="联系地址"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@click="chooseArea"
/>
<van-field
v-model="userInfo.village"
label=""
readonly
name="详细地址"
placeholder="请输入详细地址"
v-validate="'required'"
clearable
maxlength="30"
/>
<van-field
v-model="userInfo.email"
required
readonly
label="电子邮箱"
name="电子邮箱"
placeholder="请输入"
v-validate="'required|email'"
clearable
/>
<occupation-picker
:value.sync="userInfo.occupationCode"
:chooseName.sync="userInfo.occupationName"
:lifeGrade.sync="userInfo.lifeGrade"
:healthGrade.sync="userInfo.healthGrade"
clearable
label="职业类别"
name="职业类别"
required
v-validate="'required'"
placeholder="请选择"
readonly
:parentShowPicker.sync="occupationShowPicker"
@on-choose="chooseOccupation"
/>
</template>
</van-cell-group>
</div>
</template>
<script>
import { Field, CellGroup, Checkbox, Popup, Picker, Area } from 'vant'
import SelectRadio from '@/components/ebiz/SelectRadio'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
import DataDictionary from '@/assets/js/utils/data-dictionary'
import areaList from '@/assets/js/utils/area'
import getAreaName from '@/assets/js/utils/get-area-name'
import utilsAge from '@/assets/js/utils/age'
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
import idNoCheck from '@/assets/js/utils/idNoCheck'
import { idToData } from './js/verification'
import { selectComp } from './js/methods'
let relationToInsured = DataDictionary.relationToAppnt
export default {
name: 'beneficiaryInfoAdd',
components: {
[SelectRadio.name]: SelectRadio,
[FieldDatePicter.name]: FieldDatePicter,
[OccupationPicker.name]: OccupationPicker,
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Checkbox.name]: Checkbox,
[Popup.name]: Popup,
[Picker.name]: Picker,
[Area.name]: Area,
[IdentityCardScan.name]: IdentityCardScan,
[CustomerPicker.name]: CustomerPicker
},
data() {
return {
effectiveDateTypeAble: true, //长期按钮是否禁用
isScan: false, //是否显示证件扫描组件
sexRadio: [
{
label: '男',
value: '0'
},
{
label: '女',
value: '1'
}
],
currentPopupIndex: '',
relationToAppnt: '',
popupShow: false,
areaShow: false,
pickerType: undefined,
columns: [],
valueKey: 'text',
nationality: '',
idType: '居民身份证',
degree: '',
socialSecurity: '',
taxIdentity: '',
areaName: '',
areaValue: '110101',
effectiveDateRequired: true, //证件截止日期是否需要校验
effectiveDateShow: true, //证件截止日期是否可以选择
marriage: '',
isRequired: '', //长期前是否有*
userInfo: {
bnfId: '',
bnfType: '2',
bnfGrade: '',
name: '',
sex: '0',
nationality: '1',
birthday: '',
idType: '1',
idNo: '',
certificateValidate: '',
effectiveDate: '',
effectiveDateType: false, //是否长期
bnfNo: '1',
bnfOrder: 1,
bnfLot: '',
phone: '',
province: '',
city: '',
area: '',
postalAddress: '',
email: '',
occupationCode: '',
occupationName: '' // 职业中文
},
areaList: areaList,
occupationShowPicker: false,
customerShowPicker: false, //客户列表展示
idLimit: false, //证件起止日期是否只读
policy: null,
bnfDTOs: []
}
},
created() {
this.policy = JSON.parse(localStorage['preserve-policy'])
this.bnfDTOs = this.policy.bnfDTOs
if (this.$route.query.edit) {
this.editIndex = this.$route.query.edit
this.userInfo = this.bnfDTOs[this.$route.query.edit]
}
},
mounted() {},
methods: {
chooseOccupation() {
this.$jump({
flag: 'navigation',
extra: {
title: '指定受益人信息',
hiddenRight: '1'
}
})
this.occupationShowPicker = false
},
//时间戳格式处理
timeStampFormat(timeStamp) {
let date = new Date(timeStamp)
let year = date.getFullYear()
let month = date.getMonth() + 1
month = month.toString().padStart(2, '0')
let day = date.getDate()
day = day.toString().padStart(2, '0')
return `${year}-${month}-${day}`
},
}
}
</script>
<style lang="scss" scoped>
.add-beneficiary-container {
.title {
font-weight: 600;
border-bottom: 1px solid #dadada;
}
/deep/.van-checkbox {
margin-left: auto;
}
}
</style>

View File

@@ -118,7 +118,7 @@ export default {
}
})
.catch(err => {
console.log(err);
console.log(err)
})
}
},

View File

@@ -209,12 +209,12 @@ export default {
},
//提交变更申请
async changeSubmit() {
if(!this.sessionId){
if (!this.sessionId) {
this.$toast({
message: "请先获取验证码",
message: '请先获取验证码',
onClose: this.showAuth
})
return;
return
}
let res = await autchCodeCheck({
smsId: this.sessionId,
@@ -238,7 +238,6 @@ export default {
onClose: this.showAuth
})
}
}
},
beforeDestroy() {

View File

@@ -53,19 +53,30 @@ export default {
},
methods: {
nextStep() {
if (this.customerInfo.idType != '1') {
// 如果证件类型不是身份证
// 直接跳过人脸识别
this.jumpNextPage(this.path)
} else if (this.entry != 'beneficiary') {
if (this.entry != 'beneficiary') {
// 如果 保全项不是 受益人变更、则 在证件类型为身份证时 直接接入人脸识别
this.toFace()
// if (this.customerInfo.idType != '1') {
// 如果证件类型不是身份证
// 直接跳过人脸识别
this.jumpNextPage(this.path)
// } else {
// this.toFace({
// number: this.customerInfo.idNo, //身份证号码
// name: this.customerInfo.name //姓名
// })
// }
} else if (this.entry == 'beneficiary') {
// 如果 保全项是 受益人变更、则进行特殊判断
// 若被保险人≥18周岁人脸识别录入被保人本人
// 若被保险人18周岁被保险人与投保人为子女关系人脸识别录入未成年人父亲或母亲
// toDo
//
// if (this.customerInfo.idType != '1' ) {
// // 如果证件类型不是身份证
// // 直接跳过人脸识别
// this.jumpNextPage(this.path)
// }
//
this.jumpNextPage(this.path)
}
},
@@ -80,17 +91,19 @@ export default {
}
})
},
toFace() {
toFace(config) {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('face_auth', {
number: this.customerInfo.idNo, //身份证号码
name: this.customerInfo.name //姓名
EWebBridge.webCallAppInJs('face_auth', config )
// {
// number: this.customerInfo.idNo, //身份证号码
// name: this.customerInfo.name //姓名
// })
// 跳过人脸识别
// new Promise(resolve => {
// console.log('--跳过人脸识别--返回识别成功')
// resolve(JSON.stringify({ state: '1' }))
}).then(data => {
// })
.then(data => {
if (JSON.parse(data).state == '1') {
this.jumpNextPage(this.path)
} else {

View File

@@ -1 +1 @@
<!--影像信息上传页面-->
<!--影像信息上传页面-->

View File

@@ -1 +1,149 @@
<!--保单列表页-->
<!--保单列表页-->
<template>
<div class="proposal-list-container">
<!-- <van-list
v-model="loading"
:immediate-check="false"
:finished="finished"
:finished-text="finishedText"
error-text="请求失败点击重新加载"
:error.sync="error"
@load="loadMore"
class="pb45"
> -->
<!-- <div v-if="isSuccess"> -->
<div v-if="policyList.length > 0">
<div class="fs12" v-for="(item, index) in policyList" :key="index" @click="toChange(item)">
<div class="flex align-items-c justify-content-c h40 gray">
<div>保单号:</div>
<div>{{ item.policyNo }}</div>
</div>
<div class="bg-white pv15 pr15 pl10 ml15 mr15">
<div class="flex justify-content-s align-items-c">
<div>
<div class="w45 inline-b">
<van-tag plain color="#5CA7DE">投保</van-tag>
</div>
<span class="fs15 c-gray-dark">{{ item.appntName }}</span>
</div>
</div>
<div class="mv15">
<div class="w45 inline-b">
<van-tag plain color="#DD9C56">被保</van-tag>
</div>
<span class="fs15 c-gray-dark">{{ item.insuredName }}</span>
</div>
<div class="mv10">
<span class="w45 inline-b">
<van-tag plain type="danger">主险</van-tag>
</span>
<span class="fs15 c-gray-dark">{{ item.riskName }}</span>
</div>
<van-row class="mb15">
<van-col span="12" class="fwb fs15">保额</van-col>
<van-col span="12" class="text-right fwb" style="color: red">{{ item.amnt | amtFormat }}</van-col>
</van-row>
<div class="pt15" style="border-top:1px solid #dadada">
<div>
<div class="w100 inline-b">
<van-tag plain color="#999999">生效日期</van-tag>
</div>
<span class="fs14 c-gray-dark">{{ item.cvaliDate }}</span>
</div>
</div>
</div>
</div>
</div>
<!-- </div> -->
<div v-else class="text-center">
<img class="mt40 w250" src="@/assets/images/pic_page-non.png" />
<div class="fs17 c-gray-dark mt40">暂无保单</div>
</div>
<!-- </van-list> -->
</div>
</template>
<script>
import { Tag, List, Row, Col } from 'vant'
import { policyList } from '@/api/ebiz/preserve/preserve'
export default {
components: {
[Tag.name]: Tag,
[Row.name]: Row,
[Col.name]: Col,
[List.name]: List
},
data() {
return {
entry: '', //入口
// policyList: [] //保单列表
customerInfo: JSON.parse(localStorage.getItem('preserve-customerInfo')), //客户详情
policyList: [
{
contNo: '11111111',
appntName: '张三',
isuredName: '李四',
riskName: '国富人寿八桂无忧',
amnt: '130.000',
cvaliDate: '2020-01-19'
}
] //保单列表
/*
finishedText: '没有更多了',
finished: false,
error: false,
loading: false,
pageSize: 5, //每页数据条数
morePage: 1, // 当前页数
isSuccess: false
*/
}
},
mounted() {
this.entry = this.$route.query.entry
//await this.getPolicyList({ customerNo: this.customerInfo.customerNo })
this.getPolicyList({ customerNo: '' })
},
methods: {
//获取保单列表
async getPolicyList(data) {
policyList(data).then(res => {
if (res.result == '0') {
this.policyList = res.content.policyListDTOList
} else {
this.$toast(res.resultMessage)
}
})
},
//点击保单,跳转页面
toChange(detail) {
console.log(detail)
localStorage['preserve-policy'] = JSON.stringify(detail)
let url
switch (this.entry) {
case 'surrender': //退保
url = `surrenderInfo?entry=${this.entry}`
break
case 'beneficiary': //受益人变更
url = `beneficiaryInfo?entry=${this.entry}`
break
default:
break
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/preserve/${url}`
},
routerInfo: {
path: `/preserve/${url}`
}
})
}
}
}
</script>

View File

@@ -1 +1 @@
<!--续期账号变更-保全代办确认页-->
<!--续期账号变更-保全代办确认页-->

View File

@@ -1 +1 @@
<!--续期账号变更页面-->
<!--续期账号变更页面-->

View File

@@ -6,7 +6,7 @@
</div>
<p class="mt20 text-center">提交成功</p>
<p class="mt20 fs12 gray text-center">如有疑问请拨打客服电话: 4008-008-008</p>
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="nextStep" v-no-more-click="1000">返回</van-button></div>
</div>
</template>
@@ -24,7 +24,7 @@ export default {
document.body.style.backgroundColor = '#fff'
},
methods: {
nextStep(){
nextStep() {
// service
this.$jump({
flag: 'service'

View File

@@ -1 +1 @@
<!--退保-保全代办确认页-->
<!--退保-保全代办确认页-->

View File

@@ -1 +1 @@
<!--退保页-->
<!--退保页-->