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

Merge remote-tracking branch 'origin/feature-hejq-201844' into feature-hejq-201844

shenjunjie 7 лет назад
Родитель
Сommit
57e56414b4

+ 5 - 16
src/main/java/com/uas/platform/b2b/controller/SaleApCheckController.java

@@ -211,9 +211,10 @@ public class SaleApCheckController {
      * @return 符合条件的客户信息
      */
     @RequestMapping(value = "/customer", method = RequestMethod.GET)
-    public SPage<Vendor> getCustomers(PageParams params, String keyword, String checkDate, Long fromDate, Long endDate) {
+    public SPage<Vendor> getCustomers(PageParams params, String keyword, String checkDate, String searchFilter) {
         logger.log("应收对账单", "获取客户信息", "获取所有符合条件的客户");
-        return purchaseApCheckService.getCustomerInfo(params, keyword, checkDate, fromDate, endDate);
+        SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
+        return purchaseApCheckService.getCustomerInfo(params, keyword, checkDate, filter.getFromDate(), filter.getEndDate());
     }
 
 	/**
@@ -565,23 +566,11 @@ public class SaleApCheckController {
 	 */
 	@RequestMapping(value = "/xls", method = RequestMethod.GET)
 	public ModelAndView export(ApcheckKeyWord keyword, Long fromDate, Long endDate, String checkDate) {
-		List<Long> distributes = null;
-		// 判断当前用户是否被客户分配
-		if (!SystemSession.getUser().isSys()) {
-			List<Vendor> vendors = userService.findChooseVendor(SystemSession.getUser().getUserUU());
-			distributes = new ArrayList<>();
-			if (!CollectionUtils.isEmpty(vendors)) {
-				for (Vendor v : vendors) {
-					distributes.add(v.getMyEnUU());
-				}
-			} else {
-				return null;
-			}
-		}
+		List<ErpProdIODetail> details = getAllApchecksByDate(fromDate, endDate, keyword, checkDate).getDetails();
 		ModelAndView modelAndView = new ModelAndView();
 		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
 		modelAndView.addObject("dateFormat", dateFormat);
-		modelAndView.addObject("data", erpProdIODetailService.findXlsApChecks(distributes, keyword, fromDate, endDate, checkDate).getDetails());
+		modelAndView.addObject("data", details);
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/fa/faApCheck", "客户应收对账单"));
 		logger.log("客户应收对账单", "导出Excel列表", "导出全部Excel列表");
 		return modelAndView;

+ 13 - 11
src/main/java/com/uas/platform/b2b/service/impl/PurchaseApCheckServiceImpl.java

@@ -514,16 +514,18 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
     public SPage<Vendor> getCustomerInfo(PageParams params, String keyword, String checkDate, Long fromDate, Long endDate) {
         SPage<Vendor> vendorSPage = searchCustomerInfo(params, keyword);
         final Long enUU = SystemSession.getUser().getEnterprise().getUu();
-        vendorSPage.getContent().stream().filter(customer -> null != customer.getApcheck() && customer.getApcheck() == 1)
-            .forEach(customer -> {
-                Long customerUU = customer.getMyEnUU();
-                // 应收总额
-                List<TradeCount> totalTrades = getDueTrade(enUU, customerUU);
-                customer.setTotalCount(totalTrades);
-                // 本月应收
-                List<TradeCount> thisMonthTrades = getThisMonthTrade(enUU, customerUU, checkDate, fromDate, endDate);
-                customer.setThisMonthCount(thisMonthTrades);
-            });
+        if (!CollectionUtils.isEmpty(vendorSPage.getContent())) {
+            vendorSPage.getContent().stream().filter(customer -> null != customer.getApcheck() && customer.getApcheck() == 1)
+                .forEach(customer -> {
+                    Long customerUU = customer.getMyEnUU();
+                    // 应收总额
+                    List<TradeCount> totalTrades = getDueTrade(enUU, customerUU);
+                    customer.setTotalCount(totalTrades);
+                    // 本月应收
+                    List<TradeCount> thisMonthTrades = getThisMonthTrade(enUU, customerUU, checkDate, fromDate, endDate);
+                    customer.setThisMonthCount(thisMonthTrades);
+                });
+        }
         return vendorSPage;
     }
 
@@ -674,7 +676,7 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
         List<Sort> sortList = new ArrayList<>();
         SearchFilter filter = userService.distribute();
         if (filter != null && filter.getDistribute() == null) {
-            return null;
+            return new SPage<>();
         }
         if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
             List<Object> list = new ArrayList<>();

+ 2 - 2
src/main/webapp/resources/js/common/services.js

@@ -366,11 +366,11 @@ define(['angular', 'toaster', 'big'], function(angular, big) {
             },
             findUsers: {
                 url: 'account/user/customer/:id',
-                method: 'GET',
+                method: 'GET'
             },
             findSaleUsers: {
                 url: 'vendorDistribute/:id',
-                method: 'GET',
+                method: 'GET'
             },
             addSaleUserToVendor: {
                 url: 'vendorDistribute/bindVendor/:id',

+ 2 - 12
src/main/webapp/resources/tpl/index/account/add_userInfo.html

@@ -1,19 +1,9 @@
 <style>
 	#user-lists{
-		max-height: 600px;
+		max-height: 575px;
 		overflow-x: hidden;
 		overflow-y: scroll;
 	}
-	@media screen and (max-width: 1366px){
-		#user-lists{
-			max-height: 368px;
-		}
-	}
-	@media screen and (max-width: 1600px){
-		#user-lists{
-			max-height: 480px;
-		}
-	}
 </style>
 <div class="loading in" ng-class="{'in': loading}">
 	<!--<i></i>-->
@@ -28,7 +18,7 @@
 </div>
 <div class="form-group" id="window-search" style="height: 36px; margin-bottom: 0; margin-top: 5px;">
 	<div class="col-sm-12">
-		<input type="text" class="form-control input-sm ng-pristine ng-invalid ng-invalid-required ng-touched" required="" placeholder="输入用户名关键词搜索" autofocus="" ng-model="keyword" ng-search="onSearch(keyword)" />
+		<input type="text" class="form-control input-sm ng-pristine ng-invalid ng-invalid-required ng-touched" required="" placeholder="输入用户电话和用户名关键词搜索" autofocus="" ng-model="keyword" ng-search="onSearch(keyword)" />
 		<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
 	</div>
 </div>

+ 2 - 12
src/main/webapp/resources/tpl/index/account/transfer_userInfo.html

@@ -1,19 +1,9 @@
 <style>
 	#user-lists{
-		max-height: 600px;
+		max-height: 575px;
 		overflow-x: hidden;
 		overflow-y: scroll;
 	}
-	@media screen and (max-width: 1366px){
-		#user-lists{
-			max-height: 368px;
-		}
-	}
-	@media screen and (max-width: 1600px){
-		#user-lists{
-			max-height: 480px;
-		}
-	}
 </style>
 <div class="modal-header">
 	<h3 class="modal-title">
