mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-07 06:36:44 +08:00
Compare commits
10 Commits
feature/FC
...
feature/FM
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9947200762 | ||
|
|
4d2601a7e8 | ||
|
|
d0bb2d95c5 | ||
|
|
7ee43dd29b | ||
|
|
d521b57fb7 | ||
|
|
6980da5934 | ||
|
|
43b9db0107 | ||
|
|
3fd4237d25 | ||
|
|
be0791d8e0 | ||
|
|
afabe86131 |
167
src/assets/js/utils/countCredentialValidity.js
Normal file
167
src/assets/js/utils/countCredentialValidity.js
Normal file
@@ -0,0 +1,167 @@
|
||||
export default {
|
||||
//计算身份证起始日期
|
||||
getStartDate: function(age, endDate) {
|
||||
let startDate = '' //证件起始日期
|
||||
let thisDate = new Date() //当年日期
|
||||
let thisyear = thisDate.getFullYear() //当前年份
|
||||
|
||||
if (age < 16) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 16周岁以下的证件有效期为5年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
startDate = String(Number(endDate.slice(0,4)) - 5) + endDate.slice(4,11)
|
||||
} else if (age >= 16 && age <= 21) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 16周岁~21周岁的证件有效期为10年或5年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
if (age - (10 - (endDate.slice(0,4) - thisyear)) < 16 ) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 如果证件有效期为10年 根据证件截止日期 判断10年前的年龄 如果小于16周岁 那么证件有效期就是5年
|
||||
* @Date: 2023/7/5
|
||||
**/
|
||||
startDate = String(Number(endDate.slice(0,4)) - 5) + endDate.slice(4,11)
|
||||
} else {
|
||||
startDate = String(Number(endDate.slice(0,4)) - 10) + endDate.slice(4,11)
|
||||
}
|
||||
} else if(age >= 22 && age <= 25) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 22周岁~25周岁的证件有效期为10年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
startDate = String(Number(endDate.slice(0,4)) - 10) + endDate.slice(4,11)
|
||||
} else if (age >= 26 && age <= 35) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 26周岁~35周岁的证件有效期为20年或10年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
if (age - (20 - (endDate.slice(0,4) - thisyear)) < 26 ) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 如果证件有效期为20年 根据证件截止日期 判断20年前的年龄 如果小于26周岁 那么证件有效期就是10年
|
||||
* @Date: 2023/7/5
|
||||
**/
|
||||
startDate = String(Number(endDate.slice(0,4)) - 10) + endDate.slice(4,11)
|
||||
} else {
|
||||
startDate = String(Number(endDate.slice(0,4)) - 20) + endDate.slice(4,11)
|
||||
}
|
||||
} else if (age >= 36 && age <= 45) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 36周岁~45周岁的证件有效期为20年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
startDate = String(Number(endDate.slice(0,4)) + 20) + endDate.slice(4,11)
|
||||
} else if (age >= 46 && age <= 65) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 46周岁~65周岁的证件有效期为20年或长期
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
if (age - (20 - (endDate.slice(0,4) - thisyear)) < 46 ) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 如果证件有效期为20年 根据证件截止日期 判断20年前的年龄 如果小于46周岁 那么证件有效期就是20年
|
||||
* @Date: 2023/7/5
|
||||
**/
|
||||
startDate = String(Number(endDate.slice(0,4)) - 20) + endDate.slice(4,11)
|
||||
}
|
||||
} else if (age > 65) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 65周岁以上的证件有效期为长期
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
}
|
||||
return startDate
|
||||
},
|
||||
|
||||
//计算身份证截止日期
|
||||
getEndDate: function(age, startDate) {
|
||||
let endDate = '' //证件截止日期
|
||||
let thisDate = new Date() //当年日期
|
||||
let thisyear = thisDate.getFullYear() //当前年份
|
||||
|
||||
if (age < 16) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 16周岁以下的证件有效期为5年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
endDate = String(Number(startDate.slice(0,4)) + 5) + startDate.slice(4,11)
|
||||
} else if (age >= 16 && age <= 21) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 16周岁~21周岁的证件有效期为10年或5年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
if (age - (thisyear - startDate.slice(0,4)) < 16 ) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 根据证件起始日期计算办证时年龄 如果办证时年龄小于16周岁 那么证件有效期就是5年
|
||||
* @Date: 2023/7/5
|
||||
**/
|
||||
endDate = String(Number(startDate.slice(0,4)) + 5) + startDate.slice(4,11)
|
||||
} else {
|
||||
endDate = String(Number(startDate.slice(0,4)) + 10) + startDate.slice(4,11)
|
||||
}
|
||||
} else if(age >= 22 && age <= 25) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 22周岁~25周岁的证件有效期为10年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
endDate = String(Number(startDate.slice(0,4)) + 10) + startDate.slice(4,11)
|
||||
} else if (age >= 26 && age <= 35) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 26周岁~35周岁的证件有效期为20年或10年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
if (age - (thisyear - startDate.slice(0,4)) < 26 ) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 根据证件起始日期计算办证时年龄 如果办证时年龄小于26周岁 那么证件有效期就是10年
|
||||
* @Date: 2023/7/5
|
||||
**/
|
||||
endDate = String(Number(startDate.slice(0,4)) + 10) + startDate.slice(4,11)
|
||||
} else {
|
||||
endDate = String(Number(startDate.slice(0,4)) + 20) + startDate.slice(4,11)
|
||||
}
|
||||
} else if (age >= 36 && age <= 45) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 36周岁~45周岁的证件有效期为20年
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
endDate = String(Number(startDate.slice(0,4)) + 20) + startDate.slice(4,11)
|
||||
} else if (age >= 46 && age <= 65) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 46周岁~65周岁的证件有效期为20年或长期
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
if (age - (thisyear - startDate.slice(0,4)) < 46 ) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 根据证件起始日期计算办证时年龄 如果办证时年龄小于46周岁 那么证件有效期就是20年
|
||||
* @Date: 2023/7/5
|
||||
**/
|
||||
endDate = String(Number(startDate.slice(0,4)) + 20) + startDate.slice(4,11)
|
||||
}
|
||||
} else if (age > 65) {
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 65周岁以上的证件有效期为长期
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
}
|
||||
return endDate
|
||||
}
|
||||
}
|
||||
@@ -353,8 +353,17 @@
|
||||
<van-dialog v-model="trialResultsShow" title="核保试算结果" :show-cancel-button="false">
|
||||
<div class="pl40 pr40 mt10">
|
||||
<div class="flex justify-content-s fs12" v-for="(item, index) in verifyResultList" :key="index">
|
||||
<div><img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/ruleType0'+ item.ruleType +'.png')" alt=""><span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span></div>
|
||||
<div><span class="v-middle">{{item.status | approvedFilter}}</span><img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/approved'+ item.status +'.png')" alt=""></div>
|
||||
<div>
|
||||
<img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/ruleType0'+ item.ruleType +'.png')" alt="">
|
||||
<span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<!-- <span class="v-middle">{{item.status | approvedFilter}}</span>-->
|
||||
<img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/approved'+ item.status +'.png')" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:25px 0px 10px 10px;font-size: 10px;color: #999;">
|
||||
<p style="line-height: 20px;"><span style="width: 40px;display: inline-block;">说明:</span>绿色✔表示 未触发规则、红色×表示 触发规则</p>
|
||||
</div>
|
||||
</div>
|
||||
</van-dialog>
|
||||
|
||||
@@ -136,6 +136,9 @@
|
||||
data-vv-name="联系地址"
|
||||
/>
|
||||
<van-field v-model="userInfo.village" label="" name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
<div class="pl10 pt10 pb10 pr10 address fs14">
|
||||
<van-checkbox v-model="withRootUser.value">同投保人地址</van-checkbox>
|
||||
</div>
|
||||
<van-field
|
||||
v-model="userInfo.yearSalary"
|
||||
label="平均年收入(万元)"
|
||||
@@ -238,6 +241,7 @@ import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
||||
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||
import areaList from '@/assets/js/utils/areaForSale'
|
||||
import countCredentialValidity from '@/assets/js/utils/countCredentialValidity'
|
||||
import filter from '@/filters/index'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
||||
@@ -271,6 +275,10 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
withRootUser: {
|
||||
load: false, //防止重复请求
|
||||
value: false,
|
||||
},
|
||||
nameLimit: false,
|
||||
idNoLimit: false,
|
||||
birthdayLimit: false,
|
||||
@@ -633,6 +641,9 @@ export default {
|
||||
if (this.userInfo.idType == '1') {
|
||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if(this.userInfo.birthday){
|
||||
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(age,val)
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
@@ -657,63 +668,9 @@ export default {
|
||||
if (this.userInfo.idType == '1') {
|
||||
//获取年龄
|
||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
console.log(age)
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁以下的证件有效期为5年')
|
||||
}
|
||||
//年龄在16-21周岁之间
|
||||
}else if (age >= 16 && age <= 21) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁~21周岁的证件有效期为10年或5年')
|
||||
}
|
||||
//年龄在22-25周岁之间
|
||||
}else if (age >= 22 && age <= 25) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('22周岁~25周岁的证件有效期为10年')
|
||||
}
|
||||
//年龄在26-35周岁之间
|
||||
}else if (age >= 26 && age <= 35) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('26周岁~35周岁的证件有效期为20年或10年')
|
||||
}
|
||||
//年龄在36-45周岁之间
|
||||
} else if (age >= 36 && age <= 45) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('36周岁~45周岁的证件有效期为20年')
|
||||
}
|
||||
//年龄在46-65周岁之间
|
||||
} else if (age >= 46 && age <= 65) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 || this.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('46周岁~65周岁的证件有效期为20年或长期')
|
||||
}
|
||||
//年龄在65周岁以上
|
||||
} else if (age > 65) {
|
||||
if (this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('65周岁以上的证件有效期为长期')
|
||||
}
|
||||
}
|
||||
//此外的年龄段不支持
|
||||
// else {
|
||||
// this.userInfo.certiexpiredate = ''
|
||||
// this.$refs.certiexpiredate.date = ''
|
||||
// return this.$toast('身份证不支持此年龄段')
|
||||
// }
|
||||
if(this.userInfo.birthday){
|
||||
this.userInfo.certificateValidate = countCredentialValidity.getStartDate(age,val)
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
@@ -739,6 +696,13 @@ export default {
|
||||
return this.$toast('出生证有效期或出生日期有误')
|
||||
}
|
||||
}
|
||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
if (this.userInfo.certificateValidate && !this.userInfo.certiexpiredate) {
|
||||
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(age,this.userInfo.certificateValidate)
|
||||
}
|
||||
if (this.userInfo.certiexpiredate && !this.userInfo.certificateValidate) {
|
||||
this.userInfo.certificateValidate = countCredentialValidity.getEndDate(age,this.userInfo.certiexpiredate)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -954,50 +918,36 @@ export default {
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁以下的证件有效期为5年')
|
||||
}
|
||||
//年龄在16-21周岁之间
|
||||
}else if (age >= 16 && age <= 21) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁~21周岁的证件有效期为10年或5年')
|
||||
}
|
||||
//年龄在22-25周岁之间
|
||||
}else if (age >= 22 && age <= 25) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('22周岁~25周岁的证件有效期为10年')
|
||||
}
|
||||
//年龄在26-35周岁之间
|
||||
}else if (age >= 26 && age <= 35) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('26周岁~35周岁的证件有效期为20年或10年')
|
||||
}
|
||||
//年龄在36-45周岁之间
|
||||
} else if (age >= 36 && age <= 45) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('36周岁~45周岁的证件有效期为20年')
|
||||
}
|
||||
//年龄在46-65周岁之间
|
||||
} else if (age >= 46 && age <= 65) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('46周岁~65周岁的证件有效期为20年或长期')
|
||||
}
|
||||
//年龄在65周岁以上
|
||||
} else if (age > 65) {
|
||||
if (this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('65周岁以上的证件有效期为长期')
|
||||
}
|
||||
}
|
||||
@@ -1196,31 +1146,64 @@ export default {
|
||||
}
|
||||
|
||||
this.isInsured = true
|
||||
let insuredDetail = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
console.log(insuredDetail,'insuredDetailqqqqqqqqq')
|
||||
this.userInfo.name = insuredDetail.name //姓名
|
||||
this.nameLimit = Boolean(insuredDetail.name)
|
||||
this.userInfo.sex = insuredDetail.sex //性别
|
||||
this.sexLimit = Boolean(insuredDetail.sex)
|
||||
this.userInfo.nativeplace = insuredDetail.nativeplace //国家地区
|
||||
this.userInfo.birthday = insuredDetail.birthday //出生日期
|
||||
this.birthdayLimit = Boolean(insuredDetail.birthday)
|
||||
this.userInfo.idType = insuredDetail.idType //证件类型
|
||||
this.userInfo.idNo = insuredDetail.idNo //证件号码
|
||||
this.idNoLimit = Boolean(insuredDetail.idNo)
|
||||
this.userInfo.certificateValidate = insuredDetail.certificateValidate //证件起始日期
|
||||
this.userInfo.certiexpiredate = insuredDetail.certiexpiredate == '9999-12-31' ? '' : insuredDetail.certiexpiredate //证件截止日期
|
||||
this.userInfo.effectiveDateType = insuredDetail.certiexpiredate == '9999-12-31' //是否长期
|
||||
this.userInfo.mobile = insuredDetail.mobile
|
||||
this.mobileLimit = Boolean(insuredDetail.mobile)
|
||||
let age = utilsAge.getAge(insuredDetail.birthday, new Date())
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if (age > 45) {
|
||||
this.userInfo.effectiveDateType = true
|
||||
let params = {
|
||||
orderNo: this.$route.query.orderNo
|
||||
}
|
||||
this.idLimit = true
|
||||
this.userInfo.occupationCode = insuredDetail.occupationCode //职业类别编码
|
||||
this.userInfo.occupationName = insuredDetail.occupationName //职业类别名称
|
||||
getOrderDetail(params).then(res=>{
|
||||
if(res.result == 0){
|
||||
let insuredDetail = res.orderDTO.appntDTO
|
||||
this.userInfo.name = insuredDetail.name //姓名
|
||||
this.nameLimit = Boolean(insuredDetail.name)
|
||||
this.userInfo.sex = insuredDetail.sex //性别
|
||||
this.sexLimit = Boolean(insuredDetail.sex)
|
||||
this.userInfo.nativeplace = insuredDetail.nativeplace //国家地区
|
||||
this.userInfo.birthday = insuredDetail.birthday //出生日期
|
||||
this.birthdayLimit = Boolean(insuredDetail.birthday)
|
||||
this.userInfo.idType = insuredDetail.idType //证件类型
|
||||
this.userInfo.idNo = insuredDetail.idNo //证件号码
|
||||
this.idNoLimit = Boolean(insuredDetail.idNo)
|
||||
this.userInfo.certificateValidate = insuredDetail.certificateValidate //证件起始日期
|
||||
this.userInfo.certiexpiredate = insuredDetail.certiexpiredate == '9999-12-31' ? '' : insuredDetail.certiexpiredate //证件截止日期
|
||||
this.userInfo.effectiveDateType = insuredDetail.certiexpiredate == '9999-12-31' //是否长期
|
||||
this.userInfo.mobile = insuredDetail.mobile
|
||||
this.mobileLimit = Boolean(insuredDetail.mobile)
|
||||
this.userInfo.marriage =insuredDetail.marriage
|
||||
if(this.userInfo.marriage == 1){
|
||||
this.userInfo.marriageStatus = '已婚'
|
||||
}
|
||||
else if(this.userInfo.marriage == 2){
|
||||
this.userInfo.marriageStatus = '未婚'
|
||||
}
|
||||
else if(this.userInfo.marriage == 3){
|
||||
this.userInfo.marriageStatus = '离异'
|
||||
}
|
||||
else if(this.userInfo.marriage == 4){
|
||||
this.userInfo.marriageStatus = '丧偶'
|
||||
}
|
||||
let age = utilsAge.getAge(insuredDetail.birthday, new Date())
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if (age > 45) {
|
||||
this.userInfo.effectiveDateType = true
|
||||
}
|
||||
this.idLimit = true
|
||||
this.userInfo.occupationCode = insuredDetail.occupationCode //职业类别编码
|
||||
this.userInfo.occupationName = insuredDetail.occupationName //职业类别名称
|
||||
|
||||
this.areaStr = getAreaName([
|
||||
{ code: insuredDetail.homeProvince },
|
||||
{ code: insuredDetail.homeCity },
|
||||
{ code: insuredDetail.homeArea },
|
||||
])
|
||||
this.userInfo.province = insuredDetail.homeProvince
|
||||
this.userInfo.city = insuredDetail.homeCity
|
||||
this.userInfo.area = insuredDetail.homeArea
|
||||
this.userInfo.village = insuredDetail.homeAddress
|
||||
|
||||
this.userInfo.yearSalary = insuredDetail.averageAnnualIncome
|
||||
this.userInfo.averageAnnualIncome = insuredDetail.averageAnnualIncome
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
this.isInsured = false
|
||||
this.userInfo.relationToInsured = ''
|
||||
@@ -1302,11 +1285,38 @@ export default {
|
||||
}
|
||||
this.effectiveDateTypeAble = false
|
||||
}
|
||||
//如果选择户口本
|
||||
if (this.userInfo.idType == '2') {
|
||||
let exipreDate = Date.parse(this.userInfo.birthday) + Date.parse('1985-12-31')
|
||||
this.userInfo.certificateValidate = this.userInfo.birthday
|
||||
this.userInfo.certiexpiredate = this.timeStampFormat(exipreDate)
|
||||
this.idLimit = true
|
||||
//如果选择出生证明
|
||||
}
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
idToText: filter.idToText
|
||||
},
|
||||
watch: {
|
||||
async 'withRootUser.value'(n) {
|
||||
const orderNo = this.$route.query.orderNo
|
||||
if (n && orderNo) {
|
||||
const rs = await getOrderDetail({ orderNo: orderNo});
|
||||
this.areaStr = getAreaName([
|
||||
{ code: rs.orderDTO.appntDTO.homeProvince },
|
||||
{ code: rs.orderDTO.appntDTO.homeCity },
|
||||
{ code: rs.orderDTO.appntDTO.homeArea },
|
||||
])
|
||||
this.userInfo.province = rs.orderDTO.appntDTO.homeProvince
|
||||
this.userInfo.city = rs.orderDTO.appntDTO.homeCity
|
||||
this.userInfo.area = rs.orderDTO.appntDTO.homeArea
|
||||
this.userInfo.village = rs.orderDTO.appntDTO.homeAddress
|
||||
} else {
|
||||
this.homeName = this.userInfo.homeAddress = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
@@ -1322,5 +1332,9 @@ export default {
|
||||
/deep/.van-checkbox {
|
||||
margin-left: auto;
|
||||
}
|
||||
.address {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -388,6 +388,7 @@ import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
||||
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
|
||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||
import areaList from '@/assets/js/utils/areaForSale'
|
||||
import countCredentialValidity from '@/assets/js/utils/countCredentialValidity'
|
||||
import areaLists from '@/assets/js/utils/areaNewForSale'
|
||||
import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail, getCompany } from '@/api/ebiz/sale/sale'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
@@ -858,20 +859,14 @@ export default {
|
||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
// 长期按钮是否禁用
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if(this.userInfo.birthday){
|
||||
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(age,val)
|
||||
}
|
||||
}
|
||||
}
|
||||
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())) {
|
||||
@@ -881,65 +876,10 @@ export default {
|
||||
}
|
||||
//身份证证件类型的判断
|
||||
if (this.userInfo.idType == '1') {
|
||||
//获取年龄
|
||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
console.log(age)
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁以下的证件有效期为5年')
|
||||
}
|
||||
//年龄在16-21周岁之间
|
||||
}else if (age >= 16 && age <= 21) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁~21周岁的证件有效期为10年或5年')
|
||||
}
|
||||
//年龄在22-25周岁之间
|
||||
}else if (age >= 22 && age <= 25) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('22周岁~25周岁的证件有效期为10年')
|
||||
}
|
||||
//年龄在26-35周岁之间
|
||||
}else if (age >= 26 && age <= 35) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('26周岁~35周岁的证件有效期为20年或10年')
|
||||
}
|
||||
//年龄在36-45周岁之间
|
||||
} else if (age >= 36 && age <= 45) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('36周岁~45周岁的证件有效期为20年')
|
||||
}
|
||||
//年龄在46-65周岁之间
|
||||
} else if (age >= 46 && age <= 65) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('46周岁~65周岁的证件有效期为20年或长期')
|
||||
}
|
||||
//年龄在65周岁以上
|
||||
} else if (age > 65) {
|
||||
if (this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('65周岁以上的证件有效期为长期')
|
||||
}
|
||||
}
|
||||
//此外的年龄段不支持
|
||||
// else {
|
||||
// this.userInfo.certiexpiredate = ''
|
||||
// this.$refs.certiexpiredate.date = ''
|
||||
// return this.$toast('身份证不支持此年龄段')
|
||||
// }
|
||||
if(this.userInfo.birthday){
|
||||
this.userInfo.certificateValidate = countCredentialValidity.getStartDate(age,val)
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
@@ -961,6 +901,12 @@ export default {
|
||||
if (age < 18) {
|
||||
this.userInfo.workcompany = this.userInfo.workcompany || '无'
|
||||
}
|
||||
if (this.userInfo.certificateValidate && !this.userInfo.certiexpiredate) {
|
||||
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(age,this.userInfo.certificateValidate)
|
||||
}
|
||||
if (this.userInfo.certiexpiredate && !this.userInfo.certificateValidate) {
|
||||
this.userInfo.certificateValidate = countCredentialValidity.getEndDate(age,this.userInfo.certiexpiredate)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -1054,32 +1000,9 @@ export default {
|
||||
|
||||
//如果证件类型是身份证
|
||||
if (this.userInfo.idType == '1') {
|
||||
console.log('证件类型是身份证')
|
||||
|
||||
if (this.userInfo.nativeplace != '1') {
|
||||
return this.$toast('证件类型”为“身份证,国籍必须为中国哦')
|
||||
}
|
||||
|
||||
//校验性别是否与身份证号码位相符
|
||||
// if (this.userInfo.idNo.length == '15') {
|
||||
// //15位身份证第15位是性别位, 奇男偶女
|
||||
// let sexSign = this.userInfo.idNo.substr(14, 1)
|
||||
// console.log('性别位' + sexSign)
|
||||
// if ((parseInt(sexSign) % 2 == 0 && this.userInfo.sex != 1) || (parseInt(sexSign) % 2 != 0 && this.userInfo.sex != 0)) {
|
||||
// return this.$toast('性别录入与身份证不符')
|
||||
// }
|
||||
|
||||
// //15位身份证第7-12位是生日位, 年月日
|
||||
// let birthSign = this.userInfo.idNo.substr(6, 6)
|
||||
// console.log('生日位' + birthSign)
|
||||
// if (
|
||||
// this.userInfo.birthday.substr(2, 2) != birthSign.substr(0, 2) ||
|
||||
// this.userInfo.birthday.substr(5, 2) != birthSign.substr(2, 2) ||
|
||||
// this.userInfo.birthday.substr(8, 2) != birthSign.substr(4, 2)
|
||||
// ) {
|
||||
// return this.$toast('生日录入与身份证不符')
|
||||
// }
|
||||
// } else
|
||||
if (this.userInfo.idNo.length == '18') {
|
||||
//18位身份证第17位是性别位, 奇男偶女
|
||||
let sexSign = this.userInfo.idNo.substr(16, 1)
|
||||
@@ -1114,71 +1037,39 @@ export default {
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁以下的证件有效期为5年')
|
||||
}
|
||||
//年龄在16-21周岁之间
|
||||
}else if (age >= 16 && age <= 21) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁~21周岁的证件有效期为10年或5年')
|
||||
}
|
||||
//年龄在22-25周岁之间
|
||||
}else if (age >= 22 && age <= 25) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('22周岁~25周岁的证件有效期为10年')
|
||||
}
|
||||
//年龄在26-35周岁之间
|
||||
}else if (age >= 26 && age <= 35) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('26周岁~35周岁的证件有效期为20年或10年')
|
||||
}
|
||||
//年龄在36-45周岁之间
|
||||
} else if (age >= 36 && age <= 45) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('36周岁~45周岁的证件有效期为20年')
|
||||
}
|
||||
//年龄在46-65周岁之间
|
||||
} else if (age >= 46 && age <= 65) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('46周岁~65周岁的证件有效期为20年或长期')
|
||||
}
|
||||
//年龄在65周岁以上
|
||||
} else if (age > 65) {
|
||||
if (this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
if (this.userInfo.effectiveDateType == false) {
|
||||
return this.$toast('65周岁以上的证件有效期为长期')
|
||||
}
|
||||
}
|
||||
|
||||
// 年龄在 16-25 周岁之间
|
||||
// if (age >= 16 && age <= 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) {
|
||||
// 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年')
|
||||
// }
|
||||
// }
|
||||
}
|
||||
//证件类型是户口本
|
||||
} else if (this.userInfo.idType == '2') {
|
||||
if (age > 16) {
|
||||
|
||||
@@ -452,6 +452,7 @@ import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
|
||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||
import areaList from '@/assets/js/utils/areaForSale'
|
||||
import areaLists from '@/assets/js/utils/areaNewForSale'
|
||||
import countCredentialValidity from '@/assets/js/utils/countCredentialValidity'
|
||||
import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
||||
@@ -1062,6 +1063,9 @@ export default {
|
||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
// 长期按钮是否禁用
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if(this.userInfo.birthday){
|
||||
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(age,val)
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
@@ -1088,62 +1092,9 @@ export default {
|
||||
//获取年龄
|
||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||
console.log(age)
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁以下的证件有效期为5年')
|
||||
}
|
||||
//年龄在16-21周岁之间
|
||||
}else if (age >= 16 && age <= 21) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁~21周岁的证件有效期为10年或5年')
|
||||
}
|
||||
//年龄在22-25周岁之间
|
||||
}else if (age >= 22 && age <= 25) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('22周岁~25周岁的证件有效期为10年')
|
||||
}
|
||||
//年龄在26-35周岁之间
|
||||
}else if (age >= 26 && age <= 35) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('26周岁~35周岁的证件有效期为20年或10年')
|
||||
}
|
||||
//年龄在36-45周岁之间
|
||||
} else if (age >= 36 && age <= 45) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('36周岁~45周岁的证件有效期为20年')
|
||||
}
|
||||
//年龄在46-65周岁之间
|
||||
} else if (age >= 46 && age <= 65) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('46周岁~65周岁的证件有效期为20年或长期')
|
||||
}
|
||||
//年龄在65周岁以上
|
||||
} else if (age > 65) {
|
||||
if (this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('65周岁以上的证件有效期为长期')
|
||||
}
|
||||
}
|
||||
//此外的年龄段不支持
|
||||
// else {
|
||||
// this.userInfo.certiexpiredate = ''
|
||||
// this.$refs.certiexpiredate.date = ''
|
||||
// return this.$toast('身份证不支持此年龄段')
|
||||
// }
|
||||
if(this.userInfo.birthday){
|
||||
this.userInfo.certificateValidate = countCredentialValidity.getStartDate(age,val)
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
@@ -1170,24 +1121,14 @@ export default {
|
||||
this.userInfo.otherSalarySource = '无'
|
||||
this.userInfo.averageAnnualIncome = '0'
|
||||
this.userInfo.liabilitiesMoney = '0'
|
||||
// this.userInfo.jobStatus = '3'
|
||||
// this.userInfo.marriage = '2'
|
||||
} else {
|
||||
// this.userInfo.salarySource = ''
|
||||
// this.userInfo.averageAnnualIncome = ''
|
||||
// this.userInfo.liabilitiesMoney = ''
|
||||
// this.userInfo.jobStatus = ''
|
||||
// this.userInfo.marriage = ''
|
||||
}
|
||||
}
|
||||
//出生证有效期
|
||||
// if (this.userInfo.idType == '3') {
|
||||
// if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(val) > Date.parse('1973-01-01')) {
|
||||
// this.userInfo.birthday = ''
|
||||
// this.$refs.birthday.date = ''
|
||||
// return this.$toast('出生证有效期或出生日期有误')
|
||||
// }
|
||||
// }
|
||||
if (this.userInfo.certificateValidate && !this.userInfo.certiexpiredate) {
|
||||
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(age,this.userInfo.certificateValidate)
|
||||
}
|
||||
if (this.userInfo.certiexpiredate && !this.userInfo.certificateValidate) {
|
||||
this.userInfo.certificateValidate = countCredentialValidity.getEndDate(age,this.userInfo.certiexpiredate)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -1472,53 +1413,39 @@ export default {
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁以下的证件有效期为5年')
|
||||
}
|
||||
//年龄在16-21周岁之间
|
||||
}else if (age >= 16 && age <= 21) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('16周岁~21周岁的证件有效期为10年或5年')
|
||||
}
|
||||
//年龄在22-25周岁之间
|
||||
}else if (age >= 22 && age <= 25) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('22周岁~25周岁的证件有效期为10年')
|
||||
}
|
||||
//年龄在26-35周岁之间
|
||||
}else if (age >= 26 && age <= 35) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('26周岁~35周岁的证件有效期为20年或10年')
|
||||
}
|
||||
//年龄在36-45周岁之间
|
||||
} else if (age >= 36 && age <= 45) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('36周岁~45周岁的证件有效期为20年')
|
||||
}
|
||||
//年龄在46-65周岁之间
|
||||
} else if (age >= 46 && age <= 65) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('46周岁~65周岁的证件有效期为20年或长期')
|
||||
}
|
||||
//年龄在65周岁以上
|
||||
} else if (age > 65) {
|
||||
if (this.userInfo.effectiveDateType == false) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
if (this.userInfo.effectiveDateType == false) {
|
||||
return this.$toast('65周岁以上的证件有效期为长期')
|
||||
}
|
||||
}
|
||||
}
|
||||
//年龄在0-15周岁之间
|
||||
// if (age <= 15) {
|
||||
// if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1975-01-01')) {
|
||||
@@ -2003,36 +1930,27 @@ export default {
|
||||
this.userInfo.otherSalarySource = '无'
|
||||
this.userInfo.averageAnnualIncome = '0'
|
||||
this.userInfo.liabilitiesMoney = '0'
|
||||
// this.userInfo.jobStatus = '3'
|
||||
// this.userInfo.marriage = '2'
|
||||
} else {
|
||||
this.userInfo.salarySource = ''
|
||||
this.userInfo.averageAnnualIncome = ''
|
||||
this.userInfo.liabilitiesMoney = ''
|
||||
// this.userInfo.jobStatus = ''
|
||||
// this.userInfo.marriage = ''
|
||||
}
|
||||
}
|
||||
if (idToData(val).age > 45) {
|
||||
// this.idLimit = true
|
||||
// this.isRequired = false
|
||||
if (from) {
|
||||
this.userInfo.effectiveDateType = true
|
||||
}
|
||||
this.effectiveDateTypeAble = false
|
||||
} else {
|
||||
// this.idLimit = false
|
||||
// this.isRequired = true
|
||||
// this.userInfo.effectiveDateType = false
|
||||
}
|
||||
//如果选择户口本
|
||||
// if (this.userInfo.idType == '2') {
|
||||
// let exipreDate = Date.parse(this.userInfo.birthday) + Date.parse('1985-12-31')
|
||||
// this.userInfo.certificateValidate = this.userInfo.birthday
|
||||
// this.userInfo.certiexpiredate = this.timeStampFormat(exipreDate)
|
||||
// this.idLimit = true
|
||||
// //如果选择出生证明
|
||||
// } else if (this.userInfo.idType == '3') {
|
||||
if (this.userInfo.idType == '2') {
|
||||
let exipreDate = Date.parse(this.userInfo.birthday) + Date.parse('1985-12-31')
|
||||
this.userInfo.certificateValidate = this.userInfo.birthday
|
||||
this.userInfo.certiexpiredate = this.timeStampFormat(exipreDate)
|
||||
this.idLimit = true
|
||||
//如果选择出生证明
|
||||
}
|
||||
// else if (this.userInfo.idType == '3') {
|
||||
// let exipreDate = Date.parse(this.userInfo.birthday) + Date.parse('1972-12-31')
|
||||
// this.userInfo.certificateValidate = this.userInfo.birthday
|
||||
// this.userInfo.certiexpiredate = this.timeStampFormat(exipreDate)
|
||||
|
||||
@@ -148,6 +148,11 @@ export default {
|
||||
if (res.result == '0') {
|
||||
res.orderDTO.insuredDTOs[0].riskDTOLst.forEach(item => {
|
||||
if(item.isMainRisk == '0'){
|
||||
/**
|
||||
* @Author: LiuXiaoFeng
|
||||
* @Description: 保险期间大于1年或者是保终身的才展示产品说明书
|
||||
* @Date: 2023/7/4
|
||||
**/
|
||||
if(item.insuYearFlag == 'Y' && item.insuYear > 1){
|
||||
this.hasProductTip = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user