Merge branch 'feature/GFRS-2215【待完成】重新投保' into dev

# Conflicts:
#	src/router/ebiz/insureAgain.js
#	src/views/ebiz/insureAgain/notification.vue
#	src/views/ebiz/insureAgain/uncommitInsureDetail.vue
This commit is contained in:
pangxingyue
2021-03-25 17:40:44 +08:00
23 changed files with 7607 additions and 831 deletions

View File

@@ -1,7 +1,7 @@
/*
* @Author: PangXingYue
* @Date: 2021-03-04 10:38:24
* @LastEditTime: 2021-03-04 10:50:17
* @LastEditTime: 2021-03-24 10:08:07
* @LastEditors: PangXingYue
* @Description:
* @FilePath: \ebiz-h5\src\api\ebiz\insureAgain\insureAgain.js
@@ -9,18 +9,18 @@
import request from '@/assets/js/utils/request'
import getUrl from '@/assets/js/utils/get-url'
// 订单列表
export function orderList(data) {
export function getPolicyListAgent(data) {
return request({
url: getUrl('/sale/order/orderList', 1),
url: getUrl('/sale/policy/policyListAgent', 1),
method: 'post',
data
})
}
// 获取订单详情
export function getOrderDetail(data) {
// 获取订单详情(待提交)
export function getReAppntPolicy(data) {
return request({
url: getUrl('/sale/order/orderDetail', 1),
url: getUrl('/sale/policy/getReAppntPolicy', 1),
method: 'post',
data
})
@@ -33,4 +33,17 @@ export function saveOrUpdateOrderInfo(data) {
method: 'post',
data
})
}
/**
* @description: 重新投保-投保信息保存
* @param {*} data
* @return {*}
*/
export function commitReOrder(data) {
return request({
url: getUrl('/sale/order/commitReOrder', 1),
method: 'post',
data
})
}

View File

