1、进入国富app建议书界面,在生成建议书过程中,点击每个页面右上角的关闭按钮

This commit is contained in:
lyt
2023-04-23 17:17:06 +08:00
parent d791c95a40
commit 177e9faf31
7 changed files with 201 additions and 96 deletions

View File

@@ -556,12 +556,27 @@ export default {
} }
}, },
mounted() { mounted() {
this.isFrom = window.localStorage.isFrom
this.$jump({ this.$jump({
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '保费计算' title: '保费计算'
}, },
}) })
if(this.isFrom === 'proposal'){
// eslint-disable-next-line no-undef
setTimeout(() => {
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/del-close.png',
route: { flag: '', extra: {} }
}
]
})
}, 500)
}
window.appCallBack = this.appCallBack
getAgentInfo({}).then(res => { getAgentInfo({}).then(res => {
// branchType N1、1代表个险渠道 和 N5、5 代表中介渠道N代表内勤 // branchType N1、1代表个险渠道 和 N5、5 代表中介渠道N代表内勤
if (res.branchType == 'N1' || res.branchType == '1') { if (res.branchType == 'N1' || res.branchType == '1') {
@@ -589,6 +604,35 @@ export default {
} }
}, },
methods: { methods: {
appCallBack(data) {
if (data.trigger == 'right_button_click' && localStorage.isFrom == 'proposal') {
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 + `/#/proposal/list`
},
routerInfo: {
path: `/proposal/list`,
type: '1'
}
})
})
.catch(() => {
return
})
}
},
renewalShow(productCode) { renewalShow(productCode) {
let codes = ['GFRS_M0016', 'GFRS_M0005', 'GFRS_M0018','GFRS_M0070'] let codes = ['GFRS_M0016', 'GFRS_M0005', 'GFRS_M0018','GFRS_M0070']
return codes.find((item) => { return codes.find((item) => {
@@ -599,7 +643,6 @@ export default {
async init() { async init() {
// 获取是否从建议书过来的 // 获取是否从建议书过来的
let that = this let that = this
this.isFrom = window.localStorage.isFrom
//获取投保人信息 //获取投保人信息
if (this.$CacheUtils.getLocItem('saleInsuredInfo')) { if (this.$CacheUtils.getLocItem('saleInsuredInfo')) {
this.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')) this.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))

View File

@@ -180,13 +180,17 @@ export default {
} }
//建议书--右上角为退出流程键(到建议书列表)×,并清除浏览记录 //建议书--右上角为退出流程键(到建议书列表)×,并清除浏览记录
if (localStorage.isFrom == 'proposal') { if (localStorage.isFrom == 'proposal') {
setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', { setTimeout(() => {
img: this.$assetsUrl + 'images/del-close-btn@3x.png', EWebBridge.webCallAppInJs('webview_right_button', {
intercept: '1' //是否拦截原生返回事件 1是 其他否 btns: [
}) {
}, 100) img: this.$assetsUrl + 'images/del-close.png',
route: { flag: '', extra: {} }
}
]
})
}, 500)
} }
window.appCallBack = this.appCallBack window.appCallBack = this.appCallBack
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'

View File

@@ -23,7 +23,7 @@
:flag="true" :flag="true"
></FieldDatePicter> ></FieldDatePicter>
<div class="border-bottom"> <div class="border-bottom">
<van-field :border="false" required v-model="appntDTO.age" clearable label="年龄" @blur="ageBlur" v-validate="'required'" placeholder="投保人年龄" /> <van-field type="digit" :border="false" required v-model="appntDTO.age" clearable label="年龄" name="年龄" @blur="ageBlur" v-validate="'required|onlyInteger'" placeholder="投保人年龄" />
<!-- <van-field :border="false" v-model="appntDTO.age" clearable label="年龄" v-validate="'appntAge'" placeholder="投保人年龄" :readonly="ageFlag" /> --> <!-- <van-field :border="false" v-model="appntDTO.age" clearable label="年龄" v-validate="'appntAge'" placeholder="投保人年龄" :readonly="ageFlag" /> -->
</div> </div>
<occupation-picker <occupation-picker
@@ -151,12 +151,15 @@ export default {
reset:"1" //1重制 其他值不变 reset:"1" //1重制 其他值不变
}) })
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', { EWebBridge.webCallAppInJs('webview_right_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png', btns: [
intercept: '1' //是否拦截原生返回事件 1是 其他否 {
img: this.$assetsUrl + 'images/del-close.png',
route: { flag: '', extra: {} }
}
]
}) })
}, 100) }, 500)
// 筛选按钮的点击事件 // 筛选按钮的点击事件
window.appCallBack = this.appCallBack window.appCallBack = this.appCallBack
}, },
@@ -195,45 +198,40 @@ export default {
}) })
}, },
appCallBack(data) { appCallBack(data) {
// 筛选按钮的点击事件
this.$jump({
flag: 'navigation',
extra: {
title: '投保人信息',
hiddenRight: '1'
}
})
if (this.currentPopupIndex == 1) { if (this.currentPopupIndex == 1) {
this.customerShowPicker = false this.customerShowPicker = false
this.currentPopupIndex = ''
} else if (this.currentPopupIndex == 2) { } else if (this.currentPopupIndex == 2) {
this.occupationShowPicker = false this.occupationShowPicker = false
} this.currentPopupIndex = ''
if (data.trigger == 'right_button_click') { } else if (this.currentPopupIndex == '') {
return this.$dialog if (data.trigger == 'right_button_click') {
.confirm({ return this.$dialog
className: 'dialog-delete', .confirm({
title: '提示', className: 'dialog-delete',
message: '退出流程可能会丢失部分数据,是否确认退出?', title: '提示',
cancelButtonColor: '#E9332E', message: '退出流程可能会丢失部分数据,是否确认退出?',
confirmButtonColor: '#FFFFFF' cancelButtonColor: '#E9332E',
}) confirmButtonColor: '#FFFFFF'
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '建议书列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/proposal/list`
},
routerInfo: {
path: `/proposal/list`,
type: '1'
}
}) })
}) .then(() => {
.catch(() => { this.$jump({
return flag: 'h5',
}) extra: {
title: '建议书列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/proposal/list`
},
routerInfo: {
path: `/proposal/list`,
type: '1'
}
})
})
.catch(() => {
return
})
}
} }
}, },
chooseOccupation() { chooseOccupation() {
@@ -241,7 +239,7 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '投保人信息', title: '投保人信息',
hiddenRight: '1' // hiddenRight: '1'
} }
}) })
this.occupationShowPicker = false this.occupationShowPicker = false
@@ -272,7 +270,7 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '投保人信息', title: '投保人信息',
hiddenRight: '1' // hiddenRight: '1'
} }
}) })
let { customerName, customerSex, birthday, customerPhone, age, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data let { customerName, customerSex, birthday, customerPhone, age, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data

View File

@@ -137,6 +137,18 @@ export default {
title: '选择被保险人' title: '选择被保险人'
}, },
}) })
setTimeout(() => {
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/del-close.png',
route: { flag: '', extra: {} }
}
]
})
}, 500)
window.appCallBack = this.appCallBack
if (this.$route.query.proposalOrderNo) { if (this.$route.query.proposalOrderNo) {
this.proposalOrderNo = this.$route.query.proposalOrderNo this.proposalOrderNo = this.$route.query.proposalOrderNo
}else if (this.$CacheUtils.getLocItem('proposalNo')) { }else if (this.$CacheUtils.getLocItem('proposalNo')) {
@@ -210,6 +222,35 @@ export default {
}) })
}, },
methods: { methods: {
appCallBack(data) {
if (data.trigger == 'right_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 + `/#/proposal/list`
},
routerInfo: {
path: `/proposal/list`,
type: '1'
}
})
})
.catch(() => {
return
})
}
},
stepIn() { stepIn() {
this.$router.push({ path: '/proposal/appnt' }) this.$router.push({ path: '/proposal/appnt' })
// this.$jump({ // this.$jump({

View File

@@ -30,7 +30,7 @@
@confirm="dateConfirm" @confirm="dateConfirm"
></FieldDatePicter> ></FieldDatePicter>
<div class="border-bottom"> <div class="border-bottom">
<van-field type="digit" :readonly="disabled" v-model="insured.insuredAge" required v-validate="'required'" :value="ageShow" @blur="ageBlur" clearable label="年龄" placeholder="被保险人年龄" /> <van-field type="digit" :readonly="disabled" v-model="insured.insuredAge" required v-validate="'required|onlyInteger'" :value="ageShow" @blur="ageBlur" clearable label="年龄" name="年龄" placeholder="被保险人年龄" />
<!-- <van-field :readonly="disabled" :value="ageShow" @input="changeAgeInput($event)" clearable label="年龄" placeholder="被保险人年龄" /> --> <!-- <van-field :readonly="disabled" :value="ageShow" @input="changeAgeInput($event)" clearable label="年龄" placeholder="被保险人年龄" /> -->
</div> </div>
<occupation-picker <occupation-picker
@@ -143,12 +143,15 @@ export default {
methods: { methods: {
init() { init() {
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef EWebBridge.webCallAppInJs('webview_right_button', {
EWebBridge.webCallAppInJs('webview_right_button', { btns: [
img: this.$assetsUrl + 'images/del-close-btn@3x.png', {
intercept: '1' //是否拦截原生返回事件 1是 其他否 img: this.$assetsUrl + 'images/del-close.png',
}) route: { flag: '', extra: {} }
}, 100) }
]
})
}, 500)
window.appCallBack = this.appCallBack window.appCallBack = this.appCallBack
this.localInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) this.localInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
let { relationToAppnt, relationName } = this.localInfo let { relationToAppnt, relationName } = this.localInfo
@@ -231,45 +234,38 @@ export default {
}) })
}, },
appCallBack(data) { appCallBack(data) {
// 筛选按钮的点击事件
this.$jump({
flag: 'navigation',
extra: {
title: '被保险人信息',
hiddenRight: '1'
}
})
if (this.currentPopupIndex == 1) { if (this.currentPopupIndex == 1) {
this.customerShowPicker = false this.customerShowPicker = false
} else if (this.currentPopupIndex == 2) { } else if (this.currentPopupIndex == 2) {
this.occupationShowPicker = false this.occupationShowPicker = false
} } else if (this.currentPopupIndex == '') {
if (data.trigger == 'right_button_click') { if (data.trigger == 'right_button_click') {
return this.$dialog return this.$dialog
.confirm({ .confirm({
className: 'dialog-delete', className: 'dialog-delete',
title: '提示', title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?', message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E', cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF' confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '建议书列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/proposal/list`
},
routerInfo: {
path: `/proposal/list`,
type: '1'
}
}) })
}) .then(() => {
.catch(() => { this.$jump({
return flag: 'h5',
}) extra: {
title: '建议书列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/proposal/list`
},
routerInfo: {
path: `/proposal/list`,
type: '1'
}
})
})
.catch(() => {
return
})
}
} }
}, },
chooseOccupation() { chooseOccupation() {
@@ -277,7 +273,7 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '被保险人信息', title: '被保险人信息',
hiddenRight: '1' // hiddenRight: '1'
} }
}) })
this.occupationShowPicker = false this.occupationShowPicker = false
@@ -402,7 +398,7 @@ export default {
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '被保险人信息', title: '被保险人信息',
hiddenRight: '1' // hiddenRight: '1'
} }
}) })
console.log('data == ', data) console.log('data == ', data)

