From 7df1a61adbfb7e5a71020e272f314ecca1b5c12e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E5=85=B4=E6=9C=88?= <120277894@qq.com> Date: Thu, 8 Apr 2021 21:07:44 +0800 Subject: [PATCH] =?UTF-8?q?feature/GFRS-2301=E3=80=90=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E3=80=91=E5=81=A5=E5=BA=B7=E9=99=A9=E6=B8=A0=E9=81=93=E5=9B=BD?= =?UTF-8?q?=E5=AF=8C=E6=97=A0=E5=BF=A7=E5=8D=A1=E9=87=91=E6=8E=8C=E6=A1=82?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E7=9A=84=E9=9C=80=E6=B1=82--=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E8=A2=AB=E6=8A=95=E4=BF=9D=E4=BA=BA=E4=B8=8E=E6=8A=95?= =?UTF-8?q?=E4=BF=9D=E4=BA=BA=E4=BF=A1=E6=81=AF=E6=A0=A1=E9=AA=8C=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BA=AB=E4=BB=BD=E8=AF=81=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E9=80=89=E6=8B=A9--=E6=8F=90=E4=BA=A4=E4=BA=BA=E5=BA=9E?= =?UTF-8?q?=E5=85=B4=E6=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/cardList/Pay.vue | 10 +-- src/views/ebiz/cardList/information.vue | 94 ++++++++++++------------- 2 files changed, 50 insertions(+), 54 deletions(-) diff --git a/src/views/ebiz/cardList/Pay.vue b/src/views/ebiz/cardList/Pay.vue index 5aeaa38c4..d14a0ea6a 100644 --- a/src/views/ebiz/cardList/Pay.vue +++ b/src/views/ebiz/cardList/Pay.vue @@ -2,11 +2,11 @@
- - - - - + + + + + - - - + - - - + placeholder="请输入" clearable /> 产品信息

-
@@ -293,9 +284,9 @@ export default { occupationName: '', //职业名称 lifeGrade: '', //寿险等级 healthGrade: '', //健康等级 - nativeplace: '1', //国家地区 + nativeplace: '', //国家地区 marriageStatus: '', //婚姻状况 - homeProvince: '1', //家庭省 + homeProvince: '', //家庭省 homeCity: '', //家庭市 homeArea: '450101', //家庭区 homeName: '', //联系地址 @@ -741,32 +732,6 @@ export default { break } }, - GetNextMonthDay(date, monthNum) { - var dateArr = date.split('-') - var year = dateArr[0] //获取当前日期的年份 - var month = dateArr[1] //获取当前日期的月份 - var day = dateArr[2] //获取当前日期的日 - var days = new Date(year, month, 0) - days = days.getDate() //获取当前日期中的月的天数 - var year2 = year - var month2 = parseInt(month) + parseInt(monthNum) - if (month2 > 12) { - year2 = parseInt(year2) + parseInt(parseInt(month2) / 12 == 0 ? 1 : parseInt(month2) / 12) - month2 = parseInt(month2) % 12 - } - var day2 = day - var days2 = new Date(year2, month2, 0) - days2 = days2.getDate() - if (day2 > days2) { - day2 = days2 - } - if (month2 < 10) { - month2 = '0' + month2 - } - - var t2 = year2 + '年' + month2 + '月' + day2 + '日' - return t2 - }, //选择客户 chooseCustomer(data) { data = data[0] @@ -941,9 +906,41 @@ export default { } } } - //被保人校验 // 计算年龄 + if (!this.insuredInfo.name) { + return this.$toast('被保人姓名不能为空') + } + + if (!this.insuredInfo.idNo) { + return this.$toast('被保人证件号码不能为空') + } + + if (!this.insuredInfo.birthday) { + return this.$toast('被保人出生日期不能为空') + } + if (!this.insuredInfo.mobile) { + return this.$toast('被保人手机号不能为空') + } + if (!this.insuredInfo.email) { + return this.$toast('被保人邮箱不能为空') + } + if (!this.insuredInfo.occupationName) { + return this.$toast('被保人职业不能为空') + } + if (!this.insuredInfo.nativeplace) { + return this.$toast('被保人国籍不能为空') + } + if (!this.insuredInfo.marriageStatus) { + return this.$toast('被保人婚姻状况不能为空') + } + if (!this.insuredInfo.homeName) { + return this.$toast('被保人联系地址不能为空') + } + if (!this.insuredInfo.homeAddress) { + return this.$toast('被保人详细地址不能为空') + } + let insuredAge = utilsAge.getAge(this.insuredInfo.birthday, new Date()) console.log('计算年龄', insuredAge) // return @@ -1033,8 +1030,7 @@ export default { this.infoUpdate() // console.log('success') - } else { - console.log(this.$validator.errors.all(), '===================this.$validator.errors.all()') + } else { this.$toast(this.$validator.errors.all()[0]) } })