mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 05:16:44 +08:00
feature/GFRS-2301【需求】健康险渠道国富无忧卡金掌桂开发的需求--验证被投保人与投保人信息校验,添加身份证类型选择--提交人庞兴月
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
<div class="pay">
|
||||
<div v-if="!isScan">
|
||||
<van-cell-group>
|
||||
<van-field v-model="underWriteData.riskName" type="textarea" autosize readonly label="产品名称" class="projuct" />
|
||||
<van-field v-model="underWriteData.schemeName" readonly label="保障方案" class="projuct" />
|
||||
<van-field v-if="!isWeixin" v-model="underWriteData.appntName" readonly label="投保人姓名" class="projuct" />
|
||||
<van-field v-if="!isWeixin" v-model="underWriteData.insuredName" readonly label="被保人姓名" class="projuct" />
|
||||
<van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
|
||||
<van-field v-model="underWriteData.riskName" type="textarea" autosize readonly label="产品名称:" class="projuct" />
|
||||
<van-field v-model="underWriteData.schemeName" readonly label="保障方案:" class="projuct" />
|
||||
<van-field v-if="!isWeixin" v-model="underWriteData.appntName" readonly label="投保人姓名:" class="projuct" />
|
||||
<van-field v-if="!isWeixin" v-model="underWriteData.insuredName" readonly label="被保人姓名:" class="projuct" />
|
||||
<van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额:" />
|
||||
</van-cell-group>
|
||||
<!-- 银行卡支付开始 -->
|
||||
<!-- <div class="money">
|
||||
|
||||
@@ -42,15 +42,13 @@
|
||||
required :parentShowPicker.sync="customerShowPicker2" v-model="insuredInfo.name" @nameChange="nameChanges"
|
||||
@on-click="selectClick('1', '1')"></customer-picker>
|
||||
<van-field :value="insuredInfo.idType | idToText('insuredIdType')" v-validate="'required'" readonly required
|
||||
@click="toSelect('22')" label="证件类型" name="证件类型" right-icon="arrow" placeholder="请选择" />
|
||||
|
||||
|
||||
@click="toSelect('22')" label="证件类型" name="证件类型" right-icon="arrow" placeholder="请选择" />
|
||||
<van-field v-model="insuredInfo.idNo" maxlength="18" required label="证件号码" v-validate="'required'" name="证件号码"
|
||||
placeholder="请输入" clearable @blur="getRelatedData(insuredInfo.idNo, '2')">
|
||||
<van-button v-if="insuredInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3','','2')">证件扫描</van-button>
|
||||
</van-field>
|
||||
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="insuredInfo.sex"></select-radio>
|
||||
<FieldDatePicter v-validate="'required'" label="出生日期" name="出生日期" required :value.sync="insuredInfo.birthday"
|
||||
<FieldDatePicter label="出生日期" name="出生日期" required :value.sync="insuredInfo.birthday"
|
||||
type="date" :flag="true" @confirm="onDateConfirm($event, '5')" ref="insuredBirthday" :maxDate="insuredMaxDate"></FieldDatePicter>
|
||||
<van-field required v-model="insuredInfo.mobile" clearable label="手机号码" name="手机号码" placeholder="请输入" v-validate="'required|mobile'"
|
||||
maxlength="11" />
|
||||
@@ -59,28 +57,21 @@
|
||||
<van-field required @click="openOccupation('2')" label="职业类别" placeholder="请输入" name="职业类别" :value="insuredInfo.occupationName"
|
||||
right-icon="arrow" />
|
||||
<van-field :value="insuredInfo.nativeplace | idToText('nativeplace')" readonly required label="国籍" name="国籍"
|
||||
v-validate="'required'" right-icon="arrow" placeholder="请选择" @click="toSelect('11')" />
|
||||
right-icon="arrow" placeholder="请选择" @click="toSelect('11')" />
|
||||
<van-field :value="insuredInfo.marriage | idToText('marriage')" readonly required label="婚姻状况" name="婚姻状况"
|
||||
v-validate="'required'" right-icon="arrow" placeholder="请选择" @click="toSelect('66')" />
|
||||
right-icon="arrow" placeholder="请选择" @click="toSelect('66')" />
|
||||
<van-field v-model="insuredInfo.homeName" readonly label="联系地址" name="联系地址" required right-icon="arrow"
|
||||
placeholder="请选择" v-validate="'required'" @click="areaSelect('2')" />
|
||||
<van-field v-model="insuredInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" v-validate="'required'"
|
||||
clearable maxlength="30" />
|
||||
placeholder="请选择" @click="areaSelect('2')" />
|
||||
<van-field v-model="insuredInfo.homeAddress" label name="详细地址" placeholder="请输入详细地址" clearable maxlength="30" />
|
||||
</van-cell-group>
|
||||
<van-cell-group class="mt10" v-else>
|
||||
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">被保人信息</p>
|
||||
<customer-picker v-validate="'required|name'" name="被保险人姓名" label="被保险人姓名" required readonly :value.sync="userInfo.name"></customer-picker>
|
||||
<!-- @on-choose="chooseCustomer(arguments)" -->
|
||||
<!-- :parentShowPicker.sync="customerShowPicker2" -->
|
||||
<!-- @nameChange="nameChanges" -->
|
||||
<!-- @on-click="selectClick('1', '1')" -->
|
||||
|
||||
<van-field :value="userInfo.idType | idToText('insuredIdType')" v-validate="'required'" readonly required label="证件类型"
|
||||
name="证件类型" right-icon="arrow" placeholder="请选择" />
|
||||
<van-field v-model="userInfo.idNo" maxlength="18" required readonly label="证件号码" v-validate="'required'" name="证件号码"
|
||||
placeholder="请输入" clearable>
|
||||
<!-- @blur="getRelatedData(insuredInfo.idNo, '2')" -->
|
||||
<!-- <van-button v-if="userInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3')">证件扫描</van-button> -->
|
||||
</van-field>
|
||||
placeholder="请输入" clearable />
|
||||
<select-radio required :disabled="true" :radios="sexRadio" label="性别" name="性别" v-validate="'required'"
|
||||
:value.sync="userInfo.sex"></select-radio>
|
||||
<FieldDatePicter v-validate="'required'" label="出生日期" name="出生日期" readonly required :value.sync="userInfo.birthday"
|
||||
@@ -107,7 +98,7 @@
|
||||
<p style="background: white; border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">产品信息</p>
|
||||
<van-field :value="proScheme" readonly required label="保障方案" name="保障方案" v-validate="'required'" right-icon="arrow"
|
||||
placeholder="请选择" @click="toSelect('10')" />
|
||||
<FieldDatePicter v-validate="'required'" label="指定生效日期" name="指定生效日期" required :minDate="now" :value.sync="cvaliDate"
|
||||
<FieldDatePicter label="指定生效日期" name="指定生效日期" required :minDate="now" :value.sync="cvaliDate"
|
||||
type="date" :flag="true" @confirm="onDateConfirm($event, '6')" ref="effectiveDate" input-align:right>
|
||||
</FieldDatePicter>
|
||||
<div v-if="cvaliDate.length > 0" class="van-cell van-field" style="border-bottom: 1px solid rgb(235, 237, 240);">
|
||||
@@ -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])
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user