Merge branch 'feature/FCRS-776【前端】取消入司系统自保件校验And被保人关系与生效年龄校验' into release/20240808-FCRS-764和776

This commit is contained in:
zhang.weiwei
2024-08-08 18:07:00 +08:00
3 changed files with 125 additions and 165 deletions

View File

@@ -335,17 +335,6 @@ export function getBankCardSignState(data) {
}) })
} }
// 入司人自互保件校验
export function CommitmentSelfCheck(data) {
return request1({
url: getUrl('/sale/commitment/CommitmentSelfCheck', 1),
method: 'post',
data
})
}
// 获取柳州分红万能投连型产品编码集合 // 获取柳州分红万能投连型产品编码集合
export function getUniversalCodeLst(data) { export function getUniversalCodeLst(data) {
return request({ return request({

View File

@@ -1,23 +1,22 @@
<template> <template>
<div class='insured-info-container pb50'> <div class="insured-info-container pb50">
<!-- 基本信息 --> <!-- 基本信息 -->
<van-cell-group class='mt10'> <van-cell-group class="mt10">
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>推荐人信息</p> <p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">推荐人信息</p>
<van-field v-model='recommender.name' label='推荐人姓名' name='推荐人姓名' readonly /> <van-field v-model="recommender.name" label="推荐人姓名" name="推荐人姓名" readonly />
<van-field :value='getAgentGrade(recommender.agentGrade)' label='推荐人职级' name='推荐人职级' readonly /> <van-field :value="getAgentGrade(recommender.agentGrade)" label="推荐人职级" name="推荐人职级" readonly />
<!-- <van-field v-model="recommender.applyNo" label="推荐人工号" name="推荐人工号" readonly /> --> <!-- <van-field v-model="recommender.applyNo" label="推荐人工号" name="推荐人工号" readonly /> -->
<van-field v-model='recommender.unitName' label='销售机构' name='销售机构' readonly /> <van-field v-model="recommender.unitName" label="销售机构" name="销售机构" readonly />
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>个人信息</p> <p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">个人信息</p>
<van-field v-model='userInfo.name' label='姓名' name='姓名' placeholder='请输入' v-validate="'required|name'" <van-field v-model="userInfo.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" clearable />
clearable />
<van-field <van-field
:value="userInfo.applGrade | idToText('applGrade')" :value="userInfo.applGrade | idToText('applGrade')"
v-validate="'required'" v-validate="'required'"
readonly readonly
label='职级' label="职级"
name='职级' name="职级"
right-icon='arrow' right-icon="arrow"
placeholder='请选择职级' placeholder="请选择职级"
@click="toSelect('13')" @click="toSelect('13')"
/> />
@@ -25,62 +24,57 @@
:value="userInfo.idType | idToText('idType')" :value="userInfo.idType | idToText('idType')"
v-validate="'required'" v-validate="'required'"
readonly readonly
label='证件类型' label="证件类型"
name='证件类型' name="证件类型"
right-icon='arrow' right-icon="arrow"
placeholder='请选择证件类型' placeholder="请选择证件类型"
@click="toSelect('1')" @click="toSelect('1')"
/> />
<van-field <van-field
v-model='userInfo.idNo' v-model="userInfo.idNo"
placeholder='请输入证件号码' placeholder="请输入证件号码"
label='证件号码' label="证件号码"
name='证件号码' name="证件号码"
v-validate="'required'" v-validate="'required'"
maxlength='18' maxlength="18"
clearable clearable
@blur='getRelatedData(userInfo.idNo)' @blur="getRelatedData(userInfo.idNo)"
/> />
<select-radio :radios='sexRadio' label='性别' name='性别' v-validate="'required'" :required='false' <select-radio :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :required="false" :value.sync="userInfo.sex"></select-radio>
:value.sync='userInfo.sex'></select-radio> <van-field v-model="userInfo.mobile" label="手机号" name="手机号" placeholder="请输入手机号" v-validate="'required|mobile'" maxlength="11" clearable />
<van-field v-model='userInfo.mobile' label='手机号' name='手机号' placeholder='请输入手机号' v-validate="'required|mobile'" <van-field v-model="userInfo.authCode" center clearable label name="短信验证码" placeholder="请输入短信验证码" v-validate="'required'" maxlength="6">
maxlength='11' clearable /> <van-button slot="button" size="small" type="danger" @click="getCode" :disabled="codeDisabled" v-no-more-click="1000">
<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后重新获取` : '获取验证码' }} {{ codeDisabled ? `${countDown}s后重新获取` : '获取验证码' }}
</van-button> </van-button>
</van-field> </van-field>
</van-cell-group> </van-cell-group>
<van-button type='danger' class='bottom-btn' @click='nextStep' v-no-more-click='1000'>提交信息</van-button> <van-button type="danger" class="bottom-btn" @click="nextStep" v-no-more-click="1000">提交信息</van-button>
<!-- 字段选择 --> <!-- 字段选择 -->
<van-popup v-model='popupShow' position='bottom'> <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" @cancel="popupShow = false" />
</van-popup> </van-popup>
</div> </div>
</template> </template>
<script> <script>
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, Dialog } from 'vant'; import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, Dialog } from 'vant'
import SelectRadio from '@/components/ebiz/SelectRadio'; import SelectRadio from '@/components/ebiz/SelectRadio'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'; import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'; import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'; import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
import DataDictionary from '@/assets/js/utils/data-dictionary'; import DataDictionary from '@/assets/js/utils/data-dictionary'
import areaList from '@/assets/js/utils/area'; import areaList from '@/assets/js/utils/area'
import { getTokenForAgent, agentInfowxSubmit, getTokenForUserModel } from '@/api/ebiz/agentEenter/agentEenter'; import { getTokenForAgent, agentInfowxSubmit, getTokenForUserModel } from '@/api/ebiz/agentEenter/agentEenter'
import utilsAge from '@/assets/js/utils/age'; import utilsAge from '@/assets/js/utils/age'
import getAreaName from '@/assets/js/utils/get-area-name'; import getAreaName from '@/assets/js/utils/get-area-name'
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'; import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
import idNoCheck from '@/assets/js/utils/idNoCheck'; import idNoCheck from '@/assets/js/utils/idNoCheck'
import beforeDate from '@/assets/js/utils/getBeforeDate.js'; import beforeDate from '@/assets/js/utils/getBeforeDate.js'
import { idToData } from '@/assets/js/utils/verification'; import { idToData } from '@/assets/js/utils/verification'
import { weixinShare } from '@/assets/js/utils/wxShare.js'; import { weixinShare } from '@/assets/js/utils/wxShare.js'
import axios from 'axios'; import axios from 'axios'
import index from '@/config/index'; import index from '@/config/index'
import { getAuthCode,CommitmentSelfCheck } from '@/api/ebiz/sale/sale'; import { getAuthCode } from '@/api/ebiz/sale/sale'
export default { export default {
name: 'insuredInfo', name: 'insuredInfo',
@@ -130,7 +124,7 @@ export default {
sex: '', //投保人性别 sex: '', //投保人性别
idType: '1', //证件类型 idType: '1', //证件类型
idNo: '', //证件号码 idNo: '', //证件号码
mobile: '',//手机号 mobile: '', //手机号
applGrade: '' // 职级 applGrade: '' // 职级
}, },
areaList: areaList, areaList: areaList,
@@ -139,51 +133,52 @@ export default {
codeDisabled: false, //获取验证码按钮是否禁用 codeDisabled: false, //获取验证码按钮是否禁用
countDown: 60, //获取短信验证码倒计时 countDown: 60, //获取短信验证码倒计时
sessionId: '' //后台返回的 id sessionId: '' //后台返回的 id
}; }
}, },
mounted() { mounted() {
if (this.$route.query.content) { if (this.$route.query.content) {
window.localStorage.setItem('wxShareDesc', this.$route.query.content); window.localStorage.setItem('wxShareDesc', this.$route.query.content)
} }
weixinShare({ weixinShare({
title: '国富人寿欢迎你!', title: '国富人寿欢迎你!',
imgUrl: this.$assetsUrl + 'images/logo.png', imgUrl: this.$assetsUrl + 'images/logo.png',
desc: localStorage.wxShareDesc, desc: localStorage.wxShareDesc,
link: location.origin + '/#/agentEenter/ShareInfo?token=' + localStorage.token link: location.origin + '/#/agentEenter/ShareInfo?token=' + localStorage.token
}); })
}, },
created() { created() {
if (this.$route.query.token) { if (this.$route.query.token) {
// this.token = this.$route.query.token // this.token = this.$route.query.token
window.localStorage.setItem('token', this.$route.query.token); window.localStorage.setItem('token', this.$route.query.token)
} else { } else {
this.$toast.fail('链接已失效,请联系代理人重新分享!'); this.$toast.fail('链接已失效,请联系代理人重新分享!')
} }
this.getData(); this.getData()
}, },
methods: { methods: {
getData: function() { getData: function () {
let self = this; let self = this
self.$toast.loading({ self.$toast.loading({
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击 forbidClick: true, // 禁用背景点击
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……'
}); })
getTokenForUserModel({ getTokenForUserModel({
token: this.$CacheUtils.getLocItem('token') token: this.$CacheUtils.getLocItem('token')
}).then(function(response) { })
self.$toast.clear(); .then(function (response) {
console.log('response', response); self.$toast.clear()
console.log('response', response)
if (response.result == '0') { if (response.result == '0') {
self.recommender = response; self.recommender = response
} else { } else {
this.$toast.fail(response.resultMessage); this.$toast.fail(response.resultMessage)
} }
}) })
.catch(function(error) { .catch(function (error) {
// this.$toast.fail(error) // this.$toast.fail(error)
}); })
// var self = this // var self = this
// //获取推荐人信息 // //获取推荐人信息
// let data = { // let data = {
@@ -203,75 +198,59 @@ export default {
// }) // })
}, },
getAgentGrade(agentGrade) { getAgentGrade(agentGrade) {
let result = ''; let result = ''
DataDictionary.agentGrade.map((item, index) => { DataDictionary.agentGrade.map((item, index) => {
for (var key in item) { for (var key in item) {
if (key == agentGrade) { if (key == agentGrade) {
result = item[agentGrade]; result = item[agentGrade]
} }
} }
}); })
return result; return result
}, },
// 下一步 // 下一步
nextStep() { nextStep() {
var self = this; var self = this
self.$toast.loading({ self.$toast.loading({
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击 forbidClick: true, // 禁用背景点击
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……'
}); })
this.$validator.validate().then(valid => { this.$validator.validate().then((valid) => {
if (true === valid) { if (true === valid) {
self.$toast.clear(); self.$toast.clear()
if (this.userInfo.idType == '1') { if (this.userInfo.idType == '1') {
//身份证 //身份证
// 证件号码规则校验 // 证件号码规则校验
if (!idNoCheck.isIdno(this.userInfo.idNo)) { if (!idNoCheck.isIdno(this.userInfo.idNo)) {
return this.$toast('请录入正确的身份证'); return this.$toast('请录入正确的身份证')
} }
if (this.userInfo.idNo.length == '18') { if (this.userInfo.idNo.length == '18') {
//18位身份证第17位是性别位, 奇男偶女 //18位身份证第17位是性别位, 奇男偶女
let sexSign = this.userInfo.idNo.substr(16, 1); let sexSign = this.userInfo.idNo.substr(16, 1)
if ((parseInt(sexSign) % 2 == 0 && this.userInfo.sex != 1) || (parseInt(sexSign) % 2 != 0 && this.userInfo.sex != 0)) { if ((parseInt(sexSign) % 2 == 0 && this.userInfo.sex != 1) || (parseInt(sexSign) % 2 != 0 && this.userInfo.sex != 0)) {
return this.$toast('性别录入与身份证不符'); return this.$toast('性别录入与身份证不符')
} }
} }
self.save(); self.save()
} else { } else {
self.save(); self.save()
} }
} else { } else {
this.$toast(this.$validator.errors.all()[0]); this.$toast(this.$validator.errors.all()[0])
} }
}); })
}, },
async save() { async save() {
let checkStr ='';
let recmd=this.userInfo;
recmd.source='XG';
recmd.agentCode='A860101000001';
recmd.birthday='';
let checkData = {
token: this.$CacheUtils.getLocItem('token'),
recmdDTO:recmd
};
const resp = await CommitmentSelfCheck(checkData);
if (resp.result == '0' && resp.content.data.ruleList && resp.content.data.ruleList.length ) {
checkStr='<span style="color: red;width:auto; display: block;text-align: left">温馨提示:</span>'+resp.content.data.ruleList[0].retMsg
}
// else { // else {
// console.log(resp.resultMessage); // console.log(resp.resultMessage);
// } // }
let str ='是否确认提交?手机号与证件信息会作为您入司的重要信息,一旦提交无法再次修改!<br/> ' let str = '是否确认提交?手机号与证件信息会作为您入司的重要信息,一旦提交无法再次修改!'
+checkStr;
// let str ='是否确认提交?手机号与证件信息会作为您入司的重要信息,一旦提交无法再次修改!<br/> ' +
// '<span style="color: red;width:auto; display: block;text-align: left">温馨提示:</span>尊敬的代理人,您好!您在我司属于二次入司人员,原名下保单85668955426144655640已失效为更好的维护您的利益建议您先将保单复效后再继续提交入司申请否则上号后两年内不可投保新契约自保件保单复效办理详询4006946688';
Dialog.confirm({ Dialog.confirm({
title: '提示', title: '提示',
message: str, message: str,
messageAlign:'left' messageAlign: 'left'
}).then(() => { }).then(() => {
let data = { let data = {
// userModel: { //线上去掉 // userModel: { //线上去掉
@@ -281,21 +260,21 @@ export default {
ebizEnterCustomerDto: this.userInfo, ebizEnterCustomerDto: this.userInfo,
smsCodeDTO: { smsId: this.sessionId, code: this.userInfo.authCode } smsCodeDTO: { smsId: this.sessionId, code: this.userInfo.authCode }
// ebizReferrerDto: this.recommender // ebizReferrerDto: this.recommender
}; }
console.log(data); console.log(data)
let that = this; let that = this
that.$toast.loading({ that.$toast.loading({
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击 forbidClick: true, // 禁用背景点击
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……'
}); })
agentInfowxSubmit(data) agentInfowxSubmit(data)
.then(res => { .then((res) => {
// console.log(res) // console.log(res)
if (res.result == '0') { if (res.result == '0') {
this.$store.commit('updateAgentEnterApplyMsg', this.userInfo); this.$store.commit('updateAgentEnterApplyMsg', this.userInfo)
that.$toast.clear(); that.$toast.clear()
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
@@ -306,80 +285,80 @@ export default {
routerInfo: { routerInfo: {
path: `/agentEenter/ShareInfoSuccess` path: `/agentEenter/ShareInfoSuccess`
} }
}); })
} else { } else {
this.$toast(res.resultMessage); this.$toast(res.resultMessage)
} }
}) })
.then(function(err) { .then(function (err) {
console.log(err); console.log(err)
}); })
}); })
}, },
//弹框选择 //弹框选择
toSelect(pickerType, valueKey) { toSelect(pickerType, valueKey) {
;[this.popupShow, this.pickerType] = [true, pickerType]; ;[this.popupShow, this.pickerType] = [true, pickerType]
if (valueKey) this.valueKey = valueKey; if (valueKey) this.valueKey = valueKey
if (pickerType == '1') { if (pickerType == '1') {
this.columns = DataDictionary.idType; this.columns = DataDictionary.idType
} else if (pickerType == '13') { } else if (pickerType == '13') {
this.columns = DataDictionary.applGrade; this.columns = DataDictionary.applGrade
} }
}, },
// //确认选择字段 // //确认选择字段
onConfirm(value) { onConfirm(value) {
this.popupShow = false; this.popupShow = false
if (this.pickerType == '1') { if (this.pickerType == '1') {
this.userInfo.idType = value.id; this.userInfo.idType = value.id
} else if (this.pickerType == '13') { } else if (this.pickerType == '13') {
this.userInfo.applGrade = value.id; this.userInfo.applGrade = value.id
} }
}, },
getRelatedData(val) { getRelatedData(val) {
if (this.userInfo.idType != '1') { if (this.userInfo.idType != '1') {
return; return
} }
if (idToData(val).text) { if (idToData(val).text) {
;[this.userInfo.idNo, this.userInfo.sex] = ['', ''] ;[this.userInfo.idNo, this.userInfo.sex] = ['', '']
return this.$toast(idToData(val).text) return this.$toast(idToData(val).text)
} }
this.userInfo.sex = idToData(val).sex; this.userInfo.sex = idToData(val).sex
}, },
//获取验证码 //获取验证码
getCode() { getCode() {
if (this.userInfo.mobile == '') { if (this.userInfo.mobile == '') {
return this.$toast('请填写手机号'); return this.$toast('请填写手机号')
} }
this.codeDisabled = true; this.codeDisabled = true
//倒计时 //倒计时
this.timeId = setInterval(() => { this.timeId = setInterval(() => {
this.countDown--; this.countDown--
if (this.countDown <= 0) { if (this.countDown <= 0) {
window.clearInterval(this.timeId); window.clearInterval(this.timeId)
this.codeDisabled = false; this.codeDisabled = false
this.countDown = 60; this.countDown = 60
} }
}, 1000); }, 1000)
let data = { let data = {
operateType: 'appntInfoEntry', operateType: 'appntInfoEntry',
type: 'H5', type: 'H5',
operateCode: this.userInfo.mobile, operateCode: this.userInfo.mobile,
system: 'agentApp', system: 'agentApp',
operateCodeType: '0' operateCodeType: '0'
}; }
//获取验证码 //获取验证码
getAuthCode(data).then(res => { getAuthCode(data).then((res) => {
console.log(res); console.log(res)
if (res.result == 0) { if (res.result == 0) {
this.sessionId = res.sessionId; this.sessionId = res.sessionId
} else { } else {
this.$toast(res.resultMessage); this.$toast(res.resultMessage)
} }
}); })
} }
} }
}; }
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.insured-info-container { .insured-info-container {

View File

@@ -2310,14 +2310,6 @@ export default {
if (this.insuredInfo.effectiveDateType) { if (this.insuredInfo.effectiveDateType) {
this.insuredInfo.certiexpiredate = '9999-12-31' this.insuredInfo.certiexpiredate = '9999-12-31'
} }
if ((this.userInfo.relationToInsured != '1' && this.userInfo.relationToInsured != '3')
|| (this.userInfo.relationToInsured == '3' && insuredAge >= 18)){
//金掌桂投保的所有卡单产品:
//1与被保人关系非本人不含父母
//2与被保人关系为父母被保人年龄大于等于18周岁
// 点击【立即投保】时,提示以下内容并阻断投保
return this.$toast('以死亡为给付条件的保险合同,投保人和被保险人需为同一人(父母为未成年子女投保除外)。请分享给参保人完成投保。')
}
switch (this.userInfo.homeArea) { switch (this.userInfo.homeArea) {
case "500129": case "500129":
this.userInfo.homeArea = '500229' this.userInfo.homeArea = '500229'