【fix】 调整卡单投保页面字段顺序,eslint校验的error进行修复

This commit is contained in:
tian.guangyuan
2020-04-27 13:44:02 +08:00
parent 1c738e931e
commit 8aab49d990
5 changed files with 35 additions and 65 deletions

View File

@@ -272,8 +272,6 @@ export default {
},
computed: {
NewItems() {
let _this = this
// console.log(_this)
var NewItems = []
this.orderList.map(function(orderItem) {
let currentTime = '',

View File

@@ -23,7 +23,6 @@
name="姓名"
:readonly="orderStatus != '56'"
placeholder="请输入"
readonly
v-validate="'required|name'"
maxlength="6"
clearable
@@ -320,7 +319,7 @@ export default {
},
// 获取银行列表的focus
focus() {
if(this.orderStatus == '56'){
if (this.orderStatus == '56') {
this.show = true
}
},
@@ -418,12 +417,12 @@ export default {
},
async pay() {
let valid = await this.$validator.validate()
console.log(valid);
if(true !== valid){
console.log(this.$validator);
console.log(valid)
if (true !== valid) {
console.log(this.$validator)
return this.$toast(this.$validator.errors.all()[0])
}
switch (this.orderStatus) {
case '56':
this.payMent()
@@ -527,15 +526,15 @@ export default {
})
let rs = await this.underWrite()
if (rs.result != '0') {
this.$toast.clear()
return this.$toast(rs.resultMessage)
}
if(rs.uwResult != '02'){
if (rs.uwResult != '02') {
return this.$toast(rs.resultMessage)
}else{
} else {
this.acceptInsurance()
}
} else {

View File

@@ -31,7 +31,7 @@ Vue.use(Field)
export default {
name: 'paySuccess',
components: {
[CellGroup.name]: CellGroup,
[CellGroup.name]: CellGroup
},
data() {
return {
@@ -56,7 +56,7 @@ export default {
}
},
created() {
this.payInfo = JSON.parse( window.localStorage.getItem('payInfo'))
this.payInfo = JSON.parse(window.localStorage.getItem('payInfo'))
},
methods: {
goHome() {
@@ -70,7 +70,7 @@ export default {
}
})
}
},
}
}
</script>

View File

@@ -105,19 +105,6 @@
@nameChange="nameChanges"
@on-click="selectClick('1', '1')"
></customer-picker>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.insuredSex"></select-radio>
<FieldDatePicter
v-validate="'required'"
label="出生日期"
name="出生日期"
required
:value.sync="insuredInfo.birthday"
type="date"
:flag="true"
@confirm="onDateConfirm($event, '5')"
ref="insuredBirthday"
:maxDate="insuredMaxDate"
></FieldDatePicter>
<van-field
:value="insuredInfo.idType | idToText('insuredIdType')"
v-validate="'required'"
@@ -143,6 +130,19 @@
>
<van-button v-if="insuredInfo.idType == 1" slot="button" size="small" type="danger" round @click="selectClick('3')">证件扫描</van-button>
</van-field>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.insuredSex"></select-radio>
<FieldDatePicter
v-validate="'required'"
label="出生日期"
name="出生日期"
required
:value.sync="insuredInfo.birthday"
type="date"
:flag="true"
@confirm="onDateConfirm($event, '5')"
ref="insuredBirthday"
:maxDate="insuredMaxDate"
></FieldDatePicter>
</van-cell-group>
<van-cell-group class="mt10" v-else>
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">被保人信息</p>
@@ -151,8 +151,6 @@
<!-- :parentShowPicker.sync="customerShowPicker2" -->
<!-- @nameChange="nameChanges" -->
<!-- @on-click="selectClick('1', '1')" -->
<select-radio required :disabled="true" :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.sex"></select-radio>
<!-- @confirm="onDateConfirm($event, '5')" -->
<van-field
:value="userInfo.idType | idToText('insuredIdType')"
v-validate="'required'"
@@ -163,8 +161,6 @@
right-icon="arrow"
placeholder="请选择"
/>
<!-- @click="toSelect('11')" -->
<van-field
v-model="userInfo.idNo"
maxlength="18"
@@ -179,6 +175,7 @@
<!-- @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>
<select-radio required :disabled="true" :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.sex"></select-radio>
<FieldDatePicter
v-validate="'required'"
label="出生日期"
@@ -216,12 +213,8 @@
<van-checkbox-group v-model="result" ref="checkboxGroup" style="box-sizing:border-box;" class="pl8 pr20 pt10 pb10 bg-white">
<van-checkbox name="a" shape="square" icon-size="13px"
>本人已仔细阅读并了解
<span class="blue" @click.stop="goDocu('http://139.199.50.151:8000/app/product/GFRS_M0022/M0022Notice.pdf', '短期交通卡投保须知')"
>投保须知</span
>
<span class="blue" @click.stop="goDocu('http://139.199.50.151:8000/app/product/GFRS_M0022/M0022Explain.pdf', '短期交通卡投保声明')"
>投保声明</span
>
<span class="blue" @click.stop="goDocu('http://139.199.50.151:8000/app/product/GFRS_M0022/M0022Notice.pdf', '短期交通卡投保须知')">投保须知</span>
<span class="blue" @click.stop="goDocu('http://139.199.50.151:8000/app/product/GFRS_M0022/M0022Explain.pdf', '短期交通卡投保声明')">投保声明</span>
<span class="blue" @click.stop="goDocu('http://139.199.50.151:8000/app/product/GFRS_M0022/M0022.pdf', '国富人寿综合交通意外保险2020')"
>国富人寿综合交通工具意外伤害保险2020条款</span
@@ -284,7 +277,7 @@ import idNoCheck from '@/assets/js/utils/idNoCheck'
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
import afterDate from '@/assets/js/utils/getAfterDate.js'
import { idToData } from './js/verification'
import { selectComp } from './js/methods'
import { selectComp, getIdentityInfo } from './js/methods'
import Vue from 'vue'
import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant'
DataDictionary.relationToAppnt = DataDictionary.relationToAppnt.slice(0, 4)
@@ -828,14 +821,14 @@ export default {
if (insuredAge < 7 && this.userInfo.relationToInsured != '3') {
return this.$toast('0-7岁未成年人须由其父母投保请确定')
}
if(insuredAge > 75){
if (insuredAge > 75) {
return this.$toast('被保险人的年龄不可以超过75周岁')
}
if(insuredAge < 0){
if (insuredAge < 0) {
return this.$toast('被保险人的年龄需要大于28天')
}
//如果证件类型是身份证
if (this.insuredInfo.idType == '1') {
console.log('证件类型是身份证')
@@ -903,15 +896,11 @@ export default {
}
}
//投保人需大于等于 18 周岁
// if (age < 18) {
// return this.$toast('投保人必须是具有民事行为能力且有固定职业和收入的自然人,请确定')
// }
this.infoUpdate()
// console.log('success')
} else {
@@ -953,7 +942,7 @@ export default {
// }
this.save()
},
async save(str = '') {
async save() {
// console.log('this.riskDTOLst', this.riskDTOLst)
let params = {
orderDTO: {
@@ -1137,7 +1126,7 @@ export default {
// },
watch: {
'userInfo.relationToInsured': {
handler(newV, oldV) {
handler(newV) {
// 如果关系为本人,将投保人信息带入到被保人信息上
if (newV == 1) {
Object.assign(this.insuredInfo, this.userInfo)

View File

@@ -20,10 +20,6 @@
</template>
<script>
import Vue from 'vue'
import icon1 from '@/assets/images/u10211.jpg'
import icon2 from '@/assets/images/u10213.png'
import icon3 from '@/assets/images/u10215.png'
import { Cell, Toast } from 'vant'
import { getProductDetails, getProductInfo, insureTrial } from '@/api/ebiz/cardList/cardList.js'
export default {
@@ -79,18 +75,6 @@ export default {
// }
// })
},
//点击跳转到pdf展示页
handleClick(url) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/cardList/ShowPDF'
},
routerInfo: {
path: '/cardList/ShowPDF'
}
})
},
gotoInformation() {
this.$jump({
flag: 'h5',