@@ -1688,6 +1688,20 @@ export default {
text: '待客户付款'
}
],
contState: [
{
val: '0',
text: '投保中',
},
{
val: '1',
text: '承包',
},
{
val: '4',
text: '终止',
},
],
// 产品编码
riskType: [
{

View File

@@ -1,3 +1,11 @@
<!--
* @Author: PangXingYue
* @Date: 2021-03-22 09:46:16
* @LastEditTime: 2021-03-22 14:02:35
* @LastEditors: PangXingYue
* @Description:
* @FilePath: \ebiz-h5\src\components\ebiz\insureAgain\Order.vue
-->
<template>
<div class="order">
<slot name="header">
@@ -6,12 +14,12 @@
<div class="content p15">
<p class="name mb8">
<van-tag plain color="#5CA7DE">投保</van-tag>
<span class="ml5">{{ order.appntDTO.name }}</span>
<span class="ml5">{{ order.appntName }}</span>
</p>
<p class="name mb8" v-for="(insured, insuredIndex) in order.insuredDTOs" :key="insuredIndex">
<p class="name mb8">
<van-tag plain color="#DD9C56">被保</van-tag>
<span class="ml5">{{ insured.name }}</span>
<span v-for="(main, mainIndex) in insured.mainRisk" :key="mainIndex">
<span class="ml5">{{ order.insuredName }}</span>
<!-- <span v-for="(main, mainIndex) in insured.mainRisk" :key="mainIndex">
<div class="mv10">
<span class="w45 inline-b">
<van-tag plain type="danger">主险</van-tag>
@@ -24,11 +32,11 @@
</span>
<span class="fs13">{{ addtional.riskName }}</span>
</div>
</span>
</span> -->
</p>
<p class="prem mb10">
<span>首期总保费()</span>
<span>{{ order.firstPrem == 0 ? '0.00' : order.firstPrem | moneyFormat }}</span>
<span>{{ order.prem == 0 ? '0.00' : order.prem | moneyFormat }}</span>
</p>
<div class="divider mb10" />
<slot></slot>

View File

@@ -1,3 +1,11 @@
<!--
* @Author: PangXingYue
* @Date: 2021-03-23 17:07:03
* @LastEditTime: 2021-03-24 18:23:20
* @LastEditors: PangXingYue
* @Description:
* @FilePath: \ebiz-h5\src\components\ebiz\insureAgain\ProgressBar.vue
-->
<template>
<div class="prgoress-bar">
<template v-for="(item, index) in items">
@@ -41,7 +49,7 @@ export default {
var url;
switch (index) {
case 0:
url = 'insureInformation';
url = 'InsureInformation';
break;
case 1:
url = 'productInformation';
@@ -53,7 +61,7 @@ export default {
url = 'signConfirmation';
break;
default:
url = 'insureInformation';
url = 'InsureInformation';
break;
}
this.$jump({

View File

@@ -143,6 +143,11 @@ export default {
.agreement {
height: 100vh;
overflow: auto;
.agreement-content{
padding: 10px;
box-sizing: border-box;
margin-bottom: 120px;
}
.agreement-title {
font-size: 20px;
font-weight: bold;

View File

@@ -1,21 +1,29 @@
/*
* @Author: PangXingYue
* @Date: 2021-03-11 09:07:58
<<<<<<< HEAD
* @LastEditTime: 2021-03-11 14:31:18
=======
* @LastEditTime: 2021-03-24 18:30:51
>>>>>>> feature/GFRS-2215【待完成】重新投保
* @LastEditors: PangXingYue
* @Description:
* @FilePath: \ebiz-h5\src\router\ebiz\insureAgain.js
*/
const InsureAgain = () => import('@/views/ebiz/insureAgain')
const UncommitInsureDetail = () => import('@/views/ebiz/insureAgain/uncommitInsureDetail')
const CommitInsureDetail = () => import('@/views/ebiz/insureAgain/commitInsureDetail')
const InsureInformation = () => import('@/views/ebiz/insureAgain/insureInformation')
const ProductInformation = () => import('@/views/ebiz/insureAgain/productInformation')
const Notification = () => import('@/views/ebiz/insureAgain/notification')
const SignConfirmation = () => import('@/views/ebiz/insureAgain/signConfirmation')
const InsureAgainPayment = () => import('@/views/ebiz/insureAgain/payment')
const PaymentResult = () => import('@/views/ebiz/insureAgain/paymentResult')
const UncommitInsureDetail = () => import('@/views/ebiz/insureAgain/UncommitInsureDetail')
const CommitInsureDetail = () => import('@/views/ebiz/insureAgain/CommitInsureDetail')
const InsureInformation = () => import('@/views/ebiz/insureAgain/InsureInformation')
const ProductInformation = () => import('@/views/ebiz/insureAgain/ProductInformation')
const Notification = () => import('@/views/ebiz/insureAgain/Notification')
const SignatureConfirmation = () => import('@/views/ebiz/insureAgain/SignatureConfirmation')
const InsureAgainPayment = () => import('@/views/ebiz/insureAgain/Payment')
const PaymentResult = () => import('@/views/ebiz/insureAgain/PaymentResult')
const ProductTip = () => import('@/views/ebiz/insureAgain/ProductTip')
const InsuranceTip = () => import('@/views/ebiz/insureAgain/InsuranceTip')
const SignatureOfElectronic = () => import('@/views/ebiz/insureAgain/SignatureOfElectronic')
const InsuranceInformation = () => import('@/views/ebiz/insureAgain/InsuranceInformation')
let riskName = localStorage.riskName
export default [
{
// 重新投保保单列表
@@ -28,8 +36,8 @@ export default [
},
{
// 可申请重新投保保单详情
path: '/insureAgain/uncommitInsureDetail',
name: 'uncommitInsureDetail',
path: '/insureAgain/UncommitInsureDetail',
name: 'UncommitInsureDetail',
component: UncommitInsureDetail,
meta: {
title: '可申请重新投保保单详情'
@@ -37,8 +45,8 @@ export default [
},
{
// 重新投保保单详情
path: '/insureAgain/commitInsureDetail',
name: 'commitInsureDetail',
path: '/insureAgain/CommitInsureDetail',
name: 'CommitInsureDetail',
component: CommitInsureDetail,
meta: {
title: '重新投保保单详情'
@@ -46,7 +54,7 @@ export default [
},
{
// 投保信息确认
path: '/insureAgain/insureInformation',
path: '/insureAgain/InsureInformation',
name: 'InsureInformation',
component: InsureInformation,
meta: {
@@ -55,8 +63,8 @@ export default [
},
{
// 险种信息
path: '/insureAgain/productInformation',
name: 'productInformation',
path: '/insureAgain/ProductInformation',
name: 'ProductInformation',
component: ProductInformation,
meta: {
title: '险种信息'
@@ -64,8 +72,8 @@ export default [
},
{
// 告知信息
path: '/insureAgain/notification',
name: 'notification',
path: '/insureAgain/Notification',
name: 'Notification',
component: Notification,
meta: {
title: '告知信息'
@@ -73,16 +81,16 @@ export default [
},
{
// 签名确认
path: '/insureAgain/signConfirmation',
name: 'signConfirmation',
component: SignConfirmation,
path: '/insureAgain/SignatureConfirmation',
name: 'SignatureConfirmation',
component: SignatureConfirmation,
meta: {
title: '签名确认'
}
},
{
// 支付
path: '/insureAgain/payment',
path: '/insureAgain/Payment',
name: 'InsureAgainPayment',
component: InsureAgainPayment,
meta: {
@@ -91,11 +99,47 @@ export default [
},
{
// 支付结果
path: '/insureAgain/paymentResult',
name: 'InsureAgainPaymentResult',
path: '/insureAgain/PaymentResult',
name: 'PaymentResult',
component: PaymentResult,
meta: {
title: '支付结果'
}
<<<<<<< HEAD
}
=======
},
{
path: '/insureAgain/InsuranceTip',
name: 'InsuranceTip',
component: InsuranceTip,
meta: {
title: '阅读人身保险投保提示书'
}
},
{
path: '/insureAgain/ProductTip',
name: 'ProductTip',
component: ProductTip,
meta: {
title: `${riskName}产品说明书`
}
},
{
path: '/insureAgain/SignatureOfElectronic',
name: 'SignatureOfElectronic',
component: SignatureOfElectronic,
meta: {
title: '电子投保单签名'
}
},
{
path: '/insureAgain/InsuranceInformation',
name: 'InsuranceInformation',
component: InsuranceInformation,
meta: {
title: '投保须知'
}
},
>>>>>>> feature/GFRS-2215待完成重新投保
]

View File

@@ -0,0 +1,538 @@
<template>
<div class="insuranceInformation-container pb50 redRadioCheckbox">
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示阅读时长需在${this.Time ? this.time : this.number}秒以上` }}</van-notice-bar>
<div class="bg-white flex justify-content-c flex-direction-colunm align-it<po>ems-center p20 fs14">
<!-- 重疾, 医疗, 意外 -->
<div v-if="!changeCard">
<h2 style="text-align:center" class="mb20">国富人寿保险股份有限公司人身保险投保须知</h2>
<p class="mb20">1.本产品由国富人寿保险股份有限公司以下简称国富人寿承保目前该公司广西地区设有分支机构</p>
<p class="mb20">
2.您的本次投保信息将以电子投保书的形式提交给国富人寿
</p>
<p class="mb20">
3.电子投保书的填写本电子投保书是您与国富人寿订立保险合同的重要组成部分为保障您的权益请务必保证电子投保书各项内容为投保人和被保险人如实准确填写<span
class="fw600"
>依据中华人民共和国保险法的有关规定保险公司就被保险人有关情况的询问您应当履行如实告知义务否则国富人寿有权依法解除保险合同并对保险合同解除前发生的保险事故不承担保险责任请您以书面形式对所有告知事项进行告知</span
>
</p>
<p class="mb20">
4.投保信息真实性为保障您的权益请您务必真实准确地填写相关投保信息包括但不限于投保人被保险人和受益人的姓名性别出生日期证件类型证件号码本人联系电话和联系地址等如果您提供的信息不真实不准确或不完整可能导致保险合同无效或您的权益受损等
</p>
<p class="mb20">
5.您在投保时如有疑问投保成功后需要查询保单信息投保成功后如有资料需要变更以及投诉请您关注国富人寿保险官方微信公众号或前往国富人寿客户服务中心进行办理同时还可拨打4006946688咨询
</p>
<p class="mb20">
6.投保前请您认真阅读产品条款页面展示内容条款合同解除责任免除犹豫期退保退保投保声明等重要内容确认理解并接受条款和页面提示的全部内容了解理赔申请方式及理赔应备文件
</p>
<p class="mb20">
7.如您成功投保国富人寿保险产品国富人寿将根据您投保时申请的保单形式为您发送电子保险合同或寄送纸质版电子保险合同本产品自保险合同签收次日零时起有15日的犹豫期在此期间如果您认为本产品与您的需求不相符可以提出解除保险合同我们将退还您所交的保险费此时不会有损失如果超过犹豫期退保国富人寿将退还您现金价值此时有一定的损失请您慎重<br />
犹豫期过后国富人寿向您投保时提供的电子邮箱发送电子发票请您注意查收
</p>
<p class="mb20">
<template v-if="protocol"> 8.本保险产品销售区域全国不含港澳台地区</template>
<template v-else>8.本保险产品销售区域广西地区</template>
<br />
国富人寿分支机构信息详见官网信息公示官网地址www.e-guofu.com)
</p>
<p class="mb20">
9.以身故为给付保险金条件的保险合同未经被保险人同意并认可保险金额的保险合同无效父母为其未成年子女投保的人身保险,不受此规定限制
</p>
<p class="mb20">
10.为未成年子女投保的人身保险因被保险人死亡给付的保险金总和不得超过国务院保险监督管理机构规定的限额死亡给付的保险金额总和约定也不得超过前述限额
</p>
<p class="mb20">
11.请您根据自身财务状况确定选择了合适的交费期间和交费金额无法持续交纳保险费有可能导致合同效力中止或保险合同解除提前终止或放弃之前有效的保险合同可能使您蒙受经济上的损失
</p>
<p class="mb20">
12.国富人寿采集客户信息的用途包括但不限于计算保费核保寄送保单客户回访续期提醒和寄送通知书推荐产品等<br />
为了保证您的权益如果联系电话和联系地址等信息发生变更应及时办理更正手续
</p>
<p class="mb">
13.国富人寿承诺未经您的同意不会将客户信息用于第三方机构的销售活动
</p>
<p class="mb20">
14.其他服务说明<br />
1投保承保流程<br />
选择保险产品点击购买填写投保信息确认信息和金额在线支付收到承保通知投保成功<br />
2保险费支付方式<br />
本产品的保险费支付方式银行转账或微信支付<br />
3保单变更办理流程<br />
方式一 微信办理<br />
您可关注 国富人寿保险微信公众号点击我的菜单注册用户进入我的保单-保单变更服务完成在线办理或提交申请材料<br />
方式二 柜面办理<br />
您可前往国富人寿客户服务中心柜面办理保单变更业务<br />
方式三 邮箱办理<br />
您可登录国富人寿官方网站www.e-guofu.com
客服中心-单证下载下载保单变更申请书等单证填写后会同申请人手持证件人像面合影申请人有效证件银行账户等申请资料通过您投保时预留的电子邮箱发送电子邮件至国富人寿客服邮箱service@e-guofu.com国富人寿有专人进行受理如需帮助请咨询国富人寿客户服务热线4006946688
4保险金支付和业务款项退费<br />
各类保险金将根据权益人授权的银行账号进行转账支付<br />
保单退费款项按客户申请办理相应业务时所授权的银行账号进行转账支付<br />
</p>
<h2 style="text-align:center" class="mb20">投保人授权声明</h2>
<p class="mb20">
为提供保险服务的需要本人授权国富人寿保险股份有限公司以下简称国富人寿可通过知悉本人信息的机构查询与本人有关的全部信息包括但不限于投保承保理赔行为财务信用健康医疗信息等国富人寿及与其具有必要合作关系的机构均可对上述信息进行合理的使用为确保信息安全国富人寿及其合作机构应采取有效措施并承担保密义务
</p>
</div>
<div>
<h2 style="text-align:center" class="mb20">转账授权书</h2>
<p>本人授权国富人寿保险股份有限公司以下简称国富人寿及本人指定之银行账户微信账户按下述授权内容进行保险费的划扣及相关权益的给付</p>
<p style="font-weight: bold;">银行卡转账授权声明</p>
<p>1本人同意委托国富人寿从本人的授权账户中扣取本保险合同所需缴纳的保险费并保证授权账户中有足够的金额支付应交保险费</p>
<p>
2本人确认授权的银行账户所有人为投保人本人账户的开户银行户名和账号均真实有效续期交费账户与首期保费交纳账户为同一账户
本人所提供的授权账户必须是本人的个人结算账户借记卡个人活期结算存折
</p>
<p>
3本人同意若因账户挂失账户冻结账户余额不足或其
他非银行原因造成转账不成功致使产生保险合同终止的任何后果或投资账户的费用损失因此引起的责任概由本人承担
</p>
<p>4如本人在同一指定账户内同时授权两张或两张以上保险单中的保险费或其他自动转账业务时本人同意依照国富人寿规定的转账顺序转账</p>
<p>5本人投保后若办理退保或退费业务同意国富人寿将应退金额通过银行划转入该账户</p>
<p>
6本人因故结清账户会重新开立账户并及时通过国富人寿进行变更如本人欲终止本授权应立即向国富人寿递交终止的书面申请由国富人寿知会银行停止转账若因本人未及时办理账户变更手续而导致退保给付金无法按时给付则同意国富人寿按退保申请日的给付金额支付
</p>
<p>7对于一年期以上的产品国富人寿可在保险费约定支付日之前及时通知本人交纳续期保险费</p>
<p style="font-weight: bold;">微信转账授权声明</p>
<p>1首期保险费使用微信支付的本人同意国富人寿通过本人投保时留存的银行账户进行续期保险费转账扣除</p>
</div>
</div>
<van-radio-group v-model="radio" class="pb10 pb20 pl30">
<van-radio name="1" @click="click" class="fs14">
<span v-if="changeCard">本人已详细阅读转账授权书并明确以上事项</span>
<span v-else>本人已详细阅读保险条款并明确以上事项 </span>
</van-radio>
</van-radio-group>
<div class="bg-white bottom-btn">
<van-button type="danger" size="large" :disabled="isDisable" @click="goNext" v-no-more-click="1000">下一步</van-button>
</div>
</div>
</template>
<script>
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
import { saveInformation } from '@/api/ebiz/sale/sale'
// import config from '@/config'
// import axios from 'axios'
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
// 投保人还是被保险人信息
signVal: '',
// 被保险人签名信息
insuredSign: {},
// 投保人签名信息
appntSign: {},
radio: '',
// 倒计时时间
number: '',
// 定时器时间
time: '10',
// 定时器名称
timer: null,
isOver: false,
// 判断验证码是否开始倒计时
Time: true,
// 按钮是否可以点击
isDisable: true,
// 是否在微信
isWeixin,
changeCard: localStorage.changeCard, //是否从修改银行卡号进来
productCode: localStorage.productCode, //获取产品编号
protocol: false
}
},
components: {
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar
},
mounted() {
let readingType = localStorage.getItem('readingProtocolType')
if (readingType && readingType === '1') {
this.protocol = true
}
let that = this
// {{switchFlag.Time?pageVariable.msg:pageVariable.number}}
that.timeOut()
document.title = this.changeCard ? '转账授权书' : '投保须知'
// Notify({
// type: 'warning',
// message: `提示:阅读时长需在${this.Time ? this.time : this.number}秒以上`,
// duration: 10000,
// background: '#999999',
// className: 'notify'
// })
document.body.style.backgroundColor = '#fff'
that.signVal = window.localStorage.getItem('sign-val')
if (JSON.parse(window.localStorage.getItem('sign-insured'))) {
that.insuredSign = JSON.parse(window.localStorage.getItem('sign-insured'))
}
if (JSON.parse(window.localStorage.getItem('sign-appnt'))) {
that.appntSign = JSON.parse(window.localStorage.getItem('sign-appnt'))
}
},
methods: {
timeOut() {
let that = this
let time = that.time
that.Time = false
that.number = `${time}`
let timer = setInterval(() => {
time--
if (time <= 0) {
time = 0
clearInterval(timer)
that.Time = true
that.isOver = true
// window.localStorage.setItem('step', '1')
}
that.number = `${time}`
}, 1000)
},
// 点击阅读时
click() {
let that = this
if (that.isOver == false) {
Dialog.confirm({
title: '提示',
message: '该内容涉及您的重大权益,请您仔细阅读',
showCancelButton: false
}).then(() => {
that.radio = ''
})
}
},
// 下一步
goNext() {
if (this.isWeixin) {
console.log('````````````````````')
console.log('进入微信')
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let that = this
if (that.signVal == '0' || that.signVal == '2') {
if (!that.changeCard) {
that.appntSign.map(item => {
if (item.documentCode == '1') {
that.appntSign.signId = item.signId
that.appntSign.documentCode = item.documentCode
that.appntSign.documentType = item.documentType
}
})
}
let data = {
orderType: that.changeCard ? 'SIGNNEW_ORDER' : 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'read',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '1',
documentType: that.appntSign.documentType,
signType: that.signVal
}
]
}
}
saveInformation(data).then(res => {
// console.log(res)
if (res.result == '0') {
this.$toast.clear()
// window.localStorage.setItem('tips-PolicyUrl', res.signDTO.tipsPolicyUrl)
// console.log(res)
// console.log(res.signDTO.policyUrl)
// console.log('````````````')
// console.log('接口拉去成功:' + res.signDTO.policyUrl)
// window.localStorage.setItem('insurance-policyUrl', res.signDTO.policyUrl)
window.localStorage.setItem('detailJump', '')
// console.log('保存了结果:' + localStorage.getItem('insurance-policyUrl'))
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)
// })
//GFRS_M0003为万能型产品需要投保人签署产品说明书
let url = ''
if (that.changeCard) {
url = 'SignatureConfirmation'
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/SignatureConfirmation'
},
routerInfo: {
path:
'/sale/signatureConfirmation?orderNo=' +
localStorage.orderNo +
'&token=' +
localStorage.token +
'&saleInsuredInfo=' +
this.$CacheUtils.getLocItem('saleInsuredInfo') +
'&saleInsuredPersonInfo=' +
this.$CacheUtils.getLocItem('saleInsuredPersonInfo') +
'&relationToAppnt=' +
JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt +
'&signInvalid=' +
sessionStorage.getItem('signInvalid') +
'&airSign=1' +
'&changeCard=0'
}
})
} else {
url = this.productCode == 'GFRS_M0003' || this.productCode == 'GFRS_M0015' || this.productCode == 'GFRS_M0017' ? 'productTip' : 'insuranceTip'
that.appntSign.map(item => {
if (item.documentCode == '8') {
url = 'apointValidDoc'
}
})
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/' + url
},
routerInfo: {
path: '/sale/' + url
}
})
}
} else {
that.$toast(res.resultMessage)
}
})
} else {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
that.insuredSign.map(item => {
if (item.documentCode == '1') {
that.insuredSign.signId = item.signId
that.insuredSign.documentCode = item.documentCode
that.insuredSign.documentType = item.documentType
}
})
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'read',
signId: that.insuredSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.insuredSign.documentCode,
documentStatus: '1',
documentType: that.insuredSign.documentType,
signType: that.signVal
}
]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
this.$toast.clear()
console.log('````````````')
// console.log('接口拉去成功:' + res.signDTO.policyUrl)
// window.localStorage.setItem('tips-PolicyUrl', res.signDTO.tipsPolicyUrl)
// window.localStorage.setItem('insurance-policyUrl', res.signDTO.policyUrl)
window.localStorage.setItem('detailJump', '')
console.log('保存了结果:' + localStorage.getItem('insurance-policyUrl'))
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/SignatureOfElectronic'
},
routerInfo: {
path: '/sale/SignatureOfElectronic'
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
} else {
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
// console.log('that.appntSign.signId',that.appntSign,that.appntSign.signId,that.appntSign.documentCode,that.appntSign.documentType)
if (that.signVal == '0' || that.signVal == '2') {
if (!that.changeCard) {
that.appntSign.map(item => {
if (item.documentCode == '1') {
that.appntSign.signId = item.signId
that.appntSign.documentCode = item.documentCode
that.appntSign.documentType = item.documentType
}
})
}
let data = {
orderType: that.changeCard ? 'SIGNNEW_ORDER' : 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'read',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '1',
documentType: that.appntSign.documentType,
signType: that.signVal
}
]
}
}
saveInformation(data).then(res => {
// console.log(res)
if (res.result == '0') {
this.$toast.clear()
// window.localStorage.setItem('insurance-url', res.signDTO.policyUrl)
// console.log('saveInformationres',res)
// console.log(res.signDTO.policyUrl)
// window.localStorage.setItem('tips-PolicyUrl', res.signDTO.tipsPolicyUrl)
// window.localStorage.setItem('insurance-policyUrl', res.signDTO.policyUrl)
window.localStorage.setItem('detailJump', '')
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)
// })
let url = ''
if (that.changeCard) {
url = 'SignatureConfirmation'
} else {
url = this.productCode == 'GFRS_M0003' || this.productCode == 'GFRS_M0015' || this.productCode == 'GFRS_M0017' ? 'productTip' : 'insuranceTip'
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/' + url,
forbidSwipeBack: '1'
},
routerInfo: {
path: '/insureAgain/' + url
}
})
} else {
that.$toast(res.resultMessage)
}
})
} else {
that.insuredSign.map(item => {
if (item.documentCode == '1') {
that.insuredSign.signId = item.signId
that.insuredSign.documentCode = item.documentCode
that.insuredSign.documentType = item.documentType
}
})
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'read',
signId: that.insuredSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.insuredSign.documentCode,
documentStatus: '1',
documentType: that.insuredSign.documentType,
signType: that.signVal
}
]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
// window.localStorage.setItem('tips-PolicyUrl', res.signDTO.tipsPolicyUrl)
// window.localStorage.setItem('insurance-policyUrl', res.signDTO.policyUrl)
this.$toast.clear()
window.localStorage.setItem('detailJump', '')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/SignatureOfElectronic',
forbidSwipeBack: '1'
},
routerInfo: {
path: '/insureAgain/SignatureOfElectronic'
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
}
}
},
computed: {
listenChange() {
const { isOver, radio } = this
return { isOver, radio }
}
},
watch: {
listenChange(val) {
let that = this
// console.log('listenChange :', val)
if (val.isOver == true && val.radio !== '') {
that.isDisable = false
} else {
that.isDisable = true
}
}
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
}
}
</script>
<style lang="scss" scoped>
p {
text-align: justify;
}
.notice {
width: 100%;
position: fixed;
top: 0;
z-index: 20;
}
</style>

View File

@@ -0,0 +1,566 @@
<template>
<div class="insuranceInformation-container pb50 redRadioCheckbox">
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示阅读时长需在${this.Time ? this.time : this.number}秒以上` }}</van-notice-bar>
<iframe :src="src + pdfUrl" class="iframe"></iframe>
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio name="1" @click="click">
本人确认已阅读
<span>人身保险投保提示书</span>
</van-radio>
</van-radio-group>
<div class="pt30 pl30 flex align-items-c">
<span class="mr10">投保人签名 :</span>
<div v-if="signVal == '0' || signVal == '2'">
<van-button type="danger" size="small" :disabled="signVal == '1' ? true : isDisable" @click="sign('0')" v-no-more-click="1000">{{
appntSign.documentStatus == '2' ? '签名' : '已签名'
}}</van-button>
</div>
</div>
<div class="bg-white bottom-btn">
<van-button type="danger" size="large" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000">下一步</van-button>
</div>
</div>
</template>
<script>
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
import { saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
import config from '@/config'
// import axios from 'axios'
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
// 投保人还是被保险人信息
signVal: '',
// 被保险人签名信息
insuredSign: {},
// 投保人签名信息
appntSign: {},
radio: '',
// 倒计时时间
number: '',
// 定时器时间
time: '10',
// 定时器名称
timer: null,
isOver: false,
// 判断验证码是否开始倒计时
Time: true,
// 按钮是否可以点击
isDisable: true,
// 是否在微信
isWeixin,
// 是否签名了 回执流程
isSign: true,
// sign加密码
base64: '',
// 是否可以点击
isDisabledComplite: true,
// local带来的被保险人信息
saleInsuredPersonInfo: {},
// local带来的投保人信息
saleInsuredInfo: {},
// 是否从详情跳过来 如果为1 是
detailJump: '',
pdfUrl: '',
src: location.origin + '/pdfjs/web/viewer.html?file=',
tipsPolicyUrl: ''
}
},
components: {
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar
},
mounted() {
let that = this
that.timeOut()
document.body.style.backgroundColor = '#fff'
},
async created() {
let that = this
that.detailJump = window.localStorage.getItem('detailJump')
that.signVal = window.localStorage.getItem('sign-val')
// 获取投保人信息
that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
if (this.isWeixin) {
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
}
if (this.detailJump != '1') {
// 投被保险人是否同人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
// that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
}
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
let wxSigned = sessionStorage.getItem('twowxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data: twoimgBase64Data:' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false
this.isDisabledComplite = false
// this.isDisable = false
} else {
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
} else {
console.log('第一次进入电子保单')
this.timeOut()
this.getOrderDetail()
}
} else {
this.timeOut()
if (this.detailJump != '1') {
this.getOrderDetail()
}
}
},
methods: {
timeOut() {
let that = this
let time = that.time
that.Time = false
that.number = `${time}`
let timer = setInterval(() => {
time--
if (time <= 0) {
time = 0
clearInterval(timer)
that.Time = true
that.isOver = true
// window.localStorage.setItem('step', '1')
}
that.number = `${time}`
}, 1000)
},
// 获取签名状态
getOrderDetail() {
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
}
return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => {
if (res.result == '0') {
res.orderDTO.ebizSignDTOS.map(item => {
if (item.documentCode == '4') {
if (item.signType == '0' || item.signType == '2') {
console.log('000000000', item)
that.appntSign = item
that.tipsPolicyUrl = item.policyUrl
console.log('that.appntSign', item.policyUrl)
}
}
})
that.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.tipsPolicyUrl}`)
console.log(' that.pdfUrl', that.pdfUrl)
if (that.isWeixin) {
if (res.orderDTO.ebizSignDTOS.length > 1) {
if (that.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
}
}
}
resolve('success')
}
})
})
},
// 点击阅读时
click() {
let that = this
if (that.isOver == false) {
Dialog.confirm({
title: '提示',
message: '该内容涉及您的重大权益,请您仔细阅读',
showCancelButton: false
}).then(() => {
that.radio = ''
})
}
},
// 点击签名
sign(val) {
console.log(
'签名参数',
this.saleInsuredInfo.idNo,
this.saleInsuredInfo.name,
this.saleInsuredInfo.idType,
'keyword' + ':' + '签字日期',
'pageNo' + ':' + '1',
'index' + ':' + '1',
'offset' + ':' + '-150',
'pos' + ':' + '3'
)
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (val == '0') {
if (this.detailJump != '1') {
if (this.relationToAppnt == '1') {
if (this.isWeixin) {
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '签字日期',
pageNo: '1',
index: '1',
offset: '-150',
pos: '3',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
this.$toast.clear()
if (JSON.parse(data).state == '1') {
this.base64 = decodeURI(JSON.parse(data).sign)
this.appntSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
}
} else {
if (this.isWeixin) {
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '签字日期',
pageNo: '1',
index: '1',
offset: '-150',
pos: '3',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
this.$toast.clear()
if (JSON.parse(data).state == '1') {
this.base64 = decodeURI(JSON.parse(data).sign)
this.appntSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
}
}
} else {
switch (that.saleInsuredInfo.idType) {
case '居民身份证':
that.saleInsuredInfo.idType = '1'
break
case '户口本':
that.saleInsuredInfo.idType = '2'
break
case '出生证':
that.saleInsuredInfo.idType = '3'
break
case '外国人护照':
that.saleInsuredInfo.idType = '4'
break
case '港澳居民来往内地通行证':
that.saleInsuredInfo.idType = '5'
break
case '台湾居民来往大陆通行证':
that.saleInsuredInfo.idType = '6'
break
// case '其他':
// that.saleInsuredInfo.idType = '7'
// break
case '外国人永久居留身份证':
that.saleInsuredInfo.idType = '8'
break
case '港澳台居民居住证':
that.saleInsuredInfo.idType = '9'
break
}
if (this.isWeixin) {
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: that.saleInsuredInfo.idNo,
//姓名
name: that.saleInsuredInfo.name,
type: that.saleInsuredInfo.idType,
keyword: '签字日期',
pageNo: '1',
index: '1',
offset: '-150',
pos: '3',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
this.$toast.clear()
if (JSON.parse(data).state == '1') {
that.base64 = decodeURI(JSON.parse(data).sign)
that.appntSign.documentStatus = '3'
that.isDisabledComplite = false
that.isSign = false
}
})
}
}
}
},
toAirSign(status, keyword, offset, originStatus) {
localStorage.setItem(
'signInfo',
JSON.stringify({
originStatus: originStatus,
idNo: this.saleInsuredInfo.idNo,
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: keyword,
status: status,
offset: offset,
originUrl: location.href
})
)
window.location.href = this.$mainUrl + '/sign/index.html'
},
// 下一步
goNext() {
if (this.isWeixin) {
console.log('````````````````````')
console.log('进入微信')
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击ase
loadingType: 'spinner',
message: '加载中……'
})
let that = this
console.log('that.appntSign', that.appntSign)
if (that.signVal == '0' || that.signVal == '2') {
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'tip',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '3',
documentType: that.appntSign.documentType,
signType: that.signVal,
baseEncryp: that.base64,
tipsPolicyUrl: that.tipsPolicyUrl
}
]
}
}
saveInformation(data).then(res => {
// console.log(res)
if (res.result == '0') {
this.$toast.clear()
// console.log(res)
window.localStorage.setItem('detailJump', '')
sessionStorage.twowxSigned = false
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)
// })
let doubleRecordFlag = localStorage.doubleRecordFlag
let routeUrl = '/sale/signatureOfElectronic'
if (doubleRecordFlag == '1') {
// 跳转双录签署文件
routeUrl = '/sale/avoidDutyTip'
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + routeUrl
},
routerInfo: {
path: routeUrl
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
} else {
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (that.signVal == '0' || that.signVal == '2') {
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'tip',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '3',
documentType: that.appntSign.documentType,
signType: that.signVal,
baseEncryp: that.base64,
tipsPolicyUrl: that.tipsPolicyUrl
}
]
}
}
saveInformation(data).then(res => {
// console.log(res)
if (res.result == '0') {
this.$toast.clear()
// window.localStorage.setItem('insurance-url', res.signDTO.policyUrl)
window.localStorage.setItem('detailJump', '')
sessionStorage.twowxSigned = false
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)
// })
let doubleRecordFlag = localStorage.doubleRecordFlag
let routeUrl = '/sale/signatureOfElectronic'
if (doubleRecordFlag == '1') {
// 跳转双录签署文件
routeUrl = '/sale/avoidDutyTip'
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + routeUrl,
forbidSwipeBack: '1'
},
routerInfo: {
path: routeUrl
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
}
}
},
computed: {
listenChange() {
const { isOver, radio, appntSign } = this
return { isOver, radio, appntSign }
}
},
watch: {
listenChange(val) {
let that = this
if (!that.isWeixin) {
if (that.signVal == '0' || that.signVal == '2') {
if (val.isOver == true && val.radio != '' && val.appntSign.documentStatus !== '3') {
that.isDisable = false
} else {
that.isDisable = true
}
if (that.radio == '1' && val.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
} else {
that.isDisabledComplite = true
}
}
if (val.appntSign.documentStatus == '3') {
that.isDisable = true
}
} else {
if (that.signVal == '0' || that.signVal == '2') {
if (val.isOver == true && val.radio != '') {
that.isDisable = false
} else {
that.isDisable = true
}
if (that.radio == '1' && val.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
} else {
that.isDisabledComplite = true
}
}
}
}
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
}
}
</script>
<style lang="scss" scoped>
img {
width: 100%;
height: 100%;
}
.notice {
width: 100%;
position: fixed;
top: 0;
z-index: 20;
}
.iframe {
width: 100vw;
height: 70vh;
}
</style>

View File

@@ -117,14 +117,15 @@ import { Field, Area } from 'vant'
import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
// import { saveOrUpdateOrderInfo, getOrderDetail } from '@/api/ebiz/insureAgain/insureAgain'
import { getOrderDetail, saveOrUpdateOrderInfo } from '@/api/ebiz/sale/sale'
import { commitReOrder, getReAppntPolicy } from '@/api/ebiz/insureAgain/insureAgain'
import { getOrderDetail, insureAgain } from '@/api/ebiz/insureAgain/insureAgain'
import DataDictionary from '@/assets/js/utils/data-dictionary'
import SelectRadio from '@/components/ebiz/SelectRadio'
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
import areaLists from '@/assets/js/utils/areaNewForSale'
import { selectComp, getIdentityInfo } from './js/methods'
import OccupationForLoop from '@/components/ebiz/occipation/OccupationForLoop'
import CacheUtils from '@/assets/js/utils/cacheUtils'
export default {
name: 'InsureInformation',
components: {
@@ -181,7 +182,7 @@ export default {
}
},
created() {
this.getOrderDetail()
this.getReAppntPolicy()
},
mounted() {
setTimeout(() => {
@@ -215,9 +216,194 @@ export default {
})
}
},
getOrderDetail() {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
getReAppntPolicy() {
getReAppntPolicy({ policyNo: CacheUtils.getLocItem('policyNo') }).then(res => {
if (res.result == 0) {
let a = `{
"orderDTO": {
"appntDTO": {
"area": "",
"averageAnnualIncome": 10,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"effectiveDateType": "false",
"email": "310598205@qq.com",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳马上",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司"
},
"insuredDTOs": [
{
"area": "",
"averageAnnualIncome": 1000,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"companyArea": "",
"companyCity": "",
"effectiveDateType": "false",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳咳咳",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"province": "",
"relationToMainInsured": "5",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司",
"bnfDTOs": [
{
"area": "450103",
"birthday": "1980-01-02",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0 1-是法定;0-不是法定",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "110101198001020219",
"idType": "1",
"lifeGrade": "2",
"marriage": "2",
"mobile": "13707711024",
"name": "爱来",
"nativeplace": "1",
"occupationCode": "2070202",
"occupationName": "保险推销员",
"province": "450000",
"relationToInsured": "3",
"sex": "0",
"village": "百苑小区101号",
"yearSalary": "23"
},
{
"area": "450103",
"birthday": "1983-03-12",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0 1-是法定;0-不是法定",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "452624198303120727",
"idType": "1",
"lifeGrade": "1",
"marriage": "1",
"mobile": "13707711024",
"name": "艾琳马上来",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"province": "450000",
"relationToInsured": "4",
"sex": "1",
"village": "百苑小区101号",
"yearSalary": "32"
}
],
"impartDTO": {
"impartItemDTOS": [
{
"impartAnswer": "1",
"impartCode": "9",
"impartContent": "最近六个月内是否有下列身体不适症状①长期咳嗽咳痰、声音嘶哑、痰中带血、咯血②胸闷、胸痛、心慌、气喘、气短、呼吸困难③吐血、大便带血、黑便、反复腹痛、恶心、反酸、呕吐、腹泻④反复尿频、尿痛、血尿、腰痛、外生殖器溃疡⑤反复皮下出血、鼻腔出血、牙龈出血、发热、持续疲倦⑥晕倒、意识不清、视力下降、抽搐、反复头痛、头晕⑦半年内体重增加或减少5公斤以上⑧关节红肿、疼痛、活动受限。",
"IntroDuctions": ""
},
{
"impartAnswer": "1",
"impartCode": "12a",
"impartContent": "是否曾患有失明、视网膜出血或剥离、视神经炎、青光眼、白内障、眼底病变、视野缺失、屈光度1000度以上、聋哑、中耳炎、梅尼尔氏病或其他眼、耳、鼻、喉或口腔疾病",
"IntroDuctions": ""
}
]
},
"riskDTOLst": [
{
"riskName": "国富人寿国富民惠医疗保险2020版",
"insuYear": 1,
"insuYearFlag": "Y",
"payIntv": 12,
"payEndYear": 1000,
"payEndYearFlag": "Y",
"prem": 10000,
"riskCode": "1113202",
"isMainRisk": "0",
"amt": 22640,
"dutyLst": [
{
"dutyName":"国富民惠医疗保险金",
"dutyCode":"320300",
"amt":1000000,
"prem":536,
"getLimit":"0",
"getRate":"0"
},
{
"dutyName":"",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
}
]
}
]
}
],
"orderAccountDTO": {
"accountName": "艾琳马上",
"bankName": "BOCOM",
"cardBookCode": "4354256325325678790"
},
"orderInfoDTO": {
"contNo": "保单号",
"contState": "保单状态 1-承保;4-终止;0-投保中",
"cValiDate": "生效日期 String",
"orderStatus": "签收状态 0-未签收 1-已签收"
}
}
}`
res = JSON.parse(a)
console.log(res, '===============a==============');
//
this.userInfo = res.orderDTO.appntDTO
this.setCustomerMarriage(res.orderDTO.appntDTO.marriage)
@@ -240,97 +426,15 @@ export default {
}
//
//bnfFlag 0- 1-
let btnasd = `[
{
"area": "450103",
"birthday": "1980-01-02",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "110101198001020219",
"idType": "1",
"lifeGrade": "2",
"marriage": "2",
"mobile": "13707711024",
"name": "爱来",
"nativeplace": "1",
"occupationCode": "2070202",
"occupationName": "保险推销员",
"province": "450000",
"relationToInsured": "3",
"sex": "1",
"village": "百苑小区101号",
"yearSalary": "23"
},
{
"area": "450103",
"birthday": "1983-03-12",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "452624198303120727",
"idType": "1",
"lifeGrade": "1",
"marriage": "1",
"mobile": "13707711024",
"name": "艾琳马上来",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"province": "450000",
"relationToInsured": "4",
"sex": "1",
"village": "百苑小区101号",
"yearSalary": "32"
},
{
"area": "450103",
"birthday": "1983-03-12",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "452624198303120727",
"idType": "1",
"lifeGrade": "1",
"marriage": "1",
"mobile": "13707711024",
"name": "艾琳马上来",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"province": "450000",
"relationToInsured": "4",
"sex": "1",
"village": "百苑小区101号",
"yearSalary": "32"
}
]`
res.orderDTO.orderInfoDTO.bnfFlag = '1'
if (res.orderDTO.orderInfoDTO.bnfFlag === '0') {
this.bnftype = '0'
} else if (res.orderDTO.orderInfoDTO.bnfFlag === '1') {
if (res.orderDTO.insuredDTOs[0].bnfDTOs && res.orderDTO.insuredDTOs[0].bnfDTOs.length>0) {
this.bnftype = '1'
res.orderDTO.insuredDTOs[0].bnfDTOs = JSON.parse(btnasd)
if (res.orderDTO.insuredDTOs[0].bnfDTOs) {
this.bnfPersonInfo = res.orderDTO.insuredDTOs[0].bnfDTOs || JSON.parse(btnasd)
this.bnfPersonInfo = res.orderDTO.insuredDTOs[0].bnfDTOs
this.bnfPersonInfo.forEach((item, index) => {
this.bnfHomeName[index] = getAreaName([{ code: item.province }, { code: item.city }, { code: item.area }])
})
}
}
}
}
//
this.accountPersonInfo = res.orderDTO.orderAccountDTO
}
@@ -569,11 +673,12 @@ export default {
},
async save() {
let params = {
orderType: 'APPNT_ORDER',
orderType: 'RE_APPNT_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: localStorage.orderNo,
isElecCont: this.isElecCont
isElecCont: this.isElecCont,
supportBank: '0'
},
appntDTO: this.userInfo,
insuredDTOs: this.insuredPersonInfo,
@@ -581,16 +686,16 @@ export default {
}
}
let str = ''
let resultData = await saveOrUpdateOrderInfo(params)
let resultData = await commitReOrder(params)
if (resultData.result == 0) {
localStorage.setItem('orderNo', resultData.orderNo)
localStorage.setItem('newOrderNo', resultData.orderNo)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain/productInformation`
url: location.origin + `/#/insureAgain/ProductInformation`
},
routerInfo: {
path: `/insureAgain/productInformation`
path: `/insureAgain/ProductInformation`
}
})
} else {

View File

@@ -0,0 +1,762 @@
<template>
<div class="insure-again">
<ProgressBar :active.sync="active" />
<p style="font-weight: bold;" class="bg-white p10 van-hairline--bottom">告知项目</p>
<div class="content-all-info">
<div v-for="(im, indx) in impartDTOS" :key="indx">
<van-collapse v-model="activeNames">
<van-collapse-item :name="indx + 1">
<div slot="title" class="flex align-items-c justify-content-s">
<!--投保人 0 2 4 6 8 10 被保险人 1 3 5 7 9 11-->
{{
relationToAppnt == '1'
? '投保人/被保险人' +
impartTypeNumber[im.impartType]
.replace('投保人', '')
.replace('被保人', '')
.replace('被保险人', '')
: impartTypeNumber[im.impartType]
}}
<!--{{ impartTypeNumber[im.impartType] }}-->
<div class="flex align-items-c justify-content-s">
<span>{{
im.impartType == 0 || im.impartType == 2 || im.impartType == 4 || im.impartType == 6 || im.impartType == 8 || im.impartType == 10
? saleInsuredInfo.name
: saleInsuredPersonInfo.name
}}</span>
<img :src="$assetsUrl + 'images/avatar.png'" class="w20 ml15" />
</div>
</div>
<!-- <div class="h50">
<img />
<span>请如实填写问题中的每一项情况并对出现的情况载体是框列举说明</span>
</div>-->
<div class="h50 mt10 flex align-items-c notifyingMessage-text">
<div class="ml15 w315 h35 flex">
<!-- <img :src="$assetsUrl + 'images/notifiy.png'" class="w18 h18 " /> -->
<van-icon name="info-o" class="w18 h18" size="20px" color="#4a90e2" />
<span class="fs12 ml10">请如实填写问题中的每一项情况并对出现的情况在提示框列举说明</span>
</div>
</div>
<!-- 第一题 -->
<div v-for="(item, index) in im.impartItemDTOS" :key="index">
<div class="mt10 pb2" v-if="item.impartCode != '2b'">
<div class="mb20 ml20">
<span>{{ item.impartCode + '.' + item.impartContent }}</span>
</div>
<van-radio-group
v-model="item.impartAnswer"
class="flex mb10 pb10"
@change="change(item.isSelect, $event, item.impartCode, im.impartType)"
v-validate="'required'"
data-vv-name="单选"
>
<van-radio name="0" class="mr150 ml70"></van-radio>
<van-radio name="1"></van-radio>
</van-radio-group>
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
<div v-if="it.extra">
<van-field v-model="it.answer" placeholder="请输入" :label="it.questionContent" clearable v-validate="'required'" data-vv-name="答案" />
</div>
</van-cell-group>
<div v-if="item.impartAnswer == '0'">
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
<van-field
v-model="it.answer"
placeholder="请输入"
:label="it.questionContent"
clearable
v-validate="'required'"
data-vv-name="答案"
v-if="!it.extra"
/>
</van-cell-group>
</div>
</div>
<div class="mt10 pb2" :class="{ special: !showFlag || !isShow }" v-else>
<!-- 被保险人题目为2b -->
<div v-if="im.impartType == 3 || im.impartType == 7 || im.impartType == 11">
<div class="mb20 ml20" v-if="item.impartCode == '2b' && showFlag && isShow">
<span>{{ item.impartCode + '.' + item.impartContent }}</span>
</div>
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
<div v-if="it.extra && showFlag && isShow">
<van-field v-model="it.answer" placeholder="请输入" :label="it.questionContent" clearable v-validate="'required'" data-vv-name="答案" />
</div>
</van-cell-group>
<div v-if="showFlag && isShow">
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
<van-field
v-model="it.answer"
placeholder="请输入"
:label="it.questionContent"
clearable
v-validate="'required'"
data-vv-name="答案"
v-if="!it.extra"
/>
</van-cell-group>
</div>
</div>
</div>
</div>
</van-collapse-item>
</van-collapse>
</div>
</div>
<p class="notifition bg-white p15">
注意本次重新投保仅限于无其他补充告知的情况若您有其他补充告知您的条件不符合本重新投保流程请您联系保单服务专员或拨打4006946688咨询通过其他途径进行投保申请
</p>
<div class="btns-tip">
<van-button type="danger" v-no-more-click="1000" @click="backToList">有补充告知返回</van-button>
<van-button type="danger" v-no-more-click="1000" @click="nextStep">无补充告知下一步</van-button>
</div>
</div>
</template>
<script>
import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import ReadingAgreement from '@/components/ebiz/insureAgain/ReadingAgreement'
import { Collapse, CollapseItem, RadioGroup, Radio, Field, CellGroup, Icon, Popup } from 'vant'
import { information, saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
import utilsAge from '@/assets/js/utils/age'
import IndexBar from '@/components/ebiz/sale/IndexBar'
import CacheUtils from '@/assets/js/utils/cacheUtils'
export default {
data() {
return {
active: 2,
// 告知信息
impartDTOS: [],
// 折叠面板
activeNames: [],
// 投保人信息
saleInsuredInfo: {},
// 被保险人信息
saleInsuredPersonInfo: {},
// 投被保险人是否同人 1为同一个人
relationToAppnt: '',
// 产品编码
productCodes: '',
// 是否可以点击
isDisabled: false,
// 默认显示被保险人根据后台返回
noRisk: false,
//是否存在附加险
isExistAdditionalRisk: false,
saleInsuredAge: '',
saleInsuredSex: '',
saleInsuredPersonAge: '',
saleInsuredPersonSex: '',
showFlag: false,
isShow: false,
isShows: false,
impartTypeNumber: {
'0': '投保人健康告知',
'2': '投保人财务告知',
'1': '被保险人健康告知',
'3': '被保险人财务告知',
'4': '投保人健康告知',
'5': '被保险人健康告知',
'6': '投保人财务告知',
'7': '被保险人财务告知',
'8': '投保人健康告知',
'10': '投保人财务告知',
'9': '被保险人健康告知',
'11': '被保险人财务告知'
},
salePageFlag: '5',
radio: false,
}
},
components: {
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Icon.name]: Icon,
[IndexBar.name]: IndexBar,
[Popup.name]: Popup,
ProgressBar,
ReadingAgreement
},
created() {
// getOrderDetail({ orderNo: CacheUtils.getLocItem('orderNo') }).then(res => {
getOrderDetail({ orderNo: `8186270000012323` }).then(res => {
if (res.result == 0) {
//投被保险人关系
this.isExistAdditionalRisk = res.orderDTO.insuredDTOs[0].riskDTOLst.length > 1 ? true : false
console.log('this.is ====', this.isExistAdditionalRisk)
this.relationToAppnt = res.orderDTO.insuredDTOs[0].relationToAppnt
this.$utils.intLocalStorage(res)
this.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
//如果返回参数存在曾经提交的告知信息,获取曾经提交的告知信息
let insuredFinanceImpartDTO = res.orderDTO.appntDTO.financeImpartDTO //投保人财务告知集合
let insuredImpartDTO = res.orderDTO.appntDTO.impartDTO //投保人健康告知集合
let insuredPersionFinanceImpartDTO = res.orderDTO.insuredDTOs[0].financeImpartDTO //被保人财务告知集合
let insuredPersionImpartDTO = res.orderDTO.insuredDTOs[0].impartDTO //被保人健康告知集合
if (
insuredFinanceImpartDTO.impartItemDTOS ||
insuredImpartDTO.impartItemDTOS ||
insuredPersionFinanceImpartDTO.impartItemDTOS ||
insuredPersionImpartDTO.impartItemDTOS
) {
if (insuredFinanceImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredFinanceImpartDTO.impartItemDTOS, impartType: insuredFinanceImpartDTO.impartType })
}else if(insuredPersionFinanceImpartDTO.impartItemDTOS && this.relationToAppnt == '1'){
this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType })
}
if (insuredImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredImpartDTO.impartItemDTOS, impartType: insuredImpartDTO.impartType })
}else if (insuredPersionImpartDTO.impartItemDTOS && this.relationToAppnt == '1'){
this.impartDTOS.push({ impartItemDTOS: insuredPersionImpartDTO.impartItemDTOS, impartType: insuredPersionImpartDTO.impartType })
}
if(this.relationToAppnt != '1'){
if (insuredPersionFinanceImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType })
}
if (insuredPersionImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredPersionImpartDTO.impartItemDTOS, impartType: insuredPersionImpartDTO.impartType })
}
}
this.impartDTOS.map(v => {
v.impartItemDTOS.map(i => {
i.isSelect =
this.formatDateTime() +
Math.random()
.toString(36)
.substr(2)
i.show = false
if (i.impartAnswer == '0') {
i.show = true
} else {
i.questions[0].answer = ''
}
})
})
} else {
// 获取告知消息
this.information()
}
//投被同人取到年纪和性别去判断是是否显示内容
this.saleInsuredAge = utilsAge.getAge(this.saleInsuredInfo.birthday, new Date())
this.saleInsuredSex = this.saleInsuredInfo.sex
//投被不同人取到年纪和性别去判断是是否显示内容
this.saleInsuredPersonAge = this.saleInsuredPersonInfo.age
this.saleInsuredPersonSex = this.saleInsuredPersonInfo.sex
} else {
this.$toast(res.resultMessage)
}
})
// this.relationToAppnt = `1`
this.productCodes = JSON.parse(localStorage.chooseProductCodes)
//this.information()
},
mounted() {
setTimeout(() => {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
document.body.style.backgroundColor = '#F5F5F5'
if (!this.$route.query.edit) {
//如果不是编辑/导航条跳转进来的
localStorage.setItem('salePageFlag', this.salePageFlag)
} else if (this.$route.query.edit && !this.$route.query.salePageFlag) {
//如果从保单列表点击编辑按钮进入
this.salePageFlag = '5'
localStorage.setItem('salePageFlag', this.salePageFlag)
} else if (this.$route.query.salePageFlag) {
//如果是从导航栏点击进入
this.salePageFlag = localStorage.salePageFlag
}
},
methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '电子投保单列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1'
}
})
})
.catch(() => {
return
})
}
},
isShowList() {
let that = this
console.log(that.saleInsuredAge)
that.impartDTOS.map(item => {
if (item.impartType == 0 || item.impartType == 4) {
item.impartItemDTOS.map((items, index, array) => {
if (items.extra3) {
let obj = JSON.parse(items.extra3)
if (obj.age && obj.sex == '') {
array.splice(index, 1, '')
}
if (obj.age && obj.sex) {
//15题性别为男或者女并且小于14岁不显示
if (that.saleInsuredSex != obj.sex || (that.saleInsuredSex == obj.sex && that.saleInsuredAge < obj.age)) {
array.splice(index, 1, '')
}
}
}
})
}
if (item.impartType == 1 || item.impartType == 5) {
item.impartItemDTOS.map((items, index, array) => {
if (items.extra3) {
let obj = JSON.parse(items.extra3)
if (obj.age && obj.sex == '') {
//被保险人年纪大于2岁不显示该题
if (that.saleInsuredPersonAge > obj.age) {
array.splice(index, 1, '')
}
}
if (obj.age && obj.sex) {
if (that.saleInsuredPersonSex != obj.sex || (that.saleInsuredPersonSex == obj.sex && that.saleInsuredPersonAge < obj.age)) {
array.splice(index, 1, '')
}
}
}
})
}
// 被保险人财务告知添加判断
if (item.impartType == 3 || item.impartType == 7 || item.impartType == 11) {
item.impartItemDTOS.map((items, index, array) => {
if (items.extra3) {
let obj = JSON.parse(items.extra3)
if (obj.age && obj.sex == '2') {
//小于18岁显示
if (that.saleInsuredPersonAge < Number(obj.age)) {
this.isShow = true
}
}
}
})
}
})
//去除数组里面的空字符串
that.impartDTOS.map(item => {
if (item.impartType == 0 || item.impartType == 4) {
let array = item.impartItemDTOS
for (var i = 0; i < array.length; i++) {
if (array[i] == '' || array[i] == null || typeof array[i] == undefined) {
array.splice(i, 1)
i = i - 1
}
}
}
if (item.impartType == 1 || item.impartType == 5) {
let array = item.impartItemDTOS
for (var i = 0; i < array.length; i++) {
if (array[i] == '' || array[i] == null || typeof array[i] == undefined) {
array.splice(i, 1)
i = i - 1
}
}
}
})
},
// 单选改变时候
change(item, val, impartCode, impartType) {
// console.log(item)
// console.log(val)
let that = this
if (val == '0') {
that.impartDTOS.map(it => {
it.impartItemDTOS.map(itm => {
if (item == itm.isSelect) {
// itm.isTrue = val
itm.show = true
}
})
})
// that.impartItemDTOS[item].show = true
} else {
that.impartDTOS.map(it => {
it.impartItemDTOS.map(itm => {
if (item == itm.isSelect) {
// itm.isTrue = val
itm.show = false
}
})
})
}
if (impartType == '3' || impartType == '7' || impartType == '11') {
if (impartCode == '2a') {
if (val == '0') {
this.showFlag = true
that.impartDTOS.map(it => {
it.impartItemDTOS.map(itm => {
if (itm.impartCode == '2b') {
itm.impartAnswer = '0'
}
})
})
} else {
this.showFlag = false
}
}
}
},
formatDateTime() {
var date = new Date()
var y = date.getFullYear()
var m = date.getMonth() + 1
m = m < 10 ? '0' + m : m
var d = date.getDate()
d = d < 10 ? '0' + d : d
var h = date.getHours()
var minute = date.getMinutes()
var second = date.getSeconds()
return y + m + d + h + minute + second
},
// 获取告知消息,
information() {
let that = this
let data = {
productCodes: JSON.parse(localStorage.chooseProductCodes),
// productCodes: ['GFRS_M0001'],
platform: 'app',
type: '2'
}
information(data).then(res => {
// console.log(res)
if (res.result == '0') {
res.productImpartLstDTO.impartDTOS.map(item => {
item.impartItemDTOS.map(im => {
im.isSelect =
this.formatDateTime() +
Math.random()
.toString(36)
.substr(2)
im.impartAnswer = ''
if (im.questions) {
if (im.questions.length == '0') {
let obj = {
answer: ''
}
im.questions.push(obj)
}
}
if (this.noRisk == false && im.extra4 == 'noRisk') {
this.noRisk = true
}
})
})
// 展示被保险人项产品 noRis为true
if (this.noRisk) {
res.productImpartLstDTO.impartDTOS.map((item, index, array) => {
if (item.impartType == '0') {
array.splice(index, 1)
}
if (item.impartType == '2') {
array.splice(index, 1)
}
})
}
if (this.relationToAppnt == '1') {
// 展示被保险人项产品 noRis为true 保障型:去除投保人告知,其他不变
if (this.noRisk) {
res.productImpartLstDTO.impartDTOS.map((item, index, array) => {
if (item.impartType == '0') {
array.splice(index, 1)
}
if (item.impartType == '2') {
array.splice(index, 1)
}
})
} else {
// 展示被保险人项产品 noRis为false 保障型、意外型:去除被保人告知,其他不变
res.productImpartLstDTO.impartDTOS.map((item, index, array) => {
if (item.impartType == '1' || item.impartType == '5') {
array.splice(index, 1)
}
})
res.productImpartLstDTO.impartDTOS.map((item, index, array) => {
if (item.impartType == '3' || item.impartType == '7') {
array.splice(index, 1)
}
})
}
that.impartDTOS = res.productImpartLstDTO.impartDTOS
that.isShowList()
//投被同人时候判断
this.activeNames.push(res.productImpartLstDTO.impartDTOS.length)
} else {
that.impartDTOS = res.productImpartLstDTO.impartDTOS
that.isShowList()
//投被不同人时候判断
this.activeNames.push(res.productImpartLstDTO.impartDTOS.length)
}
}
})
},
/**
* @description: 签名
* @param {*}
* @return {*}
*/
signature() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/signConfirmation',
pullRefresh: '1',
backToFirst: '1'
},
routerInfo: {
path: '/insureAgain/signConfirmation'
}
})
},
// 下一步
nextStep() {
let that = this
that.$validator.validate().then(valid => {
if (valid) {
let obj = {}
let objInsured = {}
let financeImpartDTO = {}
let financeImpart = {}
// let arr = []
that.impartDTOS.map(item => {
// 投保人健康告知
if (item.impartType == '0' || item.impartType == '4' || item.impartType == '8') {
item.impartItemDTOS.map(i => {
delete i.isSelect
delete i.show
})
obj = item
return obj
} else if (item.impartType == '2' || item.impartType == '6' || item.impartType == '10') {
// 投保人财富
item.impartItemDTOS.map(i => {
delete i.isSelect
delete i.show
})
// console.log(item.impartType)
financeImpartDTO = item
return financeImpartDTO
} else if (item.impartType == '1' || item.impartType == '5' || item.impartType == '9') {
// 被保险人健康
item.impartItemDTOS.map(i => {
delete i.isSelect
delete i.show
// if (i.impartCode == '14a') {
// i.questions.map(items => {
// items.questionType = '4'
// })
// }
})
objInsured = item
return objInsured
} else if (item.impartType == '3' || item.impartType == '7' || item.impartType == '11') {
// 被保险人财富
item.impartItemDTOS.map(i => {
delete i.isSelect
delete i.show
})
financeImpart = item
return financeImpart
}
})
if (financeImpartDTO == {}) {
let data = {
orderType: 'IMPART_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo'),
productCode: JSON.parse(localStorage.mainRiskCodes)[0]
},
// 投保人
appntDTO: {
impartDTO: obj
},
// 被保险人
insuredDTOs: [{ impartDTO: objInsured, financeImpartDTO: financeImpart }]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
localStorage.removeItem('changeCard')
if (!this.$route.query.salePageFlag) {
//不是从导航栏进入
localStorage.salePageFlag = '6'
}
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/SignatureConfirmation'
},
routerInfo: {
path: '/insureAgain/SignatureConfirmation'
}
})
} else {
this.$toast(res.resultMessage)
}
})
} else if (financeImpart == {}) {
let data = {
orderType: 'IMPART_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo'),
productCode: JSON.parse(localStorage.mainRiskCodes)[0]
},
// 投保人
appntDTO: {
impartDTO: obj,
financeImpartDTO: financeImpartDTO
},
// 被保险人
insuredDTOs: [{ impartDTO: objInsured }]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
localStorage.removeItem('changeCard')
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/SignatureConfirmation'
},
routerInfo: {
path: '/insureAgain/SignatureConfirmation'
}
})
} else {
this.$toast(res.resultMessage)
}
})
} else {
let data = {
orderType: 'IMPART_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo'),
productCode: JSON.parse(localStorage.mainRiskCodes)[0]
},
// 投保人
appntDTO: {
impartDTO: obj,
financeImpartDTO: financeImpartDTO
},
// 被保险人
insuredDTOs: [{ impartDTO: objInsured, financeImpartDTO: financeImpart }]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
localStorage.removeItem('changeCard')
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/SignatureConfirmation'
},
routerInfo: {
path: '/insureAgain/SignatureConfirmation'
}
})
} else {
this.$toast(res.resultMessage)
}
})
}
} else {
this.$toast(this.$validator.errors.all()[0])
}
})
},
backToList() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain`,
forbidSwipeBack: '1',
needRefresh: '1'
},
routerInfo: { path: `/insureAgain` }
})
},
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
}
}
</script>
<style lang="scss" scoped>
.container {
.title {
font-size: 14px;
}
.radio-group {
display: flex;
justify-content: center;
}
}
.notifition {
font-size: 14px;
color: #ff0000;
}
.sign-name{
display: flex;
flex-flow: row nowrap;
justify-content: flex-start;
align-items: center;
font-size: 15px;
}
.btns-tip{
width: 100vw;
display: flex;
position: fixed;
bottom: 0;
/deep/ .van-button {
flex: 1;
}
}
.btns {
width: 100vw;
// display: flex;
// position: fixed;
// bottom: 0;
// /deep/ .van-button {
// flex: 1;
// }
}
</style>

View File

@@ -0,0 +1,563 @@
<template>
<div class="insure-again">
<ProgressBar :active.sync="active" />
<!-- 险种信息 -->
<p style="font-weight: bold;" class="bg-white p10 van-hairline--bottom">保险计划详情</p>
<div v-if="mainList.length>0" class="main">
<div v-for="(item,index) in mainList" :key="index">
<InfoCell label="保险期间">{{item.insuYear}}</InfoCell>
<InfoCell label="交费期间" v-if="item.payEndYear != '1000'">{{item.payEndYearFlag == 'Y' ? `${item.payEndYear}` :
`${item.payEndYear}`}}</InfoCell>
<InfoCell label="交费期间" v-if="item.payEndYear == '1000'">一次性交清</InfoCell>
<InfoCell label="交费频率">{{item.payIntvName}}</InfoCell>
<DropdownBox :gutter="false">
<template #boxTitle>
<span style="font-weight: bold;">主险</span>
<span class="ml30">国富人寿附加住院医疗保险B款</span>
</template>
<div v-for="(item2,index2) in item.dutyLst" :key="index2">
<InfoCell v-if="index2===0" label="保险责任">{{item2.dutyName}}</InfoCell>
<InfoCell v-else label="">{{item2.dutyName}}</InfoCell>
</div>
<InfoCell label="保额(万元)">{{item.amt}}</InfoCell>
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
{{item.prem}}
</InfoCell>
</DropdownBox>
</div>
</div>
<div v-if="additionalList.length>0" class="additional">
<van-checkbox-group v-model="checkboxResult">
<div v-for="(item, index) in additionalList" :key="index">
<DropdownBox :gutter="false">
<template #boxTitle>
<van-checkbox :name="item.riskCode" shape="square" checked-color="#ee0a24">
<span style="font-weight: bold;">附加险</span>
<span class="ml30">{{item.riskName}}</span>
</van-checkbox>
</template>
<InfoCell label="保险责任">保额</InfoCell>
<div v-for="(item2,index2) in item.dutyLst" :key="index2">
<InfoCell :label="item2.dutyName">{{item2.prem}}</InfoCell>
<!-- <InfoCell :label="住院津贴保险金"></InfoCell>
<InfoCell :label="恶性肿瘤住院津贴保险金"></InfoCell> -->
</div>
<InfoCell label="免赔额">{{item.getLimit}}</InfoCell>
<InfoCell label="赔付比例">{{item.getRate}}</InfoCell>
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
{{item.prem}}
</InfoCell>
</DropdownBox>
</div>
</van-checkbox-group>
<div style="text-align: center;" class="p10 bg-white">
<van-button size="small" round type="danger" @click="readSpecialPromise" :disabled="isRead">
{{ isRead ? '已阅读《特别约定》' : '点击这里阅读《特别约定》' }}
</van-button>
</div>
</div>
<!-- <DropdownBox>
<template #boxTitle>
<span style="font-weight: bold;">附加险</span>
<span class="ml30">国富人寿附加综合意外伤害保险</span>
</template>
<InfoCell label="保险责任" />
<InfoCell label="意外身故/伤残保险金" />
<InfoCell label="轨道列车意外身故保险金/轨道列车意外伤残保险金" />
<InfoCell label="客运汽车意外身故保险金/客运汽车意外伤残保险金" />
<InfoCell label="免赔额" />
<InfoCell label="赔付比例" />
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
</InfoCell>
</DropdownBox> -->
<van-popup v-model="show" position="right" :style="style">
<ReadingAgreement :needTime="false">
<h3 class="p10">特别约定提示</h3>
<p class="p10">
尊敬的xxx先生/女士
投保国富人寿国富民惠医疗保险2020以有社保身份投保的保单理赔时若通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为80%免赔额为0元理赔时若未通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为60%免赔额为100元以无社保身份投保的保单理赔时若未通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为70%免赔额为100元理赔时若通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为90%免赔额为0元
</p>
<template #action>
<div class="btns">
<van-button type="danger" @click="backToList">不同意</van-button>
<van-button type="danger" @click="readAgreement">同意</van-button>
</div>
</template>
</ReadingAgreement>
</van-popup>
<van-button type="danger" class="bottom-btn" v-no-more-click="1000" @click="nextStep">下一步</van-button>
</div>
</template>
<script>
import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
import ReadingAgreement from '@/components/ebiz/insureAgain/ReadingAgreement'
import { commitReOrder, getReAppntPolicy } from '@/api/ebiz/insureAgain/insureAgain'
import { Checkbox, RadioGroup, Radio, Dialog, CheckboxGroup } from 'vant'
import CacheUtils from '@/assets/js/utils/cacheUtils'
export default {
name: 'ProductInformation',
components: {
ProgressBar,
DropdownBox,
InfoCell,
ReadingAgreement,
[Checkbox.name]: Checkbox,
[CheckboxGroup.name]: CheckboxGroup,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio
},
data() {
return {
radio: 1,
show: false,
remitRiskA: false,
style: { height: '100vh', width: '100vw' },
isRead: false,
active: 1,
riskDTOLst: [],
mainList: [], //主险
additionalList: [], //附加险
checkboxResult: [],
insuredDTOs: [],
orderInfoDTO: []
}
},
created() {
this.getReAppntPolicy()
},
methods: {
getReAppntPolicy() {
getReAppntPolicy({ policyNo: CacheUtils.getLocItem('policyNo') }).then(res => {
if (res.result == 0) {
let a = `{
"orderDTO": {
"appntDTO": {
"area": "",
"averageAnnualIncome": 10,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"effectiveDateType": "false",
"email": "310598205@qq.com",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳马上",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司"
},
"insuredDTOs": [
{
"area": "",
"averageAnnualIncome": 1000,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"companyArea": "",
"companyCity": "",
"effectiveDateType": "false",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳咳咳",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"province": "",
"relationToMainInsured": "5",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司",
"bnfDTOs": [
{
"area": "450103",
"birthday": "1980-01-02",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0 1-是法定;0-不是法定",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "110101198001020219",
"idType": "1",
"lifeGrade": "2",
"marriage": "2",
"mobile": "13707711024",
"name": "爱来",
"nativeplace": "1",
"occupationCode": "2070202",
"occupationName": "保险推销员",
"province": "450000",
"relationToInsured": "3",
"sex": "0",
"village": "百苑小区101号",
"yearSalary": "23"
},
{
"area": "450103",
"birthday": "1983-03-12",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0 1-是法定;0-不是法定",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "452624198303120727",
"idType": "1",
"lifeGrade": "1",
"marriage": "1",
"mobile": "13707711024",
"name": "艾琳马上来",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"province": "450000",
"relationToInsured": "4",
"sex": "1",
"village": "百苑小区101号",
"yearSalary": "32"
}
],
"impartDTO": {
"impartItemDTOS": [
{
"impartAnswer": "1",
"impartCode": "9",
"impartContent": "最近六个月内是否有下列身体不适症状①长期咳嗽咳痰、声音嘶哑、痰中带血、咯血②胸闷、胸痛、心慌、气喘、气短、呼吸困难③吐血、大便带血、黑便、反复腹痛、恶心、反酸、呕吐、腹泻④反复尿频、尿痛、血尿、腰痛、外生殖器溃疡⑤反复皮下出血、鼻腔出血、牙龈出血、发热、持续疲倦⑥晕倒、意识不清、视力下降、抽搐、反复头痛、头晕⑦半年内体重增加或减少5公斤以上⑧关节红肿、疼痛、活动受限。",
"IntroDuctions": ""
},
{
"impartAnswer": "1",
"impartCode": "12a",
"impartContent": "是否曾患有失明、视网膜出血或剥离、视神经炎、青光眼、白内障、眼底病变、视野缺失、屈光度1000度以上、聋哑、中耳炎、梅尼尔氏病或其他眼、耳、鼻、喉或口腔疾病",
"IntroDuctions": ""
}
]
},
"riskDTOLst": [
{
"riskName": "国富人寿国富民惠医疗保险2020版",
"insuYear": 1,
"insuYearFlag": "Y",
"payIntv": 12,
"payEndYear": 1000,
"payEndYearFlag": "Y",
"prem": 10000,
"riskCode": "1113202",
"isMainRisk": "0",
"amt": 22640,
"dutyLst": [
{
"dutyName":"国富民惠医疗保险金",
"dutyCode":"320300",
"amt":1000000,
"prem":536,
"getLimit":"0",
"getRate":"0"
},
{
"dutyName":"一般医疗保险金",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
}
]
},
{
"riskName": "国富人寿国富民惠医疗保险2020版",
"insuYear": 1,
"insuYearFlag": "Y",
"payIntv": 12,
"payEndYear": 1000,
"payEndYearFlag": "Y",
"prem": 10000,
"riskCode": "11132021",
"isMainRisk": "1",
"amt": 22640,
"dutyLst": [
{
"dutyName":"住院医疗保险金",
"dutyCode":"320300",
"amt":1000000,
"prem":536,
"getLimit":"0",
"getRate":"0"
},
{
"dutyName":"住院津贴保险金",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
},
{
"dutyName":"恶性肿瘤住院津贴保险金",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
}
]
},
{
"riskName": "国富人寿国富民惠医疗保险2020版",
"insuYear": 1,
"insuYearFlag": "Y",
"payIntv": 12,
"payEndYear": 1000,
"payEndYearFlag": "Y",
"prem": 10000,
"riskCode": "11132022",
"isMainRisk": "1",
"amt": 22640,
"dutyLst": [
{
"dutyName":"国富民惠医疗保险金",
"dutyCode":"320300",
"amt":1000000,
"prem":536,
"getLimit":"0",
"getRate":"0"
},
{
"dutyName":"",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
}
]
}
]
}
],
"orderAccountDTO": {
"accountName": "艾琳马上",
"bankName": "BOCOM",
"cardBookCode": "4354256325325678790"
},
"orderInfoDTO": {
"contNo": "保单号",
"contState": "保单状态 1-承保;4-终止;0-投保中",
"cValiDate": "生效日期 String",
"orderStatus": "签收状态 0-未签收 1-已签收"
}
}
}`
let res = JSON.parse(a)
this.insuredDTOs = res.orderDTO.insuredDTOs[0]
this.orderInfoDTO = res.orderDTO.orderInfoDTO
this.riskDTOLst = this.insuredDTOs.riskDTOLst
this.riskDTOLst.forEach((element, index) => {
if (element.isMainRisk === '0') {
switch (element.payIntv) {
case -1:
element.payIntvName = '不定期交'
break
case 0:
element.payIntvName = '一次交清'
break
case 1:
element.payIntvName = '月交'
break
case 3:
element.payIntvName = '季交'
break
case 6:
element.payIntvName = '半年交'
break
case 12:
element.payIntvName = '年交'
break
}
this.mainList.push(element)
} else {
this.additionalList.push(element)
}
})
// console.log(res, '=============this.riskDTOLst================')
// console.log(this.mainList, '=============this.mainList================')
console.log(this.additionalList, '=============this.additionalList================')
}
})
},
appCallBack(data) {
if (data.trigger == 'left_button_click') {
if (this.show) {
this.show = false
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1'
})
}, 100)
} else {
this.backToList()
}
}
},
readSpecialPromise() {
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
this.show = true
window.appCallBack = this.appCallBack
},
backToList() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain`,
forbidSwipeBack: '1',
needRefresh: '1'
},
routerInfo: { path: `/insureAgain` }
})
},
readAgreement() {
this.show = false
this.isRead = true
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
},
nextStep() {
if (!this.isRead) {
Dialog.alert({
title: '提示',
message: '亲,请您阅读和确认特别约定哦~',
confirmButtonColor: '#ff0000'
})
} else {
this.commitReOrder()
}
},
/**
* @description: 保存产品信息
* @param {*}
* @return {*}
*/
commitReOrder() {
let additionals = []
this.checkboxResult.forEach(res => {
this.additionalList.forEach(res2 => {
if (res2.riskCode === res) {
additionals.push(res2)
}
})
})
let riskDTOLst = [...this.mainList, ...additionals]
let data = {
orderDTO: {
insuredDTOs: [
{
insuredId: this.insuredDTOs.idNo,
sex: this.insuredDTOs.sex,
riskDTOLst: riskDTOLst
}
],
orderInfoDTO: {
orderNo: this.orderInfoDTO.contNo,
supportBank: '0'
}
},
orderType: 'RE_RISK_ORDER'
}
commitReOrder(data).then(res => {
if (res.result === '0') {
// localStorage.setItem('newOrderNo', resultData.orderNo)
console.log('/insureAgain/Notification')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain/Notification`
},
routerInfo: {
path: `/insureAgain/Notification`
}
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.insure-again {
padding-bottom: 11vw;
}
.btns {
display: flex;
/deep/ .van-button--danger {
flex: 1;
}
}
.additional {
/deep/ .van-field__control {
text-align: center;
}
}
.main {
/deep/ .van-field__control {
text-align: center;
}
}
</style>

View File

@@ -0,0 +1,556 @@
<template>
<div class="insuranceInformation-container pb50 redRadioCheckbox">
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示阅读时长需在${this.Time ? this.time : this.number}秒以上` }}</van-notice-bar>
<iframe :src="src + appntSign.policyUrl" class="iframe"></iframe>
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio name="1" @click="click">
本人确认已阅读
<span>{{ riskName }}产品说明书</span>
</van-radio>
</van-radio-group>
<div class="pt10 pb10 pl30 flex align-items-c">
<span class="mr10">投保人签名 :</span>
<div v-if="signVal == '0' || signVal == '2'">
<van-button type="danger" size="small" :disabled="signVal == '1' ? true : isDisable" @click="sign('0')" v-no-more-click="1000">{{
appntSign.documentStatus == '2' ? '签名' : '已签名'
}}</van-button>
</div>
</div>
<div class="bg-white bottom-btn">
<van-button type="danger" size="large" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000">下一步</van-button>
</div>
</div>
</template>
<script>
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
import { saveInformation, getOrderDetail1 } from '@/api/ebiz/sale/sale'
import { openLoading, closeLoading } from '@/assets/js/utils/toastLoading.js'
import config from '@/config'
// import axios from 'axios'
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
// 投保人还是被保险人信息
signVal: '',
// 投保人签名信息
appntSign: {},
radio: '',
// 倒计时时间
number: '',
// 定时器时间
time: '10',
// 定时器名称
timer: null,
isOver: false,
// 判断验证码是否开始倒计时
Time: true,
// 按钮是否可以点击
isDisable: true,
// 是否在微信
isWeixin,
// 是否签名了 回执流程
isSign: true,
// sign加密码
base64: '',
// 是否可以点击
isDisabledComplite: true,
// local带来的被保险人信息
saleInsuredPersonInfo: {},
// local带来的投保人信息
saleInsuredInfo: {},
// 是否从详情跳过来 如果为1 是
detailJump: '',
src: location.origin + '/pdfjs/web/viewer.html?file=',
//保险产品名称
riskName: localStorage.riskName
}
},
components: {
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar
},
mounted() {
let that = this
document.body.style.backgroundColor = '#fff'
setTimeout(function() {
closeLoading()
that.timeOut()
}, 5000)
},
async created() {
let that = this
that.detailJump = window.localStorage.getItem('detailJump')
that.signVal = window.localStorage.getItem('sign-val')
// 获取投保人信息
that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
if (this.isWeixin) {
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
}
if (this.detailJump != '1') {
// 投被保险人是否同人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保险人信息
that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
}
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('oneimgBase64Data')
let wxSigned = sessionStorage.getItem('onewxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data: oneimgBase64Data:' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false
this.isDisabledComplite = false
// this.isDisable = false
} else {
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
} else {
console.log('````````````````````````')
console.log('第一次进入电子保单')
setTimeout(function() {
closeLoading()
this.timeOut()
}, 5000)
this.getOrderDetail()
}
} else {
setTimeout(function() {
closeLoading()
this.timeOut()
}, 5000)
if (this.detailJump != '1') {
this.getOrderDetail()
}
}
},
methods: {
timeOut() {
let that = this
let time = that.time
that.Time = false
that.number = `${time}`
let timer = setInterval(() => {
time--
if (time <= 0) {
time = 0
clearInterval(timer)
that.Time = true
that.isOver = true
}
that.number = `${time}`
}, 1000)
},
// 获取签名状态
getOrderDetail() {
openLoading()
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
}
return new Promise((resolve, reject) => {
getOrderDetail1(data).then(res => {
if (res.result == '0') {
res.orderDTO.ebizSignDTOS.map(item => {
if (item.signType == '0' || item.signType == '2') {
if (item.documentCode == '3') {
that.appntSign = item
console.log('that.appntSign', that.appntSign)
}
}
})
that.appntSign.policyUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.appntSign.policyUrl}`)
if (that.isWeixin) {
if (res.orderDTO.ebizSignDTOS.length > 1) {
if (that.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
}
}
}
resolve('success')
}
})
})
},
// 点击阅读时
click() {
let that = this
if (that.isOver == false) {
Dialog.confirm({
title: '提示',
message: '该内容涉及您的重大权益,请您仔细阅读',
showCancelButton: false
}).then(() => {
that.radio = ''
})
}
},
// 点击签名
sign(val) {
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (val == '0') {
if (this.detailJump != '1') {
if (this.relationToAppnt == '1') {
if (this.isWeixin) {
this.toAirSign('0', '投保人签名', '5', '1')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '投保人签名',
pageNo: '1',
index: '1',
offset: '5',
pos: '3',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
this.$toast.clear()
if (JSON.parse(data).state == '1') {
this.base64 = decodeURI(JSON.parse(data).sign)
this.appntSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
}
} else {
if (this.isWeixin) {
this.toAirSign('0', '投保人签名', '5', '1')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '投保人签名',
pageNo: '1',
index: '1',
offset: '5',
pos: '3',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
this.$toast.clear()
if (JSON.parse(data).state == '1') {
this.base64 = decodeURI(JSON.parse(data).sign)
this.appntSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
}
}
} else {
switch (that.saleInsuredInfo.idType) {
case '居民身份证':
that.saleInsuredInfo.idType = '1'
break
case '户口本':
that.saleInsuredInfo.idType = '2'
break
case '出生证':
that.saleInsuredInfo.idType = '3'
break
case '外国人护照':
that.saleInsuredInfo.idType = '4'
break
case '港澳居民来往内地通行证':
that.saleInsuredInfo.idType = '5'
break
case '台湾居民来往大陆通行证':
that.saleInsuredInfo.idType = '6'
break
// case '其他':
// that.saleInsuredInfo.idType = '7'
// break
case '外国人永久居留身份证':
that.saleInsuredInfo.idType = '8'
break
case '港澳台居民居住证':
that.saleInsuredInfo.idType = '9'
break
}
if (this.isWeixin) {
this.toAirSign('0', '投保人签名', '5', '1')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: that.saleInsuredInfo.idNo,
//姓名
name: that.saleInsuredInfo.name,
type: that.saleInsuredInfo.idType,
keyword: '投保人签名',
pageNo: '1',
index: '1',
offset: '5',
pos: '3',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
this.$toast.clear()
if (JSON.parse(data).state == '1') {
that.base64 = decodeURI(JSON.parse(data).sign)
that.appntSign.documentStatus = '3'
that.isDisabledComplite = false
that.isSign = false
}
})
}
}
}
},
// toAirSign(status, keyword, offset) {
// localStorage.setItem(
// 'signInfo',
// JSON.stringify({
// idNo: this.saleInsuredInfo.idNo,
// name: this.saleInsuredInfo.name,
// type: this.saleInsuredInfo.idType,
// keyword: keyword,
// status: status,
// offset: offset,
// originUrl: location.href
// })
// )
// window.location.href = this.$mainUrl + '/sign/index.html'
// },
toAirSign(status, keyword, offset, originStatus) {
localStorage.setItem(
'signInfo',
JSON.stringify({
originStatus: originStatus,
idNo: this.saleInsuredInfo.idNo,
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: keyword,
status: status,
offset: offset,
originUrl: location.href
})
)
window.location.href = this.$mainUrl + '/sign/index.html'
},
// 下一步
goNext() {
if (this.isWeixin) {
console.log('````````````````````')
console.log('进入微信')
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let that = this
if (that.signVal == '0' || that.signVal == '2') {
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'sms',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '3',
signType: that.appntSign.signType,
documentType: that.appntSign.documentType,
baseEncryp: that.base64,
policyUrl: that.appntSign.policyUrl
}
]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
this.$toast.clear()
window.localStorage.setItem('detailJump', '')
window.sessionStorage.onewxSigned = false
// window.sessionStorage.oneimgBase64Data = ''
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/InsuranceTip'
},
routerInfo: {
path: '/sale/InsuranceTip'
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
} else {
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (that.signVal == '0' || that.signVal == '2') {
let data = {
orderType: 'SIGN_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo')
},
ebizSignDTOS: [
{
signOrRead: 'sms',
signId: that.appntSign.signId,
orderNo: window.localStorage.getItem('orderNo'),
documentCode: that.appntSign.documentCode,
documentStatus: '3',
signType: that.appntSign.signType,
documentType: that.appntSign.documentType,
baseEncryp: that.base64,
policyUrl: that.appntSign.policyUrl
}
]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
this.$toast.clear()
window.localStorage.setItem('detailJump', '')
window.sessionStorage.onewxSigned = false
// window.sessionStorage.oneimgBase64Data = ''
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/InsuranceTip',
forbidSwipeBack: '1'
},
routerInfo: {
path: '/sale/InsuranceTip'
}
})
} else {
that.$toast(res.resultMessage)
}
})
}
}
}
},
computed: {
listenChange() {
const { isOver, radio, appntSign } = this
return { isOver, radio, appntSign }
}
},
watch: {
listenChange(val) {
let that = this
if (!that.isWeixin) {
if (that.signVal == '0' || that.signVal == '2') {
if (val.isOver == true && val.radio != '' && val.appntSign.documentStatus !== '3') {
that.isDisable = false
} else {
that.isDisable = true
}
if (that.radio == '1' && val.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
} else {
that.isDisabledComplite = true
}
}
if (val.appntSign.documentStatus == '3') {
that.isDisable = true
}
} else {
if (that.signVal == '0' || that.signVal == '2') {
if (val.isOver == true && val.radio != '') {
that.isDisable = false
} else {
that.isDisable = true
}
if (that.radio == '1' && val.appntSign.documentStatus == '3') {
that.isDisabledComplite = false
} else {
that.isDisabledComplite = true
}
}
}
}
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
}
}
</script>
<style lang="scss" scoped>
img {
width: 100%;
height: 100%;
}
.notice {
width: 100%;
position: fixed;
top: 0;
z-index: 20;
}
.iframe {
width: 100vw;
height: 70vh;
border: none;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,521 @@
<template>
<div>
<DropdownBox>
<template #boxTitle>
<span>保单信息</span>
</template>
<InfoCell label="保单号">{{OrderInfoDTO.contNo}}</InfoCell>
<InfoCell label="生效日期">{{OrderInfoDTO.cValiDate}}</InfoCell>
<InfoCell label="保单状态">{{OrderInfoDTO.contState | contStateFilter}}</InfoCell>
<InfoCell label="签收状态">{{OrderInfoDTO.orderStatus | orderStatusFilter}}</InfoCell>
</DropdownBox>
<DropdownBox>
<template #boxTitle>
<span>投保人信息</span>
</template>
<InfoCell label="投保人">{{appntDTO.name}}</InfoCell>
<InfoCell label="性别">{{appntDTO.sex}}</InfoCell>
<InfoCell label="证件类型">{{appntDTO.idType}}</InfoCell>
<InfoCell label="证件号码">{{appntDTO.idNo}}</InfoCell>
<InfoCell label="联系电话">{{appntDTO.mobileStar}}</InfoCell>
</DropdownBox>
<DropdownBox>
<template #boxTitle>
<span>被保险人信息</span>
</template>
<div v-for="(item, index) in insuredDTOs" :key="index" class="pb10">
<InfoCell label="姓名">{{item.name}}</InfoCell>
<InfoCell label="性别">{{item.sex}}</InfoCell>
<InfoCell label="证件类型">{{item.idType}}</InfoCell>
<InfoCell label="证件号码">{{item.idNo}}</InfoCell>
<InfoCell label="联系电话">{{item.mobile}}</InfoCell>
</div>
</DropdownBox>
<DropdownBox>
<template #boxTitle>
<span>受益人信息</span>
</template>
<div v-for="(item, index) in insuredDTOs" :key="index" class="pb10">
<div v-if="item.bnfDTOs === '[]'">
<InfoCell label="受益人">法定受益人</InfoCell>
</div>
<div v-else>
<div v-for="itm in item.bnfDTOs" :key="itm.name" class="pb10">
<InfoCell label="受益人">{{OrderInfoDTO.bnfFlag}}</InfoCell>
<div v-if="OrderInfoDTO.bnfFlag == '指定受益人'">
<InfoCell label="姓名">{{itm.name}}</InfoCell>
<InfoCell label="性别">{{itm.sex}}</InfoCell>
<InfoCell label="受益比例" v-if="itm.bnfLot != null">{{`${itm.bnfLot}%`}}</InfoCell>
<InfoCell label="证件类型">{{itm.idType}}</InfoCell>
<InfoCell label="证件号码">{{itm.idNo}}</InfoCell>
</div>
</div>
</div>
</div>
</DropdownBox>
<DropdownBox>
<template #boxTitle>
<span>险种类型</span>
</template>
<div v-for="it in list" :key="it.riskName" class="pb10">
<InfoCell label="险种名称">{{it.riskName}}</InfoCell>
<InfoCell label="保险期间">{{it.insuYear}}</InfoCell>
<InfoCell label="交费期间" v-if="it.payEndYear !== '1000'">{{it.payEndYearFlag == 'Y' ? `${it.payEndYear}` :
`${it.payEndYear}`}}</InfoCell>
<InfoCell label="交费期间" v-if="it.payEndYear === '1000'">一次性交清</InfoCell>
<InfoCell label="险种保额(元)" v-if="it.riskCode == 'GFRS_M0015' || it.riskCode == 'GFRS_M0017' || it.riskCode == 'GFRS_M0003'">--</InfoCell>
<InfoCell label="险种保额(元)" v-else>{{it.amt | moneyFormat}}</InfoCell>
<InfoCell label="险种保费(元)">{{it.riskName}}</InfoCell>
</div>
</DropdownBox>
</div>
</template>
<script>
import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import dataDictionary from '@/assets/js/utils/data-dictionary'
import { Collapse, CollapseItem, Cell, CellGroup, Button } from 'vant'
import { getReAppntPolicy } from '@/api/ebiz/insureAgain/insureAgain'
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
// import { getQuestionList } from '@/api/ebiz/questions'
import CacheUtils from '@/assets/js/utils/cacheUtils'
export default {
components: {
DropdownBox,
InfoCell
},
data() {
return {
// 保单基本信息
OrderInfoDTO: {},
// 投保人信息
appntDTO: {},
// 被保险人信息
insuredDTOs: [],
list: [],
reason: '',
problemList: []
}
},
filters: {
orderStatusFilter(val) {
for (let status of dataDictionary.orderStatus) {
if (status.id === val) {
return status.text
}
}
return ''
},
contStateFilter(val) {
for (let status of dataDictionary.contState) {
if (status.val === val) {
return status.text
}
}
return ''
},
reasonFilter(val) {
let reg = /'|;/g
return val.replace(reg, '')
}
},
created() {
let policyNo = CacheUtils.getLocItem('policyNo')
this.getReAppntPolicy(123)
},
methods: {
// 获取保单详情
async getReAppntPolicy(policyNo) {
let data = {
policyNo: policyNo
}
// getReAppntPolicy(data).then(res => {
var res = `{
"orderDTO": {
"appntDTO": {
"area": "",
"averageAnnualIncome": 10,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"effectiveDateType": "false",
"email": "310598205@qq.com",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳马上",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司"
},
"insuredDTOs": [
{
"area": "",
"averageAnnualIncome": 1000,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"companyArea": "",
"companyCity": "",
"effectiveDateType": "false",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳咳咳",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"province": "",
"relationToMainInsured": "5",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司",
"bnfDTOs": [
{
"area": "450103",
"birthday": "1980-01-02",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "110101198001020219",
"idType": "1",
"lifeGrade": "2",
"marriage": "2",
"mobile": "13707711024",
"name": "爱来",
"nativeplace": "1",
"occupationCode": "2070202",
"occupationName": "保险推销员",
"province": "450000",
"relationToInsured": "3",
"sex": "0",
"village": "百苑小区101号",
"yearSalary": "23"
},
{
"area": "450103",
"birthday": "1983-03-12",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "452624198303120727",
"idType": "1",
"lifeGrade": "1",
"marriage": "1",
"mobile": "13707711024",
"name": "艾琳马上来",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"province": "450000",
"relationToInsured": "4",
"sex": "1",
"village": "百苑小区101号",
"yearSalary": "32"
}
],
"impartDTO": {
"impartItemDTOS": [
{
"impartAnswer": "1",
"impartCode": "9",
"impartContent": "最近六个月内是否有下列身体不适症状?",
"IntroDuctions": ""
},
{
"impartAnswer": "1",
"impartCode": "12a",
"impartContent": "是否曾患有失明、视网膜出血或剥离、视神经炎、青光眼、白内障、眼底病变、视野缺失、屈光度1000度以上、聋哑、中耳炎、梅尼尔氏病或其他眼、耳、鼻、喉或口腔疾病",
"IntroDuctions": ""
}
]
},
"riskDTOLst": [
{
"riskName": "国富人寿国富民惠医疗保险2020版",
"insuYear": 1,
"insuYearFlag": "Y",
"payIntv": 12,
"payEndYear": 1000,
"payEndYearFlag": "Y",
"prem": 10000,
"riskCode": "1113202",
"isMainRisk": "0",
"amt": 22640,
"dutyLst": [
{
"dutyName":"国富民惠医疗保险金",
"dutyCode":"320300",
"amt":1000000,
"prem":536,
"getLimit":"0",
"getRate":"0"
},
{
"dutyName":"",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
}
]
}
]
}
],
"orderAccountDTO": {
"accountName": "艾琳马上",
"bankName": "BOCOM",
"cardBookCode": "4354256325325678790"
},
"orderInfoDTO": {
"contNo": "保单号",
"contState": "保单状态 1-承保;4-终止;0-投保中",
"cValiDate": "生效日期 String",
"orderStatus": "签收状态 0-未签收 1-已签收"
}
},
"result": "0"
}`;
res = JSON.parse(res);
if (res.result == '0') {
console.log(res, '11111111111111111111111aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
// if (res.orderDTO.orderInfoDTO.bnfFlag == '1') {
// res.orderDTO.orderInfoDTO.bnfFlag = '指定受益人'
// } else if (res.orderDTO.orderInfoDTO.bnfFlag == '0') {
// res.orderDTO.orderInfoDTO.bnfFlag = '法定受益人'
// }
this.OrderInfoDTO = res.orderDTO.orderInfoDTO
this.appntDTO = res.orderDTO.appntDTO
this.reason = res.orderDTO.reason
// 投保人信息
if (res.orderDTO.appntDTO.sex == '0') {
res.orderDTO.appntDTO.sex = '男'
} else if (res.orderDTO.appntDTO.sex == '1') {
res.orderDTO.appntDTO.sex = '女'
}
switch (res.orderDTO.appntDTO.idType) {
case '1':
res.orderDTO.appntDTO.idType = '居民身份证'
break
case '2':
res.orderDTO.appntDTO.idType = '户口本'
break
case '3':
res.orderDTO.appntDTO.idType = '出生证'
break
case '4':
res.orderDTO.appntDTO.idType = '外国人护照'
break
case '5':
res.orderDTO.appntDTO.idType = '港澳居民来往内地通行证'
break
case '6':
res.orderDTO.appntDTO.idType = '台湾居民来往大陆通行证'
break
// case '7':
// res.orderDTO.appntDTO.idType = '其他'
// break
case '8':
res.orderDTO.appntDTO.idType = '外国人永久居留身份证'
break
case '9':
res.orderDTO.appntDTO.idType = '港澳台居民居住证'
break
}
this.appntDTO = res.orderDTO.appntDTO
res.orderDTO.insuredDTOs.map(item => {
item.riskDTOLst.map(it => {
if (it.insuYearFlag == 'Y') {
it.insuYear = `${it.insuYear}`
} else {
if (it.insuYearFlag == 'A' && it.insuYear == '106') {
it.insuYear = '终身'
} else {
it.insuYear = `${it.insuYear}周岁的保单周年日`
}
}
Number(it.payIntv)
switch (it.payIntv) {
case 0:
it.payIntv = '一次性交清'
break
case 1:
it.payIntv = '月交'
break
case 12:
it.payIntv = '年交'
break
}
})
})
// 被保险人信息
res.orderDTO.insuredDTOs.map(item => {
if (item.sex == '0') {
item.sex = '男'
} else if (item.sex == '1') {
item.sex = '女'
} else {
item.sex = '不详'
}
switch (item.idType) {
case '1':
item.idType = '居民身份证'
break
case '2':
item.idType = '户口本'
break
case '3':
item.idType = '出生证'
break
case '4':
item.idType = '外国人护照'
break
case '5':
item.idType = '港澳居民来往内地通行证'
break
case '6':
item.idType = '台湾居民来往大陆通行证'
break
// case '7':
// item.idType = '其他'
// break
case '8':
item.idType = '外国人永久居留身份证'
break
case '9':
item.idType = '港澳台居民居住证'
break
}
switch (item.relationToAppnt) {
case '1':
item.relationToAppnt = '本人'
break
case '2':
item.relationToAppnt = '配偶'
break
case '3':
item.relationToAppnt = '父母'
break
case '4':
item.relationToAppnt = '子女'
break
case '5':
item.relationToAppnt = '其他'
break
}
// if (res.orderDTO.orderInfoDTO.bnfFlag == '指定受益人') {
// item.bnfDTOs.map(it => {
// if (it.sex == '0') {
// it.sex = '男'
// } else if (it.sex == '1') {
// it.sex = '女'
// } else {
// it.sex = '不详'
// }
// switch (it.idType) {
// case '1':
// it.idType = '居民身份证'
// break
// case '2':
// it.idType = '户口本'
// break
// case '3':
// it.idType = '出生证'
// break
// case '4':
// it.idType = '外国人护照'
// break
// case '5':
// it.idType = '港澳居民来往内地通行证'
// break
// case '6':
// it.idType = '台湾居民来往大陆通行证'
// break
// // case '7':
// // it.idType = '其他'
// // break
// case '8':
// it.idType = '外国人永久居留身份证'
// break
// case '9':
// it.idType = '港澳台居民居住证'
// break
// }
// switch (it.relationToInsured) {
// case '1':
// it.relationToInsured = '本人'
// break
// case '2':
// it.relationToInsured = '配偶'
// break
// case '3':
// it.relationToInsured = '父母'
// break
// case '4':
// it.relationToInsured = '子女'
// break
// case '5':
// it.relationToInsured = '其他'
// break
// }
// })
// }
})
this.insuredDTOs = res.orderDTO.insuredDTOs
// 格式化
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
// } else {
this.$toast(res.resultMessage)
}
// })
}
}
}
</script>
<style lang="scss" scoped></style>

View File

@@ -1,44 +1,45 @@
<template>
<div>
<van-search v-model="searchName" placeholder="请输入保单号/投保人姓名/被保险人姓名" @change="searchList" @keyup.enter="searchList" />
<van-search v-model="searchName" placeholder="请输入保单号/投保人姓名/被保险人姓名"/>
<van-sticky>
<van-tabs v-model="active" @change="tabChange">
<van-tab name="uncommit" title="未提交" />
<van-tab name="commit" title="已提交" />
</van-tabs>
</van-sticky>
<div class="container">
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
<van-list ref="uncommitted" v-model="loading" :finished="finished" :finished-text="finishedText" :immediate-check="false" @load="loadMore">
<div v-if="insureList.length>0">
<Order v-for="(order,index) in insureList" :key="index" :order="order">
<div class="container" v-if="isShow">
<van-pull-refresh @refresh="onRefresh" v-model="isLoading">
<div v-if="NewItems.length>0">
<Order v-for="(order,index) in NewItems" :key="index" :order="order">
<p v-if="active === 'uncommit'" class="name mb8">
<van-tag plain color="#999999">保单保障日截止日期</van-tag>
<span class="ml5 span">{{ order.orderInfoDTO.orderNo }}</span>
<span class="ml5 span">{{ order.cvaliDate }}</span>
</p>
<div v-if="active === 'commit'">
<p class="name mb8">
<van-tag plain color="#999999">重新投保单号</van-tag>
<span class="ml5 span">{{ order.orderInfoDTO.orderNo }}</span>
<span class="ml5 span">{{ order.policyNo }}</span>
</p>
<p class="name">
<van-tag plain color="#999999">状态</van-tag>
<span class="ml5 span">{{ order.stateName }}</span>
<span class="ml5 span" v-if="order.orderStatus === '0'">投保中</span>
<span class="ml5 span" v-else-if="order.orderStatus === '1'">承包</span>
<span class="ml5 span" v-else-if="order.orderStatus === '4'">终止</span>
</p>
</div>
<template #btns>
<div v-if="active === 'uncommit'">
<van-button size="small" round type="danger" @click="uncommitInsureDetail(order)" plain>查看详情</van-button>
<van-button size="small" round type="danger" @click="uncommitInsureDetail(order)" plain>查看详情</van-button>
<van-button class="ml10" size="small" round type="danger" @click="insureAgain(order)">重新投保</van-button>
</div>
<div v-if="active === 'commit'">
<div v-if="active === 'commit'">
<van-button class="ml10" size="small" round type="danger" @click="commitInsureDetail(order)">查看投保单</van-button>
<van-button v-if="order.newOrderStatus === '19'" class="ml10" size="small" round type="danger" @click="buyAgain(order)">待支付</van-button>
</div>
</template>
</Order>
</div>
</van-list>
</div>
</van-pull-refresh>
<van-popup v-model="isAgreementShow" position="right" :style="{ height: '100vh', width: '100vw' }">
<ReadingAgreement :needTime="false">
@@ -71,11 +72,12 @@
<script>
import { Search, Sticky, PullRefresh, list, Tag, Popup, Radio, RadioGroup } from 'vant'
import { orderList } from '@/api/ebiz/insureAgain/insureAgain'
import { getPolicyListAgent } from '@/api/ebiz/insureAgain/insureAgain'
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级
import Order from '@/components/ebiz/insureAgain/Order'
import ReadingAgreement from '@/components/ebiz/insureAgain/ReadingAgreement'
import CacheUtils from '@/assets/js/utils/cacheUtils'
export default {
name: 'InsureAgain',
components: {
@@ -94,30 +96,48 @@ export default {
return {
searchName: '', //搜索名
active: 'uncommit',
insureList: [],
currentPage: 1, //当前页数
isLoading: false,
loading: false,
finished: false,
finishedText: '没有更多了',
pageSize: 5,
policyListDTOList: [],
isAgreementShow: false,
radio: ''
radio: '',
isLoading: false,
isShow: false
}
},
computed:{
NewItems() {
var NewItems = []
let item1 = ['1','4','0'];
let item2 = ['19','38','39','40'];
let item3 = ['1','2','3'];
let item4 = ['0','1','2','3','4'];
this.policyListDTOList.map(item => {
if (item.riskName.search(this.searchName) != -1 || item.policyNo.search(this.searchName) != -1 || item.appntName.search(this.searchName) != -1) {
item.policyNo = '23424333333331';
item.orderStatus = item1[Math.floor(Math.random()*item1.length)];
item.newOrderNo = '32422222222222234';
item.newOrderStatus = item2[Math.floor(Math.random()*item2.length)];
item.reInsuranceFlag = '3';
item.reInsuranceState = item4[Math.floor(Math.random()*item4.length)];
if (this.active === 'uncommit' && item.reInsuranceFlag === '3' && item.reInsuranceState === '0') {
NewItems.push(item)
} else if(this.active === 'commit' && item.reInsuranceFlag === '3' && (item.reInsuranceState === '1' || item.reInsuranceState === '2' || item.reInsuranceState === '3')){
NewItems.push(item)
}
// NewItems.push(item)
}
})
console.log(NewItems, '======================NewItems===================')
return NewItems
}
},
created() {
let pageInfo = {
pageNum: this.currentPage,
pageSize: this.pageSize,
orderType: this.active,
name: this.searchName,
desensitizType: this.active === 'uncommit' ? 1 : 0
}
this.getOrderList(pageInfo)
let data = {}
this.getPolicyListAgent(data)
},
mounted() {
setTimeout(() => {
// eslint-disable-next-line no-undef
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
@@ -141,71 +161,23 @@ export default {
}
}
},
tabChange(name) {
this.currentPage = 1
this.active = name
this.saleList = []
;[this.loading, this.finished] = [true, false]
this.loadMore()
},
searchList() {
this.currentPage = 1
this.insureList = []
;[this.loading, this.finished] = [true, false]
// this.finishedText = '正在加载...'
let pageInfo = {
pageNum: this.currentPage,
pageSize: this.pageSize,
orderType: this.active,
name: this.searchName,
desensitizType: this.active === 'uncommit' ? 1 : 0
}
this.getOrderList(pageInfo)
tabChange(name) {
this.active = name
},
//初始化保单列表
getOrderList(pageInfo) {
orderList(pageInfo).then(res => {
if (res.result == '0') {
this.currentPage++
if (!res.orderDTOPageInfo && res.orderDTOPageInfo !== {}) {
this.finished = true
this.loading = false
this.finishedText = ''
return
}
let list = res.orderDTOPageInfo.list
if (list.length == 0) {
this.finishedText = ''
} else {
this.finishedText = '已经全部加载'
}
list = formatRiskList(list, 'insuredDTOs', 'riskDTOLst') //根据后面两个参数 来格式化数据
dataDictionary.policyState.forEach(state => {
list.forEach(order => {
if (state.id == order.orderInfoDTO.orderStatus) {
order.stateName = state.text
}
})
})
this.insureList = this.insureList.concat(list)
// if (this.insureList.length == 0) {
// this.isSuccess = false
// }
this.loading = false
if (res.orderDTOPageInfo.nextPage == 0) {
//当下一页为0时 表示全部数据加载完毕
this.finished = true
}
} else {
this.finished = true
this.loading = false
this.finishedText = res.resultMessage
getPolicyListAgent(pageInfo) {
getPolicyListAgent(pageInfo).then(res => {
if (res.result == '0') {
this.policyListDTOList = res.policyListDTOList
console.log(this.policyListDTOList, '===================this.policyListDTOList====================')
this.isShow = true
} else {
this.errMessage = res.resultMessage || '暂无保单'
}
})
},
insureAgain(order) {
localStorage.setItem('orderNo', order.orderInfoDTO.orderNo)
insureAgain(order) {
CacheUtils.setLocItem('policyNo', order.policyNo)
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
@@ -215,26 +187,25 @@ export default {
this.isAgreementShow = true
},
uncommitInsureDetail(order) {
localStorage.setItem('orderNo', order.orderInfoDTO.orderNo)
CacheUtils.setLocItem('policyNo', order.policyNo)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/uncommitInsureDetail'
url: location.origin + '/#/insureAgain/UncommitInsureDetail'
},
routerInfo: {
path: '/insureAgain/uncommitInsureDetail'
path: '/insureAgain/UncommitInsureDetail'
}
})
},
commitInsureDetail(order) {
localStorage.setItem('orderNo', order.orderInfoDTO.orderNo)
commitInsureDetail(order) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/commitInsureDetail'
url: location.origin + '/#/insureAgain/CommitInsureDetail'
},
routerInfo: {
path: '/insureAgain/commitInsureDetail'
path: '/insureAgain/CommitInsureDetail'
}
})
},
@@ -242,39 +213,20 @@ export default {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain/insureInformation`,
url: location.origin + `/#/insureAgain/InsureInformation`,
forbidSwipeBack: '1',
needRefresh: '1'
},
routerInfo: { path: `/insureAgain/insureInformation` }
routerInfo: { path: `/insureAgain/InsureInformation` }
})
},
onRefresh() {
let pageInfo = {
pageNum: 1,
pageSize: this.pageSize,
orderType: this.active,
name: '',
desensitizType: this.active === 'uncommit' ? 1 : 0
}
this.isLoading = false
this.insureList = []
this.getOrderList(pageInfo)
console.log(345435)
this.policyListDTOList = []
let data = {}
this.getPolicyListAgent(data)
},
//分页用
loadMore() {
if (this.showFlag) {
return
}
let pageInfo = {
pageNum: this.currentPage,
pageSize: this.pageSize,
orderType: this.active,
name: this.searchName,
desensitizType: this.active === 'uncommit' ? 1 : 0
}
this.getOrderList(pageInfo)
}
}
}
</script>

