|
|
|
@ -386,8 +386,9 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('newManagerCtrl', ['$scope', '$http','org',function ($scope, $http,org) {
|
|
|
|
|
$scope.isOrg = true;
|
|
|
|
|
$scope.org = angular.copy(org);
|
|
|
|
|
$scope.save = function (form) {
|
|
|
|
|
$scope.manager.org_id = org.org_id;
|
|
|
|
|
$scope.manager.org_id = $scope.org.org_id;
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
if (form.$invalid) {
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
@ -399,11 +400,11 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
|
|
|
|
|
}
|
|
|
|
|
if(($scope.currentUser.role & parseInt('1000000000000', 2)) > 0 && $scope.currentUser.org_id){
|
|
|
|
|
$scope.manager.bd = true;
|
|
|
|
|
/* if($scope.manager.org_id2 != "null") {
|
|
|
|
|
$scope.manager.org_id = $scope.manager.org_id2;
|
|
|
|
|
}
|
|
|
|
|
delete $scope.manager.org_id2;*/
|
|
|
|
|
}
|
|
|
|
|
if($scope.manager.org_id2 != "null") {
|
|
|
|
|
$scope.manager.org_id = $scope.manager.org_id2;
|
|
|
|
|
}
|
|
|
|
|
delete $scope.manager.org_id2;
|
|
|
|
|
|
|
|
|
|
$http.post('/sys/manager_accounts', $scope.manager).then(function () {
|
|
|
|
|
$scope.$close();
|
|
|
|
|