mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 20:56:45 +08:00
权限
This commit is contained in:
committed by
li.jieyu@ebiz-digits.com
parent
3a6436ccb9
commit
02bb1b42ef
@@ -90,3 +90,12 @@ export function getCheckModelAgentInfo(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 校验当前用户权限
|
||||||
|
export function funcPermCheck(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/funcPerm/check', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { Tab, Tabs, List, Row, Col, Icon, Cell, Sticky } from 'vant'
|
import { Tab, Tabs, List, Row, Col, Icon, Cell, Sticky } from 'vant'
|
||||||
import { getProductInfo } from '@/api/ebiz/product/product.js'
|
import { getProductInfo } from '@/api/ebiz/product/product.js'
|
||||||
|
import { funcPermCheck } from '@/api/ebiz/common/common'
|
||||||
import riskRules from '../common/risk-rules.js'
|
import riskRules from '../common/risk-rules.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -46,6 +47,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isCheck: null, //查看是否有权限
|
||||||
active: 2,
|
active: 2,
|
||||||
docuList: [], // 产品资料文件
|
docuList: [], // 产品资料文件
|
||||||
introductImages: [] // 产品特色图片
|
introductImages: [] // 产品特色图片
|
||||||
@@ -57,6 +59,9 @@ export default {
|
|||||||
let code = this.$route.params.productDetailCode
|
let code = this.$route.params.productDetailCode
|
||||||
console.log(code)
|
console.log(code)
|
||||||
this.getProductDetail(code)
|
this.getProductDetail(code)
|
||||||
|
funcPermCheck({}).then(res => {
|
||||||
|
this.isCheck = res.result
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goDocu(url, type, name) {
|
goDocu(url, type, name) {
|
||||||
@@ -98,6 +103,10 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async goInsure() {
|
async goInsure() {
|
||||||
|
if (this.isCheck == '1') {
|
||||||
|
//校验该代理人是否有该产品的售卖权限
|
||||||
|
return this.$toast('您暂无使用权限!如有问题咨询,请联系个险业务部。')
|
||||||
|
}
|
||||||
localStorage.orderNo = ''
|
localStorage.orderNo = ''
|
||||||
localStorage.chooseProductCodes = '' //置空所选险种
|
localStorage.chooseProductCodes = '' //置空所选险种
|
||||||
let path = `/sale/insuredInfo`
|
let path = `/sale/insuredInfo`
|
||||||
@@ -106,7 +115,7 @@ export default {
|
|||||||
flagPermission = await riskRules.getProductSellPermissionList('GFRS_M0040', this)
|
flagPermission = await riskRules.getProductSellPermissionList('GFRS_M0040', this)
|
||||||
let specilFlag = '1'
|
let specilFlag = '1'
|
||||||
path = `${path}?specilFlag=${specilFlag}`
|
path = `${path}?specilFlag=${specilFlag}`
|
||||||
} else if(this.$route.params.productDetailCode == 'GFRSPRO_M0044'){
|
} else if (this.$route.params.productDetailCode == 'GFRSPRO_M0044') {
|
||||||
flagPermission = await riskRules.getProductSellPermissionList('GFRS_M0044', this)
|
flagPermission = await riskRules.getProductSellPermissionList('GFRS_M0044', this)
|
||||||
let specilFlag = '1'
|
let specilFlag = '1'
|
||||||
path = `${path}?specilFlag=${specilFlag}`
|
path = `${path}?specilFlag=${specilFlag}`
|
||||||
|
|||||||
@@ -79,13 +79,13 @@
|
|||||||
<van-button type="danger" @click="addProposal" class="bottom-btn fs16">点我新增</van-button>
|
<van-button type="danger" @click="addProposal" class="bottom-btn fs16">点我新增</van-button>
|
||||||
|
|
||||||
<check-agent @checModelSuccessMethod="initThisPage" />
|
<check-agent @checModelSuccessMethod="initThisPage" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Tabs, Tab, Tag, Dialog, List, Sticky, Toast } from 'vant'
|
import { Tabs, Tab, Tag, Dialog, List, Sticky, Toast } from 'vant'
|
||||||
import { getList, toInsurance, deleteProposal } from '@/api/ebiz/proposal/proposal.js'
|
import { getList, toInsurance, deleteProposal } from '@/api/ebiz/proposal/proposal.js'
|
||||||
|
import { funcPermCheck } from '@/api/ebiz/common/common'
|
||||||
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
|
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
|
||||||
import riskRules from '../common/risk-rules.js'
|
import riskRules from '../common/risk-rules.js'
|
||||||
import CheckAgent from '@/components/common/CheckAgent'
|
import CheckAgent from '@/components/common/CheckAgent'
|
||||||
@@ -103,6 +103,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isCheck: null, //查看是否有权限
|
||||||
active: 1,
|
active: 1,
|
||||||
proposalList: [],
|
proposalList: [],
|
||||||
finishedText: '没有更多了',
|
finishedText: '没有更多了',
|
||||||
@@ -117,6 +118,9 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.$CacheUtils.removeLocItem('orderNo')
|
this.$CacheUtils.removeLocItem('orderNo')
|
||||||
this.$CacheUtils.removeLocItem('canMoveOn')
|
this.$CacheUtils.removeLocItem('canMoveOn')
|
||||||
|
funcPermCheck({}).then(res => {
|
||||||
|
this.isCheck = res.result
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -273,6 +277,10 @@ export default {
|
|||||||
},
|
},
|
||||||
//转投保
|
//转投保
|
||||||
async toInsurance(item) {
|
async toInsurance(item) {
|
||||||
|
if (this.isCheck == '1') {
|
||||||
|
//校验该代理人是否有该产品的售卖权限
|
||||||
|
return this.$toast('您暂无使用权限!如有问题咨询,请联系个险业务部。')
|
||||||
|
}
|
||||||
if (item.insuredDTOs[0].mainRisk.length === 2) {
|
if (item.insuredDTOs[0].mainRisk.length === 2) {
|
||||||
let prodCodes = item.insuredDTOs[0].riskDTOLst
|
let prodCodes = item.insuredDTOs[0].riskDTOLst
|
||||||
let prd26 = prodCodes.some(item => {
|
let prd26 = prodCodes.some(item => {
|
||||||
@@ -286,10 +294,10 @@ export default {
|
|||||||
return Toast.fail('暂不支持组合产品转投保')
|
return Toast.fail('暂不支持组合产品转投保')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let permissionRiskCode ;
|
let permissionRiskCode
|
||||||
let flag = item.insuredDTOs[0].riskDTOLst.some(v => {
|
let flag = item.insuredDTOs[0].riskDTOLst.some(v => {
|
||||||
permissionRiskCode = v.riskCode;
|
permissionRiskCode = v.riskCode
|
||||||
return v.riskCode == 'GFRS_M0024' || v.riskCode == 'GFRS_M0040'|| v.riskCode == 'GFRS_M0044'
|
return v.riskCode == 'GFRS_M0024' || v.riskCode == 'GFRS_M0040' || v.riskCode == 'GFRS_M0044'
|
||||||
})
|
})
|
||||||
if (flag && (await riskRules.getProductSellPermissionList(permissionRiskCode, this))) {
|
if (flag && (await riskRules.getProductSellPermissionList(permissionRiskCode, this))) {
|
||||||
return this.$toast('抱歉,您没有该产品的销售权限!')
|
return this.$toast('抱歉,您没有该产品的销售权限!')
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ import {
|
|||||||
} from 'vant'
|
} from 'vant'
|
||||||
import SelectRadio from '@/components/ebiz/SelectRadio'
|
import SelectRadio from '@/components/ebiz/SelectRadio'
|
||||||
import { getDemo, toInsurance, getDemoByProposalNo, share, getSharingToken } from '@/api/ebiz/proposal/proposal.js'
|
import { getDemo, toInsurance, getDemoByProposalNo, share, getSharingToken } from '@/api/ebiz/proposal/proposal.js'
|
||||||
|
import { funcPermCheck } from '@/api/ebiz/common/common'
|
||||||
import { haveTap, getTapIndex, relevanceByInsure } from './js/exhibitionMethod.js'
|
import { haveTap, getTapIndex, relevanceByInsure } from './js/exhibitionMethod.js'
|
||||||
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
|
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
|
||||||
import { weixinShare } from '@/assets/js/utils/wxShare.js'
|
import { weixinShare } from '@/assets/js/utils/wxShare.js'
|
||||||
@@ -303,6 +304,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||||
return {
|
return {
|
||||||
|
isCheck: null, //查看是否有权限
|
||||||
isWeixin,
|
isWeixin,
|
||||||
showShareType: '00',
|
showShareType: '00',
|
||||||
popupShow: false,
|
popupShow: false,
|
||||||
@@ -394,6 +396,10 @@ export default {
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
window['appCallBack'] = this.appCallBack*/
|
window['appCallBack'] = this.appCallBack*/
|
||||||
this.init()
|
this.init()
|
||||||
|
//校验当前用户权限
|
||||||
|
funcPermCheck({}).then(res => {
|
||||||
|
this.isCheck = res.result
|
||||||
|
})
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
beforeRouteLeave(to, from, next) {
|
beforeRouteLeave(to, from, next) {
|
||||||
@@ -642,6 +648,10 @@ export default {
|
|||||||
},
|
},
|
||||||
//转投保
|
//转投保
|
||||||
async insure() {
|
async insure() {
|
||||||
|
if (this.isCheck == '1') {
|
||||||
|
//校验该代理人是否有该产品的售卖权限
|
||||||
|
return this.$toast('您暂无使用权限!如有问题咨询,请联系个险业务部。')
|
||||||
|
}
|
||||||
let path = '/sale/insuredInfo?edit=1'
|
let path = '/sale/insuredInfo?edit=1'
|
||||||
if (this.mainRiskCodes) {
|
if (this.mainRiskCodes) {
|
||||||
if (this.mainRiskCodes.length === 2) {
|
if (this.mainRiskCodes.length === 2) {
|
||||||
@@ -656,7 +666,7 @@ export default {
|
|||||||
return Toast.fail('暂不支持组合产品转投保')
|
return Toast.fail('暂不支持组合产品转投保')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.mainRiskCodes[0] == 'GFRS_M0024' || this.mainRiskCodes[0] == 'GFRS_M0040'|| this.mainRiskCodes[0] == 'GFRS_M0044') {
|
if (this.mainRiskCodes[0] == 'GFRS_M0024' || this.mainRiskCodes[0] == 'GFRS_M0040' || this.mainRiskCodes[0] == 'GFRS_M0044') {
|
||||||
let specilFlag = '1'
|
let specilFlag = '1'
|
||||||
path = `${path}&specilFlag=${specilFlag}`
|
path = `${path}&specilFlag=${specilFlag}`
|
||||||
let flagPermission = await riskRules.getProductSellPermissionList(this.mainRiskCodes[0], this)
|
let flagPermission = await riskRules.getProductSellPermissionList(this.mainRiskCodes[0], this)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sale-list-container pb50">
|
<div class="sale-list-container pb50 text-center" v-if="isCheck == 1">
|
||||||
|
<p class="f10 gray mt60">您暂无使用权限!</p>
|
||||||
|
<p class="f10 gray mt5">如有问题咨询,请联系个险业务部。</p>
|
||||||
|
</div>
|
||||||
|
<div class="sale-list-container pb50" v-else-if="isCheck == 0">
|
||||||
<van-search placeholder="请输入投保人姓名" v-model="searchName" @change="searchList" @keyup.enter="searchList" />
|
<van-search placeholder="请输入投保人姓名" v-model="searchName" @change="searchList" @keyup.enter="searchList" />
|
||||||
<van-sticky>
|
<van-sticky>
|
||||||
<van-tabs :line-width="45" v-model="active" @change="tabChange" sticky>
|
<van-tabs :line-width="45" v-model="active" @change="tabChange" sticky>
|
||||||
@@ -170,6 +174,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { Search, Tabs, Tab, List, Tag, Sticky, Toast, Dialog, Field } from 'vant'
|
import { Search, Tabs, Tab, List, Tag, Sticky, Toast, Dialog, Field } from 'vant'
|
||||||
import { orderList, deleteOrderInfo, getAuthCode, revokeOrder } from '@/api/ebiz/sale/sale'
|
import { orderList, deleteOrderInfo, getAuthCode, revokeOrder } from '@/api/ebiz/sale/sale'
|
||||||
|
import { funcPermCheck } from '@/api/ebiz/common/common'
|
||||||
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
|
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
|
||||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级
|
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级
|
||||||
import CheckAgent from '@/components/common/CheckAgent'
|
import CheckAgent from '@/components/common/CheckAgent'
|
||||||
@@ -189,6 +194,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isCheck: null, //查看是否有权限
|
||||||
showFlag: true,
|
showFlag: true,
|
||||||
searchName: '',
|
searchName: '',
|
||||||
active: 'uncommit', //uncommit 表示未提交 commit表示已提交
|
active: 'uncommit', //uncommit 表示未提交 commit表示已提交
|
||||||
@@ -231,6 +237,9 @@ export default {
|
|||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
window.appCallBack = this.appCallBack
|
window.appCallBack = this.appCallBack
|
||||||
|
funcPermCheck({}).then(res => {
|
||||||
|
this.isCheck = res.result
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
beforeClose(action, done) {
|
beforeClose(action, done) {
|
||||||
|
|||||||
Reference in New Issue
Block a user