'工作单位合并'

This commit is contained in:
proudlx
2021-04-30 10:13:20 +08:00
parent ccc217f4a4
commit e90d995936

View File

@@ -122,7 +122,7 @@
placeholder="请输入"
v-validate="'required|mobileLength11|mobileStartWith1|mobile'"
maxlength="11"
/>
/>
<van-field v-model="userInfo.email" required label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
<van-field
v-model="userInfo.stature"
@@ -159,7 +159,7 @@
<!-- <van-radio-group :border="false" v-model="userInfo.addressStatus" v-validate="'required'" label="设置为联系地址" name="设置为联系地址"> -->
<!-- 工作信息 -->
<van-cell-group :border="false">
<p style=" border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 mt10 pv12">工作信息</p>
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 mt10 pv12">工作信息</p>
<!-- <van-field
:value="userInfo.degree | idToText('degree')"
readonly
@@ -278,7 +278,16 @@
v-validate="'required'"
@click="toSelect('9')"
/> -->
<SearchField v-model="userInfo.workcompany" label="工作单位" placeholder="无工作单位,请输入无" v-validate="'required'" name="工作单位" />
<select-radio required :radios="Asyncs" label="是否协同工作单位" name="是否协同工作单位" v-validate="'required'" :value.sync="isAsync"></select-radio>
<SearchField
:isAsync="isAsync"
@workcompanys="workcompanys"
v-model="userInfo.workcompany"
label="工作单位"
placeholder="无工作单位,请输入无"
v-validate="'required'"
name="工作单位"
/>
<!-- <van-field
v-model="areaName"
readonly
@@ -341,7 +350,7 @@
v-validate="'required|homeAddressNum|homeAddressCh'"
clearable
maxlength="30"
style="font-size: 3.5vw;"
style="font-size: 3.5vw"
/>
<!-- <div class="border-bt relative fs14 p10 flex align-center">
<van-checkbox v-model="homeDefault" :disabled="companyDefault" class="fr" @change="setAddress">设为联系地址</van-checkbox>
@@ -353,7 +362,7 @@
<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>
<van-popup v-model="popupShow" position="bottom"><van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" /></van-popup>
<!-- 地区选择 -->
<!-- <van-popup v-model="areaShow" position="bottom">
<van-area :area-list="areaList" value="110101" @confirm="sureArea($event, '1')" @cancel="areaShow = false" />
@@ -416,6 +425,17 @@ export default {
specilFlag: '', //特殊显示-为桂企产品专写 1-桂企 undefind-其他
productCodes: [], //产品编码-用于“产品允许投保人单位列表获取”接口,作为请求参数
isScan: false, //是否显示证件扫描组件
isAsync: false, //是否协同工作单位
Asyncs: [
{
label: '是',
value: true
},
{
label: '否',
value: false
}
],
sexRadio: [
{
label: '男',
@@ -436,7 +456,7 @@ export default {
value: '1'
}
],
maxDate: beforeDate.getBeforeYear(16),
maxDate: beforeDate.getBeforeYear(16),
certiexpiredateRequired: true, //证件截止日期是否需要校验
popupShow: false,
// areaShow: false, //省级联动
@@ -474,7 +494,7 @@ export default {
healthGrade: '', //健康等级
mobile: '', //移动电话
stature: '', //身高
avoirdupois: '', //体重
avoirdupois: '', //体重
// degree: '', //文化程度
medical: '1', //有无社保
taxResidentId: '', //税收居民身份
@@ -512,7 +532,8 @@ export default {
occupationShowPicker: false,
timeId: null,
idLimit: false, //证件起止日期是否只读
salePageFlag: '1'
salePageFlag: '1',
userWorkcompanys: [], //单位数据
}
},
created() {
@@ -530,7 +551,7 @@ export default {
//如果是编辑/导航进来
this.isElecCont = '0'
if (this.$route.query.edit) {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
getOrderDetail({ orderNo: localStorage.orderNo }).then((res) => {
if (res.result == 0) {
//投保人信息返显
this.userInfo = res.orderDTO.appntDTO
@@ -561,7 +582,7 @@ export default {
}
//------------------------专为桂企写死--begin---------------//
if (res.orderDTO.insuredDTOs[0] && res.orderDTO.insuredDTOs[0].riskDTOLst) {
this.specilFlag = res.orderDTO.insuredDTOs[0].riskDTOLst.some(v => {
this.specilFlag = res.orderDTO.insuredDTOs[0].riskDTOLst.some((v) => {
return v.riskCode == 'GFRS_M0024' || v.riskCode == 'GFRS_M0040'
})
? '1'
@@ -591,6 +612,11 @@ export default {
window.appCallBack = this.appCallBack
},
methods: {
workcompanys(list) {
// 单位数据
console.log(list)
this.userWorkcompanys = list
},
setCustomerMarriage(marriageCode) {
for (let status of DataDictionary.marriage) {
if (status.id == marriageCode) {
@@ -698,9 +724,9 @@ export default {
break
case '9':
this.productCodes.length = 0
// 已丢弃
// 已丢弃
this.productCodes.push('GFRS_M0024')
getCompany({ productCodes: this.productCodes }).then(res => {
getCompany({ productCodes: this.productCodes }).then((res) => {
if (res.result == 0) {
this.columns = res.content
} else {
@@ -1144,10 +1170,10 @@ export default {
if (Number(this.userInfo.nativeplace) <= 4) {
// “身份证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”
let obj = {
'1': true,
'5': true,
'6': true,
'9': true
1: true,
5: true,
6: true,
9: true
}
let idType = this.userInfo.idType
// 通过年龄 判断证件是否符合要求
@@ -1179,15 +1205,30 @@ export default {
} else {
// 非大陆人员按外籍人员
let obj = {
'4': true,
'8': true
4: true,
8: true
}
let idType = this.userInfo.idType
if (obj[idType] === undefined) {
return this.$toast('亲,国籍为外籍,证件类型必须为护照或外国人永久居留身份证投保')
}
}
if (this.isAsync) {
if (
!this.userWorkcompanys.some((item) => {
return item.label == this.userInfo.workcompany
})
) {
if (
this.userWorkcompanys.some((item) => {
return item.label.search(this.userInfo.workcompany) != -1
})
) {
return this.$toast('请填写完整的协同单位名称')
}
return this.$toast('您选择的为非协同单位,请重新选择。')
}
}
this.infoUpdate()
// console.log('success')
} else {
@@ -1235,7 +1276,7 @@ export default {
orderInfoDTO: {
orderNo: localStorage.orderNo,
isElecCont: this.isElecCont
},
},
appntDTO: {}
}
}
@@ -1420,8 +1461,7 @@ export default {
}
}
}
},
}
}
</script>
<style lang="scss" scoped>