fanxw před 2 roky
rodič
revize
9c572c2861

+ 21 - 0
src/main/resources/static/app/basic/enum/service/enumService.js

@@ -263,4 +263,25 @@ angular.module('app.basic').service("enumService", function($http, $q, APP_CONFI
263 263
     	});
264 264
     	return d.promise;
265 265
     }
266
+    
267
+    this.findConditionEnum = function(types, parentId, notParentId, notEnumId) {
268
+    	var d = $q.defer();
269
+    	$http({
270
+    		method: 'GET',
271
+    		url: APP_CONFIG.basicUrl + '/Enum/findConditionEnum',
272
+    		 params: {
273
+    			 parentId : parentId,
274
+    			 notParentId : notParentId,
275
+    			 notEnumId : notEnumId
276
+             }
277
+    	}).then(function successCallback(response) {
278
+    		var topTree = getTreeByData(response.data, types);
279
+    		// 请求成功执行代码
280
+    		d.resolve(topTree);
281
+    	}, function errorCallback(response) {
282
+    		// 请求失败执行代码
283
+    		d.reject("error");
284
+    	});
285
+    	return d.promise;
286
+    }
266 287
 });

+ 16 - 4
src/main/resources/static/app/business/storeWareDetail/controller/storeWareDetailModalCtrl.js

@@ -132,11 +132,23 @@ angular.module('app.business').controller("storeWareDetailModalCtrl",
132 132
 	// 树形下拉框(粮食性质)
133 133
     $scope.getAttributeData = function() {
134 134
     	validator = $("#storeWareDetail-form").validate();
135
-    	var grainAttributeType=1032; //所有的粮油性质
135
+    	var parentid=1032; //粮油性质父级ID
136
+    	var notparentid = null;
137
+    	var notenumid = null;
136 138
     	
137
-    	//计划管理下的计划 粮食性质 不取储备粮的   用items.planManage区分
138
-    	
139
-        enumService.getTreeListByTypeId($scope.storeWareDetail.grainAttribute, grainAttributeType,items.planManage).then(function(data) {
139
+    	//计划管理下的计划 粮食性质 不取储备粮的,合同和通知单管理下出库业务中的粮食性质不取省级储备粮   用items.planManage区分
140
+    	var ywlx = items.executeType;
141
+    	detailType = "contract"
142
+    	if (items.detailType == "contract") {//合同业务
143
+    		if (ywlx == "3148" || ywlx == "7131") {//出库类型的业务
144
+    			notenumid = 6877;
145
+    		}
146
+    	} else if (items.detailType == "plan") {
147
+    		notparentid = 3045;
148
+    		notenumid = 3045;
149
+    	}
150
+
151
+        enumService.findConditionEnum($scope.storeWareDetail.grainAttribute, parentid, notparentid, notenumid).then(function(data) {
140 152
             $scope.grainAttributeTreeData = data;
141 153
         },function(data) {
142 154
             console.log(data);