master
yuan 7 years ago
parent e00d2bf155
commit 873ec92e6c

@ -16,7 +16,6 @@ define(['angular','decimal'], function (angular,decimal) {
$scope.today = new Date();
$scope.pagination = {};
$scope.today = new Date();
$scope.isAll = true;
$scope.clients = [$scope.currentUser.client];
if ($scope.currentUser.client.has_children) {
$scope.params.client_ids = [$scope.currentUser.client.client_id];
@ -25,23 +24,11 @@ define(['angular','decimal'], function (angular,decimal) {
clientList.forEach(function (client) {
$scope.clients.push(client);
});
$scope.clientIds = [];
$scope.clients.forEach(function (client) {
$scope.clientIds.push(client.client_id);
});
$scope.params.client_ids = angular.copy($scope.clientIds);
})
};
$scope.chooseClient = function (clientId) {
if (clientId == 'all') {
$scope.params.client_ids = angular.copy($scope.clientIds);
$scope.isAll = true;
$scope.chooseClientId = '';
} else {
$scope.chooseClientId = clientId;
$scope.params.client_ids = [clientId];
$scope.isAll = false;
}
$scope.chooseClientId = clientId;
$scope.params.client_ids = [clientId];
$scope.loadTradeLogs(1);
};
$scope.chooseToday = function () {

@ -91,8 +91,6 @@
<label class="control-label col-xs-4 col-sm-2">Sub Partner</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a>
<label ng-repeat="sub in clients">
|&nbsp;<a role="button"
ng-class="{'bg-primary':sub.client_id==chooseClientId}"

Loading…
Cancel
Save