|
|
@@ -436,14 +436,123 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
/**
|
|
|
* 机构入驻选择
|
|
|
*/
|
|
|
- app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization',
|
|
|
- function ($scope, toaster, Organization) {
|
|
|
+ app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization', '$location',
|
|
|
+ function ($scope, toaster, Organization, $location) {
|
|
|
// 获取当前账户注册机构情况
|
|
|
Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
|
|
|
$scope.org = data;
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
});
|
|
|
+
|
|
|
+ //公益机构注册
|
|
|
+ $scope.registerCharityCertification = function () {
|
|
|
+ if (typeof $scope.org.id == 'undefined') {
|
|
|
+ $location.path('charityCertificationStep0');
|
|
|
+ } else {
|
|
|
+ if ($scope.org.type == 2) {
|
|
|
+ //之前已填写过公益机构注册信息
|
|
|
+ if ($scope.org.publish != 2) {
|
|
|
+ //未完成或保存为草稿
|
|
|
+ $location.path('charityCertificationStep1');
|
|
|
+ } else {
|
|
|
+ //发布正式
|
|
|
+ if ($scope.org.status == 0) {
|
|
|
+ //已发布待审核 (暂时)
|
|
|
+ $location.path('charityCertificationStep4');
|
|
|
+ } else if ($scope.org.status == 1) {
|
|
|
+ //已发布已审核
|
|
|
+ $location.path('charityCertificationStep4');
|
|
|
+ } else if ($scope.org.status == 2) {
|
|
|
+ //已发布已驳回
|
|
|
+ $location.path('charityCertificationStep1');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if ($scope.org.type == 1) {
|
|
|
+ //之前填写过公募机构注册信息
|
|
|
+ if ($scope.org.publish != 2) {
|
|
|
+ //未完成或保存为草稿
|
|
|
+ //TODO 模态框判断
|
|
|
+ var decideContinue = false;
|
|
|
+ if (decideContinue) {
|
|
|
+ //TODO 继续注册公益机构并替换掉之前的公募机构注册信息
|
|
|
+ $location.path('charityCertificationStep0');
|
|
|
+ } else {
|
|
|
+ //TODO 继续之前的公募机构注册信息
|
|
|
+ toaster.pop('info', '继续之前的公募机构注册信息');
|
|
|
+ $location.path('publicOfferingCertificationStep1');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //发布正式
|
|
|
+ if ($scope.org.status == 0) {
|
|
|
+ //已发布待审核 (暂时)
|
|
|
+ $location.path('publicOfferingCertificationStep5');
|
|
|
+ } else if ($scope.org.status == 1) {
|
|
|
+ //已发布已审核
|
|
|
+ $location.path('publicOfferingCertificationStep5');
|
|
|
+ } else if ($scope.org.status == 2) {
|
|
|
+ //已发布已驳回
|
|
|
+ $location.path('publicOfferingCertificationStep1');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //公募机构注册
|
|
|
+ $scope.registerPublicOfferingCertification = function () {
|
|
|
+ if (typeof $scope.org.id == 'undefined') {
|
|
|
+ $location.path('publicOfferingCertificationStep0');
|
|
|
+ } else {
|
|
|
+ if ($scope.org.type == 1) {
|
|
|
+ //之前已填写过公募机构注册信息
|
|
|
+ if ($scope.org.publish != 2) {
|
|
|
+ //未完成或保存为草稿
|
|
|
+ $location.path('publicOfferingCertificationStep1');
|
|
|
+ } else {
|
|
|
+ //发布正式
|
|
|
+ if ($scope.org.status == 0) {
|
|
|
+ //已发布待审核 (暂时)
|
|
|
+ $location.path('publicOfferingCertificationStep5');
|
|
|
+ } else if ($scope.org.status == 1) {
|
|
|
+ //已发布已审核
|
|
|
+ $location.path('publicOfferingCertificationStep5');
|
|
|
+ } else if ($scope.org.status == 2) {
|
|
|
+ //已发布已驳回
|
|
|
+ $location.path('publicOfferingCertificationStep1');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if ($scope.org.type == 2) {
|
|
|
+ //之前填写过公益机构注册信息
|
|
|
+ if ($scope.org.publish != 2) {
|
|
|
+ //未完成或保存为草稿
|
|
|
+ //TODO 模态框判断
|
|
|
+ var decideContinue = false;
|
|
|
+ if (decideContinue) {
|
|
|
+ //TODO 继续注册公募机构并替换掉之前的公益机构注册信息
|
|
|
+ $location.path('publicOfferingCertificationStep0');
|
|
|
+ } else {
|
|
|
+ //TODO 继续之前的公益机构注册信息
|
|
|
+ toaster.pop('info', '继续之前的公益机构注册信息');
|
|
|
+ $location.path('charityCertificationStep1');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //发布正式
|
|
|
+ if ($scope.org.status == 0) {
|
|
|
+ //已发布待审核 (暂时)
|
|
|
+ $location.path('charityCertificationStep4');
|
|
|
+ } else if ($scope.org.status == 1) {
|
|
|
+ //已发布已审核
|
|
|
+ $location.path('charityCertificationStep4');
|
|
|
+ } else if ($scope.org.status == 2) {
|
|
|
+ //已发布已驳回
|
|
|
+ $location.path('charityCertificationStep1');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}]);
|
|
|
|
|
|
/**
|