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

Merge remote-tracking branch 'origin/feature-201824-wangcz' into dev

wangcz 7 лет назад
Родитель
Сommit
611a5f639e
28 измененных файлов с 1167 добавлено и 512 удалено
  1. 8 16
      src/main/java/com/uas/platform/b2c/fa/payment/service/impl/BankInfoServiceImpl.java
  2. 4 4
      src/main/java/com/uas/platform/b2c/fa/settlement/controller/BillController.java
  3. 18 0
      src/main/java/com/uas/platform/b2c/fa/settlement/dao/BillDao.java
  4. 2 2
      src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/BillServiceImpl.java
  5. 2 11
      src/main/java/com/uas/platform/b2c/logistics/controller/AddressController.java
  6. 21 4
      src/main/java/com/uas/platform/b2c/logistics/service/AddressService.java
  7. 51 3
      src/main/java/com/uas/platform/b2c/logistics/service/impl/AddressServiceImpl.java
  8. 10 0
      src/main/java/com/uas/platform/b2c/prod/commodity/controller/ProductController.java
  9. 41 0
      src/main/java/com/uas/platform/b2c/prod/product/common/api/CommonCountController.java
  10. 9 0
      src/main/java/com/uas/platform/b2c/prod/store/dao/StoreInDao.java
  11. 7 7
      src/main/java/com/uas/platform/b2c/prod/store/facade/StoreApplyFacade.java
  12. 20 79
      src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreApplyFacadeImpl.java
  13. 12 8
      src/main/java/com/uas/platform/b2c/prod/store/service/StoreInService.java
  14. 1 1
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreApplyServiceImpl.java
  15. 20 24
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java
  16. 6 0
      src/main/java/com/uas/platform/b2c/trade/vendor/service/VendorIntroductionService.java
  17. 16 2
      src/main/java/com/uas/platform/b2c/trade/vendor/service/impl/VendorIntroductionServiceImpl.java
  18. 1 1
      src/main/webapp/resources/js/common/query/bill.js
  19. 3 3
      src/main/webapp/resources/js/sso/controllers/ssoAddressCtrl.js
  20. 94 56
      src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js
  21. 152 66
      src/main/webapp/resources/js/vendor/controllers/forstore/purchase_offer_ctrl.js
  22. 97 58
      src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js
  23. 6 3
      src/main/webapp/resources/view/sso/forstore/ssoCenter.html
  24. 3 3
      src/main/webapp/resources/view/sso/staffManagement.html
  25. 168 51
      src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html
  26. 226 54
      src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html
  27. 159 46
      src/main/webapp/resources/view/vendor/forstore/seekPurchase.html
  28. 10 10
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html

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

@@ -64,25 +64,16 @@ 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();
+		if(SystemSession.getUser().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);
-				}
+				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());
-			}
+			bankInfo.setDissociative(Type.PERSONAL.value());
 			bankInfo.setStatus(Status.ALLOW.value());
