Merge branch 'devHuizhi' into prd

# Conflicts:
#	src/views/ebiz/sale/NotifyingMessage.vue
#	src/views/ebiz/serve/Detail.vue
This commit is contained in:
皮伟
2019-11-21 16:25:49 +08:00
19 changed files with 808 additions and 381 deletions

View File

@@ -684,12 +684,52 @@ export default {
{
shortName: '重疾险',
name: '国富人寿八桂无忧重大疾病保险B款',
code: 'GFRSPRO_M0001'
code: 'GFRS_M0001'
},
{
shortName: '年金险',
name: '国富人寿国富民鑫年金保险',
code: 'GFRSPRO_M0002'
code: 'GFRS_M0002'
},
{
shortName: '年金险',
name: '国富人寿金管家养老年金保险产品(万能型)',
code: 'GFRS_M0003'
},
{
shortName: '年金险',
name: '国富人寿瑞利年金保险',
code: 'GFRS_M0004'
},
{
shortName: '医疗险',
name: '国富人寿国富民惠医疗保险',
code: 'GFRS_M0005'
},
{
shortName: '年金险',
name: '国富人寿福宝宝教育年金保险',
code: 'GFRS_M0006'
},
{
shortName: '重疾险',
name: '国富人寿国富民安重大疾病保险',
code: 'GFRS_M0007'
},
{
shortName: '意外险',
name: '国富人寿综合意外伤害保险',
code: 'GFRS_M0008'
},
{
shortName: '重疾险',
name: '国富人寿国富民康重大疾病保险',
code: 'GFRS_M0009'
},
{
shortName: '重疾险',
name: '国富人寿八桂无忧重大疾病保险',
code: 'GFRS_M0010'
}
],
// 收入来源
@@ -745,79 +785,289 @@ export default {
],
// 民族
nationType: [
{ id: '01', text: '汉族' },
{ id: '02', text: '蒙古族' },
{ id: '03', text: '族' },
{ id: '04', text: '藏族' },
{ id: '05', text: '维吾尔族' },
{ id: '06', text: '苗族' },
{ id: '07', text: '族' },
{ id: '08', text: '壮族' },
{ id: '09', text: '布依族' },
{ id: '10', text: '朝鲜族' },
{ id: '11', text: '族' },
{ id: '12', text: '侗族' },
{ id: '13', text: '瑶族' },
{ id: '14', text: '白族' },
{ id: '15', text: '土家族' },
{ id: '16', text: '哈尼族' },
{ id: '17', text: '哈萨克族' },
{ id: '18', text: '傣族' },
{ id: '19', text: '黎族' },
{ id: '20', text: '傈僳族' },
{ id: '21', text: '佤族' },
{ id: '22', text: '畲族' },
{ id: '23', text: '高山族' },
{ id: '24', text: '拉祜族' },
{ id: '25', text: '水族' },
{ id: '26', text: '东乡族' },
{ id: '27', text: '纳西族' },
{ id: '28', text: '景颇族' },
{ id: '代码', text: '民族' },
{ id: '29', text: '柯尔克孜族' },
{ id: '30', text: '族' },
{ id: '31', text: '达斡尔族' },
{ id: '32', text: '仫佬族' },
{ id: '33', text: '羌族' },
{ id: '34', text: '布族' },
{ id: '35', text: '撒拉族' },
{ id: '36', text: '毛难族' },
{ id: '37', text: '仡佬族' },
{ id: '38', text: '锡伯族' },
{ id: '39', text: '阿昌族' },
{ id: '40', text: '普米族' },
{ id: '41', text: '塔吉克族' },
{ id: '42', text: '族' },
{ id: '43', text: '乌孜别克族' },
{ id: '44', text: '俄罗斯族' },
{ id: '45', text: '鄂温克族' },
{ id: '46', text: '崩龙族' },
{ id: '47', text: '保安族' },
{ id: '48', text: '裕固族' },
{ id: '49', text: '京族' },
{ id: '50', text: '塔塔尔族' },
{ id: '51', text: '独龙族' },
{ id: '52', text: '鄂伦春族' },
{ id: '53', text: '赫哲族' },
{ id: '54', text: '门巴族' },
{ id: '55', text: '珞巴族' },
{ id: '56', text: '基诺族' },
{ id: '97', text: '其他' },
{ id: '98', text: '外国血统' }
{
id: '01',
text: '族'
},
{
id: '02',
text: '蒙古族'
},
{
id: '03',
text: '族'
},
{
id: '04',
text: '族'
},
{
id: '05',
text: '维吾尔族'
},
{
id: '06',
text: '族'
},
{
id: '07',
text: '族'
},
{
id: '08',
text: '族'
},
{
id: '09',
text: '布族'
},
{
id: '10',
text: '朝鲜族'
},
{
id: '11',
text: '族'
},
{
id: '12',
text: '族'
},
{
id: '13',
text: '瑶族'
},
{
id: '14',
text: '族'
},
{
id: '15',
text: '土家族'
},
{
id: '16',
text: '哈尼族'
},
{
id: '17',
text: '哈萨克族'
},
{
id: '18',
text: '傣族'
},
{
id: '19',
text: '黎族'
},
{
id: '20',
text: '傈僳族'
},
{
id: '21',
text: '佤族'
},
{
id: '22',
text: '畲族'
},
{
id: '23',
text: '高山族'
},
{
id: '24',
text: '拉祜族'
},
{
id: '25',
text: '水族'
},
{
id: '26',
text: '东乡族'
},
{
id: '27',
text: '纳西族'
},
{
id: '28',
text: '景颇族'
},
{
id: '代码',
text: '民族'
},
{
id: '29',
text: '柯尔克孜族'
},
{
id: '30',
text: '土族'
},
{
id: '31',
text: '达斡尔族'
},
{
id: '32',
text: '仫佬族'
},
{
id: '33',
text: '羌族'
},
{
id: '34',
text: '布朗族'
},
{
id: '35',
text: '撒拉族'
},
{
id: '36',
text: '毛难族'
},
{
id: '37',
text: '仡佬族'
},
{
id: '38',
text: '锡伯族'
},
{
id: '39',
text: '阿昌族'
},
{
id: '40',
text: '普米族'
},
{
id: '41',
text: '塔吉克族'
},
{
id: '42',
text: '怒族'
},
{
id: '43',
text: '乌孜别克族'
},
{
id: '44',
text: '俄罗斯族'
},
{
id: '45',
text: '鄂温克族'
},
{
id: '46',
text: '崩龙族'
},
{
id: '47',
text: '保安族'
},
{
id: '48',
text: '裕固族'
},
{
id: '49',
text: '京族'
},
{
id: '50',
text: '塔塔尔族'
},
{
id: '51',
text: '独龙族'
},
{
id: '52',
text: '鄂伦春族'
},
{
id: '53',
text: '赫哲族'
},
{
id: '54',
text: '门巴族'
},
{
id: '55',
text: '珞巴族'
},
{
id: '56',
text: '基诺族'
},
{
id: '97',
text: '其他'
},
{
id: '98',
text: '外国血统'
}
],
//政治面貌
politicsStatus: [
{ id: '01', text: '中共党员' },
{ id: '02', text: '中共预备党员' },
{ id: '04', text: '民革党员' },
{ id: '05', text: '民盟盟员' },
{ id: '06', text: '民建会员' },
{ id: '07', text: '民进会员' },
{ id: '08', text: '农工党党员' },
{ id: '09', text: '致公党党员' },
{ id: '10', text: '九三学社社员' },
{ id: '11', text: '台盟盟员' },
{ id: '12', text: '无党派人士' }
{
id: '01',
text: '中共党员'
},
{
id: '02',
text: '中共预备党员'
},
{
id: '04',
text: '民革党员'
},
{
id: '05',
text: '民盟盟员'
},
{
id: '06',
text: '民建会员'
},
{
id: '07',
text: '民进会员'
},
{
id: '08',
text: '农工党党员'
},
{
id: '09',
text: '致公党党员'
},
{
id: '10',
text: '九三学社社员'
},
{
id: '11',
text: '台盟盟员'
},
{
id: '12',
text: '无党派人士'
}
],
rsIdType: [
{

View File

@@ -1,5 +1,7 @@
import Vue from 'vue'
import VeeValidate, { Validator } from 'vee-validate'
import VeeValidate, {
Validator
} from 'vee-validate'
import zh_CN from 'vee-validate/dist/locale/zh_CN'
import idNoCheck from './idNoCheck'
@@ -58,11 +60,11 @@ Validator.extend('age', {
return value > 17 && /^\d{1,3}$/.test(value)
}
})
//被保人年龄不得小于16周岁)
//被保人年龄不得小于18周岁)
Validator.extend('appntAge', {
getMessage: () => '年龄不得小于16周岁',
getMessage: () => '年龄不得小于18周岁',
validate: value => {
return value > 15 && /^\d{1,3}$/.test(value)
return value > 17 && /^\d{1,3}$/.test(value)
}
})

View File

@@ -514,7 +514,7 @@ export default {
this.chooseProducts.forEach(item => {
let trialInfo = {}
item.calFactorLst.forEach(factor => {
//type 类型 0为picker 1计步器 2
//type 类型 0为picker 1计步器 2职业等级
if (factor.type == 0) {
if (factor.hasFlag == '1') {
trialInfo[factor.code] = factor[factor.code]
@@ -552,7 +552,8 @@ export default {
birthday,
sex,
platformType: 'app',
productCode: item.productCode
productCode: item.productCode,
medical: JSON.parse(localStorage.getItem('saleInsuredPersonInfo')).medical
})
params.trialInfos.push(trialInfo)
})

View File

@@ -114,6 +114,11 @@ export default {
if (riskRules.lifeGradeLimit(resultData, this)) {
return
}
if (resultData.productCode == 'GFRS_M0006') {
if (riskRules.lifeGradeLimitForBaby(resultData, this)) {
return
}
}
/********end 主险选择限制 end******/
//保存附加险

View File

@@ -10,8 +10,8 @@ export default {
tips = '被保人年龄不适合此款险种,请选择其他险种!'
}
let minAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.minAge
let maxAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.maxAge
;[age, minAge, maxAge] = [Number(age), Number(minAge), Number(maxAge)]
let maxAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.maxAge;
[age, minAge, maxAge] = [Number(age), Number(minAge), Number(maxAge)]
if (age > maxAge || age < minAge) {
vm.$toast(tips)
return true
@@ -35,7 +35,7 @@ export default {
let healthGrade = resultData.productInsuredDTO.healthGrade
if (healthGrade == 0) return false
if (Number(cuttentHealthGrade) > Number(healthGrade)) {
vm.$toast('健康等级不适合此款险种,请选择其他险种!')
vm.$toast('健康职业等级不适合此款险种,请选择其他险种!')
return true
}
return false
@@ -46,7 +46,18 @@ export default {
let lifeGrade = resultData.productInsuredDTO.lifeGrade
if (lifeGrade == 0) return false
if (Number(cuttentLifeGrade) > Number(lifeGrade)) {
vm.$toast('寿险等级不适合此款险种,请选择其他险种!')
vm.$toast('寿险职业等级不适合此款险种,请选择其他险种!')
return true
}
return false
},
// 福宝宝产品寿险等级对主险影响
lifeGradeLimitForBaby(resultData, vm) {
let cuttentLifeGrade = this.getSaleInsuredInfo().lifeGrade
let lifeGrade = resultData.productInsuredDTO.lifeGrade
if (lifeGrade == 0) return false
if (Number(cuttentLifeGrade) > Number(lifeGrade)) {
vm.$toast('投保人寿险职业等级不适合此款险种,请选择其他险种!')
return true
}
return false

View File

@@ -202,7 +202,7 @@ export default {
this.appntDTO.age = String(this.appntDTO.age)
this.$validator.validate().then(valid => {
if (true === valid) {
//进行投保人年龄校验大于16周岁)
//进行投保人年龄校验大于18周岁)
let params = {
orderDTO: {
appntDTO: this.appntDTO,

View File

@@ -253,6 +253,7 @@ export default {
//在app端
params.proposalInfoDTO.proposalNo = localStorage.orderNo
getDemo(params).then(res => {
this.formatLocal(res)
})
}
@@ -332,9 +333,16 @@ export default {
},
//获取微信分享的标题
getWXTitle(insuredDTOs) {
dataDictionary.riskType.forEach(dataRisk => {
//根据数字字典来找到 险种简称
// console.log(insuredDTOs)
// console.log(insuredDTOs[0].mainRisk[0].riskCode)
// console.log(dataRisk.code)
if (insuredDTOs[0].mainRisk[0].riskCode == dataRisk.code) {
this.wxTitle = dataRisk.shortName + '计划书'
}
})

View File

@@ -5,6 +5,7 @@
<van-field
v-model="relationToAppnt"
readonly
required
label="是被保人的"
name="是被保人的"
right-icon="arrow"
@@ -17,6 +18,7 @@
v-validate="'required|name'"
name="姓名"
label="姓名"
required
:value.sync="userInfo.name"
:parentShowPicker.sync="customerShowPicker"
@nameChange="nameChange"
@@ -27,6 +29,7 @@
:value="userInfo.idType | idToText('idType')"
v-validate="'required'"
readonly
required
label="证件类型"
name="证件类型"
right-icon="arrow"
@@ -38,6 +41,7 @@
v-model="userInfo.idNo"
label="证件号码"
name="证件号码"
required
placeholder="请输入"
maxlength="18"
clearable
@@ -50,6 +54,7 @@
v-validate="'required'"
label="出生日期"
name="出生日期"
required
:value.sync="userInfo.birthday"
type="date"
:flag="true"
@@ -61,6 +66,7 @@
v-validate="'required'"
label="证件起始日期"
name="证件起始日期"
required
:value.sync="userInfo.certificateValidate"
type="date"
:defaultDate="new Date()"
@@ -73,6 +79,7 @@
:v-validate="{ required: certiexpiredateRequired }"
label="证件截止日期"
name="证件截止日期"
required
:defaultDate="new Date()"
:value.sync="userInfo.certiexpiredate"
type="date"
@@ -85,12 +92,13 @@
<van-checkbox v-model="userInfo.effectiveDateType" class="fr" :disabled="effectiveDateTypeAble" @change="effectiveDataTypeChange">长期</van-checkbox>
</div>
<!-- <van-field v-model="userInfo.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" :readonly="isInsured" /> -->
<select-radio :radios="sexRadio" :required="false" label="性别" :value.sync="userInfo.sex" :disabled="isInsured"></select-radio>
<select-radio :radios="sexRadio" required label="性别" :value.sync="userInfo.sex" :disabled="isInsured"></select-radio>
<van-field
:value="userInfo.nativeplace | idToText('nativeplace')"
readonly
label="国家/地区"
name="国家/地区"
required
v-validate="'required'"
right-icon="arrow"
placeholder="请选择"
@@ -101,6 +109,7 @@
clearable
label="联系电话"
name="联系电话"
required
placeholder="请输入"
v-validate="'required|mobile'"
maxlength="11"
@@ -111,6 +120,7 @@
readonly
label="联系地址"
name="联系地址"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -129,7 +139,7 @@
<div class="relative border-bt fs14 p10 flex align-center">
<van-checkbox v-model="userInfo.asAppntAddress" @change="asAppntAddress" :disabled="isInsured">同投保人</van-checkbox>
</div>
<van-field v-model="userInfo.email" label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable :readonly="isInsured" />
<van-field v-model="userInfo.email" required label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable :readonly="isInsured" />
<occupation-picker
:value.sync="userInfo.occupationCode"
:chooseName.sync="userInfo.occupationName"
@@ -138,18 +148,20 @@
clearable
label="职业类别"
name="职业类别"
required
v-validate="'required'"
placeholder="请选择"
:parentShowPicker.sync="occupationShowPicker"
@on-click="selectClick('2')"
@on-choose="chooseOccupation"
/>
<van-field v-model="userInfo.bnfOrder" readonly label="受益顺序" name="受益顺序" placeholder="请输入" v-validate="'required|onlyNumber'" maxlength="1" />
<van-field v-model="userInfo.bnfOrder" required readonly label="受益顺序" name="受益顺序" placeholder="请输入" v-validate="'required|onlyNumber'" maxlength="1" />
<van-field
v-model="userInfo.bnfLot"
label="受益比例(%)"
name="受益比例"
placeholder="请输入"
required
v-validate="'required|onlyNumber'"
maxlength="3"
clearable
@@ -586,6 +598,8 @@ export default {
this.effectiveDateTypeAble = age <= 45
//数据是否从客户列表拉取
this.fromCustomer = true
this.getRelatedData(this.userInfo.idNo)
},
nextStep() {
// 计算年龄

View File

@@ -274,7 +274,7 @@
<script>
import DataDictionary from '@/assets/js/utils/data-dictionary'
import { Cell, CellGroup, Field, Uploader, RadioGroup, Radio, Dialog, Picker, Popup } from 'vant'
import { uploadImg, saveInformation, getOrderDetail, check } from '@/api/ebiz/sale/sale'
import { uploadImg, saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
import config from '@/config'
export default {
data() {
@@ -485,7 +485,7 @@ export default {
// that.fileListBankInsured = []
// }
// 保费超过20万的提示
Dialog.alert({ title: '提示', message: '趸交保费≥20万元或期交保费*总期数≥20万元时须上传指定受益人证件正反面' })
// Dialog.alert({ title: '提示', message: '趸交保费≥20万元或期交保费*总期数≥20万元时须上传指定受益人证件正反面' })
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
@@ -747,27 +747,6 @@ export default {
let imageInfoType = ''
// if (that.type == 'fileListIdFrontInsured' && that.id == '1') {
// imageInfoType = '1'
// } else if (that.type == 'fileListIdBackInsured' && that.id == '1') {
// imageInfoType = '2'
// } else if (that.type == 'fileListBankInsured') {
// imageInfoType = '3'
// } else if (that.type == 'fileListIdFrontInsured' && that.id == '2') {
// imageInfoType = '5'
// } else if (that.type == 'fileListIdBackInsured' && that.id == '2') {
// imageInfoType = '6'
// } else if (that.type == 'fileLIstImgInsured' && that.id == '3') {
// imageInfoType = '7'
// } else if (that.type == 'fileLIstImgInsured' && that.id == '4') {
// imageInfoType = '8'
// } else if (that.type == 'fileLIstImgInsured' && that.id == '5') {
// imageInfoType = '9'
// } else if (that.type == 'fileLIstImgInsured' && that.id == '6') {
// imageInfoType = '10'
// } else if (that.type == 'saleInsuredPersonInfoOther' && that.id == '7') {
// imageInfoType = '11'
// }
if (that.type == 'fileListIdFrontInsured' && that.id == '1') {
imageInfoType = '1'
} else if (that.type == 'fileListIdBackInsured' && that.id == '1') {
@@ -810,8 +789,6 @@ export default {
fileName: that.imgName
}
// window.localStorage.setItem('obj', JSON.stringify(obj))
// that.list.push(JSON.parse(window.localStorage.getItem('obj')))
that.list.push(obj)
} else if (that.type == 'fileListOther') {
// 是其他
@@ -825,8 +802,7 @@ export default {
subBusinessNo: '',
fileName: that.imgName
}
// window.localStorage.setItem('obj', JSON.stringify(obj))
// that.list.push(JSON.parse(window.localStorage.getItem('obj')))
that.list.push(obj)
} else if (that.type == 'fileListtypebeneficiary') {
// 是受益人
@@ -842,7 +818,7 @@ export default {
}
that.list.push(obj)
}
// })
} else {
switch (that.type) {
case 'fileListIdFront':
@@ -933,7 +909,7 @@ export default {
},
orderType: 'MEDIA_ORDER'
}
// console.log(that.list)
saveInformation(data).then(res => {
if (res.result == '0') {

View File

@@ -290,7 +290,7 @@ export default {
if (res.result == '0') {
this.$toast.clear()
console.log('````````````')
console.log('接口拉去成功:' + res.signDTO.policyUrl)
// console.log('接口拉去成功:' + res.signDTO.policyUrl)
// window.localStorage.setItem('tips-PolicyUrl', res.signDTO.tipsPolicyUrl)
// window.localStorage.setItem('insurance-policyUrl', res.signDTO.policyUrl)
window.localStorage.setItem('detailJump', '')

View File

@@ -95,30 +95,29 @@ export default {
// 获取被保人信息
// that.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
}
if (this.detailJump != '1') {
this.getOrderDetail()
}
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('oneimgBase64Data')
let wxSigned = sessionStorage.getItem('onewxSigned')
let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
let wxSigned = sessionStorage.getItem('twowxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data: oneimgBase64Data:' + imgBase64Data)
console.log('imgBase64Data: twoimgBase64Data:' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
let rs = await this.getOrderDetail()
if (rs === 'success') {
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '1') {
this.appntSign.documentStatus = '3'
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
@@ -126,11 +125,12 @@ export default {
this.isDisabledComplite = false
// this.isDisable = false
} else {
this.insuredSign.documentStatus = '3'
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
}
})
} else {
console.log('第一次进入电子保单')
this.timeOut()
@@ -163,7 +163,7 @@ export default {
}, 1000)
},
// 获取签名状态
async getOrderDetail() {
getOrderDetail() {
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
@@ -221,7 +221,7 @@ export default {
if (this.detailJump != '1') {
if (this.relationToAppnt == '1') {
if (this.isWeixin) {
this.toAirSign('1', '签字日期', '-150', '1')
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
@@ -245,7 +245,7 @@ export default {
}
} else {
if (this.isWeixin) {
this.toAirSign('1', '签字日期', '-150', '1')
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
@@ -300,7 +300,7 @@ export default {
break
}
if (this.isWeixin) {
this.toAirSign('1', '签字日期', '-150', '1')
this.toAirSign('0', '签字日期', '-150', '2')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
@@ -386,7 +386,7 @@ export default {
this.$toast.clear()
// console.log(res)
window.localStorage.setItem('detailJump', '')
sessionStorage.twowxSigned = false
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)
@@ -445,6 +445,7 @@ export default {
this.$toast.clear()
// window.localStorage.setItem('insurance-url', res.signDTO.policyUrl)
window.localStorage.setItem('detailJump', '')
sessionStorage.twowxSigned = false
// let url = config.imgDomain + `/app/returnStream?imgPath=${res.signDTO.policyUrl}`
// axios.get(url).then(res => {
// console.log(res)

View File

@@ -8,6 +8,7 @@
v-validate="'required|name'"
name="姓名"
label="姓名"
required
:parentShowPicker.sync="customerShowPicker"
:value.sync="userInfo.name"
@nameChange="nameChange"
@@ -17,6 +18,7 @@
:value="userInfo.idType | idToText('insuredIdType')"
v-validate="'required'"
readonly
required
label="证件类型"
name="证件类型"
right-icon="arrow"
@@ -24,13 +26,14 @@
@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" label="证件号码" name="证件号码" placeholder="请输入" clearable @blur="getRelatedData(userInfo.idNo)">
<van-field v-model="userInfo.idNo" maxlength="18" required label="证件号码" v-validate="'required'" name="证件号码" placeholder="请输入" clearable @blur="getRelatedData(userInfo.idNo)">
<van-button v-if="userInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3')">证件扫描</van-button>
</van-field>
<FieldDatePicter
v-validate="'required'"
label="证件起始日期"
name="证件起始日期"
required
:value.sync="userInfo.certificateValidate"
type="date"
@confirm="onDateConfirm($event, '0')"
@@ -41,6 +44,7 @@
:v-validate="{ required: certiexpiredateRequired }"
label="证件截止日期"
name="证件截止日期"
required
:value.sync="userInfo.certiexpiredate"
type="date"
@confirm="onDateConfirm($event, '1')"
@@ -50,10 +54,11 @@
<div class="border-bt relative fs14 p10 flex align-center">
<van-checkbox v-model="userInfo.effectiveDateType" :disabled="effectiveDateTypeAble" @change="effectiveDataTypeChange">长期</van-checkbox>
</div>
<select-radio :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :required="false" :value.sync="userInfo.sex"></select-radio>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.sex"></select-radio>
<van-field
:value="userInfo.nativeplace | idToText('nativeplace')"
readonly
required
label="国家/地区"
name="国家/地区"
v-validate="'required'"
@@ -61,11 +66,12 @@
placeholder="请选择"
@click="toSelect('1')"
/>
<van-field :value="census" readonly label="户籍" name="户籍" v-validate="'required'" right-icon="arrow" placeholder="请选择" @click="censusShow = true" />
<van-field :value="census" required readonly label="户籍" name="户籍" v-validate="'required'" right-icon="arrow" placeholder="请选择" @click="censusShow = true" />
<FieldDatePicter
v-validate="'required'"
label="出生日期"
name="出生日期"
required
:value.sync="userInfo.birthday"
type="date"
:flag="true"
@@ -74,17 +80,18 @@
:maxDate="maxDate"
></FieldDatePicter>
<van-field 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.authCode" center clearable label name="短信验证码" placeholder="请输入短信验证码" v-validate="'required'" 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-field v-model="userInfo.email" label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
<van-field v-model="userInfo.email" required label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
<van-field
v-model="userInfo.stature"
label="身高(cm)"
name="身高"
required
placeholder="请输入"
v-validate="'required|onlyNumber|stature'"
clearable
@@ -95,6 +102,7 @@
v-model="userInfo.avoirdupois"
label="体重(kg)"
name="体重"
required
placeholder="请输入"
v-validate="'required|onlyNumber|avoirdupois'"
clearable
@@ -117,6 +125,7 @@
readonly
label="文化程度"
name="文化程度"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -128,6 +137,7 @@
:required="false"
label="有无社保"
name="有无社保"
required
:value.sync="userInfo.medical"
></select-radio>
<van-field
@@ -135,6 +145,7 @@
readonly
label="税收居民身份"
name="税收居民身份"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -149,6 +160,7 @@
clearable
label="职业类别"
name="职业类别"
required
v-validate="'required'"
placeholder="请选择"
:parentShowPicker.sync="occupationShowPicker"
@@ -160,6 +172,7 @@
readonly
label="收入来源"
name="收入来源"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -169,6 +182,7 @@
v-show="isShowOthenSalarySource"
v-model="userInfo.otherSalarySource"
label
required
name="其他来源"
placeholder="请输入其它收入来源"
clearable
@@ -178,12 +192,13 @@
v-model="userInfo.averageAnnualIncome"
label="平均年收入(万元)"
name="平均年收入"
required
placeholder="请输入"
v-validate="'required|onlyNumber'"
clearable
maxlength="5"
/>
<van-field v-model="userInfo.liabilitiesMoney" name="负债金额" placeholder="请输入" v-validate="'required|onlyNumber'" clearable maxlength="5">
<van-field v-model="userInfo.liabilitiesMoney" required name="负债金额" placeholder="请输入" v-validate="'required|onlyNumber'" clearable maxlength="5">
<div slot="label" class="flex flex-wrap">
<span>负债金额</span>
<span>万元</span>
@@ -192,6 +207,7 @@
<van-field
:value="userInfo.jobStatus | idToText('workCondition')"
readonly
required
label="在职情况"
name="在职情况"
placeholder="请选择"
@@ -199,12 +215,13 @@
right-icon="arrow"
@click="toSelect('7')"
/>
<van-field v-model="userInfo.workcompany" label="工作单位" name="工作单位" placeholder="请输入" v-validate="'required'" maxlength="50" clearable />
<van-field v-model="userInfo.workcompany" required label="工作单位" name="工作单位" placeholder="请输入" v-validate="'required'" maxlength="50" clearable />
<van-field
v-model="areaName"
readonly
label="单位地址"
name="单位地址"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -215,7 +232,7 @@
<!-- <van-checkbox v-model="companyDefault" :disabled="homeDefault" class="fr" @change="setAddress">设为联系地址</van-checkbox> -->
<van-radio name="0">设为联系地址</van-radio>
</div>
<van-field v-model="userInfo.companyZip" label="邮编" name="邮编" placeholder="请输入" v-validate="'required|zipCode'" maxlength="6" clearable />
<van-field v-model="userInfo.companyZip" required label="邮编" name="邮编" placeholder="请输入" v-validate="'required|zipCode'" maxlength="6" clearable />
<van-field v-model="userInfo.companyPhone" label="单位电话" name="单位电话" placeholder="非必填" maxlength="13" clearable />
</van-cell-group>
<!-- 家庭信息 -->
@@ -224,6 +241,7 @@
<van-field
:value="userInfo.marriage | idToText('marriage')"
readonly
required
label="婚姻状况"
name="婚姻状况"
right-icon="arrow"
@@ -235,6 +253,7 @@
v-model="userInfo.familyAnnualIncome"
label="家庭年收入(万元)"
name="家庭年收入"
required
placeholder="请输入"
v-validate="'required|onlyNumber'"
clearable
@@ -245,6 +264,7 @@
readonly
label="家庭地址"
name="家庭地址"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -255,7 +275,7 @@
<!-- <van-checkbox v-model="homeDefault" :disabled="companyDefault" class="fr" @change="setAddress">设为联系地址</van-checkbox> -->
<van-radio name="1">设为联系地址</van-radio>
</div>
<van-field v-model="userInfo.homeZip" label="邮编" name="邮编" placeholder="请输入" v-validate="'required|zipCode'" maxlength="6" clearable />
<van-field v-model="userInfo.homeZip" required label="邮编" name="邮编" placeholder="请输入" v-validate="'required|zipCode'" maxlength="6" clearable />
<van-field v-model="userInfo.homePhone" label="家庭电话" name="家庭电话" placeholder="非必填" maxlength="13" clearable />
</van-cell-group>
</van-radio-group>
@@ -699,6 +719,8 @@ export default {
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// 长期按钮是否禁用
this.effectiveDateTypeAble = age <= 45
this.getRelatedData(this.userInfo.idNo)
},
nextStep() {
@@ -1097,6 +1119,18 @@ export default {
this.countDown = 60
this.codeDisabled = false
}
// watch: {
// 'userInfo.idNo': {
// handler(newName, oldName) {
// // console.log('obj.a changed');
// if(newName != oldName) {
// this.getRelatedData(this.userInfo.idNo)
// }
// },
// immediate: true,
// deep: true
// }
// }
}
</script>
<style lang="scss" scoped>

View File

@@ -6,6 +6,7 @@
<van-field
:value="userInfo.relationToAppnt | idToText('relationToAppnt')"
readonly
required
label="是投保人的"
name="是投保人的"
right-icon="arrow"
@@ -18,6 +19,7 @@
v-validate="'required|name'"
name="姓名"
label="姓名"
required
:value.sync="userInfo.name"
:parentShowPicker.sync="customerShowPicker"
@nameChange="nameChange"
@@ -28,6 +30,7 @@
:value="userInfo.idType | idToText('idType')"
v-validate="'required'"
readonly
required
label="证件类型"
name="证件类型"
right-icon="arrow"
@@ -40,6 +43,7 @@
maxlength="18"
label="证件号码"
name="证件号码"
required
placeholder="请输入"
clearable
:readonly="isAppnt"
@@ -55,6 +59,7 @@
name="出生日期"
:value.sync="userInfo.birthday"
type="date"
required
:flag="true"
@confirm="onDateConfirm($event, '2')"
ref="birthday"
@@ -65,6 +70,7 @@
v-validate="'required'"
label="证件起始日期"
name="证件起始日期"
required
:defaultDate="new Date()"
:value.sync="userInfo.certificateValidate"
type="date"
@@ -77,6 +83,7 @@
:v-validate="{ required: certiexpiredateRequired }"
label="证件截止日期"
name="证件截止日期"
required
:defaultDate="new Date()"
:value.sync="userInfo.certiexpiredate"
type="date"
@@ -93,6 +100,7 @@
:required="false"
label="性别"
name="性别"
required
v-validate="'required'"
:value.sync="userInfo.sex"
:disabled="isAppnt"
@@ -102,18 +110,20 @@
readonly
label="国家/地区"
name="国家/地区"
required
v-validate="'required'"
right-icon="arrow"
placeholder="请选择"
@click="toSelect('1')"
/>
<van-field :value="census" readonly label="户籍" name="户籍" v-validate="'required'" right-icon="arrow" placeholder="请选择" @click="areaChoose('1')" />
<van-field :value="census" required readonly label="户籍" name="户籍" v-validate="'required'" right-icon="arrow" placeholder="请选择" @click="areaChoose('1')" />
<van-field
v-model="userInfo.mobile"
clearable
label="移动电话"
name="移动电话"
required
placeholder="请输入"
v-validate="'required|mobile'"
maxlength="11"
@@ -134,11 +144,12 @@
codeDisabled ? `${countDown}s后重新获取` : '发送验证码'
}}</van-button>
</van-field>
<van-field v-model="userInfo.email" label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable :readonly="isAppnt" />
<van-field v-model="userInfo.email" required label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable :readonly="isAppnt" />
<van-field
v-model="userInfo.stature"
label="身高(cm)"
name="身高"
required
placeholder="请输入"
v-validate="'required|onlyNumber|stature'"
clearable
@@ -150,6 +161,7 @@
v-model="userInfo.avoirdupois"
label="体重(kg)"
name="体重"
required
placeholder="请输入"
v-validate="'required|onlyNumber'"
clearable
@@ -165,6 +177,7 @@
readonly
label="文化程度"
name="文化程度"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -176,6 +189,7 @@
label="有无社保"
name="有无社保"
v-validate="'required'"
required
:value.sync="userInfo.medical"
:disabled="isAppnt"
></select-radio>
@@ -184,6 +198,7 @@
readonly
label="税收居民身份"
name="税收居民身份"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -198,6 +213,7 @@
clearable
label="职业类别"
name="职业类别"
required
v-validate="'required'"
placeholder="请选择"
:parentShowPicker.sync="occupationShowPicker"
@@ -209,6 +225,7 @@
readonly
label="收入来源"
name="收入来源"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -219,6 +236,7 @@
v-model="userInfo.otherSalarySource"
label
name="其他来源"
required
placeholder="请输入其它收入来源"
clearable
maxlength="30"
@@ -247,6 +265,7 @@
label="平均年收入(万元)"
name="平均年收入"
placeholder="请输入"
required
v-validate="'required|onlyNumber'"
clearable
maxlength="5"
@@ -256,6 +275,7 @@
v-model="userInfo.liabilitiesMoney"
name="负债金额"
placeholder="请输入"
required
v-validate="'required|onlyNumber'"
clearable
maxlength="5"
@@ -268,6 +288,7 @@
readonly
label="在职情况"
name="在职情况"
required
placeholder="请选择"
v-validate="'required'"
right-icon="arrow"
@@ -277,6 +298,7 @@
v-model="userInfo.workcompany"
label="工作单位"
name="工作单位"
required
placeholder="请输入"
v-validate="'required'"
maxlength="50"
@@ -288,6 +310,7 @@
readonly
label="单位地址"
name="单位地址"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -308,6 +331,7 @@
label="邮编"
name="邮编"
placeholder="请输入"
required
v-validate="'required|zipCode'"
maxlength="6"
clearable
@@ -321,6 +345,7 @@
<van-field
:value="userInfo.marriage | idToText('marriage')"
readonly
required
label="婚姻状况"
name="婚姻状况"
right-icon="arrow"
@@ -332,6 +357,7 @@
v-model="userInfo.familyAnnualIncome"
label="家庭年收入(万元)"
name="家庭年收入"
required
placeholder="请输入"
v-validate="'required|onlyNumber'"
clearable
@@ -343,6 +369,7 @@
readonly
label="家庭地址"
name="家庭地址"
required
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@@ -362,6 +389,7 @@
v-model="userInfo.homeZip"
label="邮编"
name="邮编"
required
placeholder="请输入"
v-validate="'required|zipCode'"
maxlength="6"
@@ -638,10 +666,10 @@ export default {
})
}
},
// mounted() {
// window.appCallBack = this.appCallBack
mounted() {
window.appCallBack = this.appCallBack
// // document.body.style.backgroundColor = '#F5F5F5'
// },
},
methods: {
//监听名字变化
nameChange(name) {
@@ -1035,6 +1063,7 @@ export default {
this.effectiveDateTypeAble = age <= 45
//数据是否从客户列表拉取
this.fromCustomer = true
this.getRelatedData(this.userInfo.idNo)
},
//下一步
nextStep() {
@@ -1415,6 +1444,7 @@ export default {
}
},
getRelatedData(val) {
// debugger
if (this.userInfo.idType != '1') {
return
}
@@ -1466,12 +1496,15 @@ export default {
this.codeDisabled = false
}
// watch: {
// 'userInfo.effectiveDateType'(newVal, oldVal) {
// console.log(newVal)
// if (newVal == 'true' || newVal == true) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// 'userInfo.idNo': {
// handler(newName, oldName) {
// // console.log('obj.a changed');
// if(newName != oldName) {
// this.getRelatedData(this.userInfo.idNo)
// }
// },
// immediate: true,
// deep: true
// }
// }
}

View File

@@ -93,7 +93,7 @@ export default {
relationToAppnt: '',
// 产品编码
productCodes: '',
// 是否可以点击,
// 是否可以点击
isDisabled: false,
saleInsuredAge: '',
saleInsuredSex: '',
@@ -231,7 +231,7 @@ export default {
})
}
},
// 获取告知消息
// 获取告知消息,
information() {
let that = this
let data = {

View File

@@ -4,10 +4,10 @@
<div v-if="isWeixin" class="bg-white mt10 p20 fs14 tips">
<p>
尊敬的
<span class="red">{{ tipsName }}</span
<span>{{ tipsName }}</span
>先生/女士您好
</p>
<p>该保单由国富人寿保险有限责任公司进行承保具体确认信息如下</p>
<p>该保单由国富人寿保险股份有限公司进行承保具体确认信息如下</p>
</div>
<van-cell-group class="mt10">
<van-cell title="销售人员工号" :value="recmd.agentCode" />
@@ -18,6 +18,7 @@
</van-cell-group>
<div v-if="!isWeixin">
<!-- 不再微信 -->
<van-collapse v-model="activeNames" class="mt10">
<van-collapse-item name="1">
<div slot="title">
@@ -25,6 +26,7 @@
<span class="ml20">{{ appnt.name }}</span>
</div>
<p class="mb20">以下内容需要您按照顺序阅读并签字确认:</p>
<div v-for="(item, index) in appntSign" :key="index">
<p>{{ item.documentCode == '1' ? '需阅读' : '需签署' }}</p>
<p class="mb20">
@@ -60,6 +62,7 @@
<div class="text" v-else>操作时间已失效请联系销售人员</div>
</van-collapse-item>
</van-collapse>
<div v-if="relationToAppnt != '1'" class="mt10">
<van-collapse v-model="activeNames" v-for="(item, index) in insured" :key="index">
<van-collapse-item :name="index + 2">
@@ -208,7 +211,7 @@
<script>
import UploadImageFile from '@/components/ebiz/sale/UploadImageFile'
import { Cell, CellGroup, Collapse, CollapseItem, Dialog } from 'vant'
import { underWrite, getOrderDetail, getToken, getSignInvalid, checkSignInvalid } from '@/api/ebiz/sale/sale'
import { underWrite, getOrderDetail, getSignInvalid, checkSignInvalid } from '@/api/ebiz/sale/sale'
import { weixinShare } from '@/assets/js/utils/wxShare.js'
// import axios from 'axios'
// import device from '@/assets/js/commons.js'
@@ -272,7 +275,6 @@ export default {
if (this.$route.query.airSign) {
sessionStorage.setItem('airSign', this.$route.query.airSign)
}
window.localStorage.setItem('saleInsuredInfo', this.$route.query.saleInsuredInfo)
window.localStorage.setItem('saleInsuredPersonInfo', this.$route.query.saleInsuredPersonInfo)
window.localStorage.setItem('token', this.$route.query.token)
@@ -296,14 +298,28 @@ export default {
this.isInvalid = true
}
this.airSign = sessionStorage.getItem('airSign')
this.shareCode = sessionStorage.getItem('shareCode')
// this.shareCode = sessionStorage.getItem('shareCode')
this.relationToAppnt = this.$route.query.relationToAppnt
this.isShow = false
await this.getOrderDetail()
if (this.shareCode == '1') {
this.tipsName = this.saleInsuredPersonInfo.name
this.getOrderDetail().then(() => {
// console.log('this.appntSignStatus', this.appntSignStatus)
// console.log('this.appntSignStatus', this.appntSignStatus)
if (this.appntSignStatus == '3' && this.shareCode == '0') {
// this.$toast('签名成功,请联系业务员进行后续流程!')
Dialog.alert({ title: '提示', message: '签名成功,请联系业务员进行后续流程!' })
} else if (this.insuredSignStatus == '3' && this.shareCode == '1') {
Dialog.alert({ title: '提示', message: '签名成功,请联系业务员进行后续流程!' })
}
})
if (sessionStorage.shareCode == '1') {
console.log('进来被保人')
this.tipsName = JSON.parse(localStorage.saleInsuredPersonInfo).name
} else {
this.tipsName = this.saleInsuredInfo.name
console.log('进来投保人')
this.tipsName = JSON.parse(localStorage.saleInsuredInfo).name
// console.log('localStorage.saleInsuredInfo', localStorage.saleInsuredInfo)
// console.log('localStorage.saleInsuredInfo.name', localStorage.saleInsuredInfo.name)
// console.log('this.tipName', this.tipsName)
}
weixinShare({
title: '国富人寿计划书',
@@ -606,6 +622,7 @@ export default {
let data = {
orderNo: window.localStorage.getItem('orderNo')
}
return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => {
if (res.result == '0') {
this.$toast.clear()
@@ -654,8 +671,10 @@ export default {
that.insuredSignStatus = item.documentStatus
}
})
resolve('success')
}
})
})
},
//自定义key值排序用
addKey(item) {
@@ -717,12 +736,16 @@ export default {
sendimage(e) {
// let that = this
if (e.result == '0') {
// this.$toast.clear()
// this.$toast('人脸检测成功')
// 1 为被保人
if (window.sessionStorage.shareCode == '1') {
this.insuredUrl()
} else {
this.goUrl()
}
} else {
this.$toast(e.resultMessage)
}
}
},

View File

@@ -4,15 +4,19 @@
<!-- config.imgDomain + `/returnDirectStream?imgPath=${window.localStorage.getItem('insurance-policyUrl')}` -->
<iframe :src="src + pdfUrl" class="iframe"></iframe>
<van-radio-group v-model="radioSure" class="pb10 pt20 pl5 fs14">
<van-radio name="1">
我已充分了解上述提示内容并同意通过电子方式签收
</van-radio>
</van-radio-group>
<!-- <div id="pdf"></div>-->
<!-- <img :src="'data:image/jpeg;base64,' + url" /> -->
<!-- 我已充分了解上述提示内容并同意通过电子方式签收 -->
<div class="pt30 pl30 flex align-items-c">
<span class="mr10">投保人签名 :</span>
<div>
<!-- <van-button type="danger" size="small" @click="chaolu('0')" v-no-more-click="1000">超录</van-button> -->
<van-button type="danger" size="small" @click="sign('0')" v-no-more-click="1000">{{ isSign ? '签名' : '已签名' }}</van-button>
<van-button type="danger" size="small" @click="sign('0')" :disabled="isSure" v-no-more-click="1000">{{ isSign ? '签名' : '已签名' }}</van-button>
</div>
</div>
</div>
@@ -93,6 +97,8 @@ export default {
// policyUrl: '',
src: location.origin + '/pdfjs/web/viewer.html?file=',
radio: '',
// 回执签收的radio
radioSure: '',
// 倒计时时间
number: '',
// // 定时器时间
@@ -135,7 +141,9 @@ export default {
// 是否从详情跳过来 如果为1 是
detailJump: '',
// 是否是万能险
isComment: false
isComment: false,
// 判断回执里面签名是否可以点击
isSure: true
}
},
components: {
@@ -162,7 +170,7 @@ export default {
}, 1000)
},
// 获取签名状态
async getOrderDetail() {
getOrderDetail() {
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
@@ -172,7 +180,11 @@ export default {
if (res.result == '0') {
res.orderDTO.ebizSignDTOS.map(item => {
if (item.documentCode == '2') {
if (this.detailJump != '1') {
this.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${item.policyUrl}`)
} else {
this.pdfUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${localStorage.getItem('insurance-policyUrl')}`)
}
if (item.signType == '0') {
that.appntSign = item
// this.policyUrl = item.policyUrl
@@ -419,12 +431,17 @@ export default {
loadingType: 'spinner',
message: '加载中……'
})
// 投保人
if (val == '0') {
// 投保人且不是回执签收
if (this.detailJump != '1') {
// 投保人不是回执签收且投被同人
if (this.relationToAppnt == '1') {
// 投保人不是回执签收且投被同人且在微信
if (this.isWeixin) {
this.toAirSign('1', '申请日期', this.caOffset, '2')
this.toAirSign('0', '申请日期', this.caOffset, '4')
} else {
// 投保人不是回执签收且投被同人且不在微信
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
@@ -449,9 +466,11 @@ export default {
})
}
} else {
// 微信投保人不是回执签收且投被不同人
if (this.isWeixin) {
this.toAirSign('1', '法定监护人', this.caOffset, '2')
this.toAirSign('0', '法定监护人', this.caOffset, '4')
} else {
// 不在微信投保人不是回执签收且投被不同人
console.log('投保人签名')
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
@@ -507,9 +526,11 @@ export default {
that.saleInsuredInfo.idType = '9'
break
}
// 微信投保人且是回执签收
if (this.isWeixin) {
this.toAirSign('1', '投保人签字', '-150', '2')
this.toAirSign('0', '投保人签字', '0', '4')
} else {
// 不是微信投保人且是回执签收
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: that.saleInsuredInfo.idNo,
@@ -535,9 +556,11 @@ export default {
}
}
} else {
// 在微信被保人
if (this.isWeixin) {
this.toAirSign('2', '法定监护人', '0', '2')
this.toAirSign('1', '法定监护人', '10', '4')
} else {
// 不在微信被保人
console.log('被保人签名')
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
@@ -580,29 +603,9 @@ export default {
},
// 超录
chaolu() {
// localStorage.setItem(
// 'signInfo',
// JSON.stringify({
// idNo: this.saleInsuredInfo.idNo,
// name: this.saleInsuredInfo.name,
// type: this.saleInsuredInfo.idType,
// originStatus: '2',
// keyword: '申请日期',
// status: '2',
// offset: '0',
// originUrl: location.href,
// commentKeyword: '认真', // 批注关键字
// commentText: '本人已阅读保险条款、产品说明书和投保提示书,了解本产品的特点和保单利益的不确定性', // 批注文字
// commentOffset: '28', // 批注偏移量
// commentPos: '2', // 签字图片和关键字位置关系等于1时签字图片和关键字矩形重心重合
// // * 等于2时签字图片位于关键字正下方中心线对齐等于3时签字图片位于关键字正右方中心线对齐
// // * 等于4时签字图片左上角和关键字右下角重合可能额外附加偏移量详见构造函数的offset参数
// caType: '1', // 是否是批注
// pageNo: '1', // PDF起始页
// KWIndex: '1' // 第几个关键字
// })
// )
// 再微信
if (this.isWeixin) {
// 在微信且投被不同人
if (this.relationToAppnt != '1') {
localStorage.setItem(
'signInfo',
@@ -611,13 +614,13 @@ export default {
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
originStatus: '4',
keyword: '投保人签',
status: '1',
keyword: '投保人签',
status: '0',
offset: '10',
originUrl: location.href,
commentKeyword: '认真', // 批注关键字
commentText: '本人已阅读保险条款、产品说明书和投保提示书,了解本产品的特点和保单利益的不确定性', // 批注文字
commentOffset: '28', // 批注偏移量
commentOffset: '30', // 批注偏移量
commentPos: '2', // 签字图片和关键字位置关系等于1时签字图片和关键字矩形重心重合
// * 等于2时签字图片位于关键字正下方中心线对齐等于3时签字图片位于关键字正右方中心线对齐
// * 等于4时签字图片左上角和关键字右下角重合可能额外附加偏移量详见构造函数的offset参数
@@ -628,6 +631,7 @@ export default {
)
window.location.href = this.$mainUrl + '/chaolu/index.html'
} else {
// 在微信且投被同人
localStorage.setItem(
'signInfo',
JSON.stringify({
@@ -636,12 +640,12 @@ export default {
type: this.saleInsuredInfo.idType,
originStatus: '4',
keyword: '申请日期',
status: '2',
offset: '0',
status: '0',
offset: '-140',
originUrl: location.href,
commentKeyword: '认真', // 批注关键字
commentText: '本人已阅读保险条款、产品说明书和投保提示书,了解本产品的特点和保单利益的不确定性', // 批注文字
commentOffset: '28', // 批注偏移量
commentOffset: '30', // 批注偏移量
commentPos: '2', // 签字图片和关键字位置关系等于1时签字图片和关键字矩形重心重合
// * 等于2时签字图片位于关键字正下方中心线对齐等于3时签字图片位于关键字正右方中心线对齐
// * 等于4时签字图片左上角和关键字右下角重合可能额外附加偏移量详见构造函数的offset参数
@@ -653,6 +657,7 @@ export default {
window.location.href = this.$mainUrl + '/chaolu/index.html'
}
} else {
// 不在微信且投被不同人
if (this.relationToAppnt != '1') {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
@@ -682,6 +687,7 @@ export default {
}
})
} else {
// 不在微信且投被同人
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
number: this.saleInsuredInfo.idNo,
@@ -720,33 +726,18 @@ export default {
that.signVal = window.localStorage.getItem('sign-val')
// 判断是不是万能险
let comment = window.localStorage.getItem('productCode')
// comment.map(item => {
// if (item.productCode == 'GFRS_M0003') {
// this.isComment = true
// }
// })
if (comment == 'GFRS_M0003') {
this.isComment = true
}
// 获取投保人信息
that.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo'))
// 在微信
if (this.isWeixin) {
that.relationToAppnt = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo')).relationToAppnt
}
// 在微信且不是回执签收
if (this.detailJump != '1') {
// 投被保人是否同人
that.relationToAppnt = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保人信息
that.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
}
if (this.detailJump != '1') {
this.getOrderDetail()
}
// let imgBase64Data = sessionStorage.getItem('twoimgBase64Data')
// console.log('imgBase64Data:twoimgBase64Data ' + imgBase64Data)
if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('imgBase64Data')
let wxSigned = sessionStorage.getItem('wxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
@@ -756,17 +747,15 @@ export default {
if (wxSigned) {
console.log('第二次进入电子保单!')
console.log('that222222222222', that)
let rs = await that.getOrderDetail()
console.log('rs', rs, 'this33333333333', that)
if (rs === 'success') {
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '1') {
this.appntSign.documentStatus = '3'
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
@@ -774,11 +763,12 @@ export default {
this.isDisabledComplite = false
// this.isDisable = false
} else {
this.insuredSign.documentStatus = '3'
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
}
})
} else {
console.log('````````````````````````')
console.log('第一次进入电子保单')
@@ -786,16 +776,68 @@ export default {
this.getOrderDetail()
}
} else {
// 在微信而且是回执签收
document.title = '保险合同签收回执电子确认书签名'
let imgBase64Data = sessionStorage.getItem('imgBase64Data')
let wxSigned = sessionStorage.getItem('wxSigned')
let signInfo = JSON.parse(localStorage.getItem('signInfo'))
console.log('`````````````````````````````````')
console.log('imgBase64Data:twoimgBase64Data ' + imgBase64Data)
console.log('wxSigned: ' + wxSigned)
if (wxSigned) {
console.log('第二次进入电子保单!')
console.log('that222222222222', that)
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
this.isSign = false
this.isDisabledComplite = false
this.isSubmit = false
} else {
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
})
} else {
console.log('````````````````````````')
console.log('第一次进入电子保单')
this.timeOut()
this.getOrderDetail()
}
}
} else {
// 不在微信且不是回执签收
if (this.detailJump != '1') {
// 投被保人是否同人
that.relationToAppnt = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo')).relationToAppnt
// 获取被保人信息
that.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
this.timeOut()
this.getOrderDetail()
} else {
// 不在微信但是在回执签收
document.title = '保险合同签收回执电子确认书签名'
this.timeOut()
this.getOrderDetail()
}
}
},
computed: {
listenChange() {
const { isOver, radio, appntSign, insuredSign } = this
return { isOver, radio, appntSign, insuredSign }
const { isOver, radio, appntSign, insuredSign, radioSure } = this
return { isOver, radio, appntSign, insuredSign, radioSure }
}
},
watch: {
@@ -826,6 +868,9 @@ export default {
if (val.insuredSign.documentStatus == '3') {
that.isDisableInsured = true
}
if (val.radioSure != '') {
this.isSure = false
}
} else {
if (that.signVal == '0' || that.signVal == '2') {
if (val.isOver == true && val.radio != '') {

View File

@@ -92,9 +92,9 @@ export default {
// 获取被保人信息
that.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
}
if (this.detailJump != '1') {
this.getOrderDetail()
}
// if (this.detailJump != '1') {
// this.getOrderDetail()
// }
if (this.isWeixin) {
let imgBase64Data = sessionStorage.getItem('oneimgBase64Data')
@@ -107,16 +107,15 @@ export default {
if (wxSigned) {
console.log('第二次进入电子保单')
console.log('````````````````````````````````')
let rs = await this.getOrderDetail()
if (rs === 'success') {
this.getOrderDetail().then(() => {
this.Time = true
this.isOver = true
this.radio = '1'
this.base64 = imgBase64Data
this.isDisabledComplite = false
console.log('signInfo.status:' + signInfo.status)
if (signInfo.status == '1') {
this.appntSign.documentStatus = '3'
if (signInfo.status == '0') {
// this.appntSign.documentStatus = '3'
console.log('``````````````````')
this.$set(this.appntSign, 'documentStatus', '3')
console.log('appntSign.documentStatus: ' + this.appntSign.documentStatus)
@@ -124,11 +123,12 @@ export default {
this.isDisabledComplite = false
// this.isDisable = false
} else {
this.insuredSign.documentStatus = '3'
this.$set(this.insuredSign, 'documentStatus', '3')
// this.insuredSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSign = false
}
}
})
} else {
console.log('````````````````````````')
console.log('第一次进入电子保单')
@@ -161,7 +161,7 @@ export default {
}, 1000)
},
// 获取签名状态
async getOrderDetail() {
getOrderDetail() {
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
@@ -173,6 +173,7 @@ export default {
if (item.signType == '0' || item.signType == '2') {
if (item.documentCode == '3') {
that.appntSign = item
console.log('that.appntSign', that.appntSign)
}
}
})
@@ -215,7 +216,7 @@ export default {
if (this.detailJump != '1') {
if (this.relationToAppnt == '1') {
if (this.isWeixin) {
this.toAirSign('1', '投保人签名', '5', '1')
this.toAirSign('0', '投保人签名', '5', '1')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
@@ -239,7 +240,7 @@ export default {
}
} else {
if (this.isWeixin) {
this.toAirSign('1', '投保人签名', '5', '1')
this.toAirSign('0', '投保人签名', '5', '1')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
@@ -294,7 +295,7 @@ export default {
break
}
if (this.isWeixin) {
this.toAirSign('1', '投保人签名', '5', '1')
this.toAirSign('0', '投保人签名', '5', '1')
} else {
EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码
@@ -393,7 +394,7 @@ export default {
this.$toast.clear()
window.localStorage.setItem('detailJump', '')
window.sessionStorage.onewxSigned = false
window.sessionStorage.oneimgBase64Data = ''
// window.sessionStorage.oneimgBase64Data = ''
this.$jump({
flag: 'h5',
extra: {
@@ -446,7 +447,7 @@ export default {
this.$toast.clear()
window.localStorage.setItem('detailJump', '')
window.sessionStorage.onewxSigned = false
window.sessionStorage.oneimgBase64Data = ''
// window.sessionStorage.oneimgBase64Data = ''
this.$jump({
flag: 'h5',
extra: {

View File

@@ -15,7 +15,7 @@
<van-button type="danger" @click="uploadComparison" size="large">上传照片与证件照对比</van-button>
</div>
<div class="bottom-btn bg-white">
<van-button type="danger" :disabled = "disabled" @click="next" size="large">确定</van-button>
<van-button type="danger" :disabled="disabled" @click="next" size="large">确定</van-button>
</div>
</div>
</template>
@@ -30,6 +30,7 @@ import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
appntImg: '',
idcardData: {
@@ -46,14 +47,23 @@ export default {
insuredDTOs: [],
// 保单号
contNo: '',
// 是否在微信
isWeixin,
list: []
}
},
created() {
// 获取保单详情
if (this.isWeixin) {
window.localStorage.setItem('saleInsuredInfo', this.$route.query.saleInsuredInfo)
window.localStorage.setItem('token', this.$route.query.token)
window.localStorage.setItem('policyNo', this.$route.query.policyNo)
this.idcardData.idcardName = JSON.parse(this.$route.query.saleInsuredInfo).name
this.idcardData.idcardNumber = JSON.parse(this.$route.query.saleInsuredInfo).idNo
this.getPolicyDetail()
this.disabled = false
} else {
// 获取保单详情
}
},
components: {
[Button.name]: Button,
@@ -71,7 +81,6 @@ export default {
console.log('微信人脸验证', e)
let that = this
if (e.result == '0') {
that.$toast('人脸检测成功')
that.disabled = false
} else {
that.$toast(e.resultMessage)
@@ -169,7 +178,7 @@ export default {
}
getReceiptSign(params).then(res => {
if (res.result == '0') {
console.log('res',res)
console.log('res', res)
this.$toast.clear()
window.localStorage.setItem('insurance-policyUrl', res.signUrl)
window.localStorage.setItem('detailJump', '1')
@@ -181,7 +190,8 @@ export default {
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureOfElectronic',
forbidSwipeBack: '1'
forbidSwipeBack: '1',
title: '保险合同签收回执电子确认书签名'
},
routerInfo: {
path: '/sale/signatureOfElectronic'

View File

@@ -134,6 +134,7 @@ export default {
let data = {
policyNo: window.localStorage.getItem('policyNo')
}
getPolicyDetail(data).then(res => {
if (res.result == '0') {
let appntDTO = res.content.appntDTO
@@ -146,11 +147,14 @@ export default {
} else {
orderInfoDTO.orderStatusText = ''
}
// 测试用
// orderInfoDTO.orderStatus = '0'
that.OrderInfoDTO = orderInfoDTO
// 投保人信息
this.filterData(dataDictionary.sex, 'sex', appntDTO)
this.filterData(dataDictionary.idType, 'idType', appntDTO)
that.appntDTO = appntDTO
window.localStorage.setItem('saleInsuredInfo', JSON.stringify(appntDTO))
// 被保人信息
res.content.insuredDTOs.map(insured => {
insured.riskDTOLst.map(risk => {
@@ -207,12 +211,20 @@ export default {
},
appCallBack(data) {
if (data.trigger == 'right_button_click') {
console.log(localStorage.saleInsuredInfo)
EWebBridge.webCallAppInJs('bridge', {
flag: 'share',
extra: {
title: this.wxTitle,
content: '国富人寿保单回执签收',
url: location.origin + '/#/serve/airSign?policyNo=' + localStorage.policyNo + '&token=' + localStorage.token,
url:
location.origin +
'/#/serve/airSign?policyNo=' +
localStorage.policyNo +
'&token=' +
localStorage.token +
'&saleInsuredInfo=' +
encodeURI(localStorage.saleInsuredInfo),
// url: 'http://47.96.143.111/#/proposal/exhibition?proposalNo=' + localStorage.orderNo + '&token=' + localStorage.token,
img: this.$assetsUrl + 'images/logo.png'
}
@@ -226,52 +238,53 @@ export default {
pageData[key + 'Text'] = item.text //渲染页面使用的字段
}
})
}
},
// 回执签收
// next() {
// EWebBridge.webCallAppInJs('face_auth', {
// number: this.appntDTO.idNo, //身份证号码
// name: this.appntDTO.name //姓名
// }).then(data => {
// this.$toast.loading({
// duration: 0, // 持续展示 toast
// forbidClick: true, // 禁用背景点击
// loadingType: 'spinner',
// message: '加载中……'
// })
// if (JSON.parse(data).state == '1') {
// let params = {
// contNo: window.localStorage.getItem('policyNo')
// }
// getReceiptSign(params).then(res => {
// if (res.result == '0') {
// this.$toast.clear()
// window.localStorage.setItem('insurance-policyUrl', res.signUrl)
// window.localStorage.setItem('detailJump', '1')
// window.localStorage.setItem('contNo', this.OrderInfoDTO.contNo)
// window.localStorage.setItem('orderNo', this.OrderInfoDTO.orderNo)
// window.localStorage.setItem('orderStatus', this.OrderInfoDTO.orderStatus)
// window.localStorage.setItem('saleInsuredInfo', JSON.stringify(this.appntDTO))
// this.$jump({
// flag: 'h5',
// extra: {
// url: location.origin + '/#/sale/signatureOfElectronic',
// forbidSwipeBack: '1'
// },
// routerInfo: {
// path: '/sale/signatureOfElectronic'
// }
// })
// } else {
// this.$toast(res.resultMessage)
// }
// })
// } else {
// this.$toast.clear()
// this.$toast(JSON.parse(data).error)
// }
// })
// }
next() {
EWebBridge.webCallAppInJs('face_auth', {
number: this.appntDTO.idNo, //身份证号码
name: this.appntDTO.name //姓名
}).then(data => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (JSON.parse(data).state == '1') {
let params = {
contNo: window.localStorage.getItem('policyNo')
}
getReceiptSign(params).then(res => {
if (res.result == '0') {
this.$toast.clear()
window.localStorage.setItem('insurance-policyUrl', res.signUrl)
window.localStorage.setItem('detailJump', '1')
window.localStorage.setItem('contNo', this.OrderInfoDTO.contNo)
window.localStorage.setItem('orderNo', this.OrderInfoDTO.orderNo)
window.localStorage.setItem('orderStatus', this.OrderInfoDTO.orderStatus)
window.localStorage.setItem('saleInsuredInfo', JSON.stringify(this.appntDTO))
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureOfElectronic',
forbidSwipeBack: '1',
title: '保险合同签收回执电子确认书签名'
},
routerInfo: {
path: '/sale/signatureOfElectronic'
}
})
} else {
this.$toast(res.resultMessage)
}
})
} else {
this.$toast.clear()
this.$toast(JSON.parse(data).error)
}
})
}
}
}
</script>