|
|
@@ -55,6 +55,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
title : '公益机构认证第一步',
|
|
|
templateUrl : 'static/view/user/charityCertification1.html',
|
|
|
controller : 'charityCertificationStep1Ctrl'
|
|
|
+ }).state("charityCertificationStep2", {
|
|
|
+ url : '/charityCertificationStep2',
|
|
|
+ title : '公益机构认证第二步',
|
|
|
+ templateUrl : 'static/view/user/charityCertification2.html',
|
|
|
+ controller : 'charityCertificationStep2Ctrl'
|
|
|
});
|
|
|
}]);
|
|
|
|
|
|
@@ -348,11 +353,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
/**
|
|
|
* 公益机构认证第一步
|
|
|
*/
|
|
|
- app.controller('charityCertificationStep1Ctrl', ['$scope', '$http', '$rootScope', '$timeout', 'toaster', 'Organization',
|
|
|
- function ($scope, $http, $rootScope, $timeout, toaster, Organization) {
|
|
|
+ app.controller('charityCertificationStep1Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
|
|
|
+ function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization) {
|
|
|
|
|
|
// 获取当前账户注册机构情况
|
|
|
- Organization.getByUuid({uuid : "10041166"}, {}, function(data) {//154534654
|
|
|
+ Organization.getByUuid({uuid : 10041166}, {}, function(data) {//154534654
|
|
|
$scope.org = data;
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
@@ -373,7 +378,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
|
|
|
|
|
|
//提交
|
|
|
- $scope.register = function (org) {
|
|
|
+ $scope.saveStep1 = function (org) {
|
|
|
org.type = 2;//机构类别(1:公募 2:非公募)
|
|
|
//var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
|
|
|
$http({
|
|
|
@@ -384,11 +389,12 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
},
|
|
|
}).success(function (data) {
|
|
|
if (data.success) {
|
|
|
- toaster.pop('success', '提示', '保存成功');
|
|
|
- $timeout(function () {
|
|
|
+ toaster.pop('success', '提示', data.success);
|
|
|
+ /*$timeout(function () {
|
|
|
//提交后跳转到下一页,防止重复提交
|
|
|
window.location.href = "#/charityCertification2?orgId=" + data.id;
|
|
|
- }, 500);
|
|
|
+ }, 500);*/
|
|
|
+ $location.path('charityCertificationStep2');
|
|
|
}
|
|
|
if (data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
|
@@ -405,6 +411,45 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
};
|
|
|
}]);
|
|
|
|
|
|
+ /**
|
|
|
+ * 公益机构认证第二步
|
|
|
+ */
|
|
|
+ app.controller('charityCertificationStep2Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
|
|
|
+ function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization) {
|
|
|
+
|
|
|
+ // 获取当前账户注册机构情况
|
|
|
+ Organization.getByUuid({uuid : 10041166}, {}, function(data) {//154534654
|
|
|
+ $scope.org = data;
|
|
|
+ }, function() {
|
|
|
+ toaster.pop('error', '注册情况加载失败');
|
|
|
+ });
|
|
|
+
|
|
|
+ //提交
|
|
|
+ $scope.saveStep2 = function (org) {
|
|
|
+ $http({
|
|
|
+ method : 'POST',
|
|
|
+ url : '/org/save',
|
|
|
+ params : {
|
|
|
+ jsonStr : org
|
|
|
+ },
|
|
|
+ }).success(function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ $location.path('charityCertificationStep1');
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', data.error);
|
|
|
+ }
|
|
|
+
|
|
|
+ }).error(function (data, status) {
|
|
|
+ $scope.loadingShow = false;
|
|
|
+ if (status == 403) {
|
|
|
+ toaster.pop('error', '操作失败', data);
|
|
|
+ } else {
|
|
|
+ toaster.pop('error', '操作失败', data.error);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+ }]);
|
|
|
|
|
|
|
|
|
return app;
|