|
|
|
@ -24,6 +24,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
|
$scope.isAll = true;
|
|
|
|
|
$scope.isLevel3All = true;
|
|
|
|
|
$scope.device_isAll = true;
|
|
|
|
|
$scope.order_device_isAll = true;
|
|
|
|
|
$scope.dev_params = {client_type:'sunmi',limit:100};
|
|
|
|
|
$scope.clients = [$scope.currentUser.client];
|
|
|
|
|
$scope.showLevel3Clients = false;
|
|
|
|
@ -188,6 +189,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
|
$scope.dev_params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
|
$scope.showLevel3Clients = false;
|
|
|
|
|
$scope.listDevices();
|
|
|
|
|
$scope.listDevicesIds();
|
|
|
|
|
} else if (client.level3Clients) {
|
|
|
|
|
$scope.chooseClientId = client.client_id;
|
|
|
|
|
$scope.showLevel3Clients = true;
|
|
|
|
@ -207,6 +209,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
|
$scope.dev_params.client_ids = [client.client_id];
|
|
|
|
|
$scope.showLevel3Clients = false;
|
|
|
|
|
$scope.listDevices();
|
|
|
|
|
$scope.listDevicesIds();
|
|
|
|
|
}
|
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
|
};
|
|
|
|
@ -218,12 +221,14 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
|
$scope.chooseLevel3ClientId = '';
|
|
|
|
|
$scope.dev_params.client_ids = angular.copy($scope.level3ClientIds);
|
|
|
|
|
$scope.listDevices();
|
|
|
|
|
$scope.listDevicesIds();
|
|
|
|
|
} else {
|
|
|
|
|
$scope.chooseLevel3ClientId = client.client_id;
|
|
|
|
|
$scope.params.client_ids = [client.client_id];
|
|
|
|
|
$scope.isLevel3All = false;
|
|
|
|
|
$scope.dev_params.client_ids = [client.client_id];
|
|
|
|
|
$scope.listDevices();
|
|
|
|
|
$scope.listDevicesIds();
|
|
|
|
|
}
|
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
|
};
|
|
|
|
@ -234,6 +239,12 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
|
$scope.devices = resp.data.data;
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.listDevicesIds = function () {
|
|
|
|
|
var params = angular.copy($scope.params)
|
|
|
|
|
$http.get('/client/partner_info/device_ids',{params: params}).then(function (resp) {
|
|
|
|
|
$scope.deviceIds = resp.data.data;
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.chooseDevices = function (dev_id) {
|
|
|
|
|
if(dev_id == 'all'){
|
|
|
|
|
$scope.chooseDevice_id = '';
|
|
|
|
@ -244,10 +255,28 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
|
$scope.chooseDevice_id = dev_id;
|
|
|
|
|
$scope.params.dev_id = dev_id;
|
|
|
|
|
$scope.device_isAll = false;
|
|
|
|
|
$scope.order_device_isAll = true;
|
|
|
|
|
$scope.choose_order_device_id = '';
|
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.chooseDeviceIds = function (dev_id) {
|
|
|
|
|
if(dev_id == 'all'){
|
|
|
|
|
$scope.choose_order_device_id = '';
|
|
|
|
|
$scope.params.dev_id = null;
|
|
|
|
|
$scope.order_device_isAll = true;
|
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
|
}else {
|
|
|
|
|
$scope.choose_order_device_id = dev_id;
|
|
|
|
|
$scope.params.dev_id = dev_id;
|
|
|
|
|
$scope.device_isAll = true;
|
|
|
|
|
$scope.order_device_isAll = false;
|
|
|
|
|
$scope.chooseDevice_id = '';
|
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.listDevices();
|
|
|
|
|
$scope.listDevicesIds();
|
|
|
|
|
|
|
|
|
|
if ($scope.currentUser.client.has_children) {
|
|
|
|
|
$http.get('/client/partner_info/sub_partners').then(function (resp) {
|
|
|
|
@ -265,8 +294,8 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
|
|
|
|
|
|
$scope.loadTradeLogs(1);
|
|
|
|
|
$scope.listDevicesIds();
|
|
|
|
|
//console.log($rootScope.currentUser.client.clientList);
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|