[fix] 添加查看条款功能,并通过eslint --fix 修复卡单模块代码

This commit is contained in:
tian.guangyuan
2020-04-21 14:48:00 +08:00
parent d97bba7845
commit 8b32ccdbaa
10 changed files with 372 additions and 281 deletions

View File

@@ -6,6 +6,8 @@ const pay = () => import('@/views/ebiz/cardList/Pay')
const payResult = () => import('@/views/ebiz/cardList/PayResult')
const paySuccess = () => import('@/views/ebiz/cardList/PaySuccess')
const payLoser = () => import('@/views/ebiz/cardList/PayLoser')
const ShowPDF = () => import('@/views/ebiz/cardList/ShowPDF')
export default [
{
path: '/cardList/information',
@@ -69,5 +71,15 @@ export default [
title: '支付失败',
index: 6
}
},
{
path: '/cardList/ShowPDF',
name: 'ShowPDF',
component: ShowPDF,
meta: {
title: '',
index: 7
}
}
]

View File

@@ -3,43 +3,45 @@
<div class="card-Insurance-box">
<div class="card-Insurance-header">
<div class="Tab">
<div class="tab" v-for="(item,index) in arr" :key="index" @click="fnTab(index)">
<span :class="{ac:iNow==index}">{{item}}</span>
<div class="tab" v-for="(item, index) in arr" :key="index" @click="fnTab(index)">
<span :class="{ ac: iNow == index }">{{ item }}</span>
</div>
</div>
<div class="show">
<ul
class="card-Products"
:style="(this.iNow==0) ? 'display:block':'display:none' "
>
<li v-for="(itemIcon,index) in list" :key="index" class="border-gb" @click="formsD(itemIcon.productCode)">
<ul class="card-Products" :style="this.iNow == 0 ? 'display:block' : 'display:none'">
<li v-for="(itemIcon, index) in list" :key="index" class="border-gb" @click="formsD(itemIcon.productCode)">
<div>
<img :src="itemIcon.productImageUrl" class="ml10" width="118" height="70" />
<img :src="itemIcon.productImageUrl" class="ml10" width="118" height="70" />
</div>
<div>
<p>{{itemIcon.productName}}</p>
<span>{{itemIcon.productDesc}}</span>
<p>{{ itemIcon.productName }}</p>
<span>{{ itemIcon.productDesc }}</span>
</div>
</li>
<template v-if="list.length === 0">
<li class="flex flex-direction-colunm align-items-c">
<img src="@/assets/images/pic_page-non.png" class="mt50" alt="" />
<p class="gray text-center pt20">暂无产品</p>
<img src="@/assets/images/pic_page-non.png" class="mt50" alt="" />
<p class="gray text-center pt20">暂无产品</p>
</li>
</template>
</ul>
<ul class="myCard" :style="(this.iNow==1) ? 'display:block':'display:none' ">
<li v-for="(itemiNow,index) in tAb" style=" border: 1px solid #dadada;box-shadow: 0 3px 9px 1px hsla(0, 0%, 80%, 0.35);" class="mb10 pl15 pt15" :key="index">
<p>{{itemiNow.h}}</p>
<span>{{itemiNow.span1}}</span>
<span>{{itemiNow.span2}}</span>
<span>{{itemiNow.span3}}</span>
<span>{{itemiNow.span4}}</span>
<ul class="myCard" :style="this.iNow == 1 ? 'display:block' : 'display:none'">
<li
v-for="(itemiNow, index) in tAb"
style=" border: 1px solid #dadada;box-shadow: 0 3px 9px 1px hsla(0, 0%, 80%, 0.35);"
class="mb10 pl15 pt15"
:key="index"
>
<p>{{ itemiNow.h }}</p>
<span>{{ itemiNow.span1 }}</span>
<span>{{ itemiNow.span2 }}</span>
<span>{{ itemiNow.span3 }}</span>
<span>{{ itemiNow.span4 }}</span>
</li>
<template v-if="tAb.length === 0">
<template v-if="tAb.length === 0">
<li class="flex flex-direction-colunm align-items-c">
<img src="@/assets/images/pic_page-non.png" class="mt50" alt="" />
<p class="gray text-center pt20">暂无产品</p>
<img src="@/assets/images/pic_page-non.png" class="mt50" alt="" />
<p class="gray text-center pt20">暂无产品</p>
</li>
</template>
</ul>
@@ -50,7 +52,6 @@
</template>
<script>
import icon1 from '@/assets/images/u10247.png'
import { getCardList } from '@/api/ebiz/cardList/cardList.js'
export default {
name: 'kadantoubao.vue',
@@ -151,14 +152,14 @@ export default {
getCardList(data)
.then(res => {
console.log('res', res)
if (res.result == 0) {
if (res.result == 0) {
this.list = res.productList
} else {
Toast.fail(res.resultMessage)
this.$toast.fail(res.resultMessage)
}
})
.catch(err => {
console.log("errerr", err)
console.log('errerr', err)
})
}
}

View File

@@ -1,31 +1,36 @@
<template>
<div class="pay">
<div v-if="!isScan">
<van-cell-group>
<van-field
v-model="underWriteData.appntName"
readonly
label="产品名称"
class="projuct"
/>
<van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
</van-cell-group>
<div v-if="!isScan">
<van-cell-group>
<van-field v-model="underWriteData.appntName" readonly label="产品名称" class="projuct" />
<van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
</van-cell-group>
<!-- 银行卡支付开始 -->
<div class="money">
<div>
<img src="../../../assets/images/u10280.png" alt style="margin-top:-5px;margin-right:10px;" />
<span class="oi">银行卡支付</span>
</div>
<div class="i mr20">
<van-radio-group v-model="radio" class="flex justify-content-fe">
<van-radio name="1"></van-radio>
</van-radio-group>
</div>
<div class="money">
<div>
<img src="../../../assets/images/u10280.png" alt style="margin-top:-5px;margin-right:10px;" />
<span class="oi">银行卡支付</span>
</div>
<div class="i mr20">
<van-radio-group v-model="radio" class="flex justify-content-fe">
<van-radio name="1"></van-radio>
</van-radio-group>
</div>
</div>
<!-- 银行卡支付结束 -->
<van-cell-group>
<van-field v-model="underWriteData.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" maxlength="6" clearable required />
<van-field v-model="underWriteData.bankCode" maxlength="19" label="银行卡号" name="银行卡号" placeholder="请输入" required clearable v-validate="'required|bankCard'" data-vv-name="银行卡号">
<van-field
v-model="underWriteData.bankCode"
maxlength="19"
label="银行卡号"
name="银行卡号"
placeholder="请输入"
required
clearable
v-validate="'required|bankCard'"
data-vv-name="银行卡号"
>
<van-button slot="button" size="small" type="danger" round @click="cardScanning('0')">银行卡扫描</van-button>
</van-field>
<van-field
@@ -40,7 +45,7 @@
data-vv-name="开户银行"
required
/>
<!-- <van-field v-model="bank" label="开户银行" placeholder="请选择" required @click="focus" readonly v-validate="'required'" data-vv-name="开户银行" /> -->
<!-- <van-field v-model="bank" label="开户银行" placeholder="请选择" required @click="focus" readonly v-validate="'required'" data-vv-name="开户银行" /> -->
</van-cell-group>
<!-- 第三方支付所需表单 -->
<form ref="payForm" :action="formActionUrl" method="post">
@@ -82,17 +87,17 @@
<div class="bg-white bottom-btn">
<van-button type="danger" size="large" @click="payMent" v-no-more-click="1000">支付</van-button>
</div>
</div>
<!-- 银行卡扫描按钮 -->
<van-popup v-model="isScan" style="height:100vh" position="bottom">
<BankCardScan :scanShow="isScan" :clear="isClear" @getScanInfo="getBankCardInfo"></BankCardScan>
</van-popup>
<!-- 开户银行选择 -->
<van-popup v-model="show" position="bottom" style="height:354px">
<van-list>
<van-cell v-for="item in bankList" :key="item.code" :title="item.bankName" class="text-center" @click="clickList(item.bankName, item.code)" />
</van-list>
</van-popup>
</div>
<!-- 银行卡扫描按钮 -->
<van-popup v-model="isScan" style="height:100vh" position="bottom">
<BankCardScan :scanShow="isScan" :clear="isClear" @getScanInfo="getBankCardInfo"></BankCardScan>
</van-popup>
<!-- 开户银行选择 -->
<van-popup v-model="show" position="bottom" style="height:354px">
<van-list>
<van-cell v-for="item in bankList" :key="item.code" :title="item.bankName" class="text-center" @click="clickList(item.bankName, item.code)" />
</van-list>
</van-popup>
</div>
</template>
@@ -185,16 +190,16 @@ export default {
window.appCallBack = this.appCallBack
// 获取银行卡
this.getBankList()
this.getOrderDetail()
// this.getOrderDetail()
// console.log('----保融form.action', config.payUrl)
// if (localStorage.salelist == '1') {
// 第一次支付 调核保获取
// this.underWrite()
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
// 第一次支付 调核保获取
// this.underWrite()
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
// } else {
// 再次支付 调详情 获取信息
this.getOrderDetail()
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
// 再次支付 调详情 获取信息
this.getOrderDetail()
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
// }
// console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
},
@@ -382,66 +387,66 @@ export default {
*/
let res = await saveOrUpdateAccount(data)
// .then(res => {
console.log('res', res)
that.$toast.clear()
if (res.result == '0') {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
}
let rs = await this.underWrite()
if (rs.result != '0') {
this.$toast.clear()
this.$toast(rs.resultMessage)
}
acceptInsurance(data).then(res => {
console.log('----取支付参数结果:', JSON.stringify(res))
// res = {'result':'0','resultMessage':'','content':null,'prtNo':'8186270000000008','payStatus':'4','amnt':'63700.00','appntName':'投保人','message':null,'brPayReturnData':{'result':'','resultMessage':'','content':null,'businessId':'1569125393518','businessNo':'8186270000000008','tradeSubType':'COMM','businessType':'SALE','systemType':'GF','money':63700,'businessSubType':'XDCB','thirdType':'0002','thirdName':null,'bankCode':'ABC','epayOrderNo':'1909221209536259999900','companyAccount':null,'tradeState':'TRADING','standardCode':'DEALING','standardMsg':null,'thirdOrderNo':null,'respRemark':null,'tradeTime':'2019-09-22T04:09:53.518+0000','description':'','version':'1','sourceNotecode':'8186270000000008','payType':'MIT01','expireDate':'20191010101010','transSeq':'20190922120953782','transSource':'MIT','applyEntity':'11860000','paymentCode':'8186270000000008','transDate':'20190922','rdSeq':'1909221209536259999900','settleMode':null,'cur':'CNY','transTime':'120953','ourAmount':63700,'fixUser':'1','insurer':'投保人','certType':'0','certNum':'110101199009210011','oppBank':'ABC','oppAct':'6228481200290317812','oppActName':'投保人','cellPhone':null,'purpose':null,'memo':null,'returnURL':'http://139.199.50.151/#/sale/payResult','notifyURL':'http://139.199.50.151:7000/api/v1/epay/epay/payResult','s3Sign':'e3f0581ec6b751337e8eca360a0746bc'}}
if (res.result == '0') {
// 1成 4支付中 2支付失败 8转批扣(无此情况)
this.payStatus = res.payStatus
if (this.payStatus == '1') {
this.$toast({ message: '当前投保单已支付成功,请返回列表页查询', duration: 5000 })
return
}
// 支付参数大小写转换
let keyMap = {}
for (let key in this.payParam) {
keyMap[key.toLowerCase()] = key
}
let paramKey
for (let rKey in res.brPayReturnData) {
if (keyMap.hasOwnProperty(rKey.toLowerCase())) {
paramKey = keyMap[rKey.toLowerCase()]
this.payParam[paramKey] = res.brPayReturnData[rKey]
}
}
console.log('----支付参数this.payParam:', JSON.stringify(this.payParam))
this.gotPayParam = true
this.$forceUpdate()
let thisRef = this
this.$nextTick(() => {
thisRef.$refs.payForm.submit() // 表单提交,发起支付,跳至收银台
})
window.localStorage.setItem('resMessage', res.resultMessage)
window.localStorage.setItem('payStatus', res.payStatus)
window.localStorage.setItem('payInfo', JSON.stringify(res))
} else {
that.$toast.clear()
that.$toast(res.resultMessage)
}
})
} else {
this.$toast(res.resultMessage)
console.log('res', res)
that.$toast.clear()
if (res.result == '0') {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
}
let rs = await this.underWrite()
if (rs.result != '0') {
this.$toast.clear()
this.$toast(rs.resultMessage)
}
acceptInsurance(data).then(res => {
console.log('----取支付参数结果:', JSON.stringify(res))
// res = {'result':'0','resultMessage':'','content':null,'prtNo':'8186270000000008','payStatus':'4','amnt':'63700.00','appntName':'投保人','message':null,'brPayReturnData':{'result':'','resultMessage':'','content':null,'businessId':'1569125393518','businessNo':'8186270000000008','tradeSubType':'COMM','businessType':'SALE','systemType':'GF','money':63700,'businessSubType':'XDCB','thirdType':'0002','thirdName':null,'bankCode':'ABC','epayOrderNo':'1909221209536259999900','companyAccount':null,'tradeState':'TRADING','standardCode':'DEALING','standardMsg':null,'thirdOrderNo':null,'respRemark':null,'tradeTime':'2019-09-22T04:09:53.518+0000','description':'','version':'1','sourceNotecode':'8186270000000008','payType':'MIT01','expireDate':'20191010101010','transSeq':'20190922120953782','transSource':'MIT','applyEntity':'11860000','paymentCode':'8186270000000008','transDate':'20190922','rdSeq':'1909221209536259999900','settleMode':null,'cur':'CNY','transTime':'120953','ourAmount':63700,'fixUser':'1','insurer':'投保人','certType':'0','certNum':'110101199009210011','oppBank':'ABC','oppAct':'6228481200290317812','oppActName':'投保人','cellPhone':null,'purpose':null,'memo':null,'returnURL':'http://139.199.50.151/#/sale/payResult','notifyURL':'http://139.199.50.151:7000/api/v1/epay/epay/payResult','s3Sign':'e3f0581ec6b751337e8eca360a0746bc'}}
if (res.result == '0') {
// 1成 4支付中 2支付失败 8转批扣(无此情况)
this.payStatus = res.payStatus
if (this.payStatus == '1') {
this.$toast({ message: '当前投保单已支付成功,请返回列表页查询', duration: 5000 })
return
}
// 支付参数大小写转换
let keyMap = {}
for (let key in this.payParam) {
keyMap[key.toLowerCase()] = key
}
let paramKey
for (let rKey in res.brPayReturnData) {
if (keyMap.hasOwnProperty(rKey.toLowerCase())) {
paramKey = keyMap[rKey.toLowerCase()]
this.payParam[paramKey] = res.brPayReturnData[rKey]
}
}
console.log('----支付参数this.payParam:', JSON.stringify(this.payParam))
this.gotPayParam = true
this.$forceUpdate()
let thisRef = this
this.$nextTick(() => {
thisRef.$refs.payForm.submit() // 表单提交,发起支付,跳至收银台
})
window.localStorage.setItem('resMessage', res.resultMessage)
window.localStorage.setItem('payStatus', res.payStatus)
window.localStorage.setItem('payInfo', JSON.stringify(res))
} else {
that.$toast.clear()
that.$toast(res.resultMessage)
}
})
} else {
this.$toast(res.resultMessage)
}
// })
}
}

