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

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

@ -778,7 +778,7 @@ margin-bottom: 10%;"/>
</li>
<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}">
<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>
</li>
<li ui-sref-active="active" ng-if="'10000000001000'|withRole">

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

@ -32,15 +32,20 @@
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<td>teamName</td>
<td>kpiAmount</td>
<td>totalAmount</td>
<th>团队名称<span class="text-green small">(点击可查看团队明细)</span></th>
<th>KPI</th>
<th>总金额</th>
<th>完成比例</th>
</tr>
</thead>
<tr ng-repeat="data in BDTeamKpiData">
<td ng-bind="data.team_name"></td>
<tr ng-repeat="data in BDTeamKpiData" ng-click="getBdProportion(data.bd_type)"
style="cursor:pointer;">
<td ng-bind="data.team_name" ></td>
<td ng-bind="data.kpi"></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>
</table>
</div>
@ -48,30 +53,36 @@
<div class="box box-info">
<div class="box-header">BD占比</div>
<div class="box-body">
<div class="col-xs-6 col-sm-6">
<div class="chart" style="height: 400px" id="bdProportion" echarts="bdProportion"
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">
<thead>
<tr>
<td>bdName</td>
<td>kpiAmount</td>
<td>totalAmount</td>
<th>BD 名称</th>
<th>KPI</th>
<th>总交易金额</th>
<th>完成比例</th>
</tr>
</thead>
<tr ng-repeat="data in bdProportionData">
<td ng-bind="data.bd_name"></td>
<td ng-bind="data.kpi_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>
</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>
</section>

@ -489,6 +489,16 @@
</div>
</a>
</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">
<a ui-sref="analysis_bd.bd_prizes" ui-sref-opts="{reload:true}">
<div class="description-block">

Loading…
Cancel
Save