Compare commits

...

10 Commits

9 changed files with 955 additions and 959 deletions

View File

@@ -52,10 +52,10 @@
<span>保单号</span><span>{{ item.contNo }}</span>
</p>
<p>
<span>保人</span><span>{{ item.insuredName }}</span>
<span>保人</span><span>{{ item.appntName }}</span>
</p>
<p>
<span>被保险人</span><span>{{ item.appntName }}</span>
<span>被保险人</span><span>{{ item.insuredName }}</span>
</p>
<p v-if="active == 3">
<span>转账银行</span><span>{{ item.bankName }}</span>

View File

@@ -42,7 +42,7 @@
@click="selectClick('3', '', '1')">证件扫描
</van-button>
</van-field>
<FieldDatePicter
<!-- <FieldDatePicter
:v-validate='{ required: certiexpiredateRequired }'
required
label='证件截止日期'
@@ -59,7 +59,7 @@
<van-checkbox v-model='userInfo.effectiveDateType' :disabled='effectiveDateTypeAble'
@change='effectiveDataTypeChange'>长期
</van-checkbox>
</div>
</div> -->
<select-radio required :radios='sexRadio' label='性别' name='性别' v-validate="'required'"
:value.sync='userInfo.sex'></select-radio>
<FieldDatePicter
@@ -154,7 +154,7 @@
v-validate="'required'"
@click="toSelect('11')"
/>
<van-field
<!-- <van-field
v-model='userInfo.homeName'
readonly
label='联系地址'
@@ -166,7 +166,7 @@
@click="areaSelect('1')"
/>
<van-field v-model='userInfo.homeAddress' label name='详细地址' placeholder='请输入详细地址' v-validate="'required'"
clearable maxlength='30' />
clearable maxlength='30' /> -->
<!-- </template> -->
</van-cell-group>
<van-goods-action style='z-index: 99'>
@@ -331,7 +331,7 @@ export default {
idType: '1', //证件类型
idNo: '', //证件号码
certiexpiredate: '', //证件到期时间
effectiveDateType: false, //是否长期
effectiveDateType: null, //是否长期
occupationCode: '', //职业代码
occupationName: '', //职业名称
averageAnnualIncome: '', //平均年收入
@@ -339,9 +339,9 @@ export default {
healthGrade: '', //健康等级
nativeplace: '1', //国家地区
marriageStatus: '', //婚姻状况
homeProvince: '450000', //家庭省
homeCity: '450100', //家庭市
homeArea: '450101', //家庭区
homeProvince: '', //家庭省
homeCity: '', //家庭市
homeArea: '', //家庭区
homeName: '', //联系地址
homeAddress: '', //详细地址
mobile: '', //移动电话
@@ -380,7 +380,7 @@ export default {
}
},
created() {
this.userInfo.homeName = getAreaName([{ code: 450000 }, { code: 450100 }, { code: 450101 }]) //家庭地址
// this.userInfo.homeName = getAreaName([{ code: 450000 }, { code: 450100 }, { code: 450101 }]) //家庭地址
},
async mounted() {
let that = this
@@ -404,17 +404,17 @@ export default {
cardOrderDetail(cardInfoDTO).then(res => {
if (res.result == '0') {
Object.assign(that.userInfo,res.orderDTO.appntDTO)
that.userInfo.effectiveDateType = that.userInfo.effectiveDateType == 'true'?true:false
that.userInfo.certiexpiredate = that.userInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate
that.userInfo.homeName = getAreaName([
{ code: that.userInfo.homeProvince },
{ code: that.userInfo.homeCity },
{ code: that.userInfo.homeArea }
])
if (this.userInfo.birthday) {
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.effectiveDateTypeAble = !(age >= 45)
}
// that.userInfo.effectiveDateType = that.userInfo.effectiveDateType == 'true'?true:false
// that.userInfo.certiexpiredate = that.userInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate
// that.userInfo.homeName = getAreaName([
// { code: that.userInfo.homeProvince },
// { code: that.userInfo.homeCity },
// { code: that.userInfo.homeArea }
// ])
// if (this.userInfo.birthday) {
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// this.effectiveDateTypeAble = !(age >= 45)
// }
}
})
}
@@ -517,7 +517,7 @@ export default {
areaSelect(insureType) {
;[this.homeShow, this.insureType] = [true, insureType]
if (insureType === '1') {
this.areaCode = this.userInfo.homeArea
// this.areaCode = this.userInfo.homeArea
}
},
//监听名字变化
@@ -581,14 +581,14 @@ export default {
} else if (this.pickerType == '2') {
//身份证以外的证件类型可以使用长期
//value.id 1 居民身份证 todo
if (value.id != '1') {
this.effectiveDateTypeAble = false
} else {
if (this.userInfo.birthday) {
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.effectiveDateTypeAble = !(age >= 45)
}
}
// if (value.id != '1') {
// this.effectiveDateTypeAble = false
// } else {
// if (this.userInfo.birthday) {
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// this.effectiveDateTypeAble = !(age >= 45)
// }
// }
this.userInfo.idType = value.id
} else if (this.pickerType == '3') {
this.userInfo.degree = value.id
@@ -632,50 +632,50 @@ export default {
// }
}
break
case '1': {
console.log('证件截止日期')
//证件截止日期
//如果已经勾选了长期
if (this.userInfo.effectiveDateType) {
//清空数据并返回
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return
}
this.userInfo.effectiveDateType = false
//如果录入日期早于当前日期
if (Date.parse(val) < Date.parse(new Date())) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('您的证件已过期')
}
//不同证件类型的判断
// if (this.userInfo.idType) {
// //获取年龄
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// console.log(age)
// //年龄在16-25周岁之间
// if (age >= 16 && age <= 25) {
// if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('16周岁~25周岁的证件有效期为10年')
// }
// //年龄在26-45周岁之间
// } else if (age >= 26 && age <= 45) {
// if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('26周岁~45周岁的证件有效期为20年')
// }
// //此外的年龄段不支持
// } else {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('身份证不支持此年龄段')
// }
// }
}
// case '1': {
// console.log('证件截止日期')
// //证件截止日期
// //如果已经勾选了长期
// if (this.userInfo.effectiveDateType) {
// //清空数据并返回
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return
// }
// this.userInfo.effectiveDateType = false
// //如果录入日期早于当前日期
// if (Date.parse(val) < Date.parse(new Date())) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('您的证件已过期')
// }
// //不同证件类型的判断
// // if (this.userInfo.idType) {
// // //获取年龄
// // let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// // console.log(age)
// // //年龄在16-25周岁之间
// // if (age >= 16 && age <= 25) {
// // if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
// // this.userInfo.certiexpiredate = ''
// // this.$refs.certiexpiredate.date = ''
// // return this.$toast('16周岁~25周岁的证件有效期为10年')
// // }
// // //年龄在26-45周岁之间
// // } else if (age >= 26 && age <= 45) {
// // if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
// // this.userInfo.certiexpiredate = ''
// // this.$refs.certiexpiredate.date = ''
// // return this.$toast('26周岁~45周岁的证件有效期为20年')
// // }
// // //此外的年龄段不支持
// // } else {
// // this.userInfo.certiexpiredate = ''
// // this.$refs.certiexpiredate.date = ''
// // return this.$toast('身份证不支持此年龄段')
// // }
// // }
// }
break
case '2': {
//出生日期
@@ -720,22 +720,22 @@ export default {
this.userInfo.birthday = data.birthday //出生日期
this.userInfo.idType = data.customerIdType //证件类型
this.userInfo.idNo = data.customerIdNumber //证件类别
if (data.idEffectEndDate == '9999-12-31') {
this.userInfo.effectiveDateType = true //是否长期
} else {
this.userInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
this.userInfo.effectiveDateType = false //是否长期
}
// if (data.idEffectEndDate == '9999-12-31') {
// this.userInfo.effectiveDateType = true //是否长期
// } else {
// this.userInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
// this.userInfo.effectiveDateType = false //是否长期
// }
this.userInfo.email = data.email //电子邮箱
this.userInfo.mobile = data.customerPhone //移动电话
this.userInfo.homeProvince = data.homeProvince //家庭省
this.userInfo.homeCity = data.homeCity //家庭市
this.userInfo.homeArea = data.homeArea //家庭区
if (data.homeProvince && data.homeCity && data.homeArea) {
this.userInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
}
this.userInfo.homeAddress = data.homeAddress //家庭详细地址
// this.userInfo.homeProvince = data.homeProvince //家庭省
// this.userInfo.homeCity = data.homeCity //家庭市
// this.userInfo.homeArea = data.homeArea //家庭区
// if (data.homeProvince && data.homeCity && data.homeArea) {
// this.userInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
// }
// this.userInfo.homeAddress = data.homeAddress //家庭详细地址
// this.userInfo.occupationCode = data.occupationCode
// this.userInfo.occupationName = data.occupationName
// this.userInfo.occupationType = data.lifeGrade
@@ -821,36 +821,36 @@ export default {
console.log('证件号码校验有误')
return this.$toast('您填写的证件号码有误')
}
if (age < 46 && this.userInfo.effectiveDateType == true) {
return this.$toast('证件有效期错误年龄小于46周岁的公民身份证有效期不能为长期')
}
// if (age < 46 && this.userInfo.effectiveDateType == true) {
// return this.$toast('证件有效期错误年龄小于46周岁的公民身份证有效期不能为长期')
// }
// 年龄在 16-25 周岁之间
if (age <= 15) {
if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1975-01-01')) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
return this.$toast('证件有效期错误未满16周岁的公民身份证有效期应小于等于5年')
}
//年龄在 16-25 周岁之间
} else if (age >= 16 && age <= 25) {
console.log('年龄在16-25周岁之间')
if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1980-01-01')) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常16周岁至25周岁公民身份证有效期应小于等于10年')
}
//年龄在 26-45 周岁之间
} else if (age >= 26 && age <= 45) {
console.log('年龄在26-45周岁之间')
if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1990-01-01')) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常26周岁至45周岁公民身份证有效期应小于等于20年')
}
}
// if (age <= 15) {
// if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1975-01-01')) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// // this.effectiveDateTypeAble = true
// return this.$toast('证件有效期错误未满16周岁的公民身份证有效期应小于等于5年')
// }
// //年龄在 16-25 周岁之间
// } else if (age >= 16 && age <= 25) {
// console.log('年龄在16-25周岁之间')
// if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1980-01-01')) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
// return this.$toast('证件有效期不正常16周岁至25周岁公民身份证有效期应小于等于10年')
// }
// //年龄在 26-45 周岁之间
// } else if (age >= 26 && age <= 45) {
// console.log('年龄在26-45周岁之间')
// if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1990-01-01')) {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
// return this.$toast('证件有效期不正常26周岁至45周岁公民身份证有效期应小于等于20年')
// }
// }
}
if (this.manageComCode == '45' && (this.userInfo.isNewPeopleFlag == '' || this.userInfo.isNewPeopleFlag == null || this.userInfo.isNewPeopleFlag == undefined)) {
return this.$toast('投保人新市民身份不能为空')
@@ -910,13 +910,13 @@ export default {
;[this.userInfo.companyProvince, this.userInfo.companyCity, this.userInfo.companyArea] = [area[0].code, area[1].code, area[2].code]
this.areaShow = false
break
case '2': //家庭地址
if (this.insureType === '1') {
this.userInfo.homeName = getAreaName(area)
;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
this.homeShow = false
}
break
// case '2': //家庭地址
// if (this.insureType === '1') {
// this.userInfo.homeName = getAreaName(area)
// ;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
// this.homeShow = false
// }
// break
case '3': //户籍
this.census = getAreaName(area)
;[this.userInfo.householdProvince, this.userInfo.householdCity] = [area[0].code, area[1].code]

View File

@@ -6,8 +6,8 @@
<van-field :value="appntInfo.idType | idToText('insuredIdType')" label='证件类型' name='证件类型' readonly />
<van-field :value='appntInfo.idNo' label='证件号码' name='证件号码' readonly />
<van-field :value='appntInfo.mobile' label='手机号码' name='手机号码' readonly />
<van-field :value='appntInfo.homeName' label='联系地址' name='联系地址' readonly />
<van-field :value='appntInfo.homeAddress' label='' name='详细地址' readonly />
<van-field :value='appntInfo.homeName' label='联系地址' name='联系地址' readonly v-if="appntInfo.homeName"/>
<van-field :value='appntInfo.homeAddress' label='' name='详细地址' readonly v-if="appntInfo.homeAddress"/>
</van-cell-group>
<van-cell-group class='mt10'>
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>产品信息</p>
@@ -32,8 +32,8 @@
<van-field :value='item.idNo' label='证件号码' name='证件号码' readonly />
<!-- <van-field v-if='item.isLessEighteen' :value='item.mobile' label='手机号码' name='手机号码' readonly /> -->
<!-- <van-field v-if='item.isLessEighteen' :value='item.email' label='电子邮箱' name='电子邮箱' readonly /> -->
<van-field :value='item.homeName' label='联系地址' name='联系地址' readonly />
<van-field :value='item.homeAddress' label='' name='详细地址' readonly />
<van-field :value='item.homeName' label='联系地址' name='联系地址' readonly v-if="item.homeName" />
<van-field :value='item.homeAddress' label='' name='详细地址' readonly v-if="item.homeAddress"/>
<van-field :value='bnfTypeVal' label='受益人类型' name='受益人类型' readonly />
</van-collapse-item>
</van-collapse>

View File

@@ -42,7 +42,7 @@
@click="selectClick('3', '', '2')">证件扫描
</van-button>
</van-field>
<FieldDatePicter
<!-- <FieldDatePicter
v-if="isInsuredCertiexpiredate"
:v-validate='{ required: certiexpiredateRequiredInsured }'
required
@@ -62,7 +62,7 @@
>长期
</van-checkbox
>
</div>
</div> -->
<select-radio required :radios='sexRadio' label='性别' name='性别' :disabled="isAppnt" v-validate="'required'"
:value.sync='insuredInfo.sex'></select-radio>
<FieldDatePicter
@@ -170,7 +170,7 @@
v-validate="'required'"
@click="toSelect('npType')"
/>
<van-field
<!-- <van-field
v-model='insuredInfo.homeName'
readonly
label='联系地址'
@@ -181,11 +181,11 @@
@click="areaSelect('2')"
/>
<van-field v-model='insuredInfo.homeAddress' :readonly="isAppnt" label name='详细地址'
placeholder='请输入详细地址' clearable maxlength='30' />
placeholder='请输入详细地址' clearable maxlength='30' /> -->
<div class='pl10 pt10 pb10 pr10 address fs14 redRadioCheckbox'>
<!-- <div class='pl10 pt10 pb10 pr10 address fs14 redRadioCheckbox'>
<van-checkbox v-model='withRootUser.value' :disabled="isAppnt">同投保人</van-checkbox>
</div>
</div> -->
</van-cell-group>
<!-- 受益人信息 -->
<van-cell-group class='mt10'>
@@ -406,7 +406,7 @@ export default {
idType: '1', //证件类型
idNo: '', //证件号码
certiexpiredate: '', //证件到期时间
effectiveDateType: false, //是否长期
effectiveDateType: null, //是否长期
occupationCode: '', //职业代码
occupationName: '', //职业名称
averageAnnualIncome: '', //平均年收入
@@ -414,9 +414,9 @@ export default {
healthGrade: '', //健康等级
nativeplace: '1', //国家地区
marriageStatus: '', //婚姻状况
homeProvince: '450000', //家庭省
homeCity: '450100', //家庭市
homeArea: '450101', //家庭区
homeProvince: '', //家庭省
homeCity: '', //家庭市
homeArea: '', //家庭区
homeName: '', //联系地址
homeAddress: '', //详细地址
mobile: '', //移动电话
@@ -445,9 +445,9 @@ export default {
nativeplace: '1', //国家地区
marriageStatus: '', //婚姻状况
marriage: '',
homeProvince: '450000', //家庭省
homeCity: '450100', //家庭市
homeArea: '450101', //家庭区
homeProvince: '', //家庭省
homeCity: '', //家庭市
homeArea: '', //家庭区
homeName: '', //联系地址
homeAddress: '', //详细地址
mobile: '', //移动电话
@@ -479,7 +479,7 @@ export default {
// showFirstOr: false,
withRootUser: {
load: false, //防止重复请求
value: false
value: null
},
occupationalType: DataDictionary.queryOccupationalByType[0].id,
isInsuredCertiexpiredate:true, //被保人有效止期是否显示
@@ -545,27 +545,27 @@ export default {
if (res.result == '0') {
Object.assign(this.userInfo,res.orderDTO.appntDTO)
//被保险人联系地址默认投保人地址,支持修改。
this.insuredInfo.homeName = getAreaName([
{ code: this.userInfo.homeProvince },
{ code: this.userInfo.homeCity },
{ code: this.userInfo.homeArea }
])
this.insuredInfo.homeProvince = this.userInfo.homeProvince
this.insuredInfo.homeCity = this.userInfo.homeCity
this.insuredInfo.homeArea = this.userInfo.homeArea
this.insuredInfo.homeAddress = this.userInfo.homeAddress
// this.insuredInfo.homeName = getAreaName([
// { code: this.userInfo.homeProvince },
// { code: this.userInfo.homeCity },
// { code: this.userInfo.homeArea }
// ])
// this.insuredInfo.homeProvince = this.userInfo.homeProvince
// this.insuredInfo.homeCity = this.userInfo.homeCity
// this.insuredInfo.homeArea = this.userInfo.homeArea
// this.insuredInfo.homeAddress = this.userInfo.homeAddress
if(that.$route.query.insuredId){ //编辑
res.orderDTO.insuredDTOs.forEach(item => {
if(that.$route.query.insuredId == item.insuredId){
Object.assign(that.insuredInfo,item)
that.insuredInfo.effectiveDateType = that.insuredInfo.effectiveDateType == 'true'?true:false
that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.insuredInfo.certiexpiredate
that.insuredInfo.homeName = getAreaName([
{ code: that.insuredInfo.homeProvince },
{ code: that.insuredInfo.homeCity },
{ code: that.insuredInfo.homeArea }
])
that.proScheme = that.insuredInfo.riskDTOLst[0].proScheme
// that.insuredInfo.effectiveDateType = that.insuredInfo.effectiveDateType == 'true'?true:false
// that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.insuredInfo.certiexpiredate
// that.insuredInfo.homeName = getAreaName([
// { code: that.insuredInfo.homeProvince },
// { code: that.insuredInfo.homeCity },
// { code: that.insuredInfo.homeArea }
// ])
// that.proScheme = that.insuredInfo.riskDTOLst[0].proScheme
that.proSchemeCode = that.insuredInfo.riskDTOLst[0].proSchemeCode
that.allPrice = that.insuredInfo.riskDTOLst[0].prem
that.insuanceId = that.insuredInfo.riskDTOLst[0].insuanceId
@@ -574,6 +574,7 @@ export default {
let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
this.effectiveDateTypeAbleInsured = !(age >= 45)
}
console.log(123133,this.insureInfo, 'that.insuredInfo')
//编辑时走试算接口
this.insureTrial(1)
}
@@ -581,13 +582,13 @@ export default {
} else {
if(that.$route.query.relationToAppnt == '1'){ //新增关系为本人
Object.assign(this.insuredInfo,res.orderDTO.appntDTO)
that.insuredInfo.effectiveDateType = that.insuredInfo.effectiveDateType == 'true'?true:false
that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate
this.insuredInfo.homeName = getAreaName([
{ code: this.insuredInfo.homeProvince },
{ code: this.insuredInfo.homeCity },
{ code: this.insuredInfo.homeArea }
])
// that.insuredInfo.effectiveDateType = that.insuredInfo.effectiveDateType == 'true'?true:false
// that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate
// this.insuredInfo.homeName = getAreaName([
// { code: this.insuredInfo.homeProvince },
// { code: this.insuredInfo.homeCity },
// { code: this.insuredInfo.homeArea }
// ])
that.insuredInfo.medical = '0'
if (this.insuredInfo.birthday) {
let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
@@ -680,7 +681,7 @@ export default {
}
;[this.homeShow, this.insureType] = [true, insureType]
if (insureType === '2') {
this.areaCode = this.insuredInfo.homeArea
// this.areaCode = this.insuredInfo.homeArea
}
},
//监听名字变化
@@ -827,44 +828,44 @@ export default {
//选择保障方案时走试算接口
await this.insureTrial(0)
} else if (this.pickerType == '22') {
this.idLimitInsured = false
//选择证件类型后,清空证件号,证件截止日期,出生日期
this.insuredInfo.idNo = this.insuredInfo.certiexpiredate = this.insuredInfo.birthday = ''
// this.idLimitInsured = false
// //选择证件类型后,清空证件号,证件截止日期,出生日期
// this.insuredInfo.idNo = this.insuredInfo.certiexpiredate = this.insuredInfo.birthday = ''
//身份证以外的证件类型可以使用长期
//value.id 1 居民身份证 todo
if (value.id != '1') {
//2516--三个学平险--被保险人身份信息选择仅保留“身份证、户口本”,目前选择户口本仍要填写身份证到期
//时间,如果选择户口本项,默认为长期。
if (this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0049' || this.itemProductDTOS.productCode == 'GFRS_M0050') {
this.insuredInfo.effectiveDateType = true
}
this.effectiveDateTypeAbleInsured = false
} else {
//身份证
if (this.insuredInfo.birthday) {
let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
this.effectiveDateTypeAbleInsured = !(age >= 45)
//身份证年龄小于等于45不可选长期
this.insuredInfo.effectiveDateType = false
}
}
// if (value.id != '1') {
// //2516--三个学平险--被保险人身份信息选择仅保留“身份证、户口本”,目前选择户口本仍要填写身份证到期
// //时间,如果选择户口本项,默认为长期。
// if (this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0049' || this.itemProductDTOS.productCode == 'GFRS_M0050') {
// this.insuredInfo.effectiveDateType = true
// }
// this.effectiveDateTypeAbleInsured = false
// } else {
// //身份证
// if (this.insuredInfo.birthday) {
// let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
// this.effectiveDateTypeAbleInsured = !(age >= 45)
// //身份证年龄小于等于45不可选长期
// this.insuredInfo.effectiveDateType = false
// }
// }
// 去掉--选择户口本时是否长期默认为是不可点击有效止期隐藏证件类型为户口本时被保人年龄小于16周岁时户口本有效止期长期变更为第16周岁日期
if(value.id==2){
this.idLimitInsured = true
//证件类型户口本时,证件截止日期和是否长期不可选择
this.effectiveDateTypeAbleInsured = true //长期按钮是否禁用--被保人
this.insuredInfo.effectiveDateType = false //是否长期
// this.insuredInfo.effectiveDateType = true
// this.insuredInfo.certiexpiredate = '9999-12-31'
// this.effectiveDateTypeAbleInsured = true
// this.isInsuredCertiexpiredate = false
// this.isInsuredCertiexpiredate = true
}else{
this.insuredInfo.certiexpiredate = ''
this.insuredInfo.effectiveDateType = false
this.effectiveDateTypeAbleInsured = false
// this.isInsuredCertiexpiredate = true
}
// if(value.id==2){
// this.idLimitInsured = true
// //证件类型户口本时,证件截止日期和是否长期不可选择
// this.effectiveDateTypeAbleInsured = true //长期按钮是否禁用--被保人
// this.insuredInfo.effectiveDateType = false //是否长期
// // this.insuredInfo.effectiveDateType = true
// // this.insuredInfo.certiexpiredate = '9999-12-31'
// // this.effectiveDateTypeAbleInsured = true
// // this.isInsuredCertiexpiredate = false
// // this.isInsuredCertiexpiredate = true
// }else{
// this.insuredInfo.certiexpiredate = ''
// this.insuredInfo.effectiveDateType = false
// this.effectiveDateTypeAbleInsured = false
// // this.isInsuredCertiexpiredate = true
// }
this.insuredInfo.idType = value.id
} else if(this.pickerType == 'npType') {
this.userInfo.npType = value.id
@@ -1026,25 +1027,25 @@ export default {
this.productDate = currentData + '0时至' + productDateTime + '24时止'
}
break
case '7': {
console.log('证件截止日期')
//被保人--证件截止日期
//如果已经勾选了长期
if (this.insuredInfo.effectiveDateType) {
//清空数据并返回
this.insuredInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return
}
this.insuredInfo.effectiveDateType = false
//如果录入日期早于当前日期
if (Date.parse(val) < Date.parse(new Date())) {
this.insuredInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('您的证件已过期')
}
}
break
// case '7': {
// console.log('证件截止日期')
// //被保人--证件截止日期
// //如果已经勾选了长期
// if (this.insuredInfo.effectiveDateType) {
// //清空数据并返回
// this.insuredInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return
// }
// this.insuredInfo.effectiveDateType = false
// //如果录入日期早于当前日期
// if (Date.parse(val) < Date.parse(new Date())) {
// this.insuredInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('您的证件已过期')
// }
// }
// break
}
},
//选择客户
@@ -1071,45 +1072,45 @@ export default {
this.insuredInfo.birthday = data.birthday //出生日期
this.insuredInfo.idType = data.customerIdType //证件类型
this.insuredInfo.idNo = data.customerIdNumber //证件类别
if(this.insuredInfo.idType == '2' && idToData(this.insuredInfo.idNo).age <16){
// 获取出生日期年份16证件类型为户口本时被保人年龄小于16周岁时卡单户口本有效止期长期变更为第16周岁日期
let year = Number(this.insuredInfo.birthday.substr(0,4)) + 16
if(this.insuredInfo.birthday.substr(5,5) == '02-29'){
// 获取某年某月一共多少天
let date = new Date(year, 2, 1)
let dayEnd = new Date(date.getTime() - 864e5).getDate()
this.insuredInfo.certiexpiredate = year +'-02-'+ dayEnd
}else{
this.insuredInfo.certiexpiredate = year +'-'+ this.insuredInfo.birthday.substr(5,5)
}
}
// if(this.insuredInfo.idType == '2' && idToData(this.insuredInfo.idNo).age <16){
// // 获取出生日期年份16证件类型为户口本时被保人年龄小于16周岁时卡单户口本有效止期长期变更为第16周岁日期
// let year = Number(this.insuredInfo.birthday.substr(0,4)) + 16
// if(this.insuredInfo.birthday.substr(5,5) == '02-29'){
// // 获取某年某月一共多少天
// let date = new Date(year, 2, 1)
// let dayEnd = new Date(date.getTime() - 864e5).getDate()
// this.insuredInfo.certiexpiredate = year +'-02-'+ dayEnd
// }else{
// this.insuredInfo.certiexpiredate = year +'-'+ this.insuredInfo.birthday.substr(5,5)
// }
// }
//户口本
if (data.customerIdType == 2) {
this.insuredInfo.effectiveDateType = true
this.insuredInfo.certiexpiredate = '9999-12-31'
this.effectiveDateTypeAbleInsured = true
// this.isInsuredCertiexpiredate = false
}else{
// this.isInsuredCertiexpiredate = true
if (data.idEffectEndDate == '9999-12-31') {
this.insuredInfo.certiexpiredate = ''
this.insuredInfo.effectiveDateType = true //是否长期
this.effectiveDateTypeAbleInsured = true
} else {
this.insuredInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
this.insuredInfo.effectiveDateType = false
this.effectiveDateTypeAbleInsured = false
}
}
// if (data.customerIdType == 2) {
// this.insuredInfo.effectiveDateType = true
// this.insuredInfo.certiexpiredate = '9999-12-31'
// this.effectiveDateTypeAbleInsured = true
// // this.isInsuredCertiexpiredate = false
// }else{
// // this.isInsuredCertiexpiredate = true
// if (data.idEffectEndDate == '9999-12-31') {
// this.insuredInfo.certiexpiredate = ''
// this.insuredInfo.effectiveDateType = true //是否长期
// this.effectiveDateTypeAbleInsured = true
// } else {
// this.insuredInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
// this.insuredInfo.effectiveDateType = false
// this.effectiveDateTypeAbleInsured = false
// }
// }
this.insuredInfo.email = data.email //电子邮箱
this.insuredInfo.mobile = data.customerPhone //移动电话
this.insuredInfo.homeProvince = data.homeProvince?data.homeProvince:this.userInfo.homeProvince//家庭省
this.insuredInfo.homeCity = data.homeCity?data.homeCity:this.userInfo.homeCity //家庭市
this.insuredInfo.homeArea = data.homeArea?data.homeArea:this.userInfo.homeArea //家庭区
if (data.homeProvince && data.homeCity && data.homeArea) {
this.insuredInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
}
this.insuredInfo.homeAddress = data.homeAddress //家庭详细地址
// this.insuredInfo.homeProvince = data.homeProvince?data.homeProvince:this.userInfo.homeProvince//家庭省
// this.insuredInfo.homeCity = data.homeCity?data.homeCity:this.userInfo.homeCity //家庭市
// this.insuredInfo.homeArea = data.homeArea?data.homeArea:this.userInfo.homeArea //家庭区
// if (data.homeProvince && data.homeCity && data.homeArea) {
// this.insuredInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
// }
// this.insuredInfo.homeAddress = data.homeAddress //家庭详细地址
this.insuredInfo.medical = data.socialSecurity //有无社保
// this.insuredInfo.occupationCode = data.occupationCode
// this.insuredInfo.occupationName = data.occupationName
@@ -1180,12 +1181,12 @@ export default {
if (!this.insuredInfo.marriage) {
return this.$toast('被保人婚姻状况不能为空')
}
if (!this.insuredInfo.homeName) {
return this.$toast('被保人联系地址不能为空')
}
if (!this.insuredInfo.homeAddress) {
return this.$toast('被保人详细地址不能为空')
}
// if (!this.insuredInfo.homeName) {
// return this.$toast('被保人联系地址不能为空')
// }
// if (!this.insuredInfo.homeAddress) {
// return this.$toast('被保人详细地址不能为空')
// }
if (this.insuredInfo.relationToAppnt == 2 && this.userInfo.sex == this.insuredInfo.sex) {
return this.$toast('~配偶性别不能相同的哟~')
}
@@ -1237,36 +1238,36 @@ export default {
console.log('证件号码校验有误')
return this.$toast('您填写的证件号码有误')
}
if (insuredAge < 46 && this.insuredInfo.effectiveDateType == true) {
return this.$toast('证件有效期错误年龄小于46周岁的公民身份证有效期不能为长期')
}
// if (insuredAge < 46 && this.insuredInfo.effectiveDateType == true) {
// return this.$toast('证件有效期错误年龄小于46周岁的公民身份证有效期不能为长期')
// }
// 年龄在 16-25 周岁之间
if (insuredAge <= 15) {
if (Date.parse(this.insuredInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1975-01-01')) {
this.insuredInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
return this.$toast('证件有效期错误未满16周岁的公民身份证有效期应小于等于5年')
}
//年龄在 16-25 周岁之间
} else if (insuredAge >= 16 && insuredAge <= 25) {
console.log('年龄在16-25周岁之间')
if (Date.parse(this.insuredInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1980-01-01')) {
this.insuredInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
this.certiexpiredateRequiredInsured = true
return this.$toast('证件有效期不正常16周岁至25周岁公民身份证有效期应小于等于10年')
}
//年龄在 26-45 周岁之间
} else if (insuredAge >= 26 && insuredAge <= 45) {
if (Date.parse(this.insuredInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1990-01-01')) {
this.insuredInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
this.certiexpiredateRequiredInsured = true
return this.$toast('证件有效期不正常26周岁至45周岁公民身份证有效期应小于等于20年')
}
}
// if (insuredAge <= 15) {
// if (Date.parse(this.insuredInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1975-01-01')) {
// this.insuredInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// // this.effectiveDateTypeAble = true
// return this.$toast('证件有效期错误未满16周岁的公民身份证有效期应小于等于5年')
// }
// //年龄在 16-25 周岁之间
// } else if (insuredAge >= 16 && insuredAge <= 25) {
// console.log('年龄在16-25周岁之间')
// if (Date.parse(this.insuredInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1980-01-01')) {
// this.insuredInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// this.certiexpiredateRequiredInsured = true
// return this.$toast('证件有效期不正常16周岁至25周岁公民身份证有效期应小于等于10年')
// }
// //年龄在 26-45 周岁之间
// } else if (insuredAge >= 26 && insuredAge <= 45) {
// if (Date.parse(this.insuredInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1990-01-01')) {
// this.insuredInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// this.certiexpiredateRequiredInsured = true
// return this.$toast('证件有效期不正常26周岁至45周岁公民身份证有效期应小于等于20年')
// }
// }
}else if(this.insuredInfo.idType == '2'){
if (idToData(this.insuredInfo.idNo).age >= 16) {
return this.$toast('客户年龄在16周岁以上不能使用户口本作为有效证件')
@@ -1356,10 +1357,10 @@ export default {
if (this.insuredInfo.medical == '1') {
return this.$toast('被保险人需有社保才可投保此险种')
}
// 是否长期选项 赋值
if (this.insuredInfo.effectiveDateType) {
this.insuredInfo.certiexpiredate = '9999-12-31'
}
// // 是否长期选项 赋值
// if (this.insuredInfo.effectiveDateType) {
// this.insuredInfo.certiexpiredate = '9999-12-31'
// }
if (this.manageComCode == '45' && (this.insuredInfo.isNewPeopleFlag == '' || this.insuredInfo.isNewPeopleFlag == null || this.insuredInfo.isNewPeopleFlag == undefined)) {
return this.$toast('投保人新市民身份不能为空')
}
@@ -1601,17 +1602,17 @@ export default {
this.idLimitInsured = false
}
// 获取出生日期年份16证件类型为户口本时被保人年龄小于16周岁时卡单户口本有效止期长期变更为第16周岁日期
if(this.insuredInfo.idType == '2' && idToData(this.insuredInfo.idNo).age <16){
let year = Number(this.insuredInfo.birthday.substr(0,4)) + 16
if(this.insuredInfo.birthday.substr(5,5) == '02-29'){
// 获取某年某月一共多少天
let date = new Date(year, 2, 1)
let dayEnd = new Date(date.getTime() - 864e5).getDate()
this.insuredInfo.certiexpiredate = year+'-02-'+ dayEnd
}else{
this.insuredInfo.certiexpiredate = year+'-'+ this.insuredInfo.birthday.substr(5,5)
}
}
// if(this.insuredInfo.idType == '2' && idToData(this.insuredInfo.idNo).age <16){
// let year = Number(this.insuredInfo.birthday.substr(0,4)) + 16
// if(this.insuredInfo.birthday.substr(5,5) == '02-29'){
// // 获取某年某月一共多少天
// let date = new Date(year, 2, 1)
// let dayEnd = new Date(date.getTime() - 864e5).getDate()
// this.insuredInfo.certiexpiredate = year+'-02-'+ dayEnd
// }else{
// this.insuredInfo.certiexpiredate = year+'-'+ this.insuredInfo.birthday.substr(5,5)
// }
// }
this.insuredInfo.sex = idToData(val).sex
if (this.insuredInfo.birthday) {
let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
@@ -1768,47 +1769,47 @@ export default {
// immediate: true,
// deep: true
// },
'userInfo.homeName': {
handler(newV) {
if (this.withRootUser.value) {
this.insuredInfo.homeName = getAreaName([
{ code: this.userInfo.homeProvince },
{ code: this.userInfo.homeCity },
{ code: this.userInfo.homeArea }
])
this.insuredInfo.homeProvince = this.userInfo.homeProvince
this.insuredInfo.homeCity = this.userInfo.homeCity
this.insuredInfo.homeArea = this.userInfo.homeArea
this.insuredInfo.homeAddress = this.userInfo.homeAddress
}
},
immediate: true,
deep: true
},
'userInfo.homeAddress': {
handler(newV) {
if (this.withRootUser.value) {
this.insuredInfo.homeAddress = this.userInfo.homeAddress
}
},
immediate: true,
deep: true
},
async 'withRootUser.value'(n) {
if (n) {
this.insuredInfo.homeName = getAreaName([
{ code: this.userInfo.homeProvince },
{ code: this.userInfo.homeCity },
{ code: this.userInfo.homeArea }
])
this.insuredInfo.homeProvince = this.userInfo.homeProvince
this.insuredInfo.homeCity = this.userInfo.homeCity
this.insuredInfo.homeArea = this.userInfo.homeArea
this.insuredInfo.homeAddress = this.userInfo.homeAddress
} else {
this.insuredInfo.homeName = this.insuredInfo.homeAddress = ''
}
}
// 'userInfo.homeName': {
// handler(newV) {
// if (this.withRootUser.value) {
// this.insuredInfo.homeName = getAreaName([
// { code: this.userInfo.homeProvince },
// { code: this.userInfo.homeCity },
// { code: this.userInfo.homeArea }
// ])
// this.insuredInfo.homeProvince = this.userInfo.homeProvince
// this.insuredInfo.homeCity = this.userInfo.homeCity
// this.insuredInfo.homeArea = this.userInfo.homeArea
// this.insuredInfo.homeAddress = this.userInfo.homeAddress
// }
// },
// immediate: true,
// deep: true
// },
// 'userInfo.homeAddress': {
// handler(newV) {
// if (this.withRootUser.value) {
// this.insuredInfo.homeAddress = this.userInfo.homeAddress
// }
// },
// immediate: true,
// deep: true
// },
// async 'withRootUser.value'(n) {
// if (n) {
// this.insuredInfo.homeName = getAreaName([
// { code: this.userInfo.homeProvince },
// { code: this.userInfo.homeCity },
// { code: this.userInfo.homeArea }
// ])
// this.insuredInfo.homeProvince = this.userInfo.homeProvince
// this.insuredInfo.homeCity = this.userInfo.homeCity
// this.insuredInfo.homeArea = this.userInfo.homeArea
// this.insuredInfo.homeAddress = this.userInfo.homeAddress
// } else {
// this.insuredInfo.homeName = this.insuredInfo.homeAddress = ''
// }
// }
}
}
</script>

View File

@@ -7,8 +7,8 @@
<van-field :value='appntInfo.idNo' label='证件号码' name='证件号码' readonly />
<van-field :value='appntInfo.mobile' label='手机号码' name='手机号码' readonly />
<van-field :value='appntInfo.email' label='电子邮箱' name='电子邮箱' readonly />
<van-field :value='appntInfo.homeName' label='联系地址' name='联系地址' readonly />
<van-field :value='appntInfo.homeAddress' label='详细地址' name='详细地址' readonly />
<van-field :value='appntInfo.homeName' label='联系地址' name='联系地址' readonly v-if="appntInfo.homeName"/>
<van-field :value='appntInfo.homeAddress' label='详细地址' name='详细地址' readonly v-if="appntInfo.homeAddress"/>
</van-cell-group>
<van-cell-group class='mt10'>
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>被保人信息</p>
@@ -17,8 +17,8 @@
<van-field :value='insuredInfo.idNo' label='证件号码' name='证件号码' readonly />
<van-field v-if='isLessEighteen' :value='insuredInfo.mobile' label='手机号码' name='手机号码' readonly />
<van-field v-if='isLessEighteen' :value='insuredInfo.email' label='电子邮箱' name='电子邮箱' readonly />
<van-field :value='insuredInfo.homeName' label='联系地址' name='联系地址' readonly />
<van-field :value='insuredInfo.homeAddress' label='详细地址' name='详细地址' readonly />
<van-field :value='insuredInfo.homeName' label='联系地址' name='联系地址' readonly v-if="insuredInfo.homeName" />
<van-field :value='insuredInfo.homeAddress' label='详细地址' name='详细地址' readonly v-if="insuredInfo.homeAddress"/>
</van-cell-group>
<van-cell-group class='mt10'>
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>受益人信息</p>

File diff suppressed because it is too large Load Diff

View File

@@ -64,6 +64,7 @@
:flag="true"
></FieldDatePicter>
<FieldDatePicter
v-if="!userInfo.effectiveDateType"
:v-validate="{ required: certiexpiredateRequired }"
required
label="证件截止日期"
@@ -1085,7 +1086,7 @@
this.userInfo.idType = data.customerIdType //证件类型
this.userInfo.idNo = data.customerIdNumber //证件类别
this.userInfo.certificateValidate = data.idEffectStartDate //证件起始日期
if (data.idEffectEndDate == '9999-12-31') {
if (data.idEffectEndDate == '9999-12-31' && !data.idEffectEndDate) {
this.userInfo.effectiveDateType = true //是否长期
} else {
this.userInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
@@ -1557,9 +1558,10 @@
effectiveDataTypeChange(val) {
//勾选长期状态时,证件截止日期置空
if (val) {
this.userInfo.certiexpiredate = ''
this.userInfo.certiexpiredate = '9999-12-31'
this.certiexpiredateRequired = false
} else {
this.userInfo.certiexpiredate = ''
this.certiexpiredateRequired = true
}
},

View File

@@ -82,6 +82,7 @@
:readonly="isAppnt"
></FieldDatePicter>
<FieldDatePicter
v-if="!userInfo.effectiveDateType"
v-validate="{ required: certiexpiredateRequired }"
label="证件截止日期"
name="证件截止日期"
@@ -1274,7 +1275,7 @@
this.userInfo.certificateValidate = data.idEffectStartDate //证件起始日期
// this.userInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
// this.userInfo.effectiveDateType = data.idEffectEndDate == '9999-12-31' //是否长期
if (data.idEffectEndDate == '9999-12-31') {
if (data.idEffectEndDate == '9999-12-31' && !data.idEffectEndDate) {
this.userInfo.effectiveDateType = true //是否长期
} else {
this.userInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
@@ -1875,11 +1876,12 @@
effectiveDataTypeChange(val) {
//勾选长期状态时,证件截止日期置空
if (val) {
this.userInfo.certiexpiredate = ''
this.userInfo.certiexpiredate = '9999-12-31'
// this.isRequired = false
// this.idLimit = true
this.certiexpiredateRequired = false
} else {
this.userInfo.certiexpiredate = ''
this.certiexpiredateRequired = true
// this.isRequired = true
// this.idLimit = false

View File

@@ -1,18 +1,12 @@
<template>
<div class='insuranceInformation-container' style="padding: 15px;">
<div style="display: flex;align-items: center;font-weight: bold;" class="fs20">
<span style="width: 3px;background: red;height: 25px;"></span>
<span v-if="signVal == '0' || signVal == '2'" style="margin-left: 5px;">
投保{{signName}}
</span>
<span v-if="signVal == '1'" style="margin-left: 5px;">
被保险人{{signName}}
</span>
<span v-if="signVal == '3'" style="margin-left: 5px;">
代理人{{signName}}
</span>
<div class="insuranceInformation-container" style="padding: 15px">
<div style="display: flex; align-items: center; font-weight: bold" class="fs20">
<span style="width: 3px; background: red; height: 25px"></span>
<span v-if="signVal == '0' || signVal == '2'" style="margin-left: 5px"> 投保人{{ signName }} </span>
<span v-if="signVal == '1'" style="margin-left: 5px"> 被保险{{ signName }} </span>
<span v-if="signVal == '3'" style="margin-left: 5px"> 代理人{{ signName }} </span>
</div>
<div style="margin-top: 15px;font-weight: bold;line-height: 32px;font-size: 16px;" class="fs20">
<div style="margin-top: 15px; font-weight: bold; line-height: 32px; font-size: 16px" class="fs20">
<span v-if="signVal == '3'">
1.接下来您作为代理人将进行投保文件的签字请在签字前确保您已仔细阅读投保文件并了解投保文件的内容和含义确定投保单各项信息准确无误签字完成并成功提交说明您正式向我司提交投保申请
</span>
@@ -26,208 +20,209 @@
1.接下来您作为被保险人/监护人将进行投保文件的签字请在签字前确保您已仔细阅读投保文件并了解投保文件的内容和含义确定投保单各项信息准确无误签字完成并成功提交说明您正式向我司提交投保申请
</span>
</div>
<div style="border-bottom: 1px dashed #eee;padding-bottom: 15px;margin-top: 15px;">
<p style="font-size: 16px;font-weight: bold;">2.您将为以下文件进行统一签名</p>
<div v-for="item in fileList" style="margin-top: 15px;display: flex;justify-content: space-between;">
<span style="font-size: 16px;color: red;opacity: 0.7;width: 60%;display: inline-block;">{{item.name}}</span>
<span v-if="signstatus == '1'" style="display: flex;align-items: center;display: inline-block;width: 40%;">
<img :src="src" style="margin-left: 15px;width: 16px;"/>
<span style="font-size: 16px;color: #03ceaf;margin-left: 10px;">签署完成</span>
<div style="border-bottom: 1px dashed #eee; padding-bottom: 15px; margin-top: 15px">
<p style="font-size: 16px; font-weight: bold">2.您将为以下文件进行统一签名</p>
<div v-for="item in fileList" style="margin-top: 15px; display: flex; justify-content: space-between">
<span style="font-size: 16px; color: red; opacity: 0.7; width: 60%; display: inline-block">{{ item.name }}</span>
<span v-if="signstatus == '1'" style="display: flex; align-items: center; display: inline-block; width: 40%">
<img :src="src" style="margin-left: 15px; width: 16px" />
<span style="font-size: 16px; color: #03ceaf; margin-left: 10px">签署完成</span>
</span>
</div>
</div>
<div style="margin-top: 15px;display: flex;align-items: center;" class="fs20">
<span v-if="signVal == '3'" style="font-size: 16px;font-weight: bold;">代理人签名</span>
<span v-if="signVal == '0' || signVal == '2'" style="font-size: 16px;font-weight: bold;">投保人签名</span>
<span v-if="signVal == '1' && insuredAge >= 18" style="font-size: 16px;font-weight: bold;">被保险人签名</span>
<span v-if="signVal == '1' && insuredAge < 18" style="font-size: 16px;font-weight: bold;">被保险人/监护人签名</span>
<van-button type="danger" size="small" round style="margin-left: 20px;height: 32px;font-size: 16px;" @click="gosign" class="fs20">
{{signstatus ? '重新签名' : '签名'}}
<div style="margin-top: 15px; display: flex; align-items: center" class="fs20">
<span v-if="signVal == '3'" style="font-size: 16px; font-weight: bold">代理人签名</span>
<span v-if="signVal == '0' || signVal == '2'" style="font-size: 16px; font-weight: bold">投保人签名</span>
<span v-if="signVal == '1' && insuredAge >= 18" style="font-size: 16px; font-weight: bold">被保险人签名</span>
<span v-if="signVal == '1' && insuredAge < 18" style="font-size: 16px; font-weight: bold">被保险人/监护人签名</span>
<van-button type="danger" size="small" round style="margin-left: 20px; height: 32px; font-size: 16px" @click="gosign" class="fs20">
{{ signstatus ? '重新签名' : '签名' }}
</van-button>
</div>
<div>
<img v-if="signstatus" :src="signImgUrl" style="height: 34px;margin-left: 20px;width: auto;"/>
<img v-if="signstatus" :src="signImgUrl" style="height: 34px; margin-left: 20px; width: auto" />
</div>
<div class='bg-white bottom-btn'>
<van-button :disabled="nextDisabled" type='danger' size='normal' style="font-size: 16px;" block v-no-more-click='1000' @click="gonext">
<div class="bg-white bottom-btn">
<van-button :disabled="nextDisabled" type="danger" size="normal" style="font-size: 16px" block v-no-more-click="1000" @click="gonext">
完成阅读并签署
</van-button>
</div>
<van-dialog v-model="guardianshow" :showConfirmButton="false">
<div slot="title">
<p style="color: #E9332E;">监护人姓名</p>
<p style="color: #e9332e">监护人姓名</p>
</div>
<div class="guardianContent" style="padding: 20px 30px 30px;font-size: 14px;">
<van-field v-model="guardianName" label="" name="监护人姓名" placeholder="请输入"/>
<div class="guardianContent" style="padding: 20px 30px 30px; font-size: 14px">
<van-field v-model="guardianName" label="" name="监护人姓名" placeholder="请输入" />
</div>
<div style="text-align: center;margin-bottom: 30px;">
<van-button round type="danger" size="small" style="padding:0px 35px;font-size: 14px;" @click="gosign">确定</van-button>
<div style="text-align: center; margin-bottom: 30px">
<van-button round type="danger" size="small" style="padding: 0px 35px; font-size: 14px" @click="gosign">确定</van-button>
</div>
</van-dialog>
</div>
</template>
<script>
import { saveInformation } from '@/api/ebiz/sale/sale'
import isChoose from '@/assets/images/u20257.png'
export default {
data() {
return {
src: isChoose,
fileList:[],
signImgUrl:'data:image/gif;base64,',
signstatus: false,
signVal: '',
signName: '',
insuredAge: '',
guardianshow: false,
guardianName: '',
nextDisabled:true,
}
},
components: {},
created(){
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
import { saveInformation } from '@/api/ebiz/sale/sale'
import isChoose from '@/assets/images/u20257.png'
export default {
data() {
return {
src: isChoose,
fileList: [],
signImgUrl: 'data:image/gif;base64,',
signstatus: false,
signVal: '',
signName: '',
insuredAge: '',
guardianshow: false,
guardianName: '',
nextDisabled: true
}
},
components: {},
created() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
},
mounted() {
this.signVal = window.localStorage.getItem('sign-val')
this.insuredAge = window.localStorage.getItem('insuredAge')
document.body.style.backgroundColor = '#fff'
let thisfilelist = ''
if (this.signVal == '3') {
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
this.signName = window.localStorage.getItem('recmdName')
} else if (this.signVal == '0' || this.signVal == '2') {
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
this.signName = window.localStorage.getItem('appntName')
} else if (this.signVal == '1') {
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
this.signName = window.localStorage.getItem('insuredName')
}
console.log(thisfilelist)
thisfilelist.forEach((item) => {
if (item.documentType == '1') {
this.fileList.push({
name: item.documentName,
status: '1'
})
}, 100)
window.appCallBack = this.appCallBack
},
mounted() {
this.signVal = window.localStorage.getItem('sign-val')
this.insuredAge = window.localStorage.getItem('insuredAge')
document.body.style.backgroundColor = '#fff'
let thisfilelist = ''
if(this.signVal == '3') {
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
this.signName = window.localStorage.getItem('recmdName')
} else if(this.signVal == '0' || this.signVal == '2') {
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
this.signName = window.localStorage.getItem('appntName')
} else if(this.signVal == '1') {
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
this.signName = window.localStorage.getItem('insuredName')
}
console.log(thisfilelist)
thisfilelist.forEach(item => {
if(item.documentType == '1') {
this.fileList.push({
name:item.documentName,
status: '1'
})
this.signH5Img = sessionStorage.getItem('signH5Img')
if (JSON.parse(window.sessionStorage.getItem('signH5Img'))) {
if (JSON.parse(window.sessionStorage.getItem('signH5Img')).type == '签名' && JSON.parse(window.sessionStorage.getItem('signH5Img')).val)
this.signstatus = true
this.signImgUrl = this.signImgUrl + JSON.parse(window.sessionStorage.getItem('signH5Img')).val
}
if (window.sessionStorage.getItem('signH5Val')) {
this.nextDisabled = false
}
},
methods: {
gosign() {
window.localStorage.setItem('orderNo', this.$route.query.orderNo)
let signInfo = {
type: '签名',
text: '',
keyWord: ''
}
if (this.signVal == '0' || this.signVal == '2') {
signInfo.text = window.localStorage.getItem('appntName')
signInfo.keyWord = '投保锟斤拷:'
}
if (this.signVal == '1') {
signInfo.text = window.localStorage.getItem('insuredName')
signInfo.keyWord = '被保锟斤拷:'
}
if (this.signVal == '3') {
signInfo.text = window.localStorage.getItem('recmdName')
signInfo.keyWord = '代理锟斤拷:'
}
if (this.insuredAge < 18 && !this.guardianName && this.signVal == '1') {
this.guardianshow = true
} else {
if (this.insuredAge < 18 && this.signVal == '1') {
signInfo.text = this.guardianName
}
window.sessionStorage.setItem('signInfo', JSON.stringify(signInfo))
setTimeout(() => {
window.location.href = this.$mainUrl + '/signH5/1.html?time=' + new Date().getTime()
}, 0)
}
},
gonext() {
let params = {
orderType: 'SIGN_MERGED_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: this.$route.query.orderNo
},
baseEncryp: window.sessionStorage.getItem('signH5Val'),
signValue: JSON.parse(window.sessionStorage.getItem('signH5Img')).val,
signType: window.localStorage.getItem('sign-val'),
ebizSignDTOS: []
}
}
let thisfilelist = ''
if (this.signVal == '3') {
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
} else if (this.signVal == '0' || this.signVal == '2') {
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
} else if (this.signVal == '1') {
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
}
thisfilelist.forEach((item) => {
if (item.documentType == '1') {
params.orderDTO.ebizSignDTOS.push({
signOrRead: 'sign',
signId: item.signId,
orderNo: this.$route.query.orderNo,
documentCode: item.documentCode,
documentStatus: '3',
documentType: '1',
signType: item.signType
})
}
})
this.signH5Img = sessionStorage.getItem('signH5Img')
if(JSON.parse(window.sessionStorage.getItem('signH5Img'))) {
if(JSON.parse(window.sessionStorage.getItem('signH5Img')).type == '签名' && JSON.parse(window.sessionStorage.getItem('signH5Img')).val)
this.signstatus = true
this.signImgUrl = this.signImgUrl + JSON.parse(window.sessionStorage.getItem('signH5Img')).val
}
if(window.sessionStorage.getItem('signH5Val')){
this.nextDisabled = false
}
},
methods: {
gosign(){
window.localStorage.setItem('orderNo',this.$route.query.orderNo)
let signInfo = {
type:'签名',
text:'',
keyWord: ''
}
if(this.signVal == '0' || this.signVal == '2') {
signInfo.text = window.localStorage.getItem('appntName')
signInfo.keyWord = '投保锟斤拷:'
}
if(this.signVal == '1'){
signInfo.text = window.localStorage.getItem('insuredName')
signInfo.keyWord = '被保锟斤拷:'
}
if(this.signVal == '3') {
signInfo.text = window.localStorage.getItem('recmdName')
signInfo.keyWord = '代理锟斤拷:'
}
if(this.insuredAge < 18 && !this.guardianName && this.signVal == '1') {
this.guardianshow = true
} else {
if(this.insuredAge < 18 && this.signVal == '1') {
signInfo.text = this.guardianName
}
window.sessionStorage.setItem('signInfo',JSON.stringify(signInfo))
window.location.href = this.$mainUrl + '/signH5/1.html'
// window.location.href = 'http://'+window.location.host + '/signH5/1.html'
}
},
gonext(){
let params = {
orderType: 'SIGN_MERGED_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: this.$route.query.orderNo
},
baseEncryp: window.sessionStorage.getItem('signH5Val'),
signValue: JSON.parse(window.sessionStorage.getItem('signH5Img')).val,
signType: window.localStorage.getItem('sign-val'),
ebizSignDTOS: []
}
}
let thisfilelist = ''
if(this.signVal == '3') {
thisfilelist = JSON.parse(window.localStorage.getItem('agentSignFile'))
} else if(this.signVal == '0' || this.signVal == '2') {
thisfilelist = JSON.parse(window.localStorage.getItem('appntSignFile'))
} else if(this.signVal == '1') {
thisfilelist = JSON.parse(window.localStorage.getItem('insuredSignFile'))
}
thisfilelist.forEach(item => {
if(item.documentType == '1') {
params.orderDTO.ebizSignDTOS.push({
signOrRead: 'sign',
signId:item.signId,
orderNo: this.$route.query.orderNo,
documentCode: item.documentCode,
documentStatus: '3',
documentType: '1',
signType: item.signType
saveInformation(params).then((res) => {
if (res.result == '0') {
if (window.sessionStorage.getItem('shareUrl')) {
this.$router.push({
path: '/sale/SignatureConfirmation' + window.sessionStorage.getItem('shareUrl')
})
}
})
saveInformation(params).then(res=>{
if(res.result == '0') {
if(window.sessionStorage.getItem('shareUrl')){
this.$router.push({
path: '/sale/SignatureConfirmation'+window.sessionStorage.getItem('shareUrl')
})
} else {
this.$router.push({
path: '/sale/SignatureConfirmation',
query: {
orderNo: this.$route.query.orderNo
}
})
}
} else {
this.$toast(res.resultMessage)
}
})
},
appCallBack(data) {
if (data.trigger == 'left_button_click') {
if (this.videoShow) {
this.$jump({
flag: 'navigation',
extra: {
title: '签名确认',
hiddenRight: '1'
this.$router.push({
path: '/sale/SignatureConfirmation',
query: {
orderNo: this.$route.query.orderNo
}
})
return (this.videoShow = false)
}
return this.$dialog.confirm({
} else {
this.$toast(res.resultMessage)
}
})
},
appCallBack(data) {
if (data.trigger == 'left_button_click') {
if (this.videoShow) {
this.$jump({
flag: 'navigation',
extra: {
title: '签名确认',
hiddenRight: '1'
}
})
return (this.videoShow = false)
}
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '是否确认退出?',
@@ -251,34 +246,30 @@
.catch(() => {
return
})
}
},
},
computed: {
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
window.sessionStorage.removeItem('signH5Img')
window.sessionStorage.removeItem('signH5Val')
window.sessionStorage.removeItem('signInfo')
next()
},
watch: {
}
}
}
},
computed: {},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
window.sessionStorage.removeItem('signH5Img')
window.sessionStorage.removeItem('signH5Val')
window.sessionStorage.removeItem('signInfo')
next()
},
watch: {}
}
</script>
<style lang='scss' scoped>
.guardianContent{
/deep/ .van-cell{
border: 1px solid #eee;
}
<style lang="scss" scoped>
.guardianContent {
/deep/ .van-cell {
border: 1px solid #eee;
}
.fs20{
font-size: 16px;
.van-button__text{
padding: 8px 16px;
}
}
.fs20 {
font-size: 16px;
.van-button__text {
padding: 8px 16px;
}
}
</style>