|
|
@@ -2136,10 +2136,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 分配用户
|
|
|
$scope.addUserInfo = function (customer) {
|
|
|
- if (!$scope.enabled) {
|
|
|
- toaster.pop('error', '您没有为当前客户分配用户的权限!');
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (!$scope.enabled) {
|
|
|
+ // toaster.pop('error', '您没有为当前客户分配用户的权限!');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
// 获取当前用户在当前企业是否被转移权限
|
|
|
AccountUser.getEnTransfer ({custUU: customer.myEnterprise.uu}, function(data) {
|
|
|
customer.enTransfer = data.result;
|
|
|
@@ -2162,8 +2162,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
else
|
|
|
loadUsers();
|
|
|
}
|
|
|
+ $scope.customerParams.reload();
|
|
|
});
|
|
|
-
|
|
|
} else {
|
|
|
toaster.pop('error', '您没有为当前客户分配用户的权限!');
|
|
|
}
|
|
|
@@ -2173,10 +2173,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 转移权限
|
|
|
$scope.transferUserInfo = function (customer) {
|
|
|
customer.enDistribute = null;
|
|
|
- if (!$scope.enabled) {
|
|
|
- toaster.pop('error', '您没有转移当前客户权限的权限!');
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (!$scope.enabled) {
|
|
|
+ // toaster.pop('error', '您没有转移当前客户权限的权限!');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
// 获取当前用户在当前企业是否被转移权限
|
|
|
AccountUser.getDistribute ({custUU: customer.myEnterprise.uu}, function(data) {
|
|
|
customer.enDistribute = data.result;
|
|
|
@@ -2199,8 +2199,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
else
|
|
|
loadUsers();
|
|
|
}
|
|
|
+ $scope.customerParams.reload();
|
|
|
});
|
|
|
-
|
|
|
} else {
|
|
|
toaster.pop('error', '您没有转移当前客户权限的权限!');
|
|
|
}
|
|
|
@@ -2462,7 +2462,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
- app.controller('AddUserInfoCtrl', ['$scope', '$modalInstance', 'customer', 'AccountUser', 'toaster', function ($scope, $modalInstance, customer, AccountUser, toaster) {
|
|
|
+ app.controller('AddUserInfoCtrl', ['$scope', '$modalInstance', 'customer', 'AccountUser', 'toaster', 'AuthenticationService',
|
|
|
+ function ($scope, $modalInstance, customer, AccountUser, toaster, AuthenticationService) {
|
|
|
+ AuthenticationService.getAuthentication().success(function (data) {
|
|
|
+ $scope.thisUser = data;
|
|
|
+ });
|
|
|
+
|
|
|
$scope.checkboxes = {
|
|
|
checked: false
|
|
|
};
|
|
|
@@ -2586,14 +2591,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
var checkStatus = function (userinfos) {
|
|
|
var transfer = [];
|
|
|
angular.forEach(userinfos, function (user, index) {
|
|
|
- if ($scope.thisUser.sys || $scope.thisUser.transfer) {
|
|
|
- if (user.transfer) {
|
|
|
- transfer.push({num: index});
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (user.distribute) {
|
|
|
- transfer.push({num: index});
|
|
|
- }
|
|
|
+ if (user.transfer) {
|
|
|
+ transfer.push({num: index});
|
|
|
}
|
|
|
});
|
|
|
$scope.transfer = transfer;
|
|
|
@@ -2628,9 +2627,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
user.$checked = !user.$checked;
|
|
|
angular.forEach($scope.userinfos, function (userInfo) {
|
|
|
if (user.userUU !== userInfo.userUU) {
|
|
|
- userInfo.distribute = false;
|
|
|
+ userInfo.transfer = false;
|
|
|
} else {
|
|
|
- userInfo.distribute = true;
|
|
|
+ userInfo.transfer = true;
|
|
|
}
|
|
|
});
|
|
|
}
|