Browse Source

Merge remote-tracking branch 'origin/dev-mysql' into dev-mysql

hulh 8 years ago
parent
commit
f7008119d7
30 changed files with 806 additions and 326 deletions
  1. 4 0
      pom.xml
  2. 19 1
      src/main/java/com/uas/platform/b2c/common/account/controller/UserController.java
  3. 10 1
      src/main/java/com/uas/platform/b2c/common/account/service/UserService.java
  4. 21 0
      src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java
  5. 3 3
      src/main/java/com/uas/platform/b2c/common/search/constant/SearchUrl.java
  6. 1 1
      src/main/java/com/uas/platform/b2c/common/search/rpc/service/Impl/SearchServiceImpl.java
  7. 11 2
      src/main/java/com/uas/platform/b2c/core/filter/SSOInterceptor.java
  8. 12 5
      src/main/java/com/uas/platform/b2c/external/erp/commodity/service/impl/ProductDetailERPServiceImpl.java
  9. 22 16
      src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/OrderServiceImpl.java
  10. 1 0
      src/main/java/com/uas/platform/b2c/external/erp/order/util/ModelConverter.java
  11. 2 1
      src/main/java/com/uas/platform/b2c/external/erp/prod/service/impl/ProdServiceImpl.java
  12. 9 0
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductDao.java
  13. 0 12
      src/main/java/com/uas/platform/b2c/trade/order/model/Purchase.java
  14. 14 0
      src/main/java/com/uas/platform/b2c/trade/order/model/PurchaseDetail.java
  15. 9 0
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseDetailServiceImpl.java
  16. 6 4
      src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js
  17. 225 194
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_cart_ctrl.js
  18. 230 0
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_transfer_ctrl.js
  19. 35 4
      src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js
  20. 5 2
      src/main/webapp/resources/js/vendor/controllers/forstore/purchase_detail.js
  21. 5 4
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js
  22. 54 34
      src/main/webapp/resources/view/usercenter/forstore/buyer_cart.html
  23. 2 2
      src/main/webapp/resources/view/usercenter/forstore/buyer_invoice.html
  24. 1 1
      src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html
  25. 60 31
      src/main/webapp/resources/view/usercenter/forstore/order_pay.html
  26. 19 3
      src/main/webapp/resources/view/usercenter/header.html
  27. 3 0
      src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_unstandard_erp.html
  28. 3 0
      src/main/webapp/resources/view/vendor/forstore/vendor-invoice.html
  29. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_index.html
  30. 19 4
      src/main/webapp/resources/view/vendor/header.html

+ 4 - 0
pom.xml

@@ -432,6 +432,10 @@
 			<artifactId>classmate</artifactId>
 			<version>1.1.0</version>
 		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+		</dependency>
 	</dependencies>
 	<build>
 		<finalName>platform-b2c</finalName>

+ 19 - 1
src/main/java/com/uas/platform/b2c/common/account/controller/UserController.java

