Browse Source

Merge remote-tracking branch 'origin/release-201824-wangcz'

wangcz 7 years ago
parent
commit
6b8cdca4fb
61 changed files with 2146 additions and 1175 deletions
  1. 19 4
      src/main/java/com/uas/platform/b2c/common/search/constant/SearchUrl.java
  2. 21 7
      src/main/java/com/uas/platform/b2c/common/search/controller/SearcherController.java
  3. 67 5
      src/main/java/com/uas/platform/b2c/common/search/rpc/service/Impl/SearchServiceImpl.java
  4. 5 3
      src/main/java/com/uas/platform/b2c/common/search/rpc/service/SearchService.java
  5. 14 4
      src/main/java/com/uas/platform/b2c/common/search/service/SearcherService.java
  6. 100 27
      src/main/java/com/uas/platform/b2c/common/search/service/impl/SearcherServiceImpl.java
  7. 19 0
      src/main/java/com/uas/platform/b2c/fa/payment/constant/AccountType.java
  8. 2 28
      src/main/java/com/uas/platform/b2c/fa/payment/controller/BankInfoController.java
  9. 44 57
      src/main/java/com/uas/platform/b2c/fa/payment/dao/BankInfoDao.java
  10. 15 0
      src/main/java/com/uas/platform/b2c/fa/payment/model/BankInfo.java
  11. 14 26
      src/main/java/com/uas/platform/b2c/fa/payment/service/BankInfoService.java
  12. 108 116
      src/main/java/com/uas/platform/b2c/fa/payment/service/impl/BankInfoServiceImpl.java
  13. 40 32
      src/main/java/com/uas/platform/b2c/fa/payment/service/impl/BankTransferServiceImpl.java
  14. 6 12
      src/main/java/com/uas/platform/b2c/fa/settlement/controller/BillController.java
  15. 16 18
      src/main/java/com/uas/platform/b2c/fa/settlement/dao/BillDao.java
  16. 33 21
      src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/BillServiceImpl.java
  17. 5 3
      src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/BillSubmitServiceImpl.java
  18. 4 15
      src/main/java/com/uas/platform/b2c/logistics/controller/AddressController.java
  19. 16 41
      src/main/java/com/uas/platform/b2c/logistics/dao/AddressDao.java
  20. 25 4
      src/main/java/com/uas/platform/b2c/logistics/service/AddressService.java
  21. 80 59
      src/main/java/com/uas/platform/b2c/logistics/service/impl/AddressServiceImpl.java
  22. 10 0
      src/main/java/com/uas/platform/b2c/prod/commodity/controller/ProductController.java
  23. 41 0
      src/main/java/com/uas/platform/b2c/prod/product/common/api/CommonCountController.java
  24. 1 1
      src/main/java/com/uas/platform/b2c/prod/product/component/service/impl/ComponentServiceImpl.java
  25. 9 0
      src/main/java/com/uas/platform/b2c/prod/store/dao/StoreInDao.java
  26. 7 7
      src/main/java/com/uas/platform/b2c/prod/store/facade/StoreApplyFacade.java
  27. 20 79
      src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreApplyFacadeImpl.java
  28. 22 8
      src/main/java/com/uas/platform/b2c/prod/store/service/StoreInService.java
  29. 1 1
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreApplyServiceImpl.java
  30. 62 27
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java
  31. 4 4
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java
  32. 1 1
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java
  33. 6 0
      src/main/java/com/uas/platform/b2c/trade/vendor/service/VendorIntroductionService.java
  34. 16 2
      src/main/java/com/uas/platform/b2c/trade/vendor/service/impl/VendorIntroductionServiceImpl.java
  35. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatch-person.xls
  36. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls
  37. 51 10
      src/main/webapp/resources/js/admin/controllers/checkMoney/SettlementCtrl.js
  38. 70 30
      src/main/webapp/resources/js/admin/controllers/checkMoney/creditCardAdminCtrl.js
  39. 27 3
      src/main/webapp/resources/js/common/controllers/commonCtrls.js
  40. 1 1
      src/main/webapp/resources/js/common/query/bankInfo.js
  41. 1 1
      src/main/webapp/resources/js/common/query/bankTransfer.js
  42. 1 1
      src/main/webapp/resources/js/common/query/bill.js
  43. 4 3
      src/main/webapp/resources/js/sso/controllers/ssoAddressCtrl.js
  44. 2 1
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_transfer_ctrl.js
  45. 4 3
      src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js
  46. 16 10
      src/main/webapp/resources/js/usercenter/controllers/forstore/pay_center_ctrl.js
  47. 119 63
      src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js
  48. 21 13
      src/main/webapp/resources/js/vendor/controllers/forstore/pay_center_ctrl.js
  49. 193 66
      src/main/webapp/resources/js/vendor/controllers/forstore/purchase_offer_ctrl.js
  50. 103 58
      src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js
  51. 71 48
      src/main/webapp/resources/view/admin/checkMoney/Settlement.html
  52. 6 6
      src/main/webapp/resources/view/admin/checkMoney/creditCardAdmin.html
  53. 6 3
      src/main/webapp/resources/view/sso/forstore/ssoCenter.html
  54. 5 5
      src/main/webapp/resources/view/sso/staffManagement.html
  55. 18 28
      src/main/webapp/resources/view/usercenter/forstore/pay_center.html
  56. 166 58
      src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html
  57. 2 2
      src/main/webapp/resources/view/vendor/forstore/addExistUser.html
  58. 30 39
      src/main/webapp/resources/view/vendor/forstore/pay_center.html
  59. 211 54
      src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html
  60. 155 47
      src/main/webapp/resources/view/vendor/forstore/seekPurchase.html
  61. 10 10
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html

+ 19 - 4
src/main/java/com/uas/platform/b2c/common/search/constant/SearchUrl.java