View File

@@ -2,63 +2,114 @@
<div class="insure-again">
<ProgressBar :active.sync="active" />
<p style="font-weight: bold;" class="bg-white p10 van-hairline--bottom">告知项目</p>
<DropdownBox :gutter="false">
<template #boxTitle>
<span>被保人财务告知</span>
</template>
<template #right-title>
<span class="mr10">李磊</span>
</template>
<div class="container">
<p class="title p10">1.您目前或曾经是否有吸烟习惯</p>
<van-radio-group v-model="radio" class="radio-group p10" disabled>
<van-radio class="mr50" name="1"></van-radio>
<van-radio name="2"></van-radio>
</van-radio-group>
<div class="question-detail">
<InfoCell label="目前/曾经吸烟数量(支/天)" value="2" />
<InfoCell label="吸烟延续(年)" value="5" />
<InfoCell label="平均已戒烟(年)" value="0" />
<div class="content-all-info">
<div v-for="(im, indx) in impartDTOS" :key="indx">
<van-collapse v-model="activeNames">
<van-collapse-item :name="indx + 1">
<div slot="title" class="flex align-items-c justify-content-s">
<!--投保人 0 2 4 6 8 10 被保险人 1 3 5 7 9 11-->
{{
relationToAppnt == '1'
? '投保人/被保险人' +
impartTypeNumber[im.impartType]
.replace('投保人', '')
.replace('被保人', '')
.replace('被保险人', '')
: impartTypeNumber[im.impartType]
}}
<!--{{ impartTypeNumber[im.impartType] }}-->
<div class="flex align-items-c justify-content-s">
<span>{{
im.impartType == 0 || im.impartType == 2 || im.impartType == 4 || im.impartType == 6 || im.impartType == 8 || im.impartType == 10
? saleInsuredInfo.name
: saleInsuredPersonInfo.name
}}</span>
<img :src="$assetsUrl + 'images/avatar.png'" class="w20 ml15" />
</div>
</div>
<!-- <div class="h50">
<img />
<span>请如实填写问题中的每一项情况并对出现的情况载体是框列举说明</span>
</div>-->
<div class="h50 mt10 flex align-items-c notifyingMessage-text">
<div class="ml15 w315 h35 flex">
<!-- <img :src="$assetsUrl + 'images/notifiy.png'" class="w18 h18 " /> -->
<van-icon name="info-o" class="w18 h18" size="20px" color="#4a90e2" />
<span class="fs12 ml10">请如实填写问题中的每一项情况并对出现的情况在提示框列举说明</span>
</div>
</div>
<!-- 第一题 -->
<div v-for="(item, index) in im.impartItemDTOS" :key="index">
<div class="mt10 pb2" v-if="item.impartCode != '2b'">
<div class="mb20 ml20">
<span>{{ item.impartCode + '.' + item.impartContent }}</span>
</div>
<van-radio-group
v-model="item.impartAnswer"
class="flex mb10 pb10"
@change="change(item.isSelect, $event, item.impartCode, im.impartType)"
v-validate="'required'"
data-vv-name="单选"
>
<van-radio name="0" class="mr150 ml70"></van-radio>
<van-radio name="1"></van-radio>
</van-radio-group>
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
<div v-if="it.extra">
<van-field v-model="it.answer" placeholder="请输入" :label="it.questionContent" clearable v-validate="'required'" data-vv-name="答案" />
</div>
</van-cell-group>
<div v-if="item.impartAnswer == '0'">
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
<van-field
v-model="it.answer"
placeholder="请输入"
:label="it.questionContent"
clearable
v-validate="'required'"
data-vv-name="答案"
v-if="!it.extra"
/>
</van-cell-group>
</div>
</div>
<div class="mt10 pb2" :class="{ special: !showFlag || !isShow }" v-else>
<!-- 被保险人题目为2b -->
<div v-if="im.impartType == 3 || im.impartType == 7 || im.impartType == 11">
<div class="mb20 ml20" v-if="item.impartCode == '2b' && showFlag && isShow">
<span>{{ item.impartCode + '.' + item.impartContent }}</span>
</div>
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
<div v-if="it.extra && showFlag && isShow">
<van-field v-model="it.answer" placeholder="请输入" :label="it.questionContent" clearable v-validate="'required'" data-vv-name="答案" />
</div>
</van-cell-group>
<div v-if="showFlag && isShow">
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
<van-field
v-model="it.answer"
placeholder="请输入"
:label="it.questionContent"
clearable
v-validate="'required'"
data-vv-name="答案"
v-if="!it.extra"
/>
</van-cell-group>
</div>
</div>
</div>
</div>
</van-collapse-item>
</van-collapse>
</div>
</div>
</DropdownBox>
<DropdownBox :gutter="false">
<template #boxTitle>
<span>被保人健康告知</span>
</template>
<template #right-title>
<span class="mr10">李磊</span>
</template>
<div class="container">
<p class="title p10">1.您目前或曾经是否有吸烟习惯</p>
<van-radio-group v-model="radio" class="radio-group p10" disabled>
<van-radio class="mr50" name="1"></van-radio>
<van-radio name="2"></van-radio>
</van-radio-group>
<div class="question-detail">
<InfoCell label="目前/曾经吸烟数量(支/天)" value="2" />
<InfoCell label="吸烟延续(年)" value="5" />
<InfoCell label="平均已戒烟(年)" value="0" />
</div>
</div>
<div class="container">
<p class="title p10">1.您目前或曾经是否有吸烟习惯</p>
<van-radio-group v-model="radio" class="radio-group p10" disabled>
<van-radio class="mr50" name="1"></van-radio>
<van-radio name="2"></van-radio>
</van-radio-group>
<div class="question-detail">
<InfoCell label="目前/曾经吸烟数量(支/天)" value="2" />
<InfoCell label="吸烟延续(年)" value="5" />
<InfoCell label="平均已戒烟(年)" value="0" />
</div>
</div>
</DropdownBox>
<p class="notifition bg-white p15">
注意本次重新投保仅限于无其他补充告知的情况若您有其他补充告知您的条件不符合本重新投保流程请您联系保单服务专员或拨打4006946688咨询通过其他途径进行投保申请
</p>
<div class="btns">
<div class="btns-tip">
<van-button type="danger" v-no-more-click="1000" @click="backToList">有补充告知返回</van-button>
<van-button type="danger" v-no-more-click="1000" @click="nextStep">无补充告知下一步</van-button>
</div>
@@ -67,24 +118,588 @@
<script>
import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
import { RadioGroup, Radio } from 'vant'
import ReadingAgreement from '@/components/ebiz/insureAgain/ReadingAgreement'
import { Collapse, CollapseItem, RadioGroup, Radio, Field, CellGroup, Icon, Popup } from 'vant'
import { information, saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
import utilsAge from '@/assets/js/utils/age'
import IndexBar from '@/components/ebiz/sale/IndexBar'
import CacheUtils from '@/assets/js/utils/cacheUtils'
export default {
components: {
ProgressBar,
DropdownBox,
InfoCell,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio
},
data() {
return {
active: 2,
radio: '1'
// 告知信息
impartDTOS: [],
// 折叠面板
activeNames: [],
// 投保人信息
saleInsuredInfo: {},
// 被保险人信息
saleInsuredPersonInfo: {},
// 投被保险人是否同人 1为同一个人
relationToAppnt: '',
// 产品编码
productCodes: '',
// 是否可以点击
isDisabled: false,
// 默认显示被保险人根据后台返回
noRisk: false,
//是否存在附加险
isExistAdditionalRisk: false,
saleInsuredAge: '',
saleInsuredSex: '',
saleInsuredPersonAge: '',
saleInsuredPersonSex: '',
showFlag: false,
isShow: false,
isShows: false,
impartTypeNumber: {
'0': '投保人健康告知',
'2': '投保人财务告知',
'1': '被保险人健康告知',
'3': '被保险人财务告知',
'4': '投保人健康告知',
'5': '被保险人健康告知',
'6': '投保人财务告知',
'7': '被保险人财务告知',
'8': '投保人健康告知',
'10': '投保人财务告知',
'9': '被保险人健康告知',
'11': '被保险人财务告知'
},
salePageFlag: '5',
radio: false,
}
},
components: {
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Icon.name]: Icon,
[IndexBar.name]: IndexBar,
[Popup.name]: Popup,
ProgressBar,
ReadingAgreement
},
created() {
// getOrderDetail({ orderNo: CacheUtils.getLocItem('orderNo') }).then(res => {
getOrderDetail({ orderNo: `8186270000012323` }).then(res => {
if (res.result == 0) {
//投被保险人关系
this.isExistAdditionalRisk = res.orderDTO.insuredDTOs[0].riskDTOLst.length > 1 ? true : false
console.log('this.is ====', this.isExistAdditionalRisk)
this.relationToAppnt = res.orderDTO.insuredDTOs[0].relationToAppnt
this.$utils.intLocalStorage(res)
this.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
//如果返回参数存在曾经提交的告知信息,获取曾经提交的告知信息
let insuredFinanceImpartDTO = res.orderDTO.appntDTO.financeImpartDTO //投保人财务告知集合
let insuredImpartDTO = res.orderDTO.appntDTO.impartDTO //投保人健康告知集合
let insuredPersionFinanceImpartDTO = res.orderDTO.insuredDTOs[0].financeImpartDTO //被保人财务告知集合
let insuredPersionImpartDTO = res.orderDTO.insuredDTOs[0].impartDTO //被保人健康告知集合
if (
insuredFinanceImpartDTO.impartItemDTOS ||
insuredImpartDTO.impartItemDTOS ||
insuredPersionFinanceImpartDTO.impartItemDTOS ||
insuredPersionImpartDTO.impartItemDTOS
) {
if (insuredFinanceImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredFinanceImpartDTO.impartItemDTOS, impartType: insuredFinanceImpartDTO.impartType })
}else if(insuredPersionFinanceImpartDTO.impartItemDTOS && this.relationToAppnt == '1'){
this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType })
}
if (insuredImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredImpartDTO.impartItemDTOS, impartType: insuredImpartDTO.impartType })
}else if (insuredPersionImpartDTO.impartItemDTOS && this.relationToAppnt == '1'){
this.impartDTOS.push({ impartItemDTOS: insuredPersionImpartDTO.impartItemDTOS, impartType: insuredPersionImpartDTO.impartType })
}
if(this.relationToAppnt != '1'){
if (insuredPersionFinanceImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType })
}
if (insuredPersionImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredPersionImpartDTO.impartItemDTOS, impartType: insuredPersionImpartDTO.impartType })
}
}
this.impartDTOS.map(v => {
v.impartItemDTOS.map(i => {
i.isSelect =
this.formatDateTime() +
Math.random()
.toString(36)
.substr(2)
i.show = false
if (i.impartAnswer == '0') {
i.show = true
} else {
i.questions[0].answer = ''
}
})
})
} else {
// 获取告知消息
this.information()
}
//投被同人取到年纪和性别去判断是是否显示内容
this.saleInsuredAge = utilsAge.getAge(this.saleInsuredInfo.birthday, new Date())
this.saleInsuredSex = this.saleInsuredInfo.sex
//投被不同人取到年纪和性别去判断是是否显示内容
this.saleInsuredPersonAge = this.saleInsuredPersonInfo.age
this.saleInsuredPersonSex = this.saleInsuredPersonInfo.sex
} else {
this.$toast(res.resultMessage)
}
})
// this.relationToAppnt = `1`
this.productCodes = JSON.parse(localStorage.chooseProductCodes)
//this.information()
},
mounted() {
setTimeout(() => {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
document.body.style.backgroundColor = '#F5F5F5'
if (!this.$route.query.edit) {
//如果不是编辑/导航条跳转进来的
localStorage.setItem('salePageFlag', this.salePageFlag)
} else if (this.$route.query.edit && !this.$route.query.salePageFlag) {
//如果从保单列表点击编辑按钮进入
this.salePageFlag = '5'
localStorage.setItem('salePageFlag', this.salePageFlag)
} else if (this.$route.query.salePageFlag) {
//如果是从导航栏点击进入
this.salePageFlag = localStorage.salePageFlag
}
},
methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '电子投保单列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1'
}
})
})
.catch(() => {
return
})
}
},
isShowList() {
let that = this
console.log(that.saleInsuredAge)
that.impartDTOS.map(item => {
if (item.impartType == 0 || item.impartType == 4) {
item.impartItemDTOS.map((items, index, array) => {
if (items.extra3) {
let obj = JSON.parse(items.extra3)
if (obj.age && obj.sex == '') {
array.splice(index, 1, '')
}
if (obj.age && obj.sex) {
//15题性别为男或者女并且小于14岁不显示
if (that.saleInsuredSex != obj.sex || (that.saleInsuredSex == obj.sex && that.saleInsuredAge < obj.age)) {
array.splice(index, 1, '')
}
}
}
})
}
if (item.impartType == 1 || item.impartType == 5) {
item.impartItemDTOS.map((items, index, array) => {
if (items.extra3) {
let obj = JSON.parse(items.extra3)
if (obj.age && obj.sex == '') {
//被保险人年纪大于2岁不显示该题
if (that.saleInsuredPersonAge > obj.age) {
array.splice(index, 1, '')
}
}
if (obj.age && obj.sex) {
if (that.saleInsuredPersonSex != obj.sex || (that.saleInsuredPersonSex == obj.sex && that.saleInsuredPersonAge < obj.age)) {
array.splice(index, 1, '')
}
}
}
})
}
// 被保险人财务告知添加判断
if (item.impartType == 3 || item.impartType == 7 || item.impartType == 11) {
item.impartItemDTOS.map((items, index, array) => {
if (items.extra3) {
let obj = JSON.parse(items.extra3)
if (obj.age && obj.sex == '2') {
//小于18岁显示
if (that.saleInsuredPersonAge < Number(obj.age)) {
this.isShow = true
}
}
}
})
}
})
//去除数组里面的空字符串
that.impartDTOS.map(item => {
if (item.impartType == 0 || item.impartType == 4) {
let array = item.impartItemDTOS
for (var i = 0; i < array.length; i++) {
if (array[i] == '' || array[i] == null || typeof array[i] == undefined) {
array.splice(i, 1)
i = i - 1
}
}
}
if (item.impartType == 1 || item.impartType == 5) {
let array = item.impartItemDTOS
for (var i = 0; i < array.length; i++) {
if (array[i] == '' || array[i] == null || typeof array[i] == undefined) {
array.splice(i, 1)
i = i - 1
}
}
}
})
},
// 单选改变时候
change(item, val, impartCode, impartType) {
// console.log(item)
// console.log(val)
let that = this
if (val == '0') {
that.impartDTOS.map(it => {
it.impartItemDTOS.map(itm => {
if (item == itm.isSelect) {
// itm.isTrue = val
itm.show = true
}
})
})
// that.impartItemDTOS[item].show = true
} else {
that.impartDTOS.map(it => {
it.impartItemDTOS.map(itm => {
if (item == itm.isSelect) {
// itm.isTrue = val
itm.show = false
}
})
})
}
if (impartType == '3' || impartType == '7' || impartType == '11') {
if (impartCode == '2a') {
if (val == '0') {
this.showFlag = true
that.impartDTOS.map(it => {
it.impartItemDTOS.map(itm => {
if (itm.impartCode == '2b') {
itm.impartAnswer = '0'
}
})
})
} else {
this.showFlag = false
}
}
}
},
formatDateTime() {
var date = new Date()
var y = date.getFullYear()
var m = date.getMonth() + 1
m = m < 10 ? '0' + m : m
var d = date.getDate()
d = d < 10 ? '0' + d : d
var h = date.getHours()
var minute = date.getMinutes()
var second = date.getSeconds()
return y + m + d + h + minute + second
},
// 获取告知消息,
information() {
let that = this
let data = {
productCodes: JSON.parse(localStorage.chooseProductCodes),
// productCodes: ['GFRS_M0001'],
platform: 'app',
type: '2'
}
information(data).then(res => {
// console.log(res)
if (res.result == '0') {
res.productImpartLstDTO.impartDTOS.map(item => {
item.impartItemDTOS.map(im => {
im.isSelect =
this.formatDateTime() +
Math.random()
.toString(36)
.substr(2)
im.impartAnswer = ''
if (im.questions) {
if (im.questions.length == '0') {
let obj = {
answer: ''
}
im.questions.push(obj)
}
}
if (this.noRisk == false && im.extra4 == 'noRisk') {
this.noRisk = true
}
})
})
// 展示被保险人项产品 noRis为true
if (this.noRisk) {
res.productImpartLstDTO.impartDTOS.map((item, index, array) => {
if (item.impartType == '0') {
array.splice(index, 1)
}
if (item.impartType == '2') {
array.splice(index, 1)
}
})
}
if (this.relationToAppnt == '1') {
// 展示被保险人项产品 noRis为true 保障型:去除投保人告知,其他不变
if (this.noRisk) {
res.productImpartLstDTO.impartDTOS.map((item, index, array) => {
if (item.impartType == '0') {
array.splice(index, 1)
}
if (item.impartType == '2') {
array.splice(index, 1)
}
})
} else {
// 展示被保险人项产品 noRis为false 保障型、意外型:去除被保人告知,其他不变
res.productImpartLstDTO.impartDTOS.map((item, index, array) => {
if (item.impartType == '1' || item.impartType == '5') {
array.splice(index, 1)
}
})
res.productImpartLstDTO.impartDTOS.map((item, index, array) => {
if (item.impartType == '3' || item.impartType == '7') {
array.splice(index, 1)
}
})
}
that.impartDTOS = res.productImpartLstDTO.impartDTOS
that.isShowList()
//投被同人时候判断
this.activeNames.push(res.productImpartLstDTO.impartDTOS.length)
} else {
that.impartDTOS = res.productImpartLstDTO.impartDTOS
that.isShowList()
//投被不同人时候判断
this.activeNames.push(res.productImpartLstDTO.impartDTOS.length)
}
}
})
},
/**
* @description: 签名
* @param {*}
* @return {*}
*/
signature() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/signConfirmation',
pullRefresh: '1',
backToFirst: '1'
},
routerInfo: {
path: '/insureAgain/signConfirmation'
}
})
},
// 下一步
nextStep() {
let that = this
that.$validator.validate().then(valid => {
if (valid) {
let obj = {}
let objInsured = {}
let financeImpartDTO = {}
let financeImpart = {}
// let arr = []
that.impartDTOS.map(item => {
// 投保人健康告知
if (item.impartType == '0' || item.impartType == '4' || item.impartType == '8') {
item.impartItemDTOS.map(i => {
delete i.isSelect
delete i.show
})
obj = item
return obj
} else if (item.impartType == '2' || item.impartType == '6' || item.impartType == '10') {
// 投保人财富
item.impartItemDTOS.map(i => {
delete i.isSelect
delete i.show
})
// console.log(item.impartType)
financeImpartDTO = item
return financeImpartDTO
} else if (item.impartType == '1' || item.impartType == '5' || item.impartType == '9') {
// 被保险人健康
item.impartItemDTOS.map(i => {
delete i.isSelect
delete i.show
// if (i.impartCode == '14a') {
// i.questions.map(items => {
// items.questionType = '4'
// })
// }
})
objInsured = item
return objInsured
} else if (item.impartType == '3' || item.impartType == '7' || item.impartType == '11') {
// 被保险人财富
item.impartItemDTOS.map(i => {
delete i.isSelect
delete i.show
})
financeImpart = item
return financeImpart
}
})
if (financeImpartDTO == {}) {
let data = {
orderType: 'IMPART_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo'),
productCode: JSON.parse(localStorage.mainRiskCodes)[0]
},
// 投保人
appntDTO: {
impartDTO: obj
},
// 被保险人
insuredDTOs: [{ impartDTO: objInsured, financeImpartDTO: financeImpart }]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
localStorage.removeItem('changeCard')
if (!this.$route.query.salePageFlag) {
//不是从导航栏进入
localStorage.salePageFlag = '6'
}
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/SignatureConfirmation'
},
routerInfo: {
path: '/insureAgain/SignatureConfirmation'
}
})
} else {
this.$toast(res.resultMessage)
}
})
} else if (financeImpart == {}) {
let data = {
orderType: 'IMPART_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo'),
productCode: JSON.parse(localStorage.mainRiskCodes)[0]
},
// 投保人
appntDTO: {
impartDTO: obj,
financeImpartDTO: financeImpartDTO
},
// 被保险人
insuredDTOs: [{ impartDTO: objInsured }]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
localStorage.removeItem('changeCard')
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/SignatureConfirmation'
},
routerInfo: {
path: '/insureAgain/SignatureConfirmation'
}
})
} else {
this.$toast(res.resultMessage)
}
})
} else {
let data = {
orderType: 'IMPART_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo'),
productCode: JSON.parse(localStorage.mainRiskCodes)[0]
},
// 投保人
appntDTO: {
impartDTO: obj,
financeImpartDTO: financeImpartDTO
},
// 被保险人
insuredDTOs: [{ impartDTO: objInsured, financeImpartDTO: financeImpart }]
}
}
saveInformation(data).then(res => {
if (res.result == '0') {
localStorage.removeItem('changeCard')
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/insureAgain/SignatureConfirmation'
},
routerInfo: {
path: '/insureAgain/SignatureConfirmation'
}
})
} else {
this.$toast(res.resultMessage)
}
})
}
} else {
this.$toast(this.$validator.errors.all()[0])
}
})
},
backToList() {
this.$jump({
flag: 'h5',
@@ -96,8 +711,12 @@ export default {
routerInfo: { path: `/insureAgain` }
})
},
nextStep() {}
}
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
}
}
</script>
@@ -115,8 +734,14 @@ export default {
font-size: 14px;
color: #ff0000;
}
.btns {
.sign-name{
display: flex;
flex-flow: row nowrap;
justify-content: flex-start;
align-items: center;
font-size: 15px;
}
.btns-tip{
width: 100vw;
display: flex;
position: fixed;
@@ -125,4 +750,13 @@ export default {
flex: 1;
}
}
.btns {
width: 100vw;
// display: flex;
// position: fixed;
// bottom: 0;
// /deep/ .van-button {
// flex: 1;
// }
}
</style>

View File

@@ -1,180 +0,0 @@
<template>
<div class="insure-again">
<ProgressBar :active.sync="active" />
<!-- 险种信息 -->
<p style="font-weight: bold;" class="bg-white p10 van-hairline--bottom">保险计划详情</p>
<InfoCell label="保险期间" value="asd" />
<InfoCell label="交费期间" />
<InfoCell label="交费频率" />
<DropdownBox :gutter="false">
<template #boxTitle>
<span style="font-weight: bold;">主险</span>
<span class="ml30">国富人寿附加住院医疗保险B款</span>
</template>
<InfoCell label="保险责任" />
<InfoCell label="保额(万元)" />
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
</InfoCell>
</DropdownBox>
<DropdownBox :gutter="false">
<template #boxTitle>
<van-checkbox v-model="remitRiskA" shape="square" checked-color="#ee0a24">
<span style="font-weight: bold;">附加险</span>
<span class="ml30">国富人寿附加住院医疗保险B款</span>
</van-checkbox>
</template>
<InfoCell label="保险责任" />
<InfoCell label="住院医疗保险金" />
<InfoCell label="住院津贴保险金" />
<InfoCell label="恶性肿瘤住院津贴保险金" />
<InfoCell label="免赔额" />
<InfoCell label="赔付比例" />
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
</InfoCell>
</DropdownBox>
<DropdownBox>
<template #boxTitle>
<span style="font-weight: bold;">附加险</span>
<span class="ml30">国富人寿附加综合意外伤害保险</span>
</template>
<InfoCell label="保险责任" />
<InfoCell label="意外身故/伤残保险金" />
<InfoCell label="轨道列车意外身故保险金/轨道列车意外伤残保险金" />
<InfoCell label="客运汽车意外身故保险金/客运汽车意外伤残保险金" />
<InfoCell label="免赔额" />
<InfoCell label="赔付比例" />
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
</InfoCell>
<template #footer>
<div style="text-align: center;" class="p10 bg-white">
<van-button size="small" round type="danger" @click="readSpecialPromise" :disabled="isRead">
{{ isRead ? '已阅读《特别约定》' : '点击这里阅读《特别约定》' }}
</van-button>
</div>
</template>
</DropdownBox>
<van-popup v-model="show" position="right" :style="style">
<ReadingAgreement :needTime="false">
<h3 class="p10">特别约定提示</h3>
<p class="p10">
尊敬的xxx先生/女士
投保国富人寿国富民惠医疗保险2020以有社保身份投保的保单理赔时若通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为80%免赔额为0元理赔时若未通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为60%免赔额为100元以无社保身份投保的保单理赔时若未通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为70%免赔额为100元理赔时若通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为90%免赔额为0元
</p>
<template #action>
<div class="btns">
<van-button type="danger" @click="backToList">不同意</van-button>
<van-button type="danger" @click="readAgreement">同意</van-button>
</div>
</template>
</ReadingAgreement>
</van-popup>
<van-button type="danger" class="bottom-btn" v-no-more-click="1000" @click="nextStep">下一步</van-button>
</div>
</template>
<script>
import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
import ReadingAgreement from '@/components/ebiz/insureAgain/ReadingAgreement'
import { Checkbox, RadioGroup, Radio, Dialog } from 'vant'
export default {
name: 'productInformation',
components: {
ProgressBar,
DropdownBox,
InfoCell,
ReadingAgreement,
[Checkbox.name]: Checkbox,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio
},
data() {
return {
radio: 1,
show: false,
remitRiskA: false,
style: { height: '100vh', width: '100vw' },
isRead: false,
active: 1
}
},
methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
if (this.show) {
this.show = false
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1'
})
}, 100)
} else {
this.backToList()
}
}
},
readSpecialPromise() {
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
this.show = true
window.appCallBack = this.appCallBack
},
backToList() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain`,
forbidSwipeBack: '1',
needRefresh: '1'
},
routerInfo: { path: `/insureAgain` }
})
},
readAgreement() {
this.show = false
this.isRead = true
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
},
nextStep() {
if (!this.isRead) {
Dialog.alert({
title: '提示',
message: '亲,请您阅读和确认特别约定哦~',
confirmButtonColor: '#ff0000'
})
} else {
}
}
}
}
</script>
<style lang="scss" scoped>
.btns {
display: flex;
/deep/ .van-button--danger {
flex: 1;
}
}
</style>

View File

@@ -1,90 +0,0 @@
<template>
<div class="insure-again">
<ProgressBar :active.sync="active" />
<van-cell-group class="mb10">
<van-cell title="销售人员工号" value="1450000562" />
<van-cell title="销售人员姓名" value="韦辉" />
<van-cell title="投保单号" value="823942423492392" />
<van-cell title="投保日期" value="2021-03-01" />
<van-cell title="保费合计" value="2,000.00" />
</van-cell-group>
<DropdownBox>
<template #boxTitle>
<span class="mr10">投保人</span>
<span>李磊</span>
</template>
<p style="font-size: 14px; color: #666666;" class="p15">以下内容需要您按照顺序并阅读确认</p>
<div class="files pl15">
<p class="mb5">需阅读</p>
<p class="file-name">
<span style="color: #0099ff;">国富人寿投保须知</span>
<StateRadio :result.sync="result" />
</p>
</div>
<div class="files pl15 pt10">
<p class="mb5">需阅读</p>
<p class="file-name">
<span style="color: #0099ff;">国富人寿投保须知</span>
<StateRadio :result.sync="result" />
</p>
</div>
<div class="files pl15 pt10 pb10">
<p class="mb5">需阅读</p>
<p class="file-name">
<span style="color: #0099ff;">国富人寿投保须知</span>
<StateRadio :result.sync="result" />
</p>
</div>
</DropdownBox>
<van-button type="danger" class="bottom-btn" v-no-more-click="1000" @click="nextStep">提交</van-button>
</div>
</template>
<script>
import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
import StateRadio from '@/components/ebiz/insureAgain/StateRadio'
export default {
name: 'signConfirmation',
components: {
ProgressBar,
DropdownBox,
InfoCell,
StateRadio
},
data() {
return {
result: 2,
active: 3
}
},
methods: {
nextStep() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain/payment`,
forbidSwipeBack: '1',
needRefresh: '1'
},
routerInfo: { path: `/insureAgain/payment` }
})
}
}
}
</script>
<style lang="scss" scoped>
.file-name {
display: flex;
align-items: center;
}
.files {
p {
font-size: 14px;
}
}
</style>

