소스 검색

修复客户导出数据未进行筛选的bug

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9705 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
wangmh 8 년 전
부모
커밋
88ddd142a2

+ 7 - 5
src/main/java/com/uas/platform/b2b/controller/VendorController.java

@@ -136,12 +136,14 @@ public class VendorController {
 	 * @return
 	 */
 	@RequestMapping(value = "/customer/xls", method = RequestMethod.GET)
-	public ModelAndView exportVendors() {
+	public ModelAndView exportVendors(PageParams params, String keyword) {
+		params.setCount(SearchConstants.TOP_NUM);
+		params.setPage(1);
 		Map<String, Object> map = new HashMap<String, Object>();
-		PageInfo pageInfo = new PageInfo(1, JxlsExcelView.MAX_SIZE, 0);
-		pageInfo.sorting("myEnUU", Direction.ASC);
-		pageInfo.filter("vendEnUU", SystemSession.getUser().getEnterprise().getUu());
-		map.put("data", vendorService.findAllByPageInfo(pageInfo).getContent());
+//		PageInfo pageInfo = new PageInfo(1, JxlsExcelView.MAX_SIZE, 0);
+//		pageInfo.sorting("myEnUU", Direction.ASC);
+//		pageInfo.filter("vendEnUU", SystemSession.getUser().getEnterprise().getUu());
+		map.put("data", getCustomers(params, keyword).getContent());
 		return new ModelAndView(new JxlsExcelView("classpath:jxls-tpl/Customer", "客户列表"), map);
 	}
 	

+ 1 - 0
src/main/webapp/resources/js/index/app.js

@@ -1813,6 +1813,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 					if(page) {
 						params.total(page.totalElement);
 						$defer.resolve(page.content);
+                        $scope.keywordXls = pageParams.keyword;
 					}
 					$scope.totalCount = page.totalElement;
 				}, function(response){

+ 1 - 1
src/main/webapp/resources/tpl/index/sale/customer.html

@@ -100,7 +100,7 @@
 	<div class="pub-com_head">
 		<span>客户资料</span>
 		<div class="p-right">
-			<a href="vendor/customer/xls" target="_self" class="text-simple bule"><i class="fa fa-file-excel-o fa-fw"></i>导出</a>
+			<a href="vendor/customer/xls?keyword={{keywordXls}}" target="_self" class="text-simple bule"><i class="fa fa-file-excel-o fa-fw"></i>导出</a>
 		</div>
 	</div>
 	<form class="form-horizontal">