mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-19 13:46:44 +08:00
代码修改
This commit is contained in:
@@ -233,20 +233,20 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Field, CellGroup, Cell, Popup, Picker, Checkbox, Area, RadioGroup, Radio} from 'vant'
|
import {Field, CellGroup, Cell, Popup, Picker, Checkbox, Area, RadioGroup, Radio} from 'vant'
|
||||||
import SelectRadio from '@/components/ebiz/SelectRadio'
|
import SelectRadio from '@/components/ebiz/SelectRadio'
|
||||||
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
||||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||||
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
||||||
import areaList from '@/assets/js/utils/areaForSale'
|
import areaList from '@/assets/js/utils/areaForSale'
|
||||||
import areaLists from '@/assets/js/utils/areaNewForSale'
|
import areaLists from '@/assets/js/utils/areaNewForSale'
|
||||||
import utilsAge from '@/assets/js/utils/age'
|
import utilsAge from '@/assets/js/utils/age'
|
||||||
import getAreaName, { getCensusName } from '@/assets/js/utils/getAreaNameForSale'
|
import getAreaName, { getCensusName } from '@/assets/js/utils/getAreaNameForSale'
|
||||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||||
import { idToData } from '@/views/ebiz/customer/js/verification'
|
import { idToData } from '@/views/ebiz/customer/js/verification'
|
||||||
import filter from '@/filters/index'
|
import filter from '@/filters/index'
|
||||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'formBlock',
|
name: 'formBlock',
|
||||||
components: {
|
components: {
|
||||||
[Field.name]: Field,
|
[Field.name]: Field,
|
||||||
@@ -697,6 +697,12 @@ export default {
|
|||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
this.userInfo.effectiveDateType = false
|
this.userInfo.effectiveDateType = false
|
||||||
|
//如果录入日期早于当前日期
|
||||||
|
if (Date.parse(val) < Date.parse(new Date())) {
|
||||||
|
this.userInfo.certiexpiredate = ''
|
||||||
|
this.$refs.certiexpiredate.date = ''
|
||||||
|
return this.$toast('您的证件已过期')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
@@ -763,21 +769,21 @@ export default {
|
|||||||
this.userInfo.customerSex = idToData(val).sex
|
this.userInfo.customerSex = idToData(val).sex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.title {
|
.title {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-bottom: 1px solid #ebedf0;
|
border-bottom: 1px solid #ebedf0;
|
||||||
}
|
}
|
||||||
[class*='van-hairline']::after {
|
[class*='van-hairline']::after {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
}
|
}
|
||||||
.van-checkbox {
|
.van-checkbox {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
.isNewPeopleFlagTipClass{
|
.isNewPeopleFlagTipClass{
|
||||||
margin-top: 45px;line-height: 24px;text-indent: 2em;letter-spacing: 1px;padding: 2px 10px;
|
margin-top: 45px;line-height: 24px;text-indent: 2em;letter-spacing: 1px;padding: 2px 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
<i class="red pr5">*</i>
|
<i class="red pr5">*</i>
|
||||||
保单形式
|
保单形式
|
||||||
</label>
|
</label>
|
||||||
<van-radio name="0" class="ml30">电子</van-radio>
|
<van-radio name="0" class="ml30">电子(不打印保单)</van-radio>
|
||||||
<van-radio name="2" class="ml20">电子+纸质</van-radio>
|
<van-radio name="2" class="ml20">电子+纸质</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
@@ -414,27 +414,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, Dialog } from 'vant'
|
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, Dialog } from 'vant'
|
||||||
import SelectRadio from '@/components/ebiz/SelectRadio'
|
import SelectRadio from '@/components/ebiz/SelectRadio'
|
||||||
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
||||||
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
||||||
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
||||||
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
|
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
|
||||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||||
import areaList from '@/assets/js/utils/areaForSale'
|
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, getCompany } from '@/api/ebiz/sale/sale'
|
import areaLists from '@/assets/js/utils/areaNewForSale'
|
||||||
import utilsAge from '@/assets/js/utils/age'
|
import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail, getCompany } from '@/api/ebiz/sale/sale'
|
||||||
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
import utilsAge from '@/assets/js/utils/age'
|
||||||
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
||||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
||||||
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
|
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||||
import { idToData } from './js/verification'
|
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
|
||||||
import { selectComp, getIdentityInfo } from './js/methods'
|
import { idToData } from './js/verification'
|
||||||
import SearchField from '@/components/common/SearchField'
|
import { selectComp, getIdentityInfo } from './js/methods'
|
||||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
import SearchField from '@/components/common/SearchField'
|
||||||
|
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'insuredInfo',
|
name: 'insuredInfo',
|
||||||
components: {
|
components: {
|
||||||
[SelectRadio.name]: SelectRadio,
|
[SelectRadio.name]: SelectRadio,
|
||||||
@@ -589,7 +590,7 @@ export default {
|
|||||||
|
|
||||||
// document.body.style.backgroundColor = '#F5F5F5'
|
// document.body.style.backgroundColor = '#F5F5F5'
|
||||||
//如果是编辑/导航进来
|
//如果是编辑/导航进来
|
||||||
this.isElecCont = '0'
|
// this.isElecCont = '0'
|
||||||
if (this.$route.query.edit) {
|
if (this.$route.query.edit) {
|
||||||
const orderNo = this.$route.query.orderNo
|
const orderNo = this.$route.query.orderNo
|
||||||
getOrderDetail({ orderNo: orderNo }).then((res) => {
|
getOrderDetail({ orderNo: orderNo }).then((res) => {
|
||||||
@@ -903,20 +904,14 @@ export default {
|
|||||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||||
// 长期按钮是否禁用
|
// 长期按钮是否禁用
|
||||||
this.effectiveDateTypeAble = age <= 45
|
this.effectiveDateTypeAble = age <= 45
|
||||||
|
if(this.userInfo.birthday){
|
||||||
|
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(this.userInfo.birthday,val)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case '1':
|
case '1':
|
||||||
{
|
{
|
||||||
console.log('证件截止日期')
|
|
||||||
//证件截止日期
|
|
||||||
//如果已经勾选了长期
|
|
||||||
// if (this.userInfo.effectiveDateType) {
|
|
||||||
// //清空数据并返回
|
|
||||||
// this.userInfo.certiexpiredate = ''
|
|
||||||
// this.$refs.certiexpiredate.date = ''
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
this.userInfo.effectiveDateType = false
|
this.userInfo.effectiveDateType = false
|
||||||
//如果录入日期早于当前日期
|
//如果录入日期早于当前日期
|
||||||
if (Date.parse(val) < Date.parse(new Date())) {
|
if (Date.parse(val) < Date.parse(new Date())) {
|
||||||
@@ -926,65 +921,9 @@ export default {
|
|||||||
}
|
}
|
||||||
//身份证证件类型的判断
|
//身份证证件类型的判断
|
||||||
if (this.userInfo.idType == '1') {
|
if (this.userInfo.idType == '1') {
|
||||||
//获取年龄
|
if(this.userInfo.birthday){
|
||||||
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
this.userInfo.certificateValidate = countCredentialValidity.getStartDate(this.userInfo.birthday,val)
|
||||||
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('身份证不支持此年龄段')
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -1006,6 +945,12 @@ export default {
|
|||||||
if (age < 18) {
|
if (age < 18) {
|
||||||
this.userInfo.workcompany = this.userInfo.workcompany || '无'
|
this.userInfo.workcompany = this.userInfo.workcompany || '无'
|
||||||
}
|
}
|
||||||
|
if (this.userInfo.certificateValidate && !this.userInfo.certiexpiredate) {
|
||||||
|
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(this.userInfo.birthday,this.userInfo.certificateValidate)
|
||||||
|
}
|
||||||
|
if (this.userInfo.certiexpiredate && !this.userInfo.certificateValidate) {
|
||||||
|
this.userInfo.certificateValidate = countCredentialValidity.getEndDate(this.userInfo.birthday,this.userInfo.certiexpiredate)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -1069,7 +1014,7 @@ export default {
|
|||||||
// this.userInfo.homePhone = data.homePhone //家庭电话
|
// this.userInfo.homePhone = data.homePhone //家庭电话
|
||||||
// this.userInfo.householdProvince = data.province //户籍省
|
// this.userInfo.householdProvince = data.province //户籍省
|
||||||
// this.userInfo.householdCity = data.city //户籍市
|
// this.userInfo.householdCity = data.city //户籍市
|
||||||
this.isElecCont = data.isElecCont || '0' //保单形式
|
this.isElecCont = data.isElecCont //保单形式
|
||||||
// if (data.province.length) {
|
// if (data.province.length) {
|
||||||
// this.census = getAreaName([{ code: data.province }, { code: data.city }]) //户籍
|
// this.census = getAreaName([{ code: data.province }, { code: data.city }]) //户籍
|
||||||
// }
|
// }
|
||||||
@@ -1090,11 +1035,17 @@ export default {
|
|||||||
//表单校验, 成功跳转
|
//表单校验, 成功跳转
|
||||||
let valid = await this.$validator.validate()
|
let valid = await this.$validator.validate()
|
||||||
if(this.manageComCode == '45'){
|
if(this.manageComCode == '45'){
|
||||||
if(this.userInfo.isNewPeopleFlag !== '0' || this.userInfo.isNewPeopleFlag !== '1'){
|
if(this.userInfo.isNewPeopleFlag == '' || this.userInfo.isNewPeopleFlag == null || this.userInfo.isNewPeopleFlag == undefined ){
|
||||||
|
console.log(this.userInfo.isNewPeopleFlag)
|
||||||
|
debugger
|
||||||
this.$toast('新市民身份不能为空')
|
this.$toast('新市民身份不能为空')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(this.isElecCont == '' || this.isElecCont == null || this.isElecCont == undefined){
|
||||||
|
this.$toast('请选择保单形式')
|
||||||
|
return false
|
||||||
|
}
|
||||||
// .then(valid => {
|
// .then(valid => {
|
||||||
if (true === valid) {
|
if (true === valid) {
|
||||||
localStorage.chooseProductCodesNew = localStorage.chooseProductCodes
|
localStorage.chooseProductCodesNew = localStorage.chooseProductCodes
|
||||||
@@ -1107,32 +1058,9 @@ export default {
|
|||||||
|
|
||||||
//如果证件类型是身份证
|
//如果证件类型是身份证
|
||||||
if (this.userInfo.idType == '1') {
|
if (this.userInfo.idType == '1') {
|
||||||
console.log('证件类型是身份证')
|
|
||||||
|
|
||||||
if (this.userInfo.nativeplace != '1') {
|
if (this.userInfo.nativeplace != '1') {
|
||||||
return this.$toast('证件类型”为“身份证,国籍必须为中国哦')
|
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') {
|
if (this.userInfo.idNo.length == '18') {
|
||||||
//18位身份证第17位是性别位, 奇男偶女
|
//18位身份证第17位是性别位, 奇男偶女
|
||||||
let sexSign = this.userInfo.idNo.substr(16, 1)
|
let sexSign = this.userInfo.idNo.substr(16, 1)
|
||||||
@@ -1164,74 +1092,47 @@ export default {
|
|||||||
//身份证证件类型的判断
|
//身份证证件类型的判断
|
||||||
//证件止期
|
//证件止期
|
||||||
let val = this.userInfo.certiexpiredate
|
let val = this.userInfo.certiexpiredate
|
||||||
|
if (Date.parse(val) < Date.parse(new Date())) {
|
||||||
|
this.userInfo.certiexpiredate = ''
|
||||||
|
this.$refs.certiexpiredate.date = ''
|
||||||
|
return this.$toast('您的证件已过期')
|
||||||
|
}
|
||||||
//年龄在16周岁以下
|
//年龄在16周岁以下
|
||||||
if (age < 16) {
|
if (age < 16) {
|
||||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||||
this.userInfo.certiexpiredate = ''
|
|
||||||
this.$refs.certiexpiredate.date = ''
|
|
||||||
return this.$toast('16周岁以下的证件有效期为5年')
|
return this.$toast('16周岁以下的证件有效期为5年')
|
||||||
}
|
}
|
||||||
//年龄在16-21周岁之间
|
//年龄在16-21周岁之间
|
||||||
}else if (age >= 16 && age <= 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) {
|
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年')
|
return this.$toast('16周岁~21周岁的证件有效期为10年或5年')
|
||||||
}
|
}
|
||||||
//年龄在22-25周岁之间
|
//年龄在22-25周岁之间
|
||||||
}else if (age >= 22 && age <= 25) {
|
}else if (age >= 22 && age <= 25) {
|
||||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
|
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年')
|
return this.$toast('22周岁~25周岁的证件有效期为10年')
|
||||||
}
|
}
|
||||||
//年龄在26-35周岁之间
|
//年龄在26-35周岁之间
|
||||||
}else if (age >= 26 && age <= 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) {
|
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年')
|
return this.$toast('26周岁~35周岁的证件有效期为20年或10年')
|
||||||
}
|
}
|
||||||
//年龄在36-45周岁之间
|
//年龄在36-45周岁之间
|
||||||
} else if (age >= 36 && age <= 45) {
|
} else if (age >= 36 && age <= 45) {
|
||||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
|
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年')
|
return this.$toast('36周岁~45周岁的证件有效期为20年')
|
||||||
}
|
}
|
||||||
//年龄在46-65周岁之间
|
//年龄在46-65周岁之间
|
||||||
} else if (age >= 46 && age <= 65) {
|
} else if (age >= 46 && age <= 65) {
|
||||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) {
|
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年或长期')
|
return this.$toast('46周岁~65周岁的证件有效期为20年或长期')
|
||||||
}
|
}
|
||||||
//年龄在65周岁以上
|
//年龄在65周岁以上
|
||||||
} else if (age > 65) {
|
} else if (age > 65) {
|
||||||
if (this.userInfo.effectiveDateType == false) {
|
if (this.userInfo.effectiveDateType == false) {
|
||||||
this.userInfo.certiexpiredate = ''
|
|
||||||
this.$refs.certiexpiredate.date = ''
|
|
||||||
return this.$toast('65周岁以上的证件有效期为长期')
|
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') {
|
} else if (this.userInfo.idType == '2') {
|
||||||
if (age > 16) {
|
if (age > 16) {
|
||||||
@@ -1626,10 +1527,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.insured-info-container {
|
.insured-info-container {
|
||||||
/deep/.van-checkbox {
|
/deep/.van-checkbox {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
@@ -1639,5 +1540,5 @@ export default {
|
|||||||
.isNewPeopleFlagTipClass{
|
.isNewPeopleFlagTipClass{
|
||||||
margin-top: 45px;line-height: 24px;text-indent: 2em;letter-spacing: 1px;padding: 2px 10px;
|
margin-top: 45px;line-height: 24px;text-indent: 2em;letter-spacing: 1px;padding: 2px 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -479,27 +479,27 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Field, CellGroup, Checkbox, Popup, Picker, Area, Dialog, RadioGroup, Radio} from 'vant'
|
import {Field, CellGroup, Checkbox, Popup, Picker, Area, Dialog, RadioGroup, Radio} from 'vant'
|
||||||
import SelectRadio from '@/components/ebiz/SelectRadio'
|
import SelectRadio from '@/components/ebiz/SelectRadio'
|
||||||
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
||||||
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
||||||
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
|
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
|
||||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||||
import areaList from '@/assets/js/utils/areaForSale'
|
import areaList from '@/assets/js/utils/areaForSale'
|
||||||
import areaLists from '@/assets/js/utils/areaNewForSale'
|
import areaLists from '@/assets/js/utils/areaNewForSale'
|
||||||
import countCredentialValidity from '@/assets/js/utils/countCredentialValidity'
|
import countCredentialValidity from '@/assets/js/utils/countCredentialValidity'
|
||||||
import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail } from '@/api/ebiz/sale/sale'
|
import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||||
import utilsAge from '@/assets/js/utils/age'
|
import utilsAge from '@/assets/js/utils/age'
|
||||||
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
||||||
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
||||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||||
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
|
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
|
||||||
import { idToData } from './js/verification'
|
import { idToData } from './js/verification'
|
||||||
import { selectComp, getIdentityInfo } from './js/methods'
|
import { selectComp, getIdentityInfo } from './js/methods'
|
||||||
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
||||||
import SearchField from '@/components/common/SearchField'
|
import SearchField from '@/components/common/SearchField'
|
||||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'insuredInfo',
|
name: 'insuredInfo',
|
||||||
components: {
|
components: {
|
||||||
[SelectRadio.name]: SelectRadio,
|
[SelectRadio.name]: SelectRadio,
|
||||||
@@ -2040,7 +2040,7 @@ export default {
|
|||||||
async 'withRootUser.value'(n) {
|
async 'withRootUser.value'(n) {
|
||||||
const orderNo = this.$route.query.orderNo
|
const orderNo = this.$route.query.orderNo
|
||||||
if (n && orderNo) {
|
if (n && orderNo) {
|
||||||
const rs = await getOrderDetail({ orderNo: orderNo});
|
const rs = await getOrderDetail({ orderNo: orderNo})
|
||||||
this.homeName = getAreaName([
|
this.homeName = getAreaName([
|
||||||
{ code: rs.orderDTO.appntDTO.homeProvince },
|
{ code: rs.orderDTO.appntDTO.homeProvince },
|
||||||
{ code: rs.orderDTO.appntDTO.homeCity },
|
{ code: rs.orderDTO.appntDTO.homeCity },
|
||||||
@@ -2062,10 +2062,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.insured-person-container {
|
.insured-person-container {
|
||||||
.title {
|
.title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
border-bottom: 1px solid #ebedf0;
|
border-bottom: 1px solid #ebedf0;
|
||||||
@@ -2080,5 +2080,5 @@ export default {
|
|||||||
.isNewPeopleFlagTipClass{
|
.isNewPeopleFlagTipClass{
|
||||||
margin-top: 45px;line-height: 24px;text-indent: 2em;letter-spacing: 1px;padding: 2px 10px;
|
margin-top: 45px;line-height: 24px;text-indent: 2em;letter-spacing: 1px;padding: 2px 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user