Просмотр исходного кода

筛选单据时,将日期筛选扩展为超出默认日期条件

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7018 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 лет назад
Родитель
Сommit
634fdc821e
1 измененных файлов с 15 добавлено и 2 удалено
  1. 15 2
      src/main/webapp/resources/js/index/app.js

+ 15 - 2
src/main/webapp/resources/js/index/app.js

@@ -4740,9 +4740,23 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 							+ "|"+ ($scope.condition.factory == null ? "" : $scope.condition.factory)
 							+ "|"+ ($scope.condition.prodTitle == null ? "" : $scope.condition.prodTitle)
 							+ "|"+ ($scope.condition.prodSpec == null ? "" : $scope.condition.prodSpec));//保存当前取值的关键词
-			console.log($scope.keywordXls);
 			$scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
 			$scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
+			if($scope.condition.dateFrom != null || $scope.condition.dateTo != null) {
+				$scope.fromDate =$scope.condition.dateFrom ?  $scope.condition.dateFrom.getTime() : null;
+				$scope.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
+				FaApCheck.getAllByDate({fromDate: $scope.fromDate, endDate: $scope.endDate}, function(data) {
+					$scope.data = data;
+					angular.forEach($scope.data, function(item) {
+							item:{
+								$selected:true;
+							}
+						});
+					$scope.loading = false;
+				}, function(response) {
+					toaster.pop('error', '提示', response.data);
+				});
+			}
 		}
 		
 		/**
@@ -4947,7 +4961,6 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 				$scope.sourceInfo.newYCheckQty = ((check.yCheckQty || 0) + check.thisCheckQty);
 					
 				sourceInfos.push($scope.sourceInfo);
-				console.log($scope.sourceInfo);
 	  			$scope.apCheck.items.push($scope.item);
 				$scope.haveSelected = true;
 			}