重新投保保存页面修改

This commit is contained in:
pangxingyue
2021-03-11 13:05:43 +08:00
parent f1370aa7c4
commit b3ecb19960
3 changed files with 74 additions and 54 deletions

View File

@@ -1,12 +1,20 @@
/*
* @Author: PangXingYue
* @Date: 2021-03-11 09:07:58
* @LastEditTime: 2021-03-11 09:15:54
* @LastEditors: PangXingYue
* @Description:
* @FilePath: \ebiz-h5\src\router\ebiz\insureAgain.js
*/
const InsureAgain = () => import('@/views/ebiz/insureAgain')
const UncommitInsureDetail = () => import('@/views/ebiz/insureAgain/UncommitInsureDetail')
const CommitInsureDetail = () => import('@/views/ebiz/insureAgain/CommitInsureDetail')
const InsureInformation = () => import('@/views/ebiz/insureAgain/InsureInformation')
const ProductInformation = () => import('@/views/ebiz/insureAgain/ProductInformation')
const Notification = () => import('@/views/ebiz/insureAgain/Notification')
const SignConfirmation = () => import('@/views/ebiz/insureAgain/SignConfirmation')
const InsureAgainPayment = () => import('@/views/ebiz/insureAgain/Payment')
const PaymentResult = () => import('@/views/ebiz/insureAgain/PaymentResult')
const UncommitInsureDetail = () => import('@/views/ebiz/insureAgain/uncommitInsureDetail')
const CommitInsureDetail = () => import('@/views/ebiz/insureAgain/commitInsureDetail')
const InsureInformation = () => import('@/views/ebiz/insureAgain/insureInformation')
const ProductInformation = () => import('@/views/ebiz/insureAgain/productInformation')
const Notification = () => import('@/views/ebiz/insureAgain/notification')
const SignConfirmation = () => import('@/views/ebiz/insureAgain/signConfirmation')
const InsureAgainPayment = () => import('@/views/ebiz/insureAgain/payment')
const PaymentResult = () => import('@/views/ebiz/insureAgain/paymentResult')
export default [
{

View File

@@ -195,7 +195,6 @@ export default {
if (window.localStorage.getItem('resMessage') != null) {
that.resMessage = window.localStorage.getItem('resMessage').replace(/\\n/g, '<br>')
}
this.paySeqNo = this.$route.query.RdSeq
if (!this.paySeqNo) {
this.$toast({ message: '参数错误缺少支付流水号RdSeq查询参数', duration: 5000 })

View File

@@ -9,9 +9,9 @@
<InfoCell label="证件类型">{{userInfo.idType | idToText('insuredIdType')}}</InfoCell>
<InfoCell label="出生日期">{{userInfo.birthday}}</InfoCell>
<InfoCell label="证件截止日期">{{userInfo.certiexpiredate}}</InfoCell>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="userInfo.sex"></select-radio>
<select-radio v-validate="'required'" label="性别" name="性别" required :radios="sexRadio" :value.sync="userInfo.sex" :disabled="true"></select-radio>
<InfoCell label="国籍">{{userInfo.nativeplace | idToText('nativeplace')}}</InfoCell>
<van-field :value="userInfo.marriageStatus" readonly required label="婚姻状况" name="婚姻状况" v-validate="'required'"
<van-field :value="userInfo.marriageStatus" required label="婚姻状况" name="婚姻状况" v-validate="'required'"
right-icon="arrow" placeholder="请选择" @click="toSelect('10','','appntDTO')" />
<InfoCell label="职业类别">{{userInfo.occupationCode}}</InfoCell>
<InfoCell label="移动电话">{{userInfo.mobile}}</InfoCell>
@@ -20,7 +20,7 @@
<van-button class="mr10" size="small" type="danger" round></van-button>
<van-button plain size="small" type="danger" round></van-button>
</InfoCell> -->
<select-radio :radios="medicalRadio" v-validate="'required'" label="有无社保" name="有无社保" required :value.sync="userInfo.medical"></select-radio>
<select-radio v-validate="'required'" :radios="medicalRadio" label="有无社保" name="有无社保" required :value.sync="userInfo.medical" :disabled="true"></select-radio>
<InfoCell label="税收居民身份">{{userInfo.taxResidentId | idToText('taxIdentity')}}</InfoCell>
<InfoCell label="联系地址">{{homeName}}</InfoCell>
<InfoCell label="详细联系地址">{{userInfo.homeAddress}}</InfoCell>
@@ -33,9 +33,9 @@
<InfoCell label="证件类型">{{userInfo.idType | idToText('idType')}}</InfoCell>
<InfoCell label="证件号码">{{insuredPersonInfo.idNo}}</InfoCell>
<InfoCell label="出生日期">{{insuredPersonInfo.birthday}}</InfoCell>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="insuredPersonInfo.sex"></select-radio>
<select-radio required :radios="sexRadio" label="性别" name="性别" v-validate="'required'" :value.sync="insuredPersonInfo.sex" :disabled="true"></select-radio>
<InfoCell label="国籍">{{insuredPersonInfo.nativeplace | idToText('nativeplace')}}</InfoCell>
<van-field :value="insuredPersonInfo.marriageStatus" readonly required label="婚姻状况" name="婚姻状况" v-validate="'required'"
<van-field :value="insuredPersonInfo.marriageStatus" required label="婚姻状况" name="婚姻状况" v-validate="'required'"
right-icon="arrow" placeholder="请选择" @click="toSelect('10','','insuredDTOs')" />
<InfoCell label="职业类别">{{insuredPersonInfo.occupationCode}}</InfoCell>
<select-radio :radios="medicalRadio" label="有无社保" name="有无社保" v-validate="'required'" required :value.sync="insuredPersonInfo.medical"
@@ -66,7 +66,7 @@
:value.sync="item.sex"></select-radio>
<van-field :value="item.nativeplace | idToText('nativeplace')" label="国籍" name="国籍" required v-validate="'required'"
right-icon="arrow" placeholder="请选择" @click="toSelect('1','','bnfDTOs',index)" />
<van-field :value="item.marriageStatus" readonly required label="婚姻状况" name="婚姻状况" v-validate="'required'"
<van-field :value="item.marriageStatus" required label="婚姻状况" name="婚姻状况" v-validate="'required'"
right-icon="arrow" placeholder="请选择" @click="toSelect('10','','bnfDTOs',index)" />
<van-field v-model="item.mobile" clearable label="移动电话" name="移动电话" required placeholder="请输入" v-validate="'required|mobileLength11|mobileStartWith1|mobile'"
maxlength="11" />
@@ -87,7 +87,6 @@
<InfoCell label="账户名称">{{accountPersonInfo.accountName}}</InfoCell>
<InfoCell label="开户银行">{{accountPersonInfo.bankName}}</InfoCell>
<InfoCell label="银行账号">{{accountPersonInfo.cardBookCode}}</InfoCell>
<van-field lable="人脸识别" name="人脸识别" @click="faceTo" value="人脸识别" />
<van-field lable="签名" name="签名" value="签名" @click="signTo" />
</DropdownBox>
<van-button type="danger" class="bottom-btn" v-no-more-click="1000" @click="nextStep">下一步</van-button>
@@ -111,7 +110,7 @@ import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
// import { saveOrUpdateOrderInfo, getOrderDetail } from '@/api/ebiz/insureAgain/insureAgain'
import { getOrderDetail } from '@/api/ebiz/sale/sale'
import { getOrderDetail, saveOrUpdateOrderInfo } from '@/api/ebiz/sale/sale'
import DataDictionary from '@/assets/js/utils/data-dictionary'
import SelectRadio from '@/components/ebiz/SelectRadio'
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
@@ -185,23 +184,6 @@ export default {
window.appCallBack = this.appCallBack
},
methods: {
/**
* @description: 人脸识别
* @param {*}
* @return {*}
*/
async faceTo() {
const authRes = await EWebBridge.webCallAppInJs('face_auth', {
businessSource: '1', //业务来源:1-电投2-入司3-理赔4-保全
number: '120222199012046418', //身份证号码
name: '庞兴月' //姓名
})
if (JSON.parse(authRes).state == '1') {
// this.goUrl()
} else {
this.$toast('人脸识别失败!')
}
},
/**
* @description: 签名
* @param {*}
@@ -553,7 +535,18 @@ export default {
this.isSpecialRead = payload
},
async nextStep(page) {
// const authRes = await EWebBridge.webCallAppInJs('face_auth', {
// businessSource: '1', //业务来源:1-电投2-入司3-理赔4-保全
// number: this.userInfo.idNo, //身份证号码
// name: this.userInfo.name //姓名
// })
// if (JSON.parse(authRes).state !== '1') {
// this.$toast('人脸识别失败!')
// return false;
// }
// 验证
// console.log(this.userInfo, '=====================================this.userInfo')
// console.log(this.insuredPersonInfo, '=====================================this.insuredPersonInfo')
let valid = await this.$validator.validate()
if (true === valid) {
for (let status of DataDictionary.marriage) {
@@ -561,19 +554,40 @@ export default {
this.userInfo.marriage = status.id
}
}
this.infoUpdate()
this.save()
} else {
return this.$toast(this.$validator.errors.all()[0])
}
// this.$jump({
// flag: 'h5',
// extra: {
// url: location.origin + `/#/insureAgain`,
// forbidSwipeBack: '1',
// needRefresh: '1'
// },
// routerInfo: { path: `/insureAgain` }
// })
},
async save() {
let params = {
orderType: 'APPNT_ORDER',
orderDTO: {
orderInfoDTO: {
orderNo: localStorage.orderNo,
isElecCont: this.isElecCont
},
appntDTO: this.userInfo,
insuredDTOs: this.insuredPersonInfo,
orderAccountDTO: this.accountPersonInfo
}
}
let str = ''
let resultData = await saveOrUpdateOrderInfo(params)
if (resultData.result == 0) {
localStorage.setItem('orderNo', resultData.orderNo)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain/productInformation`
},
routerInfo: {
path: `/insureAgain/productInformation`
}
})
} else {
this.$toast(resultData.resultMessage)
}
},
/**
* @description:
@@ -582,13 +596,13 @@ export default {
*/
chooseOccupation(data) {
let { code, name, healthGrade, lifeGrade } = data
// this.$jump({
// flag: 'navigation',
// extra: {
// title: '职业类别',
// hiddenRight: '1'
// }
// })
this.$jump({
flag: 'navigation',
extra: {
title: '职业类别',
hiddenRight: '1'
}
})
this.occupationShowPicker = false
this.bnfPersonInfo[this.bnfIndex]['occupationName'] = name;
this.bnfPersonInfo[this.bnfIndex]['occupationCode'] = code;
@@ -604,7 +618,6 @@ export default {
this.bnfIndex = index
this.occupationName = this.bnfPersonInfo[this.bnfIndex]['occupationName'];
this.occupationCode = this.bnfPersonInfo[this.bnfIndex]['occupationCode'];
console.log(this.occupationName, '=============this.occupationName============')
}
}