mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 19:06:43 +08:00
【关于户口本证件有效期规则】获取被保人年龄,16减去被保人年龄加上当前年份
This commit is contained in:
@@ -271,7 +271,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
appntDateLabel:'', //订单创建时间
|
|
||||||
nameLimit: false,
|
nameLimit: false,
|
||||||
idNoLimit: false,
|
idNoLimit: false,
|
||||||
birthdayLimit: false,
|
birthdayLimit: false,
|
||||||
@@ -359,17 +358,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.Insured = false
|
this.Insured = false
|
||||||
}
|
}
|
||||||
const orderNo = this.$CacheUtils.getLocItem('orderNo')
|
|
||||||
if (orderNo) {
|
|
||||||
getOrderDetail({ orderNo: orderNo }).then((res) => {
|
|
||||||
if (res.result == 0) {
|
|
||||||
// 获取订单创建时间
|
|
||||||
this.appntDateLabel = res.orderDTO.orderInfoDTO.appntDateLabel
|
|
||||||
} else {
|
|
||||||
return this.$toast(res.resultMessage)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setCustomerMarriage(marriageCode) {
|
setCustomerMarriage(marriageCode) {
|
||||||
@@ -1093,7 +1081,17 @@ export default {
|
|||||||
this.userInfo.effectiveDateType = false
|
this.userInfo.effectiveDateType = false
|
||||||
this.effectiveDateTypeAble = idToData(val).age <= 45
|
this.effectiveDateTypeAble = idToData(val).age <= 45
|
||||||
this.userInfo.birthday = idToData(val).birthday
|
this.userInfo.birthday = idToData(val).birthday
|
||||||
this.userInfo.certiexpiredate = Number(this.appntDateLabel.substr(0,4))+16+'-'+ this.userInfo.birthday.substr(5,5)
|
// 获取当前年份
|
||||||
|
const currentYear = new Date().getFullYear()
|
||||||
|
if(this.userInfo.birthday.substr(5,5) == '02-29'){
|
||||||
|
// 获取某年某月一共多少天
|
||||||
|
let year = currentYear + Number(16-idToData(val).age)
|
||||||
|
let date = new Date(year, 2, 1)
|
||||||
|
let dayEnd = new Date(date.getTime() - 864e5).getDate()
|
||||||
|
this.userInfo.certiexpiredate = currentYear + Number(16-idToData(val).age)+'-02-'+ dayEnd
|
||||||
|
}else{
|
||||||
|
this.userInfo.certiexpiredate = currentYear + Number(16-idToData(val).age)+'-'+ this.userInfo.birthday.substr(5,5)
|
||||||
|
}
|
||||||
this.userInfo.sex = idToData(val).sex
|
this.userInfo.sex = idToData(val).sex
|
||||||
if (idToData(val).age > 45) {
|
if (idToData(val).age > 45) {
|
||||||
if (from) {
|
if (from) {
|
||||||
|
|||||||
@@ -461,7 +461,6 @@ 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'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -484,7 +483,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
appntDateLabel:'', //订单创建时间
|
|
||||||
isMarriageStatusShow: false,
|
isMarriageStatusShow: false,
|
||||||
withRootUser: {
|
withRootUser: {
|
||||||
load: false, //防止重复请求
|
load: false, //防止重复请求
|
||||||
@@ -615,8 +613,6 @@ export default {
|
|||||||
if (orderNo) {
|
if (orderNo) {
|
||||||
getOrderDetail({ orderNo: orderNo }).then((res) => {
|
getOrderDetail({ orderNo: orderNo }).then((res) => {
|
||||||
if (res.result == 0) {
|
if (res.result == 0) {
|
||||||
// 获取订单创建时间
|
|
||||||
this.appntDateLabel = res.orderDTO.orderInfoDTO.appntDateLabel
|
|
||||||
//投被同人
|
//投被同人
|
||||||
if (res.orderDTO.insuredDTOs.length && res.orderDTO.insuredDTOs[0].relationToAppnt == '1') {
|
if (res.orderDTO.insuredDTOs.length && res.orderDTO.insuredDTOs[0].relationToAppnt == '1') {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -1773,7 +1769,17 @@ export default {
|
|||||||
this.userInfo.effectiveDateType = false
|
this.userInfo.effectiveDateType = false
|
||||||
this.effectiveDateTypeAble = idToData(val).age <= 45
|
this.effectiveDateTypeAble = idToData(val).age <= 45
|
||||||
this.userInfo.birthday = idToData(val).birthday
|
this.userInfo.birthday = idToData(val).birthday
|
||||||
this.userInfo.certiexpiredate = Number(this.appntDateLabel.substr(0,4))+16+'-'+ this.userInfo.birthday.substr(5,5)
|
// 获取当前年份
|
||||||
|
const currentYear = new Date().getFullYear()
|
||||||
|
if(this.userInfo.birthday.substr(5,5) == '02-29'){
|
||||||
|
// 获取某年某月一共多少天
|
||||||
|
let year = currentYear + Number(16-idToData(val).age)
|
||||||
|
let date = new Date(year, 2, 1)
|
||||||
|
let dayEnd = new Date(date.getTime() - 864e5).getDate()
|
||||||
|
this.userInfo.certiexpiredate = currentYear + Number(16-idToData(val).age)+'-02-'+ dayEnd
|
||||||
|
}else{
|
||||||
|
this.userInfo.certiexpiredate = currentYear + Number(16-idToData(val).age)+'-'+ this.userInfo.birthday.substr(5,5)
|
||||||
|
}
|
||||||
this.userInfo.sex = idToData(val).sex
|
this.userInfo.sex = idToData(val).sex
|
||||||
//年龄小于18周岁,工作单位默认值为‘无’
|
//年龄小于18周岁,工作单位默认值为‘无’
|
||||||
if (idToData(val).age < 18) {
|
if (idToData(val).age < 18) {
|
||||||
|
|||||||
Reference in New Issue
Block a user