admin před 5 roky
rodič
revize
e7a3d5b3ae

+ 9 - 7
src/main/resources/static/app/system/controller/orgCtrl.js

@@ -138,6 +138,7 @@ function($scope, $rootScope, $state, $stateParams, $filter, orgService, enumServ
138
 	$scope.loadOrg = function() {
138
 	$scope.loadOrg = function() {
139
 		orgService.editOrg($stateParams.orgId).then(function(data) {
139
 		orgService.editOrg($stateParams.orgId).then(function(data) {
140
 			$scope.orgInfo = data;
140
 			$scope.orgInfo = data;
141
+			$scope.initBasic(319);
141
 			if (!$stateParams.orgId) {
142
 			if (!$stateParams.orgId) {
142
 				$scope.orgInfo.parentId = $stateParams.parentId;
143
 				$scope.orgInfo.parentId = $stateParams.parentId;
143
 				//$scope.orgInfo.registDate = new Date();
144
 				//$scope.orgInfo.registDate = new Date();
@@ -150,7 +151,6 @@ function($scope, $rootScope, $state, $stateParams, $filter, orgService, enumServ
150
 				$scope.orgInfo.useDate = $filter('date')($scope.orgInfo.useDate, "yyyy-MM-dd");
151
 				$scope.orgInfo.useDate = $filter('date')($scope.orgInfo.useDate, "yyyy-MM-dd");
151
 				$scope.orgInfo.depotProperty = $scope.orgInfo.depotProperty == null ? "1":$scope.orgInfo.depotProperty;
152
 				$scope.orgInfo.depotProperty = $scope.orgInfo.depotProperty == null ? "1":$scope.orgInfo.depotProperty;
152
 			}
153
 			}
153
-			$scope.initBasic(319);
154
 		}, function(data) {
154
 		}, function(data) {
155
 			console.log(data);
155
 			console.log(data);
156
 		});
156
 		});
@@ -293,12 +293,14 @@ function($scope, $rootScope, $state, $stateParams, $filter, orgService, enumServ
293
     
293
     
294
     
294
     
295
 	$scope.save = function() {
295
 	$scope.save = function() {
296
-		$scope.grainAttribute = angular.fromJson($scope.orgInfo.depotClass);
297
-		if ($scope.grainAttribute == '' || $scope.grainAttribute == null || $scope.grainAttribute[0].id == null || $scope.grainAttribute.length == 0) {
298
-			$("#grainAttribute-error").text("不能为空");
299
-			return;
300
-		} else {
301
-			$("#grainAttribute-error").text("");
296
+		if ($scope.orgInfo.orgClassId == "5318") {
297
+			$scope.grainAttribute = angular.fromJson($scope.orgInfo.depotClass);
298
+			if ($scope.grainAttribute == '' || $scope.grainAttribute == null || $scope.grainAttribute[0].id == null || $scope.grainAttribute.length == 0) {
299
+				$("#grainAttribute-error").text("不能为空");
300
+				return;
301
+			} else {
302
+				$("#grainAttribute-error").text("");
303
+			}
302
 		}
304
 		}
303
 		if (validator.form()) {
305
 		if (validator.form()) {
304
 			// 行政区划
306
 			// 行政区划

Diff nebyl zobrazen, protože je příliš veliký
+ 773 - 771
src/main/resources/static/build/app.js