mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-13 14:16:44 +08:00
[new] 新增保全-受益人变更功能,页面逻辑基本完成,部分页面因接口问题暂时无法继续开发
This commit is contained in:
@@ -33,3 +33,21 @@ export function customerInfo(data) {
|
|||||||
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
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
let mockBaseUrl = 'http://rap2.taobao.org:38080/app/mock/250585/'
|
let mockBaseUrl = 'http://rap2.taobao.org:38080/app/mock/250585/'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
'/edor/customer/policyList': mockBaseUrl + '/edor/customer/policyList',
|
||||||
'/edor/customer/customerInfo': mockBaseUrl + '/edor/customer/customerInfo',
|
'/edor/customer/customerInfo': mockBaseUrl + '/edor/customer/customerInfo',
|
||||||
'/edor/customer/customerList': mockBaseUrl + '/edor/customer/customerList',
|
'/edor/customer/customerList': mockBaseUrl + '/edor/customer/customerList',
|
||||||
'/edor/item/change': mockBaseUrl + '/edor/item/change',
|
'/edor/item/change': mockBaseUrl + '/edor/item/change',
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const contacAgreement = () => import('@/views/ebiz/preserve/ContacAgreement')
|
|||||||
const contactConfirmation = () => import('@/views/ebiz/preserve/ContactConfirmation')
|
const contactConfirmation = () => import('@/views/ebiz/preserve/ContactConfirmation')
|
||||||
const beneficiaryInfo = () => import('@/views/ebiz/preserve/BeneficiaryInfo')
|
const beneficiaryInfo = () => import('@/views/ebiz/preserve/BeneficiaryInfo')
|
||||||
const beneficiaryInfoAdd = () => import('@/views/ebiz/preserve/BeneficiaryInfoAdd')
|
const beneficiaryInfoAdd = () => import('@/views/ebiz/preserve/BeneficiaryInfoAdd')
|
||||||
|
const beneficiaryInfoDetail = () => import('@/views/ebiz/preserve/BeneficiaryInfoDetail')
|
||||||
const beneficiaryConfirmation = () => import('@/views/ebiz/preserve/BeneficiaryConfirmation')
|
const beneficiaryConfirmation = () => import('@/views/ebiz/preserve/BeneficiaryConfirmation')
|
||||||
const surrenderInfo = () => import('@/views/ebiz/preserve/SurrenderInfo')
|
const surrenderInfo = () => import('@/views/ebiz/preserve/SurrenderInfo')
|
||||||
const surrenderConfirmation = () => import('@/views/ebiz/preserve/SurrenderConfirmation')
|
const surrenderConfirmation = () => import('@/views/ebiz/preserve/SurrenderConfirmation')
|
||||||
@@ -80,6 +81,15 @@ export default [
|
|||||||
index: 105
|
index: 105
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/preserve/beneficiaryInfoDetail',
|
||||||
|
name: 'beneficiaryInfoDetail',
|
||||||
|
component: beneficiaryInfoDetail,
|
||||||
|
meta: {
|
||||||
|
title: '指定受益人信息',
|
||||||
|
index: 105
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/surrenderInfo',
|
path: '/preserve/surrenderInfo',
|
||||||
name: 'surrenderInfo',
|
name: 'surrenderInfo',
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<!--受益人变更-保全代办确认页-->
|
<!--受益人变更页面-->
|
||||||
<template>
|
<template>
|
||||||
<div class="beneficiary-container">
|
<div class="beneficiary-container">
|
||||||
<div h10></div>
|
<div h10></div>
|
||||||
<div class="fs14 flex justify-content-s pv12 ph15 van-hairline--bottom">
|
<div class="fs14 flex justify-content-s pv12 ph15 van-hairline--bottom">
|
||||||
<label class="c-gray-dark">被保险人</label>
|
<label class="c-gray-dark">被保险人</label>
|
||||||
<span class="c-gray-darker">{{ insuredPerson }}</span>
|
<span class="c-gray-darker">{{ insuredName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fs14 pv12 ph15 van-hairline--bottom flex">
|
<div class="fs14 pv12 ph15 van-hairline--bottom flex">
|
||||||
<label class="c-gray-dark">身故受益人</label>
|
<label class="c-gray-dark">身故受益人</label>
|
||||||
<div class="ml20 c-gray-darker">
|
<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="1">法定受益人</van-radio>
|
||||||
<van-radio name="2" class="ml10">指定受益人</van-radio>
|
<van-radio name="2" class="ml10">指定受益人</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
@@ -19,15 +19,10 @@
|
|||||||
<div class="fs14 beneficiary-list" v-if="type == 2">
|
<div class="fs14 beneficiary-list" v-if="type == 2">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="pv20 ph15 item" v-for="(item, index) in beneficiaries" :key="index">
|
<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 class="flex justify-content-s c-gray-darker">
|
||||||
<div>
|
<div>
|
||||||
<img
|
<img src="@/assets/images/bnf_avatar.png" width="40" height="40" class="radius50 v-middle" />
|
||||||
src="@/assets/images/bnf_avatar.png"
|
|
||||||
width="40"
|
|
||||||
height="40"
|
|
||||||
class="radius50 v-middle"
|
|
||||||
/>
|
|
||||||
<span class="ml10 c-gray-base">{{ item.name }}</span>
|
<span class="ml10 c-gray-base">{{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,8 +38,6 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- 短信验证 -->
|
|
||||||
<!-- cancelButtonColor="#4FC6B3" -->
|
|
||||||
<van-dialog
|
<van-dialog
|
||||||
v-model="show"
|
v-model="show"
|
||||||
title="短信确认"
|
title="短信确认"
|
||||||
@@ -56,7 +49,7 @@
|
|||||||
@cancel="clearTimer"
|
@cancel="clearTimer"
|
||||||
>
|
>
|
||||||
<p class="p10 fs14">向此手机发送验证码确认用户身份</p>
|
<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-cell-group class="flex align-items-c pr5 mb15">
|
||||||
<van-field maxlength="6" placeholder="请输入手机验证码" v-model="authCode" clearable label-width="0" />
|
<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">
|
<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-button>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</van-dialog>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { RadioGroup, Radio, Icon, Dialog, Field, CellGroup } from 'vant'
|
import { Field, CellGroup, RadioGroup, Radio, Icon, Dialog } from 'vant'
|
||||||
import dataDictionary from '@/assets/js/utils/data-dictionary'
|
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
|
||||||
import { saveOrUpdateOrderInfo, getOrderDetail, getAuthCode } from '@/api/ebiz/sale/sale'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'beneficiary',
|
name: 'BeneficiaryConfirmation',
|
||||||
components: {
|
components: {
|
||||||
[RadioGroup.name]: RadioGroup,
|
|
||||||
[Radio.name]: Radio,
|
|
||||||
[Field.name]: Field,
|
[Field.name]: Field,
|
||||||
[CellGroup.name]: CellGroup,
|
[CellGroup.name]: CellGroup,
|
||||||
|
[RadioGroup.name]: RadioGroup,
|
||||||
|
[Radio.name]: Radio,
|
||||||
[Icon.name]: Icon,
|
[Icon.name]: Icon,
|
||||||
[Dialog.name]: Dialog
|
[Dialog.name]: Dialog
|
||||||
},
|
},
|
||||||
|
filters: {
|
||||||
|
Mask: function(value) {
|
||||||
|
if (value) {
|
||||||
|
return value.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
|
let feachData = {
|
||||||
|
surrenderDTOList: [
|
||||||
|
{
|
||||||
|
surrenderId: '',
|
||||||
|
edorapplyNo: '',
|
||||||
|
surrenderType: '2',
|
||||||
|
bnfDTOs: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
type: '1',
|
|
||||||
show: false, // 获取短信验证码
|
show: false, // 获取短信验证码
|
||||||
codeDisabled: false, // 获取验证码按钮是否禁用
|
codeDisabled: false, // 获取验证码按钮是否禁用
|
||||||
insuredPerson: '', //被保险人
|
|
||||||
isAssign: false, // 是否指定受益人
|
|
||||||
timeId: null, // 计时器ID
|
timeId: null, // 计时器ID
|
||||||
countDown: 60, // 倒计时
|
countDown: 60, // 倒计时
|
||||||
authCode: '', // 验证码
|
authCode: '', // 验证码
|
||||||
beneficiaries: [
|
feachData:feachData,
|
||||||
// {
|
type: '',
|
||||||
// name: '陈明',
|
isDisType: false,
|
||||||
// relationToAppnt: '1',
|
policy: null,
|
||||||
// beneRatio: '99'
|
insuredName: '', //被保险人
|
||||||
// }
|
beneficiaries: [] // 指定受益人列表
|
||||||
], // 指定受益人列表
|
|
||||||
bnfFlag: '0', // 受益人类型
|
|
||||||
bnfType: '0' // 0 身故受益人 1 身前受益人
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 是否从添加指定受益人页面跳转
|
// 获取保单列表存储的数据
|
||||||
if (localStorage.fromAddBeneficiaryInfo) {
|
this.policy = JSON.parse(localStorage['preserve-policy'])
|
||||||
this.type = '2'
|
this.insuredName = this.policy.insuredName
|
||||||
this.beneficiaries = this.beneficiaries.concat(JSON.parse(localStorage.beneficiaryInfo))
|
this.type = this.policy.bnfDTOs[0].bnfType
|
||||||
this.type = '2'
|
this.isDisType = true
|
||||||
console.log(this.beneficiaries)
|
this.beneficiaries = this.policy.bnfDTOs
|
||||||
}
|
},
|
||||||
//如果是从编辑进来
|
mounted() {},
|
||||||
if (this.$route.query.edit) {
|
methods: {
|
||||||
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
|
//告知信息
|
||||||
if (res.result == 0) {
|
nextStep() {
|
||||||
this.$utils.intLocalStorage(res)
|
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', //是否返回后刷新0:否,1:是
|
|
||||||
// index: '-1'
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// 显示验证码 van-dialog
|
// 显示验证码 van-dialog
|
||||||
showAuth() {
|
showAuth() {
|
||||||
this.show = true
|
this.show = true
|
||||||
},
|
},
|
||||||
//告知信息
|
|
||||||
nextStep() {
|
|
||||||
if (this.type == 2 && this.beneficiaries.length == 0) {
|
|
||||||
this.$toast('受益人列表不能为空')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
// 获取短信验证码
|
// 获取短信验证码
|
||||||
getAuthCode() {
|
getAuthCode() {
|
||||||
this.codeDisabled = true
|
this.codeDisabled = true
|
||||||
@@ -178,7 +164,10 @@ export default {
|
|||||||
if (res.result == 0) {
|
if (res.result == 0) {
|
||||||
this.sessionId = res.sessionId
|
this.sessionId = res.sessionId
|
||||||
} else {
|
} else {
|
||||||
this.$toast(res.resultMessage)
|
this.$toast({
|
||||||
|
message: res.resultMessage,
|
||||||
|
onClose: this.showAuth
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -186,16 +175,6 @@ export default {
|
|||||||
async authConfirm() {
|
async authConfirm() {
|
||||||
//清理计时器
|
//清理计时器
|
||||||
this.clearTimer()
|
this.clearTimer()
|
||||||
// this.$dialog
|
|
||||||
// .alert({
|
|
||||||
// title: '提示',
|
|
||||||
// className: 'dialog-alert',
|
|
||||||
// message: '您所有保单的相应信息均将变更',
|
|
||||||
// confirmButtonColor: '#FFFFFF',
|
|
||||||
// })
|
|
||||||
// .then(() => {
|
|
||||||
// this.changeSubmit()
|
|
||||||
// })
|
|
||||||
this.changeSubmit()
|
this.changeSubmit()
|
||||||
},
|
},
|
||||||
// 清理计时器
|
// 清理计时器
|
||||||
@@ -205,184 +184,42 @@ export default {
|
|||||||
this.countDown = 60
|
this.countDown = 60
|
||||||
this.codeDisabled = false
|
this.codeDisabled = false
|
||||||
},
|
},
|
||||||
|
//提交变更申请
|
||||||
async changeSubmit() {
|
async changeSubmit() {
|
||||||
// this.bnfFlag = this.type == 2 ? '1' : '0'
|
if (!this.sessionId) {
|
||||||
// //生成接口数据
|
this.$toast({
|
||||||
// let data = {
|
message: '请先获取验证码',
|
||||||
// orderType: 'BNF_ORDER',
|
onClose: this.showAuth
|
||||||
// orderDTO: {
|
})
|
||||||
// productDTO: null,
|
return
|
||||||
// orderInfoDTO: {
|
}
|
||||||
// bnfFlag: this.bnfFlag,
|
let res = await autchCodeCheck({
|
||||||
// orderNo: localStorage.orderNo
|
smsId: this.sessionId,
|
||||||
// },
|
code: this.authCode
|
||||||
// appntDTO: {},
|
})
|
||||||
// insuredDTOs: [
|
if (res.result == 0) {
|
||||||
// {
|
|
||||||
// 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({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + '/#/preserve/submitResult',
|
url: location.origin + `/#/preserve/submitResult`,
|
||||||
needRefresh: '1'
|
backToFirst: '1'
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: {
|
||||||
path: '/preserve/submitResult'
|
path: `/preserve/submitResult`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// } else {
|
} else {
|
||||||
// this.$toast(res.resultMessage)
|
this.show = false
|
||||||
// }
|
this.$toast({
|
||||||
// })
|
message: res.resultMessage,
|
||||||
},
|
onClose: this.showAuth
|
||||||
//添加受益人
|
|
||||||
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('受益份额已满~')
|
|
||||||
}
|
|
||||||
this.$jump({
|
|
||||||
flag: 'h5',
|
|
||||||
extra: {
|
|
||||||
url: location.origin + '/#/preserve/BeneficiaryInfoAdd'
|
|
||||||
},
|
|
||||||
routerInfo: {
|
|
||||||
path: '/preserve/BeneficiaryInfoAdd'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 单选按钮切换
|
|
||||||
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')
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除 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
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 删除受益人
|
|
||||||
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() {
|
beforeDestroy() {
|
||||||
//清理计时器
|
//清理计时器
|
||||||
this.clearTimer()
|
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>
|
</script>
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<div h10></div>
|
<div h10></div>
|
||||||
<div class="fs14 flex justify-content-s pv12 ph15 van-hairline--bottom">
|
<div class="fs14 flex justify-content-s pv12 ph15 van-hairline--bottom">
|
||||||
<label class="c-gray-dark">被保险人</label>
|
<label class="c-gray-dark">被保险人</label>
|
||||||
<span class="c-gray-darker">{{ insuredPerson }}</span>
|
<span class="c-gray-darker">{{ insuredName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fs14 pv12 ph15 van-hairline--bottom flex">
|
<div class="fs14 pv12 ph15 van-hairline--bottom flex">
|
||||||
<label class="c-gray-dark">身故受益人</label>
|
<label class="c-gray-dark">身故受益人</label>
|
||||||
<div class="ml20 c-gray-darker">
|
<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="1">法定受益人</van-radio>
|
||||||
<van-radio name="2" class="ml10">指定受益人</van-radio>
|
<van-radio name="2" class="ml10">指定受益人</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
@@ -22,12 +22,7 @@
|
|||||||
<div class="bg-white p15">
|
<div class="bg-white p15">
|
||||||
<div class="flex justify-content-s c-gray-darker">
|
<div class="flex justify-content-s c-gray-darker">
|
||||||
<div>
|
<div>
|
||||||
<img
|
<img src="@/assets/images/bnf_avatar.png" width="40" height="40" class="radius50 v-middle" />
|
||||||
src="@/assets/images/bnf_avatar.png"
|
|
||||||
width="40"
|
|
||||||
height="40"
|
|
||||||
class="radius50 v-middle"
|
|
||||||
/>
|
|
||||||
<span class="ml10 c-gray-base">{{ item.name }}</span>
|
<span class="ml10 c-gray-base">{{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -54,10 +49,10 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { RadioGroup, Radio, Icon, Dialog } from 'vant'
|
import { RadioGroup, Radio, Icon, Dialog } from 'vant'
|
||||||
import dataDictionary from '@/assets/js/utils/data-dictionary'
|
import { edorChange } from '@/api/ebiz/preserve/preserve'
|
||||||
import { saveOrUpdateOrderInfo, getOrderDetail } from '@/api/ebiz/sale/sale'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'beneficiary',
|
name: 'BeneficiaryInfo',
|
||||||
components: {
|
components: {
|
||||||
[RadioGroup.name]: RadioGroup,
|
[RadioGroup.name]: RadioGroup,
|
||||||
[Radio.name]: Radio,
|
[Radio.name]: Radio,
|
||||||
@@ -65,118 +60,72 @@ export default {
|
|||||||
[Dialog.name]: Dialog
|
[Dialog.name]: Dialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
let feachData = {
|
||||||
|
surrenderDTOList: [
|
||||||
|
{
|
||||||
|
surrenderId: '',
|
||||||
|
edorapplyNo: '',
|
||||||
|
surrenderType: '2',
|
||||||
|
bnfDTOs: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
type: '1',
|
feachData:feachData,
|
||||||
insuredPerson: '', //被保险人
|
type: '',
|
||||||
isAssign: false, // 是否指定受益人
|
isDisType: false,
|
||||||
beneficiaries: [
|
policy: null,
|
||||||
// {
|
insuredName: '', //被保险人
|
||||||
// name: '陈明',
|
beneficiaries: [] // 指定受益人列表
|
||||||
// relationToAppnt: '1',
|
|
||||||
// beneRatio: '99'
|
|
||||||
// }
|
|
||||||
], // 指定受益人列表
|
|
||||||
bnfFlag: '0', // 受益人类型
|
|
||||||
bnfType: '0' // 0 身故受益人 1 身前受益人
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 是否从添加指定受益人页面跳转
|
// 获取保单列表存储的数据
|
||||||
if (localStorage.fromAddBeneficiaryInfo) {
|
this.policy = JSON.parse(localStorage['preserve-policy'])
|
||||||
this.type = '2'
|
console.log(this.policy)
|
||||||
this.beneficiaries = this.beneficiaries.concat(JSON.parse(localStorage.beneficiaryInfo))
|
this.insuredName = this.policy.insuredName
|
||||||
this.type = '2'
|
|
||||||
console.log(this.beneficiaries)
|
this.type = this.policy.bnfDTOs[0].bnfType
|
||||||
|
if (this.type == 2) {
|
||||||
|
this.isDisType = true
|
||||||
}
|
}
|
||||||
//如果是从编辑进来
|
|
||||||
if (this.$route.query.edit) {
|
this.beneficiaries = this.policy.bnfDTOs
|
||||||
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()
|
|
||||||
},
|
},
|
||||||
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
// appCallBack() {
|
|
||||||
// this.$jump({
|
|
||||||
// flag: 'goBack',
|
|
||||||
// extra: {
|
|
||||||
// refresh: '1', //是否返回后刷新0:否,1:是
|
|
||||||
// index: '-1'
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
//告知信息
|
//告知信息
|
||||||
nextStep() {
|
nextStep() {
|
||||||
if (this.type == 2 && this.beneficiaries.length == 0) {
|
if (this.type == 2 && this.beneficiaries.length == 0) {
|
||||||
this.$toast('受益人列表不能为空')
|
this.$toast('受益人列表不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// this.bnfFlag = this.type == 2 ? '1' : '0'
|
this.feachData.surrenderDTOList[0].bnfDTOs = this.beneficiaries
|
||||||
// //生成接口数据
|
edorChange(this.feachData)
|
||||||
// let data = {
|
.then(res => {
|
||||||
// orderType: 'BNF_ORDER',
|
if (res.result == 0) {
|
||||||
// orderDTO: {
|
this.policy.bnfDTOs = this.beneficiaries
|
||||||
// productDTO: null,
|
localStorage['preserve-policy'] = JSON.stringify(this.policy)
|
||||||
// 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({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + '/#/preserve/HandleResult?entry=beneficiary',
|
url: location.origin + '/#/preserve/HandleResult?entry=beneficiary'
|
||||||
needRefresh: '1'
|
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: '/preserve/HandleResult?entry=beneficiary'
|
||||||
path: '/preserve/HandleResult?entry=beneficiary'
|
})
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// } else {
|
.catch(err => {
|
||||||
// this.$toast(res.resultMessage)
|
console.log(err)
|
||||||
// }
|
})
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
//添加受益人
|
//添加受益人
|
||||||
add() {
|
add() {
|
||||||
let beneRatio = 0
|
let beneRatio = 0
|
||||||
console.log(this.beneficiaries)
|
|
||||||
this.beneficiaries.forEach(item => {
|
this.beneficiaries.forEach(item => {
|
||||||
beneRatio += parseInt(item.bnfLot)
|
beneRatio += parseFloat(item.bnfLot)
|
||||||
})
|
})
|
||||||
console.log(beneRatio)
|
console.log(beneRatio)
|
||||||
if (beneRatio >= 100) {
|
if (beneRatio >= 100) {
|
||||||
@@ -192,10 +141,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 单选按钮切换
|
|
||||||
radioChange(val) {
|
|
||||||
console.log(val)
|
|
||||||
},
|
|
||||||
// 删除受益人
|
// 删除受益人
|
||||||
deleteBeneficiary(index) {
|
deleteBeneficiary(index) {
|
||||||
Dialog.confirm({
|
Dialog.confirm({
|
||||||
@@ -206,92 +151,32 @@ export default {
|
|||||||
confirmButtonColor: '#FFFFFF'
|
confirmButtonColor: '#FFFFFF'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.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.beneficiaries.splice(index, 1)
|
||||||
|
this.policy.bnfDTOs = this.beneficiaries
|
||||||
|
localStorage['preserve-policy'] = JSON.stringify(this.policy)
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
// on cancel
|
|
||||||
return
|
return
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 删除受益人
|
// 编辑受益人
|
||||||
editBeneficiary(index) {
|
editBeneficiary(index) {
|
||||||
Dialog.confirm({
|
this.policy.bnfDTOs = this.beneficiaries
|
||||||
className: 'dialog-delete',
|
localStorage['preserve-policy'] = JSON.stringify(this.policy)
|
||||||
title: '提示',
|
let path = '/preserve/BeneficiaryInfoAdd?edit=' + index
|
||||||
message: '您确认要修改该受益人吗?',
|
this.$jump({
|
||||||
cancelButtonColor: '#E9332E',
|
flag: 'h5',
|
||||||
confirmButtonColor: '#FFFFFF'
|
extra: {
|
||||||
})
|
url: location.origin + '/#' + path
|
||||||
.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
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//获取受益人列表
|
routerInfo: {
|
||||||
async getBeneficiaryList() {
|
path: path
|
||||||
const res = await getOrderDetail({ orderNo: localStorage.orderNo })
|
|
||||||
console.log(res)
|
|
||||||
if (res.result == 0 && res.orderDTO) {
|
|
||||||
this.beneficiaries = res.orderDTO.inuseredDTOs[0].bnfDTOs
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {}
|
||||||
relationTransfer(relationIdx) {
|
|
||||||
let relationText = ''
|
|
||||||
dataDictionary.relationToAppnt.some(item => {
|
|
||||||
if (item.id == relationIdx) {
|
|
||||||
relationText = item.text
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return relationText
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
309
src/views/ebiz/preserve/BeneficiaryInfoDetail.vue
Normal file
309
src/views/ebiz/preserve/BeneficiaryInfoDetail.vue
Normal 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>
|
||||||
@@ -118,7 +118,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log(err);
|
console.log(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -209,12 +209,12 @@ export default {
|
|||||||
},
|
},
|
||||||
//提交变更申请
|
//提交变更申请
|
||||||
async changeSubmit() {
|
async changeSubmit() {
|
||||||
if(!this.sessionId){
|
if (!this.sessionId) {
|
||||||
this.$toast({
|
this.$toast({
|
||||||
message: "请先获取验证码",
|
message: '请先获取验证码',
|
||||||
onClose: this.showAuth
|
onClose: this.showAuth
|
||||||
})
|
})
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
let res = await autchCodeCheck({
|
let res = await autchCodeCheck({
|
||||||
smsId: this.sessionId,
|
smsId: this.sessionId,
|
||||||
@@ -238,7 +238,6 @@ export default {
|
|||||||
onClose: this.showAuth
|
onClose: this.showAuth
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -53,19 +53,30 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
nextStep() {
|
nextStep() {
|
||||||
if (this.customerInfo.idType != '1') {
|
if (this.entry != 'beneficiary') {
|
||||||
|
// 如果 保全项不是 受益人变更、则 在证件类型为身份证时 直接接入人脸识别
|
||||||
|
// if (this.customerInfo.idType != '1') {
|
||||||
// 如果证件类型不是身份证
|
// 如果证件类型不是身份证
|
||||||
// 直接跳过人脸识别
|
// 直接跳过人脸识别
|
||||||
|
|
||||||
this.jumpNextPage(this.path)
|
this.jumpNextPage(this.path)
|
||||||
} else if (this.entry != 'beneficiary') {
|
// } else {
|
||||||
// 如果 保全项不是 受益人变更、则 在证件类型为身份证时 直接接入人脸识别
|
// this.toFace({
|
||||||
this.toFace()
|
// number: this.customerInfo.idNo, //身份证号码
|
||||||
|
// name: this.customerInfo.name //姓名
|
||||||
|
// })
|
||||||
|
// }
|
||||||
} else if (this.entry == 'beneficiary') {
|
} else if (this.entry == 'beneficiary') {
|
||||||
// 如果 保全项是 受益人变更、则进行特殊判断
|
// 如果 保全项是 受益人变更、则进行特殊判断
|
||||||
// 若被保险人≥18周岁,人脸识别录入被保人本人
|
// 若被保险人≥18周岁,人脸识别录入被保人本人
|
||||||
// 若被保险人<18周岁,被保险人与投保人为子女关系,人脸识别录入未成年人父亲或母亲
|
// 若被保险人<18周岁,被保险人与投保人为子女关系,人脸识别录入未成年人父亲或母亲
|
||||||
// toDo
|
// toDo
|
||||||
|
//
|
||||||
|
// if (this.customerInfo.idType != '1' ) {
|
||||||
|
// // 如果证件类型不是身份证
|
||||||
|
// // 直接跳过人脸识别
|
||||||
|
// this.jumpNextPage(this.path)
|
||||||
|
// }
|
||||||
|
//
|
||||||
this.jumpNextPage(this.path)
|
this.jumpNextPage(this.path)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -80,17 +91,19 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toFace() {
|
toFace(config) {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
EWebBridge.webCallAppInJs('face_auth', {
|
EWebBridge.webCallAppInJs('face_auth', config )
|
||||||
number: this.customerInfo.idNo, //身份证号码
|
// {
|
||||||
name: this.customerInfo.name //姓名
|
// number: this.customerInfo.idNo, //身份证号码
|
||||||
|
// name: this.customerInfo.name //姓名
|
||||||
// })
|
// })
|
||||||
// 跳过人脸识别
|
// 跳过人脸识别
|
||||||
// new Promise(resolve => {
|
// new Promise(resolve => {
|
||||||
// console.log('--跳过人脸识别--返回识别成功')
|
// console.log('--跳过人脸识别--返回识别成功')
|
||||||
// resolve(JSON.stringify({ state: '1' }))
|
// resolve(JSON.stringify({ state: '1' }))
|
||||||
}).then(data => {
|
// })
|
||||||
|
.then(data => {
|
||||||
if (JSON.parse(data).state == '1') {
|
if (JSON.parse(data).state == '1') {
|
||||||
this.jumpNextPage(this.path)
|
this.jumpNextPage(this.path)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default {
|
|||||||
document.body.style.backgroundColor = '#fff'
|
document.body.style.backgroundColor = '#fff'
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
nextStep(){
|
nextStep() {
|
||||||
// service
|
// service
|
||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'service'
|
flag: 'service'
|
||||||
|
|||||||
Reference in New Issue
Block a user