View File

@@ -1,52 +1,49 @@
<template>
<div class="PayLoser">
<div>
<img src="../../../assets/images/u10608.svg" alt="">
<p>支付失败</p>
</div>
<van-button type="info" size="large" class="payBtn">返回首页</van-button>
</div>
<div class="PayLoser">
<div>
<img src="../../../assets/images/u10608.svg" alt="" />
<p>支付失败</p>
</div>
<van-button type="info" size="large" class="payBtn">返回首页</van-button>
</div>
</template>
<script>
export default {
}
export default {}
</script>
<style lang="scss" scoped>
*{
margin: 0;
padding: 0;
<style lang="scss" scoped>
* {
margin: 0;
padding: 0;
}
html,body{
margin: 0;
padding: 0;
width:100%;
height:100%;
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
.PayLoser{
display: flex;
flex-direction:column;
height: 650px;
justify-content: space-between;
align-items: center;
img{
width:100px;
height: 100px;
}
}
.PayLoser>div:nth-of-type(1){
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
box-sizing: border-box;
margin-top: 100px;
p{
margin-top: 30px;
}
.PayLoser {
display: flex;
flex-direction: column;
height: 650px;
justify-content: space-between;
align-items: center;
img {
width: 100px;
height: 100px;
}
}
.PayLoser > div:nth-of-type(1) {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
box-sizing: border-box;
margin-top: 100px;
p {
margin-top: 30px;
}
}
</style>

View File

@@ -115,7 +115,7 @@ export default {
this.$toast(res.resultMessage)
}
})
},
}
// // 重新支付
// rePayMent() {
// // localStorage.orderNo = order.orderInfoDTO.orderNo

