mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-22 07:06:44 +08:00
Merge branch 'feature/GFRS-693【待确定】自助入司流程优化(app端)' into dev
# Conflicts: # src/config/urlMap.js
This commit is contained in:
@@ -1460,6 +1460,7 @@ export default {
|
|||||||
{ id: 'AD', text: '营业总监' }
|
{ id: 'AD', text: '营业总监' }
|
||||||
],
|
],
|
||||||
relationType: [{ id: '0', text: '配偶' }, { id: '1', text: '子女' }, { id: '2', text: '父母' }],
|
relationType: [{ id: '0', text: '配偶' }, { id: '1', text: '子女' }, { id: '2', text: '父母' }],
|
||||||
|
// relationType: [{ id: '0', text: '配偶' }, { id: '1', text: '子女' }, { id: '2', text: '父母' }, { id: '3', text: '无' }],
|
||||||
guarantRelationType: [{ id: '0', text: '亲属' }, { id: '1', text: '朋友' }, { id: '2', text: '同事' }, { id: '3', text: '其他' }],
|
guarantRelationType: [{ id: '0', text: '亲属' }, { id: '1', text: '朋友' }, { id: '2', text: '同事' }, { id: '3', text: '其他' }],
|
||||||
classification: [{ id: '0', text: '司内' }, { id: '1', text: '司外' }],
|
classification: [{ id: '0', text: '司内' }, { id: '1', text: '司外' }],
|
||||||
//入司国籍/地区
|
//入司国籍/地区
|
||||||
|
|||||||
6
src/config/agentEenter.js
Normal file
6
src/config/agentEenter.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
//自助入司
|
||||||
|
let mockBaseUrl = 'http://mock-api.com/LwnaDLg1.mock'
|
||||||
|
export default {
|
||||||
|
// 查询签署协议信息
|
||||||
|
'/agent/agreement/query': mockBaseUrl + '/agent/agreement/query'
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ import manpower from './manpower'
|
|||||||
import cardList from './cardList'
|
import cardList from './cardList'
|
||||||
import renewalManage from './renewalManage'
|
import renewalManage from './renewalManage'
|
||||||
import preserve from './preserve'
|
import preserve from './preserve'
|
||||||
|
import agentEenter from './agentEenter'
|
||||||
const mockBaseUrl = 'http://rap2api.taobao.org/app/mock'
|
const mockBaseUrl = 'http://rap2api.taobao.org/app/mock'
|
||||||
|
|
||||||
let baseObj = {
|
let baseObj = {
|
||||||
@@ -22,6 +23,6 @@ let baseObj = {
|
|||||||
'/user/info': mockBaseUrl + '/223948/info',
|
'/user/info': mockBaseUrl + '/223948/info',
|
||||||
'/user/logout': mockBaseUrl + '/223948/logout'
|
'/user/logout': mockBaseUrl + '/223948/logout'
|
||||||
}
|
}
|
||||||
Object.assign(baseObj, proposal, sale, customer, my, product, serve, common, cardList, renewalManage, survey, manpower, preserve)
|
Object.assign(baseObj, proposal, sale, customer, my, product, serve, common, cardList, renewalManage, survey, manpower, preserve, agentEenter)
|
||||||
|
|
||||||
export default baseObj
|
export default baseObj
|
||||||
|
|||||||
@@ -18,52 +18,54 @@
|
|||||||
@click="toSelect('1', i)"
|
@click="toSelect('1', i)"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<van-field label="姓名" type="text" name="姓名" placeholder="请输入" v-validate="'required|name'" clearable v-model="item.name" required />
|
<div v-if="userInfo[i].relationType != '3'">
|
||||||
<select-radio :radios="sexRadio" label="性别" name="性别" v-validate="'required'" required :value.sync="item.sex"></select-radio>
|
<van-field label="姓名" type="text" name="姓名" placeholder="请输入" v-validate="'required|name'" clearable v-model="item.name" required />
|
||||||
<van-field
|
<select-radio :radios="sexRadio" label="性别" name="性别" v-validate="'required'" required :value.sync="item.sex"></select-radio>
|
||||||
:value="item.idType | idToText('idType')"
|
<van-field
|
||||||
v-validate="'required'"
|
:value="item.idType | idToText('idType')"
|
||||||
readonly
|
v-validate="'required'"
|
||||||
label="证件类型"
|
readonly
|
||||||
name="证件类型"
|
label="证件类型"
|
||||||
right-icon="arrow"
|
name="证件类型"
|
||||||
placeholder="请选择"
|
right-icon="arrow"
|
||||||
@click="toSelect('2', i)"
|
placeholder="请选择"
|
||||||
required
|
@click="toSelect('2', i)"
|
||||||
/>
|
required
|
||||||
<van-field
|
/>
|
||||||
label="证件号码"
|
<van-field
|
||||||
type="text"
|
label="证件号码"
|
||||||
name="证件号码"
|
type="text"
|
||||||
placeholder="请输入"
|
name="证件号码"
|
||||||
clearable
|
placeholder="请输入"
|
||||||
v-model="item.idNo"
|
clearable
|
||||||
v-validate="'required'"
|
v-model="item.idNo"
|
||||||
required
|
v-validate="'required'"
|
||||||
maxlength="18"
|
required
|
||||||
/>
|
maxlength="18"
|
||||||
<FieldDatePicter
|
/>
|
||||||
v-validate="'required'"
|
<FieldDatePicter
|
||||||
label="出生日期"
|
v-validate="'required'"
|
||||||
name="出生日期"
|
label="出生日期"
|
||||||
:value.sync="item.birthday"
|
name="出生日期"
|
||||||
type="date"
|
:value.sync="item.birthday"
|
||||||
:flag="true"
|
type="date"
|
||||||
ref="birthday"
|
:flag="true"
|
||||||
required
|
ref="birthday"
|
||||||
></FieldDatePicter>
|
required
|
||||||
<van-field
|
></FieldDatePicter>
|
||||||
v-model="item.mobile"
|
<van-field
|
||||||
label="联系电话"
|
v-model="item.mobile"
|
||||||
name="联系电话"
|
label="联系电话"
|
||||||
placeholder="请输入"
|
name="联系电话"
|
||||||
v-validate="'required|mobile'"
|
placeholder="请输入"
|
||||||
maxlength="11"
|
v-validate="'required|mobile'"
|
||||||
required
|
maxlength="11"
|
||||||
clearable
|
required
|
||||||
/>
|
clearable
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-btn mt20 pb20 text-center p15 c-gray-base" @click="add">+ 新增</div>
|
<div v-if="userInfo[0].relationType != '3'" class="add-btn mt20 pb20 text-center p15 c-gray-base" @click="add">+ 新增</div>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
<div class="flex justify-content-s bottom-btn bg-white">
|
<div class="flex justify-content-s bottom-btn bg-white">
|
||||||
<van-button class=" bottom0 left0" square plain type="danger" v-no-more-click="1000" @click="goBack" size="large">上一步</van-button>
|
<van-button class=" bottom0 left0" square plain type="danger" v-no-more-click="1000" @click="goBack" size="large">上一步</van-button>
|
||||||
@@ -214,6 +216,10 @@ export default {
|
|||||||
this.popupShow = false
|
this.popupShow = false
|
||||||
if (this.pickerType == '1') {
|
if (this.pickerType == '1') {
|
||||||
this.userInfo[this.enterIndex].relationType = value.id
|
this.userInfo[this.enterIndex].relationType = value.id
|
||||||
|
if (value.id == '3') {
|
||||||
|
//如果家庭关系选择无,则页面其他信息不需要填不需要显示
|
||||||
|
this.userInfo[0].sex = ''
|
||||||
|
}
|
||||||
// this.$forceUpdate()
|
// this.$forceUpdate()
|
||||||
}
|
}
|
||||||
if (this.pickerType == '2') {
|
if (this.pickerType == '2') {
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<div>
|
<div>
|
||||||
<RsTop :active="['1', '2', '3', '4']"></RsTop>
|
<RsTop :active="['1', '2', '3', '4']"></RsTop>
|
||||||
<div class="flex p10 align-items-c bg-white mt10">
|
<div class="flex p10 align-items-c bg-white mt10">
|
||||||
<b>销售人员相关证件上传</b>
|
<b>销售人员相关附件</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-white">
|
<div class="bg-white">
|
||||||
<div class="p10">
|
<div class="p10">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required label="代理人本人身份证正反面" disabled />
|
<van-field required label="本人身份证件影像信息" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListBank01')">
|
<div @click="test('fileListBank01')">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
@@ -62,24 +62,9 @@
|
|||||||
:max-count="2"
|
:max-count="2"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<van-cell-group class="flex justify-content-fs">
|
|
||||||
<!-- <van-field class="w-auto" required label="" disabled /> -->
|
|
||||||
<span><b class="red">*</b>近期免冠照片1张(半身、免冠、正面、白底、彩色,jpg格式,大小10-25K像素210*370或相同宽高比例)</span>
|
|
||||||
</van-cell-group>
|
|
||||||
<div @click="test('fileListBank04')">
|
|
||||||
<van-uploader
|
|
||||||
name="fileListBank04"
|
|
||||||
v-model="fileListBank04"
|
|
||||||
:after-read="afterRead"
|
|
||||||
@delete="deleteImg"
|
|
||||||
:before-delete="beforeDelete"
|
|
||||||
class="mt10 ml20"
|
|
||||||
:max-count="1"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<!-- end -->
|
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required class="365" label="银行卡(请拍照银行正面,卡号清晰)" disabled />
|
<van-field required label="银行卡正反面" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListBank05')">
|
<div @click="test('fileListBank05')">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
@@ -93,6 +78,23 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
|
||||||
|
<van-cell-group class="flex justify-content-fs pt10 pb10">
|
||||||
|
<!-- <van-field class="w-auto" required label="" disabled /> -->
|
||||||
|
<span class="fs14"><b class="red">*</b><b>近期免冠照片1张</b>(免冠、正面、白底彩色、JPG格式、大小30-40k像素210*370)</span>
|
||||||
|
</van-cell-group>
|
||||||
|
<div @click="test('fileListBank04')">
|
||||||
|
<van-uploader
|
||||||
|
name="fileListBank04"
|
||||||
|
v-model="fileListBank04"
|
||||||
|
:after-read="afterRead"
|
||||||
|
@delete="deleteImg"
|
||||||
|
:before-delete="beforeDelete"
|
||||||
|
class="mt10 ml20"
|
||||||
|
:max-count="1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<!-- end -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
<div class="pl30 pb15">
|
<div class="pl30 pb15">
|
||||||
本人签字:
|
本人签字:
|
||||||
<van-button type="danger" size="small" @click="sign" :disabled="isDisable" v-no-more-click="1000">{{ appntSign.signState == '0' ? '签名' : '已签名' }}</van-button>
|
<van-button type="danger" size="small" @click="sign" :disabled="isDisable" v-no-more-click="1000">{{
|
||||||
|
appntSign.signState == '0' ? '签名' : '已签名'
|
||||||
|
}}</van-button>
|
||||||
</div>
|
</div>
|
||||||
<van-button type="danger" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000" size="large">下一步</van-button>
|
<van-button type="danger" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000" size="large">下一步</van-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,6 +24,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { Field, Icon, Button, Radio, CheckboxGroup, NoticeBar, Dialog, RadioGroup } from 'vant'
|
import { Field, Icon, Button, Radio, CheckboxGroup, NoticeBar, Dialog, RadioGroup } from 'vant'
|
||||||
import { agreementQuery, signAgreement } from '@/api/ebiz/agentEenter/agentEenter.js'
|
import { agreementQuery, signAgreement } from '@/api/ebiz/agentEenter/agentEenter.js'
|
||||||
|
import { getAgreementNextPagePath } from './js/methods'
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -44,6 +47,10 @@ export default {
|
|||||||
isSign: false,
|
isSign: false,
|
||||||
//推荐人信息
|
//推荐人信息
|
||||||
agentInfo: {},
|
agentInfo: {},
|
||||||
|
//协议list
|
||||||
|
signList: [],
|
||||||
|
//当前页面协议签署后下一页路由
|
||||||
|
nextPagePath: '',
|
||||||
// 推荐人签名信息
|
// 推荐人签名信息
|
||||||
appntSign: {
|
appntSign: {
|
||||||
signState: '0'
|
signState: '0'
|
||||||
@@ -86,6 +93,8 @@ export default {
|
|||||||
agreementQuery(data).then(res => {
|
agreementQuery(data).then(res => {
|
||||||
that.$toast.clear()
|
that.$toast.clear()
|
||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
|
that.signList = res.content.ebizAgreementDtoList
|
||||||
|
getAgreementNextPagePath(that)
|
||||||
res.content.ebizAgreementDtoList.map(item => {
|
res.content.ebizAgreementDtoList.map(item => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if (item.type == '7') {
|
if (item.type == '7') {
|
||||||
@@ -175,11 +184,11 @@ export default {
|
|||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + `/#/agentEenter/letterOfCommitment`,
|
url: location.origin + `/#/agentEenter/${that.nextPagePath}`,
|
||||||
forbidSwipeBack: '1'
|
forbidSwipeBack: '1'
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: {
|
||||||
path: `/agentEenter/letterOfCommitment`
|
path: `/agentEenter/${that.nextPagePath}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -13,13 +13,15 @@
|
|||||||
需签署:
|
需签署:
|
||||||
<ul>
|
<ul>
|
||||||
<li class="flex" v-for="(sign, index) in signList" :key="index">
|
<li class="flex" v-for="(sign, index) in signList" :key="index">
|
||||||
<div class="w260 blue" >{{ sign.name }}</div>
|
<div class="w260 blue">{{ sign.name }}</div>
|
||||||
<van-icon v-if="sign.signState === '1'" color="green" name="checked" />
|
<van-icon v-if="sign.signState === '1'" color="green" name="checked" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
点击【开始】按钮,进行相关操作
|
点击【开始】按钮,进行相关操作
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center mt20"><van-button @click="faceAuth" v-no-more-click="1000" :disabled="isSubmit" type="danger" size="normal" style="width:30%">开始</van-button></div>
|
<div class="text-center mt20 mb60">
|
||||||
|
<van-button @click="faceAuth" v-no-more-click="1000" :disabled="isSubmit" type="danger" size="normal" style="width:30%">开始</van-button>
|
||||||
|
</div>
|
||||||
<van-button v-if="isSubmit" class="fixed bottom0" type="danger" v-no-more-click="1000" @click="clickSubmit" size="large">提交</van-button>
|
<van-button v-if="isSubmit" class="fixed bottom0" type="danger" v-no-more-click="1000" @click="clickSubmit" size="large">提交</van-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -68,7 +70,7 @@ export default {
|
|||||||
//获取签署协议人信息
|
//获取签署协议人信息
|
||||||
agreementQuery() {
|
agreementQuery() {
|
||||||
let data = {
|
let data = {
|
||||||
// userModel: { mobile: 13000000000 }, //线上去掉
|
// userModel: { mobile: 13000000000 } //线上去掉
|
||||||
}
|
}
|
||||||
this.$toast.loading({
|
this.$toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
duration: 0, // 持续展示 toast
|
||||||
@@ -102,6 +104,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
faceAuth() {
|
faceAuth() {
|
||||||
|
/*
|
||||||
let that = this
|
let that = this
|
||||||
localStorage.idNo = this.agentInfo.idNo
|
localStorage.idNo = this.agentInfo.idNo
|
||||||
localStorage.idName = this.agentInfo.name
|
localStorage.idName = this.agentInfo.name
|
||||||
@@ -125,6 +128,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
that.goUrl()
|
that.goUrl()
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
this.goUrl()
|
||||||
},
|
},
|
||||||
//自定义key值排序用
|
//自定义key值排序用
|
||||||
addKey(item) {
|
addKey(item) {
|
||||||
|
|||||||
@@ -3,40 +3,37 @@
|
|||||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||||
import utilsAge from '@/assets/js/utils/age'
|
import utilsAge from '@/assets/js/utils/age'
|
||||||
import dateUtils from '@/assets/js/utils/date-utils'
|
import dateUtils from '@/assets/js/utils/date-utils'
|
||||||
import {
|
import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||||
saveOrUpdateOrderInfo,
|
|
||||||
getAuthCode,
|
|
||||||
getOrderDetail
|
|
||||||
} from '@/api/ebiz/sale/sale'
|
|
||||||
import getAreaName from '@/assets/js/utils/get-area-name'
|
import getAreaName from '@/assets/js/utils/get-area-name'
|
||||||
// import idNoCheck from '@/assets/js/utils/idNoCheck'
|
// import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||||
import {
|
import { idToData } from './verification'
|
||||||
idToData
|
let relationToInsured = [
|
||||||
} from './verification'
|
{
|
||||||
let relationToInsured = [{
|
id: 2,
|
||||||
id: 2,
|
text: '配偶'
|
||||||
text: '配偶'
|
},
|
||||||
}, {
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
text: '父母'
|
text: '父母'
|
||||||
}, {
|
},
|
||||||
id: 4,
|
{
|
||||||
text: '子女'
|
id: 4,
|
||||||
}, {
|
text: '子女'
|
||||||
id: 5,
|
},
|
||||||
text: '其他'
|
{
|
||||||
}]
|
id: 5,
|
||||||
|
text: '其他'
|
||||||
|
}
|
||||||
|
]
|
||||||
//点击弹出组件
|
//点击弹出组件
|
||||||
export function selectComp(that, index, type = '') {
|
export function selectComp(that, index, type = '') {
|
||||||
console.log(index)
|
console.log(index)
|
||||||
that.currentPopupIndex = index
|
that.currentPopupIndex = index
|
||||||
let title = ''
|
let title = ''
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
;
|
;[that.customerShowPicker, title] = [true, '客户列表']
|
||||||
[that.customerShowPicker, title] = [true, '客户列表']
|
|
||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
;
|
;[that.occupationShowPicker, title] = [true, '职业类别']
|
||||||
[that.occupationShowPicker, title] = [true, '职业类别']
|
|
||||||
} else if (index == 3) {
|
} else if (index == 3) {
|
||||||
if (type == '1') {
|
if (type == '1') {
|
||||||
//投保人
|
//投保人
|
||||||
@@ -44,11 +41,11 @@ export function selectComp(that, index, type = '') {
|
|||||||
} else if (type == '2') {
|
} else if (type == '2') {
|
||||||
//被保险人
|
//被保险人
|
||||||
localStorage.scanFromInsured = 'false'
|
localStorage.scanFromInsured = 'false'
|
||||||
};
|
}
|
||||||
[that.isScan, title] = [true, '身份证扫描']
|
;[that.isScan, title] = [true, '身份证扫描']
|
||||||
} else if (index == 4) {
|
} else if (index == 4) {
|
||||||
localStorage.scanFromInsured = 0;
|
localStorage.scanFromInsured = 0
|
||||||
[that.bankisScan, title] = [true, '银行卡扫描']
|
;[that.bankisScan, title] = [true, '银行卡扫描']
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -68,13 +65,15 @@ function closeBtn(that) {
|
|||||||
that.$jump({
|
that.$jump({
|
||||||
flag: 'webview_right_button',
|
flag: 'webview_right_button',
|
||||||
extra: {
|
extra: {
|
||||||
btns: [{
|
btns: [
|
||||||
img: that.$assetsUrl + 'images/del-close.png',
|
{
|
||||||
route: {
|
img: that.$assetsUrl + 'images/del-close.png',
|
||||||
flag: '',
|
route: {
|
||||||
extra: {}
|
flag: '',
|
||||||
|
extra: {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}]
|
]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -86,7 +85,7 @@ function closeBtn(that) {
|
|||||||
* @param {String} type 1 投保人; 2 被保险人; 3 受益人
|
* @param {String} type 1 投保人; 2 被保险人; 3 受益人
|
||||||
*/
|
*/
|
||||||
export function appCallBack(that, type) {
|
export function appCallBack(that, type) {
|
||||||
return function () {
|
return function() {
|
||||||
let title
|
let title
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case '1':
|
case '1':
|
||||||
@@ -243,145 +242,171 @@ export function onConfirm(that, value, type) {
|
|||||||
case '1':
|
case '1':
|
||||||
that.userInfo.jobStatus = value.id
|
that.userInfo.jobStatus = value.id
|
||||||
break
|
break
|
||||||
case '2': {
|
case '2':
|
||||||
//如果关系是本人
|
{
|
||||||
if (value.id == 1) {
|
//如果关系是本人
|
||||||
//获取订单详情
|
if (value.id == 1) {
|
||||||
getOrderDetail({
|
//获取订单详情
|
||||||
orderNo: localStorage.orderNo
|
getOrderDetail({
|
||||||
}).then(res => {
|
orderNo: localStorage.orderNo
|
||||||
if (res.result == 0) {
|
}).then(res => {
|
||||||
that.isAppnt = true
|
if (res.result == 0) {
|
||||||
//获取投保人信息
|
that.isAppnt = true
|
||||||
let insuredInfo = res.orderDTO.appntDTO
|
//获取投保人信息
|
||||||
//清空验证码
|
let insuredInfo = res.orderDTO.appntDTO
|
||||||
insuredInfo.authCode = ''
|
//清空验证码
|
||||||
for (let key in that.userInfo) {
|
insuredInfo.authCode = ''
|
||||||
that.userInfo[key] = insuredInfo[key]
|
for (let key in that.userInfo) {
|
||||||
}
|
that.userInfo[key] = insuredInfo[key]
|
||||||
that.userInfo.birthday = insuredInfo.birthday
|
}
|
||||||
//户籍
|
that.userInfo.birthday = insuredInfo.birthday
|
||||||
that.sureArea([{
|
//户籍
|
||||||
code: insuredInfo.householdProvince
|
that.sureArea(
|
||||||
}, {
|
[
|
||||||
code: insuredInfo.householdCity
|
{
|
||||||
}], '3')
|
code: insuredInfo.householdProvince
|
||||||
//单位地址
|
},
|
||||||
that.sureArea([{
|
{
|
||||||
code: insuredInfo.companyProvince
|
code: insuredInfo.householdCity
|
||||||
}, {
|
}
|
||||||
code: insuredInfo.companyCity
|
],
|
||||||
}, {
|
'3'
|
||||||
code: insuredInfo.companyArea
|
)
|
||||||
}], '1')
|
//单位地址
|
||||||
//家庭地址
|
that.sureArea(
|
||||||
that.sureArea([{
|
[
|
||||||
code: insuredInfo.homeProvince
|
{
|
||||||
}, {
|
code: insuredInfo.companyProvince
|
||||||
code: insuredInfo.homeCity
|
},
|
||||||
}, {
|
{
|
||||||
code: insuredInfo.homeArea
|
code: insuredInfo.companyCity
|
||||||
}], '2')
|
},
|
||||||
//是否长期
|
{
|
||||||
if (insuredInfo.effectiveDateType == 'false') {
|
code: insuredInfo.companyArea
|
||||||
that.userInfo.effectiveDateType = false
|
}
|
||||||
|
],
|
||||||
|
'1'
|
||||||
|
)
|
||||||
|
//家庭地址
|
||||||
|
that.sureArea(
|
||||||
|
[
|
||||||
|
{
|
||||||
|
code: insuredInfo.homeProvince
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: insuredInfo.homeCity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: insuredInfo.homeArea
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'2'
|
||||||
|
)
|
||||||
|
//是否长期
|
||||||
|
if (insuredInfo.effectiveDateType == 'false') {
|
||||||
|
that.userInfo.effectiveDateType = false
|
||||||
|
} else {
|
||||||
|
that.userInfo.effectiveDateType = true
|
||||||
|
that.userInfo.certiexpiredate = ''
|
||||||
|
that.$refs.certiexpiredate.date = ''
|
||||||
|
}
|
||||||
|
//数据不是从用户列表拉取
|
||||||
|
that.fromCustomer = false
|
||||||
|
that.userInfo.relationToAppnt = value.id
|
||||||
|
//长期判断
|
||||||
|
if (that.userInfo.idType == '1') {
|
||||||
|
// 计算年龄
|
||||||
|
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
||||||
|
// 长期按钮是否禁用
|
||||||
|
that.effectiveDateTypeAble = age <= 45
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
that.userInfo.effectiveDateType = true
|
that.$toast(res.resultMessage)
|
||||||
that.userInfo.certiexpiredate = ''
|
|
||||||
that.$refs.certiexpiredate.date = ''
|
|
||||||
}
|
}
|
||||||
//数据不是从用户列表拉取
|
})
|
||||||
that.fromCustomer = false
|
} else {
|
||||||
that.userInfo.relationToAppnt = value.id
|
that.isAppnt = false
|
||||||
//长期判断
|
//数据是否从用户列表拉取
|
||||||
if (that.userInfo.idType == '1') {
|
if (that.fromCustomer) {
|
||||||
// 计算年龄
|
return (that.userInfo.relationToAppnt = value.id)
|
||||||
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
}
|
||||||
// 长期按钮是否禁用
|
//如果关系不是本人(选了本人之后修改), 清空 userInfo 信息
|
||||||
that.effectiveDateTypeAble = age <= 45
|
for (var key in that.userInfo) {
|
||||||
|
if (!['rsnationType', 'sex', 'idType', 'effectiveDateType', 'medical'].includes(key)) {
|
||||||
|
that.userInfo[key] = ''
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
that.$toast(res.resultMessage)
|
|
||||||
}
|
}
|
||||||
})
|
that.userInfo.effectiveDateType = false
|
||||||
} else {
|
that.effectiveDateTypeAble = false
|
||||||
that.isAppnt = false
|
that.areaName = that.homeName = that.census = ''
|
||||||
//数据是否从用户列表拉取
|
that.userInfo.relationToAppnt = value.id
|
||||||
if (that.fromCustomer) {
|
|
||||||
return (that.userInfo.relationToAppnt = value.id)
|
|
||||||
}
|
}
|
||||||
//如果关系不是本人(选了本人之后修改), 清空 userInfo 信息
|
|
||||||
for (var key in that.userInfo) {
|
|
||||||
if (!['rsnationType', 'sex', 'idType', 'effectiveDateType', 'medical'].includes(key)) {
|
|
||||||
that.userInfo[key] = ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
that.userInfo.effectiveDateType = false
|
|
||||||
that.effectiveDateTypeAble = false
|
|
||||||
that.areaName = that.homeName = that.census = ''
|
|
||||||
that.userInfo.relationToAppnt = value.id
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break
|
break
|
||||||
case '3': {
|
case '3':
|
||||||
//如果受益人是被保险人本人
|
{
|
||||||
if (value.id == 1) {
|
//如果受益人是被保险人本人
|
||||||
//获取投保人数据
|
if (value.id == 1) {
|
||||||
getOrderDetail({
|
//获取投保人数据
|
||||||
orderNo: localStorage.orderNo
|
getOrderDetail({
|
||||||
}).then(res => {
|
orderNo: localStorage.orderNo
|
||||||
if (res.result == 0) {
|
}).then(res => {
|
||||||
that.isInsured = true
|
if (res.result == 0) {
|
||||||
//获取被保险人信息
|
that.isInsured = true
|
||||||
let insuredInfo = res.orderDTO.insuredDTOs[0]
|
//获取被保险人信息
|
||||||
for (let key in that.userInfo) {
|
let insuredInfo = res.orderDTO.insuredDTOs[0]
|
||||||
that.userInfo[key] = insuredInfo[key]
|
for (let key in that.userInfo) {
|
||||||
|
that.userInfo[key] = insuredInfo[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
that.userInfo.city = insuredInfo.homeCity //家庭市
|
||||||
|
that.userInfo.area = insuredInfo.homeArea //家庭区
|
||||||
|
that.userInfo.province = insuredInfo.homeProvince //家庭省
|
||||||
|
that.areaName = getAreaName([
|
||||||
|
{
|
||||||
|
code: insuredInfo.homeProvince
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: insuredInfo.homeCity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: insuredInfo.homeArea
|
||||||
|
}
|
||||||
|
]) //家庭地址
|
||||||
|
that.userInfo.village = insuredInfo.homeAddress //家庭详细地址
|
||||||
|
}, 0)
|
||||||
|
|
||||||
|
//受益人类型
|
||||||
|
that.userInfo.bnfType = '0'
|
||||||
|
//是否长期
|
||||||
|
that.userInfo.effectiveDateType = insuredInfo.effectiveDateType == 'false' ? false : true
|
||||||
|
//受益顺序
|
||||||
|
that.userInfo.bnfOrder = '1'
|
||||||
|
|
||||||
|
//长期判断
|
||||||
|
if (that.userInfo.idType == '1') {
|
||||||
|
// 计算年龄
|
||||||
|
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
||||||
|
// 长期按钮是否禁用
|
||||||
|
that.effectiveDateTypeAble = age <= 45
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
that.$toast(res.resultMessage)
|
||||||
}
|
}
|
||||||
|
;[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
|
||||||
setTimeout(() => {
|
})
|
||||||
that.userInfo.city = insuredInfo.homeCity //家庭市
|
} else {
|
||||||
that.userInfo.area = insuredInfo.homeArea //家庭区
|
that.isInsured = false
|
||||||
that.userInfo.province = insuredInfo.homeProvince //家庭省
|
for (var key in that.userInfo) {
|
||||||
that.areaName = getAreaName([{
|
if (!['rsnationType', 'sex', 'idType', 'bnfOrder', 'bnfType'].includes(key)) {
|
||||||
code: insuredInfo.homeProvince
|
that.userInfo[key] = ''
|
||||||
}, {
|
|
||||||
code: insuredInfo.homeCity
|
|
||||||
}, {
|
|
||||||
code: insuredInfo.homeArea
|
|
||||||
}]) //家庭地址
|
|
||||||
that.userInfo.village = insuredInfo.homeAddress //家庭详细地址
|
|
||||||
}, 0)
|
|
||||||
|
|
||||||
//受益人类型
|
|
||||||
that.userInfo.bnfType = '0'
|
|
||||||
//是否长期
|
|
||||||
that.userInfo.effectiveDateType = insuredInfo.effectiveDateType == 'false' ? false : true
|
|
||||||
//受益顺序
|
|
||||||
that.userInfo.bnfOrder = '1'
|
|
||||||
|
|
||||||
//长期判断
|
|
||||||
if (that.userInfo.idType == '1') {
|
|
||||||
// 计算年龄
|
|
||||||
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
|
||||||
// 长期按钮是否禁用
|
|
||||||
that.effectiveDateTypeAble = age <= 45
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
that.$toast(res.resultMessage)
|
|
||||||
};
|
|
||||||
[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
that.isInsured = false
|
|
||||||
for (var key in that.userInfo) {
|
|
||||||
if (!['rsnationType', 'sex', 'idType', 'bnfOrder', 'bnfType'].includes(key)) {
|
|
||||||
that.userInfo[key] = ''
|
|
||||||
}
|
}
|
||||||
|
that.areaName = ''
|
||||||
|
;[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
|
||||||
}
|
}
|
||||||
that.areaName = '';
|
|
||||||
[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
} else if (that.pickerType == '8') {
|
} else if (that.pickerType == '8') {
|
||||||
@@ -411,91 +436,93 @@ export function onConfirm(that, value, type) {
|
|||||||
export function onDateConfirm(that, val, type) {
|
export function onDateConfirm(that, val, type) {
|
||||||
console.log(type)
|
console.log(type)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case '0': {
|
case '0':
|
||||||
//证件起始日期
|
{
|
||||||
//如果录入日期早于出生日期或晚于当前日期
|
//证件起始日期
|
||||||
if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(that.userInfo.birthday)) {
|
//如果录入日期早于出生日期或晚于当前日期
|
||||||
that.userInfo.certificateValidate = ''
|
if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(that.userInfo.birthday)) {
|
||||||
that.$refs.certificateValidate.date = ''
|
that.userInfo.certificateValidate = ''
|
||||||
return that.$toast('证件起始日期填写错误')
|
that.$refs.certificateValidate.date = ''
|
||||||
}
|
return that.$toast('证件起始日期填写错误')
|
||||||
|
}
|
||||||
|
|
||||||
// 计算年龄
|
// 计算年龄
|
||||||
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
|
||||||
// 长期按钮是否禁用
|
|
||||||
that.effectiveDateTypeAble = age <= 45
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case '1': {
|
|
||||||
console.log('证件截止日期')
|
|
||||||
//证件截止日期
|
|
||||||
//如果已经勾选了长期
|
|
||||||
if (that.userInfo.effectiveDateType) {
|
|
||||||
//清空数据并返回
|
|
||||||
that.userInfo.certiexpiredate = ''
|
|
||||||
that.$refs.certiexpiredate.date = ''
|
|
||||||
return
|
|
||||||
}
|
|
||||||
//如果录入日期早于当前日期
|
|
||||||
if (Date.parse(val) < Date.parse(new Date())) {
|
|
||||||
that.userInfo.certiexpiredate = ''
|
|
||||||
that.$refs.certiexpiredate.date = ''
|
|
||||||
return that.$toast('您的证件已过期')
|
|
||||||
}
|
|
||||||
//不同证件类型的判断
|
|
||||||
// if (that.userInfo.idType) {
|
|
||||||
// //获取年龄
|
|
||||||
// let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
|
||||||
// console.log(age)
|
|
||||||
// //年龄在16-25周岁之间
|
|
||||||
// if (age >= 16 && age <= 25) {
|
|
||||||
// if (new Date(val).getFullYear() - new Date(that.userInfo.certificateValidate).getFullYear() != 10) {
|
|
||||||
// that.userInfo.certiexpiredate = ''
|
|
||||||
// that.$refs.certiexpiredate.date = ''
|
|
||||||
// return that.$toast('16周岁~25周岁的证件有效期为10年')
|
|
||||||
// }
|
|
||||||
// //年龄在26-45周岁之间
|
|
||||||
// } else if (age >= 26 && age <= 45) {
|
|
||||||
// if (new Date(val).getFullYear() - new Date(that.userInfo.certificateValidate).getFullYear() != 20) {
|
|
||||||
// that.userInfo.certiexpiredate = ''
|
|
||||||
// that.$refs.certiexpiredate.date = ''
|
|
||||||
// return that.$toast('26周岁~45周岁的证件有效期为20年')
|
|
||||||
// }
|
|
||||||
// //此外的年龄段不支持
|
|
||||||
// } else {
|
|
||||||
// that.userInfo.certiexpiredate = ''
|
|
||||||
// that.$refs.certiexpiredate.date = ''
|
|
||||||
// return that.$toast('身份证不支持此年龄段')
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case '2': {
|
|
||||||
//出生日期
|
|
||||||
//如果录入日期晚于当前日期
|
|
||||||
if (Date.parse(val) > Date.parse(new Date())) {
|
|
||||||
that.userInfo.birthday = ''
|
|
||||||
that.$refs.birthday.date = ''
|
|
||||||
return that.$toast('出生日期不晚于当日')
|
|
||||||
}
|
|
||||||
//长期判断
|
|
||||||
if (that.userInfo.idType == '1') {
|
|
||||||
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
||||||
|
// 长期按钮是否禁用
|
||||||
that.effectiveDateTypeAble = age <= 45
|
that.effectiveDateTypeAble = age <= 45
|
||||||
}
|
}
|
||||||
//出生证有效期
|
break
|
||||||
if (that.userInfo.idType == '3' && that.userInfo.idNo.length != 15 && that.userInfo.idNo.length != 18) {
|
case '1':
|
||||||
let exipreDate = Date.parse(val) + Date.parse('1972-12-31')
|
{
|
||||||
that.userInfo.certificateValidate = val
|
console.log('证件截止日期')
|
||||||
that.userInfo.certiexpiredate = that.timeStampFormat(exipreDate)
|
//证件截止日期
|
||||||
that.idLimit = true
|
//如果已经勾选了长期
|
||||||
|
if (that.userInfo.effectiveDateType) {
|
||||||
|
//清空数据并返回
|
||||||
|
that.userInfo.certiexpiredate = ''
|
||||||
|
that.$refs.certiexpiredate.date = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//如果录入日期早于当前日期
|
||||||
|
if (Date.parse(val) < Date.parse(new Date())) {
|
||||||
|
that.userInfo.certiexpiredate = ''
|
||||||
|
that.$refs.certiexpiredate.date = ''
|
||||||
|
return that.$toast('您的证件已过期')
|
||||||
|
}
|
||||||
|
//不同证件类型的判断
|
||||||
|
// if (that.userInfo.idType) {
|
||||||
|
// //获取年龄
|
||||||
|
// let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
||||||
|
// console.log(age)
|
||||||
|
// //年龄在16-25周岁之间
|
||||||
|
// if (age >= 16 && age <= 25) {
|
||||||
|
// if (new Date(val).getFullYear() - new Date(that.userInfo.certificateValidate).getFullYear() != 10) {
|
||||||
|
// that.userInfo.certiexpiredate = ''
|
||||||
|
// that.$refs.certiexpiredate.date = ''
|
||||||
|
// return that.$toast('16周岁~25周岁的证件有效期为10年')
|
||||||
|
// }
|
||||||
|
// //年龄在26-45周岁之间
|
||||||
|
// } else if (age >= 26 && age <= 45) {
|
||||||
|
// if (new Date(val).getFullYear() - new Date(that.userInfo.certificateValidate).getFullYear() != 20) {
|
||||||
|
// that.userInfo.certiexpiredate = ''
|
||||||
|
// that.$refs.certiexpiredate.date = ''
|
||||||
|
// return that.$toast('26周岁~45周岁的证件有效期为20年')
|
||||||
|
// }
|
||||||
|
// //此外的年龄段不支持
|
||||||
|
// } else {
|
||||||
|
// that.userInfo.certiexpiredate = ''
|
||||||
|
// that.$refs.certiexpiredate.date = ''
|
||||||
|
// return that.$toast('身份证不支持此年龄段')
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
break
|
||||||
// 由日期算周岁
|
case '2':
|
||||||
let age = dateUtils.jsGetAge(val)
|
{
|
||||||
that.userInfo.age = age
|
//出生日期
|
||||||
|
//如果录入日期晚于当前日期
|
||||||
|
if (Date.parse(val) > Date.parse(new Date())) {
|
||||||
|
that.userInfo.birthday = ''
|
||||||
|
that.$refs.birthday.date = ''
|
||||||
|
return that.$toast('出生日期不晚于当日')
|
||||||
|
}
|
||||||
|
//长期判断
|
||||||
|
if (that.userInfo.idType == '1') {
|
||||||
|
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
|
||||||
|
that.effectiveDateTypeAble = age <= 45
|
||||||
|
}
|
||||||
|
//出生证有效期
|
||||||
|
if (that.userInfo.idType == '3' && that.userInfo.idNo.length != 15 && that.userInfo.idNo.length != 18) {
|
||||||
|
let exipreDate = Date.parse(val) + Date.parse('1972-12-31')
|
||||||
|
that.userInfo.certificateValidate = val
|
||||||
|
that.userInfo.certiexpiredate = that.timeStampFormat(exipreDate)
|
||||||
|
that.idLimit = true
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// 由日期算周岁
|
||||||
|
let age = dateUtils.jsGetAge(val)
|
||||||
|
that.userInfo.age = age
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -545,13 +572,17 @@ export function chooseCustomer(that, data, type) {
|
|||||||
that.userInfo.mobile = data.customerPhone //移动电话
|
that.userInfo.mobile = data.customerPhone //移动电话
|
||||||
that.userInfo.email = data.email //电子邮箱
|
that.userInfo.email = data.email //电子邮箱
|
||||||
if (data.companyProvince.length) {
|
if (data.companyProvince.length) {
|
||||||
that.areaName = getAreaName([{
|
that.areaName = getAreaName([
|
||||||
code: data.companyProvince
|
{
|
||||||
}, {
|
code: data.companyProvince
|
||||||
code: data.companyCity
|
},
|
||||||
}, {
|
{
|
||||||
code: data.companyArea
|
code: data.companyCity
|
||||||
}]) //单位地址
|
},
|
||||||
|
{
|
||||||
|
code: data.companyArea
|
||||||
|
}
|
||||||
|
]) //单位地址
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type != '3') {
|
if (type != '3') {
|
||||||
@@ -581,20 +612,27 @@ export function chooseCustomer(that, data, type) {
|
|||||||
that.userInfo.householdProvince = data.province //户籍省
|
that.userInfo.householdProvince = data.province //户籍省
|
||||||
that.userInfo.householdCity = data.city //户籍市
|
that.userInfo.householdCity = data.city //户籍市
|
||||||
if (data.province.length) {
|
if (data.province.length) {
|
||||||
that.census = getAreaName([{
|
that.census = getAreaName([
|
||||||
code: data.province
|
{
|
||||||
}, {
|
code: data.province
|
||||||
code: data.city
|
},
|
||||||
}]) //户籍
|
{
|
||||||
|
code: data.city
|
||||||
|
}
|
||||||
|
]) //户籍
|
||||||
}
|
}
|
||||||
if (data.homeProvince.length) {
|
if (data.homeProvince.length) {
|
||||||
that.homeName = getAreaName([{
|
that.homeName = getAreaName([
|
||||||
code: data.homeProvince
|
{
|
||||||
}, {
|
code: data.homeProvince
|
||||||
code: data.homeCity
|
},
|
||||||
}, {
|
{
|
||||||
code: data.homeArea
|
code: data.homeCity
|
||||||
}]) //家庭地址
|
},
|
||||||
|
{
|
||||||
|
code: data.homeArea
|
||||||
|
}
|
||||||
|
]) //家庭地址
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
that.userInfo.province = data.homeProvince //家庭省
|
that.userInfo.province = data.homeProvince //家庭省
|
||||||
@@ -656,28 +694,30 @@ export function infoUpdate(that, type) {
|
|||||||
if (chooseProductCodes && chooseProductCodes.length) {
|
if (chooseProductCodes && chooseProductCodes.length) {
|
||||||
let flag
|
let flag
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case '1': {
|
case '1':
|
||||||
//取出local中的投被保险人信息
|
{
|
||||||
let saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo)
|
//取出local中的投被保险人信息
|
||||||
//如果 性别, 出生日期, 有无社保, 职业 发生变化
|
let saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo)
|
||||||
if (that.userInfo.sex != saleInsuredInfo.sex || that.userInfo.birthday != saleInsuredInfo.birthday) {
|
//如果 性别, 出生日期, 有无社保, 职业 发生变化
|
||||||
flag = true
|
if (that.userInfo.sex != saleInsuredInfo.sex || that.userInfo.birthday != saleInsuredInfo.birthday) {
|
||||||
|
flag = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break
|
break
|
||||||
case '2': {
|
case '2':
|
||||||
//取出local中的被保险人信息
|
{
|
||||||
let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
|
//取出local中的被保险人信息
|
||||||
//如果 性别, 出生日期, 有无社保, 职业 发生变化
|
let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
|
||||||
if (
|
//如果 性别, 出生日期, 有无社保, 职业 发生变化
|
||||||
that.userInfo.sex != saleInsuredPersonInfo.sex ||
|
if (
|
||||||
that.userInfo.birthday != saleInsuredPersonInfo.birthday ||
|
that.userInfo.sex != saleInsuredPersonInfo.sex ||
|
||||||
that.userInfo.medical != saleInsuredPersonInfo.medical ||
|
that.userInfo.birthday != saleInsuredPersonInfo.birthday ||
|
||||||
that.userInfo.occupationCode != saleInsuredPersonInfo.occupationCode
|
that.userInfo.medical != saleInsuredPersonInfo.medical ||
|
||||||
) {
|
that.userInfo.occupationCode != saleInsuredPersonInfo.occupationCode
|
||||||
flag = true
|
) {
|
||||||
|
flag = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -789,22 +829,20 @@ export function sureArea(that, area, type, flag = false) {
|
|||||||
case '1': //单位地址
|
case '1': //单位地址
|
||||||
that.areaName = getAreaName(area)
|
that.areaName = getAreaName(area)
|
||||||
if (flag) {
|
if (flag) {
|
||||||
;
|
;[that.userInfo.province, that.userInfo.city, that.userInfo.area] = [area[0].code, area[1].code, area[2].code]
|
||||||
[that.userInfo.province, that.userInfo.city, that.userInfo.area] = [area[0].code, area[1].code, area[2].code]
|
|
||||||
} else {
|
} else {
|
||||||
;
|
;[that.userInfo.companyProvince, that.userInfo.companyCity, that.userInfo.companyArea] = [area[0].code, area[1].code, area[2].code]
|
||||||
[that.userInfo.companyProvince, that.userInfo.companyCity, that.userInfo.companyArea] = [area[0].code, area[1].code, area[2].code]
|
|
||||||
}
|
}
|
||||||
that.areaShow = false
|
that.areaShow = false
|
||||||
break
|
break
|
||||||
case '2': //家庭地址
|
case '2': //家庭地址
|
||||||
that.homeName = getAreaName(area);
|
that.homeName = getAreaName(area)
|
||||||
[that.userInfo.homeProvince, that.userInfo.homeCity, that.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
;[that.userInfo.homeProvince, that.userInfo.homeCity, that.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||||
that.homeShow = false
|
that.homeShow = false
|
||||||
break
|
break
|
||||||
case '3': //户籍
|
case '3': //户籍
|
||||||
that.census = getAreaName(area);
|
that.census = getAreaName(area)
|
||||||
[that.userInfo.householdProvince, that.userInfo.householdCity] = [area[0].code, area[1].code]
|
;[that.userInfo.householdProvince, that.userInfo.householdCity] = [area[0].code, area[1].code]
|
||||||
that.censusShow = false
|
that.censusShow = false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -853,8 +891,7 @@ export function getRelatedData(that, val) {
|
|||||||
}
|
}
|
||||||
//如果证件校验不通过,恢复默认值
|
//如果证件校验不通过,恢复默认值
|
||||||
if (idToData(val).text) {
|
if (idToData(val).text) {
|
||||||
;
|
;[that.userInfo.idNo, that.userInfo.sex, that.userInfo.birthday, that.effectiveDateTypeAble] = ['', '0', '', false]
|
||||||
[that.userInfo.idNo, that.userInfo.sex, that.userInfo.birthday, that.effectiveDateTypeAble] = ['', '0', '', false]
|
|
||||||
return that.$toast(idToData(val).text)
|
return that.$toast(idToData(val).text)
|
||||||
}
|
}
|
||||||
that.userInfo.effectiveDateType = false
|
that.userInfo.effectiveDateType = false
|
||||||
@@ -925,4 +962,70 @@ export function effectiveDataTypeChange(that, val) {
|
|||||||
} else {
|
} else {
|
||||||
that.certiexpiredateRequired = true
|
that.certiexpiredateRequired = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//筛选未签署协议,获取签署当前页面协议后,跳转路径
|
||||||
|
/**
|
||||||
|
* @param {*} that 上下文
|
||||||
|
* @param {*} signList 协议list
|
||||||
|
*/
|
||||||
|
export function getAgreementNextPagePath(that, signList) {
|
||||||
|
let unsignedList = [],
|
||||||
|
nextPagePath = ''
|
||||||
|
that.signList.map(item => {
|
||||||
|
addKey(item)
|
||||||
|
filtUnsigned(item)
|
||||||
|
})
|
||||||
|
that.signList.sort(function(a, b) {
|
||||||
|
return a.key - b.key
|
||||||
|
})
|
||||||
|
if (unsignedList.length > 1) {
|
||||||
|
nextPagePath = unsignedList[1].path
|
||||||
|
} else {
|
||||||
|
nextPagePath = 'signContract'
|
||||||
|
}
|
||||||
|
//自定义key值排序用
|
||||||
|
function addKey(item) {
|
||||||
|
//13保险代理申请人健康声明 10承诺书 16广西保险销售从业人员信息公开承诺书
|
||||||
|
//15销售从业人员拒绝非法集资、非法放贷、金融诈骗承诺书 12担保书 11代理人基本福利保障知晓函 14个险销售人员代理合同
|
||||||
|
switch (item.type) {
|
||||||
|
case '13':
|
||||||
|
item.key = 1
|
||||||
|
item.path = 'healthNotice'
|
||||||
|
break
|
||||||
|
case '10':
|
||||||
|
item.key = 2
|
||||||
|
item.path = 'LetterOfCommitment'
|
||||||
|
break
|
||||||
|
case '16':
|
||||||
|
item.key = 3
|
||||||
|
item.path = 'MessageLetterOfCommitment'
|
||||||
|
break
|
||||||
|
case '15':
|
||||||
|
item.key = 4
|
||||||
|
item.path = 'IllegalLetterOfCommitment'
|
||||||
|
break
|
||||||
|
case '12':
|
||||||
|
item.key = 5
|
||||||
|
item.path = 'Guarantee'
|
||||||
|
break
|
||||||
|
case '11':
|
||||||
|
item.key = 6
|
||||||
|
item.path = 'LetterOfKnow'
|
||||||
|
break
|
||||||
|
case '14':
|
||||||
|
item.key = 7
|
||||||
|
item.path = 'paction'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//筛选未签名协议
|
||||||
|
function filtUnsigned(item) {
|
||||||
|
//signState 0-未签名 1-已签名
|
||||||
|
if (item.signState == '0') {
|
||||||
|
unsignedList.push(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
that.nextPagePath = nextPagePath
|
||||||
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
/>
|
/>
|
||||||
<van-field
|
<van-field
|
||||||
v-model="userInfo.idNo"
|
v-model="userInfo.idNo"
|
||||||
placeholder="请输入"
|
placeholder="请输入证件号码"
|
||||||
label="证件号码"
|
label="证件号码"
|
||||||
name="证件号码"
|
name="证件号码"
|
||||||
v-validate="'required'"
|
v-validate="'required'"
|
||||||
@@ -30,16 +30,12 @@
|
|||||||
@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>
|
<select-radio :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :required="false" :value.sync="userInfo.sex"></select-radio>
|
||||||
<van-field
|
<van-field v-model="userInfo.mobile" label="手机号" name="手机号" placeholder="请输入手机号" v-validate="'required|mobile'" maxlength="11" clearable />
|
||||||
v-model="userInfo.mobile"
|
<van-field v-model="userInfo.authCode" center clearable label name="短信验证码" placeholder="请输入短信验证码" v-validate="'required'" maxlength="6">
|
||||||
label="手机号"
|
<van-button slot="button" size="small" type="danger" @click="getCode" :disabled="codeDisabled" v-no-more-click="1000">
|
||||||
type="textarea"
|
{{ codeDisabled ? `${countDown}s后重新获取` : '发送验证码' }}
|
||||||
name="手机号"
|
</van-button>
|
||||||
placeholder="请输入"
|
</van-field>
|
||||||
v-validate="'required|mobile'"
|
|
||||||
maxlength="11"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</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>
|
||||||
|
|
||||||
@@ -67,6 +63,8 @@ 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 } from '@/api/ebiz/sale/sale'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'insuredInfo',
|
name: 'insuredInfo',
|
||||||
components: {
|
components: {
|
||||||
@@ -119,7 +117,10 @@ export default {
|
|||||||
},
|
},
|
||||||
areaList: areaList,
|
areaList: areaList,
|
||||||
token: '',
|
token: '',
|
||||||
wxShareDesc: ''
|
wxShareDesc: '',
|
||||||
|
codeDisabled: false, //获取验证码按钮是否禁用
|
||||||
|
countDown: 60, //获取短信验证码倒计时
|
||||||
|
sessionId: '' //后台返回的 id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -262,7 +263,8 @@ export default {
|
|||||||
// mobile: '18978145583'
|
// mobile: '18978145583'
|
||||||
// },
|
// },
|
||||||
entryType: 'SHARE_ADD',
|
entryType: 'SHARE_ADD',
|
||||||
ebizEnterCustomerDto: this.userInfo
|
ebizEnterCustomerDto: this.userInfo,
|
||||||
|
smsCodeDTO: { smsId: this.sessionId, code: this.userInfo.authCode }
|
||||||
// ebizReferrerDto: this.recommender
|
// ebizReferrerDto: this.recommender
|
||||||
}
|
}
|
||||||
console.log(data)
|
console.log(data)
|
||||||
@@ -319,6 +321,39 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.userInfo.sex = idToData(val).sex
|
this.userInfo.sex = idToData(val).sex
|
||||||
|
},
|
||||||
|
|
||||||
|
//获取验证码
|
||||||
|
getCode() {
|
||||||
|
if (this.userInfo.mobile == '') {
|
||||||
|
return this.$toast('请填写手机号')
|
||||||
|
}
|
||||||
|
this.codeDisabled = true
|
||||||
|
//倒计时
|
||||||
|
this.timeId = setInterval(() => {
|
||||||
|
this.countDown--
|
||||||
|
if (this.countDown <= 0) {
|
||||||
|
window.clearInterval(this.timeId)
|
||||||
|
this.codeDisabled = false
|
||||||
|
this.countDown = 60
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
let data = {
|
||||||
|
operateType: 'appntInfoEntry',
|
||||||
|
type: 'H5',
|
||||||
|
operateCode: this.userInfo.mobile,
|
||||||
|
system: 'agentApp',
|
||||||
|
operateCodeType: '0'
|
||||||
|
}
|
||||||
|
//获取验证码
|
||||||
|
getAuthCode(data).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.result == 0) {
|
||||||
|
this.sessionId = res.sessionId
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user