mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-07 04:16:44 +08:00
1001 lines
34 KiB
Vue
1001 lines
34 KiB
Vue
<template>
|
||
<div class="accountInformation-container redRadioCheckbox">
|
||
<index-bar :key="renovate"></index-bar>
|
||
<div class="aaountInfomation-content" v-if="!isScan">
|
||
|
||
<van-radio-group v-model="radio" class="flex pl30 pr30 pt15 pb15 justify-content-s bg-white mt10">
|
||
<van-radio name="0" class="fs14" @click="clickRadio(saleInsuredInfo.name)" v-if="!changeCard">{{
|
||
`投保人:${saleInsuredInfo.name}` }}</van-radio>
|
||
<!-- <van-radio name="1" class="fs14" v-if="relationToAppnt != '1'" @click="clickRadio(saleInsuredPersonInfo.name)">{{
|
||
`被保险人:${saleInsuredPersonInfo.name}`
|
||
}}</van-radio> -->
|
||
</van-radio-group>
|
||
<div v-if="radio == '0'">
|
||
<van-cell-group class="pl20 fs14">
|
||
<van-field v-model="bank" label="开户银行" placeholder="请选择" required @click="islistShow = true" readonly
|
||
v-validate="'required'" data-vv-name="开户银行" />
|
||
</van-cell-group>
|
||
<van-cell-group class="pl20 fs14">
|
||
<van-field v-model="areaStr" label="开户银行省市" placeholder="请选择" required @click="areaSelect" readonly
|
||
v-validate="'required'" data-vv-name="开户银行省市" />
|
||
</van-cell-group>
|
||
<van-cell-group class="pl20 flex align-items-c">
|
||
<van-field v-model="bankId" label="银行卡号" maxlength="19" placeholder="手工录入或点击右侧银行卡扫描" clearable required
|
||
v-validate="'required|bankCard'" data-vv-name="银行卡号" />
|
||
<van-button class="san_button mr10" style="border: none;padding: 0px;" @click="cardScanning('0')"
|
||
v-no-more-click="1000" v-if="!changeCard">
|
||
<img src="@/assets/images/saomiao.png" alt="" class="san_button mb10" />
|
||
</van-button>
|
||
</van-cell-group>
|
||
|
||
<van-cell-group class="flex align-items-c" v-if="isAutoPay == '0' && !changeCard">
|
||
<van-switch-cell v-model="checked" title="是否自动垫交" active-color="#E9332E" inactive-color="#fff" class="ml15 pr30" />
|
||
<van-icon name="question-o" class="vanIcon" @click="
|
||
$toast({
|
||
message:
|
||
'保费自动垫交是当投保人没有按时交纳续期保险费,而保单当时已经具有足够的现金价值时,保险公司以现金价值自动垫交保险费,从而使保单继续有效。相当于投保人向保险公司贷款交纳保费,是保险公司提供给客户的一项选择权益,其目的是为了尽可能地减少客户因非故意的失误导致保单失效,使其利益受损。',
|
||
duration: 10000
|
||
})
|
||
" />
|
||
</van-cell-group>
|
||
<van-cell-group class="flex align-items-c" v-if="isRenew == '0' && !changeCard">
|
||
<van-switch-cell v-model="isChecked" title="自动续保" active-color="#E9332E" inactive-color="#fff" class="ml15 pr30"
|
||
:disabled="isForceRenew" @change="handleRenew" />
|
||
</van-cell-group>
|
||
<van-cell-group class="pl20 fs14">
|
||
<van-field required v-model="appntDTO.mobile" clearable label="投保人手机号" name="投保人手机号" placeholder="请输入"
|
||
v-validate="'required|mobileLength11|mobileStartWith1|mobile'" maxlength="11" readonly />
|
||
</van-cell-group>
|
||
<van-cell-group class="pl20 fs14" v-if="orderInfoDTO.activeType != 'KMH'">
|
||
<van-field v-if="orderInfoDTO.validateCustomerFlag !== '0'" v-model="authCode" center clearable label name="短信验证码"
|
||
v-validate="'required'" placeholder="请输入短信验证码" maxlength="6">
|
||
<van-button slot="button" size="small" type="danger" @click="getCode" :disabled="codeDisabled"
|
||
v-no-more-click="1000">
|
||
{{ codeDisabled ? `${countDown}s后重新获取` : '发送验证码' }}
|
||
</van-button>
|
||
</van-field>
|
||
</van-cell-group>
|
||
<div class="fs12 mt10 ml20 w250 h15">
|
||
<span>温馨提示:该账户将用于首期、续期保费缴费</span>
|
||
</div>
|
||
<div class="bg-white bottom-btn">
|
||
<van-button type="danger" size="large" @click="next" :disabled="isDisabled" v-no-more-click="1000">下一步</van-button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 银行卡扫描 -->
|
||
<BankCardScan :scanShow="isScan" :clear="isClear" @getScanInfo="getBankCardInfo"></BankCardScan>
|
||
<!--开户银行选择-->
|
||
<SelectBankName :inputShow="inputShow" :listShow.sync="islistShow" :operateType="'bank_type'" @getBank="getBank"></SelectBankName>
|
||
<van-popup position="bottom" v-model="isAreaListShow" :lazy-render="false">
|
||
<van-area ref="areaSelect" title="请选择省市" :visible-item-count="4" :columns-num="2" :area-list="areaList" @confirm="setBankArea"
|
||
@cancel="isAreaListShow = false" />
|
||
</van-popup>
|
||
|
||
<!-- 短信验证弹窗 -->
|
||
<van-dialog v-model="isCaptchaModalShow" title="提示" show-cancel-button :before-close="onCaptchaConfirm" @cancel="onCaptchaCancel">
|
||
<van-cell>
|
||
<p class="fs14">为确保是您本人操作,短信验证码将发送至您手机号{{ encryptMobile }},请您输入验证码以完成后续操作。</p>
|
||
</van-cell>
|
||
<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>
|
||
</van-dialog>
|
||
<van-dialog class="bankCardContract" v-model="bankCardContractShow" title="提示" show-cancel-button @confirm="authConfirm" @cancel="checkModelCancel">
|
||
<p class="p10 fs14">尊敬的客户您好,您的银行卡账户未进行续期签约,为确保是您本人操作,短信验证码已发送至您的手机号{{ appntDTO.mobile }},请您输入验证码完成签约流程~</p>
|
||
<van-cell-group class="flex align-items-c" style="margin: 10px;">
|
||
<van-field maxlength="6" placeholder="请输入短信验证码" v-model="verfyCode" clearable label-width="0" />
|
||
</van-cell-group>
|
||
</van-dialog>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import { Cell, CellGroup, Field, RadioGroup, Radio, Popup, List, Switch, Toast, SwitchCell, Icon, Area,Dialog } from 'vant'
|
||
import { saveInformation, getOrderDetail, checkCard, getAuthCode, autchCodeCheck, getBankCardSignState, signConfirm } from '@/api/ebiz/sale/sale'
|
||
import utilsAge from '@/assets/js/utils/age'
|
||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
||
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
||
import SelectBankName from '@/components/ebiz/account/SelectBankName'
|
||
import areaList from '@/assets/js/utils/area'
|
||
import { getWhitelist } from '@/api/ebiz/whitelist'
|
||
export default {
|
||
data() {
|
||
return {
|
||
cardAuthCount: 0,
|
||
isCaptchaModalShow: false,
|
||
authCode: '', //手机号验证码
|
||
codeDisabled: false, //获取验证码按钮是否禁用
|
||
countDown: 60, //倒计时
|
||
timeId: null, //定时器
|
||
sessionId: '', //后台返回的 id
|
||
code: '',
|
||
sid: '',
|
||
countDownNum: 0,
|
||
countDownTimer: null,
|
||
isPassedCardCheck: false,
|
||
isCancel: false,
|
||
inputShow: true, //模糊查询功能
|
||
islistShow: false, //选择银行弹窗
|
||
// 选中后传给后端的投保人或者被保险人名字
|
||
name: '',
|
||
// 开户银行
|
||
bank: '',
|
||
// 是否自动垫付
|
||
checked: false,
|
||
// 自动续保
|
||
isChecked: false,
|
||
// 投被保险人是否同一个
|
||
relationToAppnt: '',
|
||
// 银行卡号
|
||
bankId: '',
|
||
// 单选框
|
||
radio: '0',
|
||
// 银行列表弹框
|
||
show: false,
|
||
// 被保险人信息
|
||
saleInsuredPersonInfo: {},
|
||
// 投保人信息
|
||
saleInsuredInfo: {
|
||
name: ''
|
||
},
|
||
// 下一步是否可以点击
|
||
isDisabled: true,
|
||
|
||
// 银行卡code
|
||
bankCode: '',
|
||
// 银行卡扫描是否显示
|
||
isScan: false,
|
||
//是否清空
|
||
isClear: false,
|
||
// 是否显示自动垫交
|
||
isAutoPay: '',
|
||
// 是否显示自动续保
|
||
isRenew: '',
|
||
//自动续保按钮是否不允许更改
|
||
isForceRenew: false,
|
||
changeCard: localStorage.changeCard,
|
||
age: null,
|
||
productNo: null,
|
||
salePageFlag: '8',
|
||
appntDTO: {},
|
||
areaList,
|
||
isAreaListShow: false,
|
||
accBankProvince: '',
|
||
accBankCity: '',
|
||
areaStr: '',
|
||
orderInfoDTO: '',
|
||
renovate:'',
|
||
bankCardContractShow: false,
|
||
rdSeq:'',
|
||
verfyCode: '',
|
||
}
|
||
},
|
||
methods: {
|
||
showbackBankAddressStr(provinceCode, cityCode) {
|
||
let provinces = areaList.province_list
|
||
let cities = areaList.city_list
|
||
this.areaStr = `${provinces[provinceCode]}-${cities[cityCode]}`
|
||
},
|
||
async getCaptcha() {
|
||
let data = {
|
||
operateType: 'appntInfoEntry',
|
||
type: 'H5',
|
||
operateCode: this.appntDTO.mobile,
|
||
system: 'agentApp',
|
||
operateCodeType: '0'
|
||
}
|
||
//获取验证码
|
||
try {
|
||
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)
|
||
}
|
||
} catch (error) {
|
||
console.log(error)
|
||
this.$toast('网络异常')
|
||
}
|
||
},
|
||
async onCaptchaConfirm(action, done) {
|
||
if (!this.sid) {
|
||
if (!this.isCancel) {
|
||
this.$toast('请先获取验证码')
|
||
}
|
||
done(false)
|
||
return
|
||
}
|
||
if (!this.code.trim()) {
|
||
done(false)
|
||
return this.$toast('请输入验证码')
|
||
}
|
||
try {
|
||
let res = await autchCodeCheck({
|
||
smsId: this.sid,
|
||
code: this.code
|
||
})
|
||
if (res.result === '0') {
|
||
this.isPassedCardCheck = true
|
||
this.next()
|
||
} else {
|
||
this.$toast(res.resultMessage)
|
||
}
|
||
} catch (error) {
|
||
this.$toast('网络异常')
|
||
console.log(error)
|
||
}
|
||
this.onCaptchaCancel()
|
||
done()
|
||
},
|
||
onCaptchaCancel() {
|
||
this.isCancel = true
|
||
this.isCaptchaModalShow = false
|
||
clearInterval(this.countDownTimer)
|
||
this.countDownTimer = null
|
||
this.countDownNum = 0
|
||
this.sid = ''
|
||
this.code = ''
|
||
},
|
||
areaSelect() {
|
||
this.isAreaListShow = true
|
||
this.$refs['areaSelect'].reset('450000')
|
||
},
|
||
setBankArea(areaInfo) {
|
||
let province = areaInfo[0]
|
||
let city = areaInfo[1]
|
||
this.accBankProvince = province.code
|
||
this.accBankCity = city.code
|
||
this.isAreaListShow = false
|
||
this.areaStr = `${province.name}-${city.name}`
|
||
},
|
||
closePop() {
|
||
//关闭选择银行弹窗
|
||
this.islistShow = false
|
||
},
|
||
getBank(bank) {
|
||
//获取银行
|
||
this.bank = bank.bankName
|
||
this.bankCode = bank.code
|
||
},
|
||
//获取身份证扫描信息
|
||
getBankCardInfo(data) {
|
||
this.bankId = data.name
|
||
|
||
this.$jump({
|
||
flag: 'navigation',
|
||
extra: {
|
||
title: '账户信息',
|
||
hiddenRight: '1'
|
||
}
|
||
})
|
||
this.isScan = false
|
||
},
|
||
|
||
// 银行卡扫描
|
||
cardScanning(cardScanningType) {
|
||
window.localStorage.setItem('cardScanningType', cardScanningType)
|
||
document.body.style.backgroundColor = '#F5F5F5'
|
||
let title = ''
|
||
this.isclear = false
|
||
;[this.isScan, title] = [true, '银行卡扫描']
|
||
setTimeout(() => {
|
||
this.$jump({
|
||
flag: 'navigation',
|
||
extra: {
|
||
title,
|
||
hiddenLeft: '1'
|
||
}
|
||
})
|
||
this.closeBtn()
|
||
}, 400)
|
||
},
|
||
closeBtn() {
|
||
// 筛选按钮的显示
|
||
this.$jump({
|
||
flag: 'webview_right_button',
|
||
extra: {
|
||
btns: [
|
||
{
|
||
img: this.$assetsUrl + 'images/del-close.png',
|
||
route: { flag: '', extra: {} }
|
||
}
|
||
]
|
||
}
|
||
})
|
||
},
|
||
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
|
||
})
|
||
} else {
|
||
this.isclear = true
|
||
// 筛选按钮的点击事件
|
||
this.isclear = true
|
||
this.$jump({
|
||
flag: 'navigation',
|
||
extra: {
|
||
title: '账户管理',
|
||
hiddenRight: '1'
|
||
}
|
||
})
|
||
this.isScan = false
|
||
}
|
||
},
|
||
// 单选框选中
|
||
clickRadio(val) {
|
||
this.name = val
|
||
},
|
||
// 下一步
|
||
async next() {
|
||
if (this.productNo === 'GFRS_M0016' && this.age > 65) {
|
||
this.$toast('本产品年龄大于65岁不能投保')
|
||
return
|
||
}
|
||
let valid = await this.$validator.validate()
|
||
if (valid) {
|
||
let cardData = {
|
||
account: this.bankId,
|
||
idNo: this.appntDTO.idNo,
|
||
idType: this.appntDTO.idType,
|
||
mobile: this.appntDTO.mobile,
|
||
name: this.appntDTO.name
|
||
}
|
||
|
||
// 银行卡鉴权[白名单用户自动跳过]
|
||
const whiteRes = await getWhitelist({
|
||
idNo: cardData.idNo,
|
||
name: cardData.name,
|
||
bankNo: this.bankId,
|
||
whiteType: 'sale_bank_check'
|
||
})
|
||
console.log('白名单查询结果: ', whiteRes)
|
||
|
||
if (whiteRes.result === '0') {
|
||
// 用户在白名单内
|
||
if (whiteRes.content && whiteRes.content.length) {
|
||
// 用户在白名单内不做操作
|
||
}
|
||
// 用户不再白名单内做银行卡鉴权
|
||
else {
|
||
//if (!this.isPassedCardCheck) {
|
||
// 鉴权次数未达到3次
|
||
// if (this.cardAuthCount < 3) {
|
||
this.$toast.loading({
|
||
duration: 0, // 持续展示 toast
|
||
forbidClick: true, // 禁用背景点击
|
||
loadingType: 'spinner',
|
||
message: '加载中……'
|
||
})
|
||
let res = await checkCard(cardData)
|
||
this.$toast.clear()
|
||
if (res.result !== '0') {
|
||
this.cardAuthCount++
|
||
if(!res.resultMessage){
|
||
return this.$toast("当前系统繁忙,请重新输入!")
|
||
}
|
||
return this.$toast(res.resultMessage)
|
||
}
|
||
// }
|
||
// 鉴权次数达到3次
|
||
// else {
|
||
// this.isCaptchaModalShow = true
|
||
// this.isCancel = false
|
||
// return
|
||
// }
|
||
// }
|
||
}
|
||
} else {
|
||
this.$toast(whiteRes.resultMessage)
|
||
}
|
||
|
||
let data = {}
|
||
//支付失败换卡
|
||
if (localStorage.changeCard) {
|
||
data = {
|
||
orderType: 'ACCOUNTNEW_ORDER',
|
||
|
||
orderDTO: {
|
||
orderInfoDTO: {
|
||
orderNo: this.$route.query.orderNo
|
||
},
|
||
orderAccountDTO: {
|
||
bankName: this.bank,
|
||
bankCode: this.bankCode,
|
||
cvv2Code: '0',
|
||
cardBookCode: this.bankId,
|
||
accBankProvince: this.accBankProvince,
|
||
accBankCity: this.accBankCity
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
// 垫付
|
||
if (this.checked == true) {
|
||
// 续保
|
||
if (this.isChecked == true) {
|
||
data = {
|
||
orderType: 'ACCOUNT_ORDER',
|
||
|
||
orderDTO: {
|
||
orderInfoDTO: {
|
||
orderNo: this.$route.query.orderNo
|
||
},
|
||
orderAccountDTO: {
|
||
accountType: this.radio,
|
||
accountName: this.name,
|
||
bankName: this.bank,
|
||
bankCode: this.bankCode,
|
||
cardBookType: '1',
|
||
cardBookCode: this.bankId,
|
||
isAutoPay: '0',
|
||
isAutoRenewal: '0',
|
||
accBankProvince: this.accBankProvince,
|
||
accBankCity: this.accBankCity
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
// 垫付不续保
|
||
data = {
|
||
orderType: 'ACCOUNT_ORDER',
|
||
|
||
orderDTO: {
|
||
orderInfoDTO: {
|
||
orderNo: this.$route.query.orderNo
|
||
},
|
||
orderAccountDTO: {
|
||
accountType: this.radio,
|
||
accountName: this.name,
|
||
bankName: this.bank,
|
||
bankCode: this.bankCode,
|
||
cardBookType: '1',
|
||
cardBookCode: this.bankId,
|
||
isAutoPay: '0',
|
||
isAutoRenewal: this.isRenew == '0' ? '1' : '',
|
||
accBankProvince: this.accBankProvince,
|
||
accBankCity: this.accBankCity
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
// 不垫付 续保
|
||
if (this.isChecked == true) {
|
||
data = {
|
||
orderType: 'ACCOUNT_ORDER',
|
||
|
||
orderDTO: {
|
||
orderInfoDTO: {
|
||
orderNo: this.$route.query.orderNo
|
||
},
|
||
orderAccountDTO: {
|
||
accountType: this.radio,
|
||
accountName: this.name,
|
||
bankName: this.bank,
|
||
bankCode: this.bankCode,
|
||
cardBookType: '1',
|
||
cardBookCode: this.bankId,
|
||
isAutoPay: this.isAutoPay == '0' ? '1' : '',
|
||
isAutoRenewal: '0',
|
||
accBankProvince: this.accBankProvince,
|
||
accBankCity: this.accBankCity
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
// 不垫付 不续保
|
||
data = {
|
||
orderType: 'ACCOUNT_ORDER',
|
||
|
||
orderDTO: {
|
||
orderInfoDTO: {
|
||
orderNo: this.$route.query.orderNo
|
||
},
|
||
orderAccountDTO: {
|
||
accountType: this.radio,
|
||
accountName: this.name,
|
||
bankName: this.bank,
|
||
bankCode: this.bankCode,
|
||
cardBookType: '1',
|
||
cardBookCode: this.bankId,
|
||
isAutoPay: this.isAutoPay == '0' ? '1' : '',
|
||
isAutoRenewal: this.isRenew == '0' ? '1' : '',
|
||
accBankProvince: this.accBankProvince,
|
||
accBankCity: this.accBankCity
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if(this.orderInfoDTO.activeType != 'KMH') {
|
||
if (this.orderInfoDTO.validateCustomerFlag !== '0') {
|
||
data.orderDTO.smsCodeDTO = { smsId: this.sessionId, code: this.authCode }
|
||
}
|
||
}
|
||
|
||
saveInformation(data).then(res => {
|
||
if (res.result == '0') {
|
||
this.orderInfoDTO.validateCustomerFlag = '0';
|
||
window.localStorage.setItem('accountInformationRadio', this.radio)
|
||
if(this.orderInfoDTO.activeType != 'KMH') {
|
||
this.$jump({
|
||
flag: 'h5',
|
||
extra: {
|
||
url: location.origin + '/#/sale/attachmentManagement?orderNo=' + this.$route.query.orderNo
|
||
},
|
||
routerInfo: {
|
||
path: '/sale/attachmentManagement?orderNo=' + this.$route.query.orderNo
|
||
}
|
||
})
|
||
} else {
|
||
this.getBankCardSignState()
|
||
}
|
||
} else {
|
||
this.$toast(res.resultMessage)
|
||
}
|
||
})
|
||
} else {
|
||
this.$toast(this.errors.all()[0])
|
||
}
|
||
},
|
||
getBankCardSignState(){
|
||
this.$toast.loading({
|
||
duration: 0, // 持续展示 toast
|
||
forbidClick: true, // 禁用背景点击
|
||
loadingType: 'spinner',
|
||
message: '加载中……',
|
||
})
|
||
let params = {
|
||
orderNo: this.$route.query.orderNo
|
||
}
|
||
getBankCardSignState(params).then(res => {
|
||
this.$toast.clear()
|
||
let checkRes = res.content
|
||
if (checkRes.result == '0') {
|
||
this.$toast.clear()
|
||
if (checkRes.needSign == '0' || checkRes.needSign == null) {
|
||
if(checkRes.signState == '0' || checkRes.signState == '2'){
|
||
// 不需签约或已签约,不做处理
|
||
this.$jump({
|
||
flag: 'h5',
|
||
extra: {
|
||
url: location.origin + '/#/sale/attachmentManagement?orderNo=' + this.$route.query.orderNo
|
||
},
|
||
routerInfo: {
|
||
path: '/sale/attachmentManagement?orderNo=' + this.$route.query.orderNo
|
||
}
|
||
})
|
||
}
|
||
}
|
||
else if (checkRes.needSign == '3') {
|
||
if(checkRes.signState == '0') {
|
||
this.$toast('该银行卡金掌桂暂不支持续期签约!')
|
||
}
|
||
}
|
||
else if (checkRes.needSign == '1'){
|
||
if (checkRes.signConfirmType == '2'){
|
||
this.bankCardContractShow = true
|
||
this.rdSeq = checkRes.rdSeq
|
||
}else if (checkRes.signConfirmType == '3'){
|
||
Dialog.alert({
|
||
message: '银行已发送短信至手机号'+ this.appntDTO.mobile +',按照短信提示完成短信回复签约,再次通过金掌桂完成后续流程。',
|
||
confirmButtonColor: '#ff5e50',
|
||
}).then(() => {})
|
||
} else if(checkRes.signConfirmType == '4') {
|
||
// this.$toast('招商银行卡请至官微续期签约~')
|
||
Dialog.alert({
|
||
message: '招商银行卡请至官微续期签约~',
|
||
confirmButtonColor: '#ff5e50',
|
||
}).then(() => {})
|
||
} else if(checkRes.signConfirmType == '5') {
|
||
this.$jump({
|
||
flag: 'h5',
|
||
extra: {
|
||
url: location.origin + '/#/sale/attachmentManagement?orderNo=' + this.$route.query.orderNo
|
||
},
|
||
routerInfo: {
|
||
path: '/sale/attachmentManagement?orderNo=' + this.$route.query.orderNo
|
||
}
|
||
})
|
||
} else if (checkRes.signState == '3') {
|
||
// 签约失败
|
||
const info = '您当前银行卡账户续期签约失败,\n原因:' + checkRes.resultMessage
|
||
Dialog.confirm({
|
||
message: info,
|
||
className: 'reConfirm leftConfirm',
|
||
cancelButtonText: '返回',
|
||
cancelButtonColor: '#ff5e50',
|
||
showCancelButton: false,
|
||
confirmButtonText: '修改银行卡信息',
|
||
confirmButtonColor: '#ff5e50',
|
||
allowHtml: true
|
||
}).then(() => {}).catch(() => {});
|
||
} else if (checkRes.signState == '4') {
|
||
const info = '银行卡已在签约中,请稍后~'
|
||
Dialog.alert({
|
||
message: info,
|
||
className: 'reConfirm leftConfirm',
|
||
confirmButtonColor: '#ff5e50',
|
||
allowHtml: true
|
||
}).then(() => {}).catch(() => {})
|
||
// }
|
||
}
|
||
}
|
||
else {
|
||
this.$toast(checkRes.resultMessage)
|
||
}
|
||
}else{
|
||
const info = '您当前银行卡账户续期签约失败,\n原因:' + checkRes.resultMessage
|
||
Dialog.confirm({
|
||
message: info,
|
||
className: 'reConfirm leftConfirm',
|
||
cancelButtonText: '返回',
|
||
cancelButtonColor: '#ff5e50',
|
||
showCancelButton: false,
|
||
confirmButtonText: '修改银行卡信息',
|
||
confirmButtonColor: '#ff5e50',
|
||
allowHtml: true
|
||
}).then(() => {}).catch(() => { });
|
||
}
|
||
})
|
||
},
|
||
authConfirm(){
|
||
this.$toast.loading({
|
||
duration: 0, // 持续展示 toast
|
||
forbidClick: true, // 禁用背景点击
|
||
loadingType: 'spinner',
|
||
message: '加载中……'
|
||
})
|
||
let data = {
|
||
rdSeq:this.rdSeq,
|
||
verfyCode:this.verfyCode,
|
||
businessNo:this.$route.query.orderNo
|
||
}
|
||
if (!this.verfyCode || this.verfyCode == '') {
|
||
this.bankCardContractShow = true
|
||
return this.$toast('请输入短信验证码')
|
||
}
|
||
if (this.verfyCode.length !== 6) {
|
||
this.bankCardContractShow = true
|
||
return this.$toast('验证码格式错误')
|
||
}
|
||
signConfirm(data).then(res => {
|
||
this.verfyCode = ''
|
||
this.bankCardContractShow = false
|
||
if (res.content.result == '0') {
|
||
this.$toast.clear()
|
||
this.$jump({
|
||
flag: 'h5',
|
||
extra: {
|
||
url: location.origin + '/#/sale/attachmentManagement?orderNo=' + this.$route.query.orderNo
|
||
},
|
||
routerInfo: {
|
||
path: '/sale/attachmentManagement?orderNo=' + this.$route.query.orderNo
|
||
}
|
||
})
|
||
}else{
|
||
this.$toast.clear()
|
||
// 签约失败
|
||
const info = '您当前银行卡账户续期签约失败,\n原因:' + res.content.resultMessage
|
||
Dialog.confirm({
|
||
message: info,
|
||
className: 'reConfirm leftConfirm',
|
||
cancelButtonText: '返回',
|
||
cancelButtonColor: '#ff5e50',
|
||
showCancelButton: false,
|
||
confirmButtonText: '修改银行卡信息',
|
||
confirmButtonColor: '#ff5e50',
|
||
allowHtml: true
|
||
}).then(() => {})
|
||
}
|
||
})
|
||
},
|
||
checkModelCancel() {
|
||
this.bankCardContractShow = false
|
||
this.verfyCode = ''
|
||
},
|
||
handleRenew(v) {
|
||
//大于65不能续保
|
||
if (this.productNo === 'GFRS_M0016' && this.age >= 65) {
|
||
this.$toast('本产品年龄大于等于65岁不能续保')
|
||
this.isChecked = !v
|
||
} else {
|
||
this.isChecked = v
|
||
}
|
||
},
|
||
//获取验证码
|
||
getCode() {
|
||
if (this.appntDTO.mobile == '') {
|
||
return this.$toast('请填写移动电话')
|
||
}
|
||
this.codeDisabled = true
|
||
//倒计时
|
||
this.timeId = setInterval(() => {
|
||
this.countDown--
|
||
if (this.countDown <= 0) {
|
||
window.clearInterval(this.timeId)
|
||
this.codeDisabled = false
|
||
this.countDown = 60
|
||
}
|
||
}, 1000)
|
||
let data = {
|
||
operateType: 'appntInfoEntry',
|
||
type: 'H5',
|
||
operateCode: this.appntDTO.mobile,
|
||
system: 'agentApp',
|
||
operateCodeType: '0'
|
||
}
|
||
//获取验证码
|
||
getAuthCode(data).then(res => {
|
||
if (res.result == 0) {
|
||
this.sessionId = res.sessionId
|
||
} else {
|
||
this.$toast(res.resultMessage)
|
||
}
|
||
})
|
||
}
|
||
},
|
||
created() {
|
||
|
||
},
|
||
async mounted() {
|
||
let res = await getOrderDetail({ orderNo: this.$route.query.orderNo })
|
||
this.$toast.loading({
|
||
duration: 0, // 持续展示 toast
|
||
forbidClick: true, // 禁用背景点击
|
||
loadingType: 'spinner',
|
||
message: '加载中……'
|
||
})
|
||
if (res.result == 0) {
|
||
this.renovate = new Date().getTime()
|
||
if(res.orderDTO.riskEvaluationDTO.isShowEvaluationPoint == '1'&&res.orderDTO.riskEvaluationDTO.totalScore == null){
|
||
Dialog.alert({
|
||
title: '提示',
|
||
message: '您当前未完成测评,请完成后再进行后续操作',
|
||
theme: 'round-button',
|
||
}).then(() => {
|
||
this.$jump({
|
||
flag: 'h5',
|
||
extra: {
|
||
url: location.origin + '/#/sale/answerPage',
|
||
},
|
||
routerInfo: {
|
||
path: '/sale/answerPage'
|
||
}
|
||
})
|
||
// on close
|
||
})
|
||
}
|
||
|
||
|
||
this.appntDTO = res.orderDTO.appntDTO
|
||
this.$set(this.appntDTO,'mobile',res.orderDTO.appntDTO.mobile)
|
||
this.orderInfoDTO = res.orderDTO.orderInfoDTO
|
||
//如果是从编辑进来的
|
||
if (this.$route.query.edit) {
|
||
//投被保险人关系
|
||
this.relationToAppnt = res.orderDTO.insuredDTOs[0].relationToAppnt
|
||
|
||
this.$utils.intLocalStorage(res)
|
||
}
|
||
if (res.orderDTO.orderAccountDTO.accountName) {
|
||
//如果存在填过的账户信息
|
||
this.radio = res.orderDTO.orderAccountDTO.accountType
|
||
this.name = res.orderDTO.orderAccountDTO.accountName
|
||
this.bank = res.orderDTO.orderAccountDTO.bankName
|
||
this.bankCode = res.orderDTO.orderAccountDTO.bankCode
|
||
this.bankId = res.orderDTO.orderAccountDTO.cardBookCode
|
||
this.accBankProvince = res.orderDTO.orderAccountDTO.accBankProvince
|
||
this.accBankCity = res.orderDTO.orderAccountDTO.accBankCity
|
||
// 回显银行卡省市信息
|
||
this.showbackBankAddressStr(this.accBankProvince, this.accBankCity)
|
||
localStorage.setItem('isAutoPay', res.orderDTO.orderAccountDTO.isAutoPay)
|
||
localStorage.setItem('isAutoRenewal', res.orderDTO.orderAccountDTO.isAutoRenewal)
|
||
localStorage.setItem('isRenew', res.orderDTO.orderAccountDTO.isRenew)
|
||
} else {
|
||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
||
}
|
||
this.productNo = res.orderDTO.insuredDTOs[0].riskDTOLst[0].mainRiskCode
|
||
//计算年龄
|
||
const birthday = res.orderDTO.insuredDTOs[0].birthday
|
||
const age = utilsAge.getAge(birthday, new Date())
|
||
this.age = age
|
||
} else {
|
||
this.$toast.clear()
|
||
this.$toast(res.resultMessage)
|
||
}
|
||
|
||
let that = this
|
||
|
||
// 获取投被保险人是否同一个人
|
||
if (this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) {
|
||
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
|
||
// 获取被保险人信息
|
||
that.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||
}
|
||
if (this.$CacheUtils.getLocItem('saleInsuredInfo')) {
|
||
// 获取投保人信息
|
||
that.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||
// 默认是投保人名字
|
||
that.name = this.saleInsuredInfo.name
|
||
}
|
||
that.name = res.orderDTO.appntDTO.name
|
||
that.saleInsuredInfo.name = res.orderDTO.appntDTO.name
|
||
// 是否显示自动垫交
|
||
this.isAutoPay = localStorage.isAutoPay
|
||
// 是否显示自动续保
|
||
this.isRenew = localStorage.isRenew
|
||
//自动续保按钮是否禁用
|
||
this.isForceRenew = localStorage.isForceRenew == '0' ? true : false
|
||
this.isChecked = localStorage.isForceRenew == '0' ? true : false
|
||
this.$toast.clear()
|
||
|
||
document.body.style.backgroundColor = '#F5F5F5'
|
||
setTimeout(() => {
|
||
// eslint-disable-next-line no-undef
|
||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
|
||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||
})
|
||
}, 100)
|
||
// 筛选按钮的点击事件
|
||
window.appCallBack = this.appCallBack
|
||
},
|
||
computed: {
|
||
listenChange() {
|
||
const { bankId, bank } = this
|
||
return { bankId, bank }
|
||
},
|
||
encryptMobile() {
|
||
if (this.appntDTO && this.appntDTO.mobile) {
|
||
return this.appntDTO.mobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||
}
|
||
return ''
|
||
}
|
||
},
|
||
watch: {
|
||
listenChange(val) {
|
||
if (val.bankId !== null && val.bank !== '') {
|
||
this.isDisabled = false
|
||
}
|
||
},
|
||
radio(val, newVal) {
|
||
if (val !== newVal) {
|
||
this.bank = ''
|
||
this.bankId = ''
|
||
this.checked = true
|
||
this.isDisabled = true
|
||
}
|
||
}
|
||
},
|
||
filters: {
|
||
countDownText(val) {
|
||
if (isNaN(parseFloat(val))) {
|
||
return val
|
||
} else {
|
||
return `${val} s`
|
||
}
|
||
}
|
||
},
|
||
beforeDestroy() {
|
||
//清理计时器
|
||
window.clearInterval(this.timeId)
|
||
this.timeId = null
|
||
this.countDown = 60
|
||
this.codeDisabled = false
|
||
},
|
||
components: {
|
||
[Cell.name]: Cell,
|
||
[CellGroup.name]: CellGroup,
|
||
[Field.name]: Field,
|
||
[RadioGroup.name]: RadioGroup,
|
||
[Radio.name]: Radio,
|
||
[Popup.name]: Popup,
|
||
[List.name]: List,
|
||
[Switch.name]: Switch,
|
||
[Toast.name]: Toast,
|
||
[SwitchCell.name]: SwitchCell,
|
||
BankCardScan,
|
||
SelectBankName,
|
||
[Icon.name]: Icon,
|
||
[IndexBar.name]: IndexBar,
|
||
[Area.name]: Area,
|
||
// [Dialog.name]: Dialo
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
@import '@/assets/sass/variables.scss';
|
||
#app .van-cell:not(:last-child)::after {
|
||
border-bottom: none;
|
||
}
|
||
.accountInformation-container {
|
||
height: 100%;
|
||
}
|
||
/deep/ .bankCard {
|
||
width: 120px;
|
||
height: 20px;
|
||
line-height: 20px;
|
||
border-radius: 10px;
|
||
}
|
||
/deep/ .van-list {
|
||
height: 400px;
|
||
}
|
||
.san_button {
|
||
width: 22px;
|
||
height: 22px;
|
||
}
|
||
.vanIcon {
|
||
position: absolute;
|
||
left: 140px;
|
||
}
|
||
/deep/ .van-field__left-icon .van-icon {
|
||
color: $red1;
|
||
font-weight: bold;
|
||
}
|
||
|
||
// /deep/ .van-dialog__footer{
|
||
// text-align: center;
|
||
// padding-bottom:20px
|
||
// }
|
||
/deep/ .van-dialog {
|
||
.van-button{
|
||
width: 45%;
|
||
background: red;
|
||
color: #fff;
|
||
}
|
||
}
|
||
.bankCardContract{
|
||
/deep/ .van-dialog__cancel{
|
||
background: #fff;
|
||
color: #323233;
|
||
}
|
||
/deep/ .van-dialog__confirm{
|
||
background: #fff;
|
||
color: red;
|
||
}
|
||
/deep/ .van-dialog__header{
|
||
color: red;
|
||
}
|
||
}
|
||
</style>
|