master
yuan 7 years ago
parent 3bc97503af
commit 6fae98440a

@ -12,17 +12,21 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
app.controller('merchantIdManageCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', function ($scope, $state, $http,$uibModal,commonDialog) { app.controller('merchantIdManageCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', function ($scope, $state, $http,$uibModal,commonDialog) {
$scope.pagination = {}; $scope.pagination = {};
$scope.params = {}; $scope.params = {};
$scope.isCollapsed = true;
$scope.loadClient = function () { $scope.loadClient = function () {
$scope.client_loading = true;
$http.get('/sys/merchant_id').then(function (resp) { $http.get('/sys/merchant_id').then(function (resp) {
$scope.clientsMap = resp.data $scope.clientsMap = resp.data;
$scope.client_loading = false;
}); });
}; };
$scope.loadClient(); $scope.loadClient();
$scope.loadNotTradeClient = function () { $scope.loadNotTradeClient = function () {
$http.get('/sys/merchant_id/trade').then(function (resp) { $http.get('/sys/merchant_id/trade').then(function (resp) {
$scope.notTradeClientsMap = resp.data.merchant_id_map; $scope.notTradeClientsMap = resp.data.merchant_id_map;
$scope.refresh_time = resp.data.refresh_time $scope.refresh_time = resp.data.refresh_time;
$scope.disable_button = false;
}); });
}; };
$scope.loadNotTradeClient(); $scope.loadNotTradeClient();
@ -63,6 +67,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}) })
}; };
$scope.refresh = function () { $scope.refresh = function () {
$scope.disable_button = true;
$http.post('/sys/merchant_id/refresh').then(function (resp) { $http.post('/sys/merchant_id/refresh').then(function (resp) {
$scope.loadNotTradeClient(); $scope.loadNotTradeClient();
}); });

@ -2,6 +2,10 @@
.cursor { .cursor {
cursor: pointer; cursor: pointer;
} }
.div-display{
display: none;
}
</style> </style>
<div ui-view> <div ui-view>
<section class="content-header"> <section class="content-header">
@ -19,15 +23,27 @@
<div class="box-body"> <div class="box-body">
<uib-tabset> <uib-tabset>
<uib-tab heading="商户号列表"> <uib-tab heading="商户号列表">
<loadingbar ng-if="client_loading"></loadingbar>
<div class="col-sm-12 col-xs-12"> <div class="col-sm-12 col-xs-12">
<div style="margin-top: 5px"> <div style="margin-top: 5px">
<div class="list-group col-sm-12 col-xs-12" ng-repeat="(key,clients) in clientsMap"> <div class="list-group col-sm-12 col-xs-12" ng-repeat="(key,clients) in clientsMap">
<a class="list-group-item active col-sm-12 col-xs-12"> <a class="list-group-item active col-sm-12 col-xs-12">
{{key|choose_merchant_id}} {{key|choose_merchant_id}}
<span href="#" class="small-box-footer cursor pull-right" ng-click="isCollapsed = !isCollapsed">更多 <i class="fa fa-arrow-circle-right"></i></span>
</a> </a>
<a class="list-group-item col-sm-2 col-xs-6 cursor" <a class="list-group-item col-sm-2 col-xs-6 cursor"
ng-repeat="client in clients | orderBy:'client_count':true" ng-repeat="client in clients | orderBy:'client_count':true"
ng--click="showClient(client.sub_merchant_id);"> ng--click="showClient(client.sub_merchant_id);" ng-if="$index<60">
<span>
{{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger"
title="Using temp Sub Merchant ID"
ng-if="client.temp_sub_merchant"></i></span>
<span class="badge" aria-hidden="true" title="show detail">{{client.client_count}}</span>
</a>
<a class="list-group-item col-sm-2 col-xs-6 cursor" ng-class="{'div-display':isCollapsed}"
ng-repeat="client in clients | orderBy:'client_count':true"
ng--click="showClient(client.sub_merchant_id);" ng-if="$index>59">
<span> <span>
{{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger" {{client.sub_merchant_id}}&nbsp;<i class="fa fa-clock-o text-danger"
title="Using temp Sub Merchant ID" title="Using temp Sub Merchant ID"
@ -45,13 +61,14 @@
<span ng-if="refresh_time"> <span ng-if="refresh_time">
<span>上次刷新时间:</span><span><em><b>{{refresh_time}}</b></em></span> <span>上次刷新时间:</span><span><em><b>{{refresh_time}}</b></em></span>
</span>&nbsp;&nbsp; </span>&nbsp;&nbsp;
<a role="button" class="btn btn-primary" title="refresh" ng-click="refresh()"> <a role="button" class="btn btn-primary" title="refresh" ng-click="refresh()" ng-class="{disabled:disable_button}">
<i class="glyphicon glyphicon-refresh" <i class="glyphicon glyphicon-refresh"
title="refresh"></i> title="refresh"></i>
</a> </a>
</div> </div>
</div> </div>
<div class="col-sm-12 col-xs-12"> <div class="col-sm-12 col-xs-12">
<loadingbar ng-if="disable_button"></loadingbar>
<div> <div>
<div class="list-group col-sm-12 col-xs-12" <div class="list-group col-sm-12 col-xs-12"
ng-repeat="(key,clients) in notTradeClientsMap"> ng-repeat="(key,clients) in notTradeClientsMap">

Loading…
Cancel
Save