@@ -22,7 +12,7 @@
 </div>
 <div class="form-group" id="window-search" style="height: 36px; margin-bottom: 0; margin-top: 5px;">
 	<div class="col-sm-12">
-		<input type="text" class="form-control input-sm ng-pristine ng-invalid ng-invalid-required ng-touched" required="" placeholder="输入用户名关键词搜索" autofocus="" ng-model="keyword" ng-search="onSearch(keyword)" />
+		<input type="text" class="form-control input-sm ng-pristine ng-invalid ng-invalid-required ng-touched" required="" placeholder="输入用户电话和用户名关键词搜索" autofocus="" ng-model="keyword" ng-search="onSearch(keyword)" />
 		<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
 	</div>
 </div>

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/modal/quotation_modal.html

@@ -172,7 +172,7 @@
             <div class="form-group">
                 <label for="inputEmail4" class="col-xs-4 control-label">税率(%)</label>
                 <div class="col-xs-8">
-                    <input type="text" class="form-control" id="inputEmail4" placeholder="税率(数字)" ng-model="inquiryItem.taxrate" ng-pattern="/^((\d|[123456789]\d)(\.\d+)?)$/">
+                    <input type="text" class="form-control" id="inputEmail4" placeholder="税率(数字)" ng-model="inquiryItem.taxrate" ng-pattern="/^(\d|[123456789]\d)$/">
                 </div>
             </div>
         </div>