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

View File

@@ -71,6 +71,11 @@ export default {
[IndexBar.name]: IndexBar [IndexBar.name]: IndexBar
}, },
mounted() { 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' document.body.style.backgroundColor = '#fff'
this.getProductList() this.getProductList()
if (!this.$route.query.edit) { if (!this.$route.query.edit) {
@@ -103,6 +108,34 @@ export default {
next() next()
}, },
methods: { 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() { async getProductList() {
//建议书、电投详情 //建议书、电投详情
@@ -234,7 +267,10 @@ export default {
}, },
//下一步 //下一步
nextStep() { nextStep() {
localStorage.salePageFlag = '8' //当前后台接口及前端代码不完善,仅调试观察现象使用,调试完成后删除 if (!this.$route.query.salePageFlag) {
//如果从保单列表编辑按钮进入
localStorage.salePageFlag = '4'
}
console.log('this.chooseProducts', this.chooseProducts) console.log('this.chooseProducts', this.chooseProducts)
if (this.chooseProducts.length == 0) { if (this.chooseProducts.length == 0) {
return this.$toast('请添加产品') return this.$toast('请添加产品')
@@ -323,6 +359,7 @@ export default {
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
forbidSwipeBack: '1',
url: location.origin + '/#' + routerUrl, url: location.origin + '/#' + routerUrl,
needRefresh: '1' needRefresh: '1'
}, },

View File

@@ -14,11 +14,7 @@
@click="toSelect('7')" @click="toSelect('7')"
/> />
<div class="relative border-bt fs14 p10 flex align-center"> <div class="relative border-bt fs14 p10 flex align-center">
<van-checkbox <van-checkbox v-model="userInfo.asAppntAddress" @change="asAppntAddress" :disabled="Insured">同投保人</van-checkbox>
v-model="userInfo.asAppntAddress"
@change="asAppntAddress"
:disabled="Insured"
>同投保人</van-checkbox>
</div> </div>
<customer-picker <customer-picker
@on-choose="chooseCustomer" @on-choose="chooseCustomer"
@@ -95,21 +91,10 @@
:readonly="isInsured || idLimit" :readonly="isInsured || idLimit"
></FieldDatePicter> ></FieldDatePicter>
<div class="border-bt relative fs14 p10 flex align-center"> <div class="border-bt relative fs14 p10 flex align-center">
<van-checkbox <van-checkbox v-model="userInfo.effectiveDateType" class="fr" :disabled="effectiveDateTypeAble" @change="effectiveDataTypeChange">长期</van-checkbox>
v-model="userInfo.effectiveDateType"
class="fr"
:disabled="effectiveDateTypeAble"
@change="effectiveDataTypeChange"
>长期</van-checkbox>
</div> </div>
<!-- <van-field v-model="userInfo.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" :readonly="isInsured" /> --> <!-- <van-field v-model="userInfo.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" :readonly="isInsured" /> -->
<select-radio <select-radio :radios="sexRadio" required label="性别" :value.sync="userInfo.sex" :disabled="isInsured"></select-radio>
:radios="sexRadio"
required
label="性别"
:value.sync="userInfo.sex"
:disabled="isInsured"
></select-radio>
<van-field <van-field
:value="userInfo.nativeplace | idToText('nativeplace')" :value="userInfo.nativeplace | idToText('nativeplace')"
readonly readonly
@@ -229,7 +214,11 @@ import idNoCheck from '@/assets/js/utils/idNoCheck'
import { idToData } from './js/verification' import { idToData } from './js/verification'
import { selectComp } from './js/methods' 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: '子女' }, { 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 { export default {
name: 'insuredInfo', name: 'insuredInfo',
@@ -380,7 +369,7 @@ export default {
flag: 'goBack', flag: 'goBack',
extra: { extra: {
refresh: '1', //是否返回后刷新01 refresh: '1', //是否返回后刷新01
index:'-1' index: '-1'
} }
}) })
this.$jump({ this.$jump({
@@ -422,7 +411,10 @@ export default {
} else if (pickerType == '3') { } else if (pickerType == '3') {
this.columns = DataDictionary.degree this.columns = DataDictionary.degree
} else if (pickerType == '4') { } else if (pickerType == '4') {
this.columns = [{ id: 0, text: '有' }, { id: 1, text: '无' }] this.columns = [
{ id: 0, text: '有' },
{ id: 1, text: '无' }
]
} else if (pickerType == '5') { } else if (pickerType == '5') {
this.columns = DataDictionary.taxIdentity this.columns = DataDictionary.taxIdentity
} else if (pickerType == '6') { } else if (pickerType == '6') {
@@ -655,9 +647,11 @@ export default {
nextStep() { nextStep() {
// 计算年龄 // 计算年龄
let age = utilsAge.getAge(this.userInfo.birthday, new Date()) let age = utilsAge.getAge(this.userInfo.birthday, new Date())
let relationToAppnt = localStorage.relationToAppnt let relationToAppnt = localStorage.saleInsuredPersonInfo.relationToAppnt
let insuredDetail = JSON.parse(localStorage.insuredDetail) let insuredDetail = JSON.parse(localStorage.saleInsuredInfo)
// //被保险人不是已婚 // let insuredDetail = JSON.parse(localStorage.insuredDetail)
// let relationToAppnt = localStorage.relationToAppnt
// //被保人不是已婚
// if (this.insuredMarriage != '1') { // if (this.insuredMarriage != '1') {
// return this.$toast('与投保人关系不正确') // return this.$toast('与投保人关系不正确')
// } // }
@@ -846,7 +840,7 @@ export default {
flag: 'h5', flag: 'h5',
extra: { extra: {
url: location.origin + '/#/sale/beneficiary', url: location.origin + '/#/sale/beneficiary',
needRefresh:'1' needRefresh: '1'
}, },
routerInfo: { routerInfo: {
path: '/sale/beneficiary' path: '/sale/beneficiary'
@@ -1023,7 +1017,7 @@ export default {
// this.isRequired = false // this.isRequired = false
// this.userInfo.effectiveDateType = true // this.userInfo.effectiveDateType = true
if (from) { if (from) {
this.userInfo.effectiveDateType = true this.userInfo.effectiveDateType = true
} }
this.effectiveDateTypeAble = false this.effectiveDateTypeAble = false
} else { } else {

View File

@@ -109,10 +109,11 @@ export default {
this.insuredPerson = JSON.parse(localStorage.saleInsuredPersonInfo).name this.insuredPerson = JSON.parse(localStorage.saleInsuredPersonInfo).name
}, },
mounted() { mounted() {
// EWebBridge.webCallAppInJs('webview_left_button', { EWebBridge.webCallAppInJs('webview_left_button', {
// intercept: '1' //是否拦截原生返回事件 1是 其他否 img: this.$assetsUrl + 'images/del-close@3x.png',
// }) intercept: '1' //是否拦截原生返回事件 1是 其他否
// window.appCallBack = this.appCallBack })
window.appCallBack = this.appCallBack
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
@@ -120,15 +121,34 @@ export default {
next() next()
}, },
methods: { methods: {
// appCallBack() { appCallBack(data) {
// this.$jump({ if (data.trigger == 'left_button_click') {
// flag: 'goBack', return this.$dialog
// extra: { .confirm({
// refresh: '1', //是否返回后刷新01 className: 'dialog-delete',
// index: '-1' 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() { nextStep() {
if (this.type == 2 && this.beneficiaries.length == 0) { if (this.type == 2 && this.beneficiaries.length == 0) {
@@ -165,11 +185,15 @@ export default {
// console.log(res) // console.log(res)
if (res.result == 0) { if (res.result == 0) {
localStorage.removeItem('applicant') localStorage.removeItem('applicant')
localStorage.salePageFlag = '8' //当前后台接口及前端代码不完善,仅调试观察现象使用,调试完成后删除 if (!this.$route.query.salePageFlag) {
//不是从导航栏进入
localStorage.salePageFlag = '5'
}
//页面跳转 //页面跳转
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
forbidSwipeBack: '1',
url: location.origin + '/#/sale/notifyingMessage', url: location.origin + '/#/sale/notifyingMessage',
needRefresh: '1' needRefresh: '1'
}, },

View File

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

View File

@@ -687,6 +687,10 @@ export default {
} }
}, },
mounted() { mounted() {
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
window.appCallBack = this.appCallBack window.appCallBack = this.appCallBack
// // document.body.style.backgroundColor = '#F5F5F5' // // document.body.style.backgroundColor = '#F5F5F5'
}, },
@@ -1014,22 +1018,49 @@ export default {
break break
} }
}, },
appCallBack() { appCallBack(data) {
// 筛选按钮的点击事件 if (data.trigger == 'left_button_click') {
this.$jump({ return this.$dialog
flag: 'navigation', .confirm({
extra: { className: 'dialog-delete',
title: '被保险人信息', title: '提示',
hiddenRight: '1' 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',
extra: {
title: '被保险人信息',
hiddenRight: '1'
}
})
console.log(this.currentPopupIndex)
if (this.currentPopupIndex == 1) {
this.customerShowPicker = false
} else if (this.currentPopupIndex == 2) {
this.occupationShowPicker = false
} else if (this.currentPopupIndex == 3) {
this.isScan = false
} }
})
console.log(this.currentPopupIndex)
if (this.currentPopupIndex == 1) {
this.customerShowPicker = false
} else if (this.currentPopupIndex == 2) {
this.occupationShowPicker = false
} else if (this.currentPopupIndex == 3) {
this.isScan = false
} }
}, },
//选择客户 //选择客户
@@ -1296,22 +1327,23 @@ export default {
this.userInfo.name != saleInsuredPersonInfo.name this.userInfo.name != saleInsuredPersonInfo.name
) { ) {
//提示用户 //提示用户
return Dialog.confirm({ if (chooseProductCodes && chooseProductCodes.length)
className: 'dialog-delete', return Dialog.confirm({
title: '提示', className: 'dialog-delete',
message: '当前信息已经发生改变,有可能影响险种费率,是否确认修改并清除险种信息?', title: '提示',
cancelButtonColor: '#4FC6B3', message: '当前信息已经发生改变,有可能影响险种费率,是否确认修改并清除险种信息?',
confirmButtonColor: '#FFFFFF' cancelButtonColor: '#4FC6B3',
}) confirmButtonColor: '#FFFFFF'
.then(() => {
// on confirm
localStorage.chooseProductCodesNew = ''
this.save()
})
.catch(() => {
// on cancel
return
}) })
.then(() => {
// on confirm
localStorage.chooseProductCodesNew = ''
this.save()
})
.catch(() => {
// on cancel
return
})
} }
} }
this.save() this.save()
@@ -1334,16 +1366,16 @@ export default {
params.orderDTO.insuredDTOs = [this.userInfo] params.orderDTO.insuredDTOs = [this.userInfo]
let resultData = await saveOrUpdateOrderInfo(params) let resultData = await saveOrUpdateOrderInfo(params)
if (resultData.result == 0) { 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.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' localStorage.isFrom = 'sale'
//清理计时器 //清理计时器
window.clearInterval(this.timeId) window.clearInterval(this.timeId)
@@ -1353,6 +1385,7 @@ export default {
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
forbidSwipeBack: '1',
url: location.origin + '/#/common/selectedProduct' url: location.origin + '/#/common/selectedProduct'
}, },
routerInfo: { routerInfo: {

View File

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

View File

@@ -196,6 +196,11 @@ export default {
//this.information() //this.information()
}, },
mounted() { 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) { if (!this.$route.query.edit) {
//如果不是编辑/导航条跳转进来的 //如果不是编辑/导航条跳转进来的
localStorage.setItem('salePageFlag', this.salePageFlag) localStorage.setItem('salePageFlag', this.salePageFlag)
@@ -209,6 +214,34 @@ export default {
} }
}, },
methods: { 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() { allFalse() {
let that = this let that = this
@@ -501,7 +534,10 @@ export default {
saveInformation(data).then(res => { saveInformation(data).then(res => {
if (res.result == '0') { if (res.result == '0') {
localStorage.removeItem('changeCard') localStorage.removeItem('changeCard')
localStorage.salePageFlag = '8' //当前后台接口及前端代码不完善,仅调试观察现象使用,调试完成后删除 if (!this.$route.query.salePageFlag) {
//不是从导航栏进入
localStorage.salePageFlag = '6'
}
that.$jump({ that.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
@@ -591,10 +627,6 @@ export default {
} }
}, },
mounted() {
document.body.style.backgroundColor = '#F5F5F5'
// this.$toast('11111')
},
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = '' document.body.style.backgroundColor = ''
next() next()