@@ -42,7 +42,7 @@ public class SearchUrl {
      * 根据类目获取供应商数据
      *
      */
-    public static final String KIND_SELLER_URL = "/search/kindsAndSellers?keyword={keyword}&page={page}&size={size}";
+    public static final String KIND_SELLER_URL = "/search/kindsAndSellers?keyword={keyword}&page={page}&size={size}&storeType={storeType}";
 
     /**
      * 搜索品牌的id
@@ -57,7 +57,7 @@ public class SearchUrl {
     /**
      * 主搜索页搜索品牌带出供应商
      */
-    public static final String BRAND_SELLERS_URL = "/search/brandsAndSellers?keyword={keyword}&page={page}&size={size}";
+    public static final String BRAND_SELLERS_URL = "/search/brandsAndSellers?keyword={keyword}&page={page}&size={size}&storeType={storeType}";
 
 
     /**
@@ -108,7 +108,6 @@ public class SearchUrl {
      */
     public static final String SIMILAR_BRAND_URL = "/search/similarBrands?keyword={keyword}";
 
-
     /**
      * 根据关键字联想类目
      */
@@ -116,6 +115,22 @@ public class SearchUrl {
 
 
 
+    /**
+     * 根据关键字联想产品型号(加入店铺类型过滤)
+     */
+    public static final String SIMILAR_PRODUCTS_STORETYPE_URL = "/search/similarGoods/cmpcode?keyword={keyword}&storeType={storeType}";
+
+    /**
+     * 根据关键字联想品牌(加入店铺类型过滤)
+     */
+    public static final String SIMILAR_BRAND_STORETYPE_URL = "/search/similarGoods/brand?keyword={keyword}&storeType={storeType}";
+
+    /**
+     * 根据关键字联想类目(加入店铺类型过滤)
+     */
+    public static final String SIMILAR_KIND_STORETYPE_URL = "/search/similarGoods/kind?keyword={keyword}&storeType={storeType}";
+
+
     /**
      * 获取某个信息的叶子节点
      */
@@ -137,7 +152,7 @@ public class SearchUrl {
     /**
      * 搜索库存信息
      */
-    public static final String GOODIS_URL= "/search/goodsIds?keyword={keyword}&params={params}";
+    public static final String GOODIS_URL= "/search/goodsIds?keyword={keyword}&params={params}&storeType={storeType}";
 
     /**
      * 搜索pcb库存信息

+ 21 - 7
src/main/java/com/uas/platform/b2c/common/search/controller/SearcherController.java

@@ -3,7 +3,6 @@ package com.uas.platform.b2c.common.search.controller;
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.search.dao.SearchHistoryDao;
 import com.uas.platform.b2c.common.search.model.SearchHistory;
-import com.uas.platform.b2c.common.search.rpc.service.SearchService;
 import com.uas.platform.b2c.common.search.service.SearcherService;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.prod.commodity.service.GoodsService;
@@ -308,6 +307,21 @@ public class SearcherController {
 		return  searcherService.getSimilarKeywords(keyword, type);
 	}
 
+	/**
+	 * 根据输入获取联想词(包括器件、类目、品牌,按顺序获取)
+	 *									增加店铺类型过滤参数,用来在原厂、代理等页面搜索对应类型产品联想
+	 * @param keyword 关键词
+	 * @param type 搜索类型
+	 * @param storeTypes 店铺类型  多个以,隔开
+	 * @return 获取联想词(包括器件、类目、品牌)
+	 */
+	@RequestMapping(value = "/similarKeywords/goods", method = RequestMethod.GET)
+	@ResponseBody
+	public Map<String,Object> getSimilarKeywordsWithStoreTypes(String keyword, String type, String storeTypes) {
+		keyword = keyword.trim();
+		return  searcherService.getSimilarKeywordsWithStoreTypes(keyword, type, storeTypes);
+	}
+
 	/**
 	 * 2018.19期搜索接口
 	 *
@@ -316,12 +330,12 @@ public class SearcherController {
 	 */
 	@RequestMapping(value = "/201819", method = RequestMethod.GET, params = "type=component")
 	@ResponseBody
-	public ModelMap getCompGoodsBySearch(PageParams params, String keyword, HttpServletRequest request) {
+	public ModelMap getCompGoodsBySearch(PageParams params, String keyword, String type, HttpServletRequest request) {
 		if (StringUtils.isEmpty(keyword) || "*".equals(keyword)) {
 			return new ModelMap("total",0);
 		}
 		keyword = keyword.trim();
-		return searcherService.searchComponentGoods(keyword, params, request);
+		return searcherService.searchComponentGoods(keyword, params, "", request);
 	}
 
 	/**
@@ -332,12 +346,12 @@ public class SearcherController {
 	 */
 	@RequestMapping(value = "/201819", method = RequestMethod.GET, params = "type=kind")
 	@ResponseBody
-	public ModelMap getEnterpriseBySearchProduct(PageParams params, String keyword, HttpServletRequest request) {
+	public ModelMap getEnterpriseBySearchProduct(PageParams params, String keyword, String type, HttpServletRequest request) {
 		if (StringUtils.isEmpty(keyword) || "*".equals(keyword)) {
 			return new ModelMap("total",0);
 		}
 		keyword = keyword.trim();
-		return searcherService.getEnterpriseBySearchKind(keyword, params);
+		return searcherService.getEnterpriseBySearchKind(keyword, params, "");
 	}
 	/**
 	 * 2018.19期搜索接口
@@ -362,12 +376,12 @@ public class SearcherController {
 	 */
 	@RequestMapping(value = "/201819", method = RequestMethod.GET, params = "type=brand")
 	@ResponseBody
-	public ModelMap getEnterpriseBySearchBrand(PageParams params, String keyword, HttpServletRequest request) {
+	public ModelMap getEnterpriseBySearchBrand(PageParams params, String keyword, String type, HttpServletRequest request) {
 		if (StringUtils.isEmpty(keyword) || "*".equals(keyword)) {
 			return new ModelMap("total",0);
 		}
 		keyword = keyword.trim();
-		return searcherService.getEnterpriseBySearchBrand(keyword, params);
+		return searcherService.getEnterpriseBySearchBrand(keyword, params, "");
 	}
 
 	/**

+ 67 - 5
src/main/java/com/uas/platform/b2c/common/search/rpc/service/Impl/SearchServiceImpl.java

@@ -19,11 +19,9 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 import org.springframework.web.client.RestTemplate;
 
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.stream.Collectors;
 
 /**
  * 通过resttemplate调用搜索接口的实现方法
@@ -88,8 +86,9 @@ public class SearchServiceImpl implements SearchService{
     }
 
     @Override
-    public Map<String, Object> getKindsAndSellers(String keyword, Integer page, Integer size) throws SearchException {
+    public Map<String, Object> getKindsAndSellers(String keyword, Integer page, Integer size, String storeType) throws SearchException {
         Map<String, Object> map = initSearchMap(keyword, page, size);
+        map.put("storeType", storeType);
         String str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.KIND_SELLER_URL, String.class, map);
         if(StringUtils.isEmpty(str)) {
             return null;
@@ -173,8 +172,9 @@ public class SearchServiceImpl implements SearchService{
     }
 
     @Override
-    public SPage<Map<String, Object>> getbrandsAndSellers(String keyword, Integer page, Integer size) throws SearchException {
+    public SPage<Map<String, Object>> getbrandsAndSellers(String keyword, Integer page, Integer size, String storeType) throws SearchException {
         Map<String, Object> map = initSearchMap(keyword, page, size);
+        map.put("storeType", storeType);
         String str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.BRAND_SELLERS_URL, String.class, map);
         if(StringUtils.isEmpty(str)) {
             return null;
@@ -330,6 +330,67 @@ public class SearchServiceImpl implements SearchService{
         }
     }
 
+    /**
+     *  根据店铺类型获取产品联想词
+     * @param keyword  关键词
+     * @param type  搜索类型
+     * @param storeType  店铺类型  多条用,隔开
+     * @return 搜索结果
+     * @throws SearchException
+     */
+    @Override
+    public Map<String,Object> getSimilarKeywordsWithStoreTypes(String keyword, String type, String storeType) throws SearchException {
+        Map<String, Object> map = new HashedMap();
+        map.put("keyword", keyword);
+        map.put("storeType", storeType);
+        String result = "",resultKind= "",resultCmp = "",resultBrand = "";
+        switch (type) {
+            case COMPONENT:
+                result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_PRODUCTS_STORETYPE_URL, String.class, map);
+                result = result.replaceAll("pcmpcode","code");
+                break;
+            case BRAND:
+                result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_BRAND_STORETYPE_URL, String.class, map);
+                break;
+            case KIND:
+                result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_KIND_STORETYPE_URL, String.class, map);
+                break;
+            case ALL:
+                resultCmp = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_PRODUCTS_STORETYPE_URL, String.class, map);
+                resultCmp = resultCmp.replaceAll("pr_pcmpcode","code");
+                resultBrand = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_BRAND_STORETYPE_URL, String.class, map);
+                resultBrand = resultBrand.replaceAll("br_name_en_untokenized","nameEn");
+                resultKind = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_KIND_STORETYPE_URL, String.class, map);
+                resultKind = resultKind.replaceAll("ki_name_cn","nameCn");
+                break;
+            default:
+                result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_KEYWORD_URL, String.class, map);
+                break;
+        }
+        try {
+            switch (type) {
+                case ALL:
+                    List<Object> resultMapCmp = FastjsonUtils.fromJsonArray(resultCmp);
+                    List<Object> resultMapKind = FastjsonUtils.fromJsonArray(resultKind);
+                    List<Object> resultMapBrand = FastjsonUtils.fromJsonArray(resultBrand);
+                    map.clear();
+                    map.put("component",resultMapCmp);
+                    map.put("kind",resultMapKind);
+                    map.put("brand",resultMapBrand);
+                    break;
+                default:
+                    List<Object> resultMap = FastjsonUtils.fromJsonArray(result);
+                    map.clear();
+                    map.put("result",resultMap);
+                    break;
+            }
+            return map;
+        }catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
     @Override
     public Map<String,Object> getProductSimilarKeywords(String keyword) throws SearchException {
         Map<String, Object> map = new HashedMap();
@@ -469,10 +530,11 @@ public class SearchServiceImpl implements SearchService{
     }
 
     @Override
-    public Map<String, Object> getGoodsIds(String keyword, PageParams var2) throws SearchException {
+    public Map<String, Object> getGoodsIds(String keyword, PageParams var2, String storeType) throws SearchException {
         Map<String, Object> map = new HashedMap();
         map.put("keyword", keyword);
         map.put("params", FlexJsonUtils.toJsonDeep(var2));
+        map.put("storeType", storeType);
         String str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.GOODIS_URL, String.class, map);
         if(StringUtils.isEmpty(str)) {
             return null;

+ 5 - 3
src/main/java/com/uas/platform/b2c/common/search/rpc/service/SearchService.java

@@ -19,7 +19,7 @@ public interface SearchService {
 
     SPage<Map<String, Object>> getKinds(String keyword, Integer page, Integer size) throws SearchException;
 
-    Map<String, Object> getKindsAndSellers(String keyword, Integer page, Integer size) throws SearchException;
+    Map<String, Object> getKindsAndSellers(String keyword, Integer page, Integer size, String storeType) throws SearchException;
 
     SPage<Long> getProducts(Long enUU, String keyword, Integer page, Integer size, String type) throws SearchException;
 
@@ -27,7 +27,7 @@ public interface SearchService {
 
     SPage<Map<String, Object>> getBrands(String keyword, Integer page, Integer size) throws SearchException;
 
-    SPage<Map<String, Object>> getbrandsAndSellers(String keyword, Integer page, Integer size) throws SearchException;
+    SPage<Map<String, Object>> getbrandsAndSellers(String keyword, Integer page, Integer size, String storeType) throws SearchException;
 
     String getComponentIds(String keyword, PageParams var2) throws SearchException;
 
@@ -41,6 +41,8 @@ public interface SearchService {
 
     Map<String,Object> getSimilarKeywords(String keyword, String type) throws SearchException;
 
+    Map<String,Object> getSimilarKeywordsWithStoreTypes(String keyword, String type, String storeTypes) throws SearchException;
+
     Map<String,Object> getProductSimilarKeywords(String keyword) throws SearchException;
 
     List<Map<String, Object>> getSimilarComponents(String keyword) throws SearchException;
@@ -55,7 +57,7 @@ public interface SearchService {
 
     List<Map<String, String>> getSimilarPropertyValues(Long kindId, Long propertyId, String keyword, Long topNum) throws SearchException;
 
-    Map<String, Object> getGoodsIds(String keyword, PageParams var2) throws SearchException;
+    Map<String, Object> getGoodsIds(String keyword, PageParams var2, String storeType) throws SearchException;
 
     Map<String, Object> getGoodsIdsForKinds(PageParams var2) throws SearchException;
 

+ 14 - 4
src/main/java/com/uas/platform/b2c/common/search/service/SearcherService.java

@@ -80,15 +80,15 @@ public interface SearcherService {
 	 * @throws InterruptedException
 	 * @throws IOException
 	 */
-	public ModelMap searchComponentGoods(String keyword, PageParams page , HttpServletRequest request);
+	public ModelMap searchComponentGoods(String keyword, PageParams page , String storeType, HttpServletRequest request);
 
 
 	/**
 	 * 201819期搜索接口调整
 	 */
-	public ModelMap getEnterpriseBySearchKind(String keyword, PageParams page);
+	public ModelMap getEnterpriseBySearchKind(String keyword, PageParams page, String storeType);
 	public ModelMap getEnterpriseBySearchStore(String keyword, PageParams page, HttpServletRequest request);
-	public ModelMap getEnterpriseBySearchBrand(String keyword, PageParams page);
+	public ModelMap getEnterpriseBySearchBrand(String keyword, PageParams page, String storeType);
 
 	/**
      * 批次搜索数量统计
@@ -99,7 +99,7 @@ public interface SearcherService {
      * @throws InterruptedException
      * @throws IOException
      */
-    public ModelMap searchComponentGoodsNums(String keyword, PageParams page);
+    public ModelMap searchComponentGoodsNums(String keyword, PageParams page, String storeType);
 
 	/**
 	 * 器件搜索的品牌统计列表
@@ -146,6 +146,16 @@ public interface SearcherService {
 	 */
 	public Map<String,Object> getSimilarKeywords(String keyword, String type);
 
+
+	/**
+	 * 获取产品联想词 , 参数包括店铺信息
+	 * @param keyword  关键词
+	 * @param type  搜索类型
+	 * @param storeType 店铺类型
+	 * @return 联想词结果
+	 */
+	Map<String,Object> getSimilarKeywordsWithStoreTypes(String keyword, String type, String storeType);
+
 	/**
 	 * 根据输入获取联想词(包括器件、类目、品牌,按顺序获取)
 	 *

+ 100 - 27
src/main/java/com/uas/platform/b2c/common/search/service/impl/SearcherServiceImpl.java

@@ -30,7 +30,7 @@ import com.uas.platform.b2c.prod.product.component.modal.ComponentInfo;
 import com.uas.platform.b2c.prod.store.dao.StoreInDao;
 import com.uas.platform.b2c.prod.store.model.StoreIn;
 import com.uas.platform.b2c.prod.store.model.StoreStatus;
-
+import com.uas.platform.b2c.prod.store.model.StoreType;
 import com.uas.platform.b2c.trade.order.dao.OrderDetailDao;
 import com.uas.platform.b2c.trade.vendor.model.VendorIntroduction;
 import com.uas.platform.b2c.trade.vendor.service.VendorIntroductionService;
@@ -39,22 +39,6 @@ import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.search.exception.SearchException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.stream.Collectors;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import javax.servlet.http.HttpServletRequest;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -68,6 +52,16 @@ import org.springframework.ui.ModelMap;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.stream.Collectors;
+
 /**
  * 搜索索引
  *
@@ -268,7 +262,7 @@ public class SearcherServiceImpl implements SearcherService {
 	 */
 	@SuppressWarnings("unchecked")
 	@Override
-	public ModelMap searchComponentGoods(String keyword, PageParams page , HttpServletRequest request) {
+	public ModelMap searchComponentGoods(String keyword, PageParams page , String storeType, HttpServletRequest request) {
 		if (this.deviceResolver.resolveDevice(request).isMobile()) {
 			SystemSession.setUser((User)request.getSession().getAttribute("user"));
 			if (null != SystemSession.getUser() && null!= SystemSession.getUser().getUserUU()){
@@ -294,7 +288,7 @@ public class SearcherServiceImpl implements SearcherService {
 
 		Map<String,Object> results = null;
 		try {
-			results = searchService.getGoodsIds(keyword, convertPageParams(page));
+			results = searchService.getGoodsIds(keyword, convertPageParams(page), storeType);
 		} catch (SearchException e) {
 			throwSystemException(e);
 		}
@@ -344,11 +338,11 @@ public class SearcherServiceImpl implements SearcherService {
      * @return
      */
     @Override
-    public ModelMap getEnterpriseBySearchKind(String keyword, PageParams page) {
+    public ModelMap getEnterpriseBySearchKind(String keyword, PageParams page, String storeType) {
         ModelMap resultMap = new ModelMap();
         Map<String, Object> kindsMap = null;
         try {
-            kindsMap = searchService.getKindsAndSellers(keyword, page.getPage(), page.getCount());
+            kindsMap = searchService.getKindsAndSellers(keyword, page.getPage(), page.getCount(), storeType);
         } catch (SearchException e) {
             throwSystemException(e);
         }
@@ -467,12 +461,12 @@ public class SearcherServiceImpl implements SearcherService {
     }
 
     @Override
-    public ModelMap getEnterpriseBySearchBrand(String keyword, PageParams page) {
+    public ModelMap getEnterpriseBySearchBrand(String keyword, PageParams page, String storeType) {
 
         ModelMap resultMap = new ModelMap();
         SPage<Map<String, Object>> brandsMap = null;
         try {
-            brandsMap = searchService.getbrandsAndSellers(keyword, page.getPage(), page.getCount());
+            brandsMap = searchService.getbrandsAndSellers(keyword, page.getPage(), page.getCount(), storeType);
         } catch (SearchException e) {
             throwSystemException(e);
         }
@@ -544,12 +538,12 @@ public class SearcherServiceImpl implements SearcherService {
      */
     @SuppressWarnings("unchecked")
     @Override
-    public ModelMap searchComponentGoodsNums(String keyword, PageParams page) {
+    public ModelMap searchComponentGoodsNums(String keyword, PageParams page, String storeType) {
         ModelMap map = new ModelMap();
         Map<String, Object> results = null;
         //Map<String, Object> results = new HashMap<>();
         try {
-            results = searchService.getGoodsIds(keyword, convertPageParams(page));
+            results = searchService.getGoodsIds(keyword, convertPageParams(page),storeType);
         } catch (SearchException e) {
             throwSystemException(e);
         }
@@ -660,7 +654,7 @@ public class SearcherServiceImpl implements SearcherService {
         }
         try {
             if (type.equals("store") || type.equals("all")) {
-                List<VendorIntroduction> vendorIntroductions = vendorIntroductionService.getVendorIntroduction(1,1024*1024*1024,keyword,null).getContent();
+                List<VendorIntroduction> vendorIntroductions = vendorIntroductionService.getVendorIntroduction(DEFAULT_PAGE, DEFAULT_SIZE, keyword,null).getContent();
                 List<Object> resultMap = FastjsonUtils.fromJsonArray(JSON.toJSONString(vendorIntroductions.stream().map(VendorIntroduction::getEnName).map(en -> {Map s = new HashMap ();s.put("name", en);return s;}).collect(Collectors.toList())
                 ));
                 if (type.equals("store")) {
@@ -684,6 +678,85 @@ public class SearcherServiceImpl implements SearcherService {
         return result;
     }
 
+    /**
+     * 获取产品联想词 , 参数包括店铺信息
+     *
+     * @param keyword   关键词
+     * @param type      搜索类型
+     * @param storeTypes 店铺类型  1个或多个  多个以, 隔开
+     * @return 联想词结果
+     */
+    @Override
+    public Map<String, Object> getSimilarKeywordsWithStoreTypes(String keyword, String type, String storeTypes) {
+        Map<String, Object> result = null;
+        if (StringUtils.isEmpty(type)) {
+            type = "all";
+        }
+        try {
+            if ("store".equals(type) || "all".equals(type)) {
+                PageInfo pageInfo = new PageInfo(DEFAULT_PAGE, DEFAULT_SIZE);
+                List<StoreIn> stores = getStorePageByStoreTypes(pageInfo,keyword,storeTypes).getContent();
+                List<Object> resultMap = FastjsonUtils.fromJsonArray(JSON.toJSONString(stores.stream().map(StoreIn::getStoreName).map(en -> {Map s = new HashMap ();s.put("name", en);return s;}).collect(Collectors.toList())
+                ));
+                if ("store".equals(type)) {
+                    result= new HashMap<>();
+                    result.put("result",resultMap);
+                } else {
+                    result = searchService.getSimilarKeywordsWithStoreTypes(keyword, type, storeTypes);
+                    result.put("store", resultMap);
+                }
+            } else {
+                result = searchService.getSimilarKeywordsWithStoreTypes(keyword, type, storeTypes);
+            }
+        } catch (SearchException e) {
+            throwSystemException(e);
+        }
+        for (Entry<String, Object> entry : result.entrySet()) {
+            if (((List) entry.getValue()).size() > 8) {
+                entry.setValue(((List) entry.getValue()).subList(0, 8));
+            }
+        }
+        return result;
+    }
+
+    /**
+     * 根据关键词和店铺类型获取店铺信息
+     *
+     * @param pageInfo   分页参数
+     * @param keyword    关键词
+     * @param storeTypes 店铺类型 多个时 以,隔开
+     * @return 店铺分页信息
+     */
+    public Page<StoreIn> getStorePageByStoreTypes(PageInfo pageInfo, String keyword, String storeTypes) {
+        if (StringUtils.hasText(keyword)){
+            pageInfo.expression(PredicateUtils.like("storeName", keyword, false));
+        }
+        if (StringUtils.hasText(storeTypes)){
+            List<StoreType> storeTypeList = new ArrayList<>();
+            if (storeTypes.contains(StoreType.AGENCY.toString())) {
+                storeTypeList.add(StoreType.AGENCY);
+            }
+            if (storeTypes.contains(StoreType.DISTRIBUTION.toString())) {
+                storeTypeList.add(StoreType.DISTRIBUTION);
+            }
+            if (storeTypes.contains(StoreType.ORIGINAL_FACTORY.toString())) {
+                storeTypeList.add(StoreType.ORIGINAL_FACTORY);
+            }
+            if (storeTypes.contains(StoreType.CONSIGNMENT.toString())) {
+                storeTypeList.add(StoreType.CONSIGNMENT);
+            }
+            pageInfo.expression(PredicateUtils.in("type", storeTypeList, false));
+        }
+
+        return storeInDao.findAll(new Specification<StoreIn>() {
+            @Override
+            public Predicate toPredicate(Root<StoreIn> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
+                criteriaQuery.where(pageInfo.getPredicates(root, criteriaQuery, criteriaBuilder));
+                return null;
+            }
+        }, pageInfo);
+    }
+
     @Override
     public Map<String, Object> getProductSimilarKeywords(String keyword) {
         Map<String, Object> result = null;
@@ -785,7 +858,7 @@ public class SearcherServiceImpl implements SearcherService {
 				SystemSession.getUser().getEnterprise() == null ? null : SystemSession.getUser().getEnterprise().getUu() );
 	}
 
-	/**
+    /**
 	 * 捕获SearchException抛出SystemException
 	 *
 	 * @param e

+ 19 - 0
src/main/java/com/uas/platform/b2c/fa/payment/constant/AccountType.java

@@ -0,0 +1,19 @@
+package com.uas.platform.b2c.fa.payment.constant;
+
+/**
+ * 账户类型
+ *
+ * @author yuj 2018-08-23 15:41
+ */
+public class AccountType {
+
+    /**
+     * 支付账户
+     */
+    public static final String PAY_TYPE = "PAY_TYPE";
+
+    /**
+     * 收款账户
+     */
+    public static final String RECEIVE_TYPE = "RECEIVE_TYPE";
+}

+ 2 - 28
src/main/java/com/uas/platform/b2c/fa/payment/controller/BankInfoController.java

@@ -89,7 +89,7 @@ public class BankInfoController {
 	}
 
 	/**
-	 * 分页获取卖家账户信息,已修改
+	 * 分页获取卖家收款账户信息,已修改
 	 * 获取供应商审核通过的信息
 	 * 2016年3月15日 下午5:16:00
 	 *
@@ -212,32 +212,6 @@ public class BankInfoController {
 		return bankInfoService.getEnterpriseBankInfoContainsStatus(Type.MALL.value(), Status.ALLOW.value(), sysConf.getEnUU());
 	}
 
-	/**
-	 * 获取管理平台个人的银行信息,
-	 * 默认 根据应鹏的UU匹配
-	 *
-	 * @return list
-	 */
-	@RequestMapping(value="/b2c/personal", method = RequestMethod.GET, params = "type=mall")
-	@ApiOperation(value = "获取管理平台个人的银行信息", httpMethod = "GET")
-	public List<BankInfo> getAdminPersonBankInfo() {
-		logger.log("银行账户信息", "获取管理平台的个人银行账户信息");
-		return bankInfoService.findBankInfoByUseruu(sysConf.getAdminUU(), sysConf.getEnUU() ,Type.MALL.value());
-	}
-
-	/**
-	 * 保存平台的企业账户
-	 * 默认  10030994
-	 *
-	 * @param bankInfo the bank info
-	 */
-	@RequestMapping(value="/b2c/enterprise/save", method = RequestMethod.POST, params = "type=mall")
-	@ApiOperation(value = "保存平台的企业账户", httpMethod = "POST")
-	public void saveAdminEnterBankInfo(@ApiParam(required = true, value = "银行账户信息") @RequestBody BankInfo bankInfo) {
-		logger.log("银行账户信息", "保存平台企业账户信息", "保存银行账号为:"+ bankInfo.getNumber() + ",开户人:" + bankInfo.getAccountname() +",操作人:"+ SystemSession.getUser().getUserUU());
-		bankInfoService.saveB2cAccount(bankInfo, Type.MALL.value(), false);
-	}
-
 	/**
 	 * 保存平台的个人账户
 	 * 默认  以应鹏的useruu保存
@@ -248,7 +222,7 @@ public class BankInfoController {
 	@ApiOperation(value = "保存平台的个人账户", httpMethod = "POST")
 	public void saveAdminPersonBankInfo(@ApiParam(required = true, value = "银行账户信息") @RequestBody BankInfo bankInfo) {
 		logger.log("银行账户信息", "保存平台个人账户信息", "保存银行账号为:"+ bankInfo.getNumber() +",开户人:"+ bankInfo.getAccountname() +", 操作人:"+ SystemSession.getUser().getUserUU());
-		bankInfoService.saveB2cAccount(bankInfo, Type.MALL.value(), true);
+		bankInfoService.save(bankInfo, Type.MALL.value());
 	}
 
 	/**

+ 44 - 57
src/main/java/com/uas/platform/b2c/fa/payment/dao/BankInfoDao.java

@@ -23,20 +23,28 @@ public interface BankInfoDao extends CrudRepository<BankInfo, Long>, JpaSpecific
 	 *
 	 * @param enuu 企业enuu
 	 * @param status 状态
-	 * @param opraterUserType 操作人类型
+	 * @param dissociative 个人、企业
+	 * @param accountType 账户类型
 	 * @return
 	 */
-	@Query(value = "select b from BankInfo b where b.enuu =:enuu and b.opraterUserType=:opraterUserType and b.status in :status order by num")
-	List<BankInfo> findSupBankList(@Param("enuu") Long enuu, @Param("opraterUserType") Integer opraterUserType, @Param("status") List<Integer> status);
+	@Query(value = "select b from BankInfo b where b.enuu =:enuu and b.dissociative=:dissociative and b.accountType =:accountType and b.status in :status order by num")
+	List<BankInfo> findSupBankList(@Param("enuu") Long enuu, @Param("dissociative") Integer dissociative, @Param("accountType") String accountType, @Param("status") List<Integer> status);
 
 	/**
 	 * 返回账户信息,兼容type版本
 	 * @param enuu
 	 * @param status
-	 * @param opraterUserType
 	 * @return
 	 */
-	List<BankInfo> findByEnuuAndStatusAndOpraterUserTypeOrderByNumAsc(Long enuu, Integer status, Integer opraterUserType);
+	List<BankInfo> findByEnuuAndStatusAndAccountTypeAndDissociativeOrderByNumAsc(Long enuu, Integer status, String accountType, Integer dissociative);
+
+
+	/**
+	 * 返回账户信息,兼容type版本
+	 * @param enuu
+	 * @return
+	 */
+	List<BankInfo> findByEnuuAndAccountTypeAndDissociativeOrderByNumAsc(Long enuu, String accountType, Integer dissociative);
 
 	/**
 	 * 根据下面参数获取企业账户信息
@@ -44,110 +52,89 @@ public interface BankInfoDao extends CrudRepository<BankInfo, Long>, JpaSpecific
 	 * @param opraterUserType 所属类型 买家 卖家,平台
 	 * @return list
 	 */
-	@Query(value = "select b from BankInfo b where b.enuu =:enuu and b.opraterUserType=:opraterUserType order by num")
-	List<BankInfo> findByEnuuAndOpraterUserTypeOrderByNumAsc(@Param("enuu") Long enuu, @Param("opraterUserType") Integer opraterUserType);
+//	@Query(value = "select b from BankInfo b where b.enuu =:enuu and b.opraterUserType=:opraterUserType order by num")
+//	List<BankInfo> findByEnuuAndOpraterUserTypeOrderByNumAsc(@Param("enuu") Long enuu, @Param("opraterUserType") Integer opraterUserType);
 
 	/**
 	 * 根据下面参数获取企业账户信息
 	 *
 	 * @param useruu 个人uu
-	 * @param enuu 企业enuu
-	 * @param opraterUserType 操作人的类型
+	 * @param accountType 收付款账户类型
+	 * @param dissociative 操作人的类型
 	 * @param status 状态
 	 * @return list
 	 */
-	List<BankInfo> findByUseruuAndEnuuAndOpraterUserTypeAndStatusOrderByNumAsc(Long useruu, Long enuu, Integer opraterUserType, Integer status);
+	List<BankInfo> findByUseruuAndAccountTypeAndDissociativeAndStatusOrderByNumAsc(Long useruu, String accountType, Integer dissociative, Integer status);
 
-	/**
-	 * 返回买家账户信息列表  --无enuu
-	 *
-	 * @param useruu
-	 * @param dissociative
-	 * @param operateUserType
-	 * @param status
-	 * @return
-	 */
-	List<BankInfo> findByUseruuAndDissociativeAndOpraterUserTypeAndStatusOrderByNumAsc(Long useruu, Integer dissociative, Integer operateUserType, Integer status);
 
 	/**
-	 * 获取买家账户数 --有enuu
+	 * 根据下面参数获取企业账户信息
 	 *
 	 * @param useruu 个人uu
-	 * @param enuu 企业enuu
-	 * @param operateUserType 操作人的类型
-	 * @param status 状态
-	 * @return int 返回总数
+	 * @param accountType 收付款账户类型
+	 * @param dissociative 操作人的类型
+	 * @return list
 	 */
-	@Query("select count(b) from BankInfo b where b.useruu=:useruu and b.enuu =:enuu and b.opraterUserType=:operateUserType and b.status =:status")
-	int getCountByUseruuAndStatus(@Param("useruu") Long useruu, @Param("enuu") Long enuu, @Param("operateUserType") Integer operateUserType, @Param("status") Integer status);
+	List<BankInfo> findByUseruuAndAccountTypeAndDissociativeOrderByNumAsc(Long useruu, String accountType, Integer dissociative);
+
 
 	/**
-	 * 获取买家账户数 --无enuu
+	 * 获取企业的对应账户统计
 	 *
-	 * @param useruu 个人uu
-	 * @param dissociative 个人用户
-	 * @param operateUserType 操作人类型
-	 * @param status 状态
-	 * @return int 返回总数
+	 * @param enuu 企业enuu
+	 * @return
 	 */
-	@Query("select count(b) from BankInfo b where b.useruu=:useruu and b.dissociative=:dissociative and b.opraterUserType=:operateUserType and b.status =:status")
-	int getCountByUseruuAndStatusAndDissociative(@Param("useruu") Long useruu, @Param("dissociative") Integer dissociative, @Param("operateUserType") Integer operateUserType, @Param("status") Integer status);
+	@Query("select count(b) from BankInfo b where b.enuu=:enuu and b.dissociative=:dissociative and b.status in :status and b.accountType =:accountType")
+	int getCountByEnuuAndStatusAndDissociativeAndAccountType(@Param("enuu") Long enuu, @Param("status") List<Integer> status, @Param("dissociative") Integer dissociative, @Param("accountType") String accountType);
+
 
 	/**
-	 * 获取卖家的企业账户数
+	 * 获取个人的对应账户统计
 	 *
-	 * @param enuu 企业enuu
-	 * @param operateUserType 操作人的类型
+	 * @param useruu 企业useruu
 	 * @return
 	 */
-	@Query("select count(b) from BankInfo b where b.enuu=:enuu and b.opraterUserType=:operateUserType and b.status in :status")
-	int getCountByEnuuAndStatus(@Param("enuu") Long enuu, @Param("operateUserType") Integer operateUserType, @Param("status") List<Integer> status);
+	@Query("select count(b) from BankInfo b where b.useruu=:useruu and b.status in :status and b.dissociative=:dissociative and b.accountType =:accountType")
+	int getCountByUseruuAndStatusAndDissociativeAndAccountType(@Param("useruu") Long useruu, @Param("status") List<Integer> status, @Param("dissociative") Integer dissociative, @Param("accountType") String accountType);
 
 	/**
 	 * 获取平台的账户数
 	 *
 	 * @param enuu 企业enuu
-	 * @param operateUserType 操作人的类型
 	 * @return
 	 */
-	@Query("select count(b) from BankInfo b where b.enuu=:enuu and b.opraterUserType=:operateUserType and b.status=:status")
-	int getMallCountByEnuuAndStatus(@Param("enuu") Long enuu, @Param("operateUserType") Integer operateUserType, @Param("status") Integer status);
+	@Query("select count(b) from BankInfo b where b.enuu =:enuu and b.dissociative=:dissociative and b.status=:status")
+	int getMallCountByEnuuAndStatus(@Param("enuu") Long enuu, @Param("dissociative") Integer dissociative, @Param("status") Integer status);
 
 	/**
 	 * 根据银行账号查询个人账号下的账户个数
 	 * @param useruu
-	 * @param enuu
-	 * @param opraterUserType
+	 * @param dissociative
 	 * @param status
 	 * @param number
 	 * @return
 	 */
-	@Query("select count(b) from BankInfo b where b.useruu=:useruu and b.enuu=:enuu and b.opraterUserType=:opraterUserType and b.status=:status and b.number=:number")
-	int getBuyerCountByNumberAndEnuu(@Param("useruu") Long useruu, @Param("enuu") Long enuu, @Param("opraterUserType") Integer opraterUserType, @Param("status") Integer status, @Param("number") String number);
+	@Query("select count(b) from BankInfo b where b.useruu=:useruu and b.dissociative=:dissociative and b.status=:status and b.number=:number")
+	int getBuyerCountByNumberAndDissociative(@Param("useruu") Long useruu, @Param("dissociative") Integer dissociative, @Param("status") Integer status, @Param("number") String number);
 
 	/**
 	 * 根据银行账号查询个人账号下的账户个数
-	 * @param useruu
+	 * @param enuu
 	 * @param dissociative
 	 * @param status
 	 * @param number
 	 * @return
 	 */
-	@Query("select count(b) from BankInfo b where b.useruu=:useruu and b.dissociative=:dissociative and b.opraterUserType=:opraterUserType and b.status=:status and b.number=:number")
-	int getBuyerCountByNumberAndDissociative(@Param("useruu") Long useruu, @Param("dissociative") Integer dissociative, @Param("opraterUserType") Integer opraterUserType,
-											 @Param("status") Integer status, @Param("number") String number);
+	@Query("select count(b) from BankInfo b where b.enuu=:enuu and b.dissociative=:dissociative and b.status=:status and b.number=:number")
+	int getSupCountByNumberAndDissociative(@Param("enuu") Long enuu, @Param("dissociative") Integer dissociative, @Param("status") Integer status, @Param("number") String number);
 
 	/**
 	 * 银行账户返回企业账户数
 	 * @param enuu
-	 * @param opraterUserType
 	 * @param status
 	 * @param number
 	 * @return
 	 */
-	@Query("select count(b) from BankInfo b where b.enuu=:enuu and b.opraterUserType=:opraterUserType and b.status in :status and b.number=:number")
-	int getEnterpriseCountByNumberAndEnuu(@Param("enuu") Long enuu, @Param("opraterUserType") Integer opraterUserType,
-									 @Param("status") List<Integer> status, @Param("number") String number);
-
-	List<BankInfo> findByUseruuAndEnuuAndNumAndOpraterUserTypeAndStatus(Long useruu, Long enuu, Integer num, Integer opraterUserType, Integer status);
+	@Query("select count(b) from BankInfo b where b.enuu=:enuu and b.dissociative=:dissociative and b.status in :status and b.number=:number")
+	int getEnterpriseCountByNumberAndEnuu(@Param("enuu") Long enuu, @Param("dissociative") Integer dissociative, @Param("status") List<Integer> status, @Param("number") String number);
 }

+ 15 - 0
src/main/java/com/uas/platform/b2c/fa/payment/model/BankInfo.java

@@ -125,6 +125,12 @@ public class BankInfo implements Serializable{
 	@Column(name = "binfo_erpnum")
 	private String erpNum;
 
+	/**
+	 * 付款账户、收款账户
+	 */
+	@Column(name = "binfo_accout_type")
+	private String accountType;
+
 	public Long getId() {
 		return id;
 	}
@@ -265,4 +271,13 @@ public class BankInfo implements Serializable{
 				+ accountname + ", number=" + number
 				+ ", currency=" + currency + "]";
 	}
+
+	public String getAccountType() {
+		return accountType;
+	}
+
+	public BankInfo setAccountType(String accountType) {
+		this.accountType = accountType;
+		return this;
+	}
 }

+ 14 - 26
src/main/java/com/uas/platform/b2c/fa/payment/service/BankInfoService.java

@@ -4,6 +4,8 @@ import com.uas.platform.b2c.common.base.model.FileUpload;
 import com.uas.platform.b2c.fa.payment.model.BankInfo;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.model.PageParams;
+import com.uas.platform.core.model.Status;
+import com.uas.platform.core.model.Type;
 import org.springframework.data.domain.Page;
 
 import java.util.List;
@@ -27,16 +29,6 @@ public interface BankInfoService {
 	BankInfo save(BankInfo bankInfo, Integer type, FileUpload... fileItem);
 
 
-	/**
-	 * 保存账户信息
-	 *
-	 * @param bankInfo     账户信息
-	 * @param operatorType 区分买家、卖家、商城
-	 * @param isPersonal   是个人账户吗
-	 * @return BankInfo
-	 */
-	BankInfo saveB2cAccount(BankInfo bankInfo, Integer operatorType, boolean isPersonal);
-
 	/**
 	 * 根据id删除指定账户信息
 	 *
@@ -63,13 +55,13 @@ public interface BankInfoService {
 	List<BankInfo> getEnterpriseBankInfoContainsStatus(Integer operatorUserType, Integer status, Long... params);
 
 	/**
-	 * 返回的账户信息
-	 *
-	 * @param operatorUserType 要获取的买家、卖家、平台账户
-	 * @param params           传入的企业uu,可能为空
-	 * @return list
+	 * 获取制定账户的类型
+	 * @param uu
+	 * @param dissociative
+	 * @param accountType
+	 * @return
 	 */
-	List<BankInfo> getEnterpriseBankInfo(Integer operatorUserType, Long... params);
+	List<BankInfo> getEnterpriseBankInfo(Long uu, Integer dissociative, String accountType);
 
 	/**
 	 * 分页获取卖家的账户信息
@@ -80,16 +72,6 @@ public interface BankInfoService {
 	 */
 	Page<BankInfo> getSupBankInfo(PageParams params, Integer operatorUserType);
 
-	/**
-	 * 根据以下参数 获取对应的参数查找所有的账户信息
-	 *
-	 * @param useruu          个人uu
-	 * @param enuu            企业enuu
-	 * @param opraterUserType 操作人的类型
-	 * @return the list
-	 */
-	List<BankInfo> findBankInfoByUseruu(Long useruu, Long enuu, Integer opraterUserType);
-
 	/**
 	 * 根据id获得账户信息
 	 *
@@ -148,4 +130,10 @@ public interface BankInfoService {
 	 * @return
 	 */
 	ResultMap getCountByNumber(Integer type, String number);
+
+	/**
+	 * 获取
+	 * @return
+	 */
+	List<BankInfo> getDefaultBankInfoByuuAndStatusAndAccountType(Long useruu, Long enuu, Integer status, String accountType);
 }

+ 108 - 116
src/main/java/com/uas/platform/b2c/fa/payment/service/impl/BankInfoServiceImpl.java

@@ -1,12 +1,13 @@
 package com.uas.platform.b2c.fa.payment.service.impl;
 
-import com.uas.platform.b2c.common.account.model.Enterprise;
+import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.base.model.FileUpload;
 import com.uas.platform.b2c.common.base.service.FileService;
 import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.constant.Status;
 import com.uas.platform.b2c.core.constant.Type;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.fa.payment.constant.AccountType;
 import com.uas.platform.b2c.fa.payment.dao.BankInfoDao;
 import com.uas.platform.b2c.fa.payment.model.BankInfo;
 import com.uas.platform.b2c.fa.payment.service.BankInfoService;
@@ -64,31 +65,27 @@ public class BankInfoServiceImpl implements BankInfoService {
 	public BankInfo save(BankInfo bankInfo, Integer type, FileUpload... fileItem) {
 		bankInfo.setOpraterUserType(type);
 		bankInfo.setCreateTime(new Date());
-		if(type == Type.BUYER.value()) {
+		type = Type.SUP.value();
+		bankInfo.setStatus(Status.ALLOW.value());
+		User user = SystemSession.getUser();
+		if(user.getEnterprise() == null) {
 			if(bankInfo.getId() == null) {
-				if (SystemSession.getUser().getEnterprise() != null){
-					int num = bankInfoDao.getCountByUseruuAndStatus(SystemSession.getUser().getUserUU(), SystemSession.getUser().getEnterprise().getUu(), bankInfo.getOpraterUserType(), Status.ALLOW.value()) + 1;
-					bankInfo.setNum(num);
-				}else {
-					int num = bankInfoDao.getCountByUseruuAndStatusAndDissociative(SystemSession.getUser().getUserUU(), Type.PERSONAL.value(), bankInfo.getOpraterUserType(), Status.ALLOW.value()) + 1;
-					bankInfo.setNum(num);
-				}
-			}
-			bankInfo.setUseruu(SystemSession.getUser().getUserUU());
-			bankInfo.setEnuu(SystemSession.getUser().getEnterprise() != null ? SystemSession.getUser().getEnterprise().getUu() : null);
-			if (bankInfo.getEnuu() == null) {
-				bankInfo.setDissociative(Type.PERSONAL.value());
-			} else {
-				bankInfo.setDissociative(Type.ENTERPRISING.value());
+				List<Integer> list = new ArrayList<>();
+				list.add(Status.ALLOW.value());
+				int num = bankInfoDao.getCountByUseruuAndStatusAndDissociativeAndAccountType(user.getUserUU(), list, Type.PERSONAL.value(), bankInfo.getAccountType()) + 1;
+				bankInfo.setNum(num);
 			}
-			bankInfo.setStatus(Status.ALLOW.value());
-		}else if(type == Type.SUP.value()) {
-			bankInfo.setEnuu(SystemSession.getUser().getEnterprise().getUu());
+			bankInfo.setUseruu(user.getUserUU());
+			bankInfo.setDissociative(Type.PERSONAL.value());
+		}else {
+			bankInfo.setEnuu(user.getEnterprise().getUu());
 			bankInfo.setDissociative(Type.ENTERPRISING.value());
 			if(bankInfo.getId() == null) {
-				int count = bankInfoDao.getCountByEnuuAndStatus(SystemSession.getUser().getEnterprise().getUu(), bankInfo.getOpraterUserType(), statusList);
+				int count = bankInfoDao.getCountByEnuuAndStatusAndDissociativeAndAccountType(user.getEnterprise().getUu(), statusList, Type.ENTERPRISING.value(), bankInfo.getAccountType());
 				bankInfo.setNum(count + 1);
 			}
+		}
+		if (AccountType.RECEIVE_TYPE.equals(bankInfo.getAccountType()) && (!sysConf.getEnUU().equals(bankInfo.getEnuu()))) {
 			bankInfo.setStatus(Status.SUBMITTED.value());
 		}
 
@@ -113,30 +110,24 @@ public class BankInfoServiceImpl implements BankInfoService {
 			baInfo.setStatus(Status.DELETED.value());
 			bankInfoDao.save(baInfo);
 			int i = 1;
-			if (baInfo.getOpraterUserType() == Type.BUYER.value()){
-				List<BankInfo> list = new ArrayList<>();
-				if (baInfo.getEnuu() != null){
-					list = bankInfoDao.findByUseruuAndEnuuAndOpraterUserTypeAndStatusOrderByNumAsc(baInfo.getUseruu(), baInfo.getEnuu(), baInfo.getOpraterUserType(), Status.ALLOW.value());
-				}else {
-					list = bankInfoDao.findByUseruuAndDissociativeAndOpraterUserTypeAndStatusOrderByNumAsc(baInfo.getUseruu(), Type.PERSONAL.value(), baInfo.getOpraterUserType(), Status.ALLOW.value());
-				}
-				for (BankInfo bankInfo : list) {
-					bankInfo.setNum(i);
-					i++;
-				}
-				bankInfoDao.save(list);
-			} else if (baInfo.getOpraterUserType() == Type.SUP.value()){
-				List<BankInfo> list = bankInfoDao.findSupBankList(baInfo.getEnuu(), baInfo.getOpraterUserType(), statusList);
-				for (BankInfo bankInfo : list) {
-					bankInfo.setNum(i);
-					i++;
-				}
+			List<BankInfo> list = null;
+			if (baInfo.getDissociative() == Type.PERSONAL.value()){
+				list = bankInfoDao.findByUseruuAndAccountTypeAndDissociativeAndStatusOrderByNumAsc(baInfo.getUseruu(), baInfo.getAccountType(), baInfo.getDissociative(), Status.ALLOW.value());
+			} else {
+				list = bankInfoDao.findSupBankList(baInfo.getEnuu(), baInfo.getDissociative(), baInfo.getAccountType(), statusList);
+			}
+			for (BankInfo bankInfo : list) {
+				bankInfo.setNum(i);
+				i++;
+			}
+			if (CollectionUtils.isNotEmpty(list)) {
 				bankInfoDao.save(list);
 			}
 		}
 	}
 
 	/**
+	 * 默认获取付款账户
 	 * 已修改,分页获取买家账户信息
 	 * @param params
 	 * @param operatorUserType 操作人类型
@@ -145,13 +136,14 @@ public class BankInfoServiceImpl implements BankInfoService {
 	@Override
 	public Page<BankInfo> getPersonBankInfo(PageParams params, Integer operatorUserType) {
 		final PageInfo pageInfo = new PageInfo(params);
-		pageInfo.filter("opraterUserType", operatorUserType);
-		pageInfo.filter("useruu", SystemSession.getUser().getUserUU());
-		if (SystemSession.getUser().getEnterprise() != null){
-			pageInfo.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
-		}else {
+		if (SystemSession.getUser().getEnterprise() == null) {
 			pageInfo.filter("dissociative", Type.PERSONAL.value());
+			pageInfo.filter("useruu", SystemSession.getUser().getUserUU());
+		} else {
+			pageInfo.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
+			pageInfo.filter("dissociative", Type.ENTERPRISING.value());
 		}
+		pageInfo.filter("accountType", AccountType.PAY_TYPE);
 		pageInfo.filter("status", Status.ALLOW.value());
 		return bankInfoDao.findAll(new Specification<BankInfo>() {
 			@Override
@@ -174,6 +166,8 @@ public class BankInfoServiceImpl implements BankInfoService {
 		final PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("opraterUserType", operatorUserType);
 		pageInfo.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
+		pageInfo.filter("dissociative", Type.ENTERPRISING.value());
+		pageInfo.filter("accountType", AccountType.RECEIVE_TYPE);
 		SimpleExpression expression1 = new SimpleExpression("status", Status.SUBMITTED.value(), CriterionExpression.Operator.EQ);
 		SimpleExpression expression2 = new SimpleExpression("status", Status.NOTALLOW.value(), CriterionExpression.Operator.EQ);
 		SimpleExpression expression3 = new SimpleExpression("status", Status.ALLOW.value(), CriterionExpression.Operator.EQ);
@@ -190,22 +184,27 @@ public class BankInfoServiceImpl implements BankInfoService {
 		}, pageInfo);
 	}
 
+	/**
+	 * 这个账户默认获取收款账户
+	 * @param operatorUserType 操作人类型
+	 * @param status           状态
+	 * @param params           传入的企业uu,可能为空
+	 * @return
+	 */
 	@Override
 	public List<BankInfo> getEnterpriseBankInfoContainsStatus(Integer operatorUserType, Integer status, Long... params) {
 		Long enuu = null;
+		User user = SystemSession.getUser();
 		if(params.length == 0) {
-			enuu = SystemSession.getUser().getEnterprise() != null ? SystemSession.getUser().getEnterprise().getUu() : null;
+			enuu = user.getEnterprise() != null ? user.getEnterprise().getUu() : null;
 		}else {
 			enuu = params[0];
 		}
-		if(operatorUserType == Type.BUYER.value()) {
-			if (enuu != null) {
-				return bankInfoDao.findByUseruuAndEnuuAndOpraterUserTypeAndStatusOrderByNumAsc(SystemSession.getUser().getUserUU(), enuu, operatorUserType, status);
-			} else {
-				return bankInfoDao.findByUseruuAndDissociativeAndOpraterUserTypeAndStatusOrderByNumAsc(SystemSession.getUser().getUserUU(), Type.PERSONAL.value(), operatorUserType, status);
-			}
-		}else {
-			return bankInfoDao.findByEnuuAndStatusAndOpraterUserTypeOrderByNumAsc(enuu, status, operatorUserType);
+		//如果是个人用户登录
+		if(user.getEnterprise() == null && enuu == null) {
+				return bankInfoDao.findByUseruuAndAccountTypeAndDissociativeAndStatusOrderByNumAsc(user.getUserUU(), AccountType.RECEIVE_TYPE, Type.PERSONAL.value(), status);
+		} else {
+			return bankInfoDao.findByEnuuAndStatusAndAccountTypeAndDissociativeOrderByNumAsc(enuu, status, AccountType.RECEIVE_TYPE, Type.ENTERPRISING.value());
 		}
 	}
 
@@ -214,28 +213,10 @@ public class BankInfoServiceImpl implements BankInfoService {
 		return bankInfoDao.findOne(id);
 	}
 
-	@Override
-	public List<BankInfo> findBankInfoByUseruu(Long useruu, Long enuu, Integer opraterUserType) {
-		return bankInfoDao.findByUseruuAndEnuuAndOpraterUserTypeAndStatusOrderByNumAsc(useruu, enuu, opraterUserType, Status.ALLOW.value());
-	}
-
 	@Override
 	public BankInfo update(BankInfo bankInfo) {
 		return bankInfoDao.save(bankInfo);
 	}
-	
-	@Override
-	@Transactional
-	public BankInfo saveB2cAccount(BankInfo bankInfo, Integer operatorType, boolean isPersonal) {
-		int size = 0;
-		bankInfo.setOpraterUserType(Type.MALL.value());
-		bankInfo.setEnuu(sysConf.getEnUU());
-		bankInfo.setCreateTime(new Date());
-		size = bankInfoDao.getMallCountByEnuuAndStatus(bankInfo.getEnuu(),Type.MALL.value(), Status.ALLOW.value());
-		bankInfo.setNum(++size);
-		bankInfo.setStatus(Status.ALLOW.value());
-		return bankInfoDao.save(bankInfo);
-	}
 
 	@Override
 	public void save(List<BankInfo> list) {
@@ -247,18 +228,18 @@ public class BankInfoServiceImpl implements BankInfoService {
 	public void setDefaultAccount(Long id) {
 		BankInfo baInfo = bankInfoDao.findOne(id);
 		List<BankInfo> bankInfos = null;
-		if (baInfo.getOpraterUserType() == Type.BUYER.value()){
-			//只有买家账户才涉及到默认账户
-			bankInfos = bankInfoDao.findByUseruuAndEnuuAndOpraterUserTypeAndStatusOrderByNumAsc(baInfo.getUseruu(), baInfo.getEnuu(), baInfo.getOpraterUserType(), Status.ALLOW.value());
-		}else if (baInfo.getOpraterUserType() == Type.SUP.value()){
-			//卖家账户重新使用
-			bankInfos = bankInfoDao.findSupBankList(baInfo.getEnuu(), baInfo.getOpraterUserType(), statusList);
-			BankInfo firstItem = bankInfos.get(0);
-			if (firstItem.getStatus() == Status.ALLOW.value()){
-				firstItem.setStatus(Status.EXPIRED.value());
+		if (baInfo.getDissociative() == Type.PERSONAL.value()){
+			bankInfos = bankInfoDao.findByUseruuAndAccountTypeAndDissociativeAndStatusOrderByNumAsc(baInfo.getUseruu(), baInfo.getAccountType(), baInfo.getDissociative(), Status.ALLOW.value());
+		} else {
+			bankInfos = bankInfoDao.findSupBankList(baInfo.getEnuu(), baInfo.getDissociative(), baInfo.getAccountType(), statusList);
+			if (AccountType.RECEIVE_TYPE.equals(baInfo.getAccountType())) {
+				BankInfo firstItem = bankInfos.get(0);
+				if (firstItem.getStatus() == Status.ALLOW.value()){
+					firstItem.setStatus(Status.EXPIRED.value());
+				}
+				baInfo.setStatus(Status.ALLOW.value());
+				bankInfoDao.save(baInfo);
 			}
-			baInfo.setStatus(Status.ALLOW.value());
-			bankInfoDao.save(baInfo);
 		}
 		setDefaultAccountAssist(bankInfos, id);
 	}
@@ -278,22 +259,22 @@ public class BankInfoServiceImpl implements BankInfoService {
 		bankInfoDao.save(bankInfos);
 	}
 
+
 	/**
-	 * 返回的账户信息
+	 * 获取制定账户的类型
 	 *
-	 * @param operatorUserType 要获取的买家、卖家、平台账户
-	 * @param params           传入的企业uu,可能为空
+	 * @param uu
+	 * @param dissociative
+	 * @param accountType
 	 * @return
 	 */
 	@Override
-	public List<BankInfo> getEnterpriseBankInfo(Integer operatorUserType, Long... params) {
-		Long enuu = null;
-		if(params.length == 0) {
-			enuu = SystemSession.getUser().getEnterprise().getUu();
-		}else {
-			enuu = params[0];
+	public List<BankInfo> getEnterpriseBankInfo(Long uu, Integer dissociative, String accountType) {
+		if (dissociative == Type.ENTERPRISING.value()) {
+			return bankInfoDao.findByEnuuAndAccountTypeAndDissociativeOrderByNumAsc(uu, accountType, dissociative);
+		} else {
+			return bankInfoDao.findByUseruuAndAccountTypeAndDissociativeOrderByNumAsc(uu, accountType, dissociative);
 		}
-		return bankInfoDao.findByEnuuAndOpraterUserTypeOrderByNumAsc(enuu, operatorUserType);
 	}
 
 	/**
@@ -350,21 +331,21 @@ public class BankInfoServiceImpl implements BankInfoService {
 			return new ResultMap(CodeType.NOT_PERMIT, "该账户信息不是已提交状态,不能审核");
 		}
 		if(status == Status.ALLOW.value()) { //审核通过
-			if(bankInfo.getOpraterUserType() == Type.SUP.value()) {
-				bankInfo.setStatus(Status.ALLOW.value());
-				bankInfo = bankInfoDao.save(bankInfo);
-				//获取所有的账户信息
-				List<BankInfo> infoList = bankInfoDao.findSupBankList(bankInfo.getEnuu(), bankInfo.getOpraterUserType(), statusList);
-				if (!CollectionUtils.isEmpty(infoList) && infoList.size() > 1){
-					BankInfo first = infoList.get(0); //获取第一个账户信息
-					if (first.getStatus() == Status.ALLOW.value()){
-						//已有使用中的账户
-						first.setStatus(Status.EXPIRED.value());
-						setDefaultAccountAssist(infoList, bankInfo.getId());
-					}else {
-						setDefaultAccountAssist(infoList, bankInfo.getId());
-					}
+			bankInfo.setStatus(Status.ALLOW.value());
+			bankInfo = bankInfoDao.save(bankInfo);
+			List<BankInfo> infoList = null;
+			if (bankInfo.getDissociative() == Type.PERSONAL.value()){
+				infoList = bankInfoDao.findByUseruuAndAccountTypeAndDissociativeAndStatusOrderByNumAsc(bankInfo.getUseruu(), bankInfo.getAccountType(), bankInfo.getDissociative(), Status.ALLOW.value());
+			} else {
+				infoList = bankInfoDao.findSupBankList(bankInfo.getEnuu(), bankInfo.getDissociative(), bankInfo.getAccountType(), statusList);
+			}
+			if (!CollectionUtils.isEmpty(infoList) && infoList.size() > 1){
+				BankInfo first = infoList.get(0); //获取第一个账户信息
+				if (first.getStatus() == Status.ALLOW.value()){
+					//已有使用中的账户
+					first.setStatus(Status.EXPIRED.value());
 				}
+				setDefaultAccountAssist(infoList, bankInfo.getId());
 			}
 		}else if(status == Status.NOTALLOW.value()){
 			if(str == null || str.length == 0) {
@@ -382,22 +363,33 @@ public class BankInfoServiceImpl implements BankInfoService {
 		if (type != Type.MALL.value() && type != Type.BUYER.value() && type != Type.SUP.value()){
 			return new ResultMap(CodeType.ERROR_STATE, "类型不存在,确认要查找账户的类型");
 		}
-		if (StringUtils.isEmpty(number)){
+		if (StringUtils.isEmpty(number)) {
 			return new ResultMap(CodeType.NO_INFO, "银行账号丢失或为空,请确认银行账号");
 		}
 		Integer count = null;
-		if (type == Type.BUYER.value()){
-			Enterprise enterprise = SystemSession.getUser().getEnterprise();
-			if (enterprise != null){
-				count = bankInfoDao.getBuyerCountByNumberAndEnuu(SystemSession.getUser().getUserUU(), enterprise.getUu(),
-						Type.BUYER.value(), Status.ALLOW.value(), number);
-			}else {
-				count = bankInfoDao.getBuyerCountByNumberAndDissociative(SystemSession.getUser().getUserUU(), Type.PERSONAL.value(),
-						Type.BUYER.value(), Status.ALLOW.value(), number);
-			}
+		User user = SystemSession.getUser();
+		if (user.getEnterprise() != null) {
+			count = bankInfoDao.getSupCountByNumberAndDissociative(user.getEnterprise().getUu(), Type.ENTERPRISING.value(), Status.ALLOW.value(), number);
 		}else {
-			count = bankInfoDao.getEnterpriseCountByNumberAndEnuu(SystemSession.getUser().getEnterprise().getUu(), type, statusList, number);
+			count = bankInfoDao.getBuyerCountByNumberAndDissociative(user.getUserUU(), Type.PERSONAL.value(), Status.ALLOW.value(), number);
 		}
 		return ResultMap.success(count);
 	}
+
+	/**
+	 * 获取
+	 *
+	 * @param useruu
+	 * @param enuu
+	 * @param status
+	 * @return
+	 */
+	@Override
+	public List<BankInfo> getDefaultBankInfoByuuAndStatusAndAccountType(Long useruu, Long enuu, Integer status, String accountType) {
+		if (enuu == null) {
+			return bankInfoDao.findByUseruuAndAccountTypeAndDissociativeAndStatusOrderByNumAsc(useruu, accountType, Type.PERSONAL.value(), status);
+		} else {
+			return bankInfoDao.findByEnuuAndStatusAndAccountTypeAndDissociativeOrderByNumAsc(enuu, status, accountType, Type.ENTERPRISING.value());
+		}
+	}
 }

+ 40 - 32
src/main/java/com/uas/platform/b2c/fa/payment/service/impl/BankTransferServiceImpl.java

@@ -2,10 +2,12 @@ package com.uas.platform.b2c.fa.payment.service.impl;
 
 import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
 import com.uas.platform.b2c.common.account.model.Enterprise;
+import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
 import com.uas.platform.b2c.core.utils.NumberUtil;
+import com.uas.platform.b2c.fa.payment.constant.AccountType;
 import com.uas.platform.b2c.fa.payment.dao.BankInfoDao;
 import com.uas.platform.b2c.fa.payment.dao.BankTransAssociateDao;
 import com.uas.platform.b2c.fa.payment.dao.BankTransferDao;
@@ -37,6 +39,7 @@ import com.uas.platform.core.persistence.criteria.CriterionExpression;
 import com.uas.platform.core.persistence.criteria.LogicalExpression;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
+import com.uas.platform.core.util.serializer.FlexJsonUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Sort;
@@ -219,7 +222,7 @@ public class BankTransferServiceImpl implements BankTransferService {
 		int num = 2;
 		List<BankInfo> listBankInfo = null;
 		if (b2cAccount.getUseruu() == null) {
-			listBankInfo = bankInfoService.getEnterpriseBankInfo(Type.MALL.value(), b2cAccount.getEnuu());
+			listBankInfo = bankInfoService.getEnterpriseBankInfo(b2cAccount.getEnuu(), Type.ENTERPRISING.value(), AccountType.PAY_TYPE);
 			for (BankInfo bankInfo : listBankInfo) {
 				if (b2cAccount.getId().longValue() != bankInfo.getId().longValue()) {
 					bankInfo.setNum(num++);
@@ -232,7 +235,12 @@ public class BankTransferServiceImpl implements BankTransferService {
 
 		// 收款方 默认企业账户
 		num = 2;
-		List<BankInfo> enterpriseBankInfo = bankInfoService.getEnterpriseBankInfo(Type.BUYER.value(), custAccount.getEnuu());
+		List<BankInfo> enterpriseBankInfo = null;
+		if (custAccount.getDissociative().intValue() == Type.ENTERPRISING.value()) {
+			enterpriseBankInfo = bankInfoService.getEnterpriseBankInfo(custAccount.getEnuu(), Type.ENTERPRISING.value(), AccountType.RECEIVE_TYPE);
+		} else {
+			enterpriseBankInfo = bankInfoService.getEnterpriseBankInfo(custAccount.getUseruu(), Type.PERSONAL.value(), AccountType.RECEIVE_TYPE);
+		}
 		for (BankInfo bankInfo : enterpriseBankInfo) {
 			if (bankInfo.getNum() != custAccount.getNum()) {
 				bankInfo.setNum(num++);
@@ -269,7 +277,19 @@ public class BankTransferServiceImpl implements BankTransferService {
 		// 将转账信息的ID保存到订单类型中
 		String[] orderIds = order.split("-");
 		BankTransfer saveBankTransfer = new BankTransfer();
-
+        User user = SystemSession.getUser();
+        bankTransfer.setPayUseruu(user.getUserUU());
+        bankTransfer.setPayenuu(user.getEnterprise() != null ? user.getEnterprise().getUu() : null);
+        if (bankTransfer.getPayenuu() == null) {
+            bankTransfer.setDissociative(Type.PERSONAL.value());
+        } else {
+            bankTransfer.setDissociative(Type.ENTERPRISING.value());
+        }
+        bankTransfer.setTransferTime(new Date());
+        bankTransfer.setTranferCreateTime(new Date());
+        bankTransfer.setBuyername(user.getUserName());
+        bankTransfer.setBuyerentername(user.getEnterprise().getEnName());
+        bankTransfer.setOrderid(order);
 		if (com.uas.platform.b2c.core.constant.Type.PAIDTOVENDOR.name().equals(bankTransfer.getType())) {// 付款类型为分期付款
 			if (orderIds.length > 1)
 				throw new IllegalOperatorException("多张订单合并付款只能向平台支付,如需直接支付给卖家,请前往 订单中心 进行单张支付");
@@ -281,15 +301,13 @@ public class BankTransferServiceImpl implements BankTransferService {
 				throw new IllegalOperatorException("您操作的订单不在待付款状态:" + orderIds[0]);
 			}
 
-			bankTransfer.setPayUseruu(SystemSession.getUser().getUserUU());
-			bankTransfer.setPayenuu(SystemSession.getUser().getEnterprise() != null ? SystemSession.getUser().getEnterprise().getUu() : null);
-			if (bankTransfer.getPayenuu() == null) {
-				bankTransfer.setDissociative(Type.PERSONAL.value());
-			} else {
-				bankTransfer.setDissociative(Type.ENTERPRISING.value());
-			}
-
-			List<BankInfo> bankInfos = bankInfoService.getEnterpriseBankInfoContainsStatus(Type.SUP.value(), Status.ALLOW.value(), orderN.getSellerenuu());
+            List<Purchase> purchaseList = purchaseDao.findByOrderid(orderN.getOrderid());
+            String puid = "";
+            for (Purchase purchase : purchaseList) {
+                puid += ("," + purchase.getPurchaseid());
+            }
+            puid = puid.substring(1);
+            List<BankInfo> bankInfos = bankInfoService.getEnterpriseBankInfoContainsStatus(Type.SUP.value(), Status.ALLOW.value(), orderN.getSellerenuu());
 			if (CollectionUtils.isEmpty(bankInfos))
 				throw new IllegalOperatorException("卖家收款账户不存在,请联系卖家");
 			Enterprise enterprise = enterpriseDao.findByUu(orderN.getSellerenuu());
@@ -298,11 +316,11 @@ public class BankTransferServiceImpl implements BankTransferService {
 
 			bankTransfer.setCollectUseruu(enterprise.getEnAdminuu());
 			bankTransfer.setCollectenuu(orderN.getSellerenuu());
+            bankTransfer.setJsonReceive(FlexJsonUtils.toJson(bankInfos.get(0)));
 
 			bankTransfer.setBanktranssn(EncodingRulesConstant.BANKTRANSFER.replace("_TIMESTAP_NUMBER", createNumberService.getTimeNumber("trade$bank_transfer", 8)));
-			bankTransfer.setTranferCreateTime(new Date());
 			bankTransfer.setOperateType(Type.SUP.value());
-
+            bankTransfer.setPuid(puid);
 			saveBankTransfer = bankTransferDao.save(bankTransfer);
 
 			BankTransAssociate bankTransAssociate = new BankTransAssociate();
@@ -311,7 +329,7 @@ public class BankTransferServiceImpl implements BankTransferService {
 			btaDao.save(bankTransAssociate);
 
 			orderN.setBanktfid(saveBankTransfer.getId());
-			Long userUU = SystemSession.getUser().getUserUU();
+			Long userUU = user.getUserUU();
 			orderN.setStatusPaid(userUU);
 			Set<OrderDetail> orderDetails = orderN.getOrderDetails();
 			for (OrderDetail orderDetail : orderDetails) {
@@ -327,8 +345,7 @@ public class BankTransferServiceImpl implements BankTransferService {
 			orderN.setPaytype(Type.Payment_CompanyTransfer_Code.value());
 
 			//修改采购单的状态
-			List<Purchase> purchases = purchaseDao.findByOrderid(orderN.getOrderid());
-			for (Purchase purchase : purchases) {
+			for (Purchase purchase : purchaseList) {
 				if(purchase.getStatus().intValue() == Status.TOBECONFIRMED.value()) {
 					Set<PurchaseDetail> purchaseDetails = purchase.getPurchaseDetails();
 					for (PurchaseDetail purchaseDetail : purchaseDetails) {
@@ -339,24 +356,15 @@ public class BankTransferServiceImpl implements BankTransferService {
 					purchase.setStatusPaid(userUU);
 				}
 			}
-			purchaseDao.save(purchases);
+			purchaseDao.save(purchaseList);
 			orderDao.save(orderN);
 			// 单期分期付款
 			installmentService.paidInstallment(bankTransfer, orderN.getId());
 		} else {
-			bankTransfer.setPayUseruu(SystemSession.getUser().getUserUU());
-			bankTransfer.setPayenuu(SystemSession.getUser().getEnterprise() != null ? SystemSession.getUser().getEnterprise().getUu() : null);
-			if (bankTransfer.getPayenuu() == null) {
-				bankTransfer.setDissociative(Type.PERSONAL.value());
-			} else {
-				bankTransfer.setDissociative(Type.ENTERPRISING.value());
-			}
-
 			bankTransfer.setCollectUseruu(sysConf.getAdminUU()); // 收款方 设置为应鹏账号
 			bankTransfer.setCollectenuu(sysConf.getEnUU()); // 收款方设置为B2C的uu
 
 			bankTransfer.setBanktranssn(EncodingRulesConstant.BANKTRANSFER.replace("_TIMESTAP_NUMBER", createNumberService.getTimeNumber("trade$bank_transfer", 8)));
-			bankTransfer.setTranferCreateTime(new Date());
 			bankTransfer.setOperateType(Type.MALL.value());
 
 			saveBankTransfer = bankTransferDao.save(bankTransfer);
@@ -377,14 +385,13 @@ public class BankTransferServiceImpl implements BankTransferService {
 				btaDao.save(bankTransAssociate);
 
 				orderN.setBanktfid(saveBankTransfer.getId());
-				Long userUU = SystemSession.getUser().getUserUU();
+				Long userUU = user.getUserUU();
 				orderN.setStatusPaid(userUU);
 				Set<OrderDetail> orderDetails = orderN.getOrderDetails();
 				for (OrderDetail orderDetail : orderDetails) {
 					if(orderDetail.getStatus().intValue() == Status.TOBEPAID.value()) {
 						orderDetail.setStatusPaid(userUU);
 					}
-
 				}
 				orderN.setRemitteeType(bankTransfer.getType());
 				orderN.setBuyaccount(bankTransfer.getJsonPament());
@@ -527,7 +534,7 @@ public class BankTransferServiceImpl implements BankTransferService {
 		if (StringUtils.hasText(orderId)) {
 			Order order = orderDao.findByOrderid(orderId);
 			if (order != null && order.getBuyerenuu() != null) {
-				List<BankInfo> bankInfos = bankInfoDao.findByUseruuAndEnuuAndNumAndOpraterUserTypeAndStatus(order.getBuyeruu(), order.getBuyerenuu(), 1, Type.BUYER.value(), Status.ALLOW.value());
+				List<BankInfo> bankInfos = bankInfoService.getDefaultBankInfoByuuAndStatusAndAccountType(order.getBuyeruu(), order.getBuyerenuu(), Status.ALLOW.value(), AccountType.PAY_TYPE);
 				if (!CollectionUtils.isEmpty(bankInfos)) {
 					return bankInfos.get(0);
 				}
@@ -553,7 +560,6 @@ public class BankTransferServiceImpl implements BankTransferService {
 			info.filter("operateType", type);
 			info.filter("collectenuu", SystemSession.getUser().getEnterprise().getUu());
 		}
-		info.expression(PredicateUtils.isNotNull("transferTime"));
 		filterPageInfo(info, keyword, fromDate, toDate, remitteeType);
 
 		Page<BankTransfer> pageBankTran = bankTransferDao.findAll(new Specification<BankTransfer>() {
@@ -633,7 +639,9 @@ public class BankTransferServiceImpl implements BankTransferService {
 			info.expression(PredicateUtils.lte("transferTime", new Date(toDate), false));
 		}
 		if (!StringUtils.isEmpty(remitteeType)) {
-			info.expression(PredicateUtils.eq("type", remitteeType, false));
+			if (!"ALL".equals(remitteeType)) {
+				info.expression(PredicateUtils.eq("type", remitteeType, false));
+			}
 		}
 	}
 }

+ 6 - 12
src/main/java/com/uas/platform/b2c/fa/settlement/controller/BillController.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.fa.settlement.controller;
 
 
+import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.base.model.FileUpload;
 import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.fa.settlement.model.Bill;
@@ -72,14 +73,7 @@ public class BillController {
 	@ApiOperation(value = "保存开票资料", httpMethod = "POST")
 	public Bill saveBill(@ApiParam(required = true, value = "发票信息json") String bill, @ApiParam(required = true, value = "上传的附件") FileUpload uploadItem) {
 		Bill b = FastjsonUtils.fromJson(bill, Bill.class);
-		Long useruu = SystemSession.getUser().getUserUU();
-		Long enuu = SystemSession.getUser().getEnterprise() != null ? SystemSession.getUser().getEnterprise().getUu() : null;
-        if (enuu == null) {
-            b.setDissociative(Type.PERSONAL.value());
-        } else {
-            b.setDissociative(Type.ENTERPRISING.value());
-        }
-		Bill bi = billService.save(b, uploadItem, useruu, enuu);
+		Bill bi = billService.save(b, uploadItem, null, null);
 		logger.log("发票管理", "保存发票资料","保存发票的资料信息,发票的id" + bi.getId() + ",发票开头:" + bi.getHead()+ "发票类型:" + bi.getKind()+ ",操作人:" + SystemSession.getUser().getUserUU());
 		return bi;
 	}
@@ -103,14 +97,14 @@ public class BillController {
 	}
 
 	/**
-	 * 根据当前登录信息,获取个人当前登录企业的发票列表
+	 * 根据当前登录信息,当前登录企业的发票列表
 	 *
-	 * @return 个人当前登录企业的发票列表
+	 * @return 当前登录企业的发票列表(或个人发票)
 	 */
-	@RequestMapping(value = "/list/personal", method = RequestMethod.GET)
+	@RequestMapping(value = "/list", method = RequestMethod.GET)
 	@ApiOperation(value = "根据当前登录信息,获取个人当前登录企业的发票列表", httpMethod = "GET")
 	public List<Bill> getBills() {
-		logger.log("发票管理", "根据个人uu和企业的uu,获取发票资料信息");
+		logger.log("发票管理", "当前登录企业的发票列表");
 		return billService.getBills();
 	}
 

+ 16 - 18
src/main/java/com/uas/platform/b2c/fa/settlement/dao/BillDao.java

@@ -18,14 +18,13 @@ import java.util.List;
 @Repository
 public interface BillDao extends JpaSpecificationExecutor<Bill>, JpaRepository<Bill, Long>{
 
-    /**
-     * 根据用户UU号和企业UU号获取发票列表
-     *
-     * @param useruu the useruu 个人uu
-     * @param enuu   the enuu 企业enuu
-     * @return the bill by useruu and enuu
-     */
-    public List<Bill> getBillByUseruuAndEnuu(Long useruu, Long enuu);
+	/**
+	 * 根据用户UU号和企业UU号获取发票列表
+	 *
+	 * @param enuu   the enuu 企业enuu
+	 * @return the bill by useruu and enuu
+	 */
+	List<Bill> getBillByEnuuAndDissociative(Long enuu, Integer dissociative);
 
     /**
      * 根据个人UU号和是否个人用户获取发票列表
@@ -45,15 +44,14 @@ public interface BillDao extends JpaSpecificationExecutor<Bill>, JpaRepository<B
 	 */
 	public List<Bill> getBillByUseruuAndDissociativeAndKind(Long useruu, Integer dissociative, Integer kind);
 
-    /**
-     * 根据个人UU号和企业UU号和发票类型(增值税专用 和 增值税普通)获取发票列表
-     *
-     * @param useruu the useruu 个人uu
-     * @param enuu   the enuu 企业enuu
-     * @param kind   the kind 发票类型
-     * @return the bill by useruu and enuu and kind
-     */
-    public List<Bill> getBillByUseruuAndEnuuAndKind(Long useruu, Long enuu, Integer kind);
+	/**
+	 * 根据企业UU号和发票类型(增值税专用 和 增值税普通)获取发票列表
+	 *
+	 * @param enuu   the enuu 企业enuu
+	 * @param kind   the kind 发票类型
+	 * @return the bill by useruu and enuu and kind
+	 */
+	List<Bill> getBillByEnuuAndKindAndDissociative(Long enuu, Integer kind, Integer dissociative);
 
     /**
      * 根据个人UU号和企业UU号和发票类型(增值税专用 和 增值税普通) 和是否个人用户获取发票列表
@@ -64,5 +62,5 @@ public interface BillDao extends JpaSpecificationExecutor<Bill>, JpaRepository<B
      * @return the bill by useruu and enuu and kind and dissociative
      */
     @Query("select b from Bill b where b.useruu=:useruu and b.dissociative=:dissociative and b.kind=:kind")
-	public List<Bill> getBillByUseruuAndEnuuAndKindAndDissociative(@Param("useruu") Long useruu, @Param("dissociative") Integer dissociative, @Param("kind") Integer kind);
+	public List<Bill> getBillByUseruuAndKindAndDissociative(@Param("useruu") Long useruu, @Param("dissociative") Integer dissociative, @Param("kind") Integer kind);
 }

+ 33 - 21
src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/BillServiceImpl.java

@@ -1,5 +1,6 @@
 package com.uas.platform.b2c.fa.settlement.service.impl;
 
+import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.base.model.FileUpload;
 import com.uas.platform.b2c.common.base.service.FileService;
 import com.uas.platform.b2c.core.config.SysConf;
@@ -45,8 +46,6 @@ public class BillServiceImpl implements BillService {
 
 	@Override
 	public Page<Bill> findBills(final PageInfo info, String keyword) {
-		// Long enuu = SystemSession.getUser().getEnterprise().getUu();
-		// info.filter("enuu", enuu);
 		if (StringUtils.hasText(keyword)) {
 			info.filter("orderid", keyword);
 		}
@@ -62,17 +61,27 @@ public class BillServiceImpl implements BillService {
 	public Bill save(Bill bill, FileUpload fileItem, Long useruu, Long enuu) {
 		if (bill.getId() == null) {
 			List<Bill> billList = new ArrayList<Bill>();
-			if (Type.ENTERPRISING.value() == bill.getDissociative())
-				billList = billDao.getBillByUseruuAndEnuuAndKind(useruu, enuu, bill.getKind());
-			if (Type.PERSONAL.value() == bill.getDissociative())
-				billList = billDao.getBillByUseruuAndEnuuAndKindAndDissociative(useruu, Type.PERSONAL.value(),bill.getKind());
+			User user = SystemSession.getUser();
+			Long userUu = useruu, enUU = enuu;
+			if ((enUU == null) && (user.getEnterprise() == null)) {
+				userUu = user.getUserUU();
+			}
+			if (enUU == null && userUu == null) {
+                enUU = user.getEnterprise().getUu();
+			}
+			bill.setCreateTime(new Date());
+			if (enUU == null) {
+				bill.setDissociative(Type.PERSONAL.value());
+				bill.setUseruu(userUu);
+				billList = billDao.getBillByUseruuAndKindAndDissociative(user.getUserUU(), Type.PERSONAL.value(),bill.getKind());
+			} else {
+				bill.setDissociative(Type.ENTERPRISING.value());
+				bill.setEnuu(enUU);
+				billList = billDao.getBillByEnuuAndKindAndDissociative(user.getEnterprise().getUu(), bill.getKind(), Type.ENTERPRISING.value());
+			}
 			if (billList.size() > 0) {
 				throw new IllegalOperatorException("相同类型的发票信息不能同时存在两条!");
 			}
-			bill.setCreateTime(new Date());
-			if (Type.ENTERPRISING.value() == bill.getDissociative())
-				bill.setEnuu(enuu);
-			bill.setUseruu(useruu);
 		}
 		if ((fileItem != null) && (fileItem.getFile() != null)) {
 			String attachUrl = fileService.save(fileItem);
@@ -83,9 +92,10 @@ public class BillServiceImpl implements BillService {
 
 	@Override
 	public List<Bill> getBills() {
-		Long useruu = SystemSession.getUser().getUserUU();
-		if (SystemSession.getUser().getEnterprise() != null) {
-			return billDao.getBillByUseruuAndEnuu(useruu, SystemSession.getUser().getEnterprise().getUu());
+		User user = SystemSession.getUser();
+		Long useruu = user.getUserUU();
+		if (user.getEnterprise() != null) {
+			return billDao.getBillByEnuuAndDissociative(user.getEnterprise().getUu(), Type.ENTERPRISING.value());
 		} else {
 			return billDao.getBillByUseruuAndDissociative(useruu, Type.PERSONAL.value());
 		}
@@ -108,21 +118,23 @@ public class BillServiceImpl implements BillService {
 
 	@Override
 	public List<Bill> getAdminBills() {
-		Long useruu = sysConf.getAdminUU();
-		Long enuu = sysConf.getEnUU();
-		List<Bill> billList = billDao.getBillByUseruuAndEnuu(useruu, enuu);
+		List<Bill> billList = billDao.getBillByEnuuAndDissociative(sysConf.getEnUU(), Type.ENTERPRISING.value());
 		return billList;
 	}
 
 	@Override
 	public Bill getPersonalSpecial() {
-		Long userUU = SystemSession.getUser().getUserUU();
-		Long uu = SystemSession.getUser().getEnterprise().getUu();
-		List<Bill> billByUseruuAndEnuuAndKind = billDao.getBillByUseruuAndEnuuAndKind(userUU, uu, Type.Bill_Deduct.value());
-		if(CollectionUtils.isEmpty(billByUseruuAndEnuuAndKind)) {
+		User user = SystemSession.getUser();
+		List<Bill> bills = null;
+		if (user.getEnterprise() == null) {
+			bills = billDao.getBillByUseruuAndDissociativeAndKind(user.getUserUU(), Type.PERSONAL.value(), Type.Bill_Deduct.value());
+		} else {
+			bills = billDao.getBillByEnuuAndKindAndDissociative(user.getEnterprise().getUu(), Type.Bill_Deduct.value(), Type.ENTERPRISING.value());
+		}
+		if(CollectionUtils.isEmpty(bills)) {
 			return null;
 		}else {
-			return billByUseruuAndEnuuAndKind.get(0);
+			return bills.get(0);
 		}
 	}
 }

+ 5 - 3
src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/BillSubmitServiceImpl.java

@@ -74,9 +74,11 @@ public class BillSubmitServiceImpl implements BillSubmitService {
         Long buyerEnuu = null;
         if (SystemSession.getUser().getEnterprise() != null)
             buyerEnuu = SystemSession.getUser().getEnterprise().getUu();
-
-        if ((!bill.getUseruu().equals(buyeruu)) || (buyerEnuu != null && !bill.getEnuu().equals(buyerEnuu)))
+        if ((buyerEnuu != null && !bill.getEnuu().equals(buyerEnuu))) {
+            throw new IllegalOperatorException("发票信息不属于您,请重新确认发票信息");
+        } else if((buyerEnuu == null) && !buyeruu.equals(bill.getUseruu())){
             throw new IllegalOperatorException("发票信息不属于您,请重新确认发票信息");
+        }
 
         // 获取验证订单信息
         List<String> orderidList = Arrays.asList(orderids);
@@ -188,7 +190,7 @@ public class BillSubmitServiceImpl implements BillSubmitService {
         if (CollectionUtils.isEmpty(orders)) {
             return Collections.emptyList();
         }
-        List<Bill> billOne = billDao.getBillByUseruuAndEnuuAndKind(sysConf.getAdminUU(), sysConf.getEnUU(),Type.Bill_Deduct.value());
+        List<Bill> billOne = billDao.getBillByEnuuAndKindAndDissociative(sysConf.getEnUU(),Type.Bill_Deduct.value(), Type.ENTERPRISING.value());
         if (CollectionUtils.isEmpty(billOne)) {
             throw new IllegalOperatorException("商城专票信息被删除,请联系商城管理员添加");
         }

+ 4 - 15
src/main/java/com/uas/platform/b2c/logistics/controller/AddressController.java

@@ -1,5 +1,6 @@
 package com.uas.platform.b2c.logistics.controller;
 
+import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
@@ -9,7 +10,6 @@ import com.uas.platform.b2c.logistics.service.AddressService;
 import com.uas.platform.core.logging.BufferedLoggerManager;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
-import com.uas.platform.core.model.Type;
 import com.wordnik.swagger.annotations.ApiOperation;
 import com.wordnik.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -172,11 +172,8 @@ public class AddressController {
 	@RequestMapping(value = "/enterprise/address", method = RequestMethod.GET)
 	@ApiOperation(value = "获取企业一页的地址信息", httpMethod = "GET")
 	public Page<Address> getEnterpriseAddress(@ApiParam(required = true, value = "分页参数") PageParams page) {
-		PageInfo info = new PageInfo(page);
-		info.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
-		info.filter("usetype", (short)2);
 		logger.log("地址管理", "获取一页的企业地址信息");
-		return addressService.getEnterprise(info);
+		return addressService.getEnterpriseAddress(page);
 	}
 
 	/**
@@ -189,11 +186,7 @@ public class AddressController {
 	@ApiOperation(value = "获取企业发货地址的信息", httpMethod = "GET")
 	public Page<Address> getEnterpriseSendAddress(@ApiParam(required = true, value = "分页参数") PageParams page) {
 		logger.log("地址管理", "获取一页的企业发货地址信息");
-		PageInfo info = new PageInfo(page);
-		info.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
-		info.filter("type", Type.Address_Sending_Code.value());
-		info.filter("usetype", (short)2);
-		return addressService.getEnterprise(info);
+		return addressService.getEnterpriseReceiveAddress(page, Boolean.TRUE);
 	}
 
 	/**
@@ -206,11 +199,7 @@ public class AddressController {
 	@ApiOperation(value = "获取企业收货地址信息", httpMethod = "GET")
 	public Page<Address> getEnterpriseReceiveAddress(@ApiParam(required = true, value = "分页参数") PageParams page) {
 		logger.log("地址管理", "获取一页的企业收货地址信息");
-		PageInfo info = new PageInfo(page);
-		info.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
-		info.filter("type", Type.Address_Shipping_Code.value());
-		info.filter("usetype", (short)2);
-		return addressService.getEnterprise(info);
+		return addressService.getEnterpriseReceiveAddress(page, Boolean.FALSE);
 	}
 
 	/**

+ 16 - 41
src/main/java/com/uas/platform/b2c/logistics/dao/AddressDao.java

@@ -21,24 +21,11 @@ public interface AddressDao extends JpaSpecificationExecutor<Address>, JpaReposi
 	 * 根据uu号,类型 查找收货地址
 	 *
 	 * @param useruu  the useruu 个人uu
-	 * @param enuu    the enuu 企业uu
 	 * @param type    the type 类型,发货,收货
 	 * @param usetype the usetype 使用类型,1 个人,2 企业
 	 * @return list 返回查找的address列表
 	 */
-	public List<Address> findByUseruuAndEnuuAndTypeAndUsetypeOrderByNumAsc(Long useruu, Long enuu, Integer type, Short usetype);
-
-	/**
-	 * 根据uu号,enuu为空类型 查找收货地址
-	 *
-	 * @param useruu       the useruu 个人uu
-	 * @param type         the type 类型 发货,收货
-	 * @param usetype      the usetype 使用类型,1 个人,2 企业
-	 * @param dissociative the dissociative 是否个人用户
-	 * @return list 返回查找的address列表
-	 */
-//	@Query("select a from Address a where a.useruu=:useruu and a.enuu is null and a.type=:type and a.usetype=:usetype")
-	public List<Address> findByUseruuAndTypeAndUsetypeAndDissociative(Long useruu, Integer type, Short usetype, Integer dissociative);
+	public List<Address> findByUseruuAndTypeAndUsetypeOrderByNumAsc(Long useruu, Integer type, Short usetype);
 
 	/**
 	 * 根据企业uu号,类型查询平台收货地址
@@ -48,41 +35,43 @@ public interface AddressDao extends JpaSpecificationExecutor<Address>, JpaReposi
 	 * @param usertype the usertype 使用类型
 	 * @return list 返回查找的address列表
 	 */
-	public List<Address> findByEnuuAndTypeAndUsetypeOrderByNumAsc(Long enuu, Integer type, Short usertype);
+	List<Address> findByEnuuAndTypeAndUsetypeOrderByNumAsc(Long enuu, Integer type, Short usertype);
+
 
 	/**
 	 * 根据企业uu号默认地址,类型查询平台收货地址
 	 *
-	 * @param enuu     the enuu 企业enuu
+	 * @param useruu     个人信息
 	 * @param type     the type 类型,发货,收货
 	 * @param num      the num 默认地址
 	 * @param usertype the usertype 使用类型
 	 * @return list 返回查找的address列表
 	 */
-	public List<Address> findByEnuuAndTypeAndNumAndUsetypeOrderByNumAsc(Long enuu, Integer type, Integer num, Short usertype);
+	List<Address> findByUseruuAndTypeAndNumAndUsetypeOrderByNumAsc(Long useruu, Integer type, Integer num, Short usertype);
 
 	/**
-	 * 2016年5月4日 下午8:11:30
-	 * @author yujia 获取企业的收/发货地址
+	 * 根据企业uu号默认地址,类型查询平台收货地址
 	 *
-	 * @param enuu    the enuu 企业enuu
-	 * @param usetype the usetype 使用类型
+	 * @param enuu     the enuu 企业enuu
+	 * @param type     the type 类型,发货,收货
+	 * @param num      the num 默认地址
+	 * @param usertype the usertype 使用类型
 	 * @return list 返回查找的address列表
 	 */
-	public List<Address> getByEnuuAndUsetypeOrderByNumAsc(Long enuu, Short usetype);
+	List<Address> findByEnuuAndTypeAndNumAndUsetypeOrderByNumAsc(Long enuu, Integer type, Integer num, Short usertype);
+
 
 	/**
 	 * 2016年5月25日 下午3:20:23
 	 * @author yujia  获取个人地址某种类型的个数
 	 *
-	 * @param useruu  个人uu号
 	 * @param enuu    the enuu
 	 * @param type    地址的类型
 	 * @param usetype the usetype
 	 * @return Integer 返回地址总数
 	 */
-	@Query(value="select count(*) from Address a where a.useruu=:useruu and a.enuu =:enuu and a.type=:type and a.usetype =:usetype")
-	Integer getCountByUseruuAndTypeAndUsetype(@Param("useruu") Long useruu,@Param("enuu") Long enuu, @Param("type") int type, @Param("usetype") Short usetype);
+	@Query(value="select count(1) from Address a where a.enuu =:enuu and a.type=:type and a.usetype =:usetype")
+	Integer getCountByEnuuAndTypeAndUsetype(@Param("enuu") Long enuu, @Param("type") int type, @Param("usetype") Short usetype);
 
 	/**
 	 * @author yujia  获取个人地址某种类型的个数
@@ -90,22 +79,8 @@ public interface AddressDao extends JpaSpecificationExecutor<Address>, JpaReposi
 	 * @param useruu       个人uu号
 	 * @param type         地址的类型
 	 * @param usetype      使用类型
-	 * @param dissociative 是否为个人用户
-	 * @return Integer 返回地址总数
-	 */
-	@Query(value="select count(1) from Address a where a.useruu=:useruu and a.dissociative=:dissociative and a.type=:type and a.usetype =:usetype")
-	Integer getCountByUseruuTypeUsetypeAndDissociative(@Param("useruu") Long useruu, @Param("type") int type, @Param("usetype") Short usetype, @Param("dissociative") Integer dissociative);
-
-
-	/**
-	 * 2016年5月25日 下午3:23:15
-	 * @author yujia  获取企业地址某种类型的个数
-	 *
-	 * @param enuu    企业的uu号
-	 * @param type    地址类型
-	 * @param usetype 使用类型
 	 * @return Integer 返回地址总数
 	 */
-	@Query(value = "select count(*) from Address a where a.enuu =:enuu and a.type =:type and a.usetype =:usetype")
-	Integer getCountByEnuuAndTypeAndUsetype(@Param("enuu") Long enuu, @Param("type") int type,  @Param("usetype") Short usetype);
+	@Query(value="select count(1) from Address a where a.useruu=:useruu and a.type=:type and a.usetype =:usetype")
+	Integer getCountByUseruuAndTypeAndUsetype(@Param("useruu") Long useruu, @Param("type") int type, @Param("usetype") Short usetype);
 }

+ 25 - 4
src/main/java/com/uas/platform/b2c/logistics/service/AddressService.java

@@ -1,11 +1,15 @@
 package com.uas.platform.b2c.logistics.service;
 
-import java.util.List;
-
-import org.springframework.data.domain.Page;
-
 import com.uas.platform.b2c.logistics.model.Address;
 import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import com.wordnik.swagger.annotations.ApiOperation;
+import com.wordnik.swagger.annotations.ApiParam;
+import org.springframework.data.domain.Page;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
 
 /**
  * The interface AddressService.
@@ -97,6 +101,23 @@ public interface AddressService {
 	 */
 	public Page<Address> getEnterprise(final PageInfo info);
 
+
+	/**
+	 * @author yujia  获取企业一页的地址信息
+	 *
+	 * @param page 一页的参数
+	 * @return Page 返回Address的page对象
+	 */
+	Page<Address> getEnterpriseAddress(PageParams page);
+
+	/**
+	 * 获取企业收货地址信息
+	 *
+	 * @param page the page 一页的参数
+	 * @return Page 返回Address的page对象
+	 */
+	Page<Address> getEnterpriseReceiveAddress(PageParams page, Boolean send);
+
 	/**
 	 * 2016年5月20日 下午6:38:48
 	 * 获取企业的默认账户

+ 80 - 59
src/main/java/com/uas/platform/b2c/logistics/service/impl/AddressServiceImpl.java

@@ -2,12 +2,14 @@ package com.uas.platform.b2c.logistics.service.impl;
 
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.core.config.SysConf;
+import com.uas.platform.b2c.core.constant.ShortConstant;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.logistics.dao.AddressDao;
 import com.uas.platform.b2c.logistics.model.Address;
 import com.uas.platform.b2c.logistics.service.AddressService;
 import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.model.Type;
 import com.uas.platform.core.persistence.criteria.CriterionExpression;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
@@ -42,7 +44,7 @@ public class AddressServiceImpl implements AddressService {
 			int type = address.getType();
 			short usertype = address.getUsetype();
 			if(usertype == 1) {//个人地址信息
-				addresses = addressDao.findByUseruuAndEnuuAndTypeAndUsetypeOrderByNumAsc(address.getUseruu(), address.getEnuu(), type, (short)1);
+				addresses = addressDao.findByUseruuAndTypeAndUsetypeOrderByNumAsc(address.getUseruu(), type, (short)1);
 			}else {//企业的地址信息
 				addresses = addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(address.getEnuu(), type, (short)2);
 			}
@@ -75,8 +77,9 @@ public class AddressServiceImpl implements AddressService {
 		Long useruu = address.getUseruu();
 		int type = address.getType();
 		List<Address> addresses = null;
-		if (Type.Address_Shipping_Code.value() == address.getType()) {
-			addresses = addressDao.findByUseruuAndEnuuAndTypeAndUsetypeOrderByNumAsc(useruu, address.getEnuu(), type, (short)1);
+		if (address.getUsetype().equals(ShortConstant.YES_SHORT)) {
+			//个人账户
+			addresses = addressDao.findByUseruuAndTypeAndUsetypeOrderByNumAsc(useruu, type, (short)1);
 		} else {
 			addresses = addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(address.getEnuu(), type, (short)2);
 		}
@@ -129,29 +132,20 @@ public class AddressServiceImpl implements AddressService {
 	@Override
 	public Address saveShippingAddress(Address address, Boolean isSetTop, Boolean send, Boolean isPersonal) {
 		if(address.getId() == null) { //默认的只要是已经保存过的地址,就不能再变更地址类型。
-			if (send) {
-				address.setTypeSending();
-			} else {
-				address.setTypeShipping();
-			}
+			Integer type = send ? Type.Address_Sending_Code.value() : Type.Address_Shipping_Code.value();
+			address.setType(type);
 			Integer num = 0;
 			User user = SystemSession.getUser();
-			if(isPersonal) {
-				address.setUseruu(user.getUserUU());
+			address.setUseruu(user.getUserUU());
+			if (user.getEnterprise() == null) {
 				address.setUsetype((short)1);
-				address.setEnuu(user.getEnterprise() != null ? user.getEnterprise().getUu() : null);
-				if (address.getEnuu() != null) {
-                    address.setDissociative(Type.ENTERPRISING.value());
-					num =addressDao.getCountByUseruuAndTypeAndUsetype(user.getUserUU(), user.getEnterprise().getUu(), address.getType(), address.getUsetype());
-				} else {
-					address.setDissociative(Type.PERSONAL.value());
-					num =addressDao.getCountByUseruuTypeUsetypeAndDissociative(user.getUserUU(),address.getType(), address.getUsetype(), Type.PERSONAL.value());
-				}
-			}else {
-				address.setUseruu(user.getUserUU());
+				address.setDissociative(Type.PERSONAL.value());
+				num =addressDao.getCountByUseruuAndTypeAndUsetype(user.getUserUU(), address.getType(), address.getUsetype());
+			} else {
 				address.setEnuu(user.getEnterprise().getUu());
+				address.setDissociative(Type.ENTERPRISING.value());
 				address.setUsetype((short)2);
-				num = addressDao.getCountByEnuuAndTypeAndUsetype(user.getEnterprise().getUu(), address.getType(), address.getUsetype());
+				num =addressDao.getCountByEnuuAndTypeAndUsetype(user.getEnterprise().getUu(), address.getType(), address.getUsetype());
 			}
 			address.setNum(num == 0 ? 1 : ++num);
 		}
@@ -172,18 +166,11 @@ public class AddressServiceImpl implements AddressService {
 	@Override
 	public List<Address> findShipingAdd(Long useruu, Boolean send, Long enuu) {
 		List<Address> address = new ArrayList<Address>();
-		if (send) {
-			if (enuu != null) {
-				address = addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(enuu, Type.Address_Sending_Code.value(), (short)2);
-			} else {
-				address = addressDao.findByUseruuAndTypeAndUsetypeAndDissociative(useruu, Type.Address_Sending_Code.value(), (short)2, Type.PERSONAL.value());
-			}
+		Integer type = send ? Type.Address_Sending_Code.value() :Type.Address_Shipping_Code.value();
+		if (enuu != null) {
+			address = addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(enuu, type, Address.USE_TYPE.Enterprise.getValue());
 		} else {
-			if (enuu != null) {
-				address = addressDao.findByUseruuAndEnuuAndTypeAndUsetypeOrderByNumAsc(useruu, enuu, Type.Address_Shipping_Code.value(), (short) 1);
-			} else {
-				address = addressDao.findByUseruuAndTypeAndUsetypeAndDissociative(useruu, Type.Address_Shipping_Code.value(), (short)1, Type.PERSONAL.value());
-			}
+			address = addressDao.findByUseruuAndTypeAndUsetypeOrderByNumAsc(useruu, type, Address.USE_TYPE.Personal.getValue());
 		}
 		return address;
 	}
@@ -195,10 +182,12 @@ public class AddressServiceImpl implements AddressService {
 
 	@Override
 	public List<Address> findEnShippingAdd(boolean ship) {
-		if(ship) {
-			return addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(SystemSession.getUser().getEnterprise().getUu(), Type.Address_Shipping_Code.value(), (short)2);
-		}else {
-			return addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(SystemSession.getUser().getEnterprise().getUu(), Type.Address_Sending_Code.value(), (short)2);
+		Integer type = ship ? Type.Address_Shipping_Code.value() : Type.Address_Sending_Code.value();
+		User user = SystemSession.getUser();
+		if (user.getEnterprise() == null) {
+			return addressDao.findByUseruuAndTypeAndUsetypeOrderByNumAsc(user.getUserUU(), type, (short)1);
+		} else {
+			return addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(user.getEnterprise().getUu(), type, (short)2);
 		}
 		
 	}
@@ -218,11 +207,27 @@ public class AddressServiceImpl implements AddressService {
 	@Override
 	public List<Address> findB2cAdd(boolean send) {
 		// boo判断查询的是收货地址还是发货地址(默认收货地址)
-		if (send) {
-			return addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(sysConf.getEnUU(), Type.Address_Sending_Code.value(), (short)2);
+		Integer type = send ? Type.Address_Sending_Code.value() : Type.Address_Shipping_Code.value();
+		return addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(sysConf.getEnUU(), type, (short)2);
+	}
+
+	/**
+	 * @param page 一页的参数
+	 * @return Page 返回Address的page对象
+	 * @author yujia  获取企业一页的地址信息
+	 */
+	@Override
+	public Page<Address> getEnterpriseAddress(PageParams page) {
+		PageInfo info = new PageInfo(page);
+		User user = SystemSession.getUser();
+		if (user.getEnterprise() == null) {
+			info.filter("enuu", user.getEnterprise().getUu());
+			info.filter("usetype", (short)2);
 		} else {
-			return addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(sysConf.getEnUU(), Type.Address_Shipping_Code.value(), (short)2);
+			info.filter("enuu", user.getUserUU());
+			info.filter("usetype", (short)1);
 		}
+		return getEnterprise(info);
 	}
 
 	@Override
@@ -237,15 +242,40 @@ public class AddressServiceImpl implements AddressService {
 		}, info);
 	}
 
+	/**
+	 * 获取企业收货地址信息
+	 *
+	 * @param page the page 一页的参数
+	 * @return Page 返回Address的page对象
+	 */
+	@Override
+	public Page<Address> getEnterpriseReceiveAddress(PageParams page, Boolean send) {
+		PageInfo info = new PageInfo(page);
+		if (send) {
+			info.filter("type", Type.Address_Sending_Code.value());
+		} else {
+			info.filter("type", Type.Address_Shipping_Code.value());
+		}
+		User user = SystemSession.getUser();
+		if (user.getEnterprise() != null) {
+			info.filter("enuu", user.getEnterprise().getUu());
+			info.filter("usetype", Address.USE_TYPE.Enterprise.getValue());
+		} else {
+			info.filter("useruu", SystemSession.getUser().getUserUU());
+			info.filter("usetype", Address.USE_TYPE.Personal.getValue());
+		}
+		return getEnterprise(info);
+	}
+
 	@Override
 	public List<Address> findDefaultEnterpriseAddress(boolean bool) {
 		// boo判断查询的是收货地址还是发货地址(默认收货地址)
-		if (bool) {
-			return addressDao.findByEnuuAndTypeAndNumAndUsetypeOrderByNumAsc(SystemSession.getUser().getEnterprise().getUu(),
-					Type.Address_Shipping_Code.value(), (int) Constant.YES, (short)2);
+		User user = SystemSession.getUser();
+		Integer type = bool ? Type.Address_Shipping_Code.value() : Type.Address_Sending_Code.value();
+		if (user.getEnterprise() == null) {
+			return addressDao.findByUseruuAndTypeAndNumAndUsetypeOrderByNumAsc(user.getEnterprise().getUu(), type, (int) Constant.YES, (short)1);
 		} else {
-			return addressDao.findByEnuuAndTypeAndNumAndUsetypeOrderByNumAsc(SystemSession.getUser().getEnterprise().getUu(),
-					Type.Address_Sending_Code.value(), (int) Constant.YES, (short)2);
+			return addressDao.findByEnuuAndTypeAndNumAndUsetypeOrderByNumAsc(user.getUserUU(), type, (int) Constant.YES, (short)2);
 		}
 	}
 
@@ -257,23 +287,14 @@ public class AddressServiceImpl implements AddressService {
 		// 设置where条件
 		Long userUU = SystemSession.getUser().getUserUU();
 		Long enUU = SystemSession.getUser().getEnterprise() != null ? SystemSession.getUser().getEnterprise().getUu() : null;
-		if (isSend) {
-			pageInfo.expression(new SimpleExpression("type", Type.Address_Sending_Code.value(), CriterionExpression.Operator.EQ));
-            if (enUU != null) {
-                pageInfo.expression(new SimpleExpression("enuu", enUU, CriterionExpression.Operator.EQ));
-            } else {
-                pageInfo.expression(new SimpleExpression("dissociative", Type.PERSONAL.value(), CriterionExpression.Operator.EQ));
-            }
-			pageInfo.expression(new SimpleExpression("usetype", (short)2, CriterionExpression.Operator.EQ));
+		Integer type = isSend ? Type.Address_Sending_Code.value() : Type.Address_Shipping_Code.value();
+		pageInfo.expression(new SimpleExpression("type", type, CriterionExpression.Operator.EQ));
+		if (enUU != null) {
+			pageInfo.expression(new SimpleExpression("enuu", enUU, CriterionExpression.Operator.EQ));
+			pageInfo.expression(new SimpleExpression("usetype", Address.USE_TYPE.Enterprise.getValue(), CriterionExpression.Operator.EQ));
 		} else {
-			pageInfo.expression(new SimpleExpression("type", Type.Address_Shipping_Code.value(), CriterionExpression.Operator.EQ));
+			pageInfo.expression(new SimpleExpression("usetype", Address.USE_TYPE.Personal.getValue(), CriterionExpression.Operator.EQ));
 			pageInfo.expression(new SimpleExpression("useruu", userUU, CriterionExpression.Operator.EQ));
-			if (enUU != null) {
-				pageInfo.expression(new SimpleExpression("enuu", enUU, CriterionExpression.Operator.EQ));
-			} else {
-				pageInfo.expression(new SimpleExpression("dissociative", Type.PERSONAL.value(), CriterionExpression.Operator.EQ));
-			}
-			pageInfo.expression(new SimpleExpression("usetype", (short)1, CriterionExpression.Operator.EQ));
 		}
 		// 获取查询数据
 		return addressDao.findAll(new Specification<Address>() {

+ 10 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/controller/ProductController.java

@@ -420,4 +420,14 @@ public class ProductController {
 	public ResultMap updateProduct(@RequestBody String json, String attachUrl){
 		return productService.updateProduct(json, attachUrl);
 	}
+
+	/**
+	 * 根据关键字匹配器件型号,获取物料信息
+	 * @param keyword
+	 * @return
+	 */
+	@RequestMapping(value = "/keyword", method = RequestMethod.GET)
+	public List<Product> getProductsByKeyword(String keyword) {
+		return new ArrayList<>();
+	}
 }

+ 41 - 0
src/main/java/com/uas/platform/b2c/prod/product/common/api/CommonCountController.java

@@ -2,6 +2,9 @@ package com.uas.platform.b2c.prod.product.common.api;
 
 import com.uas.platform.b2c.prod.product.common.model.CommonCount;
 import com.uas.platform.b2c.prod.product.common.service.CommonCountService;
+import com.uas.platform.b2c.prod.store.model.StoreStatus;
+import com.uas.platform.b2c.prod.store.service.StoreInService;
+import com.uas.platform.b2c.trade.vendor.service.VendorIntroductionService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -10,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -24,6 +28,12 @@ public class CommonCountController {
     @Autowired
     private CommonCountService commonCountService;
 
+    @Autowired
+    private VendorIntroductionService vendorIntroductionService;
+
+    @Autowired
+    private StoreInService storeInService;
+
     /**
      * 获取已激活的通用计数器
      * @return
@@ -73,4 +83,35 @@ public class CommonCountController {
         return result;
     }
 
+    /**
+     * 获取B2C首页悬浮框的计数器
+     * @return
+     */
+    @RequestMapping(method = RequestMethod.GET)
+    public List<CommonCount> findActivedCount() {
+        List<CommonCount> commonCounts = new ArrayList<>();
+        List<CommonCount> indexCounts = commonCountService.findByStatus((short) 1, "b2c_index" );
+        commonCounts.addAll(indexCounts);
+
+        Integer storeCount = storeInService.countByStatus(StoreStatus.OPENED);
+        CommonCount storeCounts = new CommonCount();
+        storeCounts.setItem("店铺");
+        storeCounts.setCount(Double.valueOf(storeCount));
+        storeCounts.setUsedFor("b2c_index");
+        storeCounts.setDetno((short) 4);
+        commonCounts.add(storeCounts);
+
+        Integer enCount = vendorIntroductionService.getVendorCount();
+        CommonCount vendorCounts = new CommonCount();
+        vendorCounts.setItem("供应商");
+        vendorCounts.setDetno((short) 2);
+        vendorCounts.setUsedFor("mall_home_banner");
+        vendorCounts.setCount(Double.valueOf(enCount));
+        commonCounts.add(vendorCounts);
+
+        List<CommonCount> bannerCounts = commonCountService.findByStatus((short) 1, "mall_home_banner" );
+        commonCounts.addAll(bannerCounts);
+        return commonCounts;
+    }
+
 }

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/product/component/service/impl/ComponentServiceImpl.java

@@ -470,7 +470,7 @@ public class ComponentServiceImpl implements ComponentService {
 		}
 		params.setPage(page);
 
-		ModelMap map = searchServiceMap.searchComponentGoods(keyword, params, request);//.searchComponent(keyword, params);
+		ModelMap map = searchServiceMap.searchComponentGoods(keyword, params, "", request);//.searchComponent(keyword, params);
 		// 能让用户查看的只能是Constant.PAGEMAX * params.getCount(),防止爬虫
 		int total = ((Integer)map.get("total")).intValue();
 		int expose = total;

+ 9 - 0
src/main/java/com/uas/platform/b2c/prod/store/dao/StoreInDao.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.prod.store.dao;
 
 import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.b2c.prod.store.model.StoreStatus;
 import com.uas.platform.b2c.prod.store.model.StoreType;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
@@ -91,4 +92,12 @@ public interface StoreInDao extends JpaSpecificationExecutor<StoreIn>, JpaReposi
 			" from trade$goods g group by go_storeid ) a right join store$info i " +
 			" on a.go_storeid=i.ST_UUID where i.ST_TYPE ='ORIGINAL_FACTORY' order by m DESC")
 	List<StoreIn> findOriginalStoreIn();
+
+	/**
+	 * 根据店铺状态查询数量
+	 *
+	 * @param status 店铺状态
+	 * @return
+	 */
+    Integer countByStatus(StoreStatus status);
 }

+ 7 - 7
src/main/java/com/uas/platform/b2c/prod/store/facade/StoreApplyFacade.java

@@ -30,13 +30,13 @@ public interface StoreApplyFacade {
 	ResultMap confirmOpenStore(String uuid, StoreApply storeApply);
 
 
-	/**
-	 * 自动确认开铺
-	 *
-	 * @param uuid			店铺申请信息编号
-	 * @param storeApply	更新的店铺信息
-	 */
-	ResultMap autoConfirmOpenStore(String uuid, StoreApply storeApply);
+//	/**
+//	 * 自动确认开铺
+//	 *
+//	 * @param uuid			店铺申请信息编号
+//	 * @param storeApply	更新的店铺信息
+//	 */
+//	ResultMap autoConfirmOpenStore(String uuid, StoreApply storeApply);
 
 	/**
 	 * 保存店铺申请信息

+ 20 - 79
src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreApplyFacadeImpl.java

@@ -43,6 +43,13 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 
 	@Override
 	public ResultMap handlerApply(String uuid, StoreApply.ApplyStatus status, StoreApply apply) {
+		// 通过uuid找到店铺申请信息
+		Date date = new Date();
+		StoreApply storeApply = storeApplyService.findByUuid(uuid);
+		User user = SystemSession.getUser();
+		if (user == null || user.getEnterprise() == null) {
+			return new ResultMap(CodeType.NOT_PERMIT, "请进行用户登录操作");
+		}
 		// 验证参数合法性
 		if (StringUtils.isEmpty(uuid) || status == null) {
 			return new ResultMap(CodeType.NO_INFO, "店铺申请UUID或状态信息不存在");
@@ -53,18 +60,6 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 		if (apply == null) {
 			return new ResultMap(CodeType.NO_INFO, "店铺申请信息不能为空");
 		}
-
-		Date date = new Date();
-		StoreApply storeApply = storeApplyService.findByUuid(uuid);
-
-		User user = SystemSession.getUser();
-		if (user == null || user.getEnterprise() == null) {
-			return new ResultMap(CodeType.NOT_PERMIT, "请进行用户登录操作");
-		}
-		storeApply.setAuthPerson(user.getUserName());
-		storeApply.setAuthTime(date);
-		storeApply.setStatus(status);
-
 		// 检测资质信息
 		if (StoreApply.ApplyStatus.PASS == status) {
 			// TODO 检测企业信息以及品牌信息
@@ -101,23 +96,29 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 			}
 			storeApply.setReason(null);
 		}
-
 		if (StoreApply.ApplyStatus.UNPASS == status) {
 			if (StringUtils.isEmpty(apply.getReason())) {
 				return new ResultMap(CodeType.NO_INFO, "审核不通过后,不通过原因不能为空");
 			}
 			storeApply.setReason(apply.getReason());
 		}
-
+		// 保存审核时的审核人信息和是否通过状态
+		storeApply.setAuthPerson(user.getUserName());
+		storeApply.setAuthTime(date);
+		storeApply.setStatus(status);
 		// 保存审核时的企业信息
 		storeApply.setEnType(apply.getEnType());
 		storeApply.setEnQualification(apply.getEnQualification());
 		storeApply.setBrands(apply.getBrands());
-
-		storeApplyService.handlerApply(storeApply);
-		//自动确认开通店铺;
-		if (StoreApply.ApplyStatus.PASS == status) {
-			this.autoConfirmOpenStore(uuid, storeApply);
+		// 不通过保存申请信息,通过则进行自动确认开通店铺操作
+		if (StoreApply.ApplyStatus.UNPASS == status) {
+			storeApplyService.handlerApply(storeApply);
+		} else {
+			storeApply.setBannerUrl("http://dfs.ubtob.com/group1/M00/19/BF/CgpkyFlSBRmAcascAANK5vkByag940.jpg");
+			storeApply.setLogoUrl("https://dfs.ubtob.com/group1/M00/88/4D/CgpkyFrMEHeAbmFgAAAVUSwA8go871.png");
+			StoreApply savedApply = storeApplyService.handlerApply(storeApply);
+			StoreIn storeIn = storeService.createByStoreApplyAndSave(savedApply);
+			return ResultMap.success(storeIn.getUuid());
 		}
 		return ResultMap.success(null);
 	}
@@ -177,66 +178,6 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 		return ResultMap.success(storeIn.getUuid());
 	}
 
-
-
-	public ResultMap autoConfirmOpenStore(String uuid, StoreApply storeApply) {
-		Date date = new Date();
-		// 验证
-		if (StringUtils.isEmpty(uuid) || storeApply == null) {
-			return new ResultMap(CodeType.NO_INFO, "开铺申请和编号信息不能为空");
-		}
-		storeApply.setBannerUrl("http://dfs.ubtob.com/group1/M00/19/BF/CgpkyFlSBRmAcascAANK5vkByag940.jpg");
-		storeApply.setLogoUrl("https://dfs.ubtob.com/group1/M00/88/4D/CgpkyFrMEHeAbmFgAAAVUSwA8go871.png");
-		if ( StringUtils.isEmpty(storeApply.getLogoUrl())
-				|| StringUtils.isEmpty(storeApply.getBannerUrl())) {
-			return new ResultMap(CodeType.NOT_COMPLETE_INFO, "LOGO或横幅广告不能为空");
-		}
-		// 更新店铺申请信息
-		StoreApply apply = storeApplyService.findByUuid(uuid);
-		if (apply == null) {
-			return new ResultMap(CodeType.NOT_EXiST, "该店铺申请信息不存在");
-		}
-		if (StringUtils.hasText(storeApply.getStoreUuid())) {
-			apply.setStoreUuid(storeApply.getStoreUuid().toLowerCase());
-		}
-		apply.setLogoUrl(storeApply.getLogoUrl());
-		apply.setBannerUrl(storeApply.getBannerUrl());
-/*		if (storeApply.getEnterprise() != null) {
-			EnterpriseSimple enterprise = apply.getEnterprise();
-			enterprise.setEnUrl(storeApply.getEnterprise().getEnUrl());
-			enterprise.setAddress(storeApply.getEnterprise().getAddress());
-			enterprise.setEnTel(storeApply.getEnterprise().getEnTel());
-			enterprise.setEnFax(storeApply.getEnterprise().getEnFax());
-			// 更新企业信息JSON字符串
-			apply.setEnterprise(enterprise);
-		}
-
-		User user  = SystemSession.getUser();
-		if (user == null || user.getEnterprise() == null) {
-			return new ResultMap(CodeType.ERROR_STATE, "用户没有登录或账户信息异常");
-		}
-
-		// 添加资质信息
-		List<Qualification> qualifications = storeApply.getQualifications();
-		List<Qualification> existQualifications = apply.getQualifications();
-		for (Qualification qualification : qualifications) {
-			qualification.setEnUU(user.getEnterprise().getUu());
-			qualification.setUploaderUU(user.getUserUU());
-			qualification.setCreateTime(date);
-			qualification.setUpdateTime(date);
-			existQualifications.add(qualification);
-		}
-		// 更新资质信息JSON字符串
-		apply.setQualifications(existQualifications);*/
-		User user  = SystemSession.getUser();
-		if (user == null || user.getEnterprise() == null) {
-			return new ResultMap(CodeType.ERROR_STATE, "用户没有登录或账户信息异常");
-		}
-		storeApply = storeApplyService.handlerApply(apply);
-		StoreIn storeIn = storeService.createByStoreApplyAndSave(storeApply);
-		return ResultMap.success(storeIn.getUuid());
-	}
-
 	@Override
 	public ResultMap saveUpdateOfApply(String uuid, StoreApply apply) {
 		// 验证参数合法性

+ 22 - 8
src/main/java/com/uas/platform/b2c/prod/store/service/StoreInService.java

@@ -2,20 +2,17 @@ package com.uas.platform.b2c.prod.store.service;
 
 import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2c.advertise.ad.model.StoreAdsType;
-import com.uas.platform.b2c.prod.store.model.Qualification;
-import com.uas.platform.b2c.prod.store.model.StoreApply;
-import com.uas.platform.b2c.prod.store.model.StoreIn;
-import com.uas.platform.b2c.prod.store.model.StoreStatus;
-import com.uas.platform.b2c.prod.store.model.StoreType;
+import com.uas.platform.b2c.prod.store.model.*;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+
+import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import javax.servlet.http.HttpServletRequest;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
 
 public interface StoreInService {
 
@@ -166,6 +163,16 @@ public interface StoreInService {
 	 */
 	Page<StoreIn> getStorePage(PageInfo pageInfo, String keyword, StoreType storeType);
 
+
+	/**
+	 * 根据关键词和店铺类型获取店铺信息
+	 * @param pageInfo  分页参数
+	 * @param keyword  关键词
+	 * @param storeTypes  店铺类型 多个时 以,隔开
+	 * @return
+	 */
+	Page<StoreIn> getStorePageByStoreTypes(PageInfo pageInfo, String keyword, String storeTypes);
+
 	/**
 	 * 当管理员推荐店铺的时候,保存店铺的广告信息
 	 *
@@ -216,4 +223,11 @@ public interface StoreInService {
 	 * @return
 	 */
 	ResultMap findPCBStoreByEnuu(Long enuu);
+
+	/**
+	 * 根据店铺状态查询数量
+	 * @param status  店铺状态
+	 * @return
+	 */
+	Integer countByStatus(StoreStatus status);
 }

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreApplyServiceImpl.java

@@ -196,7 +196,7 @@ public class StoreApplyServiceImpl implements StoreApplyService {
 	}
 
 	@Override
-	@Transactional
+	@Transactional(rollbackFor = Exception.class)
 	public StoreApply handlerApply(StoreApply shopApply) {
 		if (shopApply == null || StringUtils.isEmpty(shopApply.getUuid()) || shopApply.getId() == null) {
 			return null;

+ 62 - 27
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java

@@ -26,13 +26,7 @@ import com.uas.platform.b2c.prod.store.dao.StoreApplyDao;
 import com.uas.platform.b2c.prod.store.dao.StoreBrandInfoDao;
 import com.uas.platform.b2c.prod.store.dao.StoreInDao;
 import com.uas.platform.b2c.prod.store.exception.EmptyParameterException;
-import com.uas.platform.b2c.prod.store.model.EnterpriseSimple;
-import com.uas.platform.b2c.prod.store.model.Qualification;
-import com.uas.platform.b2c.prod.store.model.StoreApply;
-import com.uas.platform.b2c.prod.store.model.StoreBrandInfo;
-import com.uas.platform.b2c.prod.store.model.StoreIn;
-import com.uas.platform.b2c.prod.store.model.StoreStatus;
-import com.uas.platform.b2c.prod.store.model.StoreType;
+import com.uas.platform.b2c.prod.store.model.*;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
 import com.uas.platform.b2c.trade.order.dao.PurchaseDao;
 import com.uas.platform.b2c.trade.support.ResultMap;
@@ -44,22 +38,6 @@ import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.persistence.criteria.LogicalExpression;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import javax.servlet.http.HttpServletRequest;
 import org.apache.commons.collections.CollectionUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -75,6 +53,13 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.ui.ModelMap;
 import org.springframework.util.StringUtils;
 
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
 /**
  * 店铺业务实现类
  *
@@ -136,7 +121,7 @@ public class StoreInServiceImpl implements StoreInService {
 	}
 
 	@Override
-	@Transactional
+	@Transactional(rollbackFor = Exception.class)
 	public StoreIn createByStoreApplyAndSave(StoreApply storeApply) {
 		if (storeApply == null || storeApply.getEnUU() == null) {
 			return null;
@@ -683,6 +668,45 @@ public class StoreInServiceImpl implements StoreInService {
 		}, pageInfo);
 	}
 
+	/**
+	 * 根据关键词和店铺类型获取店铺信息
+	 *
+	 * @param pageInfo   分页参数
+	 * @param keyword    关键词
+	 * @param storeTypes 店铺类型 多个时 以,隔开
+	 * @return 店铺分页信息
+	 */
+	@Override
+	public Page<StoreIn> getStorePageByStoreTypes(PageInfo pageInfo, String keyword, String storeTypes) {
+		if (StringUtils.hasText(keyword)){
+			pageInfo.expression(PredicateUtils.like("storeName", keyword, false));
+		}
+		if (StringUtils.hasText(storeTypes)){
+			List<StoreType> storeTypeList = new ArrayList<>();
+			if (storeTypes.contains(StoreType.AGENCY.toString())) {
+				storeTypeList.add(StoreType.AGENCY);
+			}
+			if (storeTypes.contains(StoreType.DISTRIBUTION.toString())) {
+				storeTypeList.add(StoreType.DISTRIBUTION);
+			}
+			if (storeTypes.contains(StoreType.ORIGINAL_FACTORY.toString())) {
+				storeTypeList.add(StoreType.ORIGINAL_FACTORY);
+			}
+			if (storeTypes.contains(StoreType.CONSIGNMENT.toString())) {
+				storeTypeList.add(StoreType.CONSIGNMENT);
+			}
+			pageInfo.expression(PredicateUtils.in("type", storeTypeList, false));
+		}
+
+		return storeDao.findAll(new Specification<StoreIn>() {
+			@Override
+			public Predicate toPredicate(Root<StoreIn> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
+				criteriaQuery.where(pageInfo.getPredicates(root, criteriaQuery, criteriaBuilder));
+				return null;
+			}
+		}, pageInfo);
+	}
+
 	/**
 	 * 获取店铺的联系信息
 	 *
@@ -737,7 +761,7 @@ public class StoreInServiceImpl implements StoreInService {
             switch (field) {
                 // 搜索型号
                 case CODE_FIELD :
-                    map = searcherService.searchComponentGoods(keyword, pageParams, request);
+                    map = searcherService.searchComponentGoods(keyword, pageParams, type.replace("-",","),request);
                     List<Goods> goodsList = (List<Goods>) ((Map) map.get("stock")).get("content");
                     if (CollectionUtils.isNotEmpty(goodsList)) {
                         for (Goods goods : goodsList) {
@@ -748,7 +772,7 @@ public class StoreInServiceImpl implements StoreInService {
                     }
                     break;
                 case KIND_FIELD :
-                    map = searcherService.getEnterpriseBySearchKind(keyword, pageParams);
+                    map = searcherService.getEnterpriseBySearchKind(keyword, pageParams, type.replace("-",","));
                     List<VendorIntroduction> vendorIntroductions = (List<VendorIntroduction>) ((HashMap) map.get("stock")).get("content");
                     if (CollectionUtils.isNotEmpty(vendorIntroductions)) {
                         for (VendorIntroduction vendorIntroduction : vendorIntroductions) {
@@ -759,7 +783,7 @@ public class StoreInServiceImpl implements StoreInService {
                     }
                     break;
                 case BRAND_FIELD :
-                    map = searcherService.getEnterpriseBySearchBrand(keyword, pageParams);
+                    map = searcherService.getEnterpriseBySearchBrand(keyword, pageParams, type.replace("-",","));
                     List<VendorIntroduction> vendorIntroductionsByBrand = (List<VendorIntroduction>) ((HashMap) map.get("stock")).get("content");
                     if (CollectionUtils.isNotEmpty(vendorIntroductionsByBrand)) {
                         for (VendorIntroduction vendorIntroduction : vendorIntroductionsByBrand) {
@@ -810,4 +834,15 @@ public class StoreInServiceImpl implements StoreInService {
 		Integer pcbCount = pcbDao.CountPCBProuductByEnuu(enuu) > 0 ? 1 : 0;
 		return ResultMap.success(pcbCount);
 	}
+
+	/**
+	 * 根据店铺状态查询数量
+	 *
+	 * @param status 店铺状态
+	 * @return
+	 */
+	@Override
+	public Integer countByStatus(StoreStatus status) {
+		return storeDao.countByStatus(status);
+	}
 }

+ 4 - 4
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java

@@ -875,11 +875,11 @@ public class OrderServiceImpl implements OrderService {
             if (order.getInvoiceid() != null && order.getInvoicetype() == Type.Bill_NoDeduct.value()){ //发票为普票
                 //将普票类型修改为专票
                 List<Bill> billOne;
-                if (SystemSession.getUser().getEnterprise() != null){
-                    billOne = billDao.getBillByUseruuAndEnuuAndKind(SystemSession.getUser().getUserUU(),
-                            SystemSession.getUser().getEnterprise().getUu(), Type.Bill_Deduct.value());
+                User user = SystemSession.getUser();
+                if (user.getEnterprise() != null){
+                    billOne = billDao.getBillByEnuuAndKindAndDissociative(user.getEnterprise().getUu(), Type.Bill_Deduct.value(), Type.ENTERPRISING.value());
                 }else {
-                    billOne = billDao.getBillByUseruuAndDissociativeAndKind(SystemSession.getUser().getUserUU(),
+                    billOne = billDao.getBillByUseruuAndDissociativeAndKind(user.getUserUU(),
                             Type.PERSONAL.value(), Type.Bill_Deduct.value());
                 }
                 if (CollectionUtils.isEmpty(billOne)){

+ 1 - 1
src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java

@@ -405,7 +405,7 @@ public class PurchaseServiceImpl implements PurchaseService {
 			} else {
 				purchase.setJsonAddress(FastjsonUtils.toJson(addresss.get(0)));
 			}
-			List<Bill> billOne = billDao.getBillByUseruuAndEnuuAndKind(sysConf.getAdminUU(), sysConf.getEnUU(),Type.Bill_Deduct.value());
+			List<Bill> billOne = billDao.getBillByEnuuAndKindAndDissociative(sysConf.getEnUU(),Type.Bill_Deduct.value(), Type.ENTERPRISING.value());
 //			List<BillInfo> billInfos = billInfoDao.getBillByUseruuAndEnuuAndKind(sysConf.getAdminUU(), sysConf.getEnUU(), Type.Bill_Deduct.value());
 			if(CollectionUtils.isEmpty(billOne)) {
 				throw new IllegalOperatorException("优软商城的专用发票信息不存在,请联系商城客服");

+ 6 - 0
src/main/java/com/uas/platform/b2c/trade/vendor/service/VendorIntroductionService.java

@@ -54,4 +54,10 @@ public interface VendorIntroductionService {
      * @return
      */
     Page<Enterprise> getRecommendVendor(Pageable pageable);
+
+    /**
+     * 获取有效供应商数量
+     * @return 数量信息
+     */
+    Integer getVendorCount();
 }

+ 16 - 2
src/main/java/com/uas/platform/b2c/trade/vendor/service/impl/VendorIntroductionServiceImpl.java

@@ -174,6 +174,20 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 		return new Page<>(pageable.getPageNumber(), pageable.getPageSize(), enterprises, enterprises.size() * pageable.getPageNumber());
 	}
 
+	/**
+	 * 获取有效供应商数量
+	 *
+	 * @return 数量信息
+	 */
+	@Override
+	public Integer getVendorCount() {
+		Long enUU = 0L;
+		if (null != SystemSession.getUser() && null != SystemSession.getUser().getEnterprise()) {
+			enUU = SystemSession.getUser().getEnterprise().getUu();
+		}
+		return getTotalCount(enUU, null, null);
+	}
+
 	/**
 	 * 获取供应商资源信息
 	 * @param enUU 本企业UU
@@ -241,7 +255,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 				" and en_name not like '%test%' and (length(en_businesscode) > 12 or en_name like '%香港%' or en_name like '%HONG KONG%' " +
 				" or en_area like '%香港%')and (en_name not REGEXP '^[0-9]*$' and (en_name like '%ltd%' or en_name like '%limited%' or " +
 				" en_name like '%tcl%' or en_name not regexp '[\\u4e00-\\u9fa5_a-zA-Z0-9]') ) and ");
-		if (StringUtils.isEmpty(productCondition)) {
+		if (StringUtils.isEmpty(productCondition) && !StringUtils.isEmpty(enterpriseCondition)) {
 			enCountSql.append(enterpriseCondition).append(" and ");
 		}
 		enCountSql.append(" en_uu <> ").append(enUU).append(") e ");
@@ -270,7 +284,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 				" en_name like '%tcl%' or en_name not regexp '[\\u4e00-\\u9fa5_a-zA-Z0-9]')) and ").append(enterpriseCondition).append(" and en_uu <> ").append(enUU)
 				.append(") e");
 		if (!StringUtils.isEmpty(productCondition)) {
-			enUUSql.append(" right join ( select pr_enuu from products where ").append(productCondition).append(") p on pr_enuu = en_uu ");
+			enUUSql.append(" inner join ( select pr_enuu from products where ").append(productCondition).append(") p on pr_enuu = en_uu ");
 		}
 		return enUUSql.toString();
 	}

BIN
src/main/resources/jxls-tpl/trade/releaseByBatch-person.xls


BIN
src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls


+ 51 - 10
src/main/webapp/resources/js/admin/controllers/checkMoney/SettlementCtrl.js

@@ -133,15 +133,45 @@ define(['app/app'], function(app) {
 
 		//平台应付账号
 		var getAdminAccount = function() {
-			bankInfoService.getAdminEnterAccount('', function(data) {
-				$scope.b2cAccountInfos = resolveData(data);
-				angular.forEach($scope.b2cAccountInfos, function(b2cAccountInfos) {
-					b2cAccountInfos.filterAccount = b2cAccountInfos.number;
-				});
-				$scope.b2cAccount = getOriginalData($scope.b2cAccountInfos);
-			}, function(res) {
-				toaster.pop('error', '错误', '获取卖家信息失败');
-			});
+			// bankInfoService.getBuyPersonalBank({count: 1000, page: 1, sorting: {"num":"ASC"},type: 'buyer'}, function(data) {
+			// 	$scope.b2cAccountInfos = data;
+			// 	console.log($scope.b2cAccountInfos)
+			// 	angular.forEach($scope.b2cAccountInfos.content, function(b2cAccountInfos) {
+			// 		b2cAccountInfos.filterAccount = b2cAccountInfos.number;
+			// 	});
+			// 	// $scope.b2cAccount = getOriginalData($scope.b2cAccountInfos);
+       //  $scope.b2cAccount = $scope.b2cAccountInfos.content[0]
+			// 	console.log($scope.b2cAccount)
+			// }, function(res) {
+			// 	toaster.pop('error', '错误', '获取卖家信息失败');
+			// });
+      $scope.bankInfoTableParams = new ngTableParams({
+        page : 1,
+        count : 5,
+        sorting : {
+          num : 'ASC'
+        }
+      },{
+        total : 0,
+        getData : function ($defer, params) {
+          var param = BaseService.parseParams(params.url());
+          param.type = 'buyer'
+          bankInfoService.getBuyPersonalBank(param, {}, function(data) {
+            $scope.accounts = data.content;
+            angular.forEach($scope.accounts, function(account) {
+              account.filterAccount = hideBankFilter(account.number);
+              if (account.num === 1) {
+                $scope.b2cAccount = account
+              }
+            })
+            $scope.totalElements = data.totalElements;
+            params.total(data.totalElements);
+            $defer.resolve(data.content);
+          }, function(response) {
+            toaster.pop('error', '获取账户信息失败 '+ response.data);
+          })
+        }
+      });
 		};
 		getAdminAccount();
 
@@ -214,8 +244,9 @@ define(['app/app'], function(app) {
 			});
 
 			modalInstance.result.then(function(account) {
+        account.accountType = 'PAY_TYPE'
 				//企业账户
-				bankInfoService.saveAdminEnteAccount({}, account, function(data) {
+				bankInfoService.saveBuyPersonalBank({}, account, function(data) {
 					toaster.pop('success', '保存成功','信息已保存');
 					$scope.kind = account.kind;
 					getAdminAccount();
@@ -240,6 +271,16 @@ define(['app/app'], function(app) {
 			}
 		};
 
+    $scope.setDefaultAccount = function(id) {
+    	// var id = account.id
+      bankInfoService.setDefaultAccount({id : id}, function() {
+        toaster.pop('success', '设置成功');
+        getAdminAccount();
+      }, function(response) {
+        toaster.pop('error', '设置默认账户失败');
+      })
+    }
+
 		//expose代表展开的状态,isBuyd代表当前操作的数据
 		$scope.doExpose = function(expose, isVender) {
 			if(isVender) {

+ 70 - 30
src/main/webapp/resources/js/admin/controllers/checkMoney/creditCardAdminCtrl.js

@@ -1,21 +1,22 @@
 define(['app/app'], function(app) {
 	'use strict';
-	app.register.controller('creditCardAdminCtrl', ['$scope', 'toaster', 'BaseService', 'bankInfoService', '$filter', '$modal', function($scope, toaster, BaseService, bankInfoService, $filter, $modal) {
+	app.register.controller('creditCardAdminCtrl', ['$scope', 'toaster', 'BaseService', 'bankInfoService', '$filter', '$modal', 'ngTableParams', '$upload', function($scope, toaster, BaseService, bankInfoService, $filter, $modal, ngTableParams, $upload) {
 		BaseService.scrollBackToTop();
 		
 		var hideBankFilter = $filter("hideBankFilter");
 		
 		$scope.active = "personal";
+        $scope.param = {};
 		
 		var getState = function() {
-			var method = "getAdminEnterAccount";
+			var method = "getSaleEeterpriseBank";
 			switch($scope.active) {
 				case "personal" :
-					method = "getAdminPersAccount"; break;
+					method = "getBuyPersonalBank"; break;
 				case "enterprise":
-					method = "getAdminEnterAccount"; break;
+					method = "getSaleEeterpriseBank"; break;
 					default :
-						method = "getAdminEnterAccount";
+						method = "getSaleEeterpriseBank";
 			}
 			return method;
 		}
@@ -24,36 +25,55 @@ define(['app/app'], function(app) {
 			var method = null;
 			switch(kind) {
 			case "personal":
-				method = "saveAdminPerAccount"; break;
+				method = "saveBuyPersonalBank"; break;
 			case "enterprise": 
-				method = "saveAdminEnteAccount"; break;
+				method = "saveBuyEnterpriseBank"; break;
 			}
 			return method;
 		}
 		
 		$scope.setActive = function(status) {
 			$scope.active = status;
-			loadAccount();
+            loadAccountData();
 		}
 		
 		$scope.kind = 0;
-		
-		var loadAccount = function() {
-			bankInfoService[getState()]({}, function(data) {
-				$scope.accounts = data;
-				angular.forEach($scope.accounts, function(account) {
-					account.filterAccount = hideBankFilter(account.number);
-				})
-			}, function(response) {
-				toaster.pop('error', '获取账户信息失败 '+ response.data);
-			})
-		}
-		loadAccount();
-		
+
+        $scope.bankInfoTableParams = new ngTableParams({
+            page : 1,
+            count : 10,
+            sorting : {
+                num : 'ASC'
+            }
+        },{
+            total : 0,
+            getData : function ($defer, params) {
+                var param = BaseService.parseParams(params.url());
+                bankInfoService[getState()](param, {}, function(data) {
+                    $scope.accounts = data.content;
+                    angular.forEach($scope.accounts, function(account) {
+                        account.filterAccount = hideBankFilter(account.number);
+                    })
+
+                    $scope.totalElements = data.totalElements;
+                    params.total(data.totalElements);
+                    $defer.resolve(data.content);
+                }, function(response) {
+                    toaster.pop('error', '获取账户信息失败 '+ response.data);
+                })
+			}
+        });
+
+        var loadAccountData = function() {
+            $scope.bankInfoTableParams.page(1);
+            $scope.bankInfoTableParams.reload();
+        };
+        loadAccountData();
+
 		$scope.setDefaultAccount = function(id) {
 			bankInfoService.setDefaultAccount({id : id}, function() {
 				toaster.pop('success', '设置成功');
-				loadAccount();
+                loadAccountData();
 			}, function(response) {
 				toaster.pop('error', '设置默认账户失败');
 			})
@@ -65,7 +85,7 @@ define(['app/app'], function(app) {
 			if(isSure){
 				bankInfoService.deleteBank({id: buyAccount.id}, function(data) {
 					toaster.pop('success', '删除成功');
-					loadAccount();
+                    loadAccountData();
 				}, function(response) {
 					toaster.pop('error', '删除失败');
 				})
@@ -94,13 +114,33 @@ define(['app/app'], function(app) {
 					toaster.pop("info", "没有设置对应的账户类型,不能保存");
 					return ;
 				}
-				bankInfoService[method].call(null, account, function(data) {
-					toaster.pop('success', '保存成功','信息已更新');
-					$scope.kind = account.kind;
-					loadAccount();
-				}, function(res) {
-					toaster.pop('error', '错误', res.data);
-				});
+				account.accountType = $scope.active === 'personal' ? 'PAY_TYPE' : 'RECEIVE_TYPE';
+                if($scope.active === 'personal') {
+                    bankInfoService[method].call(null, account, function(data) {
+                        toaster.pop('success', '保存成功','信息已更新');
+                        $scope.kind = account.kind;
+                        loadAccountData();
+                    }, function(res) {
+                        toaster.pop('error', '错误', res.data);
+                    });
+				} else {
+                    $upload.upload({
+                        url : 'trade/bankInfo/save/enterprise',
+                        method: 'POST',
+                        params : {type : 'sup'},
+                        data: {
+                            bankInfo: account
+                        }
+                    }).success(function(data){
+                        if(data){
+                            account = {};
+                            toaster.pop('success', '保存成功');
+                            loadAccountData();
+                        }
+                    }).error(function(err){
+                        toaster.pop('error', err || "保存账户信息失败");
+                    });
+				}
 			});
 		};
 		

+ 27 - 3
src/main/webapp/resources/js/common/controllers/commonCtrls.js

@@ -69,8 +69,8 @@ define([ 'app/app' ], function(app) {
 	}]);
 
 	// 身份认证
-	app.controller('AuthenticationCtrl', ['$scope', '$window', 'AuthenticationService', '$rootScope', 'SessionService', 'collectionService', '$modal', 'toaster','$q', 'Cart',
-		function($scope, $window, AuthenticationService, $rootScope, SessionService, collectionService, $modal, toaster, $q, Cart) {
+	app.controller('AuthenticationCtrl', ['$scope', '$window', 'AuthenticationService', '$rootScope', 'SessionService', 'collectionService', '$modal', 'toaster','$q', 'Cart', '$http',
+		function($scope, $window, AuthenticationService, $rootScope, SessionService, collectionService, $modal, toaster, $q, Cart, $http) {
 			$scope.user = {
 				j_username : "",
 				j_password : "",
@@ -120,10 +120,34 @@ define([ 'app/app' ], function(app) {
                     location.href = './';
 				});
 			};
-
+      var Ajax={
+        get: function(url, fn) {
+          // XMLHttpRequest对象用于在后台与服务器交换数据
+          var xhr = new XMLHttpRequest();
+          xhr.open('GET', url, false);
+          xhr.onreadystatechange = function() {
+            // readyState == 4说明请求已完成
+            if (xhr.readyState == 4 && xhr.status == 200 || xhr.status == 304) {
+              // 从服务器获得数据
+              fn.call(this, xhr.responseText);
+            }
+          };
+          xhr.send();
+        }
+      }
 			// 是否已经登录
 			$scope.isAuthed = AuthenticationService.isAuthed();
 			$scope.userInfo = {};
+      Ajax.get('/user/authentication',function(data) {
+        $scope.userInfo = data
+			})
+			// $http({
+			// 	method: 'get',
+			// 	url: '/user/authentication',
+       //  dataType: 'json',
+			// }).success(function(data) {
+       //  $scope.userInfo = data
+			// })
 
 			// 获取已登录的用户信息
 			var getAuthentication = function() {

+ 1 - 1
src/main/webapp/resources/js/common/query/bankInfo.js

@@ -99,7 +99,7 @@ define(['ngResource'], function(ngResource) {
 			// saveBuyEnterpriseBank : {
 			// 	url : 'trade/bankInfo/save/enterprise',
 			// 	method : 'POST',
-			// 	params : {type : 'buyer'}
+			// 	params : {type : 'sup'}
 			// },
 
 			//保存商城的企业账户

+ 1 - 1
src/main/webapp/resources/js/common/query/bankTransfer.js

@@ -53,7 +53,7 @@ define(['ngResource'], function(ngResource) {
 				}
 			},
 			getTotalTransferMoney: {
-				url: '/trade/transfer/vendor/bankTransfer/ledger',
+				url: 'trade/transfer/vendor/bankTransfer/ledger',
 				method: 'GET',
 				params: {
 					type: 'sup'

+ 1 - 1
src/main/webapp/resources/js/common/query/bill.js

@@ -15,7 +15,7 @@ define([ 'ngResource' ], function() {
 				method : 'POST'
 			},
 			getListPersonal : {
-				url : 'trade/bill/list/personal',
+				url : 'trade/bill/list',
 				method : 'GET',
 				isArray : 'true'
 			},

+ 4 - 3
src/main/webapp/resources/js/sso/controllers/ssoAddressCtrl.js

@@ -63,7 +63,7 @@ define(['app/app'], function (app) {
                     getData : function ($defer, params) {
                         var param = BaseService.parseParams(params.url());
                         param.isSend = false;
-                        ShippingAddress.pageAddressOfUser(param, {}, function (page) {
+                        ShippingAddress.getShipEnterprise(param, {}, function (page) {
                             $scope.isBiggerFive = false;
                             $scope.total = page.totalElements;
                             params.total(page.totalElements);
@@ -182,10 +182,11 @@ define(['app/app'], function (app) {
                     ShippingAddress.save({
                         isSetTop: $scope.isSetTop,
                         send: $scope.isSendType,
-                        isPersonal: !$scope.isSendType
+                        isPersonal: $scope.isSendType
                     }, address, function () {
                         toaster.pop('success', '成功 ', '保存收货地址成功');
                         $scope.loadAddresses();
+                        $scope.newAddr = {};
                     }, function (res) {
                         toaster.pop('error', '保存收货地址失败 ', res.data);
                     });
@@ -321,7 +322,7 @@ define(['app/app'], function (app) {
                         ShippingAddress.save({
                             isSetTop: $scope.isSetTop,
                             send: $scope.isSendType,
-                            isPersonal: !$scope.isSendType
+                            isPersonal: $scope.isSendType
                         }, address, function (data) {
                             toaster.pop('success', '成功 ', '保存收货地址成功');
                             $modalInstance.close(data);

+ 2 - 1
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_transfer_ctrl.js

@@ -728,7 +728,8 @@ define([ 'app/app' ], function(app) {
 			transfer.imgUrl = str;
 			transfer.type = $scope.type;
 			// transfer.transferTime = $scope.transferTime.getTime();
-			transfer.total = $scope.$$bankTransfer.total;
+			// transfer.total = $scope.$$bankTransfer.total;
+			transfer.total = tmpPrice || $scope.$$bankTransfer.total;
             transfer.pricesArr = $scope.diliverPrice.join(',');
 			bankTransferService.saveTransfer({order: $scope.orderNum.split(',').join('-')}, transfer, function(data) {
 				toaster.pop('success', '提交成功');

+ 4 - 3
src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js

@@ -896,10 +896,11 @@ define(['app/app'], function(app) {
 					if (addr) {
 						$scope.sendAddress[index] = address;
 					}else {
-						$scope.sendAddress.push(address);
+            $scope.loadShippingAddress();
+						// $scope.sendAddress.push(address);
 					}
 				}
-				$scope.selectAdd(address);
+				// $scope.selectAdd(address);
 			}, function(){
 				toaster.pop('info', '提示 ' + '您已取消收货地址的编辑');
 			});
@@ -1100,7 +1101,7 @@ define(['app/app'], function(app) {
 			address.area = strAres;
 
 			// send属性 控制本地址是否是发货地址
-			ShippingAddress.save({isSetTop: $scope.isSetTop, send: false, isPersonal: true}, address, function(data){
+			ShippingAddress.save({isSetTop: $scope.isSetTop, send: false, isPersonal: false}, address, function(data){
 				toaster.pop('success', '成功 ', '保存收货地址成功');
 				data.isSetTop = $scope.isSetTop;
 				$modalInstance.close(data);

+ 16 - 10
src/main/webapp/resources/js/usercenter/controllers/forstore/pay_center_ctrl.js

@@ -44,16 +44,20 @@ define(['app/app'], function(app) {
 
 		$scope.param = {};
 
-		$scope.currency = 'ALL';
+		$scope.currency = 'RMB';
 
 		$scope.paytype = 'ALL';
 
-		// 交易方式
-		$scope.remitteeType = 'ALL';
-
-		// 时间域选择
-		$scope.dateArea = 'ALL';
+        var init = function () {
+            // 交易方式
+            $scope.remitteeType = 'PAIDTOPLATFORM';
 
+            // 时间域选择
+            $scope.dateArea = 'oneMonth';
+            var currentTime = _getClearDay(new Date());
+            $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
+            $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+        }
 		/**
 		 * 使用ngTable 获取支付记录信息
 		 */
@@ -266,13 +270,13 @@ define(['app/app'], function(app) {
 					$scope.startDate = null;
 					$scope.endDate = null;
 				} else if (val == 'oneMonth') {
-					$scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
+					$scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
 					$scope.endDate = endDate;
 				} else if (val == 'threeMonth') {
-					$scope.startDate = new Date(currentTime - 3 * 30 * 24 * 60 * 60 * 1000);
+					$scope.startDate = new Date(currentTime - 3 * 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
 					$scope.endDate = endDate;
 				} else if (val == 'sixMonth') {
-					$scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000);
+					$scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
 					$scope.endDate = endDate;
 				} else {
 					$scope.startDate = null;
@@ -342,6 +346,7 @@ define(['app/app'], function(app) {
 					break;
 			}
 		};
+		init();
 		loadData();
 
 		$scope.search = function () {
@@ -803,7 +808,7 @@ define(['app/app'], function(app) {
 
         $scope.confirm = function() {
             var account = $scope.account;
-
+          account.accountType = 'PAY_TYPE'
             if (!account){
                 toaster.pop('error', '请按要求填写正确的信息');
                 return ;
@@ -819,6 +824,7 @@ define(['app/app'], function(app) {
             }
 
             var method = 'saveBuyPersonalBank'; //不区分个人和企业账户
+			$scope.account.accountType = 'PAY_TYPE';
             bankInfoService[method].call(null, null, $scope.account, function(data) {
                 if (data) {
                     $scope.showAddFrame = false;

+ 119 - 63
src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js

@@ -19,6 +19,7 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
           $rootScope.ShaRETimer = {}
 
           var clearSeekStatus = function () {
+            // if ($scope.seekListData) {}
             angular.forEach($scope.seekListData.content, function (item) {
               item.$status = 0;
             })
@@ -29,21 +30,87 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
             } else {
                 $scope.tab = 'waitOffer';
             }
+            var _formatDate = function (date, fmt) {
+                if (!date) {
+                    return null;
+                }
+                if (typeof date === 'string') {
+                    date = new Date(Date.parse(date.replace(/-/g, '/')));
+                }
+                var o = {
+                    'M+': date.getMonth() + 1, // 月份
+                    'd+': date.getDate(), // 日
+                    'h+': date.getHours(), // 小时
+                    'm+': date.getMinutes(), // 分
+                    's+': date.getSeconds(), // 秒
+                    'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+                    'S': date.getMilliseconds() // 毫秒
+                }
+                if (/(y+)/.test(fmt)) {
+                    fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+                }
+                for (var k in o) {
+                    if (new RegExp('(' + k + ')').test(fmt)) {
+                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
+                    }
+                }
+                return fmt;
+            }
+
+            var _getClearDay = function (date) {
+                return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
+            }
+            var init = function () {
+                // 发布时间
+                $scope.dateArea = 'sevenDay';
+                var currentTime = _getClearDay(new Date());
+                $scope.startDate = new Date(currentTime - 6 * 24 * 60 * 60 * 1000);
+                $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+            }
+            init()
+
           // 更换待报价状态
-          $scope.vendorType = 'all'
+          $scope.vendorType = 'self'
           $scope.onVendorTypeChange = function () {
             $scope.keyword = '';
-            $scope.startDate = null;
-            $scope.endDate = null;
             $scope.seekPurchaseTableParams.page(1);
             $scope.seekPurchaseTableParams.reload();
           }
+            $scope.setFilters = function (type, val, flag) {
+                $scope[type] = val;
+                if (type == 'dateArea') {
+                    // 时间筛选
+                    var currentTime = _getClearDay(new Date());
+                    var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+                    if (val == 'ALL' || val == 'autoDay') {
+                        $scope.startDate = null;
+                        $scope.endDate = null;
+                    } else if (val == 'oneDay') {
+                        $scope.startDate = new Date(currentTime);
+                        $scope.endDate = endDate;
+                    } else if (val == 'threeDay') {
+                        $scope.startDate = new Date(currentTime - 2 * 24 * 60 * 60 * 1000);
+                        $scope.endDate = endDate;
+                    } else if (val == 'sevenDay') {
+                        $scope.startDate = new Date(currentTime - 6 * 24 * 60 * 60 * 1000);
+                        $scope.endDate = endDate;
+                    } else {
+                        $scope.startDate = null;
+                        $scope.endDate = null;
+                    }
+                }
+                if (flag) return
+                $scope.seekPurchaseTableParams.page(1);
+                $scope.seekPurchaseTableParams.reload();
+            }
+            $scope.setFilters('dateArea', 'sevenDay', '1')
+
           seekPurchase.getSeekUrl({}, function(data) {
             var seekUrl = data.url;
             //   var seekUrl = 'http://10.1.51.82:24002';
             /*$scope.tab = 'waitOffer';*/
             $scope.toogleTab = function (tab) {
-              $scope.vendorType = 'all'
+              $scope.vendorType = 'self'
                 $scope.tab = tab;
               $scope.seekPurchaseTableParams = new ngTableParams({
                 page: 1,
@@ -72,7 +139,7 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                         ? $scope.startDate.getTime() : null;
                     param.endDate = $scope.endDate ? $scope.endDate.getTime()
                         : null;
-                    param.overdue = $scope.vendorType === 'all' ? '' : ($scope.vendorType === 'self' ? '0' : '1')
+                    param.overdue = $scope.vendorType === 'self' ? '0' : '1'
                     $http({
                       method: 'get',
                       dataType: 'json',
@@ -90,7 +157,6 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                         //     }
                         // }
                       $scope.seekListData = data;
-                      console.log($scope.seekListData)
                     }).error(function (response) {
                       toaster.pop('error', response);
                     });
@@ -106,7 +172,7 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                         ? $scope.startDate.getTime() : null;
                     param.endDate = $scope.endDate ? $scope.endDate.getTime()
                         : null;
-                    param.overdue = $scope.vendorType === 'all' ? '' : ($scope.vendorType === 'self' ? '0' : '1')
+                    param.overdue =$scope.vendorType === 'self' ? '0' : '1'
                     $http({
                       method: 'get',
                       dataType: 'json',
@@ -539,6 +605,7 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
           }
           // 采纳报价
           $scope.adopt = function (of) {
+            $scope.showCurrentRefuseOffer = false;
             $http({
                 headers:{
                     'content-Type':'application/x-www-form-urlencoded'
@@ -654,65 +721,54 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
             deadlineOpen: false
           };
           // 打开日期选择框
-          $scope.openDatePicker = function ($event, item, openParam, status) {
-            if (status != null) {
-              if (status == 1) {
-                if ($scope.startDate != null) {
-                  return;
-                }
-              }
-              if (status == 2) {
-                if ($scope.endDate != null) {
-                  return;
-                }
-              }
-            }
-            $event.preventDefault();
-            $event.stopPropagation();
-            for (var key in item) {
-              item[key] = false;
-            }
-            item[openParam] = !item[openParam];
-          };
-          $scope.changeEndDate = function () {
-            if ($scope.condition.endDateOpen) {
-              $scope.endDate = $scope.endDate.toString().replace(
-                  /[0-9]{2}:[0-9]{2}:[0-9]{2}/g, '23:59:59');//;'23.59';//DateUtil.yyyyMmDd($scope.endDate.getTime() + 86399000);
-              $scope.endDate = new Date(
-                  formatDateTime(new Date($scope.endDate.toString())));
-            }
-            $scope.vaildDate(false);
-          };
-          $scope.vaildDate = function (isStart) {
-            if ($scope.endDate !== null && $scope.startDate > $scope.endDate) {
-              if (isStart) {
-                alert("开始日期大于结束日期,请重新输入!");
-                $scope.startDate = null;
-              } else {
-                alert("开始日期大于结束日期,请重新输入!");
-                $scope.endDate = null;
-              }
-            }
-          };
-          var formatDateTime = function (date) {
-            var y = date.getFullYear();
-            var m = date.getMonth() + 1;
-            m = m < 10 ? ('0' + m) : m;
-            var d = date.getDate();
-            d = d < 10 ? ('0' + d) : d;
-            var h = 23;
-            var minute = 59;
-            var sec = 59;
-            //minute = minute < 10 ? ('0' + minute) : minute;
-            return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + sec;
+              $scope.condition = [];
+              var start = {
+                  open : false
+              };
+              var end = {
+                  open : false
+              };
+              $scope.condition.push(start);
+              $scope.condition.push(end);
+              $scope.condition.push({open : false});
+          $scope.openDatePicker = function ($event, item, openParam) {
+              $event.preventDefault();
+              $event.stopPropagation();
+              openParam === 0 ? $scope.condition[1].open = false : $scope.condition[0].open = false;
+              item[openParam].open = !item[openParam].open;
           };
           // 选择查找日期
-          $scope.onDateCondition = function () {
-            $scope.param.page = 1;
-            $scope.orderTableParams.page(1);
-            $scope.orderTableParams.reload();
+          $scope.onDateCondition = function (bool) {
+              var startTime = $scope.startDate ? $scope.startDate.getTime() : null;
+              var endTime = $scope.endDate ? $scope.endDate.getTime() : null;
+              if (startTime && endTime && startTime > endTime) {
+                  if (bool == 1) {
+                      toaster.pop('info', '起始时间不能大于结束时间');
+                      $scope.startDate = null;
+                  } else {
+                      toaster.pop('info', '结束时间不能小于起始时间');
+                      $scope.endDate = null;
+                  }
+              }
+              if ($scope.endDate && bool == 2) {
+                  $scope.endDate = new Date($scope.endDate.getFullYear(), $scope.endDate.getMonth(), $scope.endDate.getDate())
+                  $scope.endDate = new Date($scope.endDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+              }
+                $scope.seekPurchaseTableParams.page(1);
+                $scope.seekPurchaseTableParams.reload();
           };
-
+              var formatDateTime = function (date) {
+                  var y = date.getFullYear();
+                  var m = date.getMonth() + 1;
+                  m = m < 10 ? ('0' + m) : m;
+                  var d = date.getDate();
+                  d = d < 10 ? ('0' + d) : d;
+                  var h = 23;
+                  var minute = 59;
+                  var sec = 59;
+                  //minute = minute < 10 ? ('0' + minute) : minute;
+                  return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + sec;
+              };
           /*获取时间戳代表的天数*/
           $scope.getDay = function (timeStamp) {
             return Math.floor(timeStamp / (1000 * 60 * 60 * 24));

+ 21 - 13
src/main/webapp/resources/js/vendor/controllers/forstore/pay_center_ctrl.js

@@ -24,11 +24,16 @@ define(['app/app'], function(app) {
         $scope.paytype = 'ALL';
         $scope.$$transfer = {};
 
-        // 交易方式
-        $scope.remitteeType = 'ALL';
-
-        // 时间域选择
-        $scope.dateArea = 'ALL';
+        var init = function () {
+            // 交易方式
+            $scope.remitteeType = 'PLATFORMPAIDTOVENDOR';
+
+            // 时间域选择
+            $scope.dateArea = 'oneMonth';
+            var currentTime = _getClearDay(new Date());
+            $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
+            $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+        }
 
         var getTransferMoney = function () {
             bankTransferService.getTotalTransferMoney({}, function (data) {
@@ -63,7 +68,7 @@ define(['app/app'], function(app) {
                     if ($scope.endDate){
                         param.toDate = $scope.endDate.getTime();
                     }
-                    if ($scope.remitteeType && $scope.remitteeType !== 'ALL') {
+                    if ($scope.remitteeType) {
                         param.remitteeType = $scope.remitteeType;
                     }
                     bankTransferService.getVendorBankTransferByMall(param, function (page) {
@@ -147,7 +152,6 @@ define(['app/app'], function(app) {
                 getTradeRecordInfo();
             }
         };
-        loadHistory();
 
         var clearRecordParams = function () {
             $scope.keyword = null;
@@ -181,11 +185,14 @@ define(['app/app'], function(app) {
                 }
             }
             return fmt;
-        }
+        };
 
         var _getClearDay = function (date) {
             return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
-        }
+        };
+
+        init();
+        loadHistory();
 
         $scope.setFilters = function (type, val) {
             $scope[type] = val;
@@ -197,13 +204,13 @@ define(['app/app'], function(app) {
                     $scope.startDate = null;
                     $scope.endDate = null;
                 } else if (val == 'oneMonth') {
-                    $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
+                    $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
                     $scope.endDate = endDate;
                 } else if (val == 'threeMonth') {
-                    $scope.startDate = new Date(currentTime - 3 * 30 * 24 * 60 * 60 * 1000);
+                    $scope.startDate = new Date(currentTime - 3 * 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
                     $scope.endDate = endDate;
                 } else if (val == 'sixMonth') {
-                    $scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000);
+                    $scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
                     $scope.endDate = endDate;
                 } else {
                     $scope.startDate = null;
@@ -237,6 +244,7 @@ define(['app/app'], function(app) {
                     break;
             }
         };
+        init();
         loadData();
 
         //切换tab方法
@@ -463,7 +471,7 @@ define(['app/app'], function(app) {
 
         $scope.ensureAddAccount = function () {
             var account = $scope.account;
-
+          account.accountType = 'RECEIVE_TYPE'
             if (!account){
                 toaster.pop('error', '请按要求填写正确的信息');
                 return ;

+ 193 - 66
src/main/webapp/resources/js/vendor/controllers/forstore/purchase_offer_ctrl.js

@@ -4,6 +4,52 @@ define(['app/app'], function(app) {
         $rootScope.active = 'vendor_seek_purchase';
         $scope.seekPurchaseRate = {};
         $scope.offer = {};
+        var _formatDate = function (date, fmt) {
+            if (!date) {
+                return null;
+            }
+            if (typeof date === 'string') {
+                date = new Date(Date.parse(date.replace(/-/g, '/')));
+            }
+            var o = {
+                'M+': date.getMonth() + 1, // 月份
+                'd+': date.getDate(), // 日
+                'h+': date.getHours(), // 小时
+                'm+': date.getMinutes(), // 分
+                's+': date.getSeconds(), // 秒
+                'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+                'S': date.getMilliseconds() // 毫秒
+            }
+            if (/(y+)/.test(fmt)) {
+                fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+            }
+            for (var k in o) {
+                if (new RegExp('(' + k + ')').test(fmt)) {
+                    fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
+                }
+            }
+            return fmt;
+        }
+
+        var _getClearDay = function (date) {
+            return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
+        }
+
+        var init = function () {
+            // 求购选择
+            $scope.vendorType = 'all';
+            // 发布时间
+            $scope.dateArea = 'sevenDay';
+            // 求购时间
+            $scope.dateAreaSeek = 'sevenDay';
+            var currentTime = _getClearDay(new Date());
+            $scope.startDate = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
+            $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+            $scope.startDelivery = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
+            $scope.endDelivery = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+        }
+        init();
+
       seekPurchase.getSeekUrl({}, function(data) {
         var seekUrl = data.url;
         //   var seekUrl = 'http://10.1.51.82:24002';
@@ -16,15 +62,16 @@ define(['app/app'], function(app) {
             getData : function ($defer, params) {
                 var param = BaseService.parseParams(params.url());
                 var filter = {};
+                filter.userUU = $scope.vendorType === 'self' ? $scope.userInfo.userUU : null;
                 filter.vendUU = $scope.userInfo.enterprise.uu;
                 // param.enUU = $scope.userInfo.enterprise.uu;
                 // param.deadline = $scope.deadline;
                 // param.status = $scope.status;
                 filter.keyword = $scope.keyWord;
-                filter.fromDate = $scope.startDate
-                  ? $scope.startDate.getTime() : null;
-                filter.endDate = $scope.endDate ? $scope.endDate.getTime()
-                  : null;
+                filter.fromDate = $scope.startDate ? $scope.startDate.getTime() : null;
+                filter.endDate = $scope.endDate ? $scope.endDate.getTime() : null;
+                filter.fromDelivery = $scope.startDelivery ? $scope.startDelivery .getTime() : null;
+                filter.endDelivery = $scope.endDelivery ? $scope.endDelivery .getTime() : null;
                 param._state = "done";
                 param.overdue = 1;
                 param.filter = filter;
@@ -58,68 +105,148 @@ define(['app/app'], function(app) {
 
         $scope.condition = {endDateOpen:false, startDateOpen: false};
 
-        $scope.openDatePicker = function ($event, item, openParam,status) {
-            if (status != null) {
-                if (status == 1) {
-                    if ($scope.startDate != null) {
-                        return;
-                    }
-                }
-                if (status == 2) {
-                    if ($scope.endDate != null) {
-                        return;
-                    }
-                }
-            }
-            $event.preventDefault();
-            $event.stopPropagation();
-            item[openParam] = !item[openParam];
-            if (openParam == 'startDateOpen') {
-                if (item['endDateOpen']) {
-                    item['endDateOpen'] = !item['endDateOpen'];
-                }
-            } else if (openParam == 'endDateOpen') {
-                if (item['startDateOpen']){
-                    item['startDateOpen'] = !item['startDateOpen'];
-                }
-            }
-        };
-        $scope.changeEndDate = function () {
-            if ($scope.condition.endDateOpen) {
-                $scope.endDate = $scope.endDate.toString().replace(/[0-9]{2}:[0-9]{2}:[0-9]{2}/g, '23:59:59');//;'23.59';//DateUtil.yyyyMmDd($scope.endDate.getTime() + 86399000);
-                $scope.endDate = new Date(formatDateTime(new Date($scope.endDate.toString())));
-            }
-            $scope.vaildDate(false);
-        };
-        $scope.vaildDate = function (isStart) {
-            if ($scope.endDate !== null && $scope.startDate>$scope.endDate){
-                if (isStart) {
-                    alert("开始日期大于结束日期,请重新输入!");
-                    $scope.startDate = null;
-                } else {
-                    alert("开始日期大于结束日期,请重新输入!");
-                    $scope.endDate = null;
-                }
-            }
-        };
-        var formatDateTime = function (date) {
-            var y = date.getFullYear();
-            var m = date.getMonth() + 1;
-            m = m < 10 ? ('0' + m) : m;
-            var d = date.getDate();
-            d = d < 10 ? ('0' + d) : d;
-            var h = date.getHours();
-            var minute = date.getMinutes();
-            var sec = date.getSeconds();
-            minute = minute < 10 ? ('0' + minute) : minute;
-            return y + '-' + m + '-' + d+' '+h+':'+minute+':'+sec;
-        };
-        // 选择查找日期
-        $scope.onDateCondition = function () {
-            $scope.param.page = 1;
-            $scope.orderTableParams.page(1);
-            $scope.orderTableParams.reload();
-        };
+          // 打开日期选择框
+          $scope.condition = [];
+          var start = {
+              open : false,
+              open1: false
+          };
+          var end = {
+              open : false,
+              open1: false
+          };
+          $scope.condition.push(start);
+          $scope.condition.push(end);
+          $scope.openDatePicker = function ($event, item, openParam) {
+              $event.preventDefault();
+              $event.stopPropagation();
+              openParam === 0 ? $scope.condition[1].open = false : $scope.condition[0].open = false;
+              item[openParam].open = !item[openParam].open;
+          };
+          $scope.openDatePickerSeek = function ($event, item, openParam) {
+              $event.preventDefault();
+              $event.stopPropagation();
+              openParam === 0 ? $scope.condition[1].open1 = false : $scope.condition[0].open1 = false;
+              item[openParam].open1 = !item[openParam].open1;
+          };
+          // 选择查找日期
+          $scope.onDateConditionSeek = function (bool) {
+              var startTime = $scope.startDate ? $scope.startDate.getTime() : null;
+              var endTime = $scope.endDate ? $scope.endDate.getTime() : null;
+              if (startTime && endTime && startTime > endTime) {
+                  if (bool == 1) {
+                      toaster.pop('info', '起始时间不能大于结束时间');
+                      $scope.startDate = null;
+                  } else {
+                      toaster.pop('info', '结束时间不能小于起始时间');
+                      $scope.endDate = null;
+                  }
+              }
+              if ($scope.endDate && bool == 2) {
+                  $scope.endDate = new Date($scope.endDate.getFullYear(), $scope.endDate.getMonth(), $scope.endDate.getDate())
+                  $scope.endDate = new Date($scope.endDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+              }
+              $scope.seekPurchaseTableParams.page(1);
+              $scope.seekPurchaseTableParams.reload();
+          };
+          $scope.onDateCondition = function (bool) {
+              var startTime = $scope.startDelivery ? $scope.startDelivery.getTime() : null;
+              var endTime = $scope.endDelivery ? $scope.endDelivery.getTime() : null;
+              if (startTime && endTime && startTime > endTime) {
+                  if (bool == 1) {
+                      toaster.pop('info', '起始时间不能大于结束时间');
+                      $scope.startDelivery = null;
+                  } else {
+                      toaster.pop('info', '结束时间不能小于起始时间');
+                      $scope.endDelivery = null;
+                  }
+              }
+              if ($scope.endDelivery && bool == 2) {
+                  $scope.endDelivery = new Date($scope.endDelivery.getFullYear(), $scope.endDelivery.getMonth(), $scope.endDelivery.getDate())
+                  $scope.endDelivery = new Date($scope.endDelivery.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+              }
+              $scope.seekPurchaseTableParams.page(1);
+              $scope.seekPurchaseTableParams.reload();
+          };
+          // 筛选
+          var _formatDate = function (date, fmt) {
+              if (!date) {
+                  return null;
+              }
+              if (typeof date === 'string') {
+                  date = new Date(Date.parse(date.replace(/-/g, '/')));
+              }
+              var o = {
+                  'M+': date.getMonth() + 1, // 月份
+                  'd+': date.getDate(), // 日
+                  'h+': date.getHours(), // 小时
+                  'm+': date.getMinutes(), // 分
+                  's+': date.getSeconds(), // 秒
+                  'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+                  'S': date.getMilliseconds() // 毫秒
+              }
+              if (/(y+)/.test(fmt)) {
+                  fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+              }
+              for (var k in o) {
+                  if (new RegExp('(' + k + ')').test(fmt)) {
+                      fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
+                  }
+              }
+              return fmt;
+          }
+
+          var _getClearDay = function (date) {
+              return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
+          }
+
+          $scope.setFilters = function (type, val) {
+              $scope[type] = val;
+              if (type == 'dateAreaSeek') {
+                  // 时间筛选
+                  var currentTime = _getClearDay(new Date());
+                  var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+                  if (val == 'ALL' || val == 'autoDay') {
+                      $scope.startDate = null;
+                      $scope.endDate = null;
+                  } else if (val == 'oneDay') {
+                      $scope.startDate = new Date(currentTime - 24 * 60 * 60 * 1000);
+                      $scope.endDate = endDate;
+                  } else if (val == 'threeDay') {
+                      $scope.startDate = new Date(currentTime - 3 * 24 * 60 * 60 * 1000);
+                      $scope.endDate = endDate;
+                  } else if (val == 'sevenDay') {
+                      $scope.startDate = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
+                      $scope.endDate = endDate;
+                  } else {
+                      $scope.startDate = null;
+                      $scope.endDate = null;
+                  }
+              }
+              if (type == 'dateArea') {
+                  // 时间筛选
+                  var currentTime = _getClearDay(new Date());
+                  var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+                  if (val == 'ALL' || val == 'autoDay') {
+                      $scope.startDelivery = null;
+                      $scope.endDelivery = null;
+                  } else if (val == 'oneDay') {
+                      $scope.startDelivery = new Date(currentTime - 24 * 60 * 60 * 1000);
+                      $scope.endDelivery = endDate;
+                  } else if (val == 'threeDay') {
+                      $scope.startDelivery = new Date(currentTime - 3 * 24 * 60 * 60 * 1000);
+                      $scope.endDelivery = endDate;
+                  } else if (val == 'sevenDay') {
+                      $scope.startDelivery = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
+                      $scope.endDelivery = endDate;
+                  } else {
+                      $scope.startDelivery = null;
+                      $scope.endDelivery = null;
+                  }
+              }
+              $scope.seekPurchaseTableParams.page(1);
+              $scope.seekPurchaseTableParams.reload();
+          }
 
         /*获取时间戳代表的天数*/
         $scope.getDay = function (timeStamp) {

+ 103 - 58
src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js

@@ -8,6 +8,46 @@ define(['app/app'], function (app) {
           $rootScope.active = 'vendor_seek_purchase';
           $scope.seekPurchaseRate = {};
           $scope.sayType = 'current'; // 报价类型,current为当前,replace为替代料
+            var _formatDate = function (date, fmt) {
+                if (!date) {
+                    return null;
+                }
+                if (typeof date === 'string') {
+                    date = new Date(Date.parse(date.replace(/-/g, '/')));
+                }
+                var o = {
+                    'M+': date.getMonth() + 1, // 月份
+                    'd+': date.getDate(), // 日
+                    'h+': date.getHours(), // 小时
+                    'm+': date.getMinutes(), // 分
+                    's+': date.getSeconds(), // 秒
+                    'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+                    'S': date.getMilliseconds() // 毫秒
+                }
+                if (/(y+)/.test(fmt)) {
+                    fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+                }
+                for (var k in o) {
+                    if (new RegExp('(' + k + ')').test(fmt)) {
+                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
+                    }
+                }
+                return fmt;
+            }
+
+            var _getClearDay = function (date) {
+                return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
+            }
+
+            var init = function () {
+
+                // 发布时间
+                $scope.dateArea = 'sevenDay';
+                var currentTime = _getClearDay(new Date());
+                $scope.startDate = new Date(currentTime - 6 * 24 * 60 * 60 * 1000);
+                $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+            }
+
           seekPurchase.getSeekUrl({}, function(data) {
             var seekUrl = data.url;
             // var seekUrl = 'http://10.1.51.82:24002';
@@ -22,6 +62,7 @@ define(['app/app'], function (app) {
             };
             $scope.inquiryItem = {};
           }
+          init();
           initInquiryItem();
 
             $scope.setSayType = function (type) {
@@ -273,71 +314,75 @@ define(['app/app'], function (app) {
           }
 
           $scope.condition = {endDateOpen: false, startDateOpen: false};
-
-          $scope.openDatePicker = function ($event, item, openParam, status) {
-            if (status != null) {
-              if (status == 1) {
-                if ($scope.startDate != null) {
-                  return;
-                }
-              }
-              if (status == 2) {
-                if ($scope.endDate != null) {
-                  return;
-                }
-              }
-            }
-            $event.preventDefault();
-            $event.stopPropagation();
-            item[openParam] = !item[openParam];
-            if (openParam == 'startDateOpen') {
-              if (item['endDateOpen']) {
-                item['endDateOpen'] = !item['endDateOpen'];
-              }
-            } else if (openParam == 'endDateOpen') {
-              if (item['startDateOpen']) {
-                item['startDateOpen'] = !item['startDateOpen'];
-              }
-            }
-          };
-          $scope.changeEndDate = function () {
-            if ($scope.condition.endDateOpen) {
-              $scope.endDate = $scope.endDate.toString().replace(
-                  /[0-9]{2}:[0-9]{2}:[0-9]{2}/g, '23:59:59');//;'23.59';//DateUtil.yyyyMmDd($scope.endDate.getTime() + 86399000);
-              $scope.endDate = new Date(
-                  formatDateTime(new Date($scope.endDate.toString())));
-            }
-            $scope.vaildDate(false);
-          };
-          $scope.vaildDate = function (isStart) {
-            if ($scope.endDate !== null && $scope.startDate > $scope.endDate) {
-              if (isStart) {
-                alert("开始日期大于结束日期,请重新输入!");
-                $scope.startDate = null;
-              } else {
-                alert("开始日期大于结束日期,请重新输入!");
-                $scope.endDate = null;
+              // 筛选
+              $scope.setFilters = function (type, val) {
+                  $scope[type] = val;
+                  if (type == 'dateArea') {
+                      // 时间筛选
+                      var currentTime = _getClearDay(new Date());
+                      var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+                      if (val == 'ALL' || val == 'autoDay') {
+                          $scope.startDate = null;
+                          $scope.endDate = null;
+                      } else if (val == 'oneDay') {
+                          $scope.startDate = new Date(currentTime);
+                          $scope.endDate = endDate;
+                      } else if (val == 'threeDay') {
+                          $scope.startDate = new Date(currentTime - 2 * 24 * 60 * 60 * 1000);
+                          $scope.endDate = endDate;
+                      } else if (val == 'sevenDay') {
+                          $scope.startDate = new Date(currentTime - 6 * 24 * 60 * 60 * 1000);
+                          $scope.endDate = endDate;
+                      } else {
+                          $scope.startDate = null;
+                          $scope.endDate = null;
+                      }
+                  }
+                  $scope.seekPurchaseTableParams.page(1);
+                  $scope.seekPurchaseTableParams.reload();
               }
-            }
-          };
-          var formatDateTime = function (date) {
-            var y = date.getFullYear();
-            var m = date.getMonth() + 1;
-            m = m < 10 ? ('0' + m) : m;
-            var d = date.getDate();
-            d = d < 10 ? ('0' + d) : d;
-            var h = date.getHours();
-            var minute = date.getMinutes();
-            var sec = date.getSeconds();
-            minute = minute < 10 ? ('0' + minute) : minute;
-            return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + sec;
-          };
           // 选择查找日期
           $scope.onDateCondition = function () {
             $scope.param.page = 1;
             $scope.orderTableParams.page(1);
             $scope.orderTableParams.reload();
           };
+              // 打开日期选择框
+              $scope.condition = [];
+              var start = {
+                  open : false
+              };
+              var end = {
+                  open : false
+              };
+              $scope.condition.push(start);
+              $scope.condition.push(end);
+              $scope.openDatePicker = function ($event, item, openParam) {
+                  $event.preventDefault();
+                  $event.stopPropagation();
+                  openParam === 0 ? $scope.condition[1].open = false : $scope.condition[0].open = false;
+                  item[openParam].open = !item[openParam].open;
+              };
+              // 选择查找日期
+              $scope.onDateCondition = function (bool) {
+                  var startTime = $scope.startDate ? $scope.startDate.getTime() : null;
+                  var endTime = $scope.endDate ? $scope.endDate.getTime() : null;
+                  if (startTime && endTime && startTime > endTime) {
+                      if (bool == 1) {
+                          toaster.pop('info', '起始时间不能大于结束时间');
+                          $scope.startDate = null;
+                      } else {
+                          toaster.pop('info', '结束时间不能小于起始时间');
+                          $scope.endDate = null;
+                      }
+                  }
+                  if ($scope.endDate && bool == 2) {
+                      $scope.endDate = new Date($scope.endDate.getFullYear(), $scope.endDate.getMonth(), $scope.endDate.getDate())
+                      $scope.endDate = new Date($scope.endDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+                  }
+                  $scope.seekPurchaseTableParams.page(1);
+                  $scope.seekPurchaseTableParams.reload();
+              };
 
           /*获取时间戳代表的天数*/
           $scope.getDay = function (timeStamp) {

+ 71 - 48
src/main/webapp/resources/view/admin/checkMoney/Settlement.html

@@ -189,59 +189,82 @@
 					<div class="row-fluid ">
 						<span class="minTitle span10">平台应付账户</span>
 					</div>
-					<div class="row-fluid">
+					<div class="row-fluid" style="margin: 15px 0">
 						<div role="button" class="span2"
-							 ng-click="newAccount()" style="color: #2fa4e7; font-size: 14px;position: relative; top: 15px; z-index: 20; width: 200px;">
+							 ng-click="newAccount()" style="color: #2fa4e7; font-size: 14px;z-index: 20; width: 200px;">
 							<i class="fa fa-plus-square"></i>&nbsp;新增账户
 						</div>
 					</div>
 					<div class="count-list01">
-						<div class="row-fluid " ng-repeat="b2cAccountInfo in b2cAccountInfos" ng-if="salexpose">
-							<div class="com-open col-md-12">
-								<div class="pull-right" ng-show="$index == 0">
-								<span role="button" ng-if="!salexpose"
-									  ng-click="doExpose(true, false)"><i
-										class="fa fa-angle-double-down"></i>&nbsp;展开列表</span> <span
-										role="button" ng-if="salexpose"
-										ng-click="doExpose(false, false)"><i
-										class="fa fa-angle-double-up"></i>&nbsp;收起列表</span>
-								</div>
-							</div>
-							<div class="col-md-12" ng-class="{true : 'select', false: 'diselect'}[b2cAccountInfo.id == b2cAccount.id]">
-								<div class="row-fluid" ng-click="select(b2cAccountInfo)" >
-									<span ng-bind="b2cAccountInfo.accountname" class="name"></span>
-									<span ng-bind="b2cAccountInfo.filterAccount"></span>
-									<span ng-bind="b2cAccountInfo.bankname">&nbsp;&nbsp;<i class="fa fa-credit-card"></i></span>
-									<span class="fr">
-										<span role="button" ng-click="newAccount(b2cAccountInfo)" class="edit"><i class="fa fa-edit"></i>&nbsp;编辑</span>&nbsp;
-										<span role="button" ng-click="deleteAccount(b2cAccountInfo)" class="delete"><i class="fa fa-remove"></i>&nbsp;删除</span>
-									</span>
-								</div>
-							</div>
-						</div>
-						<div class="row-fluid" ng-if="!salexpose">
-							<div class="com-open col-md-12">
-								<div class="pull-right">
-								<span role="button" ng-if="!salexpose"
-									  ng-click="doExpose(true, false)"><i
-										class="fa fa-angle-double-down"></i>&nbsp;展开列表</span> <span
-										role="button" ng-if="salexpose"
-										ng-click="doExpose(false, false)"><i
-										class="fa fa-angle-double-up"></i>&nbsp;收起列表</span>
-								</div>
-							</div>
-							<div class="col-md-12" ng-class="{true : 'select', false: 'diselect'}[b2cAccount.id == b2cAccount.id]" >
-								<div class="row-fluid">
-									<span ng-bind="b2cAccount.accountname" class="name"></span>
-									<span ng-bind="b2cAccount.filterAccount"></span>
-									<span ng-bind="b2cAccount.bankname"><i class="fa fa-credit-card"></i></span>
-									<span class="fr">
-										<span role="button" ng-click="newAccount(b2cAccount)" class="edit"><i class="fa fa-edit"></i>&nbsp;编辑</span>&nbsp;
-										<span role="button" ng-click="deleteAccount(b2cAccount)" class="delete"><i class="fa fa-remove"></i>&nbsp;删除</span>
-									</span>
-								</div>
-							</div>
-						</div>
+						<table ng-table="bankInfoTableParams" class="table table-bordered table-striped text-center" style="margin-top: 10px;">
+							<thead  class="text-center">
+							<tr>
+								<th width="240px">开户人</th>
+								<th width="240px">开户行</th>
+								<th width="240px">银行账号</th>
+								<th width="300px">操作</th>
+							</tr>
+							</thead>
+							<tbody>
+							<tr ng-repeat="account in accounts" class="text-center">
+								<td ng-bind="account.accountname"></td>
+								<td ng-bind="account.bankname"></td>
+								<td ng-bind="account.filterAccount"></td>
+								<td>
+									<button class="btn btn-default" ng-click="deleteAccount(account)">删除</button>
+									<button class="btn btn-default" ng-click="newAccount(account)">修改</button>
+									<button ng-if="account.num !=1" class="btn btn-default" ng-click="setDefaultAccount(account.id)">设为默认账户</button>
+								</td>
+							</tr>
+							</tbody>
+						</table>
+						<!--<div class="row-fluid " ng-repeat="b2cAccountInfo in b2cAccountInfos.content" ng-if="salexpose">-->
+							<!--<div class="com-open col-md-12">-->
+								<!--<div class="pull-right" ng-show="$index == 0">-->
+								<!--<span role="button" ng-if="!salexpose"-->
+									  <!--ng-click="doExpose(true, false)"><i-->
+										<!--class="fa fa-angle-double-down"></i>&nbsp;展开列表</span> <span-->
+										<!--role="button" ng-if="salexpose"-->
+										<!--ng-click="doExpose(false, false)"><i-->
+										<!--class="fa fa-angle-double-up"></i>&nbsp;收起列表</span>-->
+								<!--</div>-->
+							<!--</div>-->
+							<!--<div class="col-md-12" ng-class="{true : 'select', false: 'diselect'}[b2cAccountInfo.id == b2cAccount.id]">-->
+								<!--<div class="row-fluid" ng-click="select(b2cAccountInfo)" >-->
+									<!--<span ng-bind="b2cAccountInfo.accountname" class="name"></span>-->
+									<!--<span ng-bind="b2cAccountInfo.filterAccount"></span>-->
+									<!--<span ng-bind="b2cAccountInfo.bankname">&nbsp;&nbsp;<i class="fa fa-credit-card"></i></span>-->
+									<!--<span class="fr">-->
+										<!--<span role="button" ng-click="setDefaultAccount(b2cAccountInfo)" class="edit" ng-if="$index !== 0">&nbsp;设为默认</span>&nbsp;-->
+										<!--<span role="button" ng-click="newAccount(b2cAccountInfo)" class="edit"><i class="fa fa-edit"></i>&nbsp;编辑</span>&nbsp;-->
+										<!--<span role="button" ng-click="deleteAccount(b2cAccountInfo)" class="delete"><i class="fa fa-remove"></i>&nbsp;删除</span>-->
+									<!--</span>-->
+								<!--</div>-->
+							<!--</div>-->
+						<!--</div>-->
+						<!--<div class="row-fluid" ng-if="!salexpose">-->
+							<!--<div class="com-open col-md-12">-->
+								<!--<div class="pull-right">-->
+								<!--<span role="button" ng-if="!salexpose"-->
+									  <!--ng-click="doExpose(true, false)"><i-->
+										<!--class="fa fa-angle-double-down"></i>&nbsp;展开列表</span> <span-->
+										<!--role="button" ng-if="salexpose"-->
+										<!--ng-click="doExpose(false, false)"><i-->
+										<!--class="fa fa-angle-double-up"></i>&nbsp;收起列表</span>-->
+								<!--</div>-->
+							<!--</div>-->
+							<!--<div class="col-md-12" ng-class="{true : 'select', false: 'diselect'}[b2cAccount.id == b2cAccount.id]" >-->
+								<!--<div class="row-fluid">-->
+									<!--<span ng-bind="b2cAccount.accountname" class="name"></span>-->
+									<!--<span ng-bind="b2cAccount.filterAccount"></span>-->
+									<!--<span ng-bind="b2cAccount.bankname"><i class="fa fa-credit-card"></i></span>-->
+									<!--<span class="fr">-->
+										<!--<span role="button" ng-click="newAccount(b2cAccount)" class="edit"><i class="fa fa-edit"></i>&nbsp;编辑</span>&nbsp;-->
+										<!--<span role="button" ng-click="deleteAccount(b2cAccount)" class="delete"><i class="fa fa-remove"></i>&nbsp;删除</span>-->
+									<!--</span>-->
+								<!--</div>-->
+							<!--</div>-->
+						<!--</div>-->
 					</div>
 					<label class="minTitle marginTop30">供应商应收账户</label>
 					<div class="count-list01">

+ 6 - 6
src/main/webapp/resources/view/admin/checkMoney/creditCardAdmin.html

@@ -53,19 +53,19 @@ div[role="button"]:HOVER {
 		<div class="fullscreen" style="padding: 10px;">
 			<div class="row">
 				<div class="col-sm-1">
-					共<span class="badge">{{accounts.length}} </span>条
+					共<span class="badge">{{totalElements}} </span>条
 				</div>
 				<div class="col-sm-9">
-					<button type="button" class="btn btn-default btn-group-left" ng-class="{'btn-primary':active=='personal'}" ng-click="setActive('personal')">个人账户</button>
-					<button type="button" class="btn btn-default btn-group-rigth" ng-class="{'btn-primary':active=='enterprise'}" ng-click="setActive('enterprise')">企业账号</button>
+					<button type="button" class="btn btn-default btn-group-left" ng-class="{'btn-primary':active=='personal'}" ng-click="setActive('personal')">付款账户</button>
+					<button type="button" class="btn btn-default btn-group-rigth" ng-class="{'btn-primary':active=='enterprise'}" ng-click="setActive('enterprise')">收款账号</button>
 				</div>
-				<div class="col-sm-2">
+				<div class="col-sm-2" ng-if="totalElements < 20">
 					<div class="add-count">
 						<a ng-click="editAccount()" style="font-size: 14px;"><i class="fa fa-plus-square"></i>&nbsp;新增银行账户</a>
 					</div>
 				</div>
 			</div>
-			<table class="table table-bordered table-striped text-center" style="margin-top: 10px;">
+			<table ng-table="bankInfoTableParams" class="table table-bordered table-striped text-center" style="margin-top: 10px;">
 				<thead  class="text-center">
 				    <tr>
 						<th width="240px">开户人</th>
@@ -86,7 +86,7 @@ div[role="button"]:HOVER {
 				        </td>
 				    </tr>
 			    </tbody>
-			</table>			
+			</table>
 		</div>
 		<!-- ng-tableEnd -->
 	</div>

+ 6 - 3
src/main/webapp/resources/view/sso/forstore/ssoCenter.html

@@ -24,8 +24,7 @@
         width:100px;
         height:100px;
         border-radius:50%;
-        margin-right:40px;
-        margin-top:50px;
+        margin:50px 40px 50px 0;
     }
     .seller_data dl dt img{
         width:100%;
@@ -152,6 +151,10 @@
                         <span ng-if="userInfo.enterprise.enName" ng-bind="userInfo.enterprise.enName" class="enName"></span>
                         <span ng-if="!userInfo.enterprise.enName">个人账户</span>
                     </p>
+                    <p>
+                        <span>U U 号:</span>
+                        <span ng-bind="userInfo.userUU" class="user" title="{{userInfo.userUU}}"></span>
+                    </p>
                     <p>
                         <span>邮&nbsp; &nbsp;箱:</span>
                         <span ng-bind="userInfo.userEmail" class="user" title="{{userInfo.userEmail}}"></span>
@@ -188,7 +191,7 @@
                 <tr>
                     <th>用户名</th>
                     <th>UU账号</th>
-                    <th>手机</th>
+                    <th>手机</th>
                     <th>邮箱</th>
                     <th>操作</th>
                 </tr>

+ 5 - 5
src/main/webapp/resources/view/sso/staffManagement.html

@@ -937,7 +937,7 @@
                 </div>
                 <div class="searchUser-group">
                     <span ng-click="onSearch(keyword, filterRole)">搜索</span>
-                    <input type="text" ng-keyup="onKeyUpSearch(keyword, filterRole, $event)" ng-model="keyword" placeholder="输入人员姓名、电话号码、邮箱进行搜索"/>
+                    <input type="text" ng-keyup="onKeyUpSearch(keyword, filterRole, $event)" ng-model="keyword" placeholder="输入人员姓名/手机/邮箱进行搜索"/>
                     <div>
                         <select ng-model="filterRole" ng-change="onSearch(keyword,filterRole)">
                             <option value="all" selected="selected">全部角色</option>
@@ -961,7 +961,7 @@
                         <!--<th width="143">UU账号</th>-->
                         <th width="101">姓名</th>
                         <th width="67">性别</th>
-                        <th width="133">手机</th>
+                        <th width="133">手机</th>
                         <th width="207">邮箱</th>
                         <th width="376">角色</th>
                         <th width="107">操作</th>
@@ -988,7 +988,7 @@
                         <td ng-class="{'has-error': userTelError, 'has-success': userTelSuccess}">
                             <input ng-model="newUser.userTel"
                                    ng-blur="telValid(newUser.userTel)" required name="newUserTel"
-                                   ng-pattern="/^1\d{10}$/" type="text" placeholder="手机">
+                                   ng-pattern="/^1\d{10}$/" type="text" placeholder="手机">
                         </td>
                         <td ng-class="{'has-error': userEmailError, 'has-success': userEmailSuccess}">
                             <input ng-model="newUser.userEmail" ng-pattern="/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/"
@@ -1058,14 +1058,14 @@
         <!-- 申请绑定 -->
         <div class="clearfix bind-en" ng-if="tab=='bind'">
             <div class="rt_menu">
-                <span class="pull-right"><input type="text" ng-model="searchParams.keyword" ng-keyup="keyUpApply()" class="form-control" placeholder="用户名/手机"/><button class="btn" ng-click="searchApply()">搜索</button> </span></span>
+                <span class="pull-right"><input type="text" ng-model="searchParams.keyword" ng-keyup="keyUpApply()" class="form-control" placeholder="用户名/手机"/><button class="btn" ng-click="searchApply()">搜索</button> </span></span>
             </div>
             <table class="bind-enter-tab" ng-table="applyToEnterpriseTableParams">
                 <thead>
                 <tr>
                     <th>用户名</th>
                     <!--<th>UU账号</th>-->
-                    <th>手机</th>
+                    <th>手机</th>
                     <th>邮箱</th>
                     <th>操作</th>
                 </tr>

+ 18 - 28
src/main/webapp/resources/view/usercenter/forstore/pay_center.html

@@ -449,7 +449,7 @@
 		margin-right:5px;
 	}
 	.check-filter {
-		height: 80px;
+		height: auto;
 		line-height: 30px;
 		padding-left: 22px;
 		margin-top: 0;
@@ -479,12 +479,12 @@
 <div class="user_right fr" id="pay_center">
 	<!--支付中心-->
 	<div class="pay_record oder">
-		<!--<div class="oder01" style="margin-bottom: 16px;">
+		<div class="oder01" style="margin-bottom: 16px;">
 			<ul>
-				<li ng-class="{'active' : status=='pay-history'}" ng-click="toggleStatus('pay-history')"><a href="javascript:void(0)">交易记录</a></li>
-				<li ng-class="{'active' : status=='pay-info'}" ng-click="toggleStatus('pay-info')"><a href="javascript:void(0)">付款账户</a></li>
+				<li ng-if="status != 'pay-info'" ng-class="{'active' : status=='pay-history'}"><a href="javascript:void(0)">应付对账</a></li>
+				<li ng-if="status == 'pay-info'" ng-class="{'active' : status=='pay-info'}"><a href="javascript:void(0)">付款帐户</a></li>
 			</ul>
-		</div>-->
+		</div>
 		<!--支付中心列表-->
 		<div class="ticket_record_list">
 			<!-- 支付信息-->
@@ -600,31 +600,26 @@
 			<div class="tab" ng-show="status == 'pay-history'" style="display: inline-block">
 				<!--搜索时间筛选-->
 				<div class="screen check-filter">
-					<div class="radio-block">
+					<div class="radio-block" style="display:block;">
 						交易方式:
 						<label class="com-check-radio">
-							<input type="radio" id="methodAll" name="method" ng-click="setFilters('remitteeType', 'ALL')" ng-checked="remitteeType == 'ALL'">
-							<label for="methodAll"></label>
-							全部
+							<input type="radio" id="forPlatform" name="method" ng-click="setFilters('remitteeType', 'PAIDTOPLATFORM')" ng-checked="remitteeType == 'PAIDTOPLATFORM'">
+							<label for="forPlatform"></label>
+							平台代收
 						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="forSeller" name="method" ng-click="setFilters('remitteeType', 'PAIDTOVENDOR')" ng-checked="remitteeType == 'PAIDTOVENDOR'">
 							<label for="forSeller"></label>
 							卖家收款
 						</label>
-						<label class="com-check-radio">
-							<input type="radio" id="forPlatform" name="method" ng-click="setFilters('remitteeType', 'PAIDTOPLATFORM')" ng-checked="remitteeType == 'PAIDTOPLATFORM'">
-							<label for="forPlatform"></label>
-							平台代收
-						</label>
 					</div>
-					<div class="radio-block">
+					<div class="radio-block" style="display:block;">
 					交易币种:
-					<label class="com-check-radio">
-						<input type="radio" id="currencyAll" name="currency" ng-click="setFilters('currency', 'ALL')" ng-checked="currency == 'ALL'">
-						<label for="currencyAll"></label>
-						全部
-					</label>
+					<!--<label class="com-check-radio">-->
+						<!--<input type="radio" id="currencyAll" name="currency" ng-click="setFilters('currency', 'ALL')" ng-checked="currency == 'ALL'">-->
+						<!--<label for="currencyAll"></label>-->
+						<!--全部-->
+					<!--</label>-->
 					<label class="com-check-radio">
 						<input type="radio" id="RMB" name="currency" ng-click="setFilters('currency', 'RMB')" ng-checked="currency == 'RMB'">
 						<label for="RMB"></label>
@@ -638,25 +633,20 @@
 				</div>
 					<div class="radio-block date-radio">
 						交易时间:
-						<label class="com-check-radio">
-							<input type="radio" id="dateAll" name="date" ng-click="setFilters('dateArea', 'ALL')" ng-checked="dateArea == 'ALL'">
-							<label for="dateAll"></label>
-							全部
-						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="oneMonth" name="date" ng-click="setFilters('dateArea', 'oneMonth')" ng-checked="dateArea == 'oneMonth'">
 							<label for="oneMonth"></label>
-							一个月
+							30天
 						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="threeMonth" name="date" ng-click="setFilters('dateArea', 'threeMonth')" ng-checked="dateArea == 'threeMonth'">
 							<label for="threeMonth"></label>
-							三个月
+							90天
 						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="sixMonth" name="date" ng-click="setFilters('dateArea', 'sixMonth')" ng-checked="dateArea == 'sixMonth'">
 							<label for="sixMonth"></label>
-							六个月
+							180天
 						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="autoMonth" name="date" ng-click="setFilters('dateArea', 'autoMonth')" ng-checked="dateArea == 'autoMonth'">

+ 166 - 58
src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html

@@ -9,25 +9,31 @@
         padding: 17px 0;
     }
     .seek-purchase .seek-purchase-content .publish-purchase .fl {
-        width: 1000px;
-        height: 198px;
+        float: none;
+        margin: 0 auto;
         padding: 0 30px;
+        width: 1000px;
+        height: 235px;
+        text-align: center;
         border: 2px dashed #fd7748;
-        margin: 0 auto;
-        float: none;
+        border-top-left-radius: 2px;
+        border-top-right-radius: 2px;
     }
     .seek-purchase .seek-purchase-content .publish-purchase .fl p {
         font-size: 18px;
         color: #fd7748;
         text-align: center;
-        margin: 19px 0 0 0;
+        margin: 19px 0 8px 0;
     }
     .seek-purchase .seek-purchase-content .publish-purchase .fl .form-block {
-        width: 228px;
+        width: 332px;
         display: inline-block;
         margin-top: 16px;
         position: relative;
     }
+    .seek-purchase .seek-purchase-content .publish-purchase .fl .form-block:nth-child(odd){
+        margin-left: 95px;
+    }
     .seek-purchase .seek-purchase-content .publish-purchase .fl .form-block >span {
         width: 110px;
         height: 24px;
@@ -43,7 +49,7 @@
     }
     .seek-purchase .seek-purchase-content .publish-purchase .fl .form-block input {
         display: inline-block;
-        width: 111px;
+        width: 222px;
         border: 1px solid #b5b5b5;
         height: 24px;
         line-height: 24px;
@@ -103,7 +109,7 @@
         color: #fefefe;
         background: #fd7748;
         border-radius: 3px;
-        margin: 14px auto;
+        margin: 22px auto 6px;
         font-size: 14px;
     }
     .seek-purchase .seek-purchase-content .empty-line {
@@ -119,14 +125,14 @@
         line-height: 32px;
         clear: both;
         background: #f5f8fe;
-        height: 40px;
+        /*height: 40px;*/
         margin-bottom: 15px;
         padding-top: 4px;
         padding-right: 13px;
     }
-    .seek-purchase .screen .fl {
-        margin-left: 14px;
-    }
+    /*.seek-purchase .screen .fl {*/
+        /*margin-left: 14px;*/
+    /*}*/
     .seek-purchase .screen .fl select{
         width: 88px;
         height: 32px;
@@ -143,11 +149,11 @@
     .seek-purchase .screen .sreach input{
         border: #5078cb 1px solid;
         height: 32px;
-        width: 267px;
+        width: 193px;
         box-shadow: none;
     }
     .seek-purchase .screen .sreach .date{
-        margin-right: 6px;
+        margin-right: 42px;
     }
     .seek-purchase .screen .sreach .date input{
         width: 117px;
@@ -358,13 +364,13 @@
     }
     .seek-purchase .seek-purchase-content >table >tbody tr.expand-row table tbody tr td.operate > span {
         display: inline-block;
-        width: 39px;
         height: 24px;
         line-height: 24px;
         text-align: center;
         background: #4290f7;
         color: #fff;
-        margin-left: 13px;
+        padding: 0 5px;
+        margin: 0 5px;
         cursor: pointer;
         font-size: 12px;
         border-radius: 2px;
@@ -913,6 +919,32 @@
         border: 1px solid #5078cb;
         color: #333;
     }
+    /*筛选按钮*/
+    .check-filter {
+        height: auto;
+        line-height: 30px;
+        padding-left: 22px;
+        margin-top: 0;
+    }
+    .check-filter .sreach input {
+        width: 147px;
+    }
+    .check-filter .radio-block {
+        display: inline-block;
+        font-size: 14px;
+        width: 33.3%;
+    }
+    .check-filter .radio-block.date-radio {
+        width: 45%;
+    }
+    .check-filter .radio-block .com-check-radio {
+        font-weight: normal;
+        color: #666;
+        margin-right: 13px;
+    }
+    .check-filter .radio-block .com-check-radio:last-child {
+        margin-right: 0;
+    }
 </style>
 <div class="user_right fr seek-purchase">
     <!--求购询价-->
@@ -983,10 +1015,10 @@
                            class="form-control select-adder" placeholder="截止日期"
                            ng-class="{'error': !validObj.deadline}"
                            datepicker-popup="yyyy-MM-dd"
-                           is-open="condition.deadlineOpen"
+                           is-open="condition[2].open"
                            min-date="nowDate" max-date="deadDate"
                            current-text="今天" clear-text="清除" close-text="关闭"
-                           ng-click="openDatePicker($event, condition, 'deadlineOpen',3)"
+                           ng-click="openDatePicker($event, condition, 2)"
                            datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
                            ng-change="checkDeadline()"
                     />
@@ -1000,56 +1032,131 @@
         </div>
         <div class="empty-line"></div>
         <!--搜索时间筛选-->
-        <div class="screen">
-            <div class="fl">
-                <!--
-                <label class="com-check-box">
-                    <input type="checkbox" id="1" ng-model="isMallGoods" ng-change="onSearch()">
-                    <label for="1"></label>
-                </label>&nbsp;有现货&nbsp;&nbsp;-->
-                <!--
-                截止时间&nbsp;
-                <select class="form-control select-adder" ng-model="overdue" ng-change="onSearch()" ng-init="overdue='0'">
-                    <option value="0">全部</option>
-                    <option value="1">已截止</option>
-                    <option value="正在生效">正在生效</option>
-                </select>
-                -->
+        <div>
+            <!--<div class="screen">-->
+                <!--<div class="fl">-->
+                    <!--&lt;!&ndash;-->
+                    <!--<label class="com-check-box">-->
+                        <!--<input type="checkbox" id="1" ng-model="isMallGoods" ng-change="onSearch()">-->
+                        <!--<label for="1"></label>-->
+                    <!--</label>&nbsp;有现货&nbsp;&nbsp;&ndash;&gt;-->
+                    <!--&lt;!&ndash;-->
+                    <!--截止时间&nbsp;-->
+                    <!--<select class="form-control select-adder" ng-model="overdue" ng-change="onSearch()" ng-init="overdue='0'">-->
+                        <!--<option value="0">全部</option>-->
+                        <!--<option value="1">已截止</option>-->
+                        <!--<option value="正在生效">正在生效</option>-->
+                    <!--</select>-->
+                    <!--&ndash;&gt;-->
+                <!--</div>-->
+                <!--<div>-->
+
+                <!--</div>-->
+                <!--<div class="sreach fr">-->
+                    <!--<span ng-show="tab == 'waitOffer'">求购筛选</span>-->
+                    <!--<select ng-show="tab == 'waitOffer'" class="form-control select-adder vendor-type" ng-model="vendorType" ng-change="onVendorTypeChange(vendorType)">-->
+                        <!--<option value="all">全部</option>-->
+                        <!--<option value="self">未截止</option>-->
+                        <!--<option value="end">已截止</option>-->
+                    <!--</select>-->
+                    <!--<span>发布时间&nbsp;</span>-->
+                    <!--<div class="date fl">-->
+                        <!--<div class="data-input">-->
+                            <!--<input type="text" ng-model="startDate"-->
+                                   <!--class="form-control select-adder" placeholder="起始时间"-->
+                                   <!--datepicker-popup="yyyy-MM-dd"-->
+                                   <!--is-open="condition.startDateOpen"-->
+                                   <!--max-date="endDate" current-text="今天" clear-text="清除" close-text="关闭"-->
+                                   <!--ng-click="openDatePicker($event, condition, 'startDateOpen',1)"-->
+                                   <!--datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"-->
+                                   <!--ng-change="vaildDate(true)"-->
+                            <!--/>-->
+                            <!--<button class="open" ng-click="openDatePicker($event, condition, 'startDateOpen')"></button>-->
+                        <!--</div>-->
+
+                        <!--<em>–</em>-->
+                        <!--<div class="data-input">-->
+                            <!--<input type="text" ng-model="endDate"-->
+                                   <!--class="form-control select-adder" placeholder="结束时间"-->
+                                   <!--datepicker-popup="yyyy-MM-dd"-->
+                                   <!--is-open="condition.endDateOpen"-->
+                                   <!--min-date="startDate" current-text="今天" clear-text="清除" close-text="关闭"-->
+                                   <!--ng-click="openDatePicker($event, condition, 'endDateOpen',2)"-->
+                                   <!--datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"-->
+                                   <!--ng-change="changeEndDate()"-->
+                            <!--/>-->
+                            <!--<button class="open" ng-click="openDatePicker($event, condition, 'endDateOpen')"></button>-->
+                        <!--</div>-->
+                    <!--</div>-->
+                    <!--<div class="sreach-input fr">-->
+                        <!--<input type="search" placeholder="品牌/物料名称/型号" class="form-control" ng-model="keyWord" ng-search="onSearch()"/>-->
+                        <!--<a class="seek" href="javascript:void(0)" ng-click="onSearch()">搜索</a>-->
+                    <!--</div>-->
+                <!--</div>-->
+            <!--</div>-->
+        </div>
+        <div class="screen check-filter">
+            <div class="radio-block" ng-show="tab == 'waitOffer'" style="display: block;">
+                求购筛选:
+                <label class="com-check-radio">
+                    <input type="radio" id="forSeller" name="method" ng-click="setFilters('vendorType', 'self')" ng-checked="vendorType == 'self'">
+                    <label for="forSeller"></label>
+                    未截止
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="forPlatform" name="method" ng-click="setFilters('vendorType', 'end')" ng-checked="vendorType == 'end'">
+                    <label for="forPlatform"></label>
+                    已截止
+                </label>
+            </div>
+            <div class="radio-block date-radio">
+                发布时间:
+                <label class="com-check-radio">
+                    <input type="radio" id="oneDay" name="date" ng-click="setFilters('dateArea', 'oneDay')" ng-checked="dateArea == 'oneDay'">
+                    <label for="oneDay"></label>
+                    1天
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="threeDay" name="date" ng-click="setFilters('dateArea', 'threeDay')" ng-checked="dateArea == 'threeDay'">
+                    <label for="threeDay"></label>
+                    3天
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="sevenDay" name="date" ng-click="setFilters('dateArea', 'sevenDay')" ng-checked="dateArea == 'sevenDay'">
+                    <label for="sevenDay"></label>
+                    7天
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="autoDay" name="date" ng-click="setFilters('dateArea', 'autoDay')" ng-checked="dateArea == 'autoDay'">
+                    <label for="autoDay"></label>
+                    自定义
+                </label>
             </div>
             <div class="sreach fr">
-                <span ng-show="tab == 'waitOffer'">求购筛选</span>
-                <select ng-show="tab == 'waitOffer'" class="form-control select-adder vendor-type" ng-model="vendorType" ng-change="onVendorTypeChange(vendorType)">
-                    <option value="all">全部</option>
-                    <option value="self">未截止</option>
-                    <option value="end">已截止</option>
-                </select>
-                <span>发布时间&nbsp;</span>
-                <div class="date fl">
+                <div class="date fl" ng-show="dateArea == 'autoDay'">
                     <div class="data-input">
-                        <input type="text" ng-model="startDate"
+                        <input id="start" type="text" ng-model="startDate" readonly="readonly"
                                class="form-control select-adder" placeholder="起始时间"
                                datepicker-popup="yyyy-MM-dd"
-                               is-open="condition.startDateOpen"
-                               max-date="endDate" current-text="今天" clear-text="清除" close-text="关闭"
-                               ng-click="openDatePicker($event, condition, 'startDateOpen',1)"
+                               is-open="condition[0].open"
+                               current-text="今天" clear-text="清除" close-text="关闭"
                                datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                               ng-change="vaildDate(true)"
-                        />
-                        <button class="open" ng-click="openDatePicker($event, condition, 'startDateOpen')"></button>
+                               ng-click="openDatePicker($event, condition, 0,1)"
+                               ng-change="onDateCondition(1)"/>
+                        <button class="open" ng-click="openDatePicker($event, condition, 0)"></button>
                     </div>
 
                     <em>–</em>
                     <div class="data-input">
-                        <input type="text" ng-model="endDate"
+                        <input id="end" type="text" ng-model="endDate" readonly="readonly"
                                class="form-control select-adder" placeholder="结束时间"
                                datepicker-popup="yyyy-MM-dd"
-                               is-open="condition.endDateOpen"
-                               min-date="startDate" current-text="今天" clear-text="清除" close-text="关闭"
-                               ng-click="openDatePicker($event, condition, 'endDateOpen',2)"
+                               is-open="condition[1].open"
+                               current-text="今天" clear-text="清除" close-text="关闭"
                                datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                               ng-change="changeEndDate()"
-                        />
-                        <button class="open" ng-click="openDatePicker($event, condition, 'endDateOpen')"></button>
+                               ng-click="openDatePicker($event, condition, 1, 2)"
+                               ng-change="onDateCondition(2)"/>
+                        <button class="open" ng-click="openDatePicker($event, condition, 1)"></button>
                     </div>
                 </div>
                 <div class="sreach-input fr">
@@ -1065,7 +1172,7 @@
                 <th width="260">品牌/物料名称</th>
                 <th width="260">型号/规格</th>
                 <th width="110">采购数量(PCS)</th>
-                <th width="120">状态/截止{{tab == 'waitOffer' ? '时间' : '日期'}}</th>
+                <th width="120">截止日期</th>
                 <th width="140">操作</th>
             </tr>
             </thead>
@@ -1107,12 +1214,13 @@
                     <div class="row-wrap">
                         <!--<div ng-bind="seek.endDate | date:'yyyy-MM-dd'"></div>
                         <div class="date-bottom-item" ng-bind="seek.endDate | date:'HH:mm:ss'"></div>-->
-                        <span ng-if="seek.offerAmount == 0" style="color:red;">待报价</span>
+                        <!--<span ng-if="seek.offerAmount == 0" style="color:red;">待报价</span>-->
                         <span ng-if="seek.agreed == 0 && seek.offerAmount > 0">已报价</span>
                         <span ng-if="seek.agreed == 1" style="color:green;">已采纳</span>
                         <div ng-if="tab == 'offered'" class="date-bottom-item" ng-bind="seek.endDate | date:'yyyy-MM-dd'"></div>
                         <div ng-if="tab == 'waitOffer'">
-                            <div class="remain" ng-if="seek.remainingTime > 0">剩余&nbsp;<span ng-bind="getDay(seek.remainingTime)" ng-if="getDay(seek.remainingTime) > 0" class="red-text"></span><i ng-if="getDay(seek.remainingTime) > 0">&nbsp;天&nbsp;</i><span ng-if="getDay(seek.remainingTime) <= 0" ng-bind="getHours(seek.remainingTime)" class="red-text">5</span><i ng-if="getDay(seek.remainingTime) <= 0">&nbsp;小时</i></div>
+                            <!--<div class="remain" ng-if="seek.remainingTime > 0">剩余&nbsp;<span ng-bind="getDay(seek.remainingTime)" ng-if="getDay(seek.remainingTime) > 0" class="red-text"></span><i ng-if="getDay(seek.remainingTime) > 0">&nbsp;天&nbsp;</i><span ng-if="getDay(seek.remainingTime) <= 0" ng-bind="getHours(seek.remainingTime)" class="red-text">5</span><i ng-if="getDay(seek.remainingTime) <= 0">&nbsp;小时</i></div>-->
+                            <div class="date-bottom-item" ng-if="seek.remainingTime > 0" ng-bind="seek.endDate | date:'yyyy-MM-dd'"></div>
                             <div class="remain" ng-if="seek.remainingTime <= 0"><span>已截止</span></div>
                             <div class="remain" ng-if="seek.remainingTime == null"><span>-</span></div>
                         </div>

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/addExistUser.html

@@ -104,7 +104,7 @@
 				<input
 						type="text" class="form-control"
 						ng-keydown="onKeyDown($event, keyWord)"
-						ng-model="keyWord" placeholder="请输入手机或邮箱" required/>
+						ng-model="keyWord" placeholder="请输入手机或邮箱" required/>
 				<a class="default-btn" ng-click="searchUser(keyWord)" ng-disabled="searchForm.$invalid">搜索</a>
 			</div>
 		</form>
@@ -124,7 +124,7 @@
 					<td>{{user.userSex == 'M' ? '男' : '女'}}</td>
 				</tr>
 				<tr>
-					<td>电话</td>
+					<td>手机</td>
 					<td>{{user.userTel}}</td>
 				</tr>
 				<tr>

+ 30 - 39
src/main/webapp/resources/view/vendor/forstore/pay_center.html

@@ -677,12 +677,12 @@
 <div class="user_right fr" id="pay_center">
     <!--支付中心-->
     <div class="pay_record oder">
-      <!--  <div class="oder01">
+        <div class="oder01">
             <ul>
-                <li ng-click="setTab('paymentRecord')" ng-class="{'active' : tab == 'paymentRecord'}"><a href="javascript:void(0)">交易记录</a></li>
-                <li ng-click="setTab('accountTab')" ng-class="{'active' : tab == 'accountTab'}"><a href="javascript:void(0)">收款帐户</a></li>
+                <li ng-if="tab != 'accountTab'" ng-class="{'active' : tab == 'paymentRecord'}"><a href="javascript:void(0)">应收对帐</a></li>
+                <li ng-if="tab == 'accountTab'" ng-class="{'active' : tab == 'accountTab'}"><a href="javascript:void(0)">收款帐户</a></li>
             </ul>
-        </div>-->
+        </div>
         <!--支付中心列表-->
         <div class="ticket_record_list">
             <!-- 交易记录-->
@@ -692,42 +692,33 @@
                     <div class="radio-block" style="display: block;">
                         交易方式:
                         <label class="com-check-radio">
-                            <input type="radio" id="methodAll" name="method" ng-click="setFilters('remitteeType', 'ALL')" ng-checked="remitteeType == 'ALL'">
-                            <label for="methodAll"></label>
-                            全部
+                            <input type="radio" id="forPlatform" name="method" ng-click="setFilters('remitteeType', 'PLATFORMPAIDTOVENDOR')" ng-checked="remitteeType == 'PLATFORMPAIDTOVENDOR'">
+                            <label for="forPlatform"></label>
+                            平台代付
                         </label>
                         <label class="com-check-radio">
                             <input type="radio" id="forSeller" name="method" ng-click="setFilters('remitteeType', 'PAIDTOVENDOR')" ng-checked="remitteeType == 'PAIDTOVENDOR'">
                             <label for="forSeller"></label>
                             买家付款
                         </label>
-                        <label class="com-check-radio">
-                            <input type="radio" id="forPlatform" name="method" ng-click="setFilters('remitteeType', 'PLATFORMPAIDTOVENDOR')" ng-checked="remitteeType == 'PLATFORMPAIDTOVENDOR'">
-                            <label for="forPlatform"></label>
-                            平台代付
-                        </label>
+
                     </div>
                     <div class="radio-block date-radio">
                         交易时间:
-                        <label class="com-check-radio">
-                            <input type="radio" id="dateAll" name="date" ng-click="setFilters('dateArea', 'ALL')" ng-checked="dateArea == 'ALL'">
-                            <label for="dateAll"></label>
-                            全部
-                        </label>
                         <label class="com-check-radio">
                             <input type="radio" id="oneMonth" name="date" ng-click="setFilters('dateArea', 'oneMonth')" ng-checked="dateArea == 'oneMonth'">
                             <label for="oneMonth"></label>
-                            一个月
+                            30天
                         </label>
                         <label class="com-check-radio">
                             <input type="radio" id="threeMonth" name="date" ng-click="setFilters('dateArea', 'threeMonth')" ng-checked="dateArea == 'threeMonth'">
                             <label for="threeMonth"></label>
-                            三个月
+                            90天
                         </label>
                         <label class="com-check-radio">
                             <input type="radio" id="sixMonth" name="date" ng-click="setFilters('dateArea', 'sixMonth')" ng-checked="dateArea == 'sixMonth'">
                             <label for="sixMonth"></label>
-                            六个月
+                            180天
                         </label>
                         <label class="com-check-radio">
                             <input type="radio" id="autoMonth" name="date" ng-click="setFilters('dateArea', 'autoMonth')" ng-checked="dateArea == 'autoMonth'">
@@ -787,7 +778,7 @@
                         <span>收款成功</span>
                         <span ng-bind="record.transferTime | date : 'yyyy-MM-dd HH:mm:ss'">2017.01.18</span>
                     </dd>
-                    <div class="total" ng-if="bankTransRecore && bankTransRecore.length > 0">
+                    <!--<div class="total" ng-if="bankTransRecore && bankTransRecore.length > 0">-->
                      <!--   <span>收入总计&nbsp;  <em><i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>
                             <i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>{{totalPrice}}</em></span>
                         <b>|</b>
@@ -796,24 +787,24 @@
                         <b>|</b>
                         <span>结余&nbsp;<em><i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>
                             <i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>{{totalPrice}}(共计{{totalElements}}笔交易)</em></span>-->
-                        <div class="fl">共计{{totalElements}}笔交易</div>
-                        <div class="fr">
-                            <p>已收总计:
-                                <em>
-                                    <i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>
-                                    <i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>
-                                    {{totalPrice}}
-                                </em>
-                            </p>
-                            <p>结余:
-                                <em>
-                                    <i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>
-                                    <i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>
-                                    {{totalPrice}}
-                                </em>
-                            </p>
-                        </div>
-                    </div>
+                        <!--<div class="fl">共计{{totalElements}}笔交易</div>-->
+                        <!--<div class="fr">-->
+                            <!--<p>已收总计:-->
+                                <!--<em>-->
+                                    <!--<i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>-->
+                                    <!--<i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>-->
+                                    <!--{{totalPrice}}-->
+                                <!--</em>-->
+                            <!--</p>-->
+                            <!--<p>结余:-->
+                                <!--<em>-->
+                                    <!--<i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>-->
+                                    <!--<i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>-->
+                                    <!--{{totalPrice}}-->
+                                <!--</em>-->
+                            <!--</p>-->
+                        <!--</div>-->
+                    <!--</div>-->
 
                     <dd ng-if="!bankTransRecore || bankTransRecore.length == 0" class="tab-dd" style="height: 125px; padding: 30px;">
                         <div class="col-xs-offset-3 col-xs-2">

+ 211 - 54
src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html

@@ -55,10 +55,13 @@
     .seek-purchase .seek-purchase-content .screen {
         font-size: 14px;
         line-height: 32px;
+        clear: both;
+        background: #f5f8fe;
+        margin-bottom: 15px;
+        padding-top: 4px;
+        padding-right: 13px;
     }
-    .seek-purchase .seek-purchase-content .screen .fl {
-        margin-left: 14px;
-    }
+
     .seek-purchase .seek-purchase-content .screen .fl select{
         width: 88px;
         height: 32px;
@@ -78,11 +81,11 @@
     .seek-purchase .seek-purchase-content .screen .sreach input{
         border: #5078cb 1px solid;
         height: 32px;
-        width: 267px;
+        width: 200px;
         box-shadow: none;
     }
     .seek-purchase .seek-purchase-content .screen .sreach .date{
-        margin-right: 6px;
+        margin-right: 20px;
     }
     .seek-purchase .seek-purchase-content .screen .sreach .date input{
         width: 117px;
@@ -594,6 +597,35 @@
         white-space: nowrap;
         text-align: left;
     }
+    /*筛选按钮*/
+    .check-filter {
+        height: auto;
+        line-height: 30px;
+        padding-left: 22px;
+        margin-top: 0;
+    }
+    .check-filter .sreach input {
+        width: 147px;
+    }
+    .check-filter .radio-block {
+        display: inline-block;
+        font-size: 14px;
+        width: 33.3%;
+    }
+    .check-filter .radio-block.date-radio {
+        width: 45%;
+    }
+    .check-filter .radio-block .com-check-radio {
+        font-weight: normal;
+        color: #666;
+        margin-right: 13px;
+    }
+    .check-filter .radio-block .com-check-radio:last-child {
+        margin-right: 0;
+    }
+    label {
+        margin-bottom: 5px;
+    }
 </style>
 <div class="user_right fr seek-purchase">
     <!--求购询价-->
@@ -628,59 +660,184 @@
         </div>
         -->
         <!--搜索时间筛选-->
-        <div class="screen" style="background: #f5f8fe;height: 40px;margin-bottom: 15px;margin-top: 5px;padding-top: 4px;padding-right: 11px;">
-            <div class="fl">
-                <!--
-                截止时间&nbsp;
-                <select class="form-control select-adder" ng-model="deadline" ng-change="onSearch()" ng-init="deadline='全部'">
-                    <option value="全部">全部</option>
-                    <option value="已截止">已截止</option>
-                    <option value="正在生效">正在生效</option>
-                </select>
-                -->
-                <!--
-                报价状态&nbsp;
-                <select class="form-control select-adder" ng-model="status" ng-change="onSearch()" ng-init="status=200">
-                    <option value="200">待报价</option>
-                    <option value="201">已报价</option>
-                    <option value="202">已采纳</option>
-                </select>
-                -->
+        <!--<div class="screen" style="background: #f5f8fe;height: 40px;margin-bottom: 15px;margin-top: 5px;padding-top: 4px;padding-right: 11px;">-->
+            <!--<div class="fl">-->
+                <!--&lt;!&ndash;-->
+                <!--截止时间&nbsp;-->
+                <!--<select class="form-control select-adder" ng-model="deadline" ng-change="onSearch()" ng-init="deadline='全部'">-->
+                    <!--<option value="全部">全部</option>-->
+                    <!--<option value="已截止">已截止</option>-->
+                    <!--<option value="正在生效">正在生效</option>-->
+                <!--</select>-->
+                <!--&ndash;&gt;-->
+                <!--&lt;!&ndash;-->
+                <!--报价状态&nbsp;-->
+                <!--<select class="form-control select-adder" ng-model="status" ng-change="onSearch()" ng-init="status=200">-->
+                    <!--<option value="200">待报价</option>-->
+                    <!--<option value="201">已报价</option>-->
+                    <!--<option value="202">已采纳</option>-->
+                <!--</select>-->
+                <!--&ndash;&gt;-->
+            <!--</div>-->
+            <!--<div class="sreach fr">-->
+                <!--<span>发布时间&nbsp;</span>-->
+                <!--<div class="date fl">-->
+                    <!--<div class="data-input">-->
+                        <!--<input type="text" ng-model="startDate"-->
+                               <!--class="form-control select-adder" placeholder="起始时间"-->
+                               <!--datepicker-popup="yyyy-MM-dd"-->
+                               <!--is-open="condition.startDateOpen"-->
+                               <!--max-date="endDate" current-text="今天" clear-text="清除" close-text="关闭"-->
+                               <!--ng-click="openDatePicker($event, condition, 'startDateOpen',1)"-->
+                               <!--datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"-->
+                               <!--ng-change="vaildDate(true)"-->
+                        <!--/>-->
+                        <!--<button class="open" ng-click="openDatePicker($event, condition, 'startDateOpen')"></button>-->
+                    <!--</div>-->
+                    <!--<em>–</em>-->
+                    <!--<div class="data-input">-->
+                        <!--<input type="text" ng-model="endDate"-->
+                               <!--class="form-control select-adder" placeholder="结束时间"-->
+                               <!--datepicker-popup="yyyy-MM-dd"-->
+                               <!--is-open="condition.endDateOpen"-->
+                               <!--min-date="startDate" current-text="今天" clear-text="清除" close-text="关闭"-->
+                               <!--ng-click="openDatePicker($event, condition, 'endDateOpen',2)"-->
+                               <!--datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"-->
+                               <!--ng-change="changeEndDate()"-->
+                        <!--/>-->
+                        <!--<button class="open" ng-click="openDatePicker($event, condition, 'endDateOpen')"></button>-->
+                    <!--</div>-->
+                <!--</div>-->
+                <!--<div class="sreach-input fr">-->
+                    <!--<input type="search" placeholder="品牌/物料名称/型号/规格/公司" class="form-control" ng-model="keyWord" ng-search="onSearch()"/>-->
+                    <!--<a class="seek" href="javascript:void(0)" ng-click="onSearch()">搜索</a>-->
+                <!--</div>-->
+            <!--</div>-->
+        <!--</div>-->
+        <div class="screen check-filter">
+            <div class="radio-block" style="display: block;">
+                求购筛选:
+                <label class="com-check-radio">
+                    <input type="radio" id="forSeller" name="method" ng-click="setFilters('vendorType', 'all')" ng-checked="vendorType == 'all'">
+                    <label for="forSeller"></label>
+                    公司报价
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="forPlatform" name="method" ng-click="setFilters('vendorType', 'self')" ng-checked="vendorType == 'self'">
+                    <label for="forPlatform"></label>
+                    我的报价
+                </label>
             </div>
-            <div class="sreach fr">
-                <span>发布时间&nbsp;</span>
-                <div class="date fl">
-                    <div class="data-input">
-                        <input type="text" ng-model="startDate"
-                               class="form-control select-adder" placeholder="起始时间"
-                               datepicker-popup="yyyy-MM-dd"
-                               is-open="condition.startDateOpen"
-                               max-date="endDate" current-text="今天" clear-text="清除" close-text="关闭"
-                               ng-click="openDatePicker($event, condition, 'startDateOpen',1)"
-                               datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                               ng-change="vaildDate(true)"
-                        />
-                        <button class="open" ng-click="openDatePicker($event, condition, 'startDateOpen')"></button>
-                    </div>
-                    <em>–</em>
-                    <div class="data-input">
-                        <input type="text" ng-model="endDate"
-                               class="form-control select-adder" placeholder="结束时间"
-                               datepicker-popup="yyyy-MM-dd"
-                               is-open="condition.endDateOpen"
-                               min-date="startDate" current-text="今天" clear-text="清除" close-text="关闭"
-                               ng-click="openDatePicker($event, condition, 'endDateOpen',2)"
-                               datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                               ng-change="changeEndDate()"
-                        />
-                        <button class="open" ng-click="openDatePicker($event, condition, 'endDateOpen')"></button>
-                    </div>
+            <div>
+                <div class="radio-block date-radio">
+                    发布时间:
+                    <label class="com-check-radio">
+                        <input type="radio" id="oneDay" name="date" ng-click="setFilters('dateArea', 'oneDay')" ng-checked="dateArea == 'oneDay'">
+                        <label for="oneDay"></label>
+                        1天
+                    </label>
+                    <label class="com-check-radio">
+                        <input type="radio" id="threeDay" name="date" ng-click="setFilters('dateArea', 'threeDay')" ng-checked="dateArea == 'threeDay'">
+                        <label for="threeDay"></label>
+                        3天
+                    </label>
+                    <label class="com-check-radio">
+                        <input type="radio" id="sevenDay" name="date" ng-click="setFilters('dateArea', 'sevenDay')" ng-checked="dateArea == 'sevenDay'">
+                        <label for="sevenDay"></label>
+                        7天
+                    </label>
+                    <label class="com-check-radio">
+                        <input type="radio" id="autoDay" name="date" ng-click="setFilters('dateArea', 'autoDay')" ng-checked="dateArea == 'autoDay'">
+                        <label for="autoDay"></label>
+                        自定义
+                    </label>
                 </div>
-                <div class="sreach-input fr">
-                    <input type="search" placeholder="品牌/物料名称/型号/规格/公司" class="form-control" ng-model="keyWord" ng-search="onSearch()"/>
-                    <a class="seek" href="javascript:void(0)" ng-click="onSearch()">搜索</a>
+                <div class="sreach fr">
+                    <div class="date fl" ng-show="dateArea == 'autoDay'">
+                        <div class="data-input">
+                            <input id="start" type="text" ng-model="startDelivery" readonly="readonly"
+                                   class="form-control select-adder" placeholder="起始时间"
+                                   datepicker-popup="yyyy-MM-dd"
+                                   is-open="condition[0].open"
+                                   current-text="今天" clear-text="清除" close-text="关闭"
+                                   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                                   ng-click="openDatePicker($event, condition, 0,1)"
+                                   ng-change="onDateCondition(1)"/>
+                            <button class="open" ng-click="openDatePicker($event, condition, 0)"></button>
+                        </div>
+                        <em>–</em>
+                        <div class="data-input">
+                            <input id="end" type="text" ng-model="endDelivery " readonly="readonly"
+                                   class="form-control select-adder" placeholder="结束时间"
+                                   datepicker-popup="yyyy-MM-dd"
+                                   is-open="condition[1].open"
+                                   current-text="今天" clear-text="清除" close-text="关闭"
+                                   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                                   ng-click="openDatePicker($event, condition, 1, 2)"
+                                   ng-change="onDateCondition(2)"/>
+                            <button class="open" ng-click="openDatePicker($event, condition, 1)"></button>
+                        </div>
+                    </div>
+                    <div style="width:258px;float:left"></div>
                 </div>
             </div>
+          <div>
+              <div class="radio-block date-radio">
+                  报价时间:
+                  <label class="com-check-radio">
+                      <input type="radio" id="oneDaySeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'oneDay')" ng-checked="dateAreaSeek == 'oneDay'">
+                      <label for="oneDaySeek"></label>
+                      1天
+                  </label>
+                  <label class="com-check-radio">
+                      <input type="radio" id="threeDaySeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'threeDay')" ng-checked="dateAreaSeek == 'threeDay'">
+                      <label for="threeDaySeek"></label>
+                      3天
+                  </label>
+                  <label class="com-check-radio">
+                      <input type="radio" id="sevenDaySeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'sevenDay')" ng-checked="dateAreaSeek == 'sevenDay'">
+                      <label for="sevenDaySeek"></label>
+                      7天
+                  </label>
+                  <label class="com-check-radio">
+                      <input type="radio" id="autoDaySeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'autoDay')" ng-checked="dateAreaSeek == 'autoDay'">
+                      <label for="autoDaySeek"></label>
+                      自定义
+                  </label>
+              </div>
+              <div class="sreach fr">
+                  <div class="date fl" ng-show="dateAreaSeek == 'autoDay'">
+                      <div class="data-input">
+                          <input id="startSeek" type="text" ng-model="startDate" readonly="readonly"
+                                 class="form-control select-adder" placeholder="起始时间"
+                                 datepicker-popup="yyyy-MM-dd"
+                                 is-open="condition[0].open1"
+                                 current-text="今天" clear-text="清除" close-text="关闭"
+                                 datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                                 ng-click="openDatePickerSeek($event, condition, 0,1)"
+                                 ng-change="onDateConditionSeek(1)"/>
+                          <button class="open" ng-click="openDatePickerSeek($event, condition, 0)"></button>
+                      </div>
+
+                      <em>–</em>
+                      <div class="data-input">
+                          <input id="endSeek" type="text" ng-model="endDate" readonly="readonly"
+                                 class="form-control select-adder" placeholder="结束时间"
+                                 datepicker-popup="yyyy-MM-dd"
+                                 is-open="condition[1].open1"
+                                 current-text="今天" clear-text="清除" close-text="关闭"
+                                 datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                                 ng-click="openDatePickerSeek($event, condition, 1, 2)"
+                                 ng-change="onDateConditionSeek(2)"/>
+                          <button class="open" ng-click="openDatePickerSeek($event, condition, 1)"></button>
+                      </div>
+                  </div>
+                  <div class="sreach-input fr">
+                      <input type="search" placeholder="品牌/物料名称/型号" class="form-control" ng-model="keyWord" ng-search="onSearch()"/>
+                      <a class="seek" href="javascript:void(0)" ng-click="onSearch()">搜索</a>
+                  </div>
+              </div>
+          </div>
         </div>
         <table ng-table="seekPurchaseTableParams">
             <thead>

+ 155 - 47
src/main/webapp/resources/view/vendor/forstore/seekPurchase.html

@@ -9,10 +9,13 @@
     .seek-purchase .seek-purchase-content .screen {
         font-size: 14px;
         line-height: 32px;
+        clear: both;
+        background: #f5f8fe;
+        margin-bottom: 15px;
+        padding-top: 4px;
+        padding-right: 13px;
     }
-    .seek-purchase .seek-purchase-content .screen .fl {
-        margin-left: 14px;
-    }
+
     .seek-purchase .seek-purchase-content .screen .fl select{
         width: 88px;
         height: 32px;
@@ -32,11 +35,11 @@
     .seek-purchase .seek-purchase-content .screen .sreach input{
         border: #5078cb 1px solid;
         height: 32px;
-        width: 267px;
+        width: 200px;
         box-shadow: none;
     }
     .seek-purchase .seek-purchase-content .screen .sreach .date{
-        margin-right: 6px;
+        margin-right: 30px;
     }
     .seek-purchase .seek-purchase-content .screen .sreach .date input{
         width: 117px;
@@ -761,6 +764,36 @@
     .similar-list li:hover {
         background: #ddd;
     }
+
+    /*筛选按钮*/
+    .check-filter {
+        height: auto;
+        line-height: 30px;
+        padding-left: 22px;
+        margin-top: 0;
+    }
+    .check-filter .sreach input {
+        width: 147px;
+    }
+    .check-filter .radio-block {
+        display: inline-block;
+        font-size: 14px;
+        width: 33.3%;
+    }
+    .check-filter .radio-block.date-radio {
+        width: 45%;
+    }
+    .check-filter .radio-block .com-check-radio {
+        font-weight: normal;
+        color: #666;
+        margin-right: 13px;
+    }
+    .check-filter .radio-block .com-check-radio:last-child {
+        margin-right: 0;
+    }
+    label {
+        margin-bottom: 5px;
+    }
 </style>
 <div class="user_right fr seek-purchase">
     <!--求购询价-->
@@ -788,66 +821,141 @@
     </div>
     <div class="seek-purchase-content">
         <!--搜索时间筛选-->
-        <div class="screen" style="background: #f5f8fe;height: 40px;margin-bottom: 15px;margin-top: 5px;padding-top: 4px;padding-right: 11px;">
-            <div class="fl">
-                <!--
-                截止时间&nbsp;
-                <select class="form-control select-adder" ng-model="deadline" ng-change="onSearch()" ng-init="deadline='全部'">
-                    <option value="全部">全部</option>
-                    <option value="已截止">已截止</option>
-                    <option value="正在生效">正在生效</option>
-                </select>
-                -->
-                <!--
-                报价状态&nbsp;
-                <select class="form-control select-adder" ng-model="status" ng-change="onSearch()" ng-init="status=200">
-                    <option value="200">待报价</option>
-                    <option value="201">已报价</option>
-                    <option value="202">已采纳</option>
-                </select>
-                -->
+        <div class="screen check-filter">
+            <div class="radio-block" style="display: block;">
+                求购筛选:
+                <label class="com-check-radio">
+                    <input type="radio" id="methodAll" name="method" ng-click="setFilters('vendorType', 'noOppor')" ng-checked="vendorType == 'noOppor'">
+                    <label for="methodAll"></label>
+                    全部
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="forSeller" name="method" ng-click="setFilters('vendorType', 'all')" ng-checked="vendorType == 'all'">
+                    <label for="forSeller"></label>
+                    公司商机
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="forPlatform" name="method" ng-click="setFilters('vendorType', 'self')" ng-checked="vendorType == 'self'">
+                    <label for="forPlatform"></label>
+                    我的商机
+                </label>
+            </div>
+            <div class="radio-block date-radio">
+                发布时间:
+                <label class="com-check-radio">
+                    <input type="radio" id="oneDay" name="date" ng-click="setFilters('dateArea', 'oneDay')" ng-checked="dateArea == 'oneDay'">
+                    <label for="oneDay"></label>
+                    1天
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="threeDay" name="date" ng-click="setFilters('dateArea', 'threeDay')" ng-checked="dateArea == 'threeDay'">
+                    <label for="threeDay"></label>
+                    3天
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="sevenDay" name="date" ng-click="setFilters('dateArea', 'sevenDay')" ng-checked="dateArea == 'sevenDay'">
+                    <label for="sevenDay"></label>
+                    7天
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="autoDay" name="date" ng-click="setFilters('dateArea', 'autoDay')" ng-checked="dateArea == 'autoDay'">
+                    <label for="autoDay"></label>
+                    自定义
+                </label>
             </div>
             <div class="sreach fr">
-                <span>求购筛选</span>
-                <select class="form-control select-adder vendor-type" ng-model="vendorType" ng-change="onVendorTypeChange(vendorType)">
-                    <option value="all">公司商机</option>
-                    <option value="self">我的商机</option>
-                    <option value="noOppor">全部</option>
-                </select>
-                <span>发布时间&nbsp;</span>
-                <div class="date fl">
+                <div class="date fl" ng-show="dateArea == 'autoDay'">
                     <div class="data-input">
-                        <input type="text" ng-model="startDate"
+                        <input id="start" type="text" ng-model="startDate" readonly="readonly"
                                class="form-control select-adder" placeholder="起始时间"
                                datepicker-popup="yyyy-MM-dd"
-                               is-open="condition.startDateOpen"
-                               max-date="endDate" current-text="今天" clear-text="清除" close-text="关闭"
-                               ng-click="openDatePicker($event, condition, 'startDateOpen',1)"
+                               is-open="condition[0].open"
+                               current-text="今天" clear-text="清除" close-text="关闭"
                                datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                               ng-change="vaildDate(true)"
-                        />
-                        <button class="open" ng-click="openDatePicker($event, condition, 'startDateOpen')"></button>
+                               ng-click="openDatePicker($event, condition, 0,1)"
+                               ng-change="onDateCondition(1)"/>
+                        <button class="open" ng-click="openDatePicker($event, condition, 0)"></button>
                     </div>
+
                     <em>–</em>
                     <div class="data-input">
-                        <input type="text" ng-model="endDate"
+                        <input id="end" type="text" ng-model="endDate" readonly="readonly"
                                class="form-control select-adder" placeholder="结束时间"
                                datepicker-popup="yyyy-MM-dd"
-                               is-open="condition.endDateOpen"
-                               min-date="startDate" current-text="今天" clear-text="清除" close-text="关闭"
-                               ng-click="openDatePicker($event, condition, 'endDateOpen',2)"
+                               is-open="condition[1].open"
+                               current-text="今天" clear-text="清除" close-text="关闭"
                                datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                               ng-change="changeEndDate()"
-                        />
-                        <button class="open" ng-click="openDatePicker($event, condition, 'endDateOpen')"></button>
+                               ng-click="openDatePicker($event, condition, 1, 2)"
+                               ng-change="onDateCondition(2)"/>
+                        <button class="open" ng-click="openDatePicker($event, condition, 1)"></button>
                     </div>
                 </div>
                 <div class="sreach-input fr">
-                    <input type="search" placeholder="品牌/物料名称/型号/规格/公司" class="form-control" ng-model="keyWord" ng-search="onSearch()"/>
+                    <input type="search" placeholder="品牌/物料名称/型号" class="form-control" ng-model="keyWord" ng-search="onSearch()"/>
                     <a class="seek" href="javascript:void(0)" ng-click="onSearch()">搜索</a>
                 </div>
             </div>
         </div>
+        <!--<div class="screen" style="background: #f5f8fe;height: 40px;margin-bottom: 15px;margin-top: 5px;padding-top: 4px;padding-right: 11px;">-->
+            <!--<div class="fl">-->
+                <!--&lt;!&ndash;-->
+                <!--截止时间&nbsp;-->
+                <!--<select class="form-control select-adder" ng-model="deadline" ng-change="onSearch()" ng-init="deadline='全部'">-->
+                    <!--<option value="全部">全部</option>-->
+                    <!--<option value="已截止">已截止</option>-->
+                    <!--<option value="正在生效">正在生效</option>-->
+                <!--</select>-->
+                <!--&ndash;&gt; -->
+                <!--&lt;!&ndash;-->
+                <!--报价状态&nbsp;-->
+                <!--<select class="form-control select-adder" ng-model="status" ng-change="onSearch()" ng-init="status=200">-->
+                    <!--<option value="200">待报价</option>-->
+                    <!--<option value="201">已报价</option>-->
+                    <!--<option value="202">已采纳</option>-->
+                <!--</select>-->
+                <!--&ndash;&gt;-->
+            <!--</div>-->
+            <!--&lt;!&ndash;<div class="sreach fr">&ndash;&gt;-->
+                <!--&lt;!&ndash;<span>求购筛选</span>&ndash;&gt;-->
+                <!--&lt;!&ndash;<select class="form-control select-adder vendor-type" ng-model="vendorType" ng-change="onVendorTypeChange(vendorType)">&ndash;&gt;-->
+                    <!--&lt;!&ndash;<option value="all">公司商机</option>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<option value="self">我的商机</option>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<option value="noOppor">全部</option>&ndash;&gt;-->
+                <!--&lt;!&ndash;</select>&ndash;&gt;-->
+                <!--&lt;!&ndash;<span>发布时间&nbsp;</span>&ndash;&gt;-->
+                <!--&lt;!&ndash;<div class="date fl">&ndash;&gt;-->
+                    <!--&lt;!&ndash;<div class="data-input">&ndash;&gt;-->
+                        <!--&lt;!&ndash;<input type="text" ng-model="startDate"&ndash;&gt;-->
+                               <!--&lt;!&ndash;class="form-control select-adder" placeholder="起始时间"&ndash;&gt;-->
+                               <!--&lt;!&ndash;datepicker-popup="yyyy-MM-dd"&ndash;&gt;-->
+                               <!--&lt;!&ndash;is-open="condition.startDateOpen"&ndash;&gt;-->
+                               <!--&lt;!&ndash;max-date="endDate" current-text="今天" clear-text="清除" close-text="关闭"&ndash;&gt;-->
+                               <!--&lt;!&ndash;ng-click="openDatePicker($event, condition, 'startDateOpen',1)"&ndash;&gt;-->
+                               <!--&lt;!&ndash;datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"&ndash;&gt;-->
+                               <!--&lt;!&ndash;ng-change="vaildDate(true)"&ndash;&gt;-->
+                        <!--&lt;!&ndash;/>&ndash;&gt;-->
+                        <!--&lt;!&ndash;<button class="open" ng-click="openDatePicker($event, condition, 'startDateOpen')"></button>&ndash;&gt;-->
+                    <!--&lt;!&ndash;</div>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<em>–</em>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<div class="data-input">&ndash;&gt;-->
+                        <!--&lt;!&ndash;<input type="text" ng-model="endDate"&ndash;&gt;-->
+                               <!--&lt;!&ndash;class="form-control select-adder" placeholder="结束时间"&ndash;&gt;-->
+                               <!--&lt;!&ndash;datepicker-popup="yyyy-MM-dd"&ndash;&gt;-->
+                               <!--&lt;!&ndash;is-open="condition.endDateOpen"&ndash;&gt;-->
+                               <!--&lt;!&ndash;min-date="startDate" current-text="今天" clear-text="清除" close-text="关闭"&ndash;&gt;-->
+                               <!--&lt;!&ndash;ng-click="openDatePicker($event, condition, 'endDateOpen',2)"&ndash;&gt;-->
+                               <!--&lt;!&ndash;datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"&ndash;&gt;-->
+                               <!--&lt;!&ndash;ng-change="changeEndDate()"&ndash;&gt;-->
+                        <!--&lt;!&ndash;/>&ndash;&gt;-->
+                        <!--&lt;!&ndash;<button class="open" ng-click="openDatePicker($event, condition, 'endDateOpen')"></button>&ndash;&gt;-->
+                    <!--&lt;!&ndash;</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;<div class="sreach-input fr">&ndash;&gt;-->
+                    <!--&lt;!&ndash;<input type="search" placeholder="品牌/物料名称/型号/规格/公司" class="form-control" ng-model="keyWord" ng-search="onSearch()"/>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<a class="seek" href="javascript:void(0)" ng-click="onSearch()">搜索</a>&ndash;&gt;-->
+                <!--&lt;!&ndash;</div>&ndash;&gt;-->
+            <!--&lt;!&ndash;</div>&ndash;&gt;-->
+        <!--</div>-->
         <table ng-table="seekPurchaseTableParams">
             <thead>
                 <tr>
@@ -867,7 +975,7 @@
                                 <span ng-if="seek.inquiry.enterprise.enName" title="{{seek.inquiry.enterprise.enName}}" ng-bind="seek.inquiry.enterprise.enName"></span>
                                 <span ng-if="!seek.inquiry.enterprise.enName" title="{{seek.userName}}" ng-bind="seek.userName"></span>
                             </div>
-                            <div class="date-bottom-item" ng-bind="seek.date | date:'yyyy-MM-dd HH:mm'"></div>
+                            <div class="date-bottom-item" ng-bind="seek.reDate | date:'yyyy-MM-dd HH:mm'"></div>
                         </div>
                     </td>
                     <td>

+ 10 - 10
src/main/webapp/resources/view/vendor/forstore/vendor_material.html

@@ -2047,12 +2047,12 @@
 								<span>全选</span>
 							</label>
 						</th>
-						<th width="120">品牌</th>
-						<th width="130">物料名称</th>
-						<th width="150">型号</th>
-						<th width="100">规格</th>
+						<th width="140">品牌</th>
+						<th width="140">物料名称</th>
+						<th width="160">型号</th>
+						<th width="120">规格</th>
 						<th width="100">规格书</th>
-						<th width="60">单位</th>
+						<!--<th width="60">单位</th> -->
 						<!--<th width="80">封装</th>-->
 						<th width="280">操作</th>
 					</tr>
@@ -2126,7 +2126,7 @@
 							 -
 							</div>
 						</td>
-						<td ng-bind="material.unit || 'PCS'" title="{{material.unit  || 'PCS'}}"></td>
+						<!--<td ng-bind="material.unit || 'PCS'" title="{{material.unit  || 'PCS'}}"></td>-->
 						<!--<td>-->
 							<!--<span ng-bind="material.encapsulation || '-'" title="{{material.encapsulation || '-'}}"></span>-->
 						<!--</td>-->
@@ -2207,7 +2207,7 @@
                                                     <div class="content margin10">
                                                         <!--<p class="title">库存</p>-->
                                                         <div class="input-list">
-                                                            <span class="tit" style="width: 84px">库存:</span><input type="number" class="wid70 form-control" name="reserve" title="库存" placeholder="数量"
+                                                            <span class="tit" style="width: 84px">库存(PCS):</span><input type="number" class="wid70 form-control" name="reserve" title="库存(PCS)" placeholder="数量"
                                                                                                ng-model="goods.editReserve" maxlength="9" ng-blur="setPriceMaxAmount(goods, false)" ng-class="{'error' : goods.editReserveInvalid}" oninput="if(value.length>9)value=value.slice(0,9)"/>
                                                         </div>
                                                         <div class="input-list">
@@ -2320,7 +2320,7 @@
 														<p class="title" ng-class="{'noBreak' : !goods.breakUp}" ng-if="goods.breakUp" ng-bind="goods.breakUp ? '可拆卖' : '不可拆卖'">不可拆卖</p>
 													</div>
 													<div class="content width130">
-														<p class="title"><span style="width:84px">库存:</span><span ng-bind="goods.reserve">9023492</span></p>
+														<p class="title"><span style="width:84px">库存(PCS):</span><span ng-bind="goods.reserve">9023492</span></p>
 														<p class="title"><span style="width:84px">最小起订量:</span><span ng-bind="goods.minBuyQty">90492</span></p>
 														<p class="title"><span style="width:84px">最小包装数:</span><span ng-bind="goods.minPackQty">980</span></p>
 														<!--<p class="title"><span style="width:84px">规格:</span><span ng-bind="goods.spec || '-'" title="{{goods.spec}}">980</span></p>-->
@@ -2411,7 +2411,7 @@
 													<div class="content margin10">
 														<!--<p class="title">库存</p>-->
 														<div class="input-list">
-															<span class="tit"  style="width: 84px">库存:</span><input type="number" class="wid70 form-control" name="reserve" title="库存" placeholder="数量" ng-model="goods.editReserve" ng-blur="setPriceMaxAmount(goods, true)"
+															<span class="tit"  style="width: 84px">库存(PCS):</span><input type="number" class="wid70 form-control" name="reserve" title="库存(PCS)" placeholder="数量" ng-model="goods.editReserve" ng-blur="setPriceMaxAmount(goods, true)"
 																							   maxlength="9" oninput="if(value.length>9)value=value.slice(0,9)"
 																							   ng-class="{'error' : goods.editReserveInvalid}"/>
 														</div>
@@ -2796,7 +2796,7 @@
 						<div class="clearfix">
 							<div class="detail">
 								<div class="detail-title">包装:<span ng-bind="goods.packaging">盘装</span></div>
-								<div class="detail-title">库存:<span ng-bind="goods.reserve">9023492</span></div>
+								<div class="detail-title">库存(PCS):<span ng-bind="goods.reserve">9023492</span></div>
 								<div class="detail-title">最小起订量:<span ng-bind="goods.minBuyQty">90492</span></div>
 							</div>
 							<div class="detail distance">