[fix]商户统计

master
yangkai 6 years ago
parent 24555404a2
commit a0d7a4c631

@ -404,7 +404,23 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
}
]
};
$scope.analysisClients = function () {
$http.get('/sys/partners/analysis').then(function (resp) {
$scope.analysis = resp.data;
})
};
if ($scope.currentUser.org_id == 1 || $scope.currentUser.org_id == null) {
$scope.analysisClients();
}
$scope.mapFrame = 'all_locations.html';
$scope.loadLocations = function () {
var params = angular.copy($scope.params);
$http.get('/sys/partners/merchant/list_locations', {params: params}).then(function (resp) {
$scope.locations = resp.data;
window.merchant_maps.initMap($scope.locations);
});
};
$scope.loadLocations();
}]);

@ -7,185 +7,228 @@
text-align: center;
}
</style>
<!--<section class="content-header">-->
<!--<h1>Partners Analysis</h1>-->
<!--<ol class="breadcrumb">-->
<!--<li>-->
<!--<i class="fa fa-list-alt"></i> Analysis-->
<!--</li>-->
<!--<li class="active">Partners</li>-->
<!--</ol>-->
<!--</section>-->
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning" ng-if="'1000000000'|withRole">
<div class="box-header">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<!--<div class="form-group">-->
<!--<label class="control-label col-xs-4 col-sm-2" for="only-mine-search">-->
<!--My Group</label>-->
<!--<div class="col-xs-8 col-sm-4">-->
<!--<div class="checkbox-inline" style="bottom: 5px">-->
<!--<input type="checkbox" id="only-mine-search"-->
<!--ng-model="params.onlyGroup" ng-click="loadPartnersInTypes();doAnalysis()">-->
<div ui-view>
<section class="content-header">
<h1>Merchant statistics</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Payment
</li>
<li class="active">Merchant statistics</li>
</ol>
</section>
<div class="content">
<div class="row" ng-if="currentUser.org_id==1 || currentUser.org_id==null">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-aqua"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">Waiting Compliance</span>
<a role="button"><span class="info-box-number">{{analysis.wp}}</span></a>
<small>其中自助开通:{{analysis.a_wp}}</small>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-green"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">Pass</span>
<span class="info-box-number">{{analysis.pass}}</span>
<small>其中自助开通:{{analysis.z_pass+analysis.a_pass}}</small>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-red"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">Temp SubMerchantID</span>
<a role="button"><span class="info-box-number" ng-bind="analysis.temp_submchid||0"></span></a>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">自助开通</span>
<a role="button"><span class="info-box-number">{{analysis.quick_pass}}</span></a>
<small>waiting compliance:{{analysis.a_wp}}</small>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning" ng-if="'1000000000'|withRole">
<div class="box-header">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<!--<div class="form-group">-->
<!--<label class="control-label col-xs-4 col-sm-2" for="only-mine-search">-->
<!--My Group</label>-->
<!--<div class="col-xs-8 col-sm-4">-->
<!--<div class="checkbox-inline" style="bottom: 5px">-->
<!--<input type="checkbox" id="only-mine-search"-->
<!--ng-model="params.onlyGroup" ng-click="loadPartnersInTypes();doAnalysis()">-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="form-group col-xs-12" ng-if="('1000000000'|withRole)">
<label class="control-label col-xs-4 col-sm-2"> My Group</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<input type="checkbox" id="only-mine-search"
ng-model="params.onlyGroup" ng-click="chooseBD('all')">
<span ng-if="params.onlyGroup">
|&nbsp;
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseBD('all')">All</a>
<label ng-repeat="sub in bd_group_bds">
|&nbsp;<a role="button"
ng-class="{'bg-primary':sub.manager_id==chooseBDId}"
ng-click="chooseBD(sub.manager_id)">{{sub.bd_name}}</a>&nbsp;
</label></span>
</p>
<div class="form-group col-xs-12" ng-if="('1000000000'|withRole)">
<label class="control-label col-xs-4 col-sm-2"> My Group</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<input type="checkbox" id="only-mine-search"
ng-model="params.onlyGroup" ng-click="chooseBD('all')">
<span ng-if="params.onlyGroup">
|&nbsp;
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseBD('all')">All</a>
<label ng-repeat="sub in bd_group_bds">
|&nbsp;<a role="button"
ng-class="{'bg-primary':sub.manager_id==chooseBDId}"
ng-click="chooseBD(sub.manager_id)">{{sub.bd_name}}</a>&nbsp;
</label></span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header pull-right">
<div class="btn-group" role="group">
<button type="button" class="btn btn-info" ng-click="display=false" ng-class="{'active':!display}">行业</button>
<button type="button" class="btn btn-info" ng-click="display=true" ng-class="{'active':display}">清算周期</button>
<div class="box box-warning">
<div class="box-header pull-right">
<div class="btn-group" role="group">
<button type="button" class="btn btn-info" ng-click="display=false" ng-class="{'active':!display}">行业</button>
<button type="button" class="btn btn-info" ng-click="display=true" ng-class="{'active':display}">清算周期</button>
</div>
</div>
</div>
<div class="box-body" ng-if="!display">
<div class="col-sm-12">
<div class="col-sm-6 col-xs-12">
<p class="text-center">各类型商家数量分布</p>
<div class="chart" style="height: 400px" echarts="partners_type_chart"
chart-setter="partner_type_chart($chart)"
ng-class="{nodata:partners_type_chart.nodata}"></div>
<div class="box-body" ng-if="!display">
<div class="col-sm-12">
<div class="col-sm-6 col-xs-12">
<p class="text-center">各类型商家数量分布</p>
<div class="chart" style="height: 400px" echarts="partners_type_chart"
chart-setter="partner_type_chart($chart)"
ng-class="{nodata:partners_type_chart.nodata}"></div>
</div>
<div class="col-sm-6 col-xs-12">
<p class="text-center">{{partners_type.partner_type}} 行业列表</p>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Type</th>
<th>Partners</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="partner in children">
<td ng-bind="partner.children_partner_type"></td>
<td ng-bind="partner.partner_counts"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<p class="text-center">{{partners_type.partner_type}} 行业列表</p>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Type</th>
<th>Partners</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="partner in children">
<td ng-bind="partner.children_partner_type"></td>
<td ng-bind="partner.partner_counts"></td>
</tr>
</tbody>
</table>
<div class="col-sm-12 col-xs-12" >
<label style="display: inline" ng-repeat="type in PartnerTypes | orderBy:'count_value':true">
<span ng-bind="type.partner_type" class="text-primary"></span>:
<span ng-bind="type.count_value" class="text-primary"></span> |
</label>
</div>
</div>
<div class="col-sm-12 col-xs-12" >
<label style="display: inline" ng-repeat="type in PartnerTypes | orderBy:'count_value':true">
<span ng-bind="type.partner_type" class="text-primary"></span>:
<span ng-bind="type.count_value" class="text-primary"></span> |
</label>
</div>
</div>
<div class="box-body" ng-if="display">
<div class="col-sm-12">
<div class="col-sm-6 col-xs-12">
<p class="text-center">商户清算周期分布</p>
<div class="chart" style="height: 300px" echarts="partners_settlement_chart"
chart-setter="partner_type_chart($chart)"
ng-class="{nodata:partners_settlement_chart.nodata}"></div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="text-center">
<p class="btn-group text-center" role="group">
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseAll()">All</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseThirtyDays();">recent 30 days</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseLastMonth();">Last Month</button>
</p>
<p></p>
<p>清算周期列表</p>
<div class="box-body" ng-if="display">
<div class="col-sm-12">
<div class="col-sm-6 col-xs-12">
<p class="text-center">商户清算周期分布</p>
<div class="chart" style="height: 300px" echarts="partners_settlement_chart"
chart-setter="partner_type_chart($chart)"
ng-class="{nodata:partners_settlement_chart.nodata}"></div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="text-center">
<p class="btn-group text-center" role="group">
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseAll()">All</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseThirtyDays();">recent 30 days</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseLastMonth();">Last Month</button>
</p>
<p></p>
<p>清算周期列表</p>
</div>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Clean Days</th>
<th>Partners</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="cycle in settlementCycle">
<td ng-bind="cycle.clean_days"></td>
<td ng-bind="cycle.client_count"></td>
</tr>
</tbody>
</table>
</div>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Clean Days</th>
<th>Partners</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="cycle in settlementCycle">
<td ng-bind="cycle.clean_days"></td>
<td ng-bind="cycle.client_count"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group col-xs-12 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">Date Range</label>
<div class="col-sm-10">
<div class="form-control-static form-inline">
<div style="display: inline-block">
<input class="form-control" id="date-from-input"
ng-model="params.begin"
uib-datepicker-popup size="10" placeholder="From"
is-open="dateBegin.open" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.end||today}">
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input" ng-model="params.end"
uib-datepicker-popup size="10" placeholder="To"
is-open="dateTo.open" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.begin,maxDate:today}">
</div>
<div class="box box-warning">
<div class="box-header">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group col-xs-12 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">Date Range</label>
<div class="col-sm-10">
<div class="form-control-static form-inline">
<div style="display: inline-block">
<input class="form-control" id="date-from-input"
ng-model="params.begin"
uib-datepicker-popup size="10" placeholder="From"
is-open="dateBegin.open" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.end||today}">
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input" ng-model="params.end"
uib-datepicker-popup size="10" placeholder="To"
is-open="dateTo.open" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.begin,maxDate:today}">
</div>
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseToday()">Today</a>-->
<!--</div>-->
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseYesterday()">Yesterday</a>-->
<!--</div>-->
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7 Days</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisMonth()">This Month</a>
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseToday()">Today</a>-->
<!--</div>-->
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseYesterday()">Yesterday</a>-->
<!--</div>-->
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7 Days</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisMonth()">This Month</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="lastMonth()">Last Month</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisYear()">This Year</a>
</div>
<button class="btn btn-success" type="button"
ng-click="doAnalysis()">
<i class="fa fa-search"></i>
</button>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="lastMonth()">Last Month</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisYear()">This Year</a>
</div>
<button class="btn btn-success" type="button"
ng-click="doAnalysis()">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
@ -193,20 +236,31 @@
</div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">新增商户数量变化</div>
<div class="box-body">
<div class="chart" echarts="newPartnersHistory" style="height: 300px"
ng-class="{nodata:newPartnersHistory.nodata}"></div>
<div class="box box-warning">
<div class="box-header with-border">新增商户数量变化</div>
<div class="box-body">
<div class="chart" echarts="newPartnersHistory" style="height: 300px"
ng-class="{nodata:newPartnersHistory.nodata}"></div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">交易商户数量变化</div>
<div class="box-body">
<div class="chart" echarts="tradePartnersHistory" style="height: 300px"
ng-class="{nodata:tradePartnersHistory.nodata}"></div>
<div class="box box-warning">
<div class="box-header with-border">交易商户数量变化</div>
<div class="box-body">
<div class="chart" echarts="tradePartnersHistory" style="height: 300px"
ng-class="{nodata:tradePartnersHistory.nodata}"></div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">商户分布
<span style="float: right;font-size: 14px;">商户数量:{{locations.length}}</span>
</div>
<div class="box-body">
<div class="embed-responsive" style="height: 300px;">
<iframe class="embed-responsive-item" id="merchant_maps" name="merchant_maps" src="{{mapFrame}}"></iframe>
</div>
</div>
</div>
</div>
</div>

