+
-

-

-
中国工商银行
+
![]()
+
{{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;