mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-12 14:56:45 +08:00
feature/GFRS-2301【需求】健康险渠道国富无忧卡金掌桂开发的需求--修改分享链接时效性,修改投保信息投保人与被保人身份证扫描组件修改,修改地址栏组件,修改保障方案金额展示,修改职业类型组件--提交人庞兴月
This commit is contained in:
@@ -188,19 +188,32 @@ service.interceptors.response.use(
|
||||
res = JSON.parse(AESTools.AESDecrypt(res.response, configApp.REQ_PWD))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Toast.clear()
|
||||
if (res.code != 0) {
|
||||
if (res.code == 10001 || res.code == 10002) {
|
||||
Dialog.confirm({
|
||||
confirmButtonText: '重新登录',
|
||||
message: '你已被登出,可以取消继续留在该页面,或者重新登录'
|
||||
}).then(() => {
|
||||
//eslint-disable-next-line
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'login'
|
||||
var ua = window.navigator.userAgent.toLowerCase();
|
||||
//通过正则表达式匹配ua中是否含有MicroMessenger字符串
|
||||
if(ua.match(/MicroMessenger/i) == 'micromessenger'){
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
confirmButtonText: '退出',
|
||||
message: '当前链接已失效,请您联系业务员获取(重新分享)。',
|
||||
}).then(() => {
|
||||
window.close();
|
||||
WeixinJSBridge.call('closeWindow');
|
||||
});
|
||||
} else {
|
||||
Dialog.confirm({
|
||||
confirmButtonText: '重新登录',
|
||||
message: '你已被登出,可以取消继续留在该页面,或者重新登录'
|
||||
}).then(() => {
|
||||
//eslint-disable-next-line
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'login'
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
} else {
|
||||
//Toast.fail(res.msg)
|
||||
}
|
||||
|
||||
295
src/components/ebiz/occipation/OccupationForLoop.vue
Normal file
295
src/components/ebiz/occipation/OccupationForLoop.vue
Normal file
@@ -0,0 +1,295 @@
|
||||
<template>
|
||||
<div class="occupation pb70">
|
||||
<van-search v-model="searchParams" @input="onSearch" placeholder="请输入搜索关键词" show-action shape="round" @clear="clearSearch" @search="onSearch">
|
||||
<div slot="action" @click="onSearch">搜索</div>
|
||||
</van-search>
|
||||
<div class="choose-result fs12 pl25" v-if="third.code">
|
||||
<p>职业代码:{{ third.code }}</p>
|
||||
<p>职业:{{ chooseName }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<div :class="[isSearch ? 'hidden' : '']">
|
||||
<p class="fs14 pl20 fwb pv5">常用职业</p>
|
||||
<div class="common-occupation flex flex-wrap fs12 ph25">
|
||||
<div v-for="(item, index) in commonList" @click="commonChoose(item, index)" :key="index" :class="[item.isActive ? 'active' : '', 'fwb']">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="[isSearch ? 'hidden' : '']">
|
||||
<p class="fs14 pl20 fwb pv5">全部职业</p>
|
||||
<div class="main-area fs12 ph10 pb20">
|
||||
<div class="item ph10">
|
||||
<p class="p5" v-for="(item, index) in occupationList" :key="index" @click="handleFirst(item)" :class="{ active: first.code == item.code }">
|
||||
{{ item.name }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item ph10">
|
||||
<p class="p5" v-for="(item, index) in sec" :key="index" @click="handleSec(item)" :class="{ active: second.code == item.code }">
|
||||
{{ item.name }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item ph10">
|
||||
<p class="p5" v-for="(item, index) in thi" :key="index" @click="handleThi(item)" :class="{ active: third.code == item.code }">
|
||||
{{ item.name }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="[isSearch ? '' : 'hidden']">
|
||||
<p class="fs14 pl20 fwb pv5">搜索结果</p>
|
||||
<div class="item p10 search-result fs14 flex flex-direction-colunm">
|
||||
<p class="p5 mv5" :class="[item.isActive ? 'active' : '']" v-for="(item, index) in searchList" @click="searchChoose(item, index)" :key="index">
|
||||
<span v-html="item.showName.replace(new RegExp(searchParams, 'g'), `<span class="red">${searchParams}</span>`)"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="close-btn fixed">
|
||||
<van-button type="danger" @click="ensureChoose">确认选择</van-button>
|
||||
<!-- <van-button type="primary" @click="$emit('chooseOccupation', '')">取消</van-button> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import occupationData from './data/occupation'
|
||||
import { getBankList } from '@/api/ebiz/sale/sale'
|
||||
import { Search, Sticky } from 'vant'
|
||||
export default {
|
||||
name: 'Occupation',
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
life: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
health: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
occupationList: [],
|
||||
sec: [], //二级数据
|
||||
thi: [], //三级数据
|
||||
choose: [],
|
||||
searchParams: '',
|
||||
first: {},
|
||||
second: {},
|
||||
third: {},
|
||||
chooseName: '',
|
||||
lifeGrade: '',
|
||||
healthGrade: '',
|
||||
commonList: [],
|
||||
isSearch: false, // 是否搜索中
|
||||
searchList: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[Search.name]: Search,
|
||||
[Sticky.name]: Sticky
|
||||
},
|
||||
watch: {
|
||||
code(newValue) {
|
||||
this.occupationList.forEach(occupation => {
|
||||
occupation.subs.forEach(sub => {
|
||||
sub.subs.forEach(occupaitonItem => {
|
||||
if (occupaitonItem.code == newValue) {
|
||||
this.first = occupation
|
||||
this.sec = occupation.subs
|
||||
this.second = sub
|
||||
this.thi = sub.subs
|
||||
this.third = occupaitonItem
|
||||
this.chooseName = this.third.name
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// let occupationData = JSON.parse(window.localStorage.getItem('OccupationList'))
|
||||
this.init(occupationData)
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.occupationList = data
|
||||
this.chooseName = this.name
|
||||
this.third.code = this.code
|
||||
this.lifeGrade = this.life
|
||||
this.healthGrade = this.health
|
||||
this.third = {}
|
||||
|
||||
getBankList({
|
||||
operateType: 'hot_occupation'
|
||||
}).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.commonList = res.content
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleFirst(item) {
|
||||
this.sec = item.subs
|
||||
this.first = item
|
||||
this.second = {}
|
||||
this.thi = []
|
||||
this.third = {}
|
||||
this.commonInit()
|
||||
},
|
||||
handleSec(item) {
|
||||
this.thi = item.subs
|
||||
this.second = item
|
||||
this.third = {}
|
||||
this.commonInit()
|
||||
},
|
||||
handleThi(item) {
|
||||
this.third = item
|
||||
this.chooseName = this.third.name
|
||||
this.commonInit()
|
||||
},
|
||||
ensureChoose() {
|
||||
if (this.third.code) {
|
||||
this.$emit('chooseOccupation', this.third)
|
||||
} else {
|
||||
this.$toast('请选择职业')
|
||||
}
|
||||
},
|
||||
onSearch() {
|
||||
this.sec = []
|
||||
this.thi = []
|
||||
this.first = {}
|
||||
this.second = {}
|
||||
this.third = {}
|
||||
this.commonInit()
|
||||
if (this.searchParams) {
|
||||
this.searchList = []
|
||||
this.isSearch = true
|
||||
this.occupationList.forEach(first => {
|
||||
first.subs.forEach(second => {
|
||||
second.subs.forEach(third => {
|
||||
if (third.name.indexOf(this.searchParams) != -1) {
|
||||
// this.searchList.push(Object.assign(third, { isActive: false }, { showName: first[index1].name + second[index2].name + third.name }))
|
||||
this.searchList.push(Object.assign(third, { isActive: false }, { showName: first.name + ' - ' + second.name + ' - ' + third.name }))
|
||||
console.log('first = ', first)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
console.log('this.searchList ==', this.searchList)
|
||||
} else {
|
||||
this.isSearch = false
|
||||
}
|
||||
},
|
||||
clearSearch() {
|
||||
this.init(occupationData)
|
||||
},
|
||||
commonChoose(item, index) {
|
||||
this.commonInit()
|
||||
this.commonList[index].isActive = true
|
||||
this.occupationList.forEach(occupation => {
|
||||
occupation.subs.forEach(sub => {
|
||||
sub.subs.forEach(occupaitonItem => {
|
||||
if (occupaitonItem.code == item.code) {
|
||||
this.first = occupation
|
||||
this.sec = occupation.subs
|
||||
this.second = sub
|
||||
this.thi = sub.subs
|
||||
this.third = occupaitonItem
|
||||
this.chooseName = this.third.name
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
searchChoose(item, index) {
|
||||
this.searchList.forEach(item => {
|
||||
item.isActive = false
|
||||
})
|
||||
this.searchList[index].isActive = true
|
||||
this.third = item
|
||||
this.chooseName = this.third.name
|
||||
},
|
||||
commonInit() {
|
||||
this.commonList.forEach(item => {
|
||||
item.isActive = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.close-btn {
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
.van-button {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.occupation {
|
||||
.main-area {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.item {
|
||||
width: 0;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 360px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.choose-result {
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
line-height: 20px;
|
||||
color: #e9332e;
|
||||
box-sizing: border-box;
|
||||
height: 40px;
|
||||
}
|
||||
.hidden {
|
||||
visibility: hidden;
|
||||
}
|
||||
.common-occupation {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
// flex-wrap: wrap;
|
||||
align-items: center;
|
||||
div {
|
||||
// width: 30%;
|
||||
// height: 20px;
|
||||
padding: 4px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
border: 1px solid #f2f2f2;
|
||||
margin: 5px;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.active {
|
||||
color: #e9332e;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.search-result {
|
||||
height: 420px;
|
||||
overflow-y: auto;
|
||||
p {
|
||||
// margin: 0 auto;
|
||||
text-align: left;
|
||||
min-width: 120px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -750,31 +750,35 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
async share() {
|
||||
async share() {
|
||||
let valid = await this.$validator.validate()
|
||||
console.log(valid)
|
||||
if (true !== valid) {
|
||||
console.log(this.$validator)
|
||||
return this.$toast(this.$validator.errors.all()[0])
|
||||
}
|
||||
let shareName = this.underWriteData.appntName
|
||||
localStorage.appntName = this.underWriteData.appntName
|
||||
let shareName = this.underWriteData.name
|
||||
localStorage.name = this.underWriteData.name
|
||||
localStorage.bankName = this.underWriteData.bankName
|
||||
localStorage.bankCode = this.underWriteData.bankCode
|
||||
localStorage.bankListName = this.bankListName
|
||||
console.log(this.underWriteData.bankName, this.underWriteData.bankCode, this.bankListName, this.underWriteData.name)
|
||||
let url = location.origin + '/#/cardList/phoneCode?orderNo=' + localStorage.orderNo + '&token=' + localStorage.token
|
||||
console.log(url)
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: `国富人寿卡单投保(${shareName})付款`,
|
||||
content: '付款进行',
|
||||
url: url,
|
||||
img: this.$assetsUrl + 'images/logo.png',
|
||||
},
|
||||
})
|
||||
},
|
||||
console.log(this.underWriteData.bankName, this.underWriteData.bankCode, this.bankListName, this.underWriteData.name)
|
||||
let res = await getShareParam({ shareType: 'card_pay' })
|
||||
let url = location.origin + '/#/cardList/pay?orderNo=' + localStorage.orderNo + '&token=' + res.content
|
||||
if (res.result == '0') {
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: `国富人寿卡单投保(${shareName})付款`,
|
||||
content: '付款进行',
|
||||
url: url,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return this.$toast(res.resultMessage)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
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-button v-if="userInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3','','1')">证件扫描</van-button>
|
||||
</van-field>
|
||||
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.sex"></select-radio>
|
||||
<FieldDatePicter
|
||||
@@ -65,22 +65,7 @@
|
||||
/>
|
||||
<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 /> -->
|
||||
<!-- <template v-if="false"> -->
|
||||
<occupation-picker
|
||||
:value.sync="userInfo.occupationCode"
|
||||
:chooseName.sync="userInfo.occupationName"
|
||||
:lifeGrade.sync="userInfo.lifeGrade"
|
||||
:healthGrade.sync="userInfo.healthGrade"
|
||||
clearable
|
||||
label="职业类别"
|
||||
name="职业类别"
|
||||
required
|
||||
v-validate="'required'"
|
||||
placeholder="请选择"
|
||||
:parentShowPicker.sync="occupationShowPicker"
|
||||
@on-click="selectClick('2')"
|
||||
@on-choose="chooseOccupation"
|
||||
/>
|
||||
<van-field @click="openOccupation('1')" label="职业类别" placeholder="请输入" name="职业类别" :value="userInfo.occupationName" right-icon="arrow" />
|
||||
<van-field
|
||||
:value="userInfo.nativeplace | idToText('nativeplace')"
|
||||
readonly
|
||||
@@ -112,7 +97,7 @@
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
v-validate="'required'"
|
||||
@click="homeShow = true"
|
||||
@click="areaSelect('1')"
|
||||
/>
|
||||
<van-field v-model="userInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
<!-- </template> -->
|
||||
@@ -165,7 +150,7 @@
|
||||
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-button v-if="insuredInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3','','2')">证件扫描</van-button>
|
||||
</van-field>
|
||||
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.insuredSex"></select-radio>
|
||||
<FieldDatePicter
|
||||
@@ -190,22 +175,8 @@
|
||||
v-validate="'required|mobile'"
|
||||
maxlength="11"
|
||||
/>
|
||||
<van-field v-model="insuredInfo.email" required label="邮箱" name="邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
|
||||
<occupation-picker
|
||||
:value.sync="insuredInfo.occupationCode"
|
||||
:chooseName.sync="insuredInfo.occupationName"
|
||||
:lifeGrade.sync="insuredInfo.lifeGrade"
|
||||
:healthGrade.sync="insuredInfo.healthGrade"
|
||||
clearable
|
||||
label="职业类别"
|
||||
name="职业类别"
|
||||
required
|
||||
v-validate="'required'"
|
||||
placeholder="请选择"
|
||||
:parentShowPicker.sync="occupationShowPicker"
|
||||
@on-click="selectClick('2')"
|
||||
@on-choose="chooseOccupation"
|
||||
/>
|
||||
<van-field v-model="insuredInfo.email" required label="邮箱" name="邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
|
||||
<van-field @click="openOccupation('2')" label="职业类别" placeholder="请输入" name="职业类别" :value="insuredInfo.occupationName" right-icon="arrow" />
|
||||
<van-field
|
||||
:value="insuredInfo.nativeplace | idToText('nativeplace')"
|
||||
readonly
|
||||
@@ -215,7 +186,7 @@
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('1')"
|
||||
@click="toSelect('11')"
|
||||
/>
|
||||
<van-field
|
||||
:value="insuredInfo.marriage | idToText('marriage')"
|
||||
@@ -226,7 +197,7 @@
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('10')"
|
||||
@click="toSelect('66')"
|
||||
/>
|
||||
<van-field
|
||||
v-model="insuredInfo.homeName"
|
||||
@@ -237,7 +208,7 @@
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
v-validate="'required'"
|
||||
@click="homeShow = true"
|
||||
@click="areaSelect('2')"
|
||||
/>
|
||||
<van-field v-model="insuredInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
</van-cell-group>
|
||||
@@ -296,21 +267,7 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
<van-field v-model="userInfo.email" required label="邮箱" name="邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
|
||||
<occupation-picker
|
||||
:value.sync="userInfo.occupationCode"
|
||||
:chooseName.sync="userInfo.occupationName"
|
||||
:lifeGrade.sync="userInfo.lifeGrade"
|
||||
:healthGrade.sync="userInfo.healthGrade"
|
||||
clearable
|
||||
label="职业类别"
|
||||
name="职业类别"
|
||||
required
|
||||
v-validate="'required'"
|
||||
placeholder="请选择"
|
||||
:parentShowPicker.sync="occupationShowPicker"
|
||||
@on-click="selectClick('2')"
|
||||
@on-choose="chooseOccupation"
|
||||
/>
|
||||
<van-field readonly label="职业类别" name="职业类别" :value="userInfo.occupationName" right-icon="arrow" />
|
||||
<van-field
|
||||
:value="userInfo.nativeplace | idToText('nativeplace')"
|
||||
readonly
|
||||
@@ -319,8 +276,7 @@
|
||||
name="国籍"
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('1')"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
<van-field
|
||||
:value="userInfo.marriage | idToText('marriage')"
|
||||
@@ -330,8 +286,7 @@
|
||||
name="婚姻状况"
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('6')"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
<van-field
|
||||
v-model="userInfo.homeName"
|
||||
@@ -341,10 +296,9 @@
|
||||
required
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
v-validate="'required'"
|
||||
@click="homeShow = true"
|
||||
v-validate="'required'"
|
||||
/>
|
||||
<van-field v-model="userInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
<van-field readonly v-model="userInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
</van-cell-group>
|
||||
<!-- 受益人信息 -->
|
||||
<van-cell-group class="mt10">
|
||||
@@ -361,7 +315,7 @@
|
||||
v-validate="'required'"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect('12')"
|
||||
@click="toSelect('10')"
|
||||
/>
|
||||
<FieldDatePicter
|
||||
v-validate="'required'"
|
||||
@@ -401,17 +355,21 @@
|
||||
<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="occupationShowPicker" position="bottom">
|
||||
<occupation-for-loop @chooseOccupation="chooseOccupation" :name="occupationName" :code="occupationCode"></occupation-for-loop>
|
||||
</van-popup>
|
||||
<!-- 字段选择 -->
|
||||
<van-popup v-model="popupShow" position="bottom">
|
||||
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
|
||||
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" :default-index="pickerIndex" @cancel="popupShow = false" />
|
||||
</van-popup>
|
||||
<!-- 地区选择 -->
|
||||
<van-popup v-model="areaShow" position="bottom">
|
||||
<!-- <van-popup v-model="areaShow" position="bottom">
|
||||
<van-area :area-list="areaList" value="110101" @confirm="sureArea($event, '1')" @cancel="areaShow = false" />
|
||||
</van-popup>
|
||||
</van-popup> -->
|
||||
<!-- 家庭地址选择 -->
|
||||
<van-popup v-model="homeShow" position="bottom">
|
||||
<van-area :area-list="areaList" value="110101" @confirm="sureArea($event, '2')" @cancel="homeShow = false" />
|
||||
<van-area :area-list="areaList" :value="areaCode" @confirm="sureArea($event, '2')" @cancel="homeShow = false" />
|
||||
</van-popup>
|
||||
<!-- 户籍选择 -->
|
||||
<van-popup v-model="censusShow" position="bottom">
|
||||
@@ -439,7 +397,9 @@ import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
|
||||
import afterDate from '@/assets/js/utils/getAfterDate.js'
|
||||
import CacheUtils from '@/assets/js/utils/cacheUtils'
|
||||
import { idToData } from './js/verification'
|
||||
import OccupationForLoop from '@/components/ebiz/occipation/OccupationForLoop'
|
||||
import { selectComp, getIdentityInfo } from './js/methods'
|
||||
import Vue from 'vue'
|
||||
import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant'
|
||||
@@ -462,6 +422,7 @@ export default {
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio,
|
||||
[IdentityCardScan.name]: IdentityCardScan,
|
||||
OccupationForLoop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -562,8 +523,11 @@ export default {
|
||||
occupationShowPicker: false,
|
||||
timeId: null,
|
||||
chooseProducts: JSON.parse(localStorage.chooseProducts),
|
||||
trialList: JSON.parse(localStorage.trialList),
|
||||
trialList: JSON.parse(CacheUtils.getLocItem('trialList')),
|
||||
pdf: ['', '', ''],
|
||||
insureType: '',
|
||||
pickerIndex: 0,
|
||||
areaCode: '110101',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -595,6 +559,53 @@ export default {
|
||||
this.allPrice = this.trialList[0].prem
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @description:
|
||||
* @param {*} data
|
||||
* @return {*}
|
||||
*/
|
||||
chooseOccupation(data) {
|
||||
let { code, name, healthGrade, lifeGrade } = data
|
||||
this.$jump({
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '职业类别',
|
||||
hiddenRight: '1'
|
||||
}
|
||||
})
|
||||
this.occupationShowPicker = false
|
||||
if (this.insureType === '1') {
|
||||
this.userInfo.occupationName = name
|
||||
this.userInfo.occupationCode = code
|
||||
} else if (this.insureType === '2') {
|
||||
this.insuredInfo.occupationName = name
|
||||
this.insuredInfo.occupationCode = code
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @description:
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
openOccupation(insureType) {
|
||||
this.occupationShowPicker = !this.occupationShowPicker
|
||||
this.insureType = insureType
|
||||
if (this.insureType === '1') {
|
||||
this.occupationName = this.userInfo.occupationName
|
||||
this.occupationCode = this.userInfo.occupationCode
|
||||
} else if (this.insureType === '2') {
|
||||
this.occupationName = this.insuredInfo.occupationName
|
||||
this.occupationCode = this.insuredInfo.occupationCode
|
||||
}
|
||||
},
|
||||
areaSelect(insureType) {
|
||||
;[this.homeShow, this.insureType] = [true, insureType]
|
||||
if (insureType === '1') {
|
||||
this.areaCode = this.userInfo.homeArea
|
||||
} else if (insureType === '2') {
|
||||
this.areaCode = this.insuredInfo.homeArea
|
||||
}
|
||||
},
|
||||
underWrite(orderNo) {
|
||||
let data = {
|
||||
platform: 'app',
|
||||
@@ -659,13 +670,22 @@ export default {
|
||||
// console.log('name',name)
|
||||
this.insuredInfo.name = name
|
||||
},
|
||||
selectClick(index, value) {
|
||||
/**
|
||||
* @description:
|
||||
* @param {*} index
|
||||
* @param {*} value
|
||||
* @param {*} insureType '1'为投保人 '2'为被投保人
|
||||
* @return {*}
|
||||
*/
|
||||
selectClick(index, value, insureType) {
|
||||
if (value !== undefined) {
|
||||
this.selectUser = value
|
||||
this.selectUser = value
|
||||
}
|
||||
this.insureType = insureType
|
||||
selectComp(this, index, insureType)
|
||||
// console.log(index, value)
|
||||
// localStorage.setItem('value', value)
|
||||
selectComp(this, index, '1')
|
||||
|
||||
},
|
||||
// closeBtn() {
|
||||
// // 筛选按钮的显示
|
||||
@@ -702,24 +722,14 @@ export default {
|
||||
this.isScan = false
|
||||
}
|
||||
},
|
||||
chooseOccupation() {
|
||||
this.$jump({
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '投被保人信息',
|
||||
hiddenRight: '1',
|
||||
},
|
||||
})
|
||||
this.occupationShowPicker = false
|
||||
},
|
||||
//弹框选择
|
||||
toSelect(pickerType, valueKey) {
|
||||
console.log(valueKey)
|
||||
toSelect(pickerType, valueKey) {
|
||||
//pickerType 1、国家地区 2、证件类型 3、文化程度 4、有无社保(弃用) 5、税收居民身份 6、婚姻状况 7、在职情况 8、收入来源, 9 关系
|
||||
;[this.popupShow, this.pickerType] = [true, pickerType]
|
||||
if (valueKey) this.valueKey = valueKey
|
||||
if (pickerType == '1') {
|
||||
this.columns = DataDictionary.nativeplace
|
||||
this.columns = DataDictionary.nativeplace
|
||||
this.pickerIndex = (this.userInfo.nativeplace-1) > 0 ? (this.userInfo.nativeplace-1) : 0
|
||||
} else if (pickerType == '2') {
|
||||
this.columns = DataDictionary.insuredIdType
|
||||
} else if (pickerType == '3') {
|
||||
@@ -733,20 +743,84 @@ export default {
|
||||
this.columns = DataDictionary.taxIdentity
|
||||
} else if (pickerType == '6') {
|
||||
this.columns = DataDictionary.marriage
|
||||
this.pickerIndex = (this.userInfo.marriage-1) > 0 ? (this.userInfo.marriage-1) : 0
|
||||
} else if (pickerType == '7') {
|
||||
this.columns = DataDictionary.workCondition
|
||||
} else if (pickerType == '8') {
|
||||
this.columns = DataDictionary.salarySource
|
||||
} else if (pickerType == '9') {
|
||||
this.columns = DataDictionary.relationToAppnt
|
||||
} else if (pickerType == '10') {
|
||||
} else if (pickerType == '66') {
|
||||
this.columns = DataDictionary.marriage
|
||||
this.pickerIndex = (this.insuredInfo.marriage-1) > 0 ? (this.insuredInfo.marriage-1) : 0
|
||||
} else if (pickerType == '11') {
|
||||
this.columns = DataDictionary.insuredIdType
|
||||
} else if (pickerType == '12') {
|
||||
this.columns = DataDictionary.nativeplace
|
||||
this.pickerIndex = (this.insuredInfo.nativeplace-1) > 0 ? (this.insuredInfo.nativeplace-1) : 0
|
||||
} else if (pickerType == '10') {
|
||||
|
||||
this.trialList = `{
|
||||
"code": 0,
|
||||
"message": "成功",
|
||||
"content": {
|
||||
"result": "0",
|
||||
"resultMessage": "",
|
||||
"content": null,
|
||||
"trialList": [
|
||||
{
|
||||
"productCode": "GFRS_M0041",
|
||||
"amt": null,
|
||||
"standPrem": null,
|
||||
"prem": 100,
|
||||
"isMainRisk": null,
|
||||
"isRemit": null,
|
||||
"remitType": null,
|
||||
"duty": null,
|
||||
"showPrem": 100,
|
||||
"trialType": null,
|
||||
"schemeName": "国富无忧卡A",
|
||||
"schemeCode": "M0041A",
|
||||
"timeliness": 3
|
||||
},
|
||||
{
|
||||
"productCode": "GFRS_M0041",
|
||||
"amt": null,
|
||||
"standPrem": null,
|
||||
"prem": 200,
|
||||
"isMainRisk": null,
|
||||
"isRemit": null,
|
||||
"remitType": null,
|
||||
"duty": null,
|
||||
"showPrem": 200,
|
||||
"trialType": null,
|
||||
"schemeName": "国富无忧卡B",
|
||||
"schemeCode": "M0041B",
|
||||
"timeliness": 3
|
||||
},
|
||||
{
|
||||
"productCode": "GFRS_M0041",
|
||||
"amt": null,
|
||||
"standPrem": null,
|
||||
"prem": 300,
|
||||
"isMainRisk": null,
|
||||
"isRemit": null,
|
||||
"remitType": null,
|
||||
"duty": null,
|
||||
"showPrem": 300,
|
||||
"trialType": null,
|
||||
"schemeName": "国富无忧卡C",
|
||||
"schemeCode": "M0041C",
|
||||
"timeliness": 3
|
||||
}
|
||||
],
|
||||
"flag": "0"
|
||||
}
|
||||
}`
|
||||
this.columns = []
|
||||
this.trialList = JSON.parse(this.trialList).content.trialList;
|
||||
console.log(this.trialList, '================this.trialList================')
|
||||
this.trialList.forEach((item)=>{
|
||||
this.columns.push({
|
||||
id:schemeCode,
|
||||
id:item.schemeCode,
|
||||
text:item.schemeName
|
||||
})
|
||||
})
|
||||
@@ -780,15 +854,21 @@ export default {
|
||||
} else if (this.pickerType == '8') {
|
||||
this.userInfo.salarySource = value.id
|
||||
} else if (this.pickerType == '9') {
|
||||
this.userInfo.relationToInsured = value.id
|
||||
} else if (this.pickerType == '10') {
|
||||
this.insuredInfo.marriage = value.text
|
||||
this.userInfo.relationToInsured = value.id
|
||||
} else if (this.pickerType == '66') {
|
||||
this.insuredInfo.marriage = value.id
|
||||
this.insuredInfo.marriageStatus = value.text
|
||||
} else if (this.pickerType == '11') {
|
||||
this.insuredInfo.idType = value.id
|
||||
} else if (this.pickerType == '12') {
|
||||
} else if (this.pickerType == '11') {
|
||||
this.insuredInfo.nativeplace = value.id
|
||||
} else if (this.pickerType == '10') {
|
||||
this.schemeName = value.text
|
||||
this.schemeCode = value.id
|
||||
this.schemeCode = value.id
|
||||
for (let item of this.trialList) {
|
||||
if (item.schemeCode === this.schemeCode) {
|
||||
this.allPrice = item.prem
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//证件起始截止日期
|
||||
@@ -889,20 +969,20 @@ export default {
|
||||
{
|
||||
//指定生效日期
|
||||
//如果录入日期晚于当前日期
|
||||
// if (Date.parse(val) < Date.parse(new Date())) {
|
||||
// this.userInfo.birthday = ''
|
||||
// this.$refs.birthday.date = ''
|
||||
// return this.$toast('当前日期早于当日')
|
||||
// }
|
||||
// console.log(val)
|
||||
// console.log(Date.parse(val))
|
||||
// console.log(new Date())
|
||||
// let str = '',flag='',date='',valArr=val.split('-');
|
||||
// switch (flag){
|
||||
// case 'd':
|
||||
// str = valArr[2]+date
|
||||
// break;
|
||||
// }
|
||||
if (Date.parse(val) < Date.parse(new Date())) {
|
||||
return this.$toast('当前日期早于当日')
|
||||
}
|
||||
let currentDataArr = val.split('-')
|
||||
let currentData = currentDataArr[0] + '年' + currentDataArr[1] + '月' + currentDataArr[2] + '日'
|
||||
let insuYear = JSON.parse(localStorage.insuYear)
|
||||
switch (insuYear.insuYearFlag){
|
||||
case 'D':
|
||||
var hoDate = Date.parse(val)/1000 + insuYear['insuYear']*24*3600
|
||||
break;
|
||||
}
|
||||
var productDate = new Date(parseInt(hoDate) * 1000);
|
||||
var productDateTime = productDate.getFullYear() + '年' + (productDate.getMonth() + 1) + '月' + productDate.getDate() + '日';
|
||||
this.productDate = currentData + '至' + productDateTime + '时止'
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -967,6 +1047,22 @@ export default {
|
||||
this.insuredInfo.idType = data.customerIdType //证件类型
|
||||
this.insuredInfo.idNo = data.customerIdNumber //证件类别
|
||||
}
|
||||
|
||||
this.insuredInfo.email = data.email //邮箱
|
||||
this.insuredInfo.mobile = data.customerPhone //移动电话
|
||||
this.insuredInfo.homeProvince = data.homeProvince //家庭省
|
||||
this.insuredInfo.homeCity = data.homeCity //家庭市
|
||||
this.insuredInfo.homeArea = data.homeArea //家庭区
|
||||
if (data.homeProvince && data.homeCity && data.homeArea) {
|
||||
this.insuredInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
|
||||
}
|
||||
this.insuredInfo.homeAddress = data.homeAddress //家庭详细地址
|
||||
this.insuredInfo.occupationCode = data.occupationCode
|
||||
this.insuredInfo.occupationName = data.occupationName
|
||||
this.insuredInfo.lifeGrade = data.lifeGrade
|
||||
this.insuredInfo.healthGrade = data.healthGrade
|
||||
this.insuredInfo.nativeplace = data.country
|
||||
this.insuredInfo.marriage = data.marryStatus
|
||||
// 计算年龄
|
||||
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
|
||||
@@ -1202,19 +1298,14 @@ export default {
|
||||
let params = {
|
||||
orderDTO: {
|
||||
orderInfoDTO: {
|
||||
bnfFlag: '0',
|
||||
// cvaliDate: this.cvaliDate
|
||||
bnfFlag: '0',
|
||||
supportBank: '0'
|
||||
},
|
||||
appntDTO: {},
|
||||
insuredDTOs: [
|
||||
{
|
||||
riskDTOLst: this.riskDTOLst,
|
||||
},
|
||||
],
|
||||
appntDTO: this.userInfo,
|
||||
insuredDTOs: [this.insuredInfo]
|
||||
},
|
||||
}
|
||||
params.orderDTO.appntDTO = this.userInfo
|
||||
params.orderDTO.insuredDTOs = [this.insuredInfo]
|
||||
|
||||
//组装险种提交数据
|
||||
let [mainRiskCode, riskDTOLst] = ['', []]
|
||||
let rollInResult = '' //校验预计转入保费结果
|
||||
@@ -1261,7 +1352,10 @@ export default {
|
||||
// this.trialInfos[index].amt = this.trialList[0].prem
|
||||
// }
|
||||
// console.log()
|
||||
// riskItem = Object.assign(riskItem, this.trialInfos[index])
|
||||
// riskItem = Object.assign(riskItem, this.trialInfos[index])
|
||||
//todo
|
||||
riskItem['proScheme'] = this.schemeName
|
||||
riskItem['proSchemeCode'] = this.schemeCode
|
||||
riskDTOLst.push(riskItem)
|
||||
})
|
||||
if (!rollInResult) {
|
||||
@@ -1301,10 +1395,16 @@ export default {
|
||||
;[this.userInfo.companyProvince, this.userInfo.companyCity, this.userInfo.companyArea] = [area[0].code, area[1].code, area[2].code]
|
||||
this.areaShow = false
|
||||
break
|
||||
case '2': //家庭地址
|
||||
this.userInfo.homeName = getAreaName(area)
|
||||
;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||
this.homeShow = false
|
||||
case '2': //家庭地址
|
||||
if (this.insureType === '1') {
|
||||
this.userInfo.homeName = getAreaName(area)
|
||||
;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||
this.homeShow = false
|
||||
} else if (this.insureType === '2') {
|
||||
this.insuredInfo.homeName = getAreaName(area)
|
||||
;[this.insuredInfo.homeProvince, this.insuredInfo.homeCity, this.insuredInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||
this.homeShow = false
|
||||
}
|
||||
break
|
||||
case '3': //户籍
|
||||
this.census = getAreaName(area)
|
||||
@@ -1315,7 +1415,7 @@ export default {
|
||||
},
|
||||
//获取身份证扫描信息
|
||||
getIdentityInfo(data) {
|
||||
getIdentityInfo(this, data, '1')
|
||||
getIdentityInfo(this, data, this.insureType)
|
||||
},
|
||||
// getIdentityInfo(data) {
|
||||
// console.log(data)
|
||||
|
||||
@@ -88,7 +88,7 @@ export function getIdentityInfo(that, data, type) {
|
||||
// 正面
|
||||
if (data.name && data.name != '待识别') {
|
||||
that.userInfo.insuredName = data.name
|
||||
that.userInfo.insuredidNo = data.idNo
|
||||
that.insuredInfo.idNo = that.userInfo.insuredidNo = data.idNo
|
||||
that.userInfo.insuredBirthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}`
|
||||
that.userInfo.insuredSex = data.gender == '男' ? '0' : '1'
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
import { Cell, Toast, Dialog } from 'vant'
|
||||
import { getProductDetails, getProductInfo, insureTrial } from '@/api/ebiz/cardList/cardList.js'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||
import CacheUtils from '@/assets/js/utils/cacheUtils'
|
||||
export default {
|
||||
name: 'Chanpingxiangqing.vue',
|
||||
components: {
|
||||
@@ -174,6 +175,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
localStorage.insuYear = JSON.stringify(this.trialInfos.insuYear[0])
|
||||
//保存附加险
|
||||
localStorage.addtionRiskLst = JSON.stringify(resultData.productTrialInfoDTO.addtionRiskLst)
|
||||
// console.log('resultData', resultData)
|
||||
@@ -227,8 +229,8 @@ export default {
|
||||
insureTrial(data)
|
||||
.then((res) => {
|
||||
console.log('resrrrrrr', res)
|
||||
if (res.result == 0) {
|
||||
localStorage.trialList = JSON.stringify(res.trialList)
|
||||
if (res.result == 0) {
|
||||
CacheUtils.setLocItem('trialList', JSON.stringify(res.trialList))
|
||||
} else {
|
||||
Toast.fail(res.resultMessage)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user