View File

@@ -2,7 +2,7 @@
<div class="paySuccess">
<template v-if="payStatus == '1'">
<div class="paySucc">
<van-icon name="passed" size="100px" color="#1296DB"/>
<van-icon name="passed" size="100px" color="#1296DB" />
<span>支付成功</span>
</div>
<van-cell-group>
@@ -13,15 +13,14 @@
</template>
<template v-else-if="payStatus == '2'">
<div class="flex flex-direction-colunm align-items-c pt100">
<img src="../../../assets/images/u10608.svg" class="w100 h100" alt="">
<p class="mt30">支付失败</p>
</div>
<div class="bg-white bottom-btn">
<van-button type="danger" size="large" class="payBtn">返回首页</van-button>
</div>
<img src="../../../assets/images/u10608.svg" class="w100 h100" alt="" />
<p class="mt30">支付失败</p>
</div>
<div class="bg-white bottom-btn">
<van-button type="danger" size="large" class="payBtn">返回首页</van-button>
</div>
</template>
</div>
</template>
<script>
@@ -52,7 +51,7 @@ export default {
appntName: '', // 投保人
prtNo: '', // 投保单号
amnt: '' // 支付金额
},
}
}
}
}

View File

@@ -0,0 +1,29 @@
<template>
<div>
<iframe :src="src + pdfUrl" style="width:100vw;height:100vh"></iframe>
</div>
</template>
<script>
export default {
data() {
return {
pdfUrl: '',
src: location.origin + '/pdfjs/web/viewer.html?file='
}
},
created() {
this.init()
},
mounted() {},
methods: {
init() {
let cardListPDF = JSON.parse(localStorage.cardListPDF)
console.log(cardListPDF)
this.pdfUrl = this.$mainUrl + cardListPDF.url
this.shareContent = cardListPDF.title
document.title = cardListPDF.title
}
}
}
</script>

