Merge branch 'feature/GFRS-597【电投页面优化】' into dev

# Conflicts:
#	src/views/ebiz/common/SelectedProduct.vue
#	src/views/ebiz/sale/AddBeneficiaryInfo.vue
#	src/views/ebiz/sale/InsuredInfo.vue
#	src/views/ebiz/sale/InsuredPerson.vue
This commit is contained in:
yuweiqi
2020-03-13 21:15:41 +08:00
8 changed files with 298 additions and 139 deletions

View File

@@ -45,9 +45,9 @@ export default {
{ pageNo: 2, pageItem: '被保人信息', urlStr: '/sale/insuredPerson', tabClass: '' },
{ pageNo: 3, pageItem: '选择产品', urlStr: '/common/selectedProduct', tabClass: '' },
{ pageNo: 4, pageItem: '受益人信息', urlStr: '/sale/beneficiary', tabClass: '' },
{ pageNo: 5, pageItem: '告知信息', urlStr: '/sale/notifyingMessage', tabClass: '' },
{ pageNo: 6, pageItem: '账户信息', urlStr: '/sale/accountInformation', tabClass: '' },
{ pageNo: 7, pageItem: '附件上传', urlStr: '/sale/attachmentManagement', tabClass: '' },
{ pageNo: 5, pageItem: '告知信息', urlStr: '/sale/NotifyingMessage', tabClass: '' },
{ pageNo: 6, pageItem: '账户信息', urlStr: '/sale/AccountInformation', tabClass: '' },
{ pageNo: 7, pageItem: '附件上传', urlStr: '/sale/AttachmentManagement', tabClass: '' },
{ pageNo: 8, pageItem: '签名确认', urlStr: '/sale/signatureConfirmation', tabClass: '' }
],
//localStorage.salePageFlag: 1-投保人信息 2-被保人信息 3-选择产品 4-受益人信息 5-告知信息 6-账户信息 7-附件上传 8-签名确认
@@ -77,13 +77,13 @@ export default {
url = `/sale/beneficiary?edit=1&salePageFlag=${pageIndex}`
break
case 5: //跳到告知信息页面
url = `/sale/notifyingMessage?edit=1&salePageFlag=${pageIndex}`
url = `/sale/NotifyingMessage?edit=1&salePageFlag=${pageIndex}`
break
case 6: //跳到账户信息页面
url = `/sale/accountInformation?edit=1&salePageFlag=${pageIndex}`
url = `/sale/AccountInformation?edit=1&salePageFlag=${pageIndex}`
break
case 7: //跳到附件上传页面
url = `/sale/attachmentManagement?edit=1&salePageFlag=${pageIndex}`
url = `/sale/AttachmentManagement?edit=1&salePageFlag=${pageIndex}`
break
case 8: //跳到签名确认页面
url = `/sale/signatureConfirmation?edit=1&salePageFlag=${pageIndex}`
@@ -94,6 +94,7 @@ export default {
this.$jump({
flag: 'h5',
extra: {
forbidSwipeBack: '1',
url: location.origin + `/#${url}`
},
routerInfo: { path: url }

View File

@@ -71,6 +71,11 @@ export default {
[IndexBar.name]: IndexBar
},
mounted() {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
window.appCallBack = this.appCallBack
document.body.style.backgroundColor = '#fff'
this.getProductList()
if (!this.$route.query.edit) {
@@ -103,6 +108,34 @@ export default {
next()
},
methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '电子投保单列表',
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1'
}
})
})
.catch(() => {
return
})
}
},
//获取已选产品列表
async getProductList() {
//建议书、电投详情
@@ -234,7 +267,10 @@ export default {
},
//下一步
nextStep() {
localStorage.salePageFlag = '8' //当前后台接口及前端代码不完善,仅调试观察现象使用,调试完成后删除
if (!this.$route.query.salePageFlag) {
//如果从保单列表编辑按钮进入
localStorage.salePageFlag = '4'
}
console.log('this.chooseProducts', this.chooseProducts)
if (this.chooseProducts.length == 0) {
return this.$toast('请添加产品')
@@ -323,6 +359,7 @@ export default {
this.$jump({
flag: 'h5',
extra: {
forbidSwipeBack: '1',
url: location.origin + '/#' + routerUrl,
needRefresh: '1'
},

View File

@@ -14,11 +14,7 @@
@click="toSelect('7')"
/>
<div class="relative border-bt fs14 p10 flex align-center">
<van-checkbox
v-model="userInfo.asAppntAddress"
@change="asAppntAddress"
:disabled="Insured"
>同投保人</van-checkbox>
<van-checkbox v-model="userInfo.asAppntAddress" @change="asAppntAddress" :disabled="Insured">同投保人</van-checkbox>
</div>
<customer-picker
@on-choose="chooseCustomer"
@@ -95,21 +91,10 @@
:readonly="isInsured || idLimit"
></FieldDatePicter>
<div class="border-bt relative fs14 p10 flex align-center">
<van-checkbox
v-model="userInfo.effectiveDateType"
class="fr"
:disabled="effectiveDateTypeAble"
@change="effectiveDataTypeChange"
>长期</van-checkbox>
<van-checkbox v-model="userInfo.effectiveDateType" class="fr" :disabled="effectiveDateTypeAble" @change="effectiveDataTypeChange">长期</van-checkbox>
</div>
<!-- <van-field v-model="userInfo.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" :readonly="isInsured" /> -->
<select-radio
:radios="sexRadio"
required
label="性别"
:value.sync="userInfo.sex"
:disabled="isInsured"
></select-radio>
<select-radio :radios="sexRadio" required label="性别" :value.sync="userInfo.sex" :disabled="isInsured"></select-radio>
<van-field
:value="userInfo.nativeplace | idToText('nativeplace')"
readonly
@@ -229,7 +214,11 @@ import idNoCheck from '@/assets/js/utils/idNoCheck'
import { idToData } from './js/verification'
import { selectComp } from './js/methods'
// let relationToInsured = [{ id: 2, text: '配偶' }, { id: 3, text: '父母' }, { id: 4, text: '子女' }, { id: 5, text: '其他' }]
let relationToInsured = [{ id: 2, text: '配偶' }, { id: 3, text: '父母' }, { id: 4, text: '子女' }]
let relationToInsured = [
{ id: 2, text: '配偶' },
{ id: 3, text: '父母' },
{ id: 4, text: '子女' }
]
export default {
name: 'insuredInfo',
@@ -422,7 +411,10 @@ export default {
} else if (pickerType == '3') {
this.columns = DataDictionary.degree
} else if (pickerType == '4') {
this.columns = [{ id: 0, text: '有' }, { id: 1, text: '无' }]
this.columns = [
{ id: 0, text: '有' },
{ id: 1, text: '无' }
]
} else if (pickerType == '5') {
this.columns = DataDictionary.taxIdentity
} else if (pickerType == '6') {
@@ -655,9 +647,11 @@ export default {
nextStep() {
// 计算年龄
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
let relationToAppnt = localStorage.relationToAppnt
let insuredDetail = JSON.parse(localStorage.insuredDetail)
// //被保险人不是已婚
let relationToAppnt = localStorage.saleInsuredPersonInfo.relationToAppnt
let insuredDetail = JSON.parse(localStorage.saleInsuredInfo)
// let insuredDetail = JSON.parse(localStorage.insuredDetail)
// let relationToAppnt = localStorage.relationToAppnt
// //被保人不是已婚
// if (this.insuredMarriage != '1') {
// return this.$toast('与投保人关系不正确')
// }

View File

@@ -109,10 +109,11 @@ export default {
this.insuredPerson = JSON.parse(localStorage.saleInsuredPersonInfo).name
},
mounted() {
// EWebBridge.webCallAppInJs('webview_left_button', {
// intercept: '1' //是否拦截原生返回事件 1是 其他否
// })
// window.appCallBack = this.appCallBack
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
window.appCallBack = this.appCallBack
document.body.style.backgroundColor = '#fff'
},
beforeRouteLeave(to, from, next) {
@@ -120,15 +121,34 @@ export default {
next()
},
methods: {
// appCallBack() {
// this.$jump({
// flag: 'goBack',
// extra: {
// refresh: '1', //是否返回后刷新01
// index: '-1'
// }
// })
// },
appCallBack(data) {
if (data.trigger == 'left_button_click') {
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '电子投保单列表',
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1'
}
})
})
.catch(() => {
return
})
}
},
//告知信息
nextStep() {
if (this.type == 2 && this.beneficiaries.length == 0) {
@@ -165,11 +185,15 @@ export default {
// console.log(res)
if (res.result == 0) {
localStorage.removeItem('applicant')
localStorage.salePageFlag = '8' //当前后台接口及前端代码不完善,仅调试观察现象使用,调试完成后删除
if (!this.$route.query.salePageFlag) {
//不是从导航栏进入
localStorage.salePageFlag = '5'
}
//页面跳转
this.$jump({
flag: 'h5',
extra: {
forbidSwipeBack: '1',
url: location.origin + '/#/sale/notifyingMessage',
needRefresh: '1'
},

View File

@@ -512,6 +512,10 @@ export default {
}
},
mounted() {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
// 筛选按钮的点击事件
window.appCallBack = this.appCallBack
},
@@ -523,7 +527,33 @@ export default {
selectClick(index) {
selectComp(this, index, '1')
},
appCallBack() {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '电子投保单列表',
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1'
}
})
})
.catch(() => {
return
})
} else {
// 筛选按钮的点击事件
this.$jump({
flag: 'navigation',
@@ -539,6 +569,7 @@ export default {
} else if (this.currentPopupIndex == 3) {
this.isScan = false
}
}
},
chooseOccupation() {
this.$jump({
@@ -935,6 +966,7 @@ export default {
) {
console.log('hehe')
//提示用户
if (chooseProductCodes && chooseProductCodes.length)
return this.$dialog
.confirm({
className: 'dialog-delete',
@@ -979,21 +1011,15 @@ export default {
params.orderDTO.appntDTO = this.userInfo
let resultData = await saveOrUpdateOrderInfo(params)
if (resultData.result == 0) {
//存储被保险人信息
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// localStorage.saleInsuredInfo = JSON.stringify({
// birthday: this.userInfo.birthday,
// name: this.userInfo.name,
// sex: this.userInfo.sex,
// idType: this.userInfo.idType,
// age
// })
// this.userInfo.age = age
// localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
// console.log(this.userInfo)
//deleteFlag 0-该页面修改了信息且修改的信息影响到后面流程,后台进行了删除数据的操作
if (resultData.deleteFlag === '0') {
localStorage.salePageFlag = '2'
} else if (!this.$route.query.salePageFlag) {
//如果从保单列表编辑按钮进入
localStorage.salePageFlag = '2'
}
localStorage.orderNo = resultData.orderNo
localStorage.insuredDetail = JSON.stringify(this.userInfo)
// localStorage.insuredDetail = JSON.stringify(this.userInfo)
//清理计时器
window.clearInterval(this.timeId)
this.timeId = null
@@ -1025,11 +1051,11 @@ export default {
url: location.origin + `/#/sale/insuredPerson?${str}`
},
routerInfo: {
forbidSwipeBack: '1',
path: `/sale/insuredPerson?${str}`
}
})
}
} else {
this.$toast(resultData.resultMessage)
}

View File

@@ -687,6 +687,10 @@ export default {
}
},
mounted() {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
window.appCallBack = this.appCallBack
// // document.body.style.backgroundColor = '#F5F5F5'
},
@@ -1014,7 +1018,33 @@ export default {
break
}
},
appCallBack() {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '电子投保单列表',
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1'
}
})
})
.catch(() => {
return
})
} else {
// 筛选按钮的点击事件
this.$jump({
flag: 'navigation',
@@ -1031,6 +1061,7 @@ export default {
} else if (this.currentPopupIndex == 3) {
this.isScan = false
}
}
},
//选择客户
chooseCustomer(data) {
@@ -1296,6 +1327,7 @@ export default {
this.userInfo.name != saleInsuredPersonInfo.name
) {
//提示用户
if (chooseProductCodes && chooseProductCodes.length)
return Dialog.confirm({
className: 'dialog-delete',
title: '提示',
@@ -1334,16 +1366,16 @@ export default {
params.orderDTO.insuredDTOs = [this.userInfo]
let resultData = await saveOrUpdateOrderInfo(params)
if (resultData.result == 0) {
//存储被保险人信息
//如果投被保险人是同一个人, 更新投保人信息
// if (this.userInfo.relationToAppnt == '1') {
// localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
// }
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// this.userInfo.age = age
// localStorage.saleInsuredPersonInfo = JSON.stringify(this.userInfo)
localStorage.salePageFlag = '3'
localStorage.relationToAppnt = this.userInfo.relationToAppnt
// localStorage.relationToAppnt = this.userInfo.relationToAppnt
//deleteFlag 0-该页面修改了信息且修改的信息影响到后面流程,后台进行了删除数据的操作
if (resultData.deleteFlag === '0') {
localStorage.salePageFlag = '3'
} else if (!this.$route.query.salePageFlag) {
//如果从保单列表编辑按钮进入
localStorage.salePageFlag = '3'
}
localStorage.isFrom = 'sale'
//清理计时器
window.clearInterval(this.timeId)
@@ -1353,6 +1385,7 @@ export default {
this.$jump({
flag: 'h5',
extra: {
forbidSwipeBack: '1',
url: location.origin + '/#/common/selectedProduct'
},
routerInfo: {

View File

@@ -101,7 +101,7 @@
>
<van-button
@click="changeCard(order)"
v-if="active == 'commit' && order.orderInfoDTO.orderStatus == '48' || active == 'commit' && order.orderInfoDTO.orderStatus == '49'"
v-if="(active == 'commit' && order.orderInfoDTO.orderStatus == '48') || (active == 'commit' && order.orderInfoDTO.orderStatus == '49')"
size="small"
class="mr5"
type="danger"
@@ -179,9 +179,20 @@ export default {
}
},
mounted() {
EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
window.appCallBack = this.appCallBack
this.loadMore()
},
methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
this.$jump({
flag: 'home'
})
}
},
//分页用
loadMore() {
let pageInfo = {
@@ -398,6 +409,7 @@ export default {
this.$jump({
flag: 'h5',
extra: {
forbidSwipeBack: '1',
url: location.origin + `/#${url}`
},
routerInfo: { path: url }
@@ -457,7 +469,7 @@ export default {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/insuredInfo',
url: location.origin + '/#/sale/insuredInfo'
},
routerInfo: { path: '/sale/insuredInfo' }
})

View File

@@ -196,6 +196,11 @@ export default {
//this.information()
},
mounted() {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
document.body.style.backgroundColor = '#F5F5F5'
if (!this.$route.query.edit) {
//如果不是编辑/导航条跳转进来的
localStorage.setItem('salePageFlag', this.salePageFlag)
@@ -209,6 +214,34 @@ export default {
}
},
methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '电子投保单列表',
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1'
}
})
})
.catch(() => {
return
})
}
},
// 一键全否
allFalse() {
let that = this
@@ -501,7 +534,10 @@ export default {
saveInformation(data).then(res => {
if (res.result == '0') {
localStorage.removeItem('changeCard')
localStorage.salePageFlag = '8' //当前后台接口及前端代码不完善,仅调试观察现象使用,调试完成后删除
if (!this.$route.query.salePageFlag) {
//不是从导航栏进入
localStorage.salePageFlag = '6'
}
that.$jump({
flag: 'h5',
extra: {
@@ -591,10 +627,6 @@ export default {
}
},
mounted() {
document.body.style.backgroundColor = '#F5F5F5'
// this.$toast('11111')
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()