diff --git a/src/api/YB_APP/index.js b/src/api/YB_APP/index.js index 2786fc677..67ffaae43 100644 --- a/src/api/YB_APP/index.js +++ b/src/api/YB_APP/index.js @@ -65,3 +65,44 @@ export function YBpolicyDetail(data) { data }) } + +export function getPremByAgentCode(data) { + return request({ + url: getUrl('/data/performanceYB/getPremByAgentCode', 1,3), + method: 'post', + data + }) +} + +export function getIndexByAgentCode(data) { + return request({ + url: getUrl('/data/performanceYB/getIndexByAgentCode', 1,3), + method: 'post', + data + }) +} + +export function getBankNetDataYB(data) { + return request({ + url: getUrl('/data/performanceYB/getBankNetDataYB', 1,3), + method: 'post', + data + }) +} + +export function getChannelPerformanceYB(data) { + return request({ + url: getUrl('/data/performanceYB/getChannelPerformanceYB', 1,3), + method: 'post', + data + }) +} + +export function getBankNetPerformanceYB(data) { + return request({ + url: getUrl('/data/performanceYB/getBankNetPerformanceYB', 1,3), + method: 'post', + data + }) +} + diff --git a/src/assets/YB_APP/images/43.png b/src/assets/YB_APP/images/43.png new file mode 100644 index 000000000..92625a54a Binary files /dev/null and b/src/assets/YB_APP/images/43.png differ diff --git a/src/assets/YB_APP/images/44.png b/src/assets/YB_APP/images/44.png new file mode 100644 index 000000000..b5070da13 Binary files /dev/null and b/src/assets/YB_APP/images/44.png differ diff --git a/src/assets/YB_APP/images/45.png b/src/assets/YB_APP/images/45.png new file mode 100644 index 000000000..204cbff6c Binary files /dev/null and b/src/assets/YB_APP/images/45.png differ diff --git a/src/assets/YB_APP/images/46.png b/src/assets/YB_APP/images/46.png new file mode 100644 index 000000000..139cf9add Binary files /dev/null and b/src/assets/YB_APP/images/46.png differ diff --git a/src/assets/YB_APP/images/47.png b/src/assets/YB_APP/images/47.png new file mode 100644 index 000000000..d398a71f4 Binary files /dev/null and b/src/assets/YB_APP/images/47.png differ diff --git a/src/assets/YB_APP/images/48.png b/src/assets/YB_APP/images/48.png new file mode 100644 index 000000000..c50ce6986 Binary files /dev/null and b/src/assets/YB_APP/images/48.png differ diff --git a/src/assets/YB_APP/images/49.png b/src/assets/YB_APP/images/49.png new file mode 100644 index 000000000..92c4c7ca8 Binary files /dev/null and b/src/assets/YB_APP/images/49.png differ diff --git a/src/views/YB_APP/performanceQuery.vue b/src/views/YB_APP/performanceQuery.vue index fcb938e89..4d9643390 100644 --- a/src/views/YB_APP/performanceQuery.vue +++ b/src/views/YB_APP/performanceQuery.vue @@ -55,10 +55,14 @@
-

+

达标

+

+ 未达标 + +

期交活动人力

@@ -66,7 +70,11 @@
-

+

+ 达标 + +

+

未达标

@@ -78,7 +86,7 @@

- 连续6月 + 连续{{gghymonth}}月

桂冠会员 @@ -104,7 +112,7 @@

- 12 + {{bankNetCount}}

网点数量

@@ -113,7 +121,7 @@

- 90% + {{qjhdl}}%

网点期交活动率

@@ -126,22 +134,26 @@
渠道业绩
网点业绩
-
保费排序
+
+ 保费排序 + + +
-
+
- - - 中国工商银行 + + {{item.bankName}}
总保费 - ¥200.0 + + ¥{{item.sumprem}} 万元
@@ -149,7 +161,7 @@

- 122.6 + {{item.djprem}} 万元

趸交保费

@@ -157,7 +169,7 @@

- 66.5 + {{item.ybqjprem}} 万元

银保期交保费

@@ -165,7 +177,7 @@

- 115.6 + {{item.ctqjprem}} 万元

