|
|
@@ -566,6 +566,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
*/
|
|
|
app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization', '$location', 'AuthenticationService', 'BaseService', '$rootScope',
|
|
|
function ($scope, toaster, Organization, $location, AuthenticationService, BaseService, $rootScope) {
|
|
|
+ $scope.loading = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
$rootScope.tree = 'user';
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
@@ -578,17 +579,14 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$scope.org = data;
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
}
|
|
|
if (data == null || !data.content) {
|
|
|
//$scope.isAuthed = false;
|
|
|
AuthenticationService.redirectSignin();
|
|
|
}
|
|
|
- });
|
|
|
- Organization.getByUuid({uuid : $scope.userUU}, {}, function(data) {//10041558
|
|
|
- $scope.org = data;
|
|
|
- }, function() {
|
|
|
- toaster.pop('error', '注册情况加载失败');
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
|
|
|
//公益机构注册
|
|
|
@@ -706,6 +704,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
*/
|
|
|
app.controller('CertificationStep0Ctrl', ['$scope', 'toaster', 'Organization', '$location', 'AuthenticationService', 'BaseService', '$rootScope',
|
|
|
function ($scope, toaster, Organization, $location, AuthenticationService, BaseService, $rootScope) {
|
|
|
+ $scope.loading = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
$rootScope.tree = 'user';
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
@@ -736,12 +735,14 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$scope.checked = true;
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
}
|
|
|
if (data == null || !data.content) {
|
|
|
//$scope.isAuthed = false;
|
|
|
AuthenticationService.redirectSignin();
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
|
|
|
}]);
|
|
|
@@ -751,6 +752,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
*/
|
|
|
app.controller('CertificationStep1Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', '$filter', 'toaster', 'Organization', 'AuthenticationService',
|
|
|
function ($scope, BaseService, $http, $rootScope, $timeout, $location, $filter, toaster, Organization, AuthenticationService) {
|
|
|
+ $scope.loading = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
$rootScope.tree = 'user';
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
@@ -774,6 +776,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$scope.org = data;
|
|
|
orgCopy = angular.copy($scope.org);
|
|
|
}, function() {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
});
|
|
|
}
|
|
|
@@ -781,6 +784,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
//$scope.isAuthed = false;
|
|
|
AuthenticationService.redirectSignin();
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
|
|
|
// 获取地址信息
|
|
|
@@ -807,9 +811,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
|
|
|
//提交
|
|
|
$scope.saveStep1 = function (org, orgType, invalid) {
|
|
|
+ $scope.loading = true;
|
|
|
if (invalid == true) {
|
|
|
$scope.submited = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
+ $scope.loading = false;
|
|
|
return;
|
|
|
}
|
|
|
if (orgCopy == org) {
|
|
|
@@ -844,6 +850,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
if (data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
|
|
|
}).error(function (data, status) {
|
|
|
$scope.loadingShow = false;
|
|
|
@@ -852,6 +859,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
} else {
|
|
|
toaster.pop('error', '操作失败', data.error);
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
@@ -862,6 +870,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
*/
|
|
|
app.controller('CertificationStep2Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'AuthenticationService',
|
|
|
function ($scope, BaseService, $http, $rootScope, $timeout, $location, toaster, Organization, AuthenticationService) {
|
|
|
+ $scope.loading = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
$rootScope.tree = 'user';
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
@@ -875,6 +884,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$scope.org = data;
|
|
|
orgCopy = angular.copy($scope.org);
|
|
|
}, function() {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
});
|
|
|
}
|
|
|
@@ -882,13 +892,16 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
//$scope.isAuthed = false;
|
|
|
AuthenticationService.redirectSignin();
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
|
|
|
//提交
|
|
|
$scope.saveStep2 = function (org, orgType, invalid) {
|
|
|
+ $scope.loading = true;
|
|
|
if (invalid == true) {
|
|
|
$scope.submited = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
+ $scope.loading = false;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -916,6 +929,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
if (data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
|
|
|
}).error(function (data, status) {
|
|
|
$scope.loadingShow = false;
|
|
|
@@ -924,6 +938,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
} else {
|
|
|
toaster.pop('error', '操作失败', data.error);
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
@@ -934,6 +950,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
*/
|
|
|
app.controller('CertificationStep3Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'BaseService', 'AuthenticationService',
|
|
|
function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization, BaseService, AuthenticationService) {
|
|
|
+ $scope.loading = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
$rootScope.tree = 'user';
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
@@ -956,12 +973,14 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
orgCopy = angular.copy($scope.org);
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
}
|
|
|
if (data == null || !data.content) {
|
|
|
//$scope.isAuthed = false;
|
|
|
AuthenticationService.redirectSignin();
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
|
|
|
if (angular.isUndefined($scope.org)) {
|
|
|
@@ -1029,6 +1048,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
|
|
|
// 图片上传
|
|
|
$scope.fileChanged = function(ele, order){
|
|
|
+ $scope.loading = true;
|
|
|
if (order == 0) {
|
|
|
$scope.logo = ele.files[0];
|
|
|
$scope.logoUrl = getObjectURL($scope.logo);
|
|
|
@@ -1042,11 +1062,13 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$scope.legalIdCard = ele.files[0];
|
|
|
$scope.legalIdCardUrl = getObjectURL($scope.legalIdCard);
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
$scope.$apply();
|
|
|
};
|
|
|
|
|
|
// 查看范例
|
|
|
$scope.showImg = function (type) {
|
|
|
+ $scope.loading = true;
|
|
|
var img = null;
|
|
|
var imgUrl = null;
|
|
|
switch (type) {
|
|
|
@@ -1088,6 +1110,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
box.hide();
|
|
|
});
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
};
|
|
|
|
|
|
// 删除
|
|
|
@@ -1123,9 +1146,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
|
|
|
//提交
|
|
|
$scope.saveStep3 = function (org, isDraft, orgType, invalid) {
|
|
|
+ $scope.loading = true;
|
|
|
if (invalid == true) {
|
|
|
$scope.submited = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
+ $scope.loading = false;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1171,6 +1196,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
if (data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
|
|
|
}).error(function (data, status) {
|
|
|
$scope.loadingShow = false;
|
|
|
@@ -1179,6 +1205,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
} else {
|
|
|
toaster.pop('error', '操作失败', data.error);
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
@@ -1189,7 +1217,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
*/
|
|
|
app.controller('PublicCertificationStep4Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'AuthenticationService',
|
|
|
function ($scope, BaseService, $http, $rootScope, $timeout, $location, toaster, Organization, AuthenticationService) {
|
|
|
-
|
|
|
+ $scope.loading = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
$rootScope.tree = 'user';
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
@@ -1210,12 +1238,14 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
orgCopy = angular.copy($scope.org);
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
}
|
|
|
if (data == null || !data.content) {
|
|
|
//$scope.isAuthed = false;
|
|
|
AuthenticationService.redirectSignin();
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
|
|
|
if (angular.isUndefined($scope.org)) {
|
|
|
@@ -1238,6 +1268,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
|
|
|
// 图片上传
|
|
|
$scope.fileChanged = function(ele, order){
|
|
|
+ $scope.loading = true;
|
|
|
if (order == 0) {
|
|
|
$scope.material = ele.files[0];
|
|
|
$scope.materialUrl = getObjectURL($scope.material);
|
|
|
@@ -1246,10 +1277,12 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$scope.certifyUrl = getObjectURL($scope.certify);
|
|
|
}
|
|
|
$scope.$apply();
|
|
|
+ $scope.loading = false;
|
|
|
};
|
|
|
|
|
|
// 查看范例
|
|
|
$scope.showImg = function (type) {
|
|
|
+ $scope.loading = true;
|
|
|
var img = null;
|
|
|
var imgUrl = null;
|
|
|
switch (type) {
|
|
|
@@ -1283,6 +1316,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
box.hide();
|
|
|
});
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
};
|
|
|
|
|
|
// 删除
|
|
|
@@ -1310,9 +1344,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
|
|
|
//提交
|
|
|
$scope.saveStep4 = function (org, isDraft, invalid) {
|
|
|
+ $scope.loading = true;
|
|
|
if (invalid == true) {
|
|
|
$scope.submited = true;
|
|
|
BaseService.scrollBackToTop();
|
|
|
+ $scope.loading = false;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1348,6 +1384,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
if (data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
|
|
|
}).error(function (data, status) {
|
|
|
$scope.loadingShow = false;
|
|
|
@@ -1356,6 +1393,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
} else {
|
|
|
toaster.pop('error', '操作失败', data.error);
|
|
|
}
|
|
|
+ $scope.loading = false;
|
|
|
});
|
|
|
}
|
|
|
};
|