|
|
@@ -50,26 +50,59 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
url : '/selectInstitutionsNature',
|
|
|
title : '机构入驻选择',
|
|
|
templateUrl : 'static/view/user/selectInstitutionsNature.html',
|
|
|
+ controller : 'SelectInstitutionsNatureCtrl'
|
|
|
+ }).state("charityCertificationStep0", {
|
|
|
+ url : '/charityCertificationStep0',
|
|
|
+ title : '公益机构认证协议',
|
|
|
+ templateUrl : 'static/view/user/charityCertification.html',
|
|
|
}).state("charityCertificationStep1", {
|
|
|
url : '/charityCertificationStep1',
|
|
|
title : '公益机构认证第一步',
|
|
|
templateUrl : 'static/view/user/charityCertification1.html',
|
|
|
- controller : 'charityCertificationStep1Ctrl'
|
|
|
+ controller : 'CertificationStep1Ctrl'
|
|
|
}).state("charityCertificationStep2", {
|
|
|
url : '/charityCertificationStep2',
|
|
|
title : '公益机构认证第二步',
|
|
|
templateUrl : 'static/view/user/charityCertification2.html',
|
|
|
- controller : 'charityCertificationStep2Ctrl'
|
|
|
+ controller : 'CertificationStep2Ctrl'
|
|
|
}).state("charityCertificationStep3", {
|
|
|
url : '/charityCertificationStep3',
|
|
|
title : '公益机构认证第三步',
|
|
|
templateUrl : 'static/view/user/charityCertification3.html',
|
|
|
- controller : 'charityCertificationStep3Ctrl'
|
|
|
+ controller : 'CertificationStep3Ctrl'
|
|
|
}).state("charityCertificationStep4", {
|
|
|
url : '/charityCertificationStep4',
|
|
|
title : '公益机构认证完成',
|
|
|
templateUrl : 'static/view/user/charityCertification4.html',
|
|
|
- controller : 'charityCertificationStep4Ctrl'
|
|
|
+ controller : 'CertificationStep4Ctrl'
|
|
|
+ }).state("publicOfferingCertificationStep0", {
|
|
|
+ url : '/publicOfferingCertificationStep0',
|
|
|
+ title : '公募机构认证协议',
|
|
|
+ templateUrl : 'static/view/user/publicOfferingCertification.html',
|
|
|
+ }).state("publicOfferingCertificationStep1", {
|
|
|
+ url : '/publicOfferingCertificationStep1',
|
|
|
+ title : '公募机构认证第一步',
|
|
|
+ templateUrl : 'static/view/user/publicOfferingCertification1.html',
|
|
|
+ controller : 'CertificationStep1Ctrl'
|
|
|
+ }).state("publicOfferingCertificationStep2", {
|
|
|
+ url : '/publicOfferingCertificationStep2',
|
|
|
+ title : '公募机构认证第二步',
|
|
|
+ templateUrl : 'static/view/user/publicOfferingCertification2.html',
|
|
|
+ controller : 'CertificationStep2Ctrl'
|
|
|
+ }).state("publicOfferingCertificationStep3", {
|
|
|
+ url : '/publicOfferingCertificationStep3',
|
|
|
+ title : '公募机构认证第三步',
|
|
|
+ templateUrl : 'static/view/user/publicOfferingCertification3.html',
|
|
|
+ controller : 'CertificationStep3Ctrl'
|
|
|
+ }).state("publicOfferingCertificationStep4", {
|
|
|
+ url : '/publicOfferingCertificationStep4',
|
|
|
+ title : '公募机构认证第四步',
|
|
|
+ templateUrl : 'static/view/user/publicOfferingCertification4.html',
|
|
|
+ controller : 'PublicCertificationStep4Ctrl'
|
|
|
+ }).state("publicOfferingCertificationStep5", {
|
|
|
+ url : '/publicOfferingCertificationStep5',
|
|
|
+ title : '公益机构认证完成',
|
|
|
+ templateUrl : 'static/view/user/publicOfferingCertification5.html',
|
|
|
});
|
|
|
}]);
|
|
|
|
|
|
@@ -361,13 +394,26 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 公益机构认证第一步
|
|
|
+ * 机构入驻选择
|
|
|
+ */
|
|
|
+ app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization',
|
|
|
+ function ($scope, toaster, Organization) {
|
|
|
+ // 获取当前账户注册机构情况
|
|
|
+ Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041558
|
|
|
+ $scope.org = data;
|
|
|
+ }, function() {
|
|
|
+ toaster.pop('error', '注册情况加载失败');
|
|
|
+ });
|
|
|
+ }]);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 机构认证第一步
|
|
|
*/
|
|
|
- app.controller('charityCertificationStep1Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
|
|
|
+ app.controller('CertificationStep1Ctrl', ['$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) {//10041558
|
|
|
$scope.org = data;
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
@@ -388,11 +434,15 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
|
|
|
|
|
|
//提交
|
|
|
- $scope.saveStep1 = function (org,dirty) {
|
|
|
+ $scope.saveStep1 = function (org,dirty,orgType) {
|
|
|
if (dirty == false) {
|
|
|
- $location.path('charityCertificationStep2');
|
|
|
+ if (orgType == 1) {
|
|
|
+ $location.path('publicOfferingCertificationStep2');
|
|
|
+ } else if (orgType == 2) {
|
|
|
+ $location.path('charityCertificationStep2');
|
|
|
+ }
|
|
|
} else {
|
|
|
- org.type = 2;//机构类别(1:公募 2:非公募)
|
|
|
+ org.type = orgType;//机构类别(1:公募 2:非公募)
|
|
|
//var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
|
|
|
$http({
|
|
|
method : 'POST',
|
|
|
@@ -405,9 +455,13 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
/*$timeout(function () {
|
|
|
//提交后跳转到下一页,防止重复提交
|
|
|
- window.location.href = "#/charityCertification2?orgId=" + data.id;
|
|
|
+ window.location.href = "#/charityCertification2;
|
|
|
}, 500);*/
|
|
|
- $location.path('charityCertificationStep2');
|
|
|
+ if (orgType == 1) {
|
|
|
+ $location.path('publicOfferingCertificationStep2');
|
|
|
+ } else if (orgType == 2) {
|
|
|
+ $location.path('charityCertificationStep2');
|
|
|
+ }
|
|
|
}
|
|
|
if (data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
|
@@ -426,22 +480,26 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 公益机构认证第二步
|
|
|
+ * 机构认证第二步
|
|
|
*/
|
|
|
- app.controller('charityCertificationStep2Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
|
|
|
+ app.controller('CertificationStep2Ctrl', ['$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) {//10041558
|
|
|
$scope.org = data;
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
});
|
|
|
|
|
|
//提交
|
|
|
- $scope.saveStep2 = function (org,dirty) {
|
|
|
+ $scope.saveStep2 = function (org,dirty,orgType) {
|
|
|
if (dirty == false) {
|
|
|
- $location.path('charityCertificationStep3');
|
|
|
+ if (orgType == 1) {
|
|
|
+ $location.path('publicOfferingCertificationStep3');
|
|
|
+ } else if (orgType == 2) {
|
|
|
+ $location.path('charityCertificationStep3');
|
|
|
+ }
|
|
|
} else {
|
|
|
$http({
|
|
|
method: 'POST',
|
|
|
@@ -451,7 +509,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
},
|
|
|
}).success(function (data) {
|
|
|
if (data.success) {
|
|
|
- $location.path('charityCertificationStep3');
|
|
|
+ if (orgType == 1) {
|
|
|
+ $location.path('publicOfferingCertificationStep3');
|
|
|
+ } else if (orgType == 2) {
|
|
|
+ $location.path('charityCertificationStep3');
|
|
|
+ }
|
|
|
}
|
|
|
if (data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
|
@@ -470,13 +532,13 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 公益机构认证第三步
|
|
|
+ * 机构认证第三步
|
|
|
*/
|
|
|
- app.controller('charityCertificationStep3Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
|
|
|
+ app.controller('CertificationStep3Ctrl', ['$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) {//10041558
|
|
|
$scope.org = data;
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
@@ -520,17 +582,21 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
$scope.logo = ele.files[0];
|
|
|
} else if (order == 1) {
|
|
|
$scope.personCertificate = ele.files[0];
|
|
|
- } if (order == 2) {
|
|
|
+ } else if (order == 2) {
|
|
|
$scope.donateCertificate = ele.files[0];
|
|
|
- } if (order == 3) {
|
|
|
+ } else if (order == 3) {
|
|
|
$scope.legalIdCard = ele.files[0];
|
|
|
}
|
|
|
$scope.$apply();
|
|
|
}
|
|
|
//提交
|
|
|
- $scope.saveStep3 = function (org,dirty) {
|
|
|
+ $scope.saveStep3 = function (org,dirty,orgType) {
|
|
|
if (dirty == false) {
|
|
|
- $location.path('charityCertificationStep4');
|
|
|
+ if (orgType == 1) {
|
|
|
+ $location.path('publicOfferingCertificationStep4');
|
|
|
+ } else if (orgType == 2) {
|
|
|
+ $location.path('charityCertificationStep4');
|
|
|
+ }
|
|
|
} else {
|
|
|
var data = new FormData(); //以下为像后台提交图片数据
|
|
|
data.append('logo', $scope.logo);
|
|
|
@@ -551,7 +617,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
},
|
|
|
}).success(function (data) {
|
|
|
if (data.success) {
|
|
|
- $location.path('charityCertificationStep4');
|
|
|
+ if (orgType == 1) {
|
|
|
+ $location.path('publicOfferingCertificationStep4');
|
|
|
+ } else if (orgType == 2) {
|
|
|
+ $location.path('charityCertificationStep4');
|
|
|
+ }
|
|
|
}
|
|
|
if (data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
|
@@ -568,7 +638,76 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
|
|
|
}
|
|
|
};
|
|
|
}]);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公募机构认证第四步
|
|
|
+ */
|
|
|
+ app.controller('PublicCertificationStep4Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
|
|
|
+ function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization) {
|
|
|
+
|
|
|
+ // 获取当前账户注册机构情况
|
|
|
+ Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041166 10041558
|
|
|
+ $scope.org = data;
|
|
|
+ }, function() {
|
|
|
+ toaster.pop('error', '注册情况加载失败');
|
|
|
+ });
|
|
|
+
|
|
|
+ $scope.fileChanged = function(ele, order){
|
|
|
+ if (order == 0) {
|
|
|
+ //合作商户资料
|
|
|
+ $scope.material = ele.files[0];
|
|
|
+ } else if (order == 1) {
|
|
|
+ //结算银行账号证明
|
|
|
+ $scope.certify = ele.files[0];
|
|
|
+ }
|
|
|
+ $scope.$apply();
|
|
|
+ }
|
|
|
+ //提交
|
|
|
+ $scope.saveStep4 = function (org, isDirty, isDraft) {
|
|
|
+ if (isDirty == false) {
|
|
|
+ $location.path('publicOfferingCertificationStep5');
|
|
|
+ } else {
|
|
|
+ var url;
|
|
|
+ if (isDraft) {
|
|
|
+ url = '/org/save';
|
|
|
+ } else {
|
|
|
+ url = '/org/submit';
|
|
|
+ }
|
|
|
|
|
|
+ var data = new FormData(); //以下为像后台提交图片数据
|
|
|
+ data.append('material', $scope.material);
|
|
|
+ data.append('certify', $scope.certify);
|
|
|
+ $http({
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': undefined
|
|
|
+ },
|
|
|
+ method: 'POST',
|
|
|
+ processData: false,
|
|
|
+ async: false,
|
|
|
+ url: url,
|
|
|
+ data: data,
|
|
|
+ params: {
|
|
|
+ jsonStr: org
|
|
|
+ },
|
|
|
+ }).success(function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ $location.path('publicOfferingCertificationStep5');
|
|
|
+ }
|
|
|
+ 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;
|
|
|
});
|