|
|
@ -2470,8 +2470,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.loadSubClients = function (page) {
|
|
|
|
$scope.loadSubClients = function (page) {
|
|
|
|
$scope.page = page || $scope.pagination.page || 1;
|
|
|
|
var params = {};
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/'+$scope.page).then(function (resp) {
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page',{params : params}).then(function (resp) {
|
|
|
|
$scope.subPartners = resp.data.data;
|
|
|
|
$scope.subPartners = resp.data.data;
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -3383,6 +3384,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.isLevel3All = true;
|
|
|
|
$scope.isLevel3All = true;
|
|
|
|
$scope.clients = [$scope.partner];
|
|
|
|
$scope.clients = [$scope.partner];
|
|
|
|
$scope.showLevel3Clients = false;
|
|
|
|
$scope.showLevel3Clients = false;
|
|
|
|
|
|
|
|
$scope.subClientTable1 = [$scope.partner];
|
|
|
|
|
|
|
|
$scope.subClientTable2 = [];
|
|
|
|
|
|
|
|
$scope.choseSubClientNow = 'chose';
|
|
|
|
|
|
|
|
$scope.more20ChoseSubClient = false;
|
|
|
|
|
|
|
|
$scope.subSearchText = '';
|
|
|
|
|
|
|
|
|
|
|
|
$scope.today = new Date();
|
|
|
|
$scope.today = new Date();
|
|
|
|
$scope.chooseToday = function () {
|
|
|
|
$scope.chooseToday = function () {
|
|
|
@ -3450,6 +3456,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
delete params.gatewayChilds;
|
|
|
|
delete params.gatewayChilds;
|
|
|
|
delete params.gatewayChild;
|
|
|
|
delete params.gatewayChild;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($scope.isAll) {
|
|
|
|
|
|
|
|
delete params.client_ids;
|
|
|
|
|
|
|
|
}
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/trade_logs', {params: params}).then(function (resp) {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/trade_logs', {params: params}).then(function (resp) {
|
|
|
|
$scope.tradeLogs = resp.data.data;
|
|
|
|
$scope.tradeLogs = resp.data.data;
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
@ -3484,6 +3493,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$scope.chooseClient = function (client) {
|
|
|
|
$scope.chooseClient = function (client) {
|
|
|
|
if (client == 'all') {
|
|
|
|
if (client == 'all') {
|
|
|
|
|
|
|
|
$scope.choseSubClientNow = 'chose';
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.chooseClientId = '';
|
|
|
|
$scope.chooseClientId = '';
|
|
|
@ -3520,10 +3530,24 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if ($scope.partner.has_children && !$scope.partner.hide_sub_mch) {
|
|
|
|
$scope.searchSubClients = function (subSearchText,page) {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients').then(function (resp) {
|
|
|
|
$scope.subClientTable1 = [$scope.partner];
|
|
|
|
var clientList = resp.data;
|
|
|
|
$scope.subClientTable2 = [];
|
|
|
|
|
|
|
|
var params = {};
|
|
|
|
|
|
|
|
params.page = page || $scope.subClientPagination.page || 1;
|
|
|
|
|
|
|
|
if (subSearchText != '') {
|
|
|
|
|
|
|
|
$scope.subSearchText = subSearchText;
|
|
|
|
|
|
|
|
params.searchText = subSearchText;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page',{params: params}).then(function (resp) {
|
|
|
|
|
|
|
|
var clientList = resp.data.data;
|
|
|
|
|
|
|
|
$scope.subClientPagination = resp.data.pagination;
|
|
|
|
clientList.forEach(function (client) {
|
|
|
|
clientList.forEach(function (client) {
|
|
|
|
|
|
|
|
if ($scope.subClientTable1.length < 11) {
|
|
|
|
|
|
|
|
$scope.subClientTable1.push(client);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
$scope.subClientTable2.push(client);
|
|
|
|
|
|
|
|
}
|
|
|
|
$scope.clients.push(client);
|
|
|
|
$scope.clients.push(client);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$scope.clientIds = [];
|
|
|
|
$scope.clientIds = [];
|
|
|
@ -3536,12 +3560,27 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
//console.log($rootScope.currentUser.client.clientList);
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($scope.partner.has_children && !$scope.partner.hide_sub_mch) {
|
|
|
|
|
|
|
|
$scope.searchSubClients('',1);
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.checkSubClientChoseShow = function (client) {
|
|
|
|
|
|
|
|
$scope.more20ChoseSubClient = !$scope.more20ChoseSubClient;
|
|
|
|
|
|
|
|
if (client != '') {
|
|
|
|
|
|
|
|
$scope.choseSubClientNow = client.short_name;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.clickDisplayChoseDiv = function (event) {
|
|
|
|
|
|
|
|
$scope.more20ChoseSubClient = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.choseDivStopPropagation = function (event) {
|
|
|
|
|
|
|
|
event.stopPropagation()
|
|
|
|
|
|
|
|
};
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
app.controller('partnerPluginsCtrl', ['$scope', '$uibModal', function ($scope, $uibModal) {
|
|
|
|
app.controller('partnerPluginsCtrl', ['$scope', '$uibModal', function ($scope, $uibModal) {
|
|
|
|
$scope.configRedpack = function () {
|
|
|
|
$scope.configRedpack = function () {
|
|
|
@ -4355,15 +4394,27 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.isLevel3All = true;
|
|
|
|
$scope.isLevel3All = true;
|
|
|
|
$scope.clinet = {};
|
|
|
|
$scope.clinet = {};
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.initClientInfo = function(){
|
|
|
|
$scope.more20ChoseSubClient = false;
|
|
|
|
$http.get('/sys/partners/'+clientMoniker).then(function (resp) {
|
|
|
|
$scope.choseSubClientNow = 'chose';
|
|
|
|
$scope.client = resp.data;
|
|
|
|
$scope.searchSubClients = function (subSearchText,page) {
|
|
|
|
$scope.clients = [$scope.client];
|
|
|
|
|
|
|
|
if ($scope.client.has_children && !$scope.client.hide_sub_mch) {
|
|
|
|
$scope.subClientTable1 = [$scope.partner];
|
|
|
|
$scope.params.client_ids = [$scope.client.client_id];
|
|
|
|
$scope.subClientTable2 = [];
|
|
|
|
$http.get('/sys/partners/'+clientMoniker+'/sub_clients').then(function (resp) {
|
|
|
|
var params = {};
|
|
|
|
var clientList = resp.data;
|
|
|
|
params.page = page || $scope.subClientPagination.page || 1;
|
|
|
|
|
|
|
|
if (subSearchText != '') {
|
|
|
|
|
|
|
|
$scope.subSearchText = subSearchText;
|
|
|
|
|
|
|
|
params.searchText = subSearchText;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page',{params: params}).then(function (resp) {
|
|
|
|
|
|
|
|
var clientList = resp.data.data;
|
|
|
|
|
|
|
|
$scope.subClientPagination = resp.data.pagination;
|
|
|
|
clientList.forEach(function (client) {
|
|
|
|
clientList.forEach(function (client) {
|
|
|
|
|
|
|
|
if ($scope.subClientTable1.length < 11) {
|
|
|
|
|
|
|
|
$scope.subClientTable1.push(client);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
$scope.subClientTable2.push(client);
|
|
|
|
|
|
|
|
}
|
|
|
|
$scope.clients.push(client);
|
|
|
|
$scope.clients.push(client);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$scope.clientIds = [];
|
|
|
|
$scope.clientIds = [];
|
|
|
@ -4376,8 +4427,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.loadSettlementLogs(1);
|
|
|
|
});
|
|
|
|
})
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.initClientInfo = function(){
|
|
|
|
|
|
|
|
$http.get('/sys/partners/'+clientMoniker).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.client = resp.data;
|
|
|
|
|
|
|
|
$scope.clients = [$scope.client];
|
|
|
|
|
|
|
|
if ($scope.client.has_children && !$scope.client.hide_sub_mch) {
|
|
|
|
|
|
|
|
$scope.searchSubClients('',1);
|
|
|
|
|
|
|
|
$scope.params.dateto = new Date();
|
|
|
|
|
|
|
|
var day = new Date();
|
|
|
|
|
|
|
|
day.setDate(day.getDate() - 7);
|
|
|
|
|
|
|
|
$scope.params.datefrom = day;
|
|
|
|
|
|
|
|
$scope.chooseClient('all');
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
$scope.params.dateto = new Date();
|
|
|
|
|
|
|
|
var day = new Date();
|
|
|
|
|
|
|
|
day.setDate(day.getDate() - 7);
|
|
|
|
|
|
|
|
$scope.params.datefrom = day;
|
|
|
|
|
|
|
|
$scope.chooseClient('all');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4396,7 +4464,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
|
|
|
|
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
|
|
|
|
url += connectSymbol + 'dateto=' + params.dateto;
|
|
|
|
url += connectSymbol + 'dateto=' + params.dateto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (params.client_ids){
|
|
|
|
if (params.client_ids && !$scope.isAll){
|
|
|
|
params.client_ids.forEach(function (i) {
|
|
|
|
params.client_ids.forEach(function (i) {
|
|
|
|
url += connectSymbol + 'client_ids=' + i;
|
|
|
|
url += connectSymbol + 'client_ids=' + i;
|
|
|
|
connectSymbol = '&';
|
|
|
|
connectSymbol = '&';
|
|
|
@ -4407,6 +4475,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
|
|
$scope.chooseClient = function (client) {
|
|
|
|
$scope.chooseClient = function (client) {
|
|
|
|
if (client == 'all') {
|
|
|
|
if (client == 'all') {
|
|
|
|
|
|
|
|
$scope.choseSubClientNow = 'chose';
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.chooseClientId = '';
|
|
|
|
$scope.chooseClientId = '';
|
|
|
@ -4477,6 +4546,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
params.limit = 10;
|
|
|
|
params.limit = 10;
|
|
|
|
|
|
|
|
if ($scope.isAll) {
|
|
|
|
|
|
|
|
delete params.client_ids;
|
|
|
|
|
|
|
|
}
|
|
|
|
$http.get('/sys/partners/' + clientMoniker + '/lists_settlements', {params: params}).then(function (resp) {
|
|
|
|
$http.get('/sys/partners/' + clientMoniker + '/lists_settlements', {params: params}).then(function (resp) {
|
|
|
|
$scope.settlementLogs = resp.data.data;
|
|
|
|
$scope.settlementLogs = resp.data.data;
|
|
|
|
$scope.padding = resp.data.padding;
|
|
|
|
$scope.padding = resp.data.padding;
|
|
|
@ -4496,7 +4568,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
size: 'lg'
|
|
|
|
size: 'lg'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.chooseLast7Days();
|
|
|
|
|
|
|
|
|
|
|
|
$scope.checkSubClientChoseShow = function (client) {
|
|
|
|
|
|
|
|
$scope.more20ChoseSubClient = !$scope.more20ChoseSubClient;
|
|
|
|
|
|
|
|
if (client != '') {
|
|
|
|
|
|
|
|
$scope.choseSubClientNow = client.short_name;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.clickDisplayChoseDiv = function (event) {
|
|
|
|
|
|
|
|
$scope.more20ChoseSubClient = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.choseDivStopPropagation = function (event) {
|
|
|
|
|
|
|
|
event.stopPropagation()
|
|
|
|
|
|
|
|
};
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
app.controller('partnerSurchargeAccountCtrl', ['$scope', '$uibModal', '$http', 'clientMoniker', '$filter', function ($scope, $uibModal, $http, clientMoniker, $filter) {
|
|
|
|
app.controller('partnerSurchargeAccountCtrl', ['$scope', '$uibModal', '$http', 'clientMoniker', '$filter', function ($scope, $uibModal, $http, clientMoniker, $filter) {
|
|
|
|
$scope.params = {};
|
|
|
|
$scope.params = {};
|
|
|
|