Przeglądaj źródła

把获取单据的搜索条件作封装

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@1385 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
suntg 10 lat temu
rodzic
commit
4072a3b9c9
1 zmienionych plików z 5 dodań i 6 usunięć
  1. 5 6
      src/main/webapp/resources/js/index/app.js

+ 5 - 6
src/main/webapp/resources/js/index/app.js

@@ -735,17 +735,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			getData : function($defer, params) {
 				$scope.loading = true;
 				var pageParams = params.url();
-				pageParams.keyword = $scope.keyword;
-				pageParams.fromDate = $scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null;
-				pageParams.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
+				pageParams.searchFilter = {};
+				pageParams.searchFilter.keyword = $scope.keyword;
+				pageParams.searchFilter.fromDate = $scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null;
+				pageParams.searchFilter.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
 				getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function(page){
 					$scope.loading = false;
 					if(page) {
 						$defer.resolve(page.content);
 						params.total(page.totalElements);
-						$scope.keywordXls = angular.copy($scope.keyword);//保存当前取值的关键词
-						$scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
-						$scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
+						$scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
 					}
 				}, function(response){
 					$scope.loading = false;