mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 13:26:44 +08:00
银保代理人电子化合同签署 增加页面
This commit is contained in:
14
src/router/ebiz/YB_agentSign.js
Normal file
14
src/router/ebiz/YB_agentSign.js
Normal file
@@ -0,0 +1,14 @@
|
||||
//电子投保 定义相关组件
|
||||
const step1 = () => import('@/views/ebiz/YB_agentSign/step1')
|
||||
let riskName = localStorage.riskName
|
||||
export default [
|
||||
{
|
||||
path: '/YB_agentSign/step1',
|
||||
name: 'step1',
|
||||
component: step1,
|
||||
meta: {
|
||||
title: '银保代理人电子化合同签署',
|
||||
index: 1
|
||||
}
|
||||
},
|
||||
]
|
||||
115
src/views/ebiz/YB_agentSign/step1.vue
Normal file
115
src/views/ebiz/YB_agentSign/step1.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<div class="text-center" style="height: 100vh;background: #fff;">
|
||||
<div style="display: flex;align-items: center;justify-content: center;padding-top: 60px;">
|
||||
<img style="width: 40px;" src="@/assets/images/logo.png" />
|
||||
<span style="margin-left: 15px;">请您填写以下正确信息</span>
|
||||
</div>
|
||||
<div style="margin-top: 120px;">
|
||||
<van-cell-group>
|
||||
<van-field v-model="name" label="姓名" />
|
||||
<van-field v-model="idNo" label="身份证号" />
|
||||
</van-cell-group>
|
||||
</div>
|
||||
<van-button type="danger" class="bottom-btn" @click="nextStep" v-no-more-click="1000">确定</van-button>
|
||||
<van-dialog v-model="isCaptchaModalShow" title="请输入验证码" :before-close="onCaptchaConfirm">
|
||||
<div style="margin-top: 20px;margin-bottom: 20px;">
|
||||
<van-field v-model="mobile" label="手机号码" />
|
||||
<van-field v-model="code" type="number" :maxlength="6" center clearable label="短信验证码" placeholder="请输入短信验证码">
|
||||
<template #button>
|
||||
<van-button size="small" type="danger" :disabled="countDownNum !== 0" @click="getCaptcha">{{
|
||||
countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
|
||||
}}</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import {Field, CellGroup} from "vant";
|
||||
import { getAuthCode } from '@/api/ebiz/sale/sale'
|
||||
export default {
|
||||
name: 'YB_agentSign_step1',
|
||||
components: {
|
||||
[Field.name]: Field,
|
||||
[CellGroup.name]: CellGroup,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
name:'',
|
||||
idNo:'',
|
||||
isCaptchaModalShow:false,
|
||||
mobile:'15924432886',
|
||||
code:'',
|
||||
countDownNum: 0,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
nextStep(){
|
||||
if(!this.name){
|
||||
this.$toast('请填写姓名');
|
||||
return false
|
||||
}
|
||||
if(!this.idNo){
|
||||
this.$toast('请填写身份证号');
|
||||
return false
|
||||
}
|
||||
this.isCaptchaModalShow = true
|
||||
},
|
||||
async getCaptcha() {
|
||||
let data = {
|
||||
operateType: 'appntInfoEntry',
|
||||
type: 'H5',
|
||||
operateCode: this.mobile,
|
||||
system: 'agentApp',
|
||||
operateCodeType: '0'
|
||||
}
|
||||
// 获取验证码
|
||||
let res = await getAuthCode(data)
|
||||
if (res.result === '0') {
|
||||
this.$toast(res.resultMessage)
|
||||
this.sid = res.sessionId
|
||||
this.countDownNum = 60
|
||||
this.countDownTimer = setInterval(() => {
|
||||
this.countDownNum--
|
||||
if (this.countDownNum <= 0) {
|
||||
clearInterval(this.countDownTimer)
|
||||
this.countDownTimer = null
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
onCaptchaConfirm(){
|
||||
console.log('123')
|
||||
this.isCaptchaModalShow = false
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
countDownText(val) {
|
||||
if (isNaN(parseFloat(val))) {
|
||||
return val
|
||||
} else {
|
||||
return `${val} s`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .van-cell{
|
||||
padding: 18px 15px;
|
||||
}
|
||||
/deep/.van-dialog__confirm{
|
||||
color: #fff!important;
|
||||
background: #e9332e;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 20px;
|
||||
width: 80%;
|
||||
}
|
||||
</style>
|
||||
116
src/views/ebiz/YB_agentSign/step2.vue
Normal file
116
src/views/ebiz/YB_agentSign/step2.vue
Normal file
@@ -0,0 +1,116 @@
|
||||
<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 config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
time:'10',
|
||||
radio: '',
|
||||
number: '',
|
||||
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||
pdfUrl: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio,
|
||||
[Dialog.name]: Dialog,
|
||||
[NoticeBar.name]: NoticeBar
|
||||
},
|
||||
created(){
|
||||
this.timeOut()
|
||||
},
|
||||
mounted() {
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
},
|
||||
methods: {
|
||||
// 点击阅读时
|
||||
click() {
|
||||
let that = this
|
||||
if (that.isOver == false) {
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '该内容涉及您的重大权益,请您仔细阅读',
|
||||
showCancelButton: false
|
||||
}).then(() => {
|
||||
that.radio = ''
|
||||
})
|
||||
}
|
||||
},
|
||||
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)
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
|
||||
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>
|
||||
702
src/views/ebiz/YB_agentSign/step3.vue
Normal file
702
src/views/ebiz/YB_agentSign/step3.vue
Normal file
@@ -0,0 +1,702 @@
|
||||
<template>
|
||||
<div class="sale-list-container pb50 text-center" v-if="isCheck == 1">
|
||||
<p class="f10 gray mt60">您暂无使用权限!</p>
|
||||
<p class="f10 gray mt5">如有问题咨询,请联系个险业务部。</p>
|
||||
</div>
|
||||
<div class="sale-list-container pb50" v-else-if="isCheck == 0">
|
||||
<van-search placeholder="请输入投保人姓名" v-model="searchName" @change="searchList" @keyup.enter="searchList" />
|
||||
<van-sticky>
|
||||
<van-tabs :line-width="45" v-model="active" @change="tabChange" sticky>
|
||||
<van-tab name="uncommit" title="未提交"></van-tab>
|
||||
<van-tab name="commit" title="已提交"></van-tab>
|
||||
<van-tab name="waitUnderwritten" title="待承保"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:immediate-check="false"
|
||||
:finished="finished"
|
||||
:finished-text="finishedText"
|
||||
error-text="请求失败,点击重新加载"
|
||||
:error.sync="error"
|
||||
@load="loadMore"
|
||||
class="pb45"
|
||||
>
|
||||
<div v-if="isSuccess">
|
||||
<div v-if="saleList.length > 0">
|
||||
<div v-for="(order, index) in saleList" :key="index">
|
||||
<div class="fs12 mt20 mb5 text-center">{{ order.orderInfoDTO.createDate }}</div>
|
||||
<div class="bg-white m15 pv15 pr15 pl10">
|
||||
<div class="flex justify-content-s align-items-c">
|
||||
<div>
|
||||
<div class="w45 inline-b">
|
||||
<van-tag plain color="#5CA7DE">投保</van-tag>
|
||||
</div>
|
||||
<span class="fs15 c-gray-dark">{{ order.appntDTO.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-for="(insured, insuredIndex) in order.insuredDTOs" :key="insuredIndex">
|
||||
<div class="mv15">
|
||||
<div class="w45 inline-b">
|
||||
<van-tag plain color="#DD9C56">被保</van-tag>
|
||||
</div>
|
||||
<span class="fs15 c-gray-dark">{{ insured.name }}</span>
|
||||
</div>
|
||||
<div v-for="(main, mainIndex) in insured.mainRisk" :key="mainIndex">
|
||||
<div class="mv10">
|
||||
<span class="w45 inline-b">
|
||||
<van-tag plain type="danger">主险</van-tag>
|
||||
</span>
|
||||
<span class="fs15 c-gray-dark">{{ main.riskName }}</span>
|
||||
</div>
|
||||
<div class="mv10 pl45 flex" v-for="(addtional, addtionIndex) in main.addtion" :key="addtionIndex">
|
||||
<span class="mr10" style="flex-shrink: 0">
|
||||
<van-tag mark color="#DDF2EF" text-color="#E9332E">附加</van-tag>
|
||||
</span>
|
||||
<span class="fs13">{{ addtional.riskName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex fs15 justify-content-s mt15 mb15">
|
||||
<span class="c-gray-darker fwb">首期总保费(元)</span>
|
||||
<span class="yellow fwb">{{ order.firstPrem == 0 ? '0.00' : order.firstPrem | moneyFormat }}</span>
|
||||
</div>
|
||||
<div class="pt15" v-if="active == 'commit' || active == 'waitUnderwritten'" style="border-top:1px solid #dadada">
|
||||
<div>
|
||||
<div class="w80 inline-b">
|
||||
<van-tag plain color="#999999">投保单号</van-tag>
|
||||
</div>
|
||||
<span class="fs14 c-gray-dark">{{ order.orderInfoDTO.orderNo }}</span>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="w80 inline-b">
|
||||
<van-tag plain color="#999999">状态</van-tag>
|
||||
</div>
|
||||
<span class="fs14 c-gray-dark">{{ order.stateName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!!order.orderInfoDTO.doubleFlag && order.orderInfoDTO.doubleFlag == '0'" class="fs12 mt15">
|
||||
温馨提示:本投保单满足双录条件,需要双录质检通过后才能承保。
|
||||
</div>
|
||||
|
||||
<div class="text-right mt15 ">
|
||||
<van-button v-if="active == 'uncommit'" round @click="goDetail(order)" size="small" class="mr5" type="danger" v-no-more-click="1000"
|
||||
>编辑</van-button
|
||||
>
|
||||
<van-button
|
||||
v-if="active == 'uncommit'"
|
||||
plain
|
||||
round
|
||||
@click.stop="del(order, index)"
|
||||
size="small"
|
||||
class="mr5"
|
||||
type="danger"
|
||||
v-no-more-click="1000"
|
||||
>删除</van-button
|
||||
>
|
||||
<van-button
|
||||
@click="againPay(order)"
|
||||
v-if="active == 'commit' && order.orderInfoDTO.orderStatus == '19'"
|
||||
size="small"
|
||||
class="mr5"
|
||||
type="danger"
|
||||
round
|
||||
>重新支付</van-button
|
||||
>
|
||||
<van-button
|
||||
@click="changeCard(order)"
|
||||
v-if="(active == 'commit' && order.orderInfoDTO.orderStatus == '48') || (active == 'commit' && order.orderInfoDTO.orderStatus == '49')"
|
||||
size="small"
|
||||
class="mr5"
|
||||
type="danger"
|
||||
round
|
||||
>修改卡号</van-button
|
||||
>
|
||||
<template v-if="active == 'commit' && order.orderInfoDTO.orderStatus == '55'">
|
||||
<van-button @click="changeCard(order)" size="small" class="mr5" type="danger" round>修改卡号</van-button>
|
||||
<van-button @click="againPay(order)" size="small" class="mr5" type="danger" round>重新支付</van-button>
|
||||
</template>
|
||||
<template v-if="active == 'commit' && (order.orderInfoDTO.orderStatus == '02' || order.orderInfoDTO.orderStatus == '58')">
|
||||
<van-button @click="goPay(order)" size="small" class="mr5" type="danger" round>去支付</van-button>
|
||||
</template>
|
||||
<!-- doubleFlag 1-否 0-是,doubleFlag为0双录时,canRevokeDouble加 orderStatus 16 -->
|
||||
<van-button
|
||||
@click="revokeOrder(order)"
|
||||
v-if="active == 'commit' && ((canRevoke[order.orderInfoDTO.orderStatus] && (order.orderInfoDTO.doubleFlag == '1' || order.orderInfoDTO.doubleFlag == null || order.orderInfoDTO.doubleFlag == ''))
|
||||
|| (canRevokeDouble[order.orderInfoDTO.orderStatus] && order.orderInfoDTO.doubleFlag == '0'))"
|
||||
size="small"
|
||||
class="mr5"
|
||||
type="danger"
|
||||
round
|
||||
>撤单</van-button
|
||||
>
|
||||
<van-button @click="seePolicy(order)" v-if="active == 'commit'" size="small" type="danger" round>查看投保单</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="text-center">
|
||||
<img class="mt40" src="@/assets/images/pic_page-non.png" />
|
||||
<div class="fs17 mt40">暂无订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-button type="danger" class="bottom-btn" @click="add" v-no-more-click="1000">点我新增</van-button>
|
||||
<van-dialog
|
||||
class="dialog-delete"
|
||||
@confirm="checkCaptchaCode"
|
||||
@cancel="cancelCaptchaCode"
|
||||
:before-close="beforeClose"
|
||||
confirm-button-color="#fff"
|
||||
v-model="revokePanelShow"
|
||||
title="短信验证"
|
||||
show-cancel-button
|
||||
>
|
||||
<p class="captchaReceiver">投保人手机号: {{ captchaReceiver | phoneNumFilter }}</p>
|
||||
<van-field v-model="sms" center clearable placeholder="请输入短信验证码">
|
||||
<template #button>
|
||||
<van-button :disabled="sendTime !== 0" v-no-more-click="1000" @click="getCaptchaCode" size="small" type="danger">{{
|
||||
sendTime ? `${sendTime}s后获取` : '获取验证码'
|
||||
}}</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-dialog>
|
||||
|
||||
<!-- 短信验证 -->
|
||||
<check-agent @checModelSuccessMethod="initThisPage" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Search, Tabs, Tab, List, Tag, Sticky, Toast, Dialog, Field } from 'vant'
|
||||
import { orderList, deleteOrderInfo, getAuthCode, revokeOrder } from '@/api/ebiz/sale/sale'
|
||||
import { funcPermCheck } from '@/api/ebiz/common/common'
|
||||
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级
|
||||
import CheckAgent from '@/components/common/CheckAgent'
|
||||
|
||||
export default {
|
||||
name: 'saleList',
|
||||
components: {
|
||||
[CheckAgent.name]: CheckAgent,
|
||||
[Field.name]: Field,
|
||||
[Search.name]: Search,
|
||||
[Tabs.name]: Tabs,
|
||||
[Tab.name]: Tab,
|
||||
[List.name]: List,
|
||||
[Tag.name]: Tag,
|
||||
[Sticky.name]: Sticky,
|
||||
[Dialog.name]: Dialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isCheck: 0, //查看是否有权限
|
||||
showFlag: true,
|
||||
searchName: '',
|
||||
active: 'uncommit', //uncommit 表示未提交 commit表示已提交
|
||||
saleList: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
total: '', //总页数
|
||||
currentPage: 1, //当前页数
|
||||
error: false,
|
||||
finishedText: '没有更多了',
|
||||
pageSize: 5, //每页数据条数
|
||||
isSuccess: false,
|
||||
canRevoke: {
|
||||
'19': true,
|
||||
'02': true,
|
||||
'48': true,
|
||||
'49': true,
|
||||
'55': true,
|
||||
'58': true,
|
||||
'46': true,
|
||||
'50': true,
|
||||
'51': true
|
||||
},
|
||||
canRevokeDouble: {
|
||||
'19': true,
|
||||
'02': true,
|
||||
'48': true,
|
||||
'49': true,
|
||||
'55': true,
|
||||
'58': true,
|
||||
'46': true,
|
||||
'50': true,
|
||||
'51': true,
|
||||
'16': true,
|
||||
},
|
||||
revokePanelShow: false,
|
||||
sms: '',
|
||||
smsId: '',
|
||||
sendTime: 0,
|
||||
getCaptcha: false,
|
||||
captchaTimer: null,
|
||||
captchaReceiver: '',
|
||||
revokeOrderNo: '',
|
||||
captchaMaped: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
}, 100)
|
||||
window.appCallBack = this.appCallBack
|
||||
funcPermCheck({}).then(res => {
|
||||
this.isCheck = res.result
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
beforeClose(action, done) {
|
||||
this.captchaMaped ? done() : done(false)
|
||||
},
|
||||
async getCaptchaCode() {
|
||||
if (this.sendTime !== 0) return
|
||||
this.getCaptcha = true
|
||||
this.sendTime = 60
|
||||
let data = {
|
||||
operateType: 'appntInfoEntry',
|
||||
type: 'H5',
|
||||
operateCode: this.captchaReceiver,
|
||||
system: 'agentApp',
|
||||
operateCodeType: '0'
|
||||
}
|
||||
let res = await getAuthCode(data)
|
||||
if (res.result === '0') {
|
||||
this.$toast('获取验证码成功')
|
||||
}
|
||||
this.smsId = res.sessionId
|
||||
this.captchaTimer = setInterval(() => {
|
||||
this.sendTime--
|
||||
if (this.sendTime === 0) {
|
||||
clearInterval(this.captchaTimer)
|
||||
this.captchaTimer = null
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
async checkCaptchaCode() {
|
||||
if (!this.getCaptcha) {
|
||||
return this.$toast('请先获取验证码')
|
||||
}
|
||||
if (!this.sms.trim()) {
|
||||
return this.$toast('请输入验证码')
|
||||
}
|
||||
clearInterval(this.captchaTimer)
|
||||
this.captchaTimer = null
|
||||
let revokeResult = await revokeOrder({
|
||||
id: this.revokeOrderNo,
|
||||
smsId: this.smsId,
|
||||
code: this.sms
|
||||
})
|
||||
if (revokeResult.result == 0) {
|
||||
this.$toast('撤单成功!')
|
||||
setTimeout(() => {
|
||||
this.saleList = []
|
||||
this.isSuccess = false
|
||||
this.currentPage = 1
|
||||
;[this.loading, this.finished] = [true, false]
|
||||
let pageInfo = {
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
orderType: this.active
|
||||
}
|
||||
this.loadMore(pageInfo)
|
||||
}, 1000)
|
||||
} else {
|
||||
Toast.fail(revokeResult.resultMessage)
|
||||
}
|
||||
this.cancelCaptchaCode()
|
||||
this.sms = ''
|
||||
},
|
||||
cancelCaptchaCode() {
|
||||
this.sendTime = 0
|
||||
this.revokePanelShow = false
|
||||
clearInterval(this.captchaTimer)
|
||||
this.captchaTimer = null
|
||||
this.getCaptcha = false
|
||||
this.captchaMaped = false
|
||||
this.captchaReceiver = ''
|
||||
},
|
||||
initThisPage(showFlag) {
|
||||
this.showFlag = showFlag
|
||||
if (this.showFlag) {
|
||||
return
|
||||
}
|
||||
this.loadMore()
|
||||
},
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'left_button_click') {
|
||||
this.$jump({
|
||||
flag: 'home'
|
||||
})
|
||||
}
|
||||
},
|
||||
//分页用
|
||||
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)
|
||||
},
|
||||
//再次支付
|
||||
againPay(order) {
|
||||
localStorage.orderNo = order.orderInfoDTO.orderNo
|
||||
// 再次支付 salelist为 0
|
||||
localStorage.salelist = '0'
|
||||
localStorage.removeItem('changeCard')
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/payMent?orderNo=' + order.orderInfoDTO.orderNo
|
||||
},
|
||||
routerInfo: { path: '/sale/payMent?orderNo=' + order.orderInfoDTO.orderNo }
|
||||
})
|
||||
},
|
||||
//支付失败去换卡
|
||||
changeCard(order) {
|
||||
let url = ''
|
||||
let orderStatus = order.orderInfoDTO.orderStatus
|
||||
localStorage.orderNo = order.orderInfoDTO.orderNo
|
||||
if (order.insuredDTOs[0].riskDTOLst[0]) {
|
||||
localStorage.setItem('productCode', order.insuredDTOs[0].riskDTOLst[0].mainRiskCode)
|
||||
}
|
||||
localStorage.setItem('changeCard', true)
|
||||
switch (orderStatus) {
|
||||
case '55': //账户信息页
|
||||
url = '/sale/AccountInformation?orderNo=' + order.orderInfoDTO.orderNo
|
||||
break
|
||||
case '48': //账户信息填写成功,跳到影像上传页
|
||||
url = '/sale/AttachmentManagement?orderNo=' + order.orderInfoDTO.orderNo
|
||||
break
|
||||
case '49': //影像上传页填写成功,跳到银行卡号确认页
|
||||
url = '/sale/SignatureConfirmation?orderNo=' + order.orderInfoDTO.orderNo
|
||||
break
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#${url}`
|
||||
},
|
||||
routerInfo: { path: url }
|
||||
})
|
||||
},
|
||||
//去支付
|
||||
goPay(order) {
|
||||
localStorage.orderNo = order.orderInfoDTO.orderNo
|
||||
localStorage.setItem('AppntidType', order.appntDTO.idType)
|
||||
localStorage.salelist = '1'
|
||||
localStorage.removeItem('changeCard')
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/payMent?orderNo=' + order.orderInfoDTO.orderNo
|
||||
},
|
||||
routerInfo: { path: '/sale/payMent?orderNo=' + order.orderInfoDTO.orderNo }
|
||||
})
|
||||
},
|
||||
//查看保单
|
||||
seePolicy(order) {
|
||||
localStorage.orderNo = order.orderInfoDTO.orderNo
|
||||
localStorage.removeItem('changeCard')
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/detail?type=1&orderNo=' + order.orderInfoDTO.orderNo
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/detail?orderNo=' + order.orderInfoDTO.orderNo,
|
||||
query: {
|
||||
type: 1
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//初始化保单列表
|
||||
getOrderList(pageInfo) {
|
||||
orderList(pageInfo).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.isSuccess = true
|
||||
this.currentPage++
|
||||
if (res.orderDTOPageInfo == null || res.orderDTOPageInfo == '' || res.orderDTOPageInfo == undefined) {
|
||||
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.saleList = this.saleList.concat(list)
|
||||
if (this.saleList.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
|
||||
}
|
||||
})
|
||||
},
|
||||
tabChange(name) {
|
||||
this.currentPage = 1
|
||||
this.active = name
|
||||
this.saleList = []
|
||||
;[this.loading, this.finished] = [true, false]
|
||||
this.finishedText = '正在加载...'
|
||||
this.loadMore()
|
||||
},
|
||||
searchList() {
|
||||
this.currentPage = 1
|
||||
this.saleList = []
|
||||
;[this.loading, this.finished] = [true, false]
|
||||
this.finishedText = '正在加载...'
|
||||
this.loadMore()
|
||||
},
|
||||
//投保单详情
|
||||
goDetail(order) {
|
||||
let thisToken = this.$CacheUtils.getLocItem('token')
|
||||
window.localStorage.clear()
|
||||
this.$CacheUtils.setLocItem('token', thisToken)
|
||||
window.localStorage.setItem('detailJump', '')
|
||||
if (order.insuredDTOs[0]) {
|
||||
if (order.insuredDTOs[0].riskDTOLst[0]) {
|
||||
localStorage.setItem('productCode', order.insuredDTOs[0].riskDTOLst[0].mainRiskCode)
|
||||
}
|
||||
}
|
||||
let orderStatus = order.orderInfoDTO.orderStatus
|
||||
let orderNo = order.orderInfoDTO.orderNo
|
||||
let url = ''
|
||||
//保存对应的订单号
|
||||
localStorage.orderNo = orderNo
|
||||
localStorage.isFrom = 'sale'
|
||||
localStorage.removeItem('changeCard')
|
||||
if(orderStatus == '01'){ //已签名待客户确认, 跳到签名确认页面
|
||||
url = '/sale/SignatureConfirmation?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '43'){//未签名待客户确认, 跳到签名确认页面
|
||||
url = '/sale/SignatureConfirmation?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '35'){//投保人保存成功, 跳到被保险人页面
|
||||
url = '/sale/insuredPerson?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '36'){//被保险人保存成功, 跳到已选产品列表
|
||||
url = '/common/selectedProduct?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '37'){//受益人保存成功, 跳到告知信息--
|
||||
url = '/sale/NotifyingMessage?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '38'){ //账户信息保存成功, 跳到附件管理--
|
||||
url = '/sale/AttachmentManagement?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '39'){ //险种信息保存成功, 跳到已选产品列表
|
||||
url = '/common/selectedProduct?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '40'){//告知信息保存成功, 跳到风险测评--
|
||||
if( order.riskEvaluationDTO.isShowEvaluationPoint != '1'){
|
||||
if(order.universalRiskNotifyDTO && order.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint == '1'){
|
||||
url = '/sale/universalRiskNotifyingMessage?edit=1&orderNo='+orderNo
|
||||
}else{
|
||||
url = '/sale/AccountInformation?edit=1&orderNo='+orderNo
|
||||
}
|
||||
}else {
|
||||
url = '/sale/answerPage?edit=1&orderNo='+orderNo
|
||||
}
|
||||
}else if(orderStatus == ''){//跳到投保人
|
||||
url = '/sale/insuredInfo?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '44'){//建议书转投保, 跳到投保人
|
||||
url = '/sale/insuredInfo?edit=1&orderNo='+orderNo
|
||||
}else if(orderStatus == '62'){//风险测评保存成功, 跳到账户信息--
|
||||
if(order.universalRiskNotifyDTO && order.universalRiskNotifyDTO.isUniversalRiskNotifyShowPoint != '1'){
|
||||
url = '/sale/AccountInformation?edit=1&orderNo='+orderNo
|
||||
}else{
|
||||
url = '/sale/universalRiskNotifyingMessage?edit=1&orderNo='+orderNo
|
||||
}
|
||||
}else if(orderStatus == '63'){//风险测评保存成功, 跳到账户信息--
|
||||
url = '/sale/AccountInformation?edit=1&orderNo='+orderNo
|
||||
}
|
||||
// switch (orderStatus) {
|
||||
// case '01': //已签名待客户确认, 跳到签名确认页面
|
||||
// url = '/sale/SignatureConfirmation?edit=1'
|
||||
// break
|
||||
// case '43': //未签名待客户确认, 跳到签名确认页面
|
||||
// url = '/sale/SignatureConfirmation?edit=1'
|
||||
// break
|
||||
// case '35': //投保人保存成功, 跳到被保险人页面--
|
||||
// url = '/sale/insuredPerson?edit=1'
|
||||
// break
|
||||
// case '36': //被保险人保存成功, 跳到已选产品列表
|
||||
// url = '/common/selectedProduct?edit=1'
|
||||
// break
|
||||
// case '37': //受益人保存成功, 跳到告知信息--
|
||||
// url = '/sale/NotifyingMessage?edit=1'
|
||||
// break
|
||||
// case '38': //账户信息保存成功, 跳到附件管理--
|
||||
// url = '/sale/AttachmentManagement?edit=1'
|
||||
// break
|
||||
// case '39': //险种信息保存成功, 跳到已选产品列表
|
||||
// url = '/common/selectedProduct?edit=1'
|
||||
// break
|
||||
// case '40': //告知信息保存成功, 跳到风险测评--
|
||||
// url = '/sale/answerPage?edit=1'
|
||||
// break
|
||||
// case '': //跳到投保人
|
||||
// url = '/sale/insuredInfo?edit=1'
|
||||
// break
|
||||
// case '44': //建议书转投保, 跳到投保人
|
||||
// url = '/sale/insuredInfo?edit=1'
|
||||
// break
|
||||
// case '62': //风险测评保存成功, 跳到账户信息--
|
||||
// // url = '/sale/AccountInformation?edit=1'
|
||||
// url = '/sale/answerSuccess?edit=1'
|
||||
// break
|
||||
// default:
|
||||
// break
|
||||
// }
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
forbidSwipeBack: '1',
|
||||
url: location.origin + `/#${url}`
|
||||
},
|
||||
routerInfo: { path: url }
|
||||
})
|
||||
},
|
||||
//删除投保单
|
||||
del(order) {
|
||||
let params = {
|
||||
orderType: 'DEL_ORDER', //列表页 此值为固定
|
||||
id: order.orderInfoDTO.orderNo,
|
||||
orderDTO: {
|
||||
orderInfo: {
|
||||
orderNo: order.orderNo
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$dialog
|
||||
.confirm({
|
||||
className: 'dialog-delete',
|
||||
title: '提示',
|
||||
message: '确认删除投保单吗?',
|
||||
cancelButtonColor: '#E9332E',
|
||||
confirmButtonColor: '#FFFFFF'
|
||||
})
|
||||
.then(() => {
|
||||
deleteOrderInfo(params).then(res => {
|
||||
if (res.result == 0) {
|
||||
this.saleList = []
|
||||
this.isSuccess = false
|
||||
this.currentPage = 1
|
||||
;[this.loading, this.finished] = [true, false]
|
||||
let pageInfo = {
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
orderType: this.active
|
||||
}
|
||||
this.loadMore(pageInfo)
|
||||
} else {
|
||||
Toast.fail(res.resultMessage)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
//新增
|
||||
add() {
|
||||
let thisToken = this.$CacheUtils.getLocItem('token')
|
||||
window.localStorage.clear()
|
||||
this.$CacheUtils.setLocItem('token', thisToken)
|
||||
localStorage.orderNo = ''
|
||||
localStorage.chooseProductCodes = '' //置空所选险种
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/insuredInfo'
|
||||
},
|
||||
routerInfo: { path: '/sale/insuredInfo' }
|
||||
})
|
||||
},
|
||||
revokeOrder(order) {
|
||||
console.dir(order)
|
||||
this.$dialog
|
||||
.confirm({
|
||||
className: 'dialog-delete',
|
||||
title: '提示',
|
||||
message: '撤单后,数据将不可恢复,您确定要撤单吗?',
|
||||
cancelButtonColor: '#E9332E',
|
||||
confirmButtonColor: '#FFFFFF'
|
||||
})
|
||||
.then(() => {
|
||||
this.revokePanelShow = true
|
||||
this.captchaReceiver = order.appntDTO.mobile
|
||||
this.revokeOrderNo = order.orderInfoDTO.orderNo
|
||||
})
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
encryCheckModelMobile(code) {
|
||||
return code.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||||
},
|
||||
phoneNumFilter(phoneNum) {
|
||||
let num = phoneNum.split('')
|
||||
num.splice(3, 4, '****')
|
||||
return num.join('')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .dialog-delete .van-dialog__header {
|
||||
padding: 0.5em;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
/deep/ .van-cell {
|
||||
padding: 0;
|
||||
padding-bottom: 0.5em;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
/deep/ .van-dialog__content {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.captchaReceiver {
|
||||
margin-bottom: 1em;
|
||||
padding-bottom: 1em;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-search__content {
|
||||
background: #fff !important;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.van-search {
|
||||
background: none !important;
|
||||
}
|
||||
</style>
|
||||
@@ -13,9 +13,9 @@
|
||||
<van-tag type="primary" v-if="item.isMainRisk == 0" class="mr5 green" plain>主险</van-tag>
|
||||
<van-tag type="primary" v-else class="mr5 green" plain>附加险</van-tag>
|
||||
<span class="ml5 center fs13 flex1">{{ item.riskName }}</span>
|
||||
<van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk && isEnterAddtionRisk" plain @click="selectAddtionRisk" class="green mr8">
|
||||
附
|
||||
</van-tag>
|
||||
<van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk && isEnterAddtionRisk" plain @click="selectAddtionRisk" class="green mr8"
|
||||
>附</van-tag
|
||||
>
|
||||
<van-icon name="search" size="20" v-if="item.documentDTOS && item.documentDTOS.length > 0" @click="seeDocument(index)" class="green mr5" />
|
||||
<van-icon name="delete" size="22" @click="deleteRisk(index,item)" class="green" />
|
||||
</div>
|
||||
@@ -135,10 +135,10 @@
|
||||
:max="dutyItem.maxDutyAmt"
|
||||
:show-plus="false"
|
||||
:show-minus="false"
|
||||
:disabled="item.productCode == 'GFRS_A0012' || (item.productCode == 'GFRS_M0077' && !dutyItem.necess) || (item.productCode == 'GFRS_M0077' && dutyItem.duty == '311507')"
|
||||
:disabled="item.productCode == 'GFRS_A0012'"
|
||||
class="ml10 mr10"
|
||||
@focus="focusStep"
|
||||
@blur="blurStep(dutyItem, index,item.productCode)"
|
||||
@blur="blurStep(dutyItem, index)"
|
||||
@change="
|
||||
dutyStepperChange(
|
||||
item.calFactorLst[riskFactorIndex].rules[dutyItemIndex].defaultDutyAmt,
|
||||
@@ -353,31 +353,21 @@
|
||||
<van-dialog v-model="trialResultsShow" title="核保试算结果" :show-cancel-button="false">
|
||||
<div class="pl40 pr40 mt10">
|
||||
<div class="flex justify-content-s fs12" v-for="(item, index) in verifyResultList" :key="index">
|
||||
<div>
|
||||
<img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/ruleType0'+ item.ruleType +'.png')" alt="">
|
||||
<span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<!-- <span class="v-middle">{{item.status | approvedFilter}}</span>-->
|
||||
<img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/approved'+ item.status +'.png')" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:25px 0px 10px 10px;font-size: 10px;color: #999;">
|
||||
<p style="line-height: 20px;"><span style="width: 40px;display: inline-block;">说明:</span>绿色✔表示 未触发规则、红色×表示 触发规则</p>
|
||||
<div><img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/ruleType0'+ item.ruleType +'.png')" alt=""><span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span></div>
|
||||
<div><span class="v-middle">{{item.status | approvedFilter}}</span><img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/approved'+ item.status +'.png')" alt=""></div>
|
||||
</div>
|
||||
</div>
|
||||
</van-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field, Checkbox, RadioGroup, Radio } from 'vant'
|
||||
import { trial } from '@/api/ebiz/common/common'
|
||||
import { saveOrUpdateOrderInfo, getOrderDetail,orderTrial } from '@/api/ebiz/sale/sale'
|
||||
import { saveProposal, getTrialRecordInfo, saveOrUpdateTrialRecordInfo } from '@/api/ebiz/proposal/proposal.js'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||
import occupationList from '@/components/ebiz/occipation/data/occupation'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
import riskRules from "./risk-rules";
|
||||
import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field, Checkbox, RadioGroup, Radio } from 'vant'
|
||||
import { trial } from '@/api/ebiz/common/common'
|
||||
import { saveOrUpdateOrderInfo, getOrderDetail,orderTrial } from '@/api/ebiz/sale/sale'
|
||||
import { saveProposal, getTrialRecordInfo, saveOrUpdateTrialRecordInfo } from '@/api/ebiz/proposal/proposal.js'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||
import occupationList from '@/components/ebiz/occipation/data/occupation'
|
||||
import riskRules from "./risk-rules";
|
||||
|
||||
//险种GFRS_M0016的责任的验证规则
|
||||
//默认 最低基本保险金额min 10000 整数倍要求mutiple 1000
|
||||
@@ -485,7 +475,7 @@
|
||||
const DUTY_DEFAULT_MUTIPLE = 1000
|
||||
const DUTY_DEFAULT_MIN = 10000
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'calculatePremium',
|
||||
filters: {
|
||||
ruleTypeFilter(val) {
|
||||
@@ -665,9 +655,6 @@
|
||||
if (this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) {
|
||||
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||
this.saleInsuredPersonInfo.insuredAge = this.saleInsuredPersonInfo.insuredAge ? this.saleInsuredPersonInfo.insuredAge : this.saleInsuredPersonInfo.age
|
||||
if(this.saleInsuredPersonInfo.birthday){
|
||||
this.saleInsuredPersonInfo.insuredAge = utilsAge.getAge(this.saleInsuredPersonInfo.birthday, new Date())
|
||||
}
|
||||
if (this.isFrom == 'proposal' && !this.saleInsuredPersonInfo.name) {
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
let sex = this.saleInsuredPersonInfo.sex == '0'?'男':'女'
|
||||
@@ -747,42 +734,6 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
if (item.mainRiskCode == 'GFRS_M0077') {
|
||||
item.calFactorLst.map((i) => {
|
||||
if (i.code == 'dutyGroup') {
|
||||
if(i.rules && i.rules.length != 0) {
|
||||
i.rules.forEach(ii=>{
|
||||
if(this.saleInsuredPersonInfo.insuredAge < 18) {
|
||||
if(ii.duty == '311504'){
|
||||
ii.necess = true
|
||||
ii.defaultValue = '0'
|
||||
} else {
|
||||
ii.defaultValue = '0'
|
||||
}
|
||||
}else{
|
||||
if(this.saleInsuredPersonInfo.sex == '0'){
|
||||
if(ii.duty == '311505'){
|
||||
ii.necess = true
|
||||
ii.defaultValue = '0'
|
||||
}
|
||||
if(ii.duty == '311504' || ii.duty == '311506'){
|
||||
ii.defaultValue = '0'
|
||||
}
|
||||
} else {
|
||||
if(ii.duty == '311506'){
|
||||
ii.defaultValue = '0'
|
||||
ii.necess = true
|
||||
}
|
||||
if(ii.duty == '311504' || ii.duty == '311505'){
|
||||
ii.defaultValue = '0'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
if (item.mainRiskCode == 'GFRS_M0046') {
|
||||
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
|
||||
this.isEnterAddtionRiskListFunc()
|
||||
@@ -810,6 +761,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
// if (item.productCode == 'GFRS_A0003') {
|
||||
// //该附加险的责任保额=主险的保费
|
||||
// item.calFactorLst.map(v => {
|
||||
// if (v.code == 'dutyGroup' && v.rules.length > 0) {
|
||||
// v.rules.map(y => {
|
||||
// if (y.defaultDutyAmt === null) {
|
||||
// y.defaultDutyAmt = (JSON.parse(localStorage.trialList)[0].prem / 10000).toFixed(6)
|
||||
// }
|
||||
// y.moneyUnit = 10000
|
||||
// y.changeWithMainRisk = true //责任险保额=主险保费,不允许用户手动更改
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
//保存主险险种编号
|
||||
if (item.isMainRisk == 0) {
|
||||
this.mainRiskCode = item.mainRiskCode
|
||||
@@ -872,6 +837,91 @@
|
||||
rules.forEach((item) => {
|
||||
let config = ''
|
||||
config = JSON.parse(item.ruleExpression)
|
||||
// let errorMsg = item.errorMsg;
|
||||
// config = {
|
||||
// eventName: 'GFRS_M0020_payEndYear_insuYear',
|
||||
// eventType: 'onConfirm',
|
||||
// funBody: [
|
||||
// 'let ageMap = {',
|
||||
// ' "10Y":{"30Y": 55,"70A": 55,"88A": 55},',
|
||||
// ' "20Y":{ "30Y": 55, "70A": 50, "88A": 55 }, ',
|
||||
// ' "30Y":{ "30Y": 45, "70A": 40, "88A": 45 },',
|
||||
// '};',
|
||||
// 'let payEndYear = "";',
|
||||
// 'let insuYear = "";',
|
||||
// 'let age = this.saleInsuredPersonInfo.insuredAge;',
|
||||
// 'let parObj = {};',
|
||||
// 'par.map(item => {',
|
||||
// ' parObj[item.code] = item;',
|
||||
// '});',
|
||||
// 'if(ParKey == "payEndYear"){',
|
||||
// ' payEndYear = Par.value + Par.flag;',
|
||||
// ' lintAgeObj = ageMap[payEndYear];',
|
||||
// ' let flag = true, num = parObj.insuYear.columns.length;',
|
||||
// ' parObj.insuYear.columns.forEach(item => {',
|
||||
// ' let lintAge = lintAgeObj[ item.value + item.flag ];',
|
||||
// ' if( age > lintAge ){',
|
||||
// ' item.disabled = true;',
|
||||
// ' num = num - 1 ;',
|
||||
// ' }else{',
|
||||
// ' if(flag){',
|
||||
// ' parObj.insuYear.insuYear = item.value;',
|
||||
// ' parObj.insuYear.insuYearFlag = item.flag;',
|
||||
// ' parObj.insuYear.showContent = item.text;',
|
||||
// ' flag = false;',
|
||||
// ' };',
|
||||
// ' item.disabled = false;',
|
||||
// ' };',
|
||||
// ' });',
|
||||
// ' if(!num){',
|
||||
// ' this.errorMsg.push("被保险人年龄不符合当前所选交费期间");',
|
||||
// ' payEndYear = parObj.payEndYear.payEndYear + parObj.payEndYear.payEndYearFlag;',
|
||||
// ' lintAgeObj = ageMap[payEndYear];',
|
||||
// ' parObj.insuYear.columns.forEach(item => {',
|
||||
// ' let lintAge = lintAgeObj[ item.value + item.flag ];',
|
||||
// ' if( age > lintAge ){',
|
||||
// ' item.disabled = true;',
|
||||
// ' }else{',
|
||||
// ' item.disabled = false;',
|
||||
// ' };',
|
||||
// ' });',
|
||||
// ' return false;',
|
||||
// ' };',
|
||||
// ' return true;',
|
||||
// '}'],
|
||||
// funPar: ['par','ParKey','Par'],
|
||||
// }
|
||||
// config = {
|
||||
// eventName: 'GFRS_A0003_noMainCode',
|
||||
// eventType: 'init',
|
||||
// initBody: [
|
||||
// 'for(let item of that.chooseProducts){',
|
||||
// ' if(item.productCode == "GFRS_A0003"){',
|
||||
// ' for(let itemC of item.calFactorLst){',
|
||||
// ' if(itemC.code == "dutyGroup"){',
|
||||
// ' for(let itemR of itemC.rules){',
|
||||
// ' that.$emit("GFRS_A0003_noMainCode", itemR, that.mainRiskCode)',
|
||||
// ' }',
|
||||
// ' }',
|
||||
// ' }',
|
||||
// ' }',
|
||||
// ' }',
|
||||
// ],
|
||||
// funBody: [
|
||||
// 'let noMainCode = {',
|
||||
// ' "GFRS_M0004" : true,',
|
||||
// ' "GFRS_M0011" : true',
|
||||
// '};',
|
||||
// 'let noduty = {',
|
||||
// ' "310101" : true',
|
||||
// '};',
|
||||
// 'if(noMainCode[mainRiskCode] && noduty[dutyItem.duty]){',
|
||||
// ' dutyItem.necess = false;',
|
||||
// ' dutyItem.isDisabled = true;',
|
||||
// '}',
|
||||
// ],
|
||||
// funPar:['dutyItem', 'mainRiskCode'],
|
||||
// }
|
||||
this.$on(config.eventName, new Function(...config.funPar, config.funBody.join('')))
|
||||
if (config.eventType == 'init') {
|
||||
let initFn = new Function('that', config.initBody.join(''))
|
||||
@@ -1187,23 +1237,6 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
if (validateRiskCode === 'GFRS_M0077'){
|
||||
if(dutyItem.duty == '311507' && dutyItem.necess){
|
||||
this.chooseProducts.forEach(item => {
|
||||
item.calFactorLst.map((i) => {
|
||||
if (i.code == 'dutyGroup') {
|
||||
if(i.rules && i.rules.length != 0) {
|
||||
i.rules.forEach(ii=>{
|
||||
if(ii.duty != '311507' && ii.necess){
|
||||
dutyItem.defaultDutyAmt = ii.defaultDutyAmt
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
this.valiAndSend(dutyItem, productIndex)
|
||||
},
|
||||
valiAndSend(dutyItem, productIndex) {
|
||||
@@ -1233,30 +1266,14 @@
|
||||
focusStep() {
|
||||
this.nextStepFlag = true
|
||||
},
|
||||
blurStep(dutyItem, productIndex, productCode) {
|
||||
blurStep(dutyItem, productIndex) {
|
||||
this.nextStepFlag = false
|
||||
|
||||
//失去焦点时做验证
|
||||
if (dutyItem.necess) {
|
||||
//勾选时才做验证
|
||||
this.valiAndSend(dutyItem, productIndex)
|
||||
}
|
||||
if(productCode == 'GFRS_M0077'){
|
||||
this.chooseProducts.forEach(item => {
|
||||
if (item.mainRiskCode == 'GFRS_M0077') {
|
||||
item.calFactorLst.map((i) => {
|
||||
if (i.code == 'dutyGroup') {
|
||||
if(i.rules && i.rules.length != 0) {
|
||||
i.rules.forEach(ii=>{
|
||||
if(ii.duty == '311507' && ii.necess){
|
||||
ii.defaultDutyAmt = dutyItem.defaultDutyAmt
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//险种GFRS_M0016\GFRS_M0070的责任的验证规则
|
||||
valiDuty(value, duty) {
|
||||
@@ -2321,7 +2338,7 @@
|
||||
this.saleInsuredInfo.sex,
|
||||
this.saleInsuredInfo.occupationCode,
|
||||
this.saleInsuredInfo.occupationName,
|
||||
this.saleInsuredPersonInfo.insuredAge
|
||||
this.saleInsuredInfo.insuredAge?this.saleInsuredInfo.insuredAge:this.saleInsuredInfo.age,
|
||||
]
|
||||
} else {
|
||||
;[birthday, sex, occupationCode, occupationName, age] = [
|
||||
@@ -2329,7 +2346,7 @@
|
||||
this.saleInsuredPersonInfo.sex,
|
||||
this.saleInsuredPersonInfo.occupationCode,
|
||||
this.saleInsuredPersonInfo.occupationName,
|
||||
this.saleInsuredPersonInfo.insuredAge
|
||||
this.saleInsuredPersonInfo.insuredAge?this.saleInsuredPersonInfo.insuredAge:this.saleInsuredPersonInfo.age
|
||||
]
|
||||
}
|
||||
trialInfo = Object.assign(trialInfo, {
|
||||
@@ -2387,24 +2404,10 @@
|
||||
},
|
||||
//保额份数变化
|
||||
stepperChange(defalutValue, productIndex, calFactorIndex, min, max, riskFactor) {
|
||||
let currentEle = ''
|
||||
let params = this.getParams()
|
||||
if(localStorage.isTrial !== '1' && this.chooseProducts[productIndex].isMainRisk == '0'){
|
||||
// params[productIndex].payEndYear == '1000' 交费期间为一次性交清
|
||||
this.chooseProducts[productIndex].productTrialYearDTOS.forEach(item=>{
|
||||
if(params.trialInfos[productIndex].payEndYear == '1000') {
|
||||
if(item.yearWay == '一次性交清'){
|
||||
currentEle = item
|
||||
}
|
||||
} else {
|
||||
if(item.yearWay == params.trialInfos[productIndex].payEndYear){
|
||||
currentEle = item
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
|
||||
}
|
||||
let currentEle =
|
||||
localStorage.isTrial !== '1' && this.chooseProducts[productIndex].isMainRisk == '0'
|
||||
? this.chooseProducts[productIndex].productTrialYearDTOS[calFactorIndex]
|
||||
: this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
|
||||
//改动原因:孝心保产品有对年龄的特殊要求
|
||||
//添加判断,是否是孝心保产品
|
||||
let showHint = this.chooseProducts[productIndex].hint
|
||||
@@ -2446,8 +2449,7 @@
|
||||
}
|
||||
}
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
}
|
||||
else if (productCode == 'GFRS_M0035' || productCode == 'GFRS_M0044'
|
||||
} else if (productCode == 'GFRS_M0035' || productCode == 'GFRS_M0044'
|
||||
|| productCode == 'GFRS_M0056' || productCode == 'GFRS_M0057' || productCode == 'GFRS_M0060') {
|
||||
console.log('defalutValue==', defalutValue)
|
||||
console.log("currentEle['amt']==", currentEle['amt'])
|
||||
@@ -2490,8 +2492,7 @@
|
||||
}
|
||||
}
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
}
|
||||
else if (productCode == 'GFRS_M0040') {
|
||||
} else if (productCode == 'GFRS_M0040') {
|
||||
// 惠企保保额限制
|
||||
//被保险人年龄如果在41-60区间
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 41) {
|
||||
@@ -2528,8 +2529,7 @@
|
||||
}
|
||||
}
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
}
|
||||
else if (productCode == 'GFRS_M0046') {
|
||||
} else if (productCode == 'GFRS_M0046') {
|
||||
//被保险人年龄如果在50-65区间
|
||||
if(this.branchTypeVal == 'Z'){ //中介渠道规则
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 51 && this.saleInsuredPersonInfo.insuredAge <= 60) {
|
||||
@@ -2604,8 +2604,7 @@
|
||||
}
|
||||
}
|
||||
// 国富人寿富桂金生养老年金保险(GFRS_M0053)中介渠道鑫享金生养老年金保险(GFRS_M0061)
|
||||
}
|
||||
else if (productCode == 'GFRS_M0053' || productCode == 'GFRS_M0061') {
|
||||
} else if (productCode == 'GFRS_M0053' || productCode == 'GFRS_M0061') {
|
||||
if (Number(defalutValue) < Number(min)) {
|
||||
if (riskFactor.yearWay == "一次性交清") {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
@@ -2619,44 +2618,7 @@
|
||||
currentEle['amt'] = Number(defalutValue) * Number(riskFactor.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
else if (productCode == 'GFRS_M0076') {
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 51 && this.saleInsuredPersonInfo.insuredAge <= 60) {
|
||||
//使用rules规则里的第二条控制保额份数
|
||||
// 年龄在51周岁及以上被保险人,投保本险种时,最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
|
||||
this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[1].maxPrem) * 10000) +'元。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[1].maxPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
//年龄在0-50周岁被保险人,投保本险种时,最低基本保险金额为50000元,超过最低基本保险金额为10000元整数倍。
|
||||
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 50) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
this.$toast('出生满 28 天至 50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[0].maxPrem) * 10000) +'元。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
this.$toast('出生满 28 天至 50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[0].maxPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
|
||||
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
|
||||
if (Number(defalutValue) < Number(min)) {
|
||||
if (riskFactor.yearWay == "一次性交清") {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
@@ -2677,8 +2639,7 @@
|
||||
}
|
||||
}
|
||||
//其他产品按照原先的逻辑判断
|
||||
}
|
||||
else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '1') {
|
||||
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '1') {
|
||||
if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
|
||||
this.$toast('投保本险种最低基本保险金额为10000元,超过最低基本保险金额为1000元整数倍')
|
||||
this.nextStepFlag = true
|
||||
@@ -2693,8 +2654,7 @@
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
@@ -2815,7 +2775,6 @@
|
||||
this.trialList[index].productCode == 'GFRS_M0051' ||
|
||||
this.trialList[index].productCode == 'GFRS_M0054' ||
|
||||
this.trialList[index].productCode == 'GFRS_M0073' ||
|
||||
this.trialList[index].productCode == 'GFRS_M0077' ||
|
||||
this.trialList[index].productCode == 'GFRS_M0057'
|
||||
) {
|
||||
riskItem['dutyLst'] = this.trialInfos[index].duty
|
||||
@@ -2852,7 +2811,7 @@
|
||||
this.trialInfos[index].amt = this.trialList[index].amt
|
||||
}
|
||||
// GFRS_A0009,GFRS_A0010 这两款时,责任保额不相加
|
||||
if(item.productCode == 'GFRS_A0009' || item.productCode == 'GFRS_A0010' || item.productCode == 'GFRS_A0013'|| item.productCode == 'GFRS_A0014' || item.productCode == 'GFRS_M0077'){
|
||||
if(item.productCode == 'GFRS_A0009' || item.productCode == 'GFRS_A0010' || item.productCode == 'GFRS_A0013'|| item.productCode == 'GFRS_A0014'){
|
||||
this.trialInfos[index].amt = this.trialList[index].duty[0].amt
|
||||
}
|
||||
// GFRS_A0011-附加两全 属于非豁免险 但附加两全保额=主险年交保费+其他不带豁免责任的长期期交附加险年交保费
|
||||
@@ -2878,7 +2837,7 @@
|
||||
//国富人寿桂企保重大疾病保险产品专写
|
||||
this.trialInfos.map((v, i) => {
|
||||
if (v.productCode == 'GFRS_M0024' || v.productCode == 'GFRS_M0040' || v.productCode == 'GFRS_M0044'
|
||||
|| v.productCode == 'GFRS_M0046'|| v.productCode == 'GFRS_M0051'|| v.productCode == 'GFRS_M0057' || v.productCode == 'GFRS_M0073'|| v.productCode == 'GFRS_M0077') {
|
||||
|| v.productCode == 'GFRS_M0046'|| v.productCode == 'GFRS_M0051'|| v.productCode == 'GFRS_M0057' || v.productCode == 'GFRS_M0073') {
|
||||
delete riskDTOLst[i].duty
|
||||
}
|
||||
})
|
||||
@@ -2886,7 +2845,7 @@
|
||||
//建议书需要添加全部投保人信息,电投只需要投保人ID
|
||||
let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst })
|
||||
if (!insuredDTOItem.insuredAge) {
|
||||
insuredDTOItem.insuredAge = insuredDTOItem.birthday ? utilsAge.getAge(insuredDTOItem.birthday, new Date()) : insuredDTOItem.age
|
||||
insuredDTOItem.insuredAge = insuredDTOItem.age
|
||||
}
|
||||
let orderNo = localStorage.isFrom == 'proposal'?this.$route.query.proposalOrderNo:this.$route.query.orderNo
|
||||
let params = {
|
||||
@@ -2997,7 +2956,7 @@
|
||||
}
|
||||
})
|
||||
let data = {
|
||||
serialNo:this.$route.query.proposalOrderNo,
|
||||
serialNo:this.$CacheUtils.getLocItem('proposalNo'),
|
||||
mainRiskId:insuanceId+'',
|
||||
trialJsonStr:localStorage.chooseProducts
|
||||
}
|
||||
@@ -3067,39 +3026,39 @@
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .van-dialog .van-dialog__header{
|
||||
/deep/ .van-dialog .van-dialog__header{
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
/deep/ .van-button--danger{
|
||||
}
|
||||
/deep/ .van-button--danger{
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .van-button--plain {
|
||||
/deep/ .van-button--plain {
|
||||
border: none !important;
|
||||
border-top: 1px solid #E9332E !important;
|
||||
}
|
||||
.renewalWrappser {
|
||||
}
|
||||
.renewalWrappser {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .van-radio {
|
||||
/deep/ .van-radio {
|
||||
margin: 0 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.renewal {
|
||||
.renewal {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .van-radio__label {
|
||||
/deep/ .van-radio__label {
|
||||
line-height: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.calculate-premium-container {
|
||||
.calculate-premium-container {
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #dadada;
|
||||
}
|
||||
@@ -3122,5 +3081,5 @@
|
||||
.van-dialog__content{
|
||||
border: 1px solid red;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user