传统期交保费

@@ -173,6 +185,11 @@
+
+ + + 暂无业绩 +
@@ -194,6 +211,8 @@ import { Button } from 'vant' import utils from '@/assets/js/utils/date-utils' import echarts from 'echarts' + import { getPremByAgentCode, getIndexByAgentCode, getBankNetDataYB, getChannelPerformanceYB, getBankNetPerformanceYB } from '@/api/YB_APP/index' + export default { name: 'policyDetail', components: { @@ -201,8 +220,13 @@ }, data() { return { - buttonType:'', premType:'QJ', + qjrlFlag:'', + ggrlFlag:'', + gghymonth:'0', + bankNetCount:'0', + qjhdl:'0', + sortType:'1', channelORnetworkType:'channel', activeProductIndex:'', calendarValue:'', @@ -210,19 +234,12 @@ currentDate:new Date(), minDate: new Date(2019, 1, 1), maxDate: new Date(2030, 12, 31), - echartsData:[ - { value: 50, scale:'15.6%', name: '节节高',color:'#768dfe',thisId:'001',}, - { value: 30, scale:'9.3%', name: '鸿利两全' ,color:'#7784a2',thisId:'002',}, - { value: 50, scale:'15.6%', name: '福享年年' ,color:'#38cbcb',thisId:'003',}, - { value: 40, scale:'12.5%', name: '年年丰' ,color:'#a5e1fc',thisId:'004',}, - { value: 30, scale:'9.3%', name: '银销健' ,color:'#e8bfa4',thisId:'005',}, - { value: 70, scale:'21.8%', name: '银销个' ,color:'#fcd439',thisId:'006',}, - { value: 50, scale:'15.6%', name: '节节高B款' ,color:'#fc7d82',thisId:'007',}, - ], + echartsData:[], + channelORnetworkData:[], incomeOption :{ color: ["#768dfe", "#7784a2", "#38cbcb", "#a5e1fc", "#e8bfa4",'#fcd439','#fc7d82'], title: { - text: '200.0万元', + text: '', subtext:'总保费', x: "center", y: "center", @@ -288,34 +305,155 @@ labelLine: { show: true }, - data: [ - { value: 50, scale:'15.6%', name: '节节高',color:'#768dfe',thisId:'001',}, - { value: 30, scale:'9.3%', name: '鸿利两全' ,color:'#7784a2',thisId:'002',}, - { value: 50, scale:'15.6%', name: '福享年年' ,color:'#38cbcb',thisId:'003',}, - { value: 40, scale:'12.5%', name: '年年丰' ,color:'#a5e1fc',thisId:'004',}, - { value: 30, scale:'9.3%', name: '银销健' ,color:'#e8bfa4',thisId:'005',}, - { value: 70, scale:'21.8%', name: '银销个' ,color:'#fcd439',thisId:'006',}, - { value: 50, scale:'15.6%', name: '节节高B款' ,color:'#fc7d82',thisId:'007',}, - ] + data: [] } ] }, } }, mounted(){ + let yearNum = new Date().getFullYear() let monthNum = new Date().getMonth()+1 this.calendarValue = yearNum+'-'+monthNum - - this.incomeChart = echarts.init(this.$refs.incomeChart) - - this.incomeChart.on('click',this.echartsClick) - this.incomeChart.setOption(this.incomeOption) + this.getPremByAgentCode() + this.getIndexByAgentCode() }, methods:{ + getPremByAgentCode(){ + let params = { + "agentCode": "Y0000111", + currentMonth: this.calendarValue + } + getPremByAgentCode(params).then(res=>{ + if(res.result == 0){ + this.incomeOption.title.text = res.content.decimalAll + '万元' + if(res.content.premDTOList && res.content.premDTOList.length!=0){ + this.echartsData = [] + this.incomeOption.series[0].data = [] + res.content.premDTOList.forEach(item=>{ + this.echartsData.push({ + value: item.allprem, + scale:item.percentage, + name: item.riskname, + thisId:item.riskcode + }) + this.incomeOption.series[0].data.push({ + value: item.allprem, + scale:item.percentage, + name: item.riskname, + thisId:item.riskcode + }) + }) + this.echartsData.forEach((item,index)=>{ + item.color = this.incomeOption.color[index] + }) + }else{ + this.echartsData = [] + this.incomeOption.series[0].data = [] + } + this.incomeChart = echarts.init(this.$refs.incomeChart) + this.incomeChart.on('click',this.echartsClick) + this.incomeChart.setOption(this.incomeOption) + }else{ + this.$toast(res.resultMessage) + } + }) + }, + getIndexByAgentCode(){ + let params = { + "agentCode": "Y0000111", + currentMonth: this.calendarValue + } + getIndexByAgentCode(params).then(res=>{ + if(res.result == 0){ + this.qjrlFlag = res.content.qjrlFlag + this.ggrlFlag = res.content.ggrlFlag + this.gghymonth = res.content.gghymonth + if(!this.gghymonth){ + this.gghymonth = 0 + } + }else{ + this.$toast(res.resultMessage) + } + }) + }, + getBankNetDataYB(){ + let params = { + agentCode:"Y0000066", + currentMonth:this.calendarValue + } + getBankNetDataYB(params).then(res=>{ + if(res.result == 0){ + if(res.content.bankNetCount){this.bankNetCount = res.content.bankNetCount} + if(res.content.qjhdl){this.qjhdl = res.content.qjhdl} + }else{ + this.$toast(res.resultMessage) + } + }) + }, + getChannelPerformanceYB(){ + let params = { + agentCode:"Y0000064", + currentMonth:this.calendarValue, + } + if(this.sortType == 2){ + params.isDesc = true + }else{ + params.isAsc = true + } + getChannelPerformanceYB(params).then(res=>{ + if(res.result == 0){ + this.channelORnetworkData = [] + if(res.content && res.content.length != 0){ + this.channelORnetworkData = res.content + } + }else{ + this.$toast(res.resultMessage) + } + }) + }, + getBankNetPerformanceYB(){ + let params = { + agentCode:"Y0000064", + currentMonth:this.calendarValue + } + if(this.sortType == 2){ + params.isDesc = true + }else{ + params.isAsc = true + } + getBankNetPerformanceYB(params).then(res=>{ + if(res.result == 0){ + this.channelORnetworkData = [] + if(res.content && res.content.length != 0){ + this.channelORnetworkData = res.content + } + }else{ + this.$toast(res.resultMessage) + } + }) + }, + changeSortType(){ + if(this.sortType == 1){ + this.sortType = 2 + }else{ + this.sortType = 1 + } + if(this.channelORnetworkType == 'channel'){ + this.getChannelPerformanceYB() + }else{ + this.getBankNetPerformanceYB() + } + }, changeChannelORnetworkType(type){ if(this.channelORnetworkType != type){ this.channelORnetworkType = type + if(this.channelORnetworkType == 'channel'){ + this.getChannelPerformanceYB() + }else{ + this.getBankNetPerformanceYB() + } } }, parentsEvent(){ @@ -344,11 +482,15 @@ if(this.premType != type){ this.premType = type if(this.premType == 'QJ'){ - this.$nextTick(()=>{ - this.incomeChart = echarts.init(this.$refs.incomeChart) - this.incomeChart.on('click',this.echartsClick) - this.incomeChart.setOption(this.incomeOption) - }) + this.getPremByAgentCode() + this.getIndexByAgentCode() + }else{ + this.getBankNetDataYB() + if(this.channelORnetworkType == 'channel'){ + this.getChannelPerformanceYB() + }else{ + this.getBankNetPerformanceYB() + } } } }, @@ -600,10 +742,11 @@ display:flex;justify-content:space-between;align-items:center; } .channelORnetween_list_head_button_right{ - color:#3749A9;background:#F7F7F7;padding:6px 10px;border-radius:20px;font-size:12px;font-weight:bold; + color:#3749A9;background:#F7F7F7;padding:6px 10px;border-radius:20px;font-size:12px;font-weight:bold;display:flex;justify-content:center;align-items:center;height:20px; } .channelORnetween_list{ width:calc(100% - 20px);margin:10px; + padding-bottom:10px; } .channelORnetween_list_con{ margin-bottom:15px;border:1px solid #eee;border-radius:8px;