View File

@@ -2,56 +2,58 @@
<div>
<DropdownBox>
<template #boxTitle>
<span>投保人信息</span>
<span>保单信息</span>
</template>
<InfoCell label="保单号">{{ OrderInfoDTO.orderNo }}</InfoCell>
<InfoCell label="生效日期">{{ OrderInfoDTO.appntDateLabel }}</InfoCell>
<InfoCell label="保单状态">{{ OrderInfoDTO.orderStatus | orderStatusFilter }}</InfoCell>
<InfoCell label="签收状态">{{ OrderInfoDTO.orderNo }}</InfoCell>
<InfoCell label="保单号">{{OrderInfoDTO.contNo}}</InfoCell>
<InfoCell label="生效日期">{{OrderInfoDTO.cValiDate}}</InfoCell>
<InfoCell label="保单状态">{{OrderInfoDTO.contState | contStateFilter}}</InfoCell>
<InfoCell label="签收状态">{{OrderInfoDTO.orderStatus | orderStatusFilter}}</InfoCell>
</DropdownBox>
<DropdownBox>
<template #boxTitle>
<span>投保人信息</span>
</template>
<InfoCell label="投保人">{{ appntDTO.name }}</InfoCell>
<InfoCell label="性别">{{ appntDTO.sex }}</InfoCell>
<InfoCell label="证件类型">{{ appntDTO.idType }}</InfoCell>
<InfoCell label="证件号码">{{ appntDTO.idNo }}</InfoCell>
<InfoCell label="联系电话">{{ appntDTO.mobileStar }}</InfoCell>
<InfoCell label="投保人">{{appntDTO.name}}</InfoCell>
<InfoCell label="性别">{{appntDTO.sex}}</InfoCell>
<InfoCell label="证件类型">{{appntDTO.idType}}</InfoCell>
<InfoCell label="证件号码">{{appntDTO.idNo}}</InfoCell>
<InfoCell label="联系电话">{{appntDTO.mobileStar}}</InfoCell>
</DropdownBox>
<DropdownBox>
<template #boxTitle>
<span>被保险人信息</span>
</template>
<div v-for="(item, index) in insuredDTOs" :key="index" class="pb10">
<InfoCell label="姓名">{{ item.name }}</InfoCell>
<InfoCell label="性别">{{ item.sex }}</InfoCell>
<InfoCell label="证件类型">{{ item.idType }}</InfoCell>
<InfoCell label="证件号码">{{ item.idNo }}</InfoCell>
<InfoCell label="联系电话">{{ item.mobile }}</InfoCell>
<InfoCell label="姓名">{{item.name}}</InfoCell>
<InfoCell label="性别">{{item.sex}}</InfoCell>
<InfoCell label="证件类型">{{item.idType}}</InfoCell>
<InfoCell label="证件号码">{{item.idNo}}</InfoCell>
<InfoCell label="联系电话">{{item.mobile}}</InfoCell>
</div>
</DropdownBox>
<DropdownBox>
<template #boxTitle>
<span>受益人信息</span>
</template>
<div v-if="OrderInfoDTO.bnfFlag == '法定受益人'">
<InfoCell label="受益人">法定受益人</InfoCell>
</div>
<div v-else>
</template>
<div v-for="(item, index) in insuredDTOs" :key="index" class="pb10">
<div v-for="itm in item.bnfDTOs" :key="itm.name" class="pb10">
<InfoCell label="受益人">{{ OrderInfoDTO.bnfFlag }}</InfoCell>
<div v-if="item.bnfDTOs === '[]'">
<InfoCell label="受益人">法定受益人</InfoCell>
</div>
<div v-else>
<div v-for="itm in item.bnfDTOs" :key="itm.name" class="pb10">
<InfoCell label="受益人">{{OrderInfoDTO.bnfFlag}}</InfoCell>
<div v-if="OrderInfoDTO.bnfFlag == '指定受益人'">
<InfoCell label="姓名">{{ itm.name }}</InfoCell>
<InfoCell label="性别">{{ itm.sex }}</InfoCell>
<InfoCell label="受益比例" v-if="itm.bnfLot != null">{{ `${itm.bnfLot}%` }}</InfoCell>
<InfoCell label="证件类型">{{ itm.idType }}</InfoCell>
<InfoCell label="证件号码">{{ itm.idNo }}</InfoCell>
<InfoCell label="姓名">{{itm.name}}</InfoCell>
<InfoCell label="性别">{{itm.sex}}</InfoCell>
<InfoCell label="受益比例" v-if="itm.bnfLot != null">{{`${itm.bnfLot}%`}}</InfoCell>
<InfoCell label="证件类型">{{itm.idType}}</InfoCell>
<InfoCell label="证件号码">{{itm.idNo}}</InfoCell>
</div>
</div>
</div>
</div>
</div>
</DropdownBox>
<DropdownBox>
@@ -59,13 +61,14 @@
<span>险种类型</span>
</template>
<div v-for="it in list" :key="it.riskName" class="pb10">
<InfoCell label="险种名称">{{ it.riskName }}</InfoCell>
<InfoCell label="保险期间">{{ it.insuYear }}</InfoCell>
<InfoCell label="交费期间" v-if="it.payEndYear !== '1000'">{{ it.payEndYearFlag == 'Y' ? `${it.payEndYear}` : `${it.payEndYear}` }}</InfoCell>
<InfoCell label="险种名称">{{it.riskName}}</InfoCell>
<InfoCell label="保险期间">{{it.insuYear}}</InfoCell>
<InfoCell label="交费期间" v-if="it.payEndYear !== '1000'">{{it.payEndYearFlag == 'Y' ? `${it.payEndYear}` :
`${it.payEndYear}`}}</InfoCell>
<InfoCell label="交费期间" v-if="it.payEndYear === '1000'">一次性交清</InfoCell>
<InfoCell label="险种保额(元)" v-if="it.riskCode == 'GFRS_M0015' || it.riskCode == 'GFRS_M0017' || it.riskCode == 'GFRS_M0003'">--</InfoCell>
<InfoCell label="险种保额(元)" v-else>{{ it.amt | moneyFormat }}</InfoCell>
<InfoCell label="险种保费(元)">{{ it.riskName }}</InfoCell>
<InfoCell label="险种保额(元)" v-else>{{it.amt | moneyFormat}}</InfoCell>
<InfoCell label="险种保费(元)">{{it.riskName}}</InfoCell>
</div>
</DropdownBox>
</div>
@@ -76,9 +79,10 @@ import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import dataDictionary from '@/assets/js/utils/data-dictionary'
import { Collapse, CollapseItem, Cell, CellGroup, Button } from 'vant'
import { getDetail } from '@/api/ebiz/sale/sale'
import { getReAppntPolicy } from '@/api/ebiz/insureAgain/insureAgain'
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
import { getQuestionList } from '@/api/ebiz/questions'
// import { getQuestionList } from '@/api/ebiz/questions'
import CacheUtils from '@/assets/js/utils/cacheUtils'
export default {
components: {
DropdownBox,
@@ -99,254 +103,416 @@ export default {
},
filters: {
orderStatusFilter(val) {
for (let status of dataDictionary.policyState) {
for (let status of dataDictionary.orderStatus) {
if (status.id === val) {
return status.text
}
}
return ''
},
contStateFilter(val) {
for (let status of dataDictionary.contState) {
if (status.val === val) {
return status.text
}
}
return ''
},
reasonFilter(val) {
let reg = /'|;/g
return val.replace(reg, '')
}
},
created() {
this.getInsureAgainDetail()
let policyNo = CacheUtils.getLocItem('policyNo')
this.getReAppntPolicy(123)
},
methods: {
// 获取保单详情
async getInsureAgainDetail() {
async getReAppntPolicy(policyNo) {
let data = {
orderNo: '8186270000012069',
desensitizType: 0
policyNo: policyNo
}
let params = {
type: 3,
pageInfo: {
pageNum: 1,
pageSize: 10
// getReAppntPolicy(data).then(res => {
var res = `{
"orderDTO": {
"appntDTO": {
"area": "",
"averageAnnualIncome": 10,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"effectiveDateType": "false",
"email": "310598205@qq.com",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳马上",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司"
},
prtNo: '8186270000012069'
}
try {
let results = await Promise.all([getDetail(data), getQuestionList(params)])
// 保单详情响应数据
let res = results[0]
// // 问题件状态响应数据
let problemResult = results[1]
if (res.result == '0') {
if (res.orderDTO.orderInfoDTO.bnfFlag == '1') {
res.orderDTO.orderInfoDTO.bnfFlag = '指定受益人'
} else if (res.orderDTO.orderInfoDTO.bnfFlag == '0') {
res.orderDTO.orderInfoDTO.bnfFlag = '法定受益人'
}
this.OrderInfoDTO = res.orderDTO.orderInfoDTO
this.appntDTO = res.orderDTO.appntDTO
this.reason = res.orderDTO.reason
// 投保人信息
if (res.orderDTO.appntDTO.sex == '0') {
res.orderDTO.appntDTO.sex = '男'
} else if (res.orderDTO.appntDTO.sex == '1') {
res.orderDTO.appntDTO.sex = '女'
}
switch (res.orderDTO.appntDTO.idType) {
case '1':
res.orderDTO.appntDTO.idType = '居民身份证'
break
case '2':
res.orderDTO.appntDTO.idType = '户口本'
break
case '3':
res.orderDTO.appntDTO.idType = '出生证'
break
case '4':
res.orderDTO.appntDTO.idType = '外国人护照'
break
case '5':
res.orderDTO.appntDTO.idType = '港澳居民来往内地通行证'
break
case '6':
res.orderDTO.appntDTO.idType = '台湾居民来往大陆通行证'
break
// case '7':
// res.orderDTO.appntDTO.idType = '其他'
// break
case '8':
res.orderDTO.appntDTO.idType = '外国人永久居留身份证'
break
case '9':
res.orderDTO.appntDTO.idType = '港澳台居民居住证'
break
}
this.appntDTO = res.orderDTO.appntDTO
res.orderDTO.insuredDTOs.map(item => {
item.riskDTOLst.map(it => {
if (it.insuYearFlag == 'Y') {
it.insuYear = `${it.insuYear}`
} else {
if (it.insuYearFlag == 'A' && it.insuYear == '106') {
it.insuYear = '终身'
} else {
it.insuYear = `${it.insuYear}周岁的保单周年日`
}
}
Number(it.payIntv)
switch (it.payIntv) {
case 0:
it.payIntv = '一次性交清'
break
case 1:
it.payIntv = '月交'
break
case 12:
it.payIntv = '年交'
break
}
})
})
// 被保险人信息
res.orderDTO.insuredDTOs.map(item => {
if (item.sex == '0') {
item.sex = '男'
} else if (item.sex == '1') {
item.sex = '女'
} else {
item.sex = '不详'
"insuredDTOs": [
{
"area": "",
"averageAnnualIncome": 1000,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"companyArea": "",
"companyCity": "",
"effectiveDateType": "false",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳咳咳",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"province": "",
"relationToMainInsured": "5",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司",
"bnfDTOs": [
{
"area": "450103",
"birthday": "1980-01-02",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "110101198001020219",
"idType": "1",
"lifeGrade": "2",
"marriage": "2",
"mobile": "13707711024",
"name": "爱来",
"nativeplace": "1",
"occupationCode": "2070202",
"occupationName": "保险推销员",
"province": "450000",
"relationToInsured": "3",
"sex": "0",
"village": "百苑小区101号",
"yearSalary": "23"
},
{
"area": "450103",
"birthday": "1983-03-12",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "452624198303120727",
"idType": "1",
"lifeGrade": "1",
"marriage": "1",
"mobile": "13707711024",
"name": "艾琳马上来",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"province": "450000",
"relationToInsured": "4",
"sex": "1",
"village": "百苑小区101号",
"yearSalary": "32"
}
],
"impartDTO": {
"impartItemDTOS": [
{
"impartAnswer": "1",
"impartCode": "9",
"impartContent": "最近六个月内是否有下列身体不适症状?",
"IntroDuctions": ""
},
{
"impartAnswer": "1",
"impartCode": "12a",
"impartContent": "是否曾患有失明、视网膜出血或剥离、视神经炎、青光眼、白内障、眼底病变、视野缺失、屈光度1000度以上、聋哑、中耳炎、梅尼尔氏病或其他眼、耳、鼻、喉或口腔疾病",
"IntroDuctions": ""
}
]
},
"riskDTOLst": [
{
"riskName": "国富人寿国富民惠医疗保险2020版",
"insuYear": 1,
"insuYearFlag": "Y",
"payIntv": 12,
"payEndYear": 1000,
"payEndYearFlag": "Y",
"prem": 10000,
"riskCode": "1113202",
"isMainRisk": "0",
"amt": 22640,
"dutyLst": [
{
"dutyName":"国富民惠医疗保险金",
"dutyCode":"320300",
"amt":1000000,
"prem":536,
"getLimit":"0",
"getRate":"0"
},
{
"dutyName":"",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
}
]
}
]
}
switch (item.idType) {
],
"orderAccountDTO": {
"accountName": "艾琳马上",
"bankName": "BOCOM",
"cardBookCode": "4354256325325678790"
},
"orderInfoDTO": {
"contNo": "保单号",
"contState": "保单状态 1-承保;4-终止;0-投保中",
"cValiDate": "生效日期 String",
"orderStatus": "签收状态 0-未签收 1-已签收"
}
},
"result": "0"
}`;
res = JSON.parse(res);
if (res.result == '0') {
console.log(res, '11111111111111111111111aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
// if (res.orderDTO.orderInfoDTO.bnfFlag == '1') {
// res.orderDTO.orderInfoDTO.bnfFlag = '指定受益人'
// } else if (res.orderDTO.orderInfoDTO.bnfFlag == '0') {
// res.orderDTO.orderInfoDTO.bnfFlag = '法定受益人'
// }
this.OrderInfoDTO = res.orderDTO.orderInfoDTO
this.appntDTO = res.orderDTO.appntDTO
this.reason = res.orderDTO.reason
// 投保人信息
if (res.orderDTO.appntDTO.sex == '0') {
res.orderDTO.appntDTO.sex = '男'
} else if (res.orderDTO.appntDTO.sex == '1') {
res.orderDTO.appntDTO.sex = '女'
}
switch (res.orderDTO.appntDTO.idType) {
case '1':
item.idType = '居民身份证'
res.orderDTO.appntDTO.idType = '居民身份证'
break
case '2':
item.idType = '户口本'
res.orderDTO.appntDTO.idType = '户口本'
break
case '3':
item.idType = '出生证'
res.orderDTO.appntDTO.idType = '出生证'
break
case '4':
item.idType = '外国人护照'
res.orderDTO.appntDTO.idType = '外国人护照'
break
case '5':
item.idType = '港澳居民来往内地通行证'
res.orderDTO.appntDTO.idType = '港澳居民来往内地通行证'
break
case '6':
item.idType = '台湾居民来往大陆通行证'
res.orderDTO.appntDTO.idType = '台湾居民来往大陆通行证'
break
// case '7':
// item.idType = '其他'
// res.orderDTO.appntDTO.idType = '其他'
// break
case '8':
item.idType = '外国人永久居留身份证'
res.orderDTO.appntDTO.idType = '外国人永久居留身份证'
break
case '9':
item.idType = '港澳台居民居住证'
res.orderDTO.appntDTO.idType = '港澳台居民居住证'
break
}
switch (item.relationToAppnt) {
case '1':
item.relationToAppnt = '本人'
break
case '2':
item.relationToAppnt = '配偶'
break
case '3':
item.relationToAppnt = '父母'
break
case '4':
item.relationToAppnt = '子女'
break
case '5':
item.relationToAppnt = '其他'
break
}
if (res.orderDTO.orderInfoDTO.bnfFlag == '指定受益人') {
item.bnfDTOs.map(it => {
if (it.sex == '0') {
it.sex = '男'
} else if (it.sex == '1') {
it.sex = '女'
this.appntDTO = res.orderDTO.appntDTO
res.orderDTO.insuredDTOs.map(item => {
item.riskDTOLst.map(it => {
if (it.insuYearFlag == 'Y') {
it.insuYear = `${it.insuYear}`
} else {
it.sex = '不详'
if (it.insuYearFlag == 'A' && it.insuYear == '106') {
it.insuYear = '终身'
} else {
it.insuYear = `${it.insuYear}周岁的保单周年日`
}
}
switch (it.idType) {
case '1':
it.idType = '居民身份证'
Number(it.payIntv)
switch (it.payIntv) {
case 0:
it.payIntv = '一次性交清'
break
case '2':
it.idType = '户口本'
case 1:
it.payIntv = '月交'
break
case '3':
it.idType = '出生证'
break
case '4':
it.idType = '外国人护照'
break
case '5':
it.idType = '港澳居民来往内地通行证'
break
case '6':
it.idType = '台湾居民来往大陆通行证'
break
// case '7':
// it.idType = '其他'
// break
case '8':
it.idType = '外国人永久居留身份证'
break
case '9':
it.idType = '港澳台居民居住证'
break
}
switch (it.relationToInsured) {
case '1':
it.relationToInsured = '本人'
break
case '2':
it.relationToInsured = '配偶'
break
case '3':
it.relationToInsured = '父母'
break
case '4':
it.relationToInsured = '子女'
break
case '5':
it.relationToInsured = '其他'
case 12:
it.payIntv = '年交'
break
}
})
}
})
})
// 被保险人信息
res.orderDTO.insuredDTOs.map(item => {
if (item.sex == '0') {
item.sex = '男'
} else if (item.sex == '1') {
item.sex = '女'
} else {
item.sex = '不详'
}
switch (item.idType) {
case '1':
item.idType = '居民身份证'
break
case '2':
item.idType = '户口本'
break
case '3':
item.idType = '出生证'
break
case '4':
item.idType = '外国人护照'
break
case '5':
item.idType = '港澳居民来往内地通行证'
break
case '6':
item.idType = '台湾居民来往大陆通行证'
break
// case '7':
// item.idType = '其他'
// break
case '8':
item.idType = '外国人永久居留身份证'
break
case '9':
item.idType = '港澳台居民居住证'
break
}
switch (item.relationToAppnt) {
case '1':
item.relationToAppnt = '本人'
break
case '2':
item.relationToAppnt = '配偶'
break
case '3':
item.relationToAppnt = '父母'
break
case '4':
item.relationToAppnt = '子女'
break
case '5':
item.relationToAppnt = '其他'
break
}
// if (res.orderDTO.orderInfoDTO.bnfFlag == '指定受益人') {
// item.bnfDTOs.map(it => {
// if (it.sex == '0') {
// it.sex = '男'
// } else if (it.sex == '1') {
// it.sex = '女'
// } else {
// it.sex = '不详'
// }
// switch (it.idType) {
// case '1':
// it.idType = '居民身份证'
// break
// case '2':
// it.idType = '户口本'
// break
// case '3':
// it.idType = '出生证'
// break
// case '4':
// it.idType = '外国人护照'
// break
// case '5':
// it.idType = '港澳居民来往内地通行证'
// break
// case '6':
// it.idType = '台湾居民来往大陆通行证'
// break
// // case '7':
// // it.idType = '其他'
// // break
// case '8':
// it.idType = '外国人永久居留身份证'
// break
// case '9':
// it.idType = '港澳台居民居住证'
// break
// }
// switch (it.relationToInsured) {
// case '1':
// it.relationToInsured = '本人'
// break
// case '2':
// it.relationToInsured = '配偶'
// break
// case '3':
// it.relationToInsured = '父母'
// break
// case '4':
// it.relationToInsured = '子女'
// break
// case '5':
// it.relationToInsured = '其他'
// break
// }
// })
// }
})
this.insuredDTOs = res.orderDTO.insuredDTOs
// 格式化
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
} else {
this.$toast(res.resultMessage)
}
// 问题件状态显示
if (problemResult.result === '0') {
if (problemResult.content && problemResult.content.list) {
this.problemList.splice(0)
let lists = problemResult.content.list
for (let list of lists) {
let state = this.mapOrderState(list.status)
this.problemList.push({
comment: list.statusComment,
state
})
}
this.insuredDTOs = res.orderDTO.insuredDTOs
// 格式化
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
// } else {
this.$toast(res.resultMessage)
}
} else {
this.$toast(problemResult.resultMessage)
}
} catch (error) {
this.$toast('网络异常')
}
// })
}
}
}