-		}else if(type == Type.SUP.value()) {
+		}else {
 			bankInfo.setEnuu(SystemSession.getUser().getEnterprise().getUu());
 			bankInfo.setDissociative(Type.ENTERPRISING.value());
 			if(bankInfo.getId() == null) {
@@ -198,7 +189,8 @@ public class BankInfoServiceImpl implements BankInfoService {
 		}else {
 			enuu = params[0];
 		}
-		if(operatorUserType == Type.BUYER.value()) {
+		//如果是个人用户登录
+		if(SystemSession.getUser().getEnterprise() == null) {
 			if (enuu != null) {
 				return bankInfoDao.findByUseruuAndEnuuAndOpraterUserTypeAndStatusOrderByNumAsc(SystemSession.getUser().getUserUU(), enuu, operatorUserType, status);
 			} else {

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

@@ -103,14 +103,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();
 	}
 

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

@@ -27,6 +27,15 @@ public interface BillDao extends JpaSpecificationExecutor<Bill>, JpaRepository<B
      */
     public List<Bill> getBillByUseruuAndEnuu(Long useruu, Long enuu);
 
+
+	/**
+	 * 根据用户UU号和企业UU号获取发票列表
+	 *
+	 * @param enuu   the enuu 企业enuu
+	 * @return the bill by useruu and enuu
+	 */
+	List<Bill> getBillByEnuu(Long enuu);
+
     /**
      * 根据个人UU号和是否个人用户获取发票列表
      *
@@ -55,6 +64,15 @@ public interface BillDao extends JpaSpecificationExecutor<Bill>, JpaRepository<B
      */
     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> getBillByEnuuAndKind(Long enuu, Integer kind);
+
     /**
      * 根据个人UU号和企业UU号和发票类型(增值税专用 和 增值税普通) 和是否个人用户获取发票列表
      *

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

@@ -63,7 +63,7 @@ public class BillServiceImpl implements BillService {
 		if (bill.getId() == null) {
 			List<Bill> billList = new ArrayList<Bill>();
 			if (Type.ENTERPRISING.value() == bill.getDissociative())
-				billList = billDao.getBillByUseruuAndEnuuAndKind(useruu, enuu, bill.getKind());
+				billList = billDao.getBillByEnuuAndKind(enuu, bill.getKind());
 			if (Type.PERSONAL.value() == bill.getDissociative())
 				billList = billDao.getBillByUseruuAndEnuuAndKindAndDissociative(useruu, Type.PERSONAL.value(),bill.getKind());
 			if (billList.size() > 0) {
@@ -85,7 +85,7 @@ public class BillServiceImpl implements BillService {
 	public List<Bill> getBills() {
 		Long useruu = SystemSession.getUser().getUserUU();
 		if (SystemSession.getUser().getEnterprise() != null) {
-			return billDao.getBillByUseruuAndEnuu(useruu, SystemSession.getUser().getEnterprise().getUu());
+			return billDao.getBillByEnuu(SystemSession.getUser().getEnterprise().getUu());
 		} else {
 			return billDao.getBillByUseruuAndDissociative(useruu, Type.PERSONAL.value());
 		}

+ 2 - 11
src/main/java/com/uas/platform/b2c/logistics/controller/AddressController.java

@@ -9,7 +9,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;
@@ -189,11 +188,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.getEnterpriseSendAddress(page);
 	}
 
 	/**
@@ -206,11 +201,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);
 	}
 
 	/**

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

@@ -1,11 +1,11 @@
 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 org.springframework.data.domain.Page;
+
+import java.util.List;
 
 /**
  * The interface AddressService.
@@ -97,6 +97,23 @@ public interface AddressService {
 	 */
 	public Page<Address> getEnterprise(final PageInfo info);
 
+	/**
+	 * 获取企业收货地址信息
+	 *
+	 * @param page the page 一页的参数
+	 * @return Page 返回Address的page对象
+	 */
+	Page<Address> getEnterpriseReceiveAddress(PageParams page);
+
+
+	/**
+	 * 获取企业发货地址的信息
+	 *
+	 * @param page 一页的参数
+	 * @return Page 返回Address的page对象
+	 */
+	Page<Address> getEnterpriseSendAddress(PageParams page);
+
 	/**
 	 * 2016年5月20日 下午6:38:48
 	 * 获取企业的默认账户

+ 51 - 3
src/main/java/com/uas/platform/b2c/logistics/service/impl/AddressServiceImpl.java

@@ -8,6 +8,7 @@ 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;
@@ -149,9 +150,16 @@ public class AddressServiceImpl implements AddressService {
 				}
 			}else {
 				address.setUseruu(user.getUserUU());
-				address.setEnuu(user.getEnterprise().getUu());
-				address.setUsetype((short)2);
-				num = addressDao.getCountByEnuuAndTypeAndUsetype(user.getEnterprise().getUu(), address.getType(), address.getUsetype());
+				if (user.getEnterprise() != null) {
+					address.setEnuu(user.getEnterprise().getUu());
+					address.setUsetype((short)2);
+					num = addressDao.getCountByEnuuAndTypeAndUsetype(user.getEnterprise().getUu(), address.getType(), address.getUsetype());
+				} else {
+					address.setDissociative(Type.PERSONAL.value());
+					address.setUsetype((short)1);
+					num =addressDao.getCountByUseruuTypeUsetypeAndDissociative(user.getUserUU(),address.getType(), address.getUsetype(), Type.PERSONAL.value());
+				}
+
 			}
 			address.setNum(num == 0 ? 1 : ++num);
 		}
@@ -237,6 +245,46 @@ public class AddressServiceImpl implements AddressService {
 		}, info);
 	}
 
+	/**
+	 * 获取企业收货地址信息
+	 *
+	 * @param page the page 一页的参数
+	 * @return Page 返回Address的page对象
+	 */
+	@Override
+	public Page<Address> getEnterpriseReceiveAddress(PageParams page) {
+		PageInfo info = new PageInfo(page);
+		info.filter("type", Type.Address_Shipping_Code.value());
+		if (SystemSession.getUser().getEnterprise() != null) {
+			info.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
+			info.filter("usetype", (short)2);
+		} else {
+			info.filter("useruu", SystemSession.getUser().getUserUU());
+			info.filter("usetype", (short)1);
+		}
+		return getEnterprise(info);
+	}
+
+	/**
+	 * 获取企业发货地址的信息
+	 *
+	 * @param page 一页的参数
+	 * @return Page 返回Address的page对象
+	 */
+	@Override
+	public Page<Address> getEnterpriseSendAddress(PageParams page) {
+		PageInfo info = new PageInfo(page);
+		info.filter("type", Type.Address_Sending_Code.value());
+		if (SystemSession.getUser().getEnterprise() != null) {
+			info.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
+			info.filter("usetype", (short)2);
+		} else {
+			info.filter("useruu", SystemSession.getUser().getUserUU());
+			info.filter("usetype", (short)1);
+		}
+		return getEnterprise(info);
+	}
+
 	@Override
 	public List<Address> findDefaultEnterpriseAddress(boolean bool) {
 		// boo判断查询的是收货地址还是发货地址(默认收货地址)

+ 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;
+    }
+
 }

+ 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) {
 		// 验证参数合法性

+ 12 - 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 {
 
@@ -216,4 +213,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;

+ 20 - 24
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;
@@ -810,4 +795,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);
+	}
 }

+ 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();
 	}

