[Y] BD团队分析优化展示

master
taylor.dang 6 years ago
parent 28696ce91b
commit 763cadd214

@ -778,7 +778,7 @@ margin-bottom: 10%;"/>
</li> </li>
<li ui-sref-active="active" ng-if="('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)"> <li ui-sref-active="active" ng-if="('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="analysis_bd.bd_data_analysis" ui-sref-opts="{reload:true}"> <a ui-sref="analysis_bd.bd_data_analysis" ui-sref-opts="{reload:true}">
<i class="fa fa-usd"></i> <span>BD数据分析|BD Data Analysis</span> <i class="fa fa-usd"></i> <span>BD团队分析|BD Team Analysis</span>
</a> </a>
</li> </li>
<li ui-sref-active="active" ng-if="'10000000001000'|withRole"> <li ui-sref-active="active" ng-if="'10000000001000'|withRole">

@ -59,7 +59,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.getBDTeamKpiEcharts = function(data){ $scope.getBDTeamKpiEcharts = function(data){
var BDTeamKpi = { var BDTeamKpi = {
tooltip : { tooltip : {
formatter: "{a} <br/>{c} {b}" formatter: "{b} <br/> {a} {c}% "
}, },
toolbox: { toolbox: {
show : true, show : true,
@ -106,7 +106,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
fontWeight: 'bolder' fontWeight: 'bolder'
} }
}, },
data:[{value: 0, name: '完成度'}] data:[{value: 0, name: ''}]
}, },
{ {
name:'KPI', name:'KPI',
@ -267,7 +267,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}, },
series : [ series : [
{ {
name:'业务指标', name:'KPI完成比例',
type:'gauge', type:'gauge',
startAngle: 180, startAngle: 180,
endAngle: 0, endAngle: 0,
@ -327,17 +327,17 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
} }
] ]
}; };
bdKpi.series[0].data[0] = {"value":(data.total_amount/data.kpi_amount*100).toFixed(2),"name":data.bd_name + "完成度"}; bdKpi.series[0].data[0] = {"value":(data.total_amount/data.kpi_amount*100).toFixed(2),"name":data.bd_name};
return bdKpi; return bdKpi;
} }
$scope.filterBdType = function (type) { $scope.filterBdType = function (type) {
switch (type) { switch (type) {
case 1: case 1:
return 'Sydney'; return 'Sydney Team';
case 2: case 2:
return 'KA Manager'; return 'KA Manager';
case 6: case 6:
return 'Melbourne'; return 'Melbourne Team';
case 7: case 7:
return 'KA Manager'; return 'KA Manager';
} }

@ -31,16 +31,21 @@
ng-class="{nodata:!BDTeamKpiData}"></div> ng-class="{nodata:!BDTeamKpiData}"></div>
<table class="table table-bordered table-striped table-hover"> <table class="table table-bordered table-striped table-hover">
<thead> <thead>
<tr> <tr>
<td>teamName</td> <th>团队名称<span class="text-green small">(点击可查看团队明细)</span></th>
<td>kpiAmount</td> <th>KPI</th>
<td>totalAmount</td> <th>总金额</th>
</tr> <th>完成比例</th>
</tr>
</thead> </thead>
<tr ng-repeat="data in BDTeamKpiData"> <tr ng-repeat="data in BDTeamKpiData" ng-click="getBdProportion(data.bd_type)"
<td ng-bind="data.team_name"></td> style="cursor:pointer;">
<td ng-bind="data.team_name" ></td>
<td ng-bind="data.kpi"></td> <td ng-bind="data.kpi"></td>
<td ng-bind="data.total_amount"></td> <td ng-bind="data.total_amount"></td>
<td>{{data.total_amount/data.kpi | percentage:2}} <i ng-if="(data.total_amount/data.kpi)>=1"
class="fa fa-star text-yellow"
title="已完成"></i></td>
</tr> </tr>
</table> </table>
</div> </div>
@ -48,30 +53,36 @@
<div class="box box-info"> <div class="box box-info">
<div class="box-header">BD占比</div> <div class="box-header">BD占比</div>
<div class="box-body"> <div class="box-body">
<div class="chart" style="height: 400px" id="bdProportion" echarts="bdProportion" <div class="col-xs-6 col-sm-6">
chart-setter="bdProportionEcharts($chart)" <div class="chart" style="height: 400px" id="bdProportion" echarts="bdProportion"
ng-class="{nodata:!bdProportionData}"></div> chart-setter="bdProportionEcharts($chart)"
ng-class="{nodata:!bdProportionData}"></div>
</div>
<div class=" col-xs-6 col-sm-6">
<div class="chart" style="height: 400px" id="bdKpi" echarts="bdKpi"
ng-class="{nodata:!bdKpiData}"></div>
</div>
<table class="table table-bordered table-striped table-hover"> <table class="table table-bordered table-striped table-hover">
<thead> <thead>
<tr> <tr>
<td>bdName</td> <th>BD 名称</th>
<td>kpiAmount</td> <th>KPI</th>
<td>totalAmount</td> <th>总交易金额</th>
<th>完成比例</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="data in bdProportionData"> <tr ng-repeat="data in bdProportionData">
<td ng-bind="data.bd_name"></td> <td ng-bind="data.bd_name"></td>
<td ng-bind="data.kpi_amount"></td> <td ng-bind="data.kpi_amount"></td>
<td ng-bind="data.total_amount"></td> <td ng-bind="data.total_amount"></td>
<td>{{data.total_amount/data.kpi_amount | percentage:2}}
<i ng-if="(data.total_amount/data.kpi_amount)>=1" class="fa fa-star text-yellow"
title="已完成"></i>
</td>
</tr> </tr>
</table> </table>
</div>
</div>
<div class="box box-info">
<div class="box-header">BD KPI完成度</div>
<div class="box-body">
<div class="chart" style="height: 400px" id="bdKpi" echarts="bdKpi"
ng-class="{nodata:!bdKpiData}"></div>
</div> </div>
</div> </div>
</section> </section>

@ -489,6 +489,16 @@
</div> </div>
</a> </a>
</div> </div>
<div ng-if="('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)" class="col-sm-2 col-xs-6">
<a ui-sref="analysis_bd.bd_data_analysis" ui-sref-opts="{reload:true}">
<div class="description-block">
<img src="/static/images/main_menu/bd_sales_volume.png"/>
<div class="description-text">
<span class="description-text">BD团队分析</span>
</div>
</div>
</a>
</div>
<div ng-if="('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)" class="col-sm-2 col-xs-6"> <div ng-if="('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)" class="col-sm-2 col-xs-6">
<a ui-sref="analysis_bd.bd_prizes" ui-sref-opts="{reload:true}"> <a ui-sref="analysis_bd.bd_prizes" ui-sref-opts="{reload:true}">
<div class="description-block"> <div class="description-block">

Loading…
Cancel
Save