|
|
@ -17,6 +17,8 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
$scope.pagination = {};
|
|
|
|
$scope.pagination = {};
|
|
|
|
$scope.params.clearing_status = -1;
|
|
|
|
$scope.params.clearing_status = -1;
|
|
|
|
$scope.params.channel = 'ALL'
|
|
|
|
$scope.params.channel = 'ALL'
|
|
|
|
|
|
|
|
$scope.dev_params = {client_type:'sunmi',limit:100};
|
|
|
|
|
|
|
|
$scope.device_isAll = true;
|
|
|
|
$scope.params.trans_type = 0;
|
|
|
|
$scope.params.trans_type = 0;
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.clients = [$scope.currentUser.client];
|
|
|
|
$scope.clients = [$scope.currentUser.client];
|
|
|
@ -69,6 +71,26 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
$scope.params.datefrom = monthBegin;
|
|
|
|
$scope.params.datefrom = monthBegin;
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.listDevices = function () {
|
|
|
|
|
|
|
|
var params = angular.copy($scope.dev_params)
|
|
|
|
|
|
|
|
$http.get('/client/partner_info/devices', {params: params}).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.devices = resp.data.data;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.chooseDevices = function (dev_id) {
|
|
|
|
|
|
|
|
if(dev_id == 'all'){
|
|
|
|
|
|
|
|
$scope.chooseDevice_id = '';
|
|
|
|
|
|
|
|
$scope.params.dev_id = null;
|
|
|
|
|
|
|
|
$scope.device_isAll = true;
|
|
|
|
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
$scope.chooseDevice_id = dev_id;
|
|
|
|
|
|
|
|
$scope.params.dev_id = dev_id;
|
|
|
|
|
|
|
|
$scope.device_isAll = false;
|
|
|
|
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.listDevices();
|
|
|
|
$scope.loadTradeLogs = function (page) {
|
|
|
|
$scope.loadTradeLogs = function (page) {
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
if (params.datefrom) {
|
|
|
|
if (params.datefrom) {
|
|
|
@ -123,6 +145,10 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
url += connectSymbol + 'trans_type=' + params.trans_type;
|
|
|
|
url += connectSymbol + 'trans_type=' + params.trans_type;
|
|
|
|
connectSymbol = '&';
|
|
|
|
connectSymbol = '&';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (params.dev_id) {
|
|
|
|
|
|
|
|
url += connectSymbol + 'dev_id=' + params.dev_id;
|
|
|
|
|
|
|
|
connectSymbol = '&'
|
|
|
|
|
|
|
|
}
|
|
|
|
params.client_ids.forEach(function (i) {
|
|
|
|
params.client_ids.forEach(function (i) {
|
|
|
|
url += connectSymbol + 'client_ids=' + i;
|
|
|
|
url += connectSymbol + 'client_ids=' + i;
|
|
|
|
connectSymbol = '&';
|
|
|
|
connectSymbol = '&';
|
|
|
@ -137,6 +163,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
url += connectSymbol + 'dateto=' + params.dateto;
|
|
|
|
url += connectSymbol + 'dateto=' + params.dateto;
|
|
|
|
connectSymbol = '&';
|
|
|
|
connectSymbol = '&';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
url += connectSymbol + 'page=' + params.page;
|
|
|
|
url += connectSymbol + 'page=' + params.page;
|
|
|
|
return url;
|
|
|
|
return url;
|
|
|
|