+ 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'
 			},

+ 3 - 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.getEnterprise(param, {}, function (page) {
                             $scope.isBiggerFive = false;
                             $scope.total = page.totalElements;
                             params.total(page.totalElements);
@@ -182,7 +182,7 @@ 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();
@@ -321,7 +321,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);

+ 94 - 56
src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js

@@ -29,6 +29,10 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
             } else {
                 $scope.tab = 'waitOffer';
             }
+
+          // 发布时间
+          $scope.dateArea = 'ALL';
+
           // 更换待报价状态
           $scope.vendorType = 'all'
           $scope.onVendorTypeChange = function () {
@@ -90,7 +94,6 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                         //     }
                         // }
                       $scope.seekListData = data;
-                      console.log($scope.seekListData)
                     }).error(function (response) {
                       toaster.pop('error', response);
                     });
@@ -654,63 +657,40 @@ 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.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();
           };
 
           /*获取时间戳代表的天数*/
@@ -1169,5 +1149,63 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
             })
           }
           });
+            // 筛选
+            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 == '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 - 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;
+                    }
+                }
+                $scope.seekPurchaseTableParams.page(1);
+                $scope.seekPurchaseTableParams.reload();
+            }
         }]);
 });

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

@@ -4,6 +4,12 @@ define(['app/app'], function(app) {
         $rootScope.active = 'vendor_seek_purchase';
         $scope.seekPurchaseRate = {};
         $scope.offer = {};
+
+        // 发布时间
+        $scope.dateArea = 'ALL';
+        // 求购时间
+        $scope.dateAreaSeek = 'ALL';
+
       seekPurchase.getSeekUrl({}, function(data) {
         var seekUrl = data.url;
         //   var seekUrl = 'http://10.1.51.82:24002';
@@ -21,10 +27,10 @@ define(['app/app'], function(app) {
                 // 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 +64,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) {

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

@@ -8,6 +8,10 @@ define(['app/app'], function (app) {
           $rootScope.active = 'vendor_seek_purchase';
           $scope.seekPurchaseRate = {};
           $scope.sayType = 'current'; // 报价类型,current为当前,replace为替代料
+
+            // 发布时间
+            $scope.dateArea = 'ALL';
+
           seekPurchase.getSeekUrl({}, function(data) {
             var seekUrl = data.url;
             // var seekUrl = 'http://10.1.51.82:24002';
@@ -273,71 +277,106 @@ 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 _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 == '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 - 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;
+                      }
+                  }
+                  $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) {

+ 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>

+ 3 - 3
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>
@@ -1065,7 +1065,7 @@
                 <tr>
                     <th>用户名</th>
                     <!--<th>UU账号</th>-->
-                    <th>手机</th>
+                    <th>手机</th>
                     <th>邮箱</th>
                     <th>操作</th>
                 </tr>

+ 168 - 51
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;
@@ -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">
     <!--求购询价-->
@@ -1000,56 +1032,141 @@
         </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="methodAll" name="method" ng-click="setFilters('vendorType', 'all')" ng-checked="vendorType == 'all'">
+                    <label for="methodAll"></label>
+                    全部
+                </label>
+                <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="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="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">

+ 226 - 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,199 @@
         </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: none;">
+                求购筛选:
+                <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="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="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="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="dateAllSeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'ALL')" ng-checked="dateAreaSeek == 'ALL'">
+                      <label for="dateAllSeek"></label>
+                      全部
+                  </label>
+                  <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>

+ 159 - 46
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,146 @@
     </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="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="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>

+ 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">