diff --git a/src/components/ebiz/sale/IndexBar.vue b/src/components/ebiz/sale/IndexBar.vue
index 04860cebe..cee803cc1 100644
--- a/src/components/ebiz/sale/IndexBar.vue
+++ b/src/components/ebiz/sale/IndexBar.vue
@@ -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 }
diff --git a/src/views/ebiz/common/SelectedProduct.vue b/src/views/ebiz/common/SelectedProduct.vue
index 66ba25a42..81ddc415c 100644
--- a/src/views/ebiz/common/SelectedProduct.vue
+++ b/src/views/ebiz/common/SelectedProduct.vue
@@ -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'
},
diff --git a/src/views/ebiz/sale/AddBeneficiaryInfo.vue b/src/views/ebiz/sale/AddBeneficiaryInfo.vue
index e784009cc..ba25cfcc0 100644
--- a/src/views/ebiz/sale/AddBeneficiaryInfo.vue
+++ b/src/views/ebiz/sale/AddBeneficiaryInfo.vue
@@ -14,11 +14,7 @@
@click="toSelect('7')"
/>
- 同投保人
+ 同投保人
- 长期
+ 长期
-
+
{
+ 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'
},
diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue
index a9a14106c..6629354b1 100644
--- a/src/views/ebiz/sale/InsuredInfo.vue
+++ b/src/views/ebiz/sale/InsuredInfo.vue
@@ -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,21 +527,48 @@ export default {
selectClick(index) {
selectComp(this, index, '1')
},
- appCallBack() {
- // 筛选按钮的点击事件
- this.$jump({
- flag: 'navigation',
- extra: {
- title: '投保人信息',
- hiddenRight: '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
+ })
+ } 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() {
@@ -935,24 +966,25 @@ export default {
) {
console.log('hehe')
//提示用户
- return this.$dialog
- .confirm({
- className: 'dialog-delete',
- title: '提示',
- message: '当前信息已经发生改变,有可能影响险种费率,是否确认修改并清除险种信息?',
- cancelButtonColor: '#E9332E',
- confirmButtonColor: '#FFFFFF'
- })
- .then(() => {
- // on confirm
+ if (chooseProductCodes && chooseProductCodes.length)
+ return this.$dialog
+ .confirm({
+ className: 'dialog-delete',
+ title: '提示',
+ message: '当前信息已经发生改变,有可能影响险种费率,是否确认修改并清除险种信息?',
+ cancelButtonColor: '#E9332E',
+ confirmButtonColor: '#FFFFFF'
+ })
+ .then(() => {
+ // on confirm
- this.save('isShow=1')
- console.log('success')
- })
- .catch(() => {
- // on cancel
- return
- })
+ this.save('isShow=1')
+ console.log('success')
+ })
+ .catch(() => {
+ // on cancel
+ return
+ })
}
}
this.save()
@@ -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)
- localStorage.salePageFlag = '2'
+ //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)
}
diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue
index f8c70b63d..ebcb51bc6 100644
--- a/src/views/ebiz/sale/InsuredPerson.vue
+++ b/src/views/ebiz/sale/InsuredPerson.vue
@@ -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,22 +1018,49 @@ export default {
break
}
},
- appCallBack() {
- // 筛选按钮的点击事件
- this.$jump({
- flag: 'navigation',
- extra: {
- title: '被保险人信息',
- hiddenRight: '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
+ })
+ } 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
) {
//提示用户
- return Dialog.confirm({
- className: 'dialog-delete',
- title: '提示',
- message: '当前信息已经发生改变,有可能影响险种费率,是否确认修改并清除险种信息?',
- cancelButtonColor: '#4FC6B3',
- confirmButtonColor: '#FFFFFF'
- })
- .then(() => {
- // on confirm
- localStorage.chooseProductCodesNew = ''
- this.save()
- })
- .catch(() => {
- // on cancel
- return
+ if (chooseProductCodes && chooseProductCodes.length)
+ return Dialog.confirm({
+ className: 'dialog-delete',
+ title: '提示',
+ message: '当前信息已经发生改变,有可能影响险种费率,是否确认修改并清除险种信息?',
+ cancelButtonColor: '#4FC6B3',
+ confirmButtonColor: '#FFFFFF'
})
+ .then(() => {
+ // on confirm
+ localStorage.chooseProductCodesNew = ''
+ this.save()
+ })
+ .catch(() => {
+ // on cancel
+ return
+ })
}
}
this.save()
@@ -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: {
diff --git a/src/views/ebiz/sale/List.vue b/src/views/ebiz/sale/List.vue
index 4105edc3b..81c8dca9e 100644
--- a/src/views/ebiz/sale/List.vue
+++ b/src/views/ebiz/sale/List.vue
@@ -101,7 +101,7 @@
>
{
+ 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()