From 530e009fc5df492b2c5d3eaef903f5b4732aeee6 Mon Sep 17 00:00:00 2001
From: liyuetong
Date: Mon, 17 May 2021 18:16:17 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/ebiz/cardList/information.vue | 94 +-
src/views/ebiz/cardList/information01.vue | 1752 ++++++++++++++++++++
src/views/ebiz/cardList/informationOld.vue | 1598 ++++++++++++++++++
3 files changed, 3398 insertions(+), 46 deletions(-)
create mode 100644 src/views/ebiz/cardList/information01.vue
create mode 100644 src/views/ebiz/cardList/informationOld.vue
diff --git a/src/views/ebiz/cardList/information.vue b/src/views/ebiz/cardList/information.vue
index 821d4797c..7b93c14a8 100644
--- a/src/views/ebiz/cardList/information.vue
+++ b/src/views/ebiz/cardList/information.vue
@@ -423,7 +423,9 @@ import Vue from 'vue'
import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant'
DataDictionary.relationToAppnt = DataDictionary.relationToAppnt.slice(0, 4)
Vue.use(Checkbox).use(CheckboxGroup)
-Vue.use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton)
+Vue.use(GoodsAction)
+ .use(GoodsActionIcon)
+ .use(GoodsActionButton)
export default {
name: 'insuredInfo',
components: {
@@ -440,7 +442,7 @@ export default {
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[IdentityCardScan.name]: IdentityCardScan,
- OccupationForLoop,
+ OccupationForLoop
},
data() {
return {
@@ -458,26 +460,26 @@ export default {
sexRadio: [
{
label: '男',
- value: '0',
+ value: '0'
},
{
label: '女',
- value: '1',
- },
+ value: '1'
+ }
],
medicalRadio: [
{
label: '有',
- value: '0',
+ value: '0'
},
{
label: '无',
- value: '1',
- },
+ value: '1'
+ }
],
maxDate: beforeDate.getBeforeYear(18), //投保人出生日期可选最大值
insuredMaxDate: beforeDate.getBeforeDays(28), //被保人出生日期可选最大值
- filterMaxDate:beforeDate.getBeforeYear(-2),
+ filterMaxDate: beforeDate.getBeforeYear(-2),
popupShow: false,
areaShow: false, //省级联动
homeShow: false, //家庭地址联动
@@ -511,7 +513,7 @@ export default {
homeName: '', //联系地址
homeAddress: '', //详细地址
mobile: '', //移动电话
- email: '', //电子邮箱
+ email: '' //电子邮箱
// effectiveDate: '' //指定生效日期
},
//被保人信息
@@ -533,7 +535,7 @@ export default {
homeName: '', //联系地址
homeAddress: '', //详细地址
mobile: '', //移动电话
- email: '', //电子邮箱
+ email: '' //电子邮箱
},
selectUser: '',
areaList: areaList,
@@ -550,7 +552,7 @@ export default {
areaCode: '450101',
occupationCode: '',
occupationName: '',
- itemProductDTOS: JSON.parse(CacheUtils.getLocItem('itemProductDTOS')), //
+ itemProductDTOS: JSON.parse(CacheUtils.getLocItem('itemProductDTOS')) //
}
},
created() {
@@ -602,8 +604,8 @@ export default {
flag: 'navigation',
extra: {
title: '职业类别',
- hiddenRight: '1',
- },
+ hiddenRight: '1'
+ }
})
this.occupationShowPicker = false
if (this.insureType === '1') {
@@ -644,11 +646,11 @@ export default {
type: '1',
orderDTO: {
orderInfoDTO: {
- orderNo: orderNo,
- },
- },
+ orderNo: orderNo
+ }
+ }
}
- underWrite(data).then((res) => {
+ underWrite(data).then(res => {
if (res.result == '0') {
this.$toast.clear()
window.localStorage.setItem('underWriteData', JSON.stringify(res))
@@ -665,11 +667,11 @@ export default {
flag: 'h5',
extra: {
url: location.origin + `/#/cardList/pay`,
- forbidSwipeBack: 1,
+ forbidSwipeBack: 1
},
routerInfo: {
- path: `/cardList/pay`,
- },
+ path: `/cardList/pay`
+ }
})
} else {
window.localStorage.setItem('uwResult', res.uwResult)
@@ -678,11 +680,11 @@ export default {
flag: 'h5',
extra: {
url: location.origin + '/#/cardList/result',
- backToFirst: '1',
+ backToFirst: '1'
},
routerInfo: {
- path: '/cardList/result',
- },
+ path: '/cardList/result'
+ }
})
}
return true
@@ -701,11 +703,11 @@ export default {
extra: {
title: name,
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码
- url: location.origin + '/#/cardList/ShowPDF',
+ url: location.origin + '/#/cardList/ShowPDF'
},
routerInfo: {
- path: '/cardList/ShowPDF',
- },
+ path: '/cardList/ShowPDF'
+ }
})
},
//监听名字变化
@@ -754,8 +756,8 @@ export default {
flag: 'navigation',
extra: {
title: '投被保人信息',
- hiddenRight: '1',
- },
+ hiddenRight: '1'
+ }
})
if (this.currentPopupIndex == 1) {
if (this.selectUser == '1') {
@@ -786,7 +788,7 @@ export default {
} else if (pickerType == '4') {
this.columns = [
{ id: 0, text: '有' },
- { id: 1, text: '无' },
+ { id: 1, text: '无' }
]
} else if (pickerType == '5') {
this.columns = DataDictionary.taxIdentity
@@ -807,16 +809,16 @@ export default {
this.pickerIndex = this.insuredInfo.nativeplace - 1 > 0 ? this.insuredInfo.nativeplace - 1 : 0
} else if (pickerType == '10') {
this.columns = []
- this.trialList.forEach((item) => {
+ this.trialList.forEach(item => {
if (item.productCode === 'GFRS_M0022') {
this.columns.push({
id: this.proSchemeCode,
- text: this.proScheme,
+ text: this.proScheme
})
} else {
this.columns.push({
id: item.proSchemeCode,
- text: item.proScheme,
+ text: item.proScheme
})
}
})
@@ -1010,8 +1012,8 @@ export default {
flag: 'navigation',
extra: {
title: '投被保人信息',
- hiddenRight: '1',
- },
+ hiddenRight: '1'
+ }
})
if (this.selectUser == '0') {
let { customerName, customerSex } = data
@@ -1088,7 +1090,7 @@ export default {
if (this.userInfo.relationToInsured == 1) {
Object.assign(this.insuredInfo, this.userInfo)
}
- this.$validator.validate().then((valid) => {
+ this.$validator.validate().then(valid => {
if (true === valid) {
// localStorage.chooseProductCodesNew = localStorage.chooseProductCodes
//投保人校验
@@ -1349,11 +1351,11 @@ export default {
orderDTO: {
orderInfoDTO: {
bnfFlag: '0',
- supportBank: '0',
+ supportBank: '0'
},
appntDTO: this.userInfo,
- insuredDTOs: [this.insuredInfo],
- },
+ insuredDTOs: [this.insuredInfo]
+ }
}
//组装险种提交数据
@@ -1380,7 +1382,7 @@ export default {
proScheme: this.proScheme,
proSchemeCode: this.proSchemeCode,
insuYear: insuYearDate.insuYear,
- insuYearFlag: insuYearDate.insuYearFlag,
+ insuYearFlag: insuYearDate.insuYearFlag
}
if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') {
//增加万能险 预计转入保费校验
@@ -1515,7 +1517,7 @@ export default {
this.insuredInfo.birthday = idToData(val).birthday
this.insuredInfo.sex = idToData(val).sex
}
- },
+ }
},
// beforeDestroy() {
// //清理计时器
@@ -1550,7 +1552,7 @@ export default {
homeName: '', //联系地址
homeAddress: '', //详细地址
mobile: '', //移动电话
- email: '', //电子邮箱
+ email: '' //电子邮箱
}
if (newV === 2) {
this.userInfo.sex === '0' ? (this.insuredInfo.sex = '1') : (this.insuredInfo.sex = '0')
@@ -1558,7 +1560,7 @@ export default {
}
},
immediate: true,
- deep: true,
+ deep: true
},
'userInfo.sex': {
handler(newV) {
@@ -1567,9 +1569,9 @@ export default {
}
},
immediate: true,
- deep: true,
- },
- },
+ deep: true
+ }
+ }
}
diff --git a/src/views/ebiz/cardList/informationOld.vue b/src/views/ebiz/cardList/informationOld.vue
new file mode 100644
index 000000000..7b93c14a8
--- /dev/null
+++ b/src/views/ebiz/cardList/informationOld.vue
@@ -0,0 +1,1598 @@
+
+
+
+
+ 投保人信息
+
+
+
+
+
+ 证件扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 被保人信息
+
+
+
+ 证件扫描
+
+
+
+
+
+
+
+
+
+
+
+
+ 被保人信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 受益人信息
+
+
+
产品信息
+
+
+
+
+
保险期间
+
+
+ {{ productDate }}
+
+
+
+
+
+
+
+ 总保费:{{ allPrice }}元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From dfe3655f3d17a725e34791ced3d6017414e19ff9 Mon Sep 17 00:00:00 2001
From: liyuetong
Date: Mon, 17 May 2021 19:32:22 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E5=8D=A1=E5=8D=95--=E6=8A=95=E8=A2=AB?=
=?UTF-8?q?=E4=BF=9D=E4=BA=BA=E6=B7=BB=E5=8A=A0=E8=BA=AB=E4=BB=BD=E8=AF=81?=
=?UTF-8?q?=E6=9C=89=E6=95=88=E6=AD=A2=E6=9C=9F=E5=92=8C=E6=98=AF=E5=90=A6?=
=?UTF-8?q?=E9=95=BF=E6=9C=9F=EF=BC=8C=E5=B9=B4=E6=94=B6=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/ebiz/cardList/information.vue | 188 ++++++++++++++++++++++--
1 file changed, 175 insertions(+), 13 deletions(-)
diff --git a/src/views/ebiz/cardList/information.vue b/src/views/ebiz/cardList/information.vue
index 7b93c14a8..c464e9930 100644
--- a/src/views/ebiz/cardList/information.vue
+++ b/src/views/ebiz/cardList/information.vue
@@ -40,6 +40,21 @@
>
证件扫描
+
+
+ 长期
+
+
证件扫描
+
+
+ 长期
+
+
+
+
+ 长期
+
-
+
+
= 45)
- // }
+ //身份证以外的证件类型可以使用长期
+ //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)
+ }
+ }
this.userInfo.idType = value.id
} else if (this.pickerType == '3') {
this.userInfo.degree = value.id
@@ -870,6 +980,16 @@ export default {
}
}
} else if (this.pickerType == '22') {
+ //身份证以外的证件类型可以使用长期
+ //value.id 1 居民身份证 todo
+ if (value.id != '1') {
+ this.effectiveDateTypeAbleInsured = false
+ } else {
+ if (this.userInfo.birthday) {
+ let age = utilsAge.getAge(this.userInfo.birthday, new Date())
+ this.effectiveDateTypeAbleInsured = !(age >= 45)
+ }
+ }
this.insuredInfo.idType = value.id
}
},
@@ -906,6 +1026,7 @@ export default {
this.$refs.certiexpiredate.date = ''
return
}
+ this.userInfo.effectiveDateType = false
//如果录入日期早于当前日期
if (Date.parse(val) < Date.parse(new Date())) {
this.userInfo.certiexpiredate = ''
@@ -994,6 +1115,26 @@ 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
}
},
//选择客户
@@ -1183,9 +1324,19 @@ export default {
console.log('证件号码校验有误')
return this.$toast('您填写的证件号码有误')
}
-
+ if (age < 46 && this.userInfo.effectiveDateType == true) {
+ return this.$toast('证件有效期错误,年龄小于46周岁的公民身份证有效期不能为长期')
+ }
// 年龄在 16-25 周岁之间
- if (age >= 16 && age <= 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 = ''
@@ -1249,14 +1400,25 @@ export default {
console.log('证件号码校验有误')
return this.$toast('您填写的证件号码有误')
}
+ if (age < 46 && this.insuredInfo.effectiveDateType == true) {
+ return this.$toast('证件有效期错误,年龄小于46周岁的公民身份证有效期不能为长期')
+ }
// 年龄在 16-25 周岁之间
- if (insuredAge >= 16 && insuredAge <= 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.effectiveDateTypeAble = true
+ this.certiexpiredateRequiredInsured = true
return this.$toast('证件有效期不正常,16周岁至25周岁公民身份证有效期应小于等于10年')
}
//年龄在 26-45 周岁之间
@@ -1264,7 +1426,7 @@ export default {
if (Date.parse(this.insuredInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1990-01-01')) {
this.insuredInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
- this.effectiveDateTypeAble = true
+ this.certiexpiredateRequiredInsured = true
return this.$toast('证件有效期不正常,26周岁至45周岁公民身份证有效期应小于等于20年')
}
}
From 4a22d12f4197ed8ce8142d9c6c94f2989cc49827 Mon Sep 17 00:00:00 2001
From: liyuetong
Date: Mon, 17 May 2021 21:28:03 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=8A=95=E8=A2=AB=E4=BF=9D=E4=BA=BA--?=
=?UTF-8?q?=E5=A6=82=E6=9E=9C=E8=AF=81=E4=BB=B6=E6=A0=A1=E9=AA=8C=E4=B8=8D?=
=?UTF-8?q?=E9=80=9A=E8=BF=87,=E6=81=A2=E5=A4=8D=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E5=80=BC=EF=BC=8C=E9=80=89=E6=8B=A9=E5=AE=A2=E6=88=B7--?=
=?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=B9=B4=E9=BE=84=EF=BC=8C=E9=95=BF=E6=9C=9F?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=E6=98=AF=E5=90=A6=E7=A6=81=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/ebiz/cardList/information.vue | 29 +++++++++++++++----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/src/views/ebiz/cardList/information.vue b/src/views/ebiz/cardList/information.vue
index c464e9930..c9c32a8b5 100644
--- a/src/views/ebiz/cardList/information.vue
+++ b/src/views/ebiz/cardList/information.vue
@@ -1166,6 +1166,11 @@ export default {
this.userInfo.idType = data.customerIdType //证件类型
this.userInfo.idNo = data.customerIdNumber //证件类别
}
+ if (data.idEffectEndDate == '9999-01-01') {
+ this.userInfo.effectiveDateType = true //是否长期
+ } else {
+ this.userInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
+ }
this.userInfo.email = data.email //邮箱
this.userInfo.mobile = data.customerPhone //移动电话
@@ -1182,10 +1187,10 @@ export default {
this.userInfo.healthGrade = data.healthGrade
this.userInfo.nativeplace = data.country
this.userInfo.marriage = data.marryStatus
-
// 计算年龄
- // let age = utilsAge.getAge(this.userInfo.birthday, new Date())
-
+ let age = utilsAge.getAge(this.userInfo.birthday, new Date())
+ // 长期按钮是否禁用
+ this.effectiveDateTypeAble = age <= 45
this.getRelatedData(this.userInfo.idNo, '1')
} else if (this.selectUser == '1') {
let { customerName, customerSex } = data
@@ -1197,7 +1202,11 @@ export default {
this.insuredInfo.idType = data.customerIdType //证件类型
this.insuredInfo.idNo = data.customerIdNumber //证件类别
}
-
+ if (data.idEffectEndDate == '9999-01-01') {
+ this.insuredInfo.effectiveDateType = true //是否长期
+ } else {
+ this.insuredInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
+ }
this.insuredInfo.email = data.email //邮箱
this.insuredInfo.mobile = data.customerPhone //移动电话
this.insuredInfo.homeProvince = data.homeProvince //家庭省
@@ -1214,11 +1223,9 @@ export default {
this.insuredInfo.nativeplace = data.country
this.insuredInfo.marriage = data.marryStatus
// 计算年龄
- // let age = utilsAge.getAge(this.userInfo.birthday, new Date())
-
- // 计算年龄
- // let age = utilsAge.getAge(this.userInfo.birthday, new Date())
-
+ let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
+ // 长期按钮是否禁用
+ this.effectiveDateTypeAbleInsured = age <= 45
this.getRelatedData(this.insuredInfo.idNo, '2')
}
// console.log(data, val)
@@ -1661,7 +1668,7 @@ export default {
}
//如果证件校验不通过,恢复默认值
if (idToData(val).text) {
- ;[this.userInfo.idNo, this.userInfo.sex, this.userInfo.birthday] = ['', '0', '']
+ ;[this.userInfo.idNo, this.userInfo.sex, this.userInfo.birthday, this.effectiveDateTypeAble] = ['', '0', '', false]
return this.$toast(idToData(val).text)
}
this.userInfo.birthday = idToData(val).birthday
@@ -1673,7 +1680,7 @@ export default {
}
//如果证件校验不通过,恢复默认值
if (idToData(val).text) {
- ;[this.insuredInfo.idNo, this.insuredInfo.sex, this.insuredInfo.birthday] = ['', '0', '']
+ ;[this.insuredInfo.idNo, this.insuredInfo.sex, this.insuredInfo.birthday, this.effectiveDateTypeAbleInsured] = ['', '0', '', false]
return this.$toast(idToData(val).text)
}
this.insuredInfo.birthday = idToData(val).birthday