View File

@@ -124,7 +124,15 @@ export default {
this.isCheck = res.result this.isCheck = res.result
}) })
}, },
mounted() {}, mounted() {
this.$jump({
flag: 'navigation',
extra: {
title: '建议书列表',
hiddenRight: '1'
}
})
},
methods: { methods: {
initThisPage(showFlag) { initThisPage(showFlag) {
if (showFlag) { if (showFlag) {
@@ -170,7 +178,21 @@ export default {
list = formatRiskList(list, 'insuredDTOs', 'riskDTOLst') //格式化数据为本地显示结果 list = formatRiskList(list, 'insuredDTOs', 'riskDTOLst') //格式化数据为本地显示结果
this.proposalList = this.proposalList.concat(list) this.proposalList = this.proposalList.concat(list)
console.log(this.proposalList) this.proposalList.forEach(item => {
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
if(!item.appntDTO.name){
let sexAppnt = item.appntDTO.sex == '0'?'男':'女'
item.appntDTO.name = sexAppnt + item.appntDTO.age+'岁'
}
if(item.insuredDTOs.length){
item.insuredDTOs.forEach(item01 => {
if(!item01.name){
let sex = item01.sex == '0'?'男':'女'
item01.name = sex + item01.insuredAge+'岁'
}
})
}
})
if (this.proposalList.length == 0) { if (this.proposalList.length == 0) {
this.isSuccess = false this.isSuccess = false
} }

View File

@@ -407,12 +407,13 @@ export default {
return Number(val*0.085).toFixed(2) return Number(val*0.085).toFixed(2)
}, },
}, },
async mounted() { mounted() {
this.$jump({ this.$jump({
flag: 'navigation', flag: 'navigation',
extra: { extra: {
title: '建议书预览' title: '建议书预览',
}, hiddenRight: '1'
}
}) })
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef