-

+
{{ item.name }}
@@ -53,13 +51,16 @@
import { RadioGroup, Radio, Icon, Dialog } from 'vant'
import dataDictionary from '@/assets/js/utils/data-dictionary'
import { saveOrUpdateOrderInfo, getOrderDetail } from '@/api/ebiz/sale/sale'
+import IndexBar from '@/components/ebiz/sale/IndexBar'
+
export default {
name: 'beneficiary',
components: {
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Icon.name]: Icon,
- [Dialog.name]: Dialog
+ [Dialog.name]: Dialog,
+ [IndexBar.name]: IndexBar
},
data() {
return {
@@ -74,7 +75,8 @@ export default {
// }
], // 指定受益人列表
bnfFlag: '0', // 受益人类型
- bnfType: '0' // 0 身故受益人 1 身前受益人
+ bnfType: '0', // 0 身故受益人 1 身前受益人
+ salePageFlag: '4'
}
},
created() {
@@ -84,22 +86,33 @@ export default {
this.beneficiaries = this.beneficiaries.concat(JSON.parse(localStorage.beneficiaryInfo))
this.type = '2'
console.log(this.beneficiaries)
- }
- //如果是从编辑进来
- if (this.$route.query.edit) {
+ } else {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
if (res.result == 0) {
this.$utils.intLocalStorage(res)
+ this.type = res.orderDTO.orderInfoDTO.bnfFlag == '1' ? '2' : '1' //bnfFlag 0-法定受益人 1-指定受益人
+ if (res.orderDTO.orderInfoDTO.bnfFlag == null) {
+ localStorage.setItem('salePageFlag', this.salePageFlag)
+ }
+ if (res.orderDTO.insuredDTOs[0].bnfDTOs !== null) {
+ this.beneficiaries = this.beneficiaries.concat(res.orderDTO.insuredDTOs[0].bnfDTOs)
+ localStorage.beneficiaryInfo = JSON.stringify(res.orderDTO.insuredDTOs[0].bnfDTOs)
+ } else {
+ localStorage.beneficiaryInfo = []
+ }
}
})
}
this.insuredPerson = JSON.parse(localStorage.saleInsuredPersonInfo).name
},
mounted() {
- // EWebBridge.webCallAppInJs('webview_left_button', {
- // intercept: '1' //是否拦截原生返回事件 1是 其他否
- // })
- // window.appCallBack = this.appCallBack
+ setTimeout(() => {
+ EWebBridge.webCallAppInJs('webview_left_button', {
+ img: this.$assetsUrl + 'images/del-close-btn@3x.png',
+ intercept: '1' //是否拦截原生返回事件 1是 其他否
+ })
+ }, 100)
+ window.appCallBack = this.appCallBack
document.body.style.backgroundColor = '#fff'
},
beforeRouteLeave(to, from, next) {
@@ -107,15 +120,35 @@ export default {
next()
},
methods: {
- // appCallBack() {
- // this.$jump({
- // flag: 'goBack',
- // extra: {
- // refresh: '1', //是否返回后刷新0:否,1:是
- // 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: '电子投保单列表',
+ forbidSwipeBack: 1, //当前页面禁止右滑返回
+ url: location.origin + `/#/sale/list`
+ },
+ routerInfo: {
+ path: `/sale/list`,
+ type: '1'
+ }
+ })
+ })
+ .catch(() => {
+ return
+ })
+ }
+ },
//告知信息
nextStep() {
if (this.type == 2 && this.beneficiaries.length == 0) {
@@ -136,7 +169,7 @@ export default {
insuredDTOs: [
{
insuredId: JSON.parse(localStorage.saleInsuredPersonInfo).insuredId,
- bnfDTOs: this.beneficiaries
+ bnfDTOs: this.bnfFlag == '0' ? [] : this.beneficiaries
}
],
paymentDTO: {},
@@ -152,15 +185,17 @@ export default {
// console.log(res)
if (res.result == 0) {
localStorage.removeItem('applicant')
+ localStorage.removeItem('fromAddBeneficiaryInfo')
//页面跳转
this.$jump({
flag: 'h5',
extra: {
- url: location.origin + '/#/sale/notifyingMessage',
+ forbidSwipeBack: '1',
+ url: location.origin + `/#/sale/notifyingMessage`,
needRefresh: '1'
},
routerInfo: {
- path: '/sale/notifyingMessage'
+ path: `/sale/notifyingMessage`
}
})
} else {
@@ -224,7 +259,6 @@ export default {
// 删除页面中的对应数据
this.beneficiaries.splice(index, 1)
-
})
.catch(() => {
// on cancel
diff --git a/src/views/ebiz/sale/Detail.vue b/src/views/ebiz/sale/Detail.vue
index a0920faec..ffbb95a02 100644
--- a/src/views/ebiz/sale/Detail.vue
+++ b/src/views/ebiz/sale/Detail.vue
@@ -2,7 +2,7 @@
-
+
@@ -64,7 +64,7 @@
-
+
diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue
index 13963a2b4..dc32f2a6b 100644
--- a/src/views/ebiz/sale/InsuredInfo.vue
+++ b/src/views/ebiz/sale/InsuredInfo.vue
@@ -1,6 +1,7 @@
+
基本信息
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio } from 'vant'
import SelectRadio from '@/components/ebiz/SelectRadio'
+import IndexBar from '@/components/ebiz/sale/IndexBar'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
@@ -367,7 +369,8 @@ export default {
[Area.name]: Area,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
- [IdentityCardScan.name]: IdentityCardScan
+ [IdentityCardScan.name]: IdentityCardScan,
+ [IndexBar.name]: IndexBar
},
data() {
return {
@@ -468,12 +471,14 @@ export default {
customerShowPicker: false,
occupationShowPicker: false,
timeId: null,
- idLimit: false //证件起止日期是否只读
+ idLimit: false, //证件起止日期是否只读
+
+ salePageFlag: '1'
}
},
created() {
// document.body.style.backgroundColor = '#F5F5F5'
- //如果是编辑进来
+ //如果是编辑/导航进来
this.isElecCont = '0'
if (this.$route.query.edit) {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
@@ -483,19 +488,42 @@ export default {
//是否长期
this.userInfo.effectiveDateType = res.orderDTO.appntDTO.effectiveDateType == 'false' ? false : true
//有无社保
- this.userInfo.medical = '1'
+ this.userInfo.medical = res.orderDTO.appntDTO.medical
//设为联系地址
// this.userInfo.addressStatus = '0'
//证件类型
- this.userInfo.idType = '1'
+ // this.userInfo.idType = '1'
//国家/地区
- this.userInfo.nativeplace = '1'
+ // this.userInfo.nativeplace = '1'
this.$utils.intLocalStorage(res)
+
+ if (this.$route.query.edit && !this.$route.query.salePageFlag) {
+ //如果从保单列表点击编辑按钮进入
+ this.salePageFlag = '1'
+ localStorage.setItem('salePageFlag', this.salePageFlag)
+ } else {
+ this.homeName = getAreaName([
+ { code: res.orderDTO.appntDTO.homeProvince },
+ { code: res.orderDTO.appntDTO.homeCity },
+ { code: res.orderDTO.appntDTO.homeArea }
+ ]) //获取家庭地址
+ this.census = getAreaName([{ code: res.orderDTO.appntDTO.householdProvince }, { code: res.orderDTO.appntDTO.householdCity }]) //获取户籍
+ }
}
})
+ } else {
+ localStorage.setItem('salePageFlag', this.salePageFlag)
+ localStorage.setItem('saleInsuredInfo', '')
}
},
mounted() {
+ setTimeout(() => {
+ // eslint-disable-next-line no-undef
+ EWebBridge.webCallAppInJs('webview_left_button', {
+ img: this.$assetsUrl + 'images/del-close-btn@3x.png',
+ intercept: '1' //是否拦截原生返回事件 1是 其他否
+ })
+ }, 100)
// 筛选按钮的点击事件
window.appCallBack = this.appCallBack
},
@@ -507,21 +535,49 @@ 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: '电子投保单列表',
+ forbidSwipeBack: 1, //当前页面禁止右滑返回
+ 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() {
@@ -547,7 +603,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') {
@@ -895,38 +954,42 @@ export default {
infoUpdate() {
//local 里面是否存有险种信息
let chooseProductCodes = localStorage.chooseProductCodes && JSON.parse(localStorage.chooseProductCodes)
- if (chooseProductCodes && chooseProductCodes.length) {
+ // if (chooseProductCodes && chooseProductCodes.length) {
+ if (localStorage.saleInsuredInfo) {
console.log('haha')
//获取险种列表
//取出local中的投保人信息
let saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo)
- //如果 性别, 出生日期, 有无社保, 职业 发生变化
- if (this.userInfo.sex != saleInsuredInfo.sex || this.userInfo.birthday != saleInsuredInfo.birthday) {
+ //如果 姓名, 性别, 出生日期, 有无社保, 职业 ,婚姻情况,发生变化
+ if (
+ this.userInfo.sex != saleInsuredInfo.sex ||
+ this.userInfo.birthday != saleInsuredInfo.birthday
+ ) {
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()
+ // this.save('isShow=1')
+ })
+ .catch(() => {
+ return
+ })
}
}
this.save()
},
- async save(str = '') {
+ async save() {
let params = {
orderType: 'APPNT_ORDER',
orderDTO: {
@@ -938,31 +1001,21 @@ export default {
appntDTO: {}
}
}
- // let params = {
- // operateType: 'authmobile',
- // type: 'H5',
- // system: 'agentApp',
- // operateCodeType: '0'
- // }
-
+ let str = ''
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'
+ } else {
+ str = 'edit=1&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
@@ -1110,7 +1163,7 @@ export default {
return this.$toast('体重输入有误')
}
},
- getRelatedData(val,source) {
+ getRelatedData(val, source) {
if (this.userInfo.idType != '1') {
return
}
@@ -1124,8 +1177,8 @@ export default {
this.userInfo.birthday = idToData(val).birthday
this.userInfo.sex = idToData(val).sex
if (idToData(val).age > 45) {
- if(source){
- this.userInfo.effectiveDateType = true
+ if (source) {
+ this.userInfo.effectiveDateType = true
}
this.effectiveDateTypeAble = false
} else {
diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue
index 1c91e87df..b7f936985 100644
--- a/src/views/ebiz/sale/InsuredPerson.vue
+++ b/src/views/ebiz/sale/InsuredPerson.vue
@@ -1,6 +1,7 @@
+
基本信息
{
@@ -624,55 +628,65 @@ export default {
this.userInfo.effectiveDateType = insuredPersonInfo.effectiveDateType == 'false' ? false : true
//设为联系地址
// this.userInfo.addressStatus = '0'
- //证件类型
- this.userInfo.idType = '1'
- //国家/地区
- this.userInfo.nativeplace = '1'
// if (this.$route.query.isShow) {
- //户籍
- if (insuredPersonInfo.householdProvince.length) {
- this.census = getAreaName([{ code: insuredPersonInfo.householdProvince }, { code: insuredPersonInfo.householdCity }])
- }
- //单位地址
- // if (insuredPersonInfo.companyProvince.length) {
- // this.areaName = getAreaName([
- // { code: insuredPersonInfo.companyProvince },
- // { code: insuredPersonInfo.companyCity },
- // { code: insuredPersonInfo.companyArea }
- // ])
- // }
- //家庭地址
- if (insuredPersonInfo.homeProvince.length) {
- this.homeName = getAreaName([
- { code: insuredPersonInfo.homeProvince },
- { code: insuredPersonInfo.homeCity },
- { code: insuredPersonInfo.homeArea }
- ])
- }
- //是否长期
- this.userInfo.effectiveDateType = insuredPersonInfo.effectiveDateType == 'false' ? false : true
- // let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
- // this.userInfo = saleInsuredPersonInfo
- // this.census = getAreaName([{ code: saleInsuredPersonInfo.householdProvince }, { code: saleInsuredPersonInfo.householdCity }]) //户籍
- // this.areaName = getAreaName([
- // { code: saleInsuredPersonInfo.companyProvince },
- // { code: saleInsuredPersonInfo.companyCity },
- // { code: saleInsuredPersonInfo.companyArea }
- // ]) //单位地址
- // this.homeName = getAreaName([
- // { code: saleInsuredPersonInfo.homeProvince },
- // { code: saleInsuredPersonInfo.homeCity },
- // { code: saleInsuredPersonInfo.homeArea }
- // ]) //家庭地址
+ //户籍
+ if (insuredPersonInfo.householdProvince.length) {
+ this.census = getAreaName([{ code: insuredPersonInfo.householdProvince }, { code: insuredPersonInfo.householdCity }])
+ }
+ //单位地址
+ // if (insuredPersonInfo.companyProvince.length) {
+ // this.areaName = getAreaName([
+ // { code: insuredPersonInfo.companyProvince },
+ // { code: insuredPersonInfo.companyCity },
+ // { code: insuredPersonInfo.companyArea }
+ // ])
+ // }
+ //家庭地址
+ if (insuredPersonInfo.homeProvince.length) {
+ this.homeName = getAreaName([
+ { code: insuredPersonInfo.homeProvince },
+ { code: insuredPersonInfo.homeCity },
+ { code: insuredPersonInfo.homeArea }
+ ])
+ }
+ //是否长期
+ this.userInfo.effectiveDateType = insuredPersonInfo.effectiveDateType == 'false' ? false : true
+ // let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
+ // this.userInfo = saleInsuredPersonInfo
+ // this.census = getAreaName([{ code: saleInsuredPersonInfo.householdProvince }, { code: saleInsuredPersonInfo.householdCity }]) //户籍
+ // this.areaName = getAreaName([
+ // { code: saleInsuredPersonInfo.companyProvince },
+ // { code: saleInsuredPersonInfo.companyCity },
+ // { code: saleInsuredPersonInfo.companyArea }
+ // ]) //单位地址
+ // this.homeName = getAreaName([
+ // { code: saleInsuredPersonInfo.homeProvince },
+ // { code: saleInsuredPersonInfo.homeCity },
+ // { code: saleInsuredPersonInfo.homeArea }
+ // ]) //家庭地址
// }
}
} else {
return this.$toast(res.resultMessage)
}
})
+ } else {
+ localStorage.setItem('salePageFlag', this.salePageFlag)
+ }
+ if (this.$route.query.edit && !this.$route.query.salePageFlag) {
+ //如果从保单列表点击编辑按钮进入
+ this.salePageFlag = '2'
+ localStorage.setItem('salePageFlag', this.salePageFlag)
}
},
mounted() {
+ setTimeout(() => {
+ // eslint-disable-next-line no-undef
+ EWebBridge.webCallAppInJs('webview_left_button', {
+ img: this.$assetsUrl + 'images/del-close-btn@3x.png',
+ intercept: '1' //是否拦截原生返回事件 1是 其他否
+ })
+ }, 100)
window.appCallBack = this.appCallBack
// // document.body.style.backgroundColor = '#F5F5F5'
},
@@ -997,22 +1011,50 @@ 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: '电子投保单列表',
+ forbidSwipeBack: 1, //当前页面禁止右滑返回
+ 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
}
},
//选择客户
@@ -1259,7 +1301,8 @@ export default {
//local 里面是否存有险种信息
// debugger
let chooseProductCodes = localStorage.chooseProductCodesNew && JSON.parse(localStorage.chooseProductCodesNew)
- if (chooseProductCodes && chooseProductCodes.length) {
+ // if (chooseProductCodes && chooseProductCodes.length) {
+ if (localStorage.saleInsuredPersonInfo) {
//获取险种列表
// let chooseProductCodes = JSON.parse(localStorage.chooseProductCodes)
//取出local中的被保险人信息
@@ -1274,22 +1317,23 @@ export default {
this.userInfo.occupationCode != saleInsuredPersonInfo.occupationCode
) {
//提示用户
- 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()
@@ -1310,17 +1354,21 @@ export default {
delete this.userInfo.mediaDTOS
}
params.orderDTO.insuredDTOs = [this.userInfo]
+ let str = ''
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.relationToAppnt = this.userInfo.relationToAppnt
+ localStorage.salePageFlag = '3'
+ // localStorage.relationToAppnt = this.userInfo.relationToAppnt
+
+ //deleteFlag 0-该页面修改了信息且修改的信息影响到后面流程,后台进行了删除数据的操作
+ if (resultData.deleteFlag == '0') {
+ localStorage.salePageFlag = '3'
+ } else if (!this.$route.query.salePageFlag) {
+ //如果从保单列表编辑按钮/新增保单进入
+ localStorage.salePageFlag = '3'
+ } else {
+ str = 'edit=1&salePageFlag=3'
+ }
localStorage.isFrom = 'sale'
//清理计时器
window.clearInterval(this.timeId)
@@ -1330,10 +1378,11 @@ export default {
this.$jump({
flag: 'h5',
extra: {
- url: location.origin + '/#/common/selectedProduct'
+ forbidSwipeBack: '1',
+ url: location.origin + `/#/common/selectedProduct?${str}`
},
routerInfo: {
- path: '/common/selectedProduct'
+ path: `/common/selectedProduct?${str}`
}
})
} else {
@@ -1500,7 +1549,7 @@ export default {
// this.idLimit = true
// this.isRequired = false
if (from) {
- this.userInfo.effectiveDateType = true
+ this.userInfo.effectiveDateType = true
}
this.effectiveDateTypeAble = false
} else {
diff --git a/src/views/ebiz/sale/List.vue b/src/views/ebiz/sale/List.vue
index 4105edc3b..b4f9d26de 100644
--- a/src/views/ebiz/sale/List.vue
+++ b/src/views/ebiz/sale/List.vue
@@ -101,7 +101,7 @@
>
{
+ EWebBridge.webCallAppInJs('webview_left_button', {
+ intercept: '1' //是否拦截原生返回事件 1是 其他否
+ })
+ }, 100)
+ window.appCallBack = this.appCallBack
this.loadMore()
},
methods: {
+ appCallBack(data) {
+ if (data.trigger == 'left_button_click') {
+ this.$jump({
+ flag: 'home'
+ })
+ }
+ },
//分页用
loadMore() {
let pageInfo = {
@@ -398,6 +411,7 @@ export default {
this.$jump({
flag: 'h5',
extra: {
+ forbidSwipeBack: '1',
url: location.origin + `/#${url}`
},
routerInfo: { path: url }
@@ -457,7 +471,7 @@ export default {
this.$jump({
flag: 'h5',
extra: {
- url: location.origin + '/#/sale/insuredInfo',
+ url: location.origin + '/#/sale/insuredInfo'
},
routerInfo: { path: '/sale/insuredInfo' }
})
diff --git a/src/views/ebiz/sale/NotifyingMessage.vue b/src/views/ebiz/sale/NotifyingMessage.vue
index 322c24f1d..a0500cef3 100644
--- a/src/views/ebiz/sale/NotifyingMessage.vue
+++ b/src/views/ebiz/sale/NotifyingMessage.vue
@@ -1,13 +1,18 @@
-
-
告知项目
-
-
一键全否
+
-
+
@@ -65,7 +70,7 @@
-
+
1 ? true : false
- console.log('this.is ====',this.isExistAdditionalRisk)
+ console.log('this.is ====', this.isExistAdditionalRisk)
this.relationToAppnt = res.orderDTO.insuredDTOs[0].relationToAppnt
this.$utils.intLocalStorage(res)
this.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo'))
this.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
- // 获取告知消息
- this.information()
+ //如果返回参数存在曾经提交的告知信息,获取曾经提交的告知信息
+ let insuredFinanceImpartDTO = res.orderDTO.appntDTO.financeImpartDTO //投保人财务告知集合
+ let insuredImpartDTO = res.orderDTO.appntDTO.impartDTO //投保人健康告知集合
+ let insuredPersionFinanceImpartDTO = res.orderDTO.insuredDTOs[0].financeImpartDTO //被保人财务告知集合
+ let insuredPersionImpartDTO = res.orderDTO.insuredDTOs[0].impartDTO //被保人健康告知集合
+ if (
+ insuredFinanceImpartDTO.impartItemDTOS ||
+ insuredImpartDTO.impartItemDTOS ||
+ insuredPersionFinanceImpartDTO.impartItemDTOS ||
+ insuredPersionImpartDTO.impartItemDTOS
+ ) {
+ if (insuredFinanceImpartDTO.impartItemDTOS) {
+ this.impartDTOS.push({ impartItemDTOS: insuredFinanceImpartDTO.impartItemDTOS, impartType: insuredFinanceImpartDTO.impartType })
+ }
+ if (insuredImpartDTO.impartItemDTOS) {
+ this.impartDTOS.push({ impartItemDTOS: insuredImpartDTO.impartItemDTOS, impartType: insuredImpartDTO.impartType })
+ }
+ if (insuredPersionFinanceImpartDTO.impartItemDTOS) {
+ this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType })
+ }
+ if (insuredPersionImpartDTO.impartItemDTOS) {
+ this.impartDTOS.push({ impartItemDTOS: insuredPersionImpartDTO.impartItemDTOS, impartType: insuredPersionImpartDTO.impartType })
+ }
+ this.impartDTOS.map(v => {
+ v.impartItemDTOS.map(i => {
+ i.isSelect =
+ this.formatDateTime() +
+ Math.random()
+ .toString(36)
+ .substr(2)
+ i.show = false
+ if (i.impartAnswer == '0') {
+ i.show = true
+ } else {
+ i.questions[0].answer = ''
+ }
+ })
+ })
+ } else {
+ // 获取告知消息
+ this.information()
+ }
//投被同人取到年纪和性别去判断是是否显示内容
this.saleInsuredAge = utilsAge.getAge(this.saleInsuredInfo.birthday, new Date())
this.saleInsuredSex = this.saleInsuredInfo.sex
@@ -192,12 +239,62 @@ export default {
this.productCodes = JSON.parse(localStorage.chooseProductCodes)
//this.information()
},
+ mounted() {
+ setTimeout(() => {
+ EWebBridge.webCallAppInJs('webview_left_button', {
+ img: this.$assetsUrl + 'images/del-close-btn@3x.png',
+ intercept: '1' //是否拦截原生返回事件 1是 其他否
+ })
+ }, 100)
+ window.appCallBack = this.appCallBack
+ document.body.style.backgroundColor = '#F5F5F5'
+ if (!this.$route.query.edit) {
+ //如果不是编辑/导航条跳转进来的
+ localStorage.setItem('salePageFlag', this.salePageFlag)
+ } else if (this.$route.query.edit && !this.$route.query.salePageFlag) {
+ //如果从保单列表点击编辑按钮进入
+ this.salePageFlag = '5'
+ localStorage.setItem('salePageFlag', this.salePageFlag)
+ } else if (this.$route.query.salePageFlag) {
+ //如果是从导航栏点击进入
+ this.salePageFlag = localStorage.salePageFlag
+ }
+ },
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: '电子投保单列表',
+ forbidSwipeBack: 1, //当前页面禁止右滑返回
+ url: location.origin + `/#/sale/list`
+ },
+ routerInfo: {
+ path: `/sale/list`,
+ type: '1'
+ }
+ })
+ })
+ .catch(() => {
+ return
+ })
+ }
+ },
// 一键全否
allFalse() {
let that = this
- // alert('1')
that.impartDTOS.map(it => {
+ console.log('it', it.impartItemDTOS)
it.impartItemDTOS.map(itm => {
itm.impartAnswer = '1'
})
@@ -486,6 +583,10 @@ export default {
saveInformation(data).then(res => {
if (res.result == '0') {
localStorage.removeItem('changeCard')
+ if (!this.$route.query.salePageFlag) {
+ //不是从导航栏进入
+ localStorage.salePageFlag = '6'
+ }
that.$jump({
flag: 'h5',
extra: {
@@ -523,10 +624,10 @@ export default {
that.$jump({
flag: 'h5',
extra: {
- url: location.origin + '/#/sale/accountInformation'
+ url: location.origin + '/#/sale/AccountInformation'
},
routerInfo: {
- path: '/sale/accountInformation'
+ path: '/sale/AccountInformation'
}
})
} else {
@@ -575,10 +676,6 @@ export default {
}
},
- mounted() {
- document.body.style.backgroundColor = '#F5F5F5'
- // this.$toast('11111')
- },
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
@@ -590,7 +687,8 @@ export default {
[Radio.name]: Radio,
[Field.name]: Field,
[CellGroup.name]: CellGroup,
- [Icon.name]: Icon
+ [Icon.name]: Icon,
+ [IndexBar.name]: IndexBar
}
}
diff --git a/src/views/ebiz/sale/Result.vue b/src/views/ebiz/sale/Result.vue
index bcabbcdd4..98c69a324 100644
--- a/src/views/ebiz/sale/Result.vue
+++ b/src/views/ebiz/sale/Result.vue
@@ -89,7 +89,10 @@ export default {
goback() {
// console.log('111')
this.$jump({
- flag: 'goBack',
+ flag: 'h5',
+ extra: {
+ url: location.origin + '/#/sale/list'
+ },
routerInfo: {
path: '/sale/list'
}
diff --git a/src/views/ebiz/sale/SignatureConfirmation.vue b/src/views/ebiz/sale/SignatureConfirmation.vue
index 16fc3ef25..b42f9cc5b 100644
--- a/src/views/ebiz/sale/SignatureConfirmation.vue
+++ b/src/views/ebiz/sale/SignatureConfirmation.vue
@@ -1,6 +1,9 @@
+
+
+
尊敬的
@@ -215,24 +218,21 @@
-
-
- 为确保是您本人操作,短信验证码已发送至您手机号{{ encyCustomerMobile }},请您输入验证码以完成后续投保操作。
-
+
+ 为确保是您本人操作,短信验证码已发送至您手机号{{ encyCustomerMobile }},请您输入验证码以完成后续投保操作。
-
- {{
+
+ {{
codeDisabled ? `${countDown}s后重新获取` : '获取验证码'
- }}
+ }}
-
+
@@ -240,9 +240,10 @@