'工作单位合并'

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

View File

@@ -278,7 +278,16 @@
v-validate="'required'" v-validate="'required'"
@click="toSelect('9')" @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 <!-- <van-field
v-model="areaName" v-model="areaName"
readonly readonly
@@ -341,7 +350,7 @@
v-validate="'required|homeAddressNum|homeAddressCh'" v-validate="'required|homeAddressNum|homeAddressCh'"
clearable clearable
maxlength="30" maxlength="30"
style="font-size: 3.5vw;" style="font-size: 3.5vw"
/> />
<!-- <div class="border-bt relative fs14 p10 flex align-center"> <!-- <div class="border-bt relative fs14 p10 flex align-center">
<van-checkbox v-model="homeDefault" :disabled="companyDefault" class="fr" @change="setAddress">设为联系地址</van-checkbox> <van-checkbox v-model="homeDefault" :disabled="companyDefault" class="fr" @change="setAddress">设为联系地址</van-checkbox>
@@ -416,6 +425,17 @@ export default {
specilFlag: '', //特殊显示-为桂企产品专写 1-桂企 undefind-其他 specilFlag: '', //特殊显示-为桂企产品专写 1-桂企 undefind-其他
productCodes: [], //产品编码-用于“产品允许投保人单位列表获取”接口,作为请求参数 productCodes: [], //产品编码-用于“产品允许投保人单位列表获取”接口,作为请求参数
isScan: false, //是否显示证件扫描组件 isScan: false, //是否显示证件扫描组件
isAsync: false, //是否协同工作单位
Asyncs: [
{
label: '是',
value: true
},
{
label: '否',
value: false
}
],
sexRadio: [ sexRadio: [
{ {
label: '男', label: '男',
@@ -512,7 +532,8 @@ export default {
occupationShowPicker: false, occupationShowPicker: false,
timeId: null, timeId: null,
idLimit: false, //证件起止日期是否只读 idLimit: false, //证件起止日期是否只读
salePageFlag: '1' salePageFlag: '1',
userWorkcompanys: [], //单位数据
} }
}, },
created() { created() {
@@ -530,7 +551,7 @@ export default {
//如果是编辑/导航进来 //如果是编辑/导航进来
this.isElecCont = '0' this.isElecCont = '0'
if (this.$route.query.edit) { if (this.$route.query.edit) {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => { getOrderDetail({ orderNo: localStorage.orderNo }).then((res) => {
if (res.result == 0) { if (res.result == 0) {
//投保人信息返显 //投保人信息返显
this.userInfo = res.orderDTO.appntDTO this.userInfo = res.orderDTO.appntDTO
@@ -561,7 +582,7 @@ export default {
} }
//------------------------专为桂企写死--begin---------------// //------------------------专为桂企写死--begin---------------//
if (res.orderDTO.insuredDTOs[0] && res.orderDTO.insuredDTOs[0].riskDTOLst) { 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' return v.riskCode == 'GFRS_M0024' || v.riskCode == 'GFRS_M0040'
}) })
? '1' ? '1'
@@ -591,6 +612,11 @@ export default {
window.appCallBack = this.appCallBack window.appCallBack = this.appCallBack
}, },
methods: { methods: {
workcompanys(list) {
// 单位数据
console.log(list)
this.userWorkcompanys = list
},
setCustomerMarriage(marriageCode) { setCustomerMarriage(marriageCode) {
for (let status of DataDictionary.marriage) { for (let status of DataDictionary.marriage) {
if (status.id == marriageCode) { if (status.id == marriageCode) {
@@ -700,7 +726,7 @@ export default {
this.productCodes.length = 0 this.productCodes.length = 0
// 已丢弃 // 已丢弃
this.productCodes.push('GFRS_M0024') this.productCodes.push('GFRS_M0024')
getCompany({ productCodes: this.productCodes }).then(res => { getCompany({ productCodes: this.productCodes }).then((res) => {
if (res.result == 0) { if (res.result == 0) {
this.columns = res.content this.columns = res.content
} else { } else {
@@ -1144,10 +1170,10 @@ export default {
if (Number(this.userInfo.nativeplace) <= 4) { if (Number(this.userInfo.nativeplace) <= 4) {
// “身份证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证” // “身份证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”
let obj = { let obj = {
'1': true, 1: true,
'5': true, 5: true,
'6': true, 6: true,
'9': true 9: true
} }
let idType = this.userInfo.idType let idType = this.userInfo.idType
// 通过年龄 判断证件是否符合要求 // 通过年龄 判断证件是否符合要求
@@ -1179,15 +1205,30 @@ export default {
} else { } else {
// 非大陆人员按外籍人员 // 非大陆人员按外籍人员
let obj = { let obj = {
'4': true, 4: true,
'8': true 8: true
} }
let idType = this.userInfo.idType let idType = this.userInfo.idType
if (obj[idType] === undefined) { if (obj[idType] === undefined) {
return this.$toast('亲,国籍为外籍,证件类型必须为护照或外国人永久居留身份证投保') 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() this.infoUpdate()
// console.log('success') // console.log('success')
} else { } else {
@@ -1420,8 +1461,7 @@ export default {
} }
} }
} }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>