mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 22:46:45 +08:00
Merge branch 'dev' of 112.124.100.131:GFRS/ebiz-h5 into dev
This commit is contained in:
@@ -39,5 +39,9 @@ export const orgShortNames = [
|
||||
{ name: '柳州三营', code: '86450263' },
|
||||
{ name: '梧州藤县', code: '86450402' },
|
||||
{ name: '北海合浦', code: '86450502' },
|
||||
{ name: '梧州二营', code: '86450462' }
|
||||
{ name: '梧州二营', code: '86450462' },
|
||||
{ name: '钦州', code: '86450701' },
|
||||
{ name: '贺州', code: '86451101' },
|
||||
{ name: '桂林全州', code: '86450304' },
|
||||
{ name: '贵港三营', code: '86450863' }
|
||||
]
|
||||
|
||||
@@ -1,69 +1,85 @@
|
||||
<template>
|
||||
<div class="insured-info-container pb50">
|
||||
<div class='insured-info-container pb50'>
|
||||
<!-- 基本信息 -->
|
||||
<van-cell-group class="mt10">
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">推荐人信息</p>
|
||||
<van-field v-model="recommender.name" label="推荐人姓名" name="推荐人姓名" readonly />
|
||||
<van-field :value="getAgentGrade(recommender.agentGrade)" label="推荐人职级" name="推荐人职级" readonly />
|
||||
<van-cell-group class='mt10'>
|
||||
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>推荐人信息</p>
|
||||
<van-field v-model='recommender.name' 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.unitName" label="销售机构" name="销售机构" readonly />
|
||||
<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'" clearable />
|
||||
<van-field v-model='recommender.unitName' label='销售机构' name='销售机构' readonly />
|
||||
<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'"
|
||||
clearable />
|
||||
<van-field
|
||||
:value="userInfo.applGrade | idToText('applGrade')"
|
||||
v-validate="'required'"
|
||||
readonly
|
||||
label='职级'
|
||||
name='职级'
|
||||
right-icon='arrow'
|
||||
placeholder='请选择职级'
|
||||
@click="toSelect('13')"
|
||||
/>
|
||||
|
||||
<van-field
|
||||
:value="userInfo.idType | idToText('idType')"
|
||||
v-validate="'required'"
|
||||
readonly
|
||||
label="证件类型"
|
||||
name="证件类型"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择证件类型"
|
||||
label='证件类型'
|
||||
name='证件类型'
|
||||
right-icon='arrow'
|
||||
placeholder='请选择证件类型'
|
||||
@click="toSelect('1')"
|
||||
/>
|
||||
<van-field
|
||||
v-model="userInfo.idNo"
|
||||
placeholder="请输入证件号码"
|
||||
label="证件号码"
|
||||
name="证件号码"
|
||||
v-model='userInfo.idNo'
|
||||
placeholder='请输入证件号码'
|
||||
label='证件号码'
|
||||
name='证件号码'
|
||||
v-validate="'required'"
|
||||
maxlength="18"
|
||||
maxlength='18'
|
||||
clearable
|
||||
@blur="getRelatedData(userInfo.idNo)"
|
||||
@blur='getRelatedData(userInfo.idNo)'
|
||||
/>
|
||||
<select-radio :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :required="false" :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.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">
|
||||
<select-radio :radios='sexRadio' label='性别' name='性别' v-validate="'required'" :required='false'
|
||||
: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.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-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-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
|
||||
<van-popup v-model='popupShow' position='bottom'>
|
||||
<van-picker show-toolbar :columns='columns' @confirm='onConfirm' @cancel='popupShow = false' />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, Dialog } from 'vant'
|
||||
import SelectRadio from '@/components/ebiz/SelectRadio'
|
||||
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
||||
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
||||
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
|
||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||
import areaList from '@/assets/js/utils/area'
|
||||
import { getTokenForAgent, agentInfowxSubmit, getTokenForUserModel } from '@/api/ebiz/agentEenter/agentEenter'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
import getAreaName from '@/assets/js/utils/get-area-name'
|
||||
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
|
||||
import { idToData } from '@/assets/js/utils/verification'
|
||||
import { weixinShare } from '@/assets/js/utils/wxShare.js'
|
||||
import axios from 'axios'
|
||||
import index from '@/config/index'
|
||||
import { getAuthCode } from '@/api/ebiz/sale/sale'
|
||||
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, Dialog } from 'vant';
|
||||
import SelectRadio from '@/components/ebiz/SelectRadio';
|
||||
import FieldDatePicter from '@/components/ebiz/FieldDatePicter';
|
||||
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker';
|
||||
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker';
|
||||
import DataDictionary from '@/assets/js/utils/data-dictionary';
|
||||
import areaList from '@/assets/js/utils/area';
|
||||
import { getTokenForAgent, agentInfowxSubmit, getTokenForUserModel } from '@/api/ebiz/agentEenter/agentEenter';
|
||||
import utilsAge from '@/assets/js/utils/age';
|
||||
import getAreaName from '@/assets/js/utils/get-area-name';
|
||||
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan';
|
||||
import idNoCheck from '@/assets/js/utils/idNoCheck';
|
||||
import beforeDate from '@/assets/js/utils/getBeforeDate.js';
|
||||
import { idToData } from '@/assets/js/utils/verification';
|
||||
import { weixinShare } from '@/assets/js/utils/wxShare.js';
|
||||
import axios from 'axios';
|
||||
import index from '@/config/index';
|
||||
import { getAuthCode } from '@/api/ebiz/sale/sale';
|
||||
|
||||
|
||||
export default {
|
||||
@@ -114,7 +130,8 @@ export default {
|
||||
sex: '0', //投保人性别
|
||||
idType: '1', //证件类型
|
||||
idNo: '', //证件号码
|
||||
mobile: '' //手机号
|
||||
mobile: '',//手机号
|
||||
applGrade: '' // 职级
|
||||
},
|
||||
areaList: areaList,
|
||||
token: '',
|
||||
@@ -122,51 +139,51 @@ export default {
|
||||
codeDisabled: false, //获取验证码按钮是否禁用
|
||||
countDown: 60, //获取短信验证码倒计时
|
||||
sessionId: '' //后台返回的 id
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.content) {
|
||||
window.localStorage.setItem('wxShareDesc', this.$route.query.content)
|
||||
window.localStorage.setItem('wxShareDesc', this.$route.query.content);
|
||||
}
|
||||
weixinShare({
|
||||
title: '国富人寿欢迎你!',
|
||||
imgUrl: this.$assetsUrl + 'images/logo.png',
|
||||
desc: localStorage.wxShareDesc,
|
||||
link: location.origin + '/#/agentEenter/ShareInfo?token=' + localStorage.token
|
||||
})
|
||||
});
|
||||
},
|
||||
created() {
|
||||
if (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 {
|
||||
this.$toast.fail('链接已失效,请联系代理人重新分享!')
|
||||
this.$toast.fail('链接已失效,请联系代理人重新分享!');
|
||||
}
|
||||
this.getData()
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData: function() {
|
||||
let self = this
|
||||
let self = this;
|
||||
self.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
});
|
||||
getTokenForUserModel({
|
||||
token: this.$CacheUtils.getLocItem('token')
|
||||
}).then(function(response) {
|
||||
self.$toast.clear()
|
||||
console.log('response', response)
|
||||
self.$toast.clear();
|
||||
console.log('response', response);
|
||||
if (response.result == '0') {
|
||||
self.recommender = response
|
||||
self.recommender = response;
|
||||
} else {
|
||||
this.$toast.fail(response.resultMessage)
|
||||
this.$toast.fail(response.resultMessage);
|
||||
}
|
||||
})
|
||||
.catch(function(error) {
|
||||
// this.$toast.fail(error)
|
||||
})
|
||||
.catch(function(error) {
|
||||
// this.$toast.fail(error)
|
||||
});
|
||||
// var self = this
|
||||
// //获取推荐人信息
|
||||
// let data = {
|
||||
@@ -186,49 +203,49 @@ export default {
|
||||
// })
|
||||
},
|
||||
getAgentGrade(agentGrade) {
|
||||
let result = ''
|
||||
let result = '';
|
||||
DataDictionary.agentGrade.map((item, index) => {
|
||||
for (var key in item) {
|
||||
if (key == agentGrade) {
|
||||
result = item[agentGrade]
|
||||
result = item[agentGrade];
|
||||
}
|
||||
}
|
||||
})
|
||||
return result
|
||||
});
|
||||
return result;
|
||||
},
|
||||
// 下一步
|
||||
nextStep() {
|
||||
var self = this
|
||||
var self = this;
|
||||
self.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
});
|
||||
this.$validator.validate().then(valid => {
|
||||
if (true === valid) {
|
||||
self.$toast.clear()
|
||||
self.$toast.clear();
|
||||
if (this.userInfo.idType == '1') {
|
||||
//身份证
|
||||
// 证件号码规则校验
|
||||
if (!idNoCheck.isIdno(this.userInfo.idNo)) {
|
||||
return this.$toast('请录入正确的身份证')
|
||||
return this.$toast('请录入正确的身份证');
|
||||
}
|
||||
if (this.userInfo.idNo.length == '18') {
|
||||
//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)) {
|
||||
return this.$toast('性别录入与身份证不符')
|
||||
return this.$toast('性别录入与身份证不符');
|
||||
}
|
||||
}
|
||||
self.save()
|
||||
self.save();
|
||||
} else {
|
||||
self.save()
|
||||
self.save();
|
||||
}
|
||||
} else {
|
||||
this.$toast(this.$validator.errors.all()[0])
|
||||
this.$toast(this.$validator.errors.all()[0]);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
save() {
|
||||
Dialog.confirm({
|
||||
@@ -243,21 +260,21 @@ export default {
|
||||
ebizEnterCustomerDto: this.userInfo,
|
||||
smsCodeDTO: { smsId: this.sessionId, code: this.userInfo.authCode }
|
||||
// ebizReferrerDto: this.recommender
|
||||
}
|
||||
console.log(data)
|
||||
let that = this
|
||||
};
|
||||
console.log(data);
|
||||
let that = this;
|
||||
that.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
});
|
||||
agentInfowxSubmit(data)
|
||||
.then(res => {
|
||||
// console.log(res)
|
||||
if (res.result == '0') {
|
||||
this.$store.commit('updateAgentEnterApplyMsg', this.userInfo)
|
||||
that.$toast.clear()
|
||||
this.$store.commit('updateAgentEnterApplyMsg', this.userInfo);
|
||||
that.$toast.clear();
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
@@ -268,77 +285,81 @@ export default {
|
||||
routerInfo: {
|
||||
path: `/agentEenter/ShareInfoSuccess`
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
this.$toast(res.resultMessage);
|
||||
}
|
||||
})
|
||||
.then(function(err) {
|
||||
console.log(err)
|
||||
})
|
||||
})
|
||||
console.log(err);
|
||||
});
|
||||
});
|
||||
},
|
||||
//弹框选择
|
||||
toSelect(pickerType, valueKey) {
|
||||
;[this.popupShow, this.pickerType] = [true, pickerType]
|
||||
if (valueKey) this.valueKey = valueKey
|
||||
;[this.popupShow, this.pickerType] = [true, pickerType];
|
||||
if (valueKey) this.valueKey = valueKey;
|
||||
if (pickerType == '1') {
|
||||
this.columns = DataDictionary.idType
|
||||
this.columns = DataDictionary.idType;
|
||||
} else if (pickerType == '13') {
|
||||
this.columns = DataDictionary.applGrade;
|
||||
}
|
||||
},
|
||||
// //确认选择字段
|
||||
onConfirm(value) {
|
||||
this.popupShow = false
|
||||
this.popupShow = false;
|
||||
if (this.pickerType == '1') {
|
||||
this.userInfo.idType = value.id
|
||||
this.userInfo.idType = value.id;
|
||||
} else if (this.pickerType == '13') {
|
||||
this.userInfo.applGrade = value.id;
|
||||
}
|
||||
},
|
||||
getRelatedData(val) {
|
||||
if (this.userInfo.idType != '1') {
|
||||
return
|
||||
return;
|
||||
}
|
||||
this.userInfo.sex = idToData(val).sex
|
||||
this.userInfo.sex = idToData(val).sex;
|
||||
},
|
||||
|
||||
//获取验证码
|
||||
getCode() {
|
||||
if (this.userInfo.mobile == '') {
|
||||
return this.$toast('请填写手机号')
|
||||
return this.$toast('请填写手机号');
|
||||
}
|
||||
this.codeDisabled = true
|
||||
this.codeDisabled = true;
|
||||
//倒计时
|
||||
this.timeId = setInterval(() => {
|
||||
this.countDown--
|
||||
this.countDown--;
|
||||
if (this.countDown <= 0) {
|
||||
window.clearInterval(this.timeId)
|
||||
this.codeDisabled = false
|
||||
this.countDown = 60
|
||||
window.clearInterval(this.timeId);
|
||||
this.codeDisabled = false;
|
||||
this.countDown = 60;
|
||||
}
|
||||
}, 1000)
|
||||
}, 1000);
|
||||
let data = {
|
||||
operateType: 'appntInfoEntry',
|
||||
type: 'H5',
|
||||
operateCode: this.userInfo.mobile,
|
||||
system: 'agentApp',
|
||||
operateCodeType: '0'
|
||||
}
|
||||
};
|
||||
//获取验证码
|
||||
getAuthCode(data).then(res => {
|
||||
console.log(res)
|
||||
console.log(res);
|
||||
if (res.result == 0) {
|
||||
this.sessionId = res.sessionId
|
||||
this.sessionId = res.sessionId;
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
this.$toast(res.resultMessage);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<style lang='scss' scoped>
|
||||
.insured-info-container {
|
||||
.referrerW {
|
||||
/deep/.van-cell__title {
|
||||
/deep/ .van-cell__title {
|
||||
width: 110px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1000,7 +1000,7 @@ export default {
|
||||
}
|
||||
})
|
||||
} else if (pickerType == '22') {
|
||||
this.columns = DataDictionary.insuredIdType
|
||||
this.columns = DataDictionary.idType
|
||||
}
|
||||
},
|
||||
//确认选择字段
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
{{ [index01 + 1] }} {{ item01.question }}
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="item.vagueNode && item.vagueNode.endVagueMsg" v-html="item.vagueNode.endVagueMsg"></div>
|
||||
</template>
|
||||
<template v-else-if="item.singleNode.isRichText == 2">
|
||||
<img :src="item.singleNode.PicUrl" class="w150 h150" alt="" />
|
||||
@@ -74,6 +75,12 @@ export default {
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
let head = document.getElementsByTagName('head');
|
||||
let meta = document.createElement('meta');
|
||||
meta.name = 'referrer';
|
||||
//根据实际情况修改referrer的值,可选值参考上文
|
||||
meta.content = 'no-referrer';
|
||||
head[0].appendChild(meta);
|
||||
this.getHistorylist() //获取对话记录接口
|
||||
},
|
||||
mounted: function() {
|
||||
|
||||
Reference in New Issue
Block a user