@ -203,13 +203,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
});
};
$scope.loadLocations = function () {
/*$scope.loadLocations = function () {
var params = angular.copy($scope.params);
$http.get('/sys/partners/merchant/list_locations', {params: params}).then(function (resp) {
$scope.locations = resp.data;
window.merchant_maps.initMap($scope.locations);
});
};
};*/
$scope.today = new Date();
$scope.listBDUsers = function () {
@ -268,14 +268,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
};
$scope.toogleMapSelect = function () {
/*$scope.toogleMapSelect = function () {
$scope.mapFrame = 'all_locations.html';
$scope.loadLocations();
}
$scope.toogleMerchantSelect = function () {
$scope.mapFrame = null;
}
$scope.toogleMerchantSelect();
$scope.toogleMerchantSelect();*/
}]);
app.controller('addPartnerCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone) {
if ($scope.partner_application) {

@ -358,9 +358,10 @@
</div>
</div>
<!--status-->
<div class="form-group col-sm-12" ng-if="'10'|withRole">
<!--商户合规位置转移到合规模块的商户合规模块下-->
<!--<div class="form-group col-sm-12" ng-if="'10'|withRole">
<label class="control-label col-xs-4 col-sm-2">Status</label>
<!--<div class="col-xs-8 col-sm-4">-->
&lt;!&ndash;<div class="col-xs-8 col-sm-4">&ndash;&gt;
<span class="col-xs-8 col-sm-10">
<span class="checkbox-inline">
<label>
@ -407,14 +408,15 @@
</span>
</span>
<!--</div>-->
</div>
&lt;!&ndash;</div>&ndash;&gt;
</div>-->
<div class="col-xs-12">
<button ng-if="!mapFrame" class="btn btn-primary" type="button"
<button class="btn btn-primary" type="button"
ng-click="loadPartners(1)"><i
class="fa fa-search"></i> Search
</button>
<button ng-if="mapFrame" class="btn btn-primary" type="button"
<!-- 商户分布以及商户进件位置转移 -->
<!--<button ng-if="mapFrame" class="btn btn-primary" type="button"
ng-click="loadLocations()"><i
class="fa fa-search"></i> Search
</button>
@ -422,7 +424,7 @@
ui-sref=".new" title="New Partner">
<i class="fa fa-plus"></i>
New Partner
</a>
</a>-->
</div>
</div>
@ -434,7 +436,7 @@
</div>
</div>
<ul class="nav nav-tabs">
<!--<ul class="nav nav-tabs">
<li ng-if="!mapFrame"><a role="button" class="partner_list_style active"
ng-click="toogleMerchantSelect()">商户列表</a>
@ -448,9 +450,9 @@
<li ng-if="!mapFrame" style="margin-left: 10px"><a role="button" class="partner_list_style" ng-click="toogleMapSelect()">商户分布</a>
</li>
</ul>
<span id="merchant_locations" hidden>{{locations}}</span>
<span id="merchant_locations" hidden>{{locations}}</span>-->
<div class="box box-warning" style="border-top-color:#f06101" ng-if="!mapFrame">
<div class="box box-warning" style="border-top-color:#f06101">
<div class="box-body no-padding table-responsive">
<div>
<span style="float: right;font-size: 14px;" class="del_client">禁用</span>
@ -541,7 +543,8 @@
</div>
</div>
</div>
<div class="row" ng-if="mapFrame">
<!--商户分布位置转移-->
<!--<div class="row" ng-if="mapFrame">
<div class="col-sm-12">
<div class="box" style="border-top: none">
<div class="embed-responsive" style="height: 300px;">
@ -549,7 +552,7 @@
</div>
</div>
</div>
</div>
</div>-->
</div>
</div>
</div>

Loading…
Cancel
Save