diff --git a/src/views/ebiz/proposal/Appnt.vue b/src/views/ebiz/proposal/Appnt.vue index 2a3d0ed6a..8183008ba 100644 --- a/src/views/ebiz/proposal/Appnt.vue +++ b/src/views/ebiz/proposal/Appnt.vue @@ -5,7 +5,7 @@ class="border-bottom" @nameChange="nameChange" @on-choose="chooseCustomer" - v-validate="'required'" + v-validate="'required|name'" :required="true" name="投保人" label="姓名" diff --git a/src/views/ebiz/proposal/InsuredPerson.vue b/src/views/ebiz/proposal/InsuredPerson.vue index d7042aef6..5b6c91915 100644 --- a/src/views/ebiz/proposal/InsuredPerson.vue +++ b/src/views/ebiz/proposal/InsuredPerson.vue @@ -8,7 +8,7 @@ class="border-bottom" @nameChange="nameChange" @on-choose="chooseCustomer" - v-validate="'required'" + v-validate="'required|name'" name="被保险人" required :readonly="disabled" @@ -338,17 +338,22 @@ export default { }) console.log('data == ', data) let { customerName, customerSex, birthday, customerPhone, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data - let age = getAge.getAge(data['birthday'], new Date()) + let age = '' + try { + age = getAge.getAge(data['birthday'], new Date()) + } catch (e) { + console.error(e) + } let insured = { mobile: customerPhone, - birthday, - sex: String(customerSex), + birthday: birthday, + sex: customerSex ? customerSex.toString() : '0', name: customerName, - occupationName, + occupationName: occupationName, age: age, - occupationCode, - lifeGrade, - healthGrade, + occupationCode: occupationCode, + lifeGrade: lifeGrade, + healthGrade: healthGrade, medical: socialSecurity ? socialSecurity : '0' } console.log('insured.age', insured.age)