admin 5 роки тому
батько
коміт
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 138
 	$scope.loadOrg = function() {
139 139
 		orgService.editOrg($stateParams.orgId).then(function(data) {
140 140
 			$scope.orgInfo = data;
141
+			$scope.initBasic(319);
141 142
 			if (!$stateParams.orgId) {
142 143
 				$scope.orgInfo.parentId = $stateParams.parentId;
143 144
 				//$scope.orgInfo.registDate = new Date();
@@ -150,7 +151,6 @@ function($scope, $rootScope, $state, $stateParams, $filter, orgService, enumServ
150 151
 				$scope.orgInfo.useDate = $filter('date')($scope.orgInfo.useDate, "yyyy-MM-dd");
151 152
 				$scope.orgInfo.depotProperty = $scope.orgInfo.depotProperty == null ? "1":$scope.orgInfo.depotProperty;
152 153
 			}
153
-			$scope.initBasic(319);
154 154
 		}, function(data) {
155 155
 			console.log(data);
156 156
 		});
@@ -293,12 +293,14 @@ function($scope, $rootScope, $state, $stateParams, $filter, orgService, enumServ
293 293
     
294 294
     
295 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 305
 		if (validator.form()) {
304 306
 			// 行政区划

Різницю між файлами не показано, бо вона завелика
+ 773 - 771
src/main/resources/static/build/app.js