产品信息
-
@@ -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])
}
})