@@ -174,7 +174,18 @@ public class UserController {
 	public ResponseEntity<String> sendCheckCode(final String newUserEmail, final HttpSession session) {
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
+		Long checkTime = (Long)session.getAttribute("checkTime");
+		if (!StringUtils.isEmpty(checkTime)){
+			Long nowTime = new Date().getTime();
+			if((nowTime-checkTime)<60 * 1000){
+				throw new IllegalOperatorException("验证码发送频繁...");
+			}
+		}
 		if (!StringUtils.isEmpty(newUserEmail)) {
+			String pageToken = (String) session.getAttribute("pageToken");
+			if (pageToken == null || pageToken.equals("")) {
+				throw new IllegalOperatorException("页面信息获取失败!");
+			}
 			//发送邮件
 			ModelMap data = new ModelMap();
 			String checkCode = String.valueOf((int) ((Math.random() * 9 + 1) * 100000));
@@ -267,7 +278,7 @@ public class UserController {
 				throw new IllegalOperatorException("旧邮箱地址校验错误");
 			}
 			user.setUserEmail(newUserEmail);
-			user = userService.save(user);
+			user = userService.updateUserEmail(user.getUserTel(),newUserEmail,user.getUserUU());
 			if(sysUser.getEnterprise()!=null){
 				user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
 			}
@@ -309,6 +320,13 @@ public class UserController {
 	public ResponseEntity<String> sendTelCheckCode(final String newUserTel, final HttpSession session) {
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
+		Long checkTime = (Long)session.getAttribute("telCheckTime");
+		if (!StringUtils.isEmpty(checkTime)){
+			Long nowTime = new Date().getTime();
+			if((nowTime-checkTime)<60 * 1000){
+				throw new IllegalOperatorException("验证码发送频繁...");
+			}
+		}
 		if (!StringUtils.isEmpty(newUserTel)) {
 			//页面Token校验
 			String pageToken = (String) session.getAttribute("pageToken");

+ 10 - 1
src/main/java/com/uas/platform/b2c/common/account/service/UserService.java

@@ -159,5 +159,14 @@ public interface UserService {
 	 * @param uu
 	 * @return
 	 */
-	User updateUserTel(String oldTel,String newTel,Long uu);
+	User updateUserTel(String oldTel, String newTel, Long uu);
+
+	/**
+	 * 修改邮箱
+	 * @param tel
+	 * @param newEmail
+	 * @param uu
+	 * @return
+	 */
+	User updateUserEmail(String tel, String newEmail, Long uu);
 }

+ 21 - 0
src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java

@@ -482,4 +482,25 @@ public class UserServiceImpl implements UserService {
 			}
 			return null;
 		}
+
+	@Override
+	public User updateUserEmail(String tel, String newEmail, Long uu) {
+
+		try {
+			if(!StringUtils.isEmpty(tel) && !StringUtils.isEmpty(newEmail)) {
+				User user = userDao.findOne(uu);
+				//从账户中心返回的数据
+				List<com.uas.account.entity.User> users = AccountUtils.updateEmail(tel,newEmail);
+				//保存数据库
+				if (users != null && users.size() > 0) {
+					user.setUserEmail(users.get(0).getSecondUID());
+					user = userDao.save(user);
+					return user;
+				}
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		throw new IllegalOperatorException("数据更新失败...");
+	}
 }

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

@@ -16,17 +16,17 @@ public class SearchUrl {
      * 获取类目的数据
      *
      */
-    public static final String KIND_INFO_URL = "/search/kinds?keyword={keyword}?page={page}&size={size}";
+    public static final String KIND_INFO_URL = "/search/kinds?keyword={keyword}&page={page}&size={size}";
 
     /**
      * 搜索品牌的id
      */
-    public static final String BRAND_ID_URL = "/search/brandIds?keyword={keyword}?page={page}&size={size}";
+    public static final String BRAND_ID_URL = "/search/brandIds?keyword={keyword}&page={page}&size={size}";
 
     /**
      * 搜索品牌的具体信息
      */
-    public static final String BRAND_INFO_URL = "/search/brands?keyword={keyword}?page={page}&size={size}";
+    public static final String BRAND_INFO_URL = "/search/brands?keyword={keyword}&page={page}&size={size}";
 
 
     /**

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

@@ -222,7 +222,7 @@ public class SearchServiceImpl implements SearchService{
                 map.clear();
                 map.put("all",reMapA);
                 map.put("kind",reMapK);
-                map.put("componet",reMapC);
+                map.put("component",reMapC);
                 map.put("brand",reMapB);
                 return map;
             }catch (Exception e) {

+ 11 - 2
src/main/java/com/uas/platform/b2c/core/filter/SSOInterceptor.java

@@ -55,6 +55,9 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
     @Value("#{sys.profile}")
     private String profile;
 
+    @Value("#{sys.enUU}")
+    private String enUU;
+
     private final DeviceResolver deviceResolver = new LiteDeviceResolver();
 
     private HashMap<String, Collection<ConfigAttribute>> resourceMap;
@@ -188,9 +191,15 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
                 }
             }
         }
+        // 暂时在正式 过滤admin访问权限
         if (needPermission != null) {
-            return;
-//			throw new AccessDeniedException("无法访问,没有 " + needPermission + " 权限!");
+            if ("prod".equals(profile)) {
+                if (!user.getEnterprise().getUu().toString().equals(enUU)) {
+                    if ("进入优软商城后台进行运营维护".equals(needPermission)) {
+                        throw new AccessDeniedException("无法访问,没有 " + needPermission + " 权限!");
+                    }
+                }
+            }
         }
     }
 

+ 12 - 5
src/main/java/com/uas/platform/b2c/external/erp/commodity/service/impl/ProductDetailERPServiceImpl.java

@@ -3,9 +3,12 @@ package com.uas.platform.b2c.external.erp.commodity.service.impl;
 import com.uas.api.b2c_erp.seller.model.ProductDetailERP;
 import com.uas.api.b2c_erp.seller.service.ProductDetailERPService;
 import com.uas.platform.b2c.common.account.service.EnterpriseService;
+import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.constant.Status;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.core.support.log.ErpB2cBufferedLogger;
 import com.uas.platform.b2c.external.erp.commodity.util.ModelConverter;
+import com.uas.platform.b2c.prod.commodity.constant.IntegerConstant;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
 import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
 import com.uas.platform.b2c.prod.commodity.dao.ProductDetailDao;
@@ -13,8 +16,7 @@ import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.commodity.model.Product;
 import com.uas.platform.b2c.prod.commodity.model.ProductDetail;
 import com.uas.platform.b2c.prod.commodity.service.GoodsService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.uas.platform.core.logging.BufferedLoggerManager;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.CollectionUtils;
 
@@ -44,7 +46,10 @@ public class ProductDetailERPServiceImpl implements ProductDetailERPService {
     @Autowired
     private EnterpriseService enterpriseService;
 
-    private static final Logger logger = LoggerFactory.getLogger(ProductDetailERPServiceImpl.class);
+    private static final ErpB2cBufferedLogger logger = BufferedLoggerManager.getLogger(ErpB2cBufferedLogger.class);
+
+    @Autowired
+    private SysConf sysConf;
 
     @Override
     public boolean uploadProductDetailERP(List<ProductDetailERP> productDetailERPList) {
@@ -63,11 +68,13 @@ public class ProductDetailERPServiceImpl implements ProductDetailERPService {
             }
         }
         productDetailDao.save(productDetails);
+        logger.log("物料交易详情", "初始化交易详情,企业:" + SystemSession.getUser().getEnterprise().getEnName() + ",数量:" + productDetails.size());
         return true;
     }
 
     @Override
     public String getCurrency() {
+        logger.log("物料详情", "获取币别,企业:" + SystemSession.getUser().getEnterprise().getEnName());
         return enterpriseService.getCurrencyByRegisterAddress().getData().toString();
     }
 
@@ -75,7 +82,6 @@ public class ProductDetailERPServiceImpl implements ProductDetailERPService {
     public void updateReserve(List<ProductDetailERP> productDetailERPList) {
         List<ProductDetail> productDetails = new ArrayList<ProductDetail>();
         Long enuu = SystemSession.getUser().getEnterprise().getUu();
-        logger.info("size : " + productDetailERPList.size());
         for (ProductDetailERP productDetailERP : productDetailERPList) {
             List<Product> products = productDao.getProductByEnUUAndProdNum(enuu, productDetailERP.getCode());// 获取对应商城物料信息
             if (!CollectionUtils.isEmpty(products)) {
@@ -104,6 +110,7 @@ public class ProductDetailERPServiceImpl implements ProductDetailERPService {
                                 if (Double.compare(subtractDecimal.doubleValue(), good.getReserve()) < 0) {// 差值小于此批次数量,下架部分库存
                                     Goods nowGood = goodsDao.findOne(good.getId());
                                     good.setReserve(BigDecimal.valueOf(good.getReserve()).subtract(subtractDecimal).doubleValue());
+                                    good.setSelfSale(sysConf.getStoreid().equals(good.getStoreid())? IntegerConstant.B2C_SALE.toString() : IntegerConstant.SELF_SALE.toString());// 设置自营寄售
                                     goodsService.updateGoods(nowGood, good);
                                     goodsService.updateComponentTradeInfos(nowGood.getUuid());
                                     break;
@@ -124,7 +131,7 @@ public class ProductDetailERPServiceImpl implements ProductDetailERPService {
                 }
             }
         }
-
+        logger.log("物料详情", "更新物料库存信息,企业:" + SystemSession.getUser().getEnterprise().getEnName() + ",数量:" + productDetails.size());
         productDetailDao.save(productDetails);
     }
 }

+ 22 - 16
src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/OrderServiceImpl.java

@@ -13,7 +13,6 @@ import com.uas.platform.b2c.core.support.log.ErpB2cBufferedLogger;
 import com.uas.platform.b2c.external.erp.order.util.ModelConverter;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsHistoryDao;
 import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
-import com.uas.platform.b2c.prod.commodity.model.GoodsHistory;
 import com.uas.platform.b2c.prod.commodity.model.Product;
 import com.uas.platform.b2c.trade.order.dao.OrderDao;
 import com.uas.platform.b2c.trade.order.dao.PurchaseDao;
@@ -25,6 +24,7 @@ import com.uas.platform.core.model.Status;
 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 org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.util.CollectionUtils;
@@ -33,7 +33,9 @@ import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 public class OrderServiceImpl implements OrderService {
@@ -59,6 +61,8 @@ public class OrderServiceImpl implements OrderService {
 	@Autowired
 	private EnterpriseDao enterpriseDao;
 
+	private final Logger loggerInfo = Logger.getLogger(getClass());
+
 	private static final ErpB2cBufferedLogger logger = BufferedLoggerManager.getLogger(ErpB2cBufferedLogger.class);
 
 	@Override
@@ -96,8 +100,13 @@ public class OrderServiceImpl implements OrderService {
 				return null;
 			}
 		});
+
 		List<Order> orders = new ArrayList<Order>();
+		String sourceapp = "ERP";
+		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		loggerInfo.info(String.format(" erp总共下载订单数 %s", orders.size()));
 		for (Purchase purchase : purcs) {
+			Date startDate = new Date();
 			boolean codeExists = false;
 			Order order = ModelConverter.getOrder(purchase);
 			UserBaseInfo buyer = userBaseInfoDao.findUserByUserUU(purchase.getBuyeruu());
@@ -109,21 +118,21 @@ public class OrderServiceImpl implements OrderService {
 			if (enterprise != null) {// 设置买方企业信息
 				order.setBuyerEn(com.uas.platform.b2c.external.erp.common.util.ModelConverter.convert(enterprise));
 			}
-
 			for (OrderDetail orderDetail : order.getDetails()) {
-				List<GoodsHistory> goodsHistorys = goodsHistoryDao.findByBatchCode(orderDetail.getBatchCode());// 获取上架历史信息
-				if (!CollectionUtils.isEmpty(goodsHistorys)) {
-					orderDetail.setPublisheruu(goodsHistorys.get(0).getPublisherUU());// 添加发布人uu
-					List<Product> products = productDao.findByEnUUAndCmpUuId(SystemSession.getUser().getEnterprise().getUu(), goodsHistorys.get(0).getUuid());//获取物料信息
-					if (!CollectionUtils.isEmpty(products)) {
-						orderDetail.setCode(products.get(0).getProdNum());// 设置物料编号,有物料编号才回传到ERP
-						codeExists = true;
-					}
+				List<Product> products = productDao.findByEnUUAndCmpUuIdAndSourceApp(SystemSession.getUser().getEnterprise().getUu(), orderDetail.getUuid(), sourceapp);//获取物料信息
+				if (!CollectionUtils.isEmpty(products)) {
+					orderDetail.setCode(products.get(0).getProdNum());// 设置物料编号,有物料编号才回传到ERP
+					codeExists = true;
 				}
 			}
-			if (codeExists)
+			if (codeExists) {
 				orders.add(order);
+			}
+
+			Date endDate = new Date();
+			loggerInfo.info(String.format("处理历时" + (endDate.getTime() - startDate.getTime()) + "毫秒"));
 		}
+		logger.log("销售订单", "企业下载销售订单,企业:" + SystemSession.getUser().getEnterprise().getEnName() + "数量:" + orders.size());
 		return orders;
 	}
 
@@ -166,6 +175,7 @@ public class OrderServiceImpl implements OrderService {
 
 	@Override
 	public Long findAdminuu() {
+		logger.log("销售订单", "获取企业商城管理员,企业:" + SystemSession.getUser().getEnterprise().getEnName());
 		return SystemSession.getUser().getEnterprise().getEnAdminuu();
 	}
 
@@ -173,14 +183,10 @@ public class OrderServiceImpl implements OrderService {
 	public boolean backOrder(long[] orderids) {
 		for (long orderid : orderids) {
 			Purchase purchase = purchaseDao.findOne(orderid);
-//			if (Status.CONFIRMED.value() == purchase.getStatus()) {// 将确认收款的订单生成出货单
-//				purchaseService.purToBeShiped(orderid);
-//			}
-
 			purchase.setSendstatus(Status.DOWNLOADED.value());
 			purchaseDao.save(purchase);
-
 		}
+		logger.log("销售订单", "回写已下载订单,企业:" + SystemSession.getUser().getEnterprise().getEnName() + "数量:" + orderids.length);
 		return true;
 	}
 }

+ 1 - 0
src/main/java/com/uas/platform/b2c/external/erp/order/util/ModelConverter.java

@@ -72,6 +72,7 @@ public class ModelConverter {
 		orderDetail.setTax(detail.getTax());
 		orderDetail.setCurrency(detail.getCurrencyName());
 		orderDetail.setStatus(detail.getStatus());
+		orderDetail.setPublisheruu(detail.getSellPublishuu());
 		return orderDetail;
 	}
 

+ 2 - 1
src/main/java/com/uas/platform/b2c/external/erp/prod/service/impl/ProdServiceImpl.java

@@ -39,7 +39,6 @@ public class ProdServiceImpl implements ProdService {
 
     private static final ErpB2cBufferedLogger logger = BufferedLoggerManager.getLogger(ErpB2cBufferedLogger.class);
 
-    // TODO
     private final Logger loggerOut = Logger.getLogger(getClass());
 
     @Override
@@ -71,6 +70,7 @@ public class ProdServiceImpl implements ProdService {
         productService.matchAll();// 匹配上传的物料
         Date end = new Date();
         loggerOut.info("匹配完成, 历时" + (start.getTime() - end.getTime())/1000 + "秒");
+        logger.log("物料资料", "ERP匹配上传物料,企业:" + SystemSession.getUser().getEnterprise().getEnName());
     }
 
     @Override
@@ -109,6 +109,7 @@ public class ProdServiceImpl implements ProdService {
         if (!CollectionUtils.isEmpty(storeIn)) {
             return url = "/store/" + storeIn.get(0).getUuid();
         }
+        logger.log("物料资料", "ERP获取店铺路径,企业:" + SystemSession.getUser().getEnterprise().getEnName());
         return url;
     }
 }

+ 9 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductDao.java

@@ -88,6 +88,15 @@ public interface ProductDao extends JpaSpecificationExecutor<Product>, JpaReposi
      */
     List<Product> findByEnUUAndCmpUuId(Long enuu, String uuid);
 
+    /**
+     * 通过企业uu,标准器件uuid,来源获取物料信息
+     * @param enuu 企业uu
+     * @param uuid 标准器件uuid
+     * @param sourceapp 来源
+     * @return
+     */
+    List<Product> findByEnUUAndCmpUuIdAndSourceApp(Long enuu, String uuid, String sourceapp);
+
     /**
      * 获取该企业的产品信息
      * @param enuu 企业的uu号

+ 0 - 12
src/main/java/com/uas/platform/b2c/trade/order/model/Purchase.java

@@ -10,18 +10,6 @@ import com.uas.platform.core.persistence.StatusColumn;
 import org.hibernate.annotations.Cache;
 import org.hibernate.annotations.CacheConcurrencyStrategy;
 
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-import javax.persistence.Transient;
 import javax.persistence.*;
 import java.io.Serializable;
 import java.util.Date;

+ 14 - 0
src/main/java/com/uas/platform/b2c/trade/order/model/PurchaseDetail.java

@@ -83,6 +83,12 @@ public class PurchaseDetail extends Document {
 	@Column(name = "cmp_uuid")
 	private String uuid;
 
+	/**
+	 * 卖方上架人uu
+	 */
+	@Column(name = "pud_sellpublishuu")
+	private Long sellPublishuu;
+
 	/*
 	 * 开票的状态 700 待开发票 701 待收发票 702 已收发票 703 不需开票
 	 */
@@ -521,6 +527,14 @@ public class PurchaseDetail extends Document {
 		this.uuid = uuid;
 	}
 
+	public Long getSellPublishuu() {
+		return sellPublishuu;
+	}
+
+	public void setSellPublishuu(Long sellPublishuu) {
+		this.sellPublishuu = sellPublishuu;
+	}
+
 	/**
 	 * Gets original.
 	 *

+ 9 - 0
src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseDetailServiceImpl.java

@@ -4,6 +4,8 @@ import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.DoubleArith;
+import com.uas.platform.b2c.prod.commodity.dao.GoodsHistoryDao;
+import com.uas.platform.b2c.prod.commodity.model.GoodsHistory;
 import com.uas.platform.b2c.prod.commodity.service.GoodsService;
 import com.uas.platform.b2c.prod.product.common.service.CreateNumberService;
 import com.uas.platform.b2c.trade.order.dao.OrderDetailDao;
@@ -57,6 +59,9 @@ public class PurchaseDetailServiceImpl implements PurchaseDetailService {
 	
 	@Autowired
 	private CreateNumberService createNumberService;
+
+	@Autowired
+	private GoodsHistoryDao goodsHistoryDao;
 	
 	@Autowired
 	private SysConf sysConf;
@@ -194,6 +199,10 @@ public class PurchaseDetailServiceImpl implements PurchaseDetailService {
 			pDetail.setPurchase(purchase);
 			pDetail.setBillStatus(Status.TOBEMAKE_BILL.value());
 			pDetail.setStatusToBeConfirmed(sysConf.getAdminUU());
+			List<GoodsHistory> goodsHistories = goodsHistoryDao.findByBatchCode(pDetail.getBatchCode()); // 查询批次上架人
+			if (CollectionUtils.isNotEmpty(goodsHistories)) {
+				pDetail.setSellPublishuu(goodsHistories.get(0).getPublisherUU());
+			}
 			details.add(pDetail);
 		}
 		purchase.setCmpQty(uuids.size());

+ 6 - 4
src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js

@@ -10,6 +10,7 @@ define(['app/app'], function (app) {
         function ($scope, $rootScope, ngTableParams, BaseService,
             ShippingAddress, $modal, Enterprise, User, toaster, $http,
             $stateParams) {
+          document.title = '账户管理-优软商城';
           $rootScope.active = 'account_manager';
           $scope.tab = 'base';
           $scope.userInfo = $rootScope.userInfo;
@@ -793,6 +794,7 @@ define(['app/app'], function (app) {
   app.register.controller('UserEmailCtrl',
       ['$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval',
         function ($scope, $modalInstance, user, User, toaster, $interval) {
+          User.getPageToken();
           $scope.user = user;
           $scope.user.userEmail = null;
           $scope.user.newUserEmail = null;
@@ -874,8 +876,8 @@ define(['app/app'], function (app) {
                       }
                     }
                   }, 1000, 60);
-            }, function () {
-              $scope.codeSuccess = false;
+            }, function (response) {
+              toaster.pop('error', '错误', response.data);
             });
           };
 
@@ -1040,8 +1042,8 @@ define(['app/app'], function (app) {
                       }
                     }
                   }, 1000, 60);
-            }, function () {
-              $scope.codeSuccess = false;
+            }, function (response) {
+              toaster.pop('error', '错误', response.data);
             });
           };
 

+ 225 - 194
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_cart_ctrl.js

@@ -43,47 +43,47 @@ define(["app/app", 'jquery-summernote'], function(app) {
 		$scope.isChooseAll = false;
 
 		$scope.loadData = function (){
-			Cart.getPageInfo($scope.pageInfo, function(data) {
-				$scope.isDataLoading = false;
-				$scope.total = data.totalElements;
-				$scope.pageNum = data.totalPages;
+				Cart.getPageInfo($scope.pageInfo, function(data) {
+					$scope.isDataLoading = false;
+					$scope.total = data.totalElements;
+					$scope.pageNum = data.totalPages;
 
-				angular.forEach(data.content, function (cart) {
-					cart.buyCurrency = cart.currencyName.indexOf("RMB") > -1 ? "RMB" : "USD";
-					cart.isSelect = false;
-					//计算分段和统计一下价格
-					$scope.getPrice(cart);
-
-					//便于后期循环
-					$scope.carts.push(cart);
-					$scope.disabledAddAndSub(cart);
-					$scope.countByPage += 1;
-					var isContain = false;
-					for (var i = 0; i < $scope.cartMap.length; i++) {
-						if(angular.equals($scope.cartMap[i].name, cart.storeName)) {
-							$scope.cartMap[i].arr.push(cart);
-							isContain = true;
+					angular.forEach(data.content, function (cart) {
+						cart.buyCurrency = cart.currencyName.indexOf("RMB") > -1 ? "RMB" : "USD";
+						cart.isSelect = false;
+						//计算分段和统计一下价格
+						$scope.getPrice(cart);
+
+						//便于后期循环
+						$scope.carts.push(cart);
+						$scope.disabledAddAndSub(cart);
+						$scope.countByPage += 1;
+						var isContain = false;
+						for (var i = 0; i < $scope.cartMap.length; i++) {
+							if(angular.equals($scope.cartMap[i].name, cart.storeName)) {
+								$scope.cartMap[i].arr.push(cart);
+								isContain = true;
+							}
 						}
-					}
-					if(!isContain) {
-						var obj = {};
-						obj.name = cart.storeName;
-						obj.arr = [];
-						obj.arr.push(cart);
-						$scope.cartMap.push(obj);
-					}
-				});
-				$scope.cartIsEmpty = !$scope.carts.length ? true : false;
-				//设置全选的复选框
-				$scope.isChooseAll = $scope.isAllSelect($scope.carts);
+						if(!isContain) {
+							var obj = {};
+							obj.name = cart.storeName;
+							obj.arr = [];
+							obj.arr.push(cart);
+							$scope.cartMap.push(obj);
+						}
+					});
+					$scope.cartIsEmpty = !$scope.carts.length ? true : false;
+					//设置全选的复选框
+					$scope.isChooseAll = $scope.isAllSelect($scope.carts);
 
-				//设置店铺复选框的状态
-				angular.forEach($scope.cartMap, function (store) {
-					$scope.selectedStore[store.name] = $scope.isAllSelect(store.arr);
+					//设置店铺复选框的状态
+					angular.forEach($scope.cartMap, function (store) {
+						$scope.selectedStore[store.name] = $scope.isAllSelect(store.arr);
+					});
+				},function() {
+					toaster.pop('error', "提示", "获取购物车信息失败,请刷新页面");
 				});
-			},function() {
-				toaster.pop('error', "提示", "获取购物车信息失败,请刷新页面");
-			});
 		};
 
 		$scope.loadData();
@@ -120,7 +120,7 @@ define(["app/app", 'jquery-summernote'], function(app) {
 			//计算总价格
 			$scope.calculateAmount($scope.selectedStoreCarts);
 		};
-
+		
 		// 减少按钮,每次减minPackQty
 		$scope.reduce = function(cart){
 			if(cart.status == 1) {
@@ -139,7 +139,7 @@ define(["app/app", 'jquery-summernote'], function(app) {
 			//计算总价格
 			$scope.calculateAmount($scope.selectedStoreCarts);
 		};
-
+				
 		//根据搜索词过滤购物车信息,对类目、品牌、器件筛选
 		$scope.cartFilterCurrency = function(cartGroup) {
 			var result = false;
@@ -167,8 +167,8 @@ define(["app/app", 'jquery-summernote'], function(app) {
 
 		$scope.closeTable = function() {
 			console.log('0kds');
-		};
-		// //监听点击的位置,隐藏价格梯度的信息
+        };
+        // //监听点击的位置,隐藏价格梯度的信息
 		// document.onclick = function(event) {
 		// 	$scope.$apply(function () {
 		// 		angular.forEach($scope.carts, function (cart) {
@@ -181,9 +181,9 @@ define(["app/app", 'jquery-summernote'], function(app) {
 
 		//查看价格分段。
 		$scope.togglePrice = function (cart) {
-			cart.display = cart.display == 'block' ? 'none' : 'block';
-		};
-		// 统计已勾选批次
+            cart.display = cart.display == 'block' ? 'none' : 'block';
+        };
+        // 统计已勾选批次
 		var creatSelectArr = function(){
 			var arr = [];
 			angular.forEach($scope.carts, function(cart) {
@@ -220,20 +220,46 @@ define(["app/app", 'jquery-summernote'], function(app) {
 
 		// 输入购买量限制
 		$scope.blurNum = function (c) {
+			// c.inputError = 0;
+			// c.noInputError = 0;
 			if(isNaN(c.number)) {
 				toaster.pop('info','提示','请输入数字');
 				c.number = c.goods.minBuyQty;
 			}
 			c.number = Number(c.number);
 			if (c.number < c.goods.minBuyQty || !c.number) {
-				toaster.pop("info", "提示", "该商品最少购买" + c.goods.minBuyQty + "件");
-				c.number = c.goods.minBuyQty;
+				// toaster.pop("info", "提示", "该商品最少购买" + c.goods.minBuyQty + "件");
+				if (c.goods.breakUp) {
+					toaster.pop('info','提示','最小起订量为' + c.goods.minBuyQty);
+					// c.noInputError = 1;
+					c.number = c.goods.minBuyQty;
+					// $timeout(function () {
+					// 	c.noInputError = 1;
+					// }, 3000);
+				} else {
+					// c.inputError = 1;
+					toaster.pop('info','提示','最小起订量为' + c.goods.minBuyQty);
+					c.number = c.goods.minBuyQty;
+					// $timeout(function () {
+					// 	c.inputError = 0;
+					// }, 3000);
+				}
 			}else if(c.number > c.goods.reserve){
-				toaster.pop("info", "提示", "库存不足");
+				// toaster.pop("info", "提示", "库存不足");
 				if(c.goods.breakUp) {
+					toaster.pop("info", "提示", "库存不足");
+					// c.noInputError = 2;
 					c.number = c.goods.reserve;
+					// $timeout(function () {
+					// 	c.noInputError = 0;
+					// }, 3000);
 				}else {
+					// c.inputError = 2;
+					toaster.pop("info", "提示", "库存不足")
 					c.number = Number(NumberService.sub(c.goods.reserve, c.goods.reserve % c.goods.minPackQty));
+					// $timeout(function () {
+					// 	c.inputError = 0;
+					// }, 3000);
 				}
 				if(Number(c.number) < Number(c.goods.minBuyQty)) {
 					c.number = c.goods.minBuyQty;
@@ -242,8 +268,13 @@ define(["app/app", 'jquery-summernote'], function(app) {
 				if(!c.goods.breakUp) {
 					var remander = c.number % c.goods.minPackQty;
 					if(remander != 0) {
+						// c.inputError = 3;
+						toaster.pop("info", "提示", "不支持拆包且包装量为" + c.goods.minPackQty);
 						c.number = NumberService.sub(c.number, c.number % c.goods.minPackQty);
 						c.number = NumberService.add(c.number, c.goods.minPackQty);
+						// $timeout(function () {
+						// 	c.inputError = 0;
+						// }, 3000);
 					}
 					if(Number(c.number) > Number(c.goods.reserve)) {
 						c.number = NumberService.sub(c.goods.reserve, c.goods.reserve % c.goods.minPackQty);
@@ -328,8 +359,8 @@ define(["app/app", 'jquery-summernote'], function(app) {
 						return ;
 					}
 				}
-				$scope.totalMoneyInfo.countBT++;
-				$scope.selectedStoreCarts.push(cart);
+                $scope.totalMoneyInfo.countBT++;
+                $scope.selectedStoreCarts.push(cart);
 			}else {//取消勾选
 				$scope.totalMoneyInfo.countBT--;
 				$scope.selectedStoreCarts = $scope.selectedStoreCarts.filter(function(item) {
@@ -373,36 +404,36 @@ define(["app/app", 'jquery-summernote'], function(app) {
 			}
 		};
 
-		// 清空失效产品
-		$scope.deleteInvalid = function(){
+        // 清空失效产品
+        $scope.deleteInvalid = function(){
 			var arr = [];
-			angular.forEach($scope.carts, function(cart){
-				if(cart.status == 1){
-					arr.push(cart.id);
-				}
-			});
-			if(arr.length <= 0) {
-				toaster.pop('warning', '提示', '购物车内目前没有失效的产品');
-				return ;
-			}
-			var ids = angular.toJson(arr);
-			$modal.open({
-				templateUrl : 'static/view/common/modal/invalid_delete_modal.html',
-				controller : 'cartDeleteCtrl',
-				size : 'md',
-				resolve : {
-					description : function () {
-						return '是否删除购物车内的无效商品';
-					},
-					ids : function () {
-						return ids;
-					}
-				}
-			}).result.then(function () {
+            angular.forEach($scope.carts, function(cart){
+                if(cart.status == 1){
+                    arr.push(cart.id);
+                }
+            });
+            if(arr.length <= 0) {
+                toaster.pop('warning', '提示', '购物车内目前没有失效的产品');
+                return ;
+            }
+            var ids = angular.toJson(arr);
+            $modal.open({
+                templateUrl : 'static/view/common/modal/invalid_delete_modal.html',
+                controller : 'cartDeleteCtrl',
+                size : 'md',
+                resolve : {
+                    description : function () {
+                        return '是否删除购物车内的无效商品';
+                    },
+                    ids : function () {
+                        return ids;
+                    }
+                }
+            }).result.then(function () {
 				afterDeleteRefreshInfo(arr);
 			}, function () {
-			});
-		};
+            });
+        };
 
 		var afterDeleteRefreshInfo = function (arr) {
 			if(arr.length < 1) {
@@ -446,22 +477,22 @@ define(["app/app", 'jquery-summernote'], function(app) {
 			$scope.calculateAmount($scope.selectedStoreCarts);
 		}
 
-		$scope.deleteById = function(id){
-			var arr = [];
-			if(id != null){
-				arr.push(id);
-			}else {
-				angular.forEach($scope.carts, function(cart){
-					if(cart.isSelect){
-						arr.push(cart.id);
-					}
-				});
-			}
-			if(arr.length <= 0) {
+        $scope.deleteById = function(id){
+            var arr = [];
+            if(id != null){
+                arr.push(id);
+            }else {
+                angular.forEach($scope.carts, function(cart){
+                    if(cart.isSelect){
+                        arr.push(cart.id);
+                    }
+                });
+            }
+            if(arr.length <= 0) {
 				toaster.pop('warning', '提示', '请选择需要删除的商品');
 				return ;
 			}
-			var ids = angular.toJson(arr);
+            var ids = angular.toJson(arr);
 			$modal.open({
 				templateUrl : 'static/view/common/modal/delete_modal.html',
 				controller : 'cartDeleteCtrl',
@@ -470,9 +501,9 @@ define(["app/app", 'jquery-summernote'], function(app) {
 					description : function () {
 						return '是否删除此商品';
 					},
-					ids : function () {
-						return ids;
-					}
+                    ids : function () {
+                        return ids;
+                    }
 				}
 			}).result.then(function () {
 				afterDeleteRefreshInfo(arr);
@@ -499,8 +530,8 @@ define(["app/app", 'jquery-summernote'], function(app) {
 				});
 				return !contain;
 			});
-		};
-		//判断是空对象
+        };
+        //判断是空对象
 		$scope.isNullObject = function(obj) {
 			var isObject = true;
 			for(var k in obj) {
@@ -538,8 +569,8 @@ define(["app/app", 'jquery-summernote'], function(app) {
 					cart.contactSeller = false;
 				};
 			});
-		};
-		/**
+        };
+        /**
 		 * 监听点击的位置,隐藏相应的状态框
 		 * @param event
 		 */
@@ -576,8 +607,8 @@ define(["app/app", 'jquery-summernote'], function(app) {
 					if(!isThisTag) {
 						$scope.carts[i].contactSeller = false;
 					}
-				}
-			});
+                }
+            });
 		};
 
 
@@ -599,23 +630,23 @@ define(["app/app", 'jquery-summernote'], function(app) {
 		$scope.setAllCartCheck = function(checked) {
 			$scope.selectedStoreCarts = [];
 			angular.forEach($scope.cartMap, function(store) {
-				if(store.arr && store.arr.length > 0) {
-					var storeChecked = false;
-					angular.forEach(store.arr, function (cart) {
-						if(cart.status != 1 && checked) {//购物车的信息是否有效【是否下架】
-							cart.isSelect = checked;
-							storeChecked = true;
-							$scope.selectedStoreCarts.push(cart);
+					if(store.arr && store.arr.length > 0) {
+						var storeChecked = false;
+						angular.forEach(store.arr, function (cart) {
+							if(cart.status != 1 && checked) {//购物车的信息是否有效【是否下架】
+								cart.isSelect = checked;
+								storeChecked = true;
+								$scope.selectedStoreCarts.push(cart);
+							}else {
+								cart.isSelect = false;
+							}
+						});
+						if(storeChecked) {
+							$scope.selectedStore[store.name] = checked;//店铺的复选框也需要同步
 						}else {
-							cart.isSelect = false;
+							$scope.selectedStore[store.name] = false;//如果没有执行过storeChecked = true,则该店铺代表所有的都没有勾选
 						}
-					});
-					if(storeChecked) {
-						$scope.selectedStore[store.name] = checked;//店铺的复选框也需要同步
-					}else {
-						$scope.selectedStore[store.name] = false;//如果没有执行过storeChecked = true,则该店铺代表所有的都没有勾选
 					}
-				}
 
 			});
 		};
@@ -634,8 +665,8 @@ define(["app/app", 'jquery-summernote'], function(app) {
 				}
 			}
 			return !isAlldisabled&&isAllChecked;
-		};
-		/**
+        };
+        /**
 		 * 店铺选中状态信息
 		 */
 		$scope.selectedStore = {};
@@ -780,17 +811,17 @@ define(["app/app", 'jquery-summernote'], function(app) {
 			SessionService.set("buyNow",false);
 			var jsonOrderDetails = angular.toJson(result);
 			Order.saveByGroup({}, jsonOrderDetails, function(result){
-				if(result.code == 1) {
+                if(result.code == 1) {
 					if(result.message) {
 						toaster.pop('info', result.message);
 					}
-					$state.go('order_pay', {orderid :  enIdFilter(result.data.orderid)});
-				}else if(result.code == 7){
-					toaster.pop('info', '提示', "选中的购物车信息已经失效,将为您刷新界面之后重新操作");
+                    $state.go('order_pay', {orderid :  enIdFilter(result.data.orderid)});
+                }else if(result.code == 7){
+                    toaster.pop('info', '提示', "选中的购物车信息已经失效,将为您刷新界面之后重新操作");
 					$timeout(function () {
 						window.location.reload();
 					}, 1500);
-				}else {
+                }else {
 					toaster.pop('info', '提示', result.message);
 				}
 			}, function(res){
@@ -838,41 +869,41 @@ define(["app/app", 'jquery-summernote'], function(app) {
 			}
 
 		};
-		// 移入收藏后删除购物车操作
+        // 移入收藏后删除购物车操作
 		$scope.collectDelete = function(id){
-			var arr = [];
-			if(id != null){
-				arr.push(id);
-			}else {
-				angular.forEach($scope.carts, function(cart){
-					if(cart.isSelect){
-						arr.push(cart.id);
-					}
-				});
-			}
-			var ids = angular.toJson(arr);
-			Cart.deleteById({ids : ids}, function(data){
-				$rootScope.countCart = $rootScope.countCart - arr.length;
-
-				//更新选中的购物车信息
-				$scope.selectedStoreCarts = $scope.arrayFilterId($scope.selectedStoreCarts, arr);
-				//更新购物车信息
-				$scope.carts = $scope.arrayFilterId($scope.carts, arr);
-				//判断是否全部删除,如果全部删除,就将全选置为取消状态。
-				if($scope.carts.length == 0) {
-					$scope.isChooseAll = false;
+            var arr = [];
+            if(id != null){
+                arr.push(id);
+            }else {
+                angular.forEach($scope.carts, function(cart){
+                    if(cart.isSelect){
+                        arr.push(cart.id);
+                    }
+                });
+            }
+            var ids = angular.toJson(arr);
+            Cart.deleteById({ids : ids}, function(data){
+                $rootScope.countCart = $rootScope.countCart - arr.length;
+
+                //更新选中的购物车信息
+                $scope.selectedStoreCarts = $scope.arrayFilterId($scope.selectedStoreCarts, arr);
+                //更新购物车信息
+                $scope.carts = $scope.arrayFilterId($scope.carts, arr);
+                //判断是否全部删除,如果全部删除,就将全选置为取消状态。
+                if($scope.carts.length == 0) {
+                    $scope.isChooseAll = false;
 					$scope.cartIsEmpty = true;
-				}
+                }
 
-				//更新map中购物车信息
-				var deleteStoreName = [];
+                //更新map中购物车信息
+                var deleteStoreName = [];
 				angular.forEach($scope.cartMap, function(store) {
-					if(store.arr && store.arr.length > 0) {
-						store.arr = $scope.arrayFilterId(store.arr, arr)
-						if(!store.arr || !store.arr.length || store.arr.length == 0) {
-							deleteStoreName.push(store.name);
+						if(store.arr && store.arr.length > 0) {
+							store.arr = $scope.arrayFilterId(store.arr, arr)
+							if(!store.arr || !store.arr.length || store.arr.length == 0) {
+								deleteStoreName.push(store.name);
+							}
 						}
-					}
 				});
 				//删除$scope.cartMap多余的部分。
 				angular.forEach(deleteStoreName, function(storeName) {
@@ -881,27 +912,27 @@ define(["app/app", 'jquery-summernote'], function(app) {
 					});
 				});
 
-				//计算总金额
-				$scope.calculateAmount($scope.selectedStoreCarts);
+                //计算总金额
+                $scope.calculateAmount($scope.selectedStoreCarts);
 
-			}, function (res) {
-				toaster.pop('error', '系统错误', '购物车信息删除失败' + res.data);
-			});
+            }, function (res) {
+                toaster.pop('error', '系统错误', '购物车信息删除失败' + res.data);
+            });
 
 
 		};
-		// 移入收藏
-		$scope.collect = function(uuid, id) {
+        // 移入收藏
+        $scope.collect = function(uuid, id) {
 			if(uuid){
-				ComponentActive.getSimpleInfoByUuid({uuid: uuid}, { }, function(data){
-					var obj = {'componentid': data.id, 'kind': 2};
-					collectionService.saveEntity({ }, obj, function(data) {
-						$scope.collectDelete(id);
-						toaster.pop('success', '收藏成功');
-					}, function(response) {
-						toaster.pop('error', '收藏失败');
-					})
-				});
+                ComponentActive.getSimpleInfoByUuid({uuid: uuid}, { }, function(data){
+                    var obj = {'componentid': data.id, 'kind': 2};
+                    collectionService.saveEntity({ }, obj, function(data) {
+                        $scope.collectDelete(id);
+                        toaster.pop('success', '收藏成功');
+                    }, function(response) {
+                        toaster.pop('error', '收藏失败');
+                    })
+                });
 			}else{
 				var uuids = [];
 				angular.forEach($scope.cartMap, function(store){
@@ -915,14 +946,14 @@ define(["app/app", 'jquery-summernote'], function(app) {
 					toaster.pop('info', '你还未选择任何产品');
 					return;
 				}
-				collectionService.saveStores({ }, uuids, function(response){
+                collectionService.saveStores({ }, uuids, function(response){
 					if(response.data == "success"){
-						$scope.collectDelete();
-						toaster.pop('success', '收藏成功');
+                        $scope.collectDelete();
+                        toaster.pop('success', '收藏成功');
 					}
 				},function () {
-					toaster.pop('error', '收藏失败');
-				})
+                    toaster.pop('error', '收藏失败');
+                })
 			}
 		}
 
@@ -968,32 +999,32 @@ define(["app/app", 'jquery-summernote'], function(app) {
 		}
 	}]);
 
-	/**
-	 * 删除的逻辑
-	 */
+    /**
+     * 删除的逻辑
+     */
 	app.register.controller('cartDeleteCtrl', ['$scope', 'description', 'Cart', '$modalInstance', 'toaster', 'ids', function ($scope, description, Cart, $modalInstance, toaster,ids) {
 
-		$scope.confirmDelete = function () {
-			Cart.deleteById({ids : ids}, function(data){
-				toaster.pop('success', '成功删除');
-				$modalInstance.close()
-			}, function (res) {
-				toaster.pop('error', '系统错误', '购物车信息删除失败' + res.data);
-			});
-		};
-
-		$scope.confirmDeleteInvalid = function () {
-			Cart.deleteById({ids : ids}, function(data){
-				toaster.pop('success', '成功清除购物车内的无效产品');
-				$modalInstance.close()
-			}, function (res) {
-				toaster.pop('error', '系统错误', '购物车信息删除失败' + res.data);
-			});
-		};
-
-		$scope.cancleDelete = function () {
-			$modalInstance.dismiss();
-		}
+        $scope.confirmDelete = function () {
+            Cart.deleteById({ids : ids}, function(data){
+                toaster.pop('success', '成功删除');
+                $modalInstance.close()
+            }, function (res) {
+                toaster.pop('error', '系统错误', '购物车信息删除失败' + res.data);
+            });
+        };
+
+        $scope.confirmDeleteInvalid = function () {
+            Cart.deleteById({ids : ids}, function(data){
+                toaster.pop('success', '成功清除购物车内的无效产品');
+                $modalInstance.close()
+            }, function (res) {
+                toaster.pop('error', '系统错误', '购物车信息删除失败' + res.data);
+            });
+        };
+
+        $scope.cancleDelete = function () {
+            $modalInstance.dismiss();
+        }
 
 	}]);
 

+ 230 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_transfer_ctrl.js

@@ -398,6 +398,25 @@ define([ 'app/app' ], function(app) {
 		// //开始时,就获取账户信息
 		// getBuyAccount();
 
+		//新增账户
+		$scope.editAccount = function() {
+			var modalInstance = $modal.open({
+				templateUrl : 'static/view/common/bankInfoModal.html',
+				controller : 'AccountCtrl',
+				resolve : {
+					account : function() {
+						return {};
+					}
+				}
+			});
+
+			modalInstance.result.then(function(account) {
+				$scope.buyAccount = account;
+			}, function() {
+
+			});
+		};
+
 		//获取管理平台账户信息
 		var getSellerAccount = function() {
 			// 平台账户
@@ -768,6 +787,217 @@ define([ 'app/app' ], function(app) {
 		};
 	}]);
 
+	app.register.controller('AccountCtrl', ['$scope', '$modalInstance', 'account', 'bankInfoService', 'toaster', function($scope, $modalInstance, account, bankInfoService, toaster){
+
+		/**
+		 * 目前只支持的银行
+		 * @type {string[]}
+		 */
+		$scope.bankList = [
+			'中国银行','中国建设银行','中国工商银行','中国农业银行','交通银行','招商银行','中国民生银行',
+			'兴业银行','中信银行','中国光大银行','广发银行','平安银行','中国邮政储蓄银行','华夏银行','浦发银行'
+		];
+
+		var initIndex = function () {
+			$scope.selectIndex = -1;
+			$scope.downIndex = 0;
+		};
+
+		$scope.getItemFocus = function() {
+			$scope.showBankFrame = true;
+			$scope.matchData = true;
+			$scope.resultList = $scope.bankList;
+			initIndex();
+		};
+
+		$scope.onItemBlur = function () {
+			if ($scope.time){
+				clearTimeout($scope.time);
+			}
+			$scope.time = setTimeout(function () {
+				$scope.$apply(function () {
+					$scope.showBankFrame = false;
+				});
+			}, 200);
+		};
+		$scope.onKeyUp = function () {
+			var dom = document.getElementById("ulContent");
+			console.log(event);
+			if ($scope.showBankFrame){
+				if(event.keyCode == 40) { //监听到按下键
+					$scope.selectIndex ++;
+					if ($scope.downIndex == 5){
+						dom.scrollTop += 44;
+					}
+					if ($scope.downIndex <= 4){
+						$scope.downIndex++;
+					}
+					if($scope.selectIndex >= $scope.resultList.length){
+						$scope.selectIndex = 0;
+						dom.scrollTop = 0;
+						$scope.downIndex = 1;
+					}
+					$scope.account.bankname = $scope.resultList[$scope.selectIndex];
+					// $scope.containsAttr($scope.logistics.companyName);
+				} else if(event.keyCode == 38) { //监听到按上键
+					$scope.selectIndex --;
+					if ($scope.downIndex == 1){
+						dom.scrollTop -= 44;
+					}
+					if ($scope.downIndex >= 2){
+						$scope.downIndex--;
+					}
+					if($scope.selectIndex < 0){
+						$scope.selectIndex = $scope.resultList.length - 1;
+						dom.scrollTop = 2400;
+						$scope.downIndex = 5;
+					}
+					$scope.account.bankname = $scope.resultList[$scope.selectIndex];
+					// $scope.containsAttr($scope.logistics.companyName);
+				} else if(event.keyCode == 13) { //确定键
+					$scope.showBankFrame = false;
+				}
+			}
+		};
+
+		$scope.showList = function () {
+			$scope.showBankFrame = !$scope.showBankFrame;
+			$scope.matchData = true;
+			$scope.resultList = $scope.bankList;
+		};
+
+		$scope.inputBankName = function () {
+			$scope.showBankFrame = true;
+		};
+
+		$scope.fitBankToAccount = function (item) {
+			$scope.account.bankname = item;
+			$scope.showBankFrame = false;
+		};
+
+		$scope.account = account;
+		if($scope.account) {
+			$scope.title = "修改账户";
+		}else {
+			$scope.title = "新增账户";
+			$scope.account = {};
+		}
+
+		var matchArray = function () {
+			$scope.account.bankname = $scope.account.bankname ? $scope.account.bankname : '';
+			$scope.resultList = $scope.bankList.filter(function (data) {
+				if (data.indexOf($scope.account.bankname) >= 0){
+					return data;
+				}
+			});
+			if ($scope.resultList.length > 0){
+				$scope.matchData = true;
+			}else{
+				$scope.matchData = false;
+			}
+		};
+
+		/**
+		 * 验证新增账户格式
+		 * @param num
+		 */
+		$scope.checkAccount = function (num) {
+			var size;
+			if (num == 1){
+				//验证开户银行名称
+				$scope.showBankFrame = true;
+				matchArray();
+			}else if(num == 2){
+				//验证开户支行名称
+				if($scope.account.branchname){
+					size = $scope.account.branchname.replace(/[^\x00-\xff]/g,'**').length;
+					if (size > 40){
+						$scope.branchError = true;
+					}else {
+						$scope.branchError = false;
+					}
+					var telPatt = new RegExp("^[\u2E80-\u9FFF]+$");
+					if (telPatt.test($scope.account.branchname)){
+						$scope.branchPattError = false;
+					}else {
+						$scope.branchPattError = true;
+					}
+				}
+			}else if(num == 3){
+				//验证银行账号
+				if ($scope.account.number){
+					size = $scope.account.number.replace(/[^\x00-\xff]/g,'**').length;
+					if (size > 30){
+						$scope.numberError = true;
+					}else {
+						$scope.numberError = false;
+					}
+					var numPatt = new RegExp("^[0-9]+$");
+					if (numPatt.test($scope.account.number)){
+						$scope.numberPattError = false;
+					}else {
+						$scope.numberPattError = true;
+					}
+					validateRepeat($scope.account.number);
+				}
+			}else if(num == 4){
+				//验证开户名称
+				if ($scope.account.accountname){
+					size = $scope.account.accountname.replace(/[^\x00-\xff]/g,'**').length;
+					if (size > 100){
+						$scope.nameError = true;
+					}else {
+						$scope.nameError = false;
+					}
+				}
+			}
+		};
+
+		var validateRepeat = function (number) {
+			bankInfoService.getCountByNumber({type:1061, number:number}, {}, function (data) {
+				if (data.success){
+					if (data.data != 0){
+						$scope.repeatError = true;
+					}else {
+						$scope.repeatError = false;
+					}
+				}else {
+					toaster.pop("info", data.message);
+				}
+			});
+		};
+
+		$scope.confirm = function() {
+			var account = $scope.account;
+
+			if (!account){
+				toaster.pop('error', '请按要求填写正确的信息');
+				return ;
+			}
+			if (!account.bankname || !account.branchname || !account.number || !account.accountname){
+				toaster.pop('error', '请按要求填写正确的信息');
+				return ;
+			}
+			if (!$scope.matchData || $scope.branchError || $scope.branchPattError || $scope.numberError || $scope.numberPattError ||
+				$scope.nameError || $scope.repeatError){
+				toaster.pop('error', '请按要求填写正确的信息');
+				return ;
+			}
+
+			var method = 'saveBuyPersonalBank'; //不区分个人和企业账户
+			bankInfoService[method].call(null, null, $scope.account, function(data) {
+				toaster.pop('success', '保存成功');
+				$modalInstance.close(data)
+			},function (response) {
+				toaster.pop('warning', '保存信息失败');
+			});
+		};
+
+		$scope.cancel = function() {
+			$modalInstance.dismiss();
+		}
+
+	}]);
 
 	app.register.controller('BankInfoCtrl', ['$scope', '$modalInstance', 'account', 'kind', function($scope, $modalInstance, account, kind){
 		$scope.account = account;

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

@@ -416,25 +416,56 @@ define(['app/app'], function(app) {
 
 		// 输入购买量限制
 		$scope.blurNum = function (detail) {
+			// detail.inputError = 0;
+			// detail.noInputError = 0;
 			detail.number = Number(detail.number);
 			if (detail.number < detail.goodsHistory.minBuyQty || !detail.number) {
-				toaster.pop("info", "提示", "该商品最少购买" + detail.goodsHistory.minBuyQty + "件");
-				detail.number = detail.goodsHistory.minBuyQty;
+				// toaster.pop("info", "提示", "该商品最少购买" + detail.goodsHistory.minBuyQty + "件");
+				if(detail.goodsHistory.breakUp) {
+					// detail.noInputError = 1;
+					toaster.pop('info','提示','最小起订量为' + detail.goodsHistory.minBuyQty);
+					detail.number = detail.goodsHistory.minBuyQty;
+					// $timeout(function () {
+					// 	c.noInputError = 0;
+					// }, 3000);
+				}else{
+					// detail.inputError = 1;
+					toaster.pop('info','提示','最小起订量为' + detail.goodsHistory.minBuyQty);
+					detail.number = detail.goodsHistory.minBuyQty;
+					// $timeout(function () {
+					// 	detail.inputError = 0;
+					// },3000);
+				}
 			}else if(detail.number > detail.goodsHistory.reserve){
 				if(detail.goodsHistory.breakUp) {
+					// detail.noInputError = 2;
+					toaster.pop('info','提示','库存不足');
 					detail.number = detail.goodsHistory.reserve;
+					// $timeout(function () {
+					// 	c.noInputError = 0;
+					// }, 3000);
 				}else{
-					detail.number = Number(NumberService.sub(detail.goodsHistory.reserve, detail.goodsHistory.reserve %detail.goodsHistory.minPackQty));
+					// detail.inputError = 2;
+					toaster.pop('info','提示','库存不足');
+					detail.number = Number(NumberService.sub(detail.goodsHistory.reserve, detail.goodsHistory.reserve % detail.goodsHistory.minPackQty));
+					// $timeout(function () {
+					// 	detail.inputError = 0;
+					// },3000);
 				}
-				toaster.pop('info', '提示','库存不足');
+				// toaster.pop('info', '提示','库存不足');
 			}else {
 				if(!detail.goodsHistory.breakUp) {
 					var remandar = detail.number % detail.goodsHistory.minPackQty;
 					if(remandar != 0) {
+						// detail.inputError = 3;
+						toaster.pop("info", "提示", "不支持拆包且包装量为" + detail.goodsHistory.minPackQty);
 						detail.number = Number(NumberService.add(NumberService.sub(detail.number, detail.number % detail.goodsHistory.minPackQty), detail.goodsHistory.minPackQty));
 						if(detail.number > detail.goodsHistory.reserve) {
 							detail.number = NumberService.sub(detail.goodsHistory.reserve, detail.goodsHistory.reserve % detail.goodsHistory.minPackQty);
 						}
+						// $timeout(function () {
+						// 	detail.inputError = 0;
+						// },3000);
 					}
 				}
 			}

+ 5 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/purchase_detail.js

@@ -64,8 +64,11 @@ define(['app/app'], function(app) {
 					Installment.validationCount({purchaseId : $scope.purchase.id}, null, function (data) {
 						$scope.isShow = true;
 					}, function (error) {
-						// toaster.pop('error', error.data);
-						$scope.setShowNoAccountBox(true);
+						if (error.data === '当前企业没有设置分期功能权限,如有需要请联系客服') {
+							toaster.pop('error', error.data);
+						} else {
+							$scope.setShowNoAccountBox(true);
+						}
 						$scope.isShow = false;
 					});
 				} else {

+ 5 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -715,6 +715,7 @@ define(['app/app'], function(app) {
   app.register.controller('UserEmailCtrl',
       ['$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval',
         function ($scope, $modalInstance, user, User, toaster, $interval) {
+          User.getPageToken();
           $scope.user = user;
           $scope.user.userEmail = null;
           $scope.user.newUserEmail = null;
@@ -796,8 +797,8 @@ define(['app/app'], function(app) {
                       }
                     }
                   }, 1000, 60);
-            }, function () {
-              $scope.codeSuccess = false;
+            }, function (response) {
+              toaster.pop('error', '错误', response.data);
             });
           };
 
@@ -962,8 +963,8 @@ define(['app/app'], function(app) {
                       }
                     }
                   }, 1000, 60);
-            }, function () {
-              $scope.codeSuccess = false;
+            }, function (response) {
+              toaster.pop('error', '错误', response.data);
             });
           };
 

+ 54 - 34
src/main/webapp/resources/view/usercenter/forstore/buyer_cart.html

@@ -323,6 +323,7 @@
 		width: 70px;
 		height: 29px;
 		line-height: 29px;
+		border: 1px solid #ccc;
 	}
 	.shopCar .btn-wrap .number{
 		width: 124px;
@@ -498,16 +499,30 @@
 	.sure_oder select:disabled.select:hover{
 		cursor: not-allowed;
 	}
-	.com-del-box {
-		top: 101%!important ;
-		left: 24%!important ;
-	}
-	.com-del-box .title{
-		width: 100%!important ;
-	}
-	.com-del-box .title i{
-		background: none;
-	}
+	/*添加是否可拆买、库存不足等提示*/
+	/*.shopCar .oder_list dl .line02 em.tip{*/
+		/*display: inline-block;*/
+		/*margin-top: 6px;*/
+		/*width: 165px;*/
+		/*text-align: left;*/
+		/*font-size: 12px;*/
+		/*font-weight: normal ;*/
+		/*line-height: 18px;*/
+		/*color: #e64040;*/
+	/*}*/
+	/*.shopCar .oder_list dl .line02 em.tip i{*/
+		/*font-size: 12px;*/
+		/*font-style: normal ;*/
+		/*color: #e64040;*/
+	/*}*/
+	/*.shopCar .oder_list dl .line02 em.tips{*/
+		/*width: 124px;*/
+		/*text-align: center;*/
+	/*}*/
+	/*.shopCar .oder_list dl .line02 em.tip1{*/
+		/*width: 200px;*/
+		/*margin-left: -10px;*/
+	/*}*/
 </style>
 <div class="user_right fr" id="buyer_cart">
 	<!--订单中心-->
@@ -521,11 +536,11 @@
 		</div>
 		<div class="oder_list" style="margin-top: 0; background: #f5f5f5;">
 			<!--<div class="page">-->
-			<!--<ul>-->
-			<!--<li><a ng-click="jumpToPage(pageInfo.page - 1)">上一页</a> </li>-->
-			<!--<li>第<input ng-model="toPage" ng-search="jumpToPage(toPage)">页</li>-->
-			<!--<li><a ng-click="jumpToPage(pageInfo.page + 1)">下一页</a> </li>-->
-			<!--</ul>-->
+				<!--<ul>-->
+					<!--<li><a ng-click="jumpToPage(pageInfo.page - 1)">上一页</a> </li>-->
+					<!--<li>第<input ng-model="toPage" ng-search="jumpToPage(toPage)">页</li>-->
+					<!--<li><a ng-click="jumpToPage(pageInfo.page + 1)">下一页</a> </li>-->
+				<!--</ul>-->
 			<!--</div>-->
 			<!--购物车清单-->
 			<dl style="display: inline-block;" when-scrolled="scrollLoadData()">
@@ -616,10 +631,15 @@
 								<div class="btn-wrap">
 									<span class="number">
 										<a class="reduce" ng-disabled="cart.minusDisabled || cart.status == 1" ng-click="reduce(cart)">-</a>
-										<input type="text" ng-disabled="cart.status == 1" ng-model="cart.number" ng-blur="blurNum(cart)">
+										<input type="text" ng-disabled="cart.status == 1" ng-model="cart.number"  ng-blur="blurNum(cart)">
 										<a class="add" ng-disabled="cart.addDisabled || cart.status == 1" ng-click="add(cart)">+</a>
 									</span>
 									<i ng-if="cart.status == 2" style="color: #f00; margin-left: 32px;">库存紧张</i>
+									<!--<em class="tip tip1" ng-if="!cart.goods.breakUp && cart.inputError == 3">不支持拆包且包装数量为<i ng-bind="cart.minPackQty"></i></em>-->
+									<!--<em class="tip tips" ng-if="cart.goods.breakUp && cart.noInputError == 2">库存不足</em>-->
+									<!--<em class="tip tips" ng-if="!cart.goods.breakUp && cart.inputError == 2">库存不足</em>-->
+									<!--<em class="tip tips" ng-if="cart.goods.breakUp  && cart.noInputError == 1">最小起订量为<i ng-bind="cart.goods.minBuyQty"></i></em>-->
+									<!--<em class="tip tips" ng-if="!cart.goods.breakUp && cart.inputError == 1">最小起订量为<i ng-bind="cart.goods.minBuyQty"></i></em>-->
 								</div>
 							</span>
 							<span class="wd02" style="position: relative">
@@ -695,13 +715,14 @@
 						</dd>
 					</div>
 				</div>
-				<div class="no-store" ng-if="cartIsEmpty">
-					<img src="static/img/all/empty-cart.png">
-					<p>
-						您的购物车空空如也,请先挑选您想要购买的产品吧!
-						<br>
-						<a href="/">马上去逛一逛</a>
-					</p>
+				<div class="text-center row"ng-if="cartIsEmpty">
+					<div class="col-xs-offset-3 col-xs-2">
+						<img src="static/img/all/empty-cart.png">
+					</div>
+					<div class="col-xs-5">
+						<p class="grey f16">您的购物车空空如也,请先挑选您想要购买的产品吧!</p>
+						<a href=".">马上去逛一逛</a>&nbsp;<i class="fa fa-arrow-right"></i>
+					</div>
 				</div>
 				<p class="height16" ng-if="!cartIsEmpty">&nbsp</p>
 				<dd class="all_price fixed-bottom" ng-if="!cartIsEmpty && countByPage > 4">
@@ -757,7 +778,6 @@
 		</ul>
 	</div>-->
 </div>
-
 <style>
 	.no-store{
 		height: 255px;
@@ -783,14 +803,14 @@
 	}
 </style>
 <script>
-	$(function(){
-		$(window).bind("scroll",function() {
-			// 判断窗口的滚动条是否接近页面底部,这里的20可以自定义
-			if ($(document).scrollTop() + $(window).height() > $(document).height() - 330) {
-				$('.shopCar .oder_list dl .all_price.fixed-bottom').slideUp()
-			}else {
-				$('.shopCar .oder_list dl .all_price.fixed-bottom').slideDown()
-			}
-		})
-	})
+    $(function(){
+        $(window).bind("scroll",function() {
+            // 判断窗口的滚动条是否接近页面底部,这里的20可以自定义
+            if ($(document).scrollTop() + $(window).height() > $(document).height() - 330) {
+                $('.shopCar .oder_list dl .all_price.fixed-bottom').slideUp()
+            }else {
+                $('.shopCar .oder_list dl .all_price.fixed-bottom').slideDown()
+            }
+        })
+    })
 </script>

+ 2 - 2
src/main/webapp/resources/view/usercenter/forstore/buyer_invoice.html

@@ -639,9 +639,9 @@
                         <label class="col-md-2 control-label"><b class="text-inverse">*</b>联系电话:</label>
                         <div class="form-input-line">
                             <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initTelephone&&form.billTel.$error.required, 'bg-fff':!initFlag.initTelephone&&(!form.billTel.$invalid||!form.billTel.$touched)}" ng-model="bill.telephone" ng-focus="form.billTel.$touched = false" ng-blur="form.billTel.$touched = true; initFlag.initTelephone=false;" name="billTel"
-                                   ng-pattern="/^[0-9]*$/" ng-minlength="8" ng-maxlength="11" required="required" placeholder="请输入联系电话">
+                                   ng-pattern="/^[0-9\\-]*$/" ng-minlength="8" ng-maxlength="13" required="required" placeholder="请输入联系电话">
                         </div>
-                        <div class="text-inverse error col-md-3" ng-show="form.billTel.$touched&&form.billTel.$invalid" ng-bind="form.billTel.$error.required?'请填写联系电话':'请输入8-11位数字'"></div>
+                        <div class="text-inverse error col-md-3" ng-show="form.billTel.$touched&&form.billTel.$invalid" ng-bind="form.billTel.$error.required?'请填写联系电话':'请输入8-13位电话号码'"></div>
                     </div>
                     <div class="form-group address">
                         <label class="col-md-2 control-label"><b class="text-inverse">*</b>所在地区:</label>

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html

@@ -17,7 +17,7 @@
 						<div ng-if="buyAccountInfos.length > 1"><button class="change-count" ng-click="changebuyAccount(buyAccount.id)">更换账户</button></div>
 					</li>
 					<li class="no-count" ng-if="!buyAccount">
-						<span><i class="fa fa-exclamation-circle"></i>暂未设置付款账户,前往  <a href="user#/payCenter" target="_blank">设置付款账户</a></span>
+						<span><i class="fa fa-exclamation-circle"></i>暂未设置付款账户,前往  <a href="javascript:void(0)" ng-click="editAccount()">设置付款账户</a></span>
 					</li>
 				</ul>
 			</div>

+ 60 - 31
src/main/webapp/resources/view/usercenter/forstore/order_pay.html

@@ -581,6 +581,30 @@
 		font-size: 14px;
 		color: #fff;
 	}
+	/*添加是否可拆买、库存不足等提示*/
+	/*.sure_oder .btn-wrap .tip{*/
+		/*display: inline-block;*/
+		/*margin-top: 4px;*/
+		/*width: 150px;*/
+		/*text-align: left;*/
+		/*font-size: 12px;*/
+		/*font-weight: normal ;*/
+		/*line-height: 18px;*/
+		/*color: #e64040;*/
+	/*}*/
+	/*.sure_oder .btn-wrap .tip1{*/
+		/*width: 200px;*/
+		/*margin-left: -10px;*/
+	/*}*/
+	/*.sure_oder .btn-wrap .tip i{*/
+		/*font-size: 12px;*/
+		/*font-style: normal ;*/
+		/*color: #e64040;*/
+	/*}*/
+	/*.sure_oder .btn-wrap em.tips{*/
+		/*width: 124px;*/
+		/*text-align: center;*/
+	/*}*/
 </style>
 <!--右侧主体部分-->
 <div class="user_right fr" id="pay-cart">
@@ -698,34 +722,39 @@
 								<p><a href="product/brand/{{detail.branduuid}}/" target="_blank" style="color: #323232">品牌:<b ng-bind="detail.brName" style="color: #323232" title="{{detail.brName}}"></b></a></p>
 							</div>
                         </span>
-							<span class="wd01" ng-if="order.status == 501">
+						<span class="wd01" ng-if="order.status == 501">
 							交期 :
 							<i ng-if="detail.goodsHistory.b2cMinDelivery == detail.goodsHistory.b2cMaxDelivery" ng-bind="detail.goodsHistory.b2cMinDelivery"></i>
 							<i ng-if="detail.goodsHistory.b2cMinDelivery != detail.goodsHistory.b2cMaxDelivery" ng-bind="detail.goodsHistory.b2cMinDelivery + '-' + detail.goodsHistory.b2cMaxDelivery"></i>
-								<!--{{detail.goodsHistory.b2cMinDelivery}}-{{detail.goodsHistory.b2cMaxDelivery}}-->
+							<!--{{detail.goodsHistory.b2cMinDelivery}}-{{detail.goodsHistory.b2cMaxDelivery}}-->
 						</span>
-							<span class="wd01" ng-if="order.status != 501">
+						<span class="wd01" ng-if="order.status != 501">
 							交期 :
 						<i ng-if="detail.b2cMinDelivery == detail.b2cMaxDelivery" ng-bind="detail.b2cMinDelivery"></i>
 						<i ng-if="detail.b2cMinDelivery != detail.b2cMaxDelivery" ng-bind="detail.b2cMinDelivery + '-' + detail.b2cMaxDelivery"></i>
 						</span>
-							<span>
+						<span>
 							<select class="select" ng-model="detail.currencyName" ng-if="order.buyNow&&(order.status == 501)&&(detail.goodsHistory.currencyName=='RMB-USD')" ng-change="changeCurrency(detail)">
 								<option value="RMB" selected="selected" ng-bind="detail.rmbUnitPrice | formateNumber : 6 | currencySysmbol : 'RMB'"></option>
 								<option value="USD" ng-bind="detail.usdUnitPrice | formateNumber : 6 | currencySysmbol : 'USD'"></option>
 							</select>
 						</span>
-							<span class="wd01" ng-if="(order.status == 501)&&(detail.goodsHistory.currencyName == 'RMB')" ng-bind="detail.rmbUnitPrice | formateNumber : 6 | currencySysmbol : 'RMB'"></span>
-							<span class="wd01" ng-if="(order.status == 501)&&(detail.goodsHistory.currencyName == 'USD')" ng-bind="detail.usdUnitPrice | formateNumber : 6 | currencySysmbol : 'USD'"></span>
-							<span class="wd01" ng-bind="detail.taxUnitprice | formateNumber : 6 | currencySysmbol : 'RMB'" ng-if="detail.currencyName.indexOf('RMB') > -1 && order.status != 501"></span>
-							<span class="wd01" ng-bind="detail.taxUnitprice | formateNumber : 6 | currencySysmbol : 'USD'" ng-if="detail.currencyName.indexOf('USD') > -1 && order.status != 501"></span>
-							<span class="wd01">
+						<span class="wd01" ng-if="(order.status == 501)&&(detail.goodsHistory.currencyName == 'RMB')" ng-bind="detail.rmbUnitPrice | formateNumber : 6 | currencySysmbol : 'RMB'"></span>
+						<span class="wd01" ng-if="(order.status == 501)&&(detail.goodsHistory.currencyName == 'USD')" ng-bind="detail.usdUnitPrice | formateNumber : 6 | currencySysmbol : 'USD'"></span>
+						<span class="wd01" ng-bind="detail.taxUnitprice | formateNumber : 6 | currencySysmbol : 'RMB'" ng-if="detail.currencyName.indexOf('RMB') > -1 && order.status != 501"></span>
+						<span class="wd01" ng-bind="detail.taxUnitprice | formateNumber : 6 | currencySysmbol : 'USD'" ng-if="detail.currencyName.indexOf('USD') > -1 && order.status != 501"></span>
+						<span class="wd01">
                             <div class="btn-wrap">
                             <span class="number add-minus" ng-if="order.status == 501">
                                 <a href="javascript:void(0)" class="reduce" ng-click="reduce(detail)" ng-disabled="detail.minusDisabled">-</a>
                                 <input type="text" ng-model="detail.number" ng-readonly="order.status != 501" ng-blur="blurNum(detail)">
                                 <a href="javascript:void(0)" class="add" ng-click="add(detail)" ng-disabled="detail.addDisabled">+</a>
                             </span>
+							<!--<em class="tip tip1" ng-if="!detail.goodsHistory.breakUp && detail.inputError == 3">不支持拆包且包装数量为<i ng-bind="detail.goodsHistory.minPackQty"></i></em>-->
+							<!--<em class="tip tips" ng-if="!detail.goodsHistory.breakUp && detail.inputError == 2">库存不足</em>-->
+							<!--<em class="tip tips" ng-if="detail.goodsHistory.breakUp && detail.noInputError == 2">库存不足</em>-->
+							<!--<em class="tip tips" ng-if="!detail.goodsHistory.breakUp && detail.inputError == 1">最小起订量为<i ng-bind="detail.goodsHistory.minBuyQty"></i></em>-->
+							<!--<em class="tip tips" ng-if="detail.goodsHistory.breakUp && detail.noInputError == 1">最小起订量为<i ng-bind="detail.goodsHistory.minBuyQty"></i></em>-->
 							<span ng-if="order.status != 501" ng-bind="detail.number" class="number" style="border: none;"></span>
                             </div>
                         </span>
@@ -761,7 +790,7 @@
 									<i ng-bind="detail.remark">金石为开取数据五块钱叫稍微亲上加亲</i>
 								</div>
 								<em ng-if="order.status!=501 && !detail.remark">&nbsp;</em>
-								<!--<em ng-if="order.status!=501" ng-bind="detail.remark" style="color: #333; line-height: 20px; display: inline-block; padding-top: 10px;"></em>-->
+                        		<!--<em ng-if="order.status!=501" ng-bind="detail.remark" style="color: #333; line-height: 20px; display: inline-block; padding-top: 10px;"></em>-->
 							</span>
 						</dd>
 						<dd class="oder-remark">
@@ -816,17 +845,17 @@
 						</dd>
 						<div class="self-list" ng-if="order.status==501 && deliveryList[details[0].storeid].method == 1303">
 							<!--自提点列表-->
-							<ul class="self-advice" ng-if="order.status == 501">
-								<li ng-repeat="item in takeSelfMap[details[0].storeid]">
-									<label class="check-act">
-										<input type="radio" id="{{item.id}}" name="1" ng-click="updateTakeSelf(details[0].storeid, item)"/>
-										<label for="{{item.id}}"></label>
-									</label>
-									<strong style="margin-left: 0" ng-bind="item.takename"></strong>
-									<strong>地址:<i ng-bind="item.area"></i>&nbsp;&nbsp;<i ng-bind="item.detailAddress"></i></strong>
-									<strong>营业时间:<i ng-bind="item.businesstime">周一至周五 8:30-18:00</i></strong>
-								</li>
-							</ul>
+								<ul class="self-advice" ng-if="order.status == 501">
+									<li ng-repeat="item in takeSelfMap[details[0].storeid]">
+										<label class="check-act">
+											<input type="radio" id="{{item.id}}" name="1" ng-click="updateTakeSelf(details[0].storeid, item)"/>
+											<label for="{{item.id}}"></label>
+										</label>
+										<strong style="margin-left: 0" ng-bind="item.takename"></strong>
+										<strong>地址:<i ng-bind="item.area"></i>&nbsp;&nbsp;<i ng-bind="item.detailAddress"></i></strong>
+										<strong>营业时间:<i ng-bind="item.businesstime">周一至周五 8:30-18:00</i></strong>
+									</li>
+								</ul>
 						</div>
 						<dd class="line60" ng-if="order.status!=501 && (takeList ? takeList[details[0].storeid] : takeSelf)">
 							<span class="user-address" style="padding-left: 40px;" ng-if="takeList && takeList[details[0].storeid]">
@@ -841,16 +870,16 @@
 							</span>
 						</dd>
 						<!--<div class="self-list" ng-if="order.status!=501">-->
-						<!--<span ng-if="takeList">-->
-						<!--<strong style="margin-left: 0" ng-bind="takeList[details[0].storeid].takename"></strong>-->
-						<!--<strong>地址:<i ng-bind="takeList[details[0].storeid].area"></i>&nbsp;&nbsp;<i ng-bind="takeList[details[0].storeid].detailAddress"></i></strong>-->
-						<!--<strong>营业时间:<i ng-bind="takeList[details[0].storeid].businesstime">周一至周五 8:30-18:00</i></strong>-->
-						<!--</span>-->
-						<!--<span ng-if="!takeList && takeSelf">-->
-						<!--<strong style="margin-left: 0" ng-bind="takeSelf.takename"></strong>-->
-						<!--<strong>地址:<i ng-bind="takeSelf.area"></i>&nbsp;&nbsp;<i ng-bind="takeSelf.detailAddress"></i></strong>-->
-						<!--<strong>营业时间:<i ng-bind="takeSelf.businesstime">周一至周五 8:30-18:00</i></strong>-->
-						<!--</span>-->
+							<!--<span ng-if="takeList">-->
+								<!--<strong style="margin-left: 0" ng-bind="takeList[details[0].storeid].takename"></strong>-->
+								<!--<strong>地址:<i ng-bind="takeList[details[0].storeid].area"></i>&nbsp;&nbsp;<i ng-bind="takeList[details[0].storeid].detailAddress"></i></strong>-->
+								<!--<strong>营业时间:<i ng-bind="takeList[details[0].storeid].businesstime">周一至周五 8:30-18:00</i></strong>-->
+							<!--</span>-->
+							<!--<span ng-if="!takeList && takeSelf">-->
+								<!--<strong style="margin-left: 0" ng-bind="takeSelf.takename"></strong>-->
+								<!--<strong>地址:<i ng-bind="takeSelf.area"></i>&nbsp;&nbsp;<i ng-bind="takeSelf.detailAddress"></i></strong>-->
+								<!--<strong>营业时间:<i ng-bind="takeSelf.businesstime">周一至周五 8:30-18:00</i></strong>-->
+							<!--</span>-->
 						<!--</div>-->
 					</div>
 					<dd class="pay_price">

+ 19 - 3
src/main/webapp/resources/view/usercenter/header.html

@@ -169,7 +169,7 @@
         position: absolute;
         left: 0;
         top: 100%;
-        right: 61px;
+        right: 72px;
         list-style: none;
         -webkit-padding-start: 0;
         background: #ffffff;
@@ -190,6 +190,15 @@
         background: #EEEEEE;
         cursor: pointer;
     }
+    #mall-search .association li.similar-title {
+        font-size: 16px;
+        font-weight: bold;
+        cursor: default;
+        border-top: 1px solid #ccc;
+    }
+    #mall-search .association li.similar-title:first-child {
+        border-top: none;
+    }
     .association.none{
         border: none !important;
     }
@@ -212,8 +221,15 @@
             <input type="text" ng-model="keyword" ng-change="onChange()" ng-search="search()" ng-focus="onFocus()" ng-blur="onBlur()" ng-keyup="onKeyup()"placeholder="型号/类目/品牌" />
             <a class="seek" ng-click="search()">搜索</a>
             <ul class="association" ng-show="associate || associateEnter"  ng-class="{'none': !associate || !associateEnter}" ng-mouseenter="onAssociateEnter()" ng-mouseleave="onAssociateLeave()">
-                <li ng-repeat="as in associates" ng-bind="as" ng-class="{'active': $index==selectIndex}"
-                    ng-click="onAssociateClick(as)"></li>
+                <li class="similar-title" ng-if="associates.component && associates.component.length > 0">型号:</li>
+                <li ng-repeat="as in associates.component" ng-bind="as.code" ng-class="{'active': $index==selectIndex}"
+                    ng-click="onAssociateClick(as.code)"></li>
+                <li class="similar-title" ng-if="associates.component && associates.brand.length > 0">品牌:</li>
+                <li ng-repeat="as in associates.brand" ng-bind="as.nameCn" ng-class="{'active': $index==selectIndex}"
+                    ng-click="onAssociateClick(as.nameCn)"></li>
+                <li class="similar-title" ng-if="associates.component && associates.kind.length > 0">类目:</li>
+                <li ng-repeat="as in associates.kind" ng-bind="as.nameCn" ng-class="{'active': $index==selectIndex}"
+                    ng-click="onAssociateClick(as.nameCn)"></li>
             </ul>
         </div>
     </div>

+ 3 - 0
src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_unstandard_erp.html

@@ -110,6 +110,9 @@
 		border-top: none;
 		border-bottom: #e8e8e8 1px solid;
         overflow: inherit;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
 	}
 	.public-tab.table>tbody>tr>td a{
 		margin: 0 10px;

+ 3 - 0
src/main/webapp/resources/view/vendor/forstore/vendor-invoice.html

@@ -251,6 +251,9 @@
     .vendor-invoice .select-adder {
         background-position-x: 113%!important;
     }
+    #checkAll[disabled] + label {
+        cursor: not-allowed;
+    }
 </style>
 <div class="count user_right fr">
     <div class="count_center">

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_index.html

@@ -19,7 +19,7 @@
             <dl>
                 <dt><img src="static/img/vendor/images/user_photo.png" /></dt>
                 <dd>
-                    <span>{{userInfo.userName}}  | <br/><!--<em>账户余额:¥68899.99</em>--></span>
+                    <span ng-bind="userInfo.userName">  | <br/><!--<em>账户余额:¥68899.99</em>--></span>
                     <span ng-bind="vendor.enName || '个人账户'"><br/> <!--<em>账户余额:¥68899.99</em>--></span>
                     <a ui-sref="vendor_account_management" href="#/account/management/">账户设置&nbsp;》</a>
                     <!--<p><img src="static/img/vendor/images/sell_grade.png"/>专有服务:******</p>-->

+ 19 - 4
src/main/webapp/resources/view/vendor/header.html

@@ -169,7 +169,7 @@
         position: absolute;
         left: 0;
         top: 100%;
-        right: 61px;
+        right: 72px;
         list-style: none;
         -webkit-padding-start: 0;
         background: #ffffff;
@@ -182,7 +182,6 @@
         line-height: 30px;
         text-align: left;
     }
-
     #mall-search .association li.active, #mall-search .association li.active:hover {
         background: #dddddd;
     }
@@ -190,6 +189,15 @@
         background: #EEEEEE;
         cursor: pointer;
     }
+    #mall-search .association li.similar-title {
+        font-size: 16px;
+        font-weight: bold;
+        cursor: default;
+        border-top: 1px solid #ccc;
+    }
+    #mall-search .association li.similar-title:first-child {
+        border-top: none;
+    }
     .association.none{
         border: none !important;
     }
@@ -211,8 +219,15 @@
             <input type="text" ng-model="keyword" ng-change="onChange()" ng-search="search()" ng-focus="onFocus()" ng-blur="onBlur()" ng-keyup="onKeyup()"placeholder="型号/类目/品牌" />
             <a class="seek" ng-click="search()">搜索</a>
             <ul class="association" ng-show="associate || associateEnter" ng-mouseenter="onAssociateEnter()" ng-mouseleave="onAssociateLeave()" ng-class="{'none': !associate || !associateEnter}">
-                <li ng-repeat="as in associates" ng-bind="as" ng-class="{'active': $index==selectIndex}"
-                    ng-click="onAssociateClick(as)"></li>
+                <li class="similar-title" ng-if="associates.component && associates.component.length > 0">型号:</li>
+                <li ng-repeat="as in associates.component" ng-bind="as.code" ng-class="{'active': $index==selectIndex}"
+                    ng-click="onAssociateClick(as.code)"></li>
+                <li class="similar-title" ng-if="associates.component && associates.brand.length > 0">品牌:</li>
+                <li ng-repeat="as in associates.brand" ng-bind="as.nameCn" ng-class="{'active': $index==selectIndex}"
+                    ng-click="onAssociateClick(as.nameCn)"></li>
+                <li class="similar-title" ng-if="associates.component && associates.kind.length > 0">类目:</li>
+                <li ng-repeat="as in associates.kind" ng-bind="as.nameCn" ng-class="{'active': $index==selectIndex}"
+                    ng-click="onAssociateClick(as.nameCn)"></li>
             </ul>
         </div>
     </div>