View File

@@ -12,10 +12,10 @@
:parentShowPicker.sync="customerShowPicker"
:value.sync="userInfo.name"
@nameChange="nameChange"
@on-click="selectClick('1','0')"
@on-click="selectClick('1', '0')"
></customer-picker>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.sex"></select-radio>
<FieldDatePicter
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.sex"></select-radio>
<FieldDatePicter
v-validate="'required'"
label="出生日期"
name="出生日期"
@@ -40,25 +40,44 @@
@click="toSelect('2')"
/>
<!-- <van-field v-model="userInfo.idNo" v-validate="'required|idNo'" maxlength="18" label="证件号码" name="证件号码" placeholder="请输入" clearable> -->
<van-field v-model="userInfo.idNo" maxlength="18" required label="证件号码" v-validate="'required'" name="证件号码" placeholder="请输入" clearable @blur="getRelatedData(userInfo.idNo,'1')">
<van-field
v-model="userInfo.idNo"
maxlength="18"
required
label="证件号码"
v-validate="'required'"
name="证件号码"
placeholder="请输入"
clearable
@blur="getRelatedData(userInfo.idNo, '1')"
>
<van-button v-if="userInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3')">证件扫描</van-button>
</van-field>
<van-field required v-model="userInfo.mobile" clearable label="手机号码" name="手机号码" placeholder="请输入" v-validate="'required|mobile'" maxlength="11" />
<van-field
required
v-model="userInfo.mobile"
clearable
label="手机号码"
name="手机号码"
placeholder="请输入"
v-validate="'required|mobile'"
maxlength="11"
/>
<van-field v-model="userInfo.email" required label="邮箱" name="邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
<!-- <van-field v-model="userInfo.workcompany" required label="工作单位" name="工作单位" placeholder="请输入" v-validate="'required'" maxlength="50" clearable /> -->
<van-field
v-model="homeName"
readonly
label="地址"
name="地址"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@click="homeShow = true"
/>
<van-field v-model="userInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
<van-field
<van-field
v-model="homeName"
readonly
label="地址"
name="地址"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@click="homeShow = true"
/>
<van-field v-model="userInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
<van-field
:value="userInfo.relationToInsured | idToText('relationToAppnt')"
readonly
required
@@ -69,8 +88,8 @@
v-validate="'required'"
@click="toSelect('9')"
/>
</van-cell-group>
<!-- 被保人信息 -->
</van-cell-group>
<!-- 被保人信息 -->
<van-cell-group class="mt10">
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">被保人信息</p>
<customer-picker
@@ -82,10 +101,10 @@
:parentShowPicker.sync="customerShowPicker2"
:value.sync="insuredInfo.name"
@nameChange="nameChanges"
@on-click="selectClick('1','1')"
@on-click="selectClick('1', '1')"
></customer-picker>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.insuredSex"></select-radio>
<FieldDatePicter
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.insuredSex"></select-radio>
<FieldDatePicter
v-validate="'required'"
label="出生日期"
name="出生日期"
@@ -109,40 +128,51 @@
@click="toSelect('11')"
/>
<van-field v-model="insuredInfo.idNo" maxlength="18" required label="证件号码" v-validate="'required'" name="证件号码" placeholder="请输入" clearable @blur="getRelatedData(insuredInfo.idNo,'2')" >
<van-field
v-model="insuredInfo.idNo"
maxlength="18"
required
label="证件号码"
v-validate="'required'"
name="证件号码"
placeholder="请输入"
clearable
@blur="getRelatedData(insuredInfo.idNo, '2')"
>
<van-button v-if="insuredInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3')">证件扫描</van-button>
</van-field>
</van-cell-group>
</van-cell-group>
<!-- 受益人信息 -->
<van-cell-group class="mt10">
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">受益人信息</p>
<van-field required v-model="bnfTypeVal" clearable label="受益人类型" v-validate="'required'" style="border-bottom: 1px solid #ebedf0;"/>
</van-cell-group>
<p style="background:white;border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">产品信息</p>
<van-field required v-model="bnfTypeVal" clearable label="受益人类型" v-validate="'required'" style="border-bottom: 1px solid #ebedf0;" />
</van-cell-group>
<p style="background:white;border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">产品信息</p>
<FieldDatePicter
v-validate="'required'"
label="指定生效日期"
name="指定生效日期"
required
:minDate="now"
:value.sync="userInfo.effectiveDate"
type="date"
:flag="true"
@confirm="onDateConfirm($event, '6')"
ref="effectiveDate"
input-align:right
v-validate="'required'"
label="指定生效日期"
name="指定生效日期"
required
:minDate="now"
:value.sync="userInfo.effectiveDate"
type="date"
:flag="true"
@confirm="onDateConfirm($event, '6')"
ref="effectiveDate"
input-align:right
>
</FieldDatePicter>
<van-checkbox-group v-model="result" ref="checkboxGroup" style="height:34px;box-sizing:border-box;" class="pl8 pt10 bg-white">
<van-checkbox name="a" shape="square" icon-size="13px">我已阅读并同意投保须知</van-checkbox>
</van-checkbox-group>
<van-goods-action style="z-index: 99;">
<van-button type="default" style="width:50%;font-size:14px;height:40px;background:white"
>总保费:<span style="color:red;font-weight:bold;font-size:18px;font-weight:400;">{{ allPrice }}</span
></van-button
>
</FieldDatePicter>
<van-checkbox-group v-model="result" ref="checkboxGroup" style="height:34px;box-sizing:border-box;" class="pl8 pt10 bg-white">
<van-checkbox name="a" shape="square" icon-size="13px">我已阅读并同意投保须知</van-checkbox>
</van-checkbox-group>
<van-goods-action>
<van-button type="default" style="width:50%;font-size:14px;height:40px;background:white">总保费:<span style="color:red;font-weight:bold;font-size:18px;font-weight:400;">{{allPrice}}</span></van-button>
<van-goods-action-button type="danger" text="提交" @click="nextStep" v-no-more-click="1000" style="border-radius:0em;width:50%;height:40px;" />
</van-goods-action>
<van-goods-action-button type="danger" text="提交" @click="nextStep" v-no-more-click="1000" style="border-radius:0em;width:50%;height:40px;" />
</van-goods-action>
<!-- 字段选择 -->
<van-popup v-model="popupShow" position="bottom">
@@ -208,7 +238,7 @@ export default {
},
data() {
return {
now : new Date(),
now: new Date(),
isScan: false, //是否显示证件扫描组件
allPrice: 0,
result: [],
@@ -242,7 +272,7 @@ export default {
columns: [],
valueKey: 'text',
homeName: '', //家庭地址
bnfTypeVal:'法定受益人', //受益人类型文字展示
bnfTypeVal: '法定受益人', //受益人类型文字展示
//投保人信息
userInfo: {
name: '', //投保人姓名
@@ -321,7 +351,7 @@ export default {
this.insuredInfo.name = name
},
selectClick(index, value) {
if(value !== undefined){
if (value !== undefined) {
this.selectUser = value
}
// console.log(index, value)
@@ -352,9 +382,9 @@ export default {
}
})
if (this.currentPopupIndex == 1) {
if(this.selectUser == '1'){
if (this.selectUser == '1') {
this.customerShowPicker2 = false
}else{
} else {
this.customerShowPicker = false
}
} else if (this.currentPopupIndex == 2) {
@@ -386,7 +416,10 @@ export default {
} else if (pickerType == '3') {
this.columns = DataDictionary.degree
} else if (pickerType == '4') {
this.columns = [{ id: 0, text: '有' }, { id: 1, text: '无' }]
this.columns = [
{ id: 0, text: '有' },
{ id: 1, text: '无' }
]
} else if (pickerType == '5') {
this.columns = DataDictionary.taxIdentity
} else if (pickerType == '6') {
@@ -397,6 +430,8 @@ export default {
this.columns = DataDictionary.salarySource
} else if (pickerType == '9') {
this.columns = DataDictionary.relationToAppnt
} else if (pickerType == '11') {
this.columns = DataDictionary.insuredIdType
}
},
//确认选择字段
@@ -427,6 +462,10 @@ export default {
this.userInfo.salarySource = value.id
} else if (this.pickerType == '9') {
this.userInfo.relationToInsured = value.id
// 如果关系为本人,将投保人信息带入到被保人信息上
if(this.userInfo.relationToInsured == 1){
Object.assign(this.insuredInfo , this.userInfo)
}
} else if (this.pickerType == '11') {
this.insuredInfo.idType = value.id
}
@@ -530,9 +569,9 @@ export default {
//指定生效日期
//如果录入日期晚于当前日期
// if (Date.parse(val) < Date.parse(new Date())) {
// this.userInfo.birthday = ''
// this.$refs.birthday.date = ''
// return this.$toast('当前日期早于当日')
// this.userInfo.birthday = ''
// this.$refs.birthday.date = ''
// return this.$toast('当前日期早于当日')
// }
}
break
@@ -544,9 +583,9 @@ export default {
console.log(data)
console.log(typeof this.selectUser)
if(this.selectUser == '1'){
if (this.selectUser == '1') {
this.customerShowPicker2 = false
}else{
} else {
this.customerShowPicker = false
}
@@ -564,12 +603,13 @@ export default {
this.userInfo.birthday = data.birthday //出生日期
this.userInfo.idType = data.customerIdType //证件类型
this.userInfo.idNo = data.customerIdNumber //证件类别
this.userInfo.email = data.email //证件类别
this.userInfo.mobile = data.customerPhone //移动电话
this.userInfo.homeProvince = data.homeProvince //家庭省
this.userInfo.homeCity = data.homeCity //家庭市
this.userInfo.homeArea = data.homeArea //家庭区
if(data.homeProvince && data.homeCity && data.homeArea){
if (data.homeProvince && data.homeCity && data.homeArea) {
this.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
}
this.userInfo.homeAddress = data.homeAddress //家庭详细地址
@@ -577,7 +617,7 @@ export default {
// 计算年龄
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.getRelatedData(this.userInfo.idNo,'1')
this.getRelatedData(this.userInfo.idNo, '1')
} else if (this.selectUser == '1') {
let { customerName, customerSex } = data
this.insuredInfo.name = customerName //用户名
@@ -593,7 +633,7 @@ export default {
// 计算年龄
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.getRelatedData(this.insuredInfo.idNo,'2')
this.getRelatedData(this.insuredInfo.idNo, '2')
}
// console.log(data, val)
},
@@ -602,7 +642,11 @@ export default {
// console.log(this.userInfo.salarySource)
// console.log(this.userInfo.otherSalarySource)
//表单校验, 成功跳转
// if()
this.$validator.validate().then(valid => {
if (true === valid) {
// localStorage.chooseProductCodesNew = localStorage.chooseProductCodes
// 计算年龄
@@ -849,19 +893,19 @@ export default {
let resultData = await saveOrUpdateCard(params)
if (resultData.result == 0) {
console.log(' resultData.orderNo', resultData.content.object)
//存储被保人信息
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// localStorage.saleInsuredInfo = JSON.stringify({
// birthday: this.userInfo.birthday,
// name: this.userInfo.name,
// sex: this.userInfo.sex,
// idType: this.userInfo.idType,
// age
// })
// this.userInfo.age = age
// localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
// console.log(this.userInfo)
console.log(' resultData.orderNo', resultData.content.object)
//存储被保人信息
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// localStorage.saleInsuredInfo = JSON.stringify({
// birthday: this.userInfo.birthday,
// name: this.userInfo.name,
// sex: this.userInfo.sex,
// idType: this.userInfo.idType,
// age
// })
// this.userInfo.age = age
// localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
// console.log(this.userInfo)
localStorage.orderNo = resultData.content.object
this.$jump({

View File

@@ -3,9 +3,9 @@ export function selectComp(that, index, type = '') {
that.currentPopupIndex = index
let title = ''
if (index == 1) {
if(that.selectUser == '1'){
if (that.selectUser == '1') {
;[that.customerShowPicker2, title] = [true, '客户列表']
}else{
} else {
;[that.customerShowPicker, title] = [true, '客户列表']
}
// ;[that.customerShowPicker, title] = [true, '客户列表']

View File

@@ -5,17 +5,17 @@
</div>
<div class="pb50 pt10">
<van-cell
class="product-detail-list-item p10 fs12 fw400 bg-white"
:title="item.name"
is-link
v-for="(item, index) in docuList"
:key="index"
@click="goDocu(item.url, item.type, item.name)"
class="product-detail-list-item p10 fs12 fw400 bg-white"
:title="item.name"
is-link
v-for="(item, index) in docuList"
:key="index"
@click="goDocu(item.url, item.type, item.name)"
/>
</div>
<div class="bottom-area bottom-btn">
<van-button type="danger" size="large" @click="gotoInformation">下一步</van-button>
</div>
<div class="bottom-area bottom-btn">
<van-button type="danger" size="large" @click="gotoInformation">下一步</van-button>
</div>
</div>
</template>
@@ -36,7 +36,7 @@ export default {
introductImages: [],
docuList: [],
productCode: '',
results:[],
results: [],
trialInfos: []
}
},
@@ -49,14 +49,18 @@ export default {
},
methods: {
goDocu(url, type, name) {
let pdfUrl = encodeURIComponent(url)
console.log('pdfUrl', pdfUrl)
// let pdfUrl = //encodeURIComponent(url)
localStorage.setItem('cardListPDF', JSON.stringify({ documentUrl: url, title: name }))
console.log('url', url)
this.$jump({
flag: 'h5',
extra: {
title: name,
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码
url: this.$mainUrl + '/pdfjs/web/viewer.html?file=' + pdfUrl
url: location.origin + '/#/cardList/ShowPDF'
},
routerInfo: {
path: '/cardList/ShowPDF'
}
})
// 跳转到产品资料详情
@@ -173,8 +177,8 @@ export default {
// productsData = JSON.parse(localStorage.chooseProducts)
// productsData.push(currentProductInfo)
// } else {
productsData = [currentProductInfo]
console.log('productsDataproductsData', productsData)
productsData = [currentProductInfo]
console.log('productsDataproductsData', productsData)
// }
//保存选择险种
@@ -260,7 +264,7 @@ export default {
}
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
img {
width: 100%;
}