[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; text-align: center;
} }
</style> </style>
<!--<section class="content-header">--> <div ui-view>
<!--<h1>Partners Analysis</h1>--> <section class="content-header">
<!--<ol class="breadcrumb">--> <h1>Merchant statistics</h1>
<!--<li>--> <ol class="breadcrumb">
<!--<i class="fa fa-list-alt"></i> Analysis--> <li>
<!--</li>--> <i class="fa fa-list-alt"></i> Payment
<!--<li class="active">Partners</li>--> </li>
<!--</ol>--> <li class="active">Merchant statistics</li>
<!--</section>--> </ol>
<div class="content"> </section>
<div class="row"> <div class="content">
<div class="col-sm-12"> <div class="row" ng-if="currentUser.org_id==1 || currentUser.org_id==null">
<div class="box-solid"> <div class="col-md-3 col-sm-6 col-xs-12">
<div class="box box-warning" ng-if="'1000000000'|withRole"> <div class="info-box">
<div class="box-header"> <span class="info-box-icon bg-aqua"><i class="ion ion-ios-people"></i></span>
<div class="row"> <div class="info-box-content">
<div class="col-sm-12"> <span class="info-box-text">Waiting Compliance</span>
<div class="form-horizontal"> <a role="button"><span class="info-box-number">{{analysis.wp}}</span></a>
<!--<div class="form-group">--> <small>其中自助开通:{{analysis.a_wp}}</small>
<!--<label class="control-label col-xs-4 col-sm-2" for="only-mine-search">--> </div>
<!--My Group</label>--> </div>
<!--<div class="col-xs-8 col-sm-4">--> </div>
<!--<div class="checkbox-inline" style="bottom: 5px">--> <div class="col-md-3 col-sm-6 col-xs-12">
<!--<input type="checkbox" id="only-mine-search"--> <div class="info-box">
<!--ng-model="params.onlyGroup" ng-click="loadPartnersInTypes();doAnalysis()">--> <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>-->
<!--</div>--> <div class="form-group col-xs-12" ng-if="('1000000000'|withRole)">
<div class="form-group col-xs-12" ng-if="('1000000000'|withRole)"> <label class="control-label col-xs-4 col-sm-2"> My Group</label>
<label class="control-label col-xs-4 col-sm-2"> My Group</label> <div class="col-sm-10 col-xs-8">
<div class="col-sm-10 col-xs-8"> <p class="form-control-static">
<p class="form-control-static"> <input type="checkbox" id="only-mine-search"
<input type="checkbox" id="only-mine-search" ng-model="params.onlyGroup" ng-click="chooseBD('all')">
ng-model="params.onlyGroup" ng-click="chooseBD('all')"> <span ng-if="params.onlyGroup">
<span ng-if="params.onlyGroup"> |&nbsp;
|&nbsp; <a role="button" ng-class="{'bg-primary':isAll}"
<a role="button" ng-class="{'bg-primary':isAll}" ng-click="chooseBD('all')">All</a>
ng-click="chooseBD('all')">All</a> <label ng-repeat="sub in bd_group_bds">
<label ng-repeat="sub in bd_group_bds"> |&nbsp;<a role="button"
|&nbsp;<a role="button" ng-class="{'bg-primary':sub.manager_id==chooseBDId}"
ng-class="{'bg-primary':sub.manager_id==chooseBDId}" ng-click="chooseBD(sub.manager_id)">{{sub.bd_name}}</a>&nbsp;
ng-click="chooseBD(sub.manager_id)">{{sub.bd_name}}</a>&nbsp; </label></span>
</label></span> </p>
</p> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> <div class="box box-warning">
<div class="box box-warning"> <div class="box-header pull-right">
<div class="box-header pull-right"> <div class="btn-group" role="group">
<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=false" ng-class="{'active':!display}">行业</button> <button type="button" class="btn btn-info" ng-click="display=true" 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> <div class="box-body" ng-if="!display">
<div class="box-body" ng-if="!display"> <div class="col-sm-12">
<div class="col-sm-12"> <div class="col-sm-6 col-xs-12">
<div class="col-sm-6 col-xs-12"> <p class="text-center">各类型商家数量分布</p>
<p class="text-center">各类型商家数量分布</p> <div class="chart" style="height: 400px" echarts="partners_type_chart"
<div class="chart" style="height: 400px" echarts="partners_type_chart" chart-setter="partner_type_chart($chart)"
chart-setter="partner_type_chart($chart)" ng-class="{nodata:partners_type_chart.nodata}"></div>
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>
<div class="col-sm-6 col-xs-12"> <div class="col-sm-12 col-xs-12" >
<p class="text-center">{{partners_type.partner_type}} 行业列表</p> <label style="display: inline" ng-repeat="type in PartnerTypes | orderBy:'count_value':true">
<table class="table table-bordered table-hover table-striped"> <span ng-bind="type.partner_type" class="text-primary"></span>:
<thead> <span ng-bind="type.count_value" class="text-primary"></span> |
<tr> </label>
<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> </div>
<div class="col-sm-12 col-xs-12" > <div class="box-body" ng-if="display">
<label style="display: inline" ng-repeat="type in PartnerTypes | orderBy:'count_value':true"> <div class="col-sm-12">
<span ng-bind="type.partner_type" class="text-primary"></span>: <div class="col-sm-6 col-xs-12">
<span ng-bind="type.count_value" class="text-primary"></span> | <p class="text-center">商户清算周期分布</p>
</label> <div class="chart" style="height: 300px" echarts="partners_settlement_chart"
</div> chart-setter="partner_type_chart($chart)"
</div> ng-class="{nodata:partners_settlement_chart.nodata}"></div>
<div class="box-body" ng-if="display"> </div>
<div class="col-sm-12"> <div class="col-sm-6 col-xs-12">
<div class="col-sm-6 col-xs-12"> <div class="text-center">
<p class="text-center">商户清算周期分布</p> <p class="btn-group text-center" role="group">
<div class="chart" style="height: 300px" echarts="partners_settlement_chart" <button type="button" class="btn btn-primary btn-xs" ng-click="chooseAll()">All</button>
chart-setter="partner_type_chart($chart)" <button type="button" class="btn btn-primary btn-xs" ng-click="chooseThirtyDays();">recent 30 days</button>
ng-class="{nodata:partners_settlement_chart.nodata}"></div> <button type="button" class="btn btn-primary btn-xs" ng-click="chooseLastMonth();">Last Month</button>
</div> </p>
<div class="col-sm-6 col-xs-12"> <p></p>
<div class="text-center"> <p>清算周期列表</p>
<p class="btn-group text-center" role="group"> </div>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseAll()">All</button> <table class="table table-bordered table-hover table-striped">
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseThirtyDays();">recent 30 days</button> <thead>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseLastMonth();">Last Month</button> <tr>
</p> <th>Clean Days</th>
<p></p> <th>Partners</th>
<p>清算周期列表</p> </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>
<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> </div>
</div> <div class="box box-warning">
<div class="box box-warning"> <div class="box-header">
<div class="box-header"> <div class="row">
<div class="row"> <div class="col-sm-12">
<div class="col-sm-12"> <div class="form-horizontal">
<div class="form-horizontal"> <div class="form-group col-xs-12 col-sm-12">
<div class="form-group col-xs-12 col-sm-12"> <label class="control-label col-xs-4 col-sm-2">Date Range</label>
<label class="control-label col-xs-4 col-sm-2">Date Range</label> <div class="col-sm-10">
<div class="col-sm-10"> <div class="form-control-static form-inline">
<div class="form-control-static form-inline"> <div style="display: inline-block">
<div style="display: inline-block"> <input class="form-control" id="date-from-input"
<input class="form-control" id="date-from-input" ng-model="params.begin"
ng-model="params.begin" uib-datepicker-popup size="10" placeholder="From"
uib-datepicker-popup size="10" placeholder="From" is-open="dateBegin.open" ng-click="dateBegin.open=true"
is-open="dateBegin.open" ng-click="dateBegin.open=true" datepicker-options="{maxDate:params.end||today}">
datepicker-options="{maxDate:params.end||today}"> </div>
</div> ~
~ <div style="display: inline-block">
<div style="display: inline-block"> <input class="form-control" id="date-to-input" ng-model="params.end"
<input class="form-control" id="date-to-input" ng-model="params.end" uib-datepicker-popup size="10" placeholder="To"
uib-datepicker-popup size="10" placeholder="To" is-open="dateTo.open" ng-click="dateTo.open=true"
is-open="dateTo.open" ng-click="dateTo.open=true" datepicker-options="{minDate:params.begin,maxDate:today}">
datepicker-options="{minDate:params.begin,maxDate:today}"> </div>
</div>
<!--<div class="btn-group">--> <!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"--> <!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseToday()">Today</a>--> <!--ng-click="chooseToday()">Today</a>-->
<!--</div>--> <!--</div>-->
<!--<div class="btn-group">--> <!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"--> <!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseYesterday()">Yesterday</a>--> <!--ng-click="chooseYesterday()">Yesterday</a>-->
<!--</div>--> <!--</div>-->
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7 Days</a> ng-click="chooseLast7Days()">Last 7 Days</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="thisMonth()">This Month</a> 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>
<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> </div>
</div> </div>
@ -193,20 +236,31 @@
</div> </div>
</div> </div>
</div> </div>
</div> <div class="box box-warning">
<div class="box box-warning"> <div class="box-header with-border">新增商户数量变化</div>
<div class="box-header with-border">新增商户数量变化</div> <div class="box-body">
<div class="box-body"> <div class="chart" echarts="newPartnersHistory" style="height: 300px"
<div class="chart" echarts="newPartnersHistory" style="height: 300px" ng-class="{nodata:newPartnersHistory.nodata}"></div>
ng-class="{nodata:newPartnersHistory.nodata}"></div> </div>
</div> </div>
</div>
<div class="box box-warning"> <div class="box box-warning">
<div class="box-header with-border">交易商户数量变化</div> <div class="box-header with-border">交易商户数量变化</div>
<div class="box-body"> <div class="box-body">
<div class="chart" echarts="tradePartnersHistory" style="height: 300px" <div class="chart" echarts="tradePartnersHistory" style="height: 300px"
ng-class="{nodata:tradePartnersHistory.nodata}"></div> 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> </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); var params = angular.copy($scope.params);
$http.get('/sys/partners/merchant/list_locations', {params: params}).then(function (resp) { $http.get('/sys/partners/merchant/list_locations', {params: params}).then(function (resp) {
$scope.locations = resp.data; $scope.locations = resp.data;
window.merchant_maps.initMap($scope.locations); window.merchant_maps.initMap($scope.locations);
}); });
}; };*/
$scope.today = new Date(); $scope.today = new Date();
$scope.listBDUsers = function () { $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.mapFrame = 'all_locations.html';
$scope.loadLocations(); $scope.loadLocations();
} }
$scope.toogleMerchantSelect = function () { $scope.toogleMerchantSelect = function () {
$scope.mapFrame = null; $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) { app.controller('addPartnerCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone) {
if ($scope.partner_application) { if ($scope.partner_application) {

@ -358,9 +358,10 @@
</div> </div>
</div> </div>
<!--status--> <!--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> <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="col-xs-8 col-sm-10">
<span class="checkbox-inline"> <span class="checkbox-inline">
<label> <label>
@ -407,14 +408,15 @@
</span> </span>
</span> </span>
<!--</div>--> &lt;!&ndash;</div>&ndash;&gt;
</div> </div>-->
<div class="col-xs-12"> <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 ng-click="loadPartners(1)"><i
class="fa fa-search"></i> Search class="fa fa-search"></i> Search
</button> </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 ng-click="loadLocations()"><i
class="fa fa-search"></i> Search class="fa fa-search"></i> Search
</button> </button>
@ -422,7 +424,7 @@
ui-sref=".new" title="New Partner"> ui-sref=".new" title="New Partner">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
New Partner New Partner
</a> </a>-->
</div> </div>
</div> </div>
@ -434,7 +436,7 @@
</div> </div>
</div> </div>
<ul class="nav nav-tabs"> <!--<ul class="nav nav-tabs">
<li ng-if="!mapFrame"><a role="button" class="partner_list_style active" <li ng-if="!mapFrame"><a role="button" class="partner_list_style active"
ng-click="toogleMerchantSelect()">商户列表</a> 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 ng-if="!mapFrame" style="margin-left: 10px"><a role="button" class="partner_list_style" ng-click="toogleMapSelect()">商户分布</a>
</li> </li>
</ul> </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 class="box-body no-padding table-responsive">
<div> <div>
<span style="float: right;font-size: 14px;" class="del_client">禁用</span> <span style="float: right;font-size: 14px;" class="del_client">禁用</span>
@ -541,7 +543,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row" ng-if="mapFrame"> <!--商户分布位置转移-->
<!--<div class="row" ng-if="mapFrame">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="box" style="border-top: none"> <div class="box" style="border-top: none">
<div class="embed-responsive" style="height: 300px;"> <div class="embed-responsive" style="height: 300px;">
@ -549,7 +552,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>-->
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save