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

Merge branch 'dev-mysql' into liusw-account-v1.0.10.19

# Conflicts:
#	src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js
529010777@qq.com 8 лет назад
Родитель
Сommit
bdb45e46a7
58 измененных файлов с 5152 добавлено и 149 удалено
  1. 1 1
      src/main/java/com/uas/platform/b2c/common/account/model/Enterprise.java
  2. 1 1
      src/main/java/com/uas/platform/b2c/common/account/model/UserBaseInfo.java
  3. 1 1
      src/main/java/com/uas/platform/b2c/common/account/service/EnterpriseService.java
  4. 1 1
      src/main/java/com/uas/platform/b2c/common/account/service/impl/EnterpriseServiceImpl.java
  5. 38 0
      src/main/java/com/uas/platform/b2c/external/erp/commodity/service/impl/BankInfoServiceImpl.java
  6. 130 0
      src/main/java/com/uas/platform/b2c/external/erp/commodity/service/impl/ProductDetailERPServiceImpl.java
  7. 37 0
      src/main/java/com/uas/platform/b2c/external/erp/commodity/util/ModelConverter.java
  8. 51 0
      src/main/java/com/uas/platform/b2c/external/erp/common/util/ModelConverter.java
  9. 154 0
      src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/B2cOrderServiceImpl.java
  10. 72 12
      src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/OrderServiceImpl.java
  11. 70 1
      src/main/java/com/uas/platform/b2c/external/erp/order/util/ModelConverter.java
  12. 111 0
      src/main/java/com/uas/platform/b2c/external/erp/prod/service/impl/ProdServiceImpl.java
  13. 2 1
      src/main/java/com/uas/platform/b2c/external/erp/product/service/impl/OperationInfoServiceImpl.java
  14. 41 4
      src/main/java/com/uas/platform/b2c/external/erp/product/util/ModelConverter.java
  15. 14 0
      src/main/java/com/uas/platform/b2c/fa/payment/model/BankInfo.java
  16. 1 0
      src/main/java/com/uas/platform/b2c/fa/payment/service/impl/BankTransferServiceImpl.java
  17. 11 15
      src/main/java/com/uas/platform/b2c/logistics/service/impl/InvoiceFPurchaseServiceImpl.java
  18. 35 2
      src/main/java/com/uas/platform/b2c/prod/commodity/controller/ProductController.java
  19. 26 0
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/GoodsDao.java
  20. 17 0
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductDao.java
  21. 20 0
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductDetailDao.java
  22. 5 1
      src/main/java/com/uas/platform/b2c/prod/commodity/facade/impl/ProductFacadeImpl.java
  23. 1 1
      src/main/java/com/uas/platform/b2c/prod/commodity/model/Goods.java
  24. 30 1
      src/main/java/com/uas/platform/b2c/prod/commodity/model/Product.java
  25. 245 0
      src/main/java/com/uas/platform/b2c/prod/commodity/model/ProductDetail.java
  26. 10 0
      src/main/java/com/uas/platform/b2c/prod/commodity/service/GoodsService.java
  27. 24 0
      src/main/java/com/uas/platform/b2c/prod/commodity/service/ProductService.java
  28. 21 0
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java
  29. 132 3
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java
  30. 22 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/controller/BrandSubmitController.java
  31. 1 1
      src/main/java/com/uas/platform/b2c/prod/product/brand/modal/Brand.java
  32. 8 2
      src/main/java/com/uas/platform/b2c/prod/product/brand/service/BrandSubmitService.java
  33. 47 1
      src/main/java/com/uas/platform/b2c/prod/product/brand/service/impl/BrandSubmitServiceImpl.java
  34. 6 0
      src/main/java/com/uas/platform/b2c/prod/product/component/service/impl/ComponentSubmitServiceImpl.java
  35. 3 0
      src/main/java/com/uas/platform/b2c/trade/order/dao/OrderDetailDao.java
  36. 14 0
      src/main/java/com/uas/platform/b2c/trade/order/model/Order.java
  37. 1 1
      src/main/java/com/uas/platform/b2c/trade/order/model/OrderDetail.java
  38. 4 2
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java
  39. 1 1
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java
  40. 30 21
      src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CartServiceImpl.java
  41. 2 2
      src/main/resources/dev/sys.properties
  42. 42 1
      src/main/webapp/WEB-INF/spring/hessian.xml
  43. 4 1
      src/main/webapp/WEB-INF/spring/webmvc.xml
  44. 107 0
      src/main/webapp/WEB-INF/views/normal/erp/user_center.html
  45. 116 0
      src/main/webapp/WEB-INF/views/normal/erp/vendor_center.html
  46. 2 2
      src/main/webapp/WEB-INF/web.xml
  47. 3 0
      src/main/webapp/resources/css/erp/align.css
  48. 13 6
      src/main/webapp/resources/js/common/query/brand.js
  49. 13 0
      src/main/webapp/resources/js/common/query/material.js
  50. 29 5
      src/main/webapp/resources/js/vendor/app.js
  51. 54 39
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js
  52. 318 17
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js
  53. 32 2
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_apply_ctrl.js
  54. 8 0
      src/main/webapp/resources/view/common/footer_erp.html
  55. 670 0
      src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_erp.html
  56. 704 0
      src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_unstandard_erp.html
  57. 853 0
      src/main/webapp/resources/view/vendor/forstore/erp/vendor_onSale_erp.html
  58. 743 0
      src/main/webapp/resources/view/vendor/forstore/erp/vendor_undercarriage_erp.html

+ 1 - 1
src/main/java/com/uas/platform/b2c/common/account/model/Enterprise.java

@@ -18,7 +18,7 @@ import java.util.Date;
 @Entity
 @Table(name = "sec$enterprises")
 @Cacheable
-@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "com.uas.platform.b2c.model.Enterprise")
+@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "com.uas.platform.b2c.model.EnterpriseUas")
 public class Enterprise implements Serializable {
 
 	/**

+ 1 - 1
src/main/java/com/uas/platform/b2c/common/account/model/UserBaseInfo.java

@@ -18,7 +18,7 @@ import java.io.Serializable;
 public class UserBaseInfo implements Serializable {
 
 	/**
-	 * 
+	 *
 	 */
 	private static final long serialVersionUID = 1L;
 

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

@@ -16,7 +16,7 @@ public interface EnterpriseService {
 	/**
 	 * 批量获取企业的信息
 	 * @param enuus uu号
-	 * @return List<Enterprise>
+	 * @return List<EnterpriseUas>
 	 */
 	List<Enterprise> getEnterpriseInfos(List<Long> enuus);
 	

+ 1 - 1
src/main/java/com/uas/platform/b2c/common/account/service/impl/EnterpriseServiceImpl.java

@@ -49,7 +49,7 @@ public class EnterpriseServiceImpl implements EnterpriseService{
 	 * 批量获取企业的信息
 	 *
 	 * @param enuus uu号
-	 * @return List<Enterprise>
+	 * @return List<EnterpriseUas>
 	 */
 	@Override
 	public List<Enterprise> getEnterpriseInfos(List<Long> enuus) {

+ 38 - 0
src/main/java/com/uas/platform/b2c/external/erp/commodity/service/impl/BankInfoServiceImpl.java

@@ -0,0 +1,38 @@
+package com.uas.platform.b2c.external.erp.commodity.service.impl;
+
+import com.uas.api.b2c_erp.seller.model.BankInfoERP;
+import com.uas.api.b2c_erp.seller.service.BankInfoService;
+import com.uas.platform.b2c.external.erp.commodity.util.ModelConverter;
+import com.uas.platform.b2c.fa.payment.dao.BankInfoDao;
+import com.uas.platform.b2c.fa.payment.model.BankInfo;
+import com.uas.platform.core.model.Status;
+import com.uas.platform.core.model.Type;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * Created by wangyc on 2017/11/10.
+ *
+ * @version 2017/11/10 13:52 wangyc
+ */
+public class BankInfoServiceImpl implements BankInfoService {
+
+    @Autowired
+    private com.uas.platform.b2c.fa.payment.service.BankInfoService bankInfoService;
+
+    @Autowired
+    private BankInfoDao bankInfoDao;
+
+    @Override
+    public BankInfoERP findOne() {
+        BankInfo bankInfo = bankInfoService.getEnterpriseBankInfoContainsStatus(Type.SUP.value(), Status.ALLOW.value()).get(0);
+        BankInfoERP bankInfoERP = ModelConverter.convert(bankInfo);
+        return bankInfoERP;
+    }
+
+    @Override
+    public void callback(String erpNum) {
+        BankInfo bankInfo = bankInfoService.getEnterpriseBankInfoContainsStatus(Type.SUP.value(), Status.ALLOW.value()).get(0);
+        bankInfo.setErpNum(erpNum);
+        bankInfoDao.save(bankInfo);
+    }
+}

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

@@ -0,0 +1,130 @@
+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.constant.Status;
+import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.external.erp.commodity.util.ModelConverter;
+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;
+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 org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 针对ERP物料交易详情接口
+ *
+ * @version 2017/10/28 17:57 wangyc
+ */
+public class ProductDetailERPServiceImpl implements ProductDetailERPService {
+
+    @Autowired
+    private ProductDetailDao productDetailDao;
+
+    @Autowired
+    private ProductDao productDao;
+
+    @Autowired
+    private GoodsDao goodsDao;
+
+    @Autowired
+    private GoodsService goodsService;
+
+    @Autowired
+    private EnterpriseService enterpriseService;
+
+    private static final Logger logger = LoggerFactory.getLogger(ProductDetailERPServiceImpl.class);
+
+    @Override
+    public boolean uploadProductDetailERP(List<ProductDetailERP> productDetailERPList) {
+        List<ProductDetail> productDetails = new ArrayList<ProductDetail>();
+        Long enuu = SystemSession.getUser().getEnterprise().getUu();
+        for (ProductDetailERP productDetailERP : productDetailERPList) {
+            ProductDetail productDetail = ModelConverter.convert(productDetailERP);
+
+            ProductDetail productDetailExist = productDetailDao.findByProductId(productDetail.getProductId());
+            if (productDetailExist != null) {
+                List<Product> products = productDao.getProductByEnUUAndProdNum(enuu, productDetail.getCode());
+                if (!CollectionUtils.isEmpty(products)) {
+                    productDetail.setProductId(products.get(0).getId());
+                }
+                productDetails.add(productDetail);
+            }
+        }
+        productDetailDao.save(productDetails);
+        return true;
+    }
+
+    @Override
+    public String getCurrency() {
+        return enterpriseService.getCurrencyByRegisterAddress().getData().toString();
+    }
+
+    @Override
+    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)) {
+                ProductDetail productDetail = productDetailDao.findByProductId(products.get(0).getId());// 获取商城物料信息
+                if (productDetail == null) {// 如果物料交易详情为空,新增物料交易详情
+                    productDetail = new ProductDetail();
+                    productDetail.setProductId(products.get(0).getId());
+                }
+
+                if (products.get(0).getCmpUuId() != null) {// 如果为标准器件,更新在售商品信息
+                    Double b2cReserve = goodsDao.getSumReserveByEnUUAndUuidAndStatus(enuu, products.get(0).getCmpUuId(), Status.AVAILABLE.value());
+                    b2cReserve = b2cReserve == null ? 0 : b2cReserve;
+                    Double erpReserve = productDetailERP.getReserve();
+                    if (Double.compare(b2cReserve, erpReserve) > 0) {// 如果商城已上架数量大于erp空闲库存,下架部分在售商品
+                        BigDecimal b2cDecimal = BigDecimal.valueOf(b2cReserve);
+                        BigDecimal erpDecimal = BigDecimal.valueOf(erpReserve);
+                        BigDecimal subtractDecimal = b2cDecimal.subtract(erpDecimal);// 商城已上架数量、erp库存差值
+                        List<Goods> goods = goodsDao.findByEnUUAndUuidOrderByReserveAsc(enuu, products.get(0).getCmpUuId());// 获取该企业此物料上架商品信息(按库存从小到大排序)
+                        if (!CollectionUtils.isEmpty(goods)) {
+                            for (Goods good : goods) {
+                                if (Double.compare(subtractDecimal.doubleValue(), good.getReserve()) == 0) {// 差值等于此批次数量,直接下架此批次
+                                    goodsService.offShelfGoodsByProvider(good.getBatchCode());
+                                    break;
+                                }
+
+                                if (Double.compare(subtractDecimal.doubleValue(), good.getReserve()) < 0) {// 差值小于此批次数量,下架部分库存
+                                    Goods nowGood = goodsDao.findOne(good.getId());
+                                    good.setReserve(BigDecimal.valueOf(good.getReserve()).subtract(subtractDecimal).doubleValue());
+                                    goodsService.updateGoods(nowGood, good);
+                                    goodsService.updateComponentTradeInfos(nowGood.getUuid());
+                                    break;
+                                }
+
+                                if (Double.compare(subtractDecimal.doubleValue(), good.getReserve()) > 0) {// 差值大于此批次数量,下架次批次,并继续下一批次调整
+                                    goodsService.offShelfGoodsByProvider(good.getBatchCode());
+                                    subtractDecimal = subtractDecimal.subtract(BigDecimal.valueOf(good.getReserve()));
+                                }
+                            }
+                        }
+                    }
+                }
+
+                if (productDetail != null) {
+                    productDetail.setReserve(productDetailERP.getReserve());
+                    productDetails.add(productDetail);
+                }
+            }
+        }
+
+        productDetailDao.save(productDetails);
+    }
+}

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

@@ -1,13 +1,17 @@
 package com.uas.platform.b2c.external.erp.commodity.util;
 
 import com.uas.api.b2c_erp.operation.model.OperationInfoUas;
+import com.uas.api.b2c_erp.seller.model.BankInfoERP;
 import com.uas.api.b2c_erp.seller.model.GoodsQtyPriceUas;
 import com.uas.api.b2c_erp.seller.model.GoodsSimpleUas;
+import com.uas.api.b2c_erp.seller.model.ProductDetailERP;
 import com.uas.api.domain.IPage;
 import com.uas.platform.b2c.external.erp.product.model.OperationInfo;
+import com.uas.platform.b2c.fa.payment.model.BankInfo;
 import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.commodity.model.GoodsQtyPrice;
 import com.uas.platform.b2c.prod.commodity.model.GoodsSimple;
+import com.uas.platform.b2c.prod.commodity.model.ProductDetail;
 import com.uas.platform.b2c.prod.product.component.modal.ComponentGoods;
 import org.springframework.data.domain.Page;
 import org.springframework.util.CollectionUtils;
@@ -176,4 +180,37 @@ public class ModelConverter {
 		operationInfoUas.setUuid(operationInfo.getUuid());
 		return operationInfoUas;
 	}
+
+	/**
+	 * 转换ERP物料交易详情
+	 * @param productDetailERP
+	 * @return
+	 */
+	public static ProductDetail convert(ProductDetailERP productDetailERP) {
+		ProductDetail productDetail = new ProductDetail();
+		productDetail.setB2cMaxDelivery(productDetailERP.getB2cMaxDelivery());
+		productDetail.setB2cMinDelivery(productDetailERP.getB2cMinDelivery());
+		productDetail.setMaxDelivery(productDetailERP.getMaxDelivery());
+		productDetail.setMinDelivery(productDetailERP.getMinDelivery());
+		productDetail.setMinBuyQty(productDetailERP.getMinBuyQty());
+		productDetail.setMinPackQty(productDetailERP.getMinPackQty());
+		productDetail.setPackaging(productDetailERP.getPackaging());
+		productDetail.setPrice(productDetailERP.getPrice());
+		productDetail.setProduceDate(productDetailERP.getProduceDate());
+		productDetail.setReserve(productDetailERP.getReserve());
+		productDetail.setCode(productDetailERP.getCode());
+		productDetail.setBreakUp(productDetailERP.getBreakUp());
+		return productDetail;
+	}
+
+	public static BankInfoERP convert(BankInfo bankInfo) {
+		BankInfoERP bankInfoERP = new BankInfoERP();
+		bankInfoERP.setCurrency(bankInfo.getCurrency());
+		bankInfoERP.setAccountname(bankInfo.getAccountname());
+		bankInfoERP.setBankname(bankInfo.getBankname());
+		bankInfoERP.setCreateTime(bankInfo.getCreateTime());
+		bankInfoERP.setEnuu(bankInfo.getEnuu());
+		bankInfoERP.setNumber(bankInfo.getNumber());
+		return bankInfoERP;
+	}
 }

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

@@ -0,0 +1,51 @@
+package com.uas.platform.b2c.external.erp.common.util;
+
+import com.uas.api.b2c_erp.baisc.model.EnterpriseUas;
+import com.uas.api.b2c_erp.baisc.model.UserBaseInfoUas;
+import com.uas.platform.b2c.common.account.model.Enterprise;
+import com.uas.platform.b2c.common.account.model.UserBaseInfo;
+
+/**
+ * Created by wangyc on 2017/11/23.
+ *
+ * @version 2017/11/23 11:20 wangyc
+ */
+public class ModelConverter {
+
+    /**
+     * 转换用户信息
+     * @param user
+     * @return
+     */
+    public static UserBaseInfoUas convert(UserBaseInfo user) {
+        UserBaseInfoUas userUas = new UserBaseInfoUas();
+        userUas.setUserName(user.getUserName());
+        userUas.setUserEmail(user.getUserEmail());
+        userUas.setUserTel(user.getUserTel());
+
+        return userUas;
+    }
+
+    /**
+     * 转换企业信息
+     * @param enterprise
+     * @return
+     */
+    public static EnterpriseUas convert(Enterprise enterprise) {
+        EnterpriseUas enterpriseUas = new EnterpriseUas();
+        enterpriseUas.setEnAddress(enterprise.getEnAddress());
+        enterpriseUas.setEnArea(enterprise.getEnArea());
+        enterpriseUas.setEnBussinessCode(enterprise.getEnBussinessCode());
+        enterpriseUas.setEnDeliverAddr(enterprise.getEnDeliverAddr());
+        enterpriseUas.setEnEmail(enterprise.getEnEmail());
+        enterpriseUas.setEnFax(enterprise.getEnFax());
+        enterpriseUas.setEnIndustry(enterprise.getEnIndustry());
+        enterpriseUas.setEnName(enterprise.getEnName());
+        enterpriseUas.setEnShortname(enterprise.getEnShortname());
+        enterpriseUas.setEnTel(enterprise.getEnTel());
+        enterpriseUas.setEnType(enterprise.getEnType());
+        enterpriseUas.setUu(enterprise.getUu());
+
+        return enterpriseUas;
+    }
+}

+ 154 - 0
src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/B2cOrderServiceImpl.java

@@ -0,0 +1,154 @@
+package com.uas.platform.b2c.external.erp.order.service.impl;
+
+import com.uas.api.b2c_erp.buyer.model.B2cOrder;
+import com.uas.api.b2c_erp.buyer.model.B2cOrderDetail;
+import com.uas.api.b2c_erp.buyer.model.Payment;
+import com.uas.api.b2c_erp.buyer.service.B2cOrderService;
+import com.uas.platform.b2c.core.config.SysConf;
+import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.core.utils.FastjsonUtils;
+import com.uas.platform.b2c.external.erp.order.util.ModelConverter;
+import com.uas.platform.b2c.fa.payment.model.BankInfo;
+import com.uas.platform.b2c.fa.payment.model.BankTransfer;
+import com.uas.platform.b2c.fa.payment.service.BankInfoService;
+import com.uas.platform.b2c.fa.payment.service.BankTransferService;
+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.model.Order;
+import com.uas.platform.b2c.trade.order.model.OrderDetail;
+import com.uas.platform.b2c.trade.order.service.OrderService;
+import com.uas.platform.core.model.Status;
+import com.uas.platform.core.model.Type;
+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.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.util.CollectionUtils;
+
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Created by wangyc on 2017/10/31.
+ *
+ * @version 2017/10/31 15:44 wangyc
+ */
+public class B2cOrderServiceImpl implements B2cOrderService {
+
+    @Autowired
+    private OrderDao orderDao;
+
+    @Autowired
+    private GoodsHistoryDao goodsHistoryDao;
+
+    @Autowired
+    private ProductDao productDao;
+
+    @Autowired
+    SysConf sysConf;
+
+    @Autowired
+    private OrderService orderService;
+
+    @Autowired
+    private BankTransferService bankTransferService;
+
+    @Autowired
+    private BankInfoService bankInfoService;
+
+    @Override
+    public List<B2cOrder> getAllOrder() {
+        // 要获取的采购的状态
+        SimpleExpression status1 = PredicateUtils.eq("status", Status.TOBEPAID.value(), true);
+        SimpleExpression status2 = PredicateUtils.eq("status", Status.UNAVAILABLE_NOPAID.value(), true);
+        SimpleExpression status3 = PredicateUtils.eq("status", Status.INBOUND.value(), true);
+        SimpleExpression status4 = PredicateUtils.eq("status", Status.UNAVAILABLE_PERSONAL.value(), true);
+        SimpleExpression[] expressions = new SimpleExpression[] { status1, status2, status3, status4};
+        LogicalExpression purLogical = PredicateUtils.or(expressions);
+
+        // 采购单待上传的状态
+        SimpleExpression sendStatus = PredicateUtils.eq("sendstatus", Status.NOT_UPLOAD.value(), true);
+        // uu
+        Long enuu = SystemSession.getUser().getEnterprise().getUu();
+        SimpleExpression buyerenuu = PredicateUtils.eq("buyerenuu", enuu, true);
+        LogicalExpression statusUUAS = PredicateUtils.and(new SimpleExpression[] { sendStatus, buyerenuu});
+        final LogicalExpression allCondition = PredicateUtils.and(new LogicalExpression[] { purLogical, statusUUAS });
+
+        List<Order> orders = orderDao.findAll(new Specification<Order>() {
+            @Override
+            public Predicate toPredicate(Root<Order> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
+                query.where(allCondition.toPredicate(root, query, cb));
+                return null;
+            }
+        });
+
+        List<B2cOrder> b2cOrders = new ArrayList<B2cOrder>();
+        for (Order order : orders) {
+            boolean productExists = true;
+            Set<B2cOrderDetail> b2cOrderDetails = new HashSet<B2cOrderDetail>();
+            for (OrderDetail orderDetail : order.getOrderDetails()) {// 获取明细中购买型号所对应的erp对应企业中的物料编号
+                GoodsHistory goodsHistory = goodsHistoryDao.findNewByBatchCode(orderDetail.getBatchCode());
+                if (goodsHistory != null) {
+                    List<Product> products = productDao.findByEnUUAndCmpUuId(enuu, goodsHistory.getUuid());
+                    if (!CollectionUtils.isEmpty(products)) {
+                        B2cOrderDetail b2cOrderDetail = ModelConverter.convertUas(orderDetail);
+                        b2cOrderDetail.setProductCode(products.get(0).getProdNum());// 添加erp物料编号
+                        b2cOrderDetails.add(b2cOrderDetail);
+                    } else {
+                        productExists = false;
+                    }
+                }
+            }
+            if (productExists) {
+                B2cOrder b2cOrder = ModelConverter.convert(order);
+                b2cOrder.setOrderDetails(b2cOrderDetails);
+                b2cOrders.add(b2cOrder);
+            }
+        }
+        return b2cOrders;
+    }
+
+    @Override
+    public boolean backOrder(long[] orderids) {
+        List<Order> orders = new ArrayList<Order>();
+        for (long orderid : orderids) {
+            Order order = orderDao.findOne(orderid);
+            if (order != null) {
+                order.setSendstatus(Status.DOWNLOADED.value());
+                orders.add(order);
+            }
+        }
+        orderDao.save(orders);
+        return true;
+    }
+
+    @Override
+    public void ensuryPay(Payment payment) {
+        BankTransfer bankTransfer = ModelConverter.convert(payment);
+        List<BankInfo> mallBankInfos = bankInfoService.getEnterpriseBankInfoContainsStatus(Type.MALL.value(), Status.ALLOW.value(), sysConf.getEnUU());
+        if (!CollectionUtils.isEmpty(mallBankInfos)) {
+            bankTransfer.setJsonReceive(FastjsonUtils.toJson(mallBankInfos.get(0)));
+        }
+
+        bankTransferService.save(bankTransfer, payment.getOrderid());
+    }
+
+    @Override
+    public B2cOrder ensury(String orderid) {
+        Order order = orderDao.findByOrderid(orderid);
+        if (order != null) {
+            orderService.ensureOrderAccept(order.getId().toString());
+        }
+        return null;
+    }
+}

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

@@ -1,11 +1,21 @@
 package com.uas.platform.b2c.external.erp.order.service.impl;
 
 import com.uas.api.b2c_erp.seller.model.Order;
+import com.uas.api.b2c_erp.seller.model.OrderDetail;
 import com.uas.api.b2c_erp.seller.service.OrderService;
 import com.uas.api.exception.B2CException;
+import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
+import com.uas.platform.b2c.common.account.dao.UserBaseInfoDao;
+import com.uas.platform.b2c.common.account.model.Enterprise;
+import com.uas.platform.b2c.common.account.model.UserBaseInfo;
 import com.uas.platform.b2c.core.support.SystemSession;
 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;
 import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.b2c.trade.order.service.PurchaseService;
@@ -17,6 +27,7 @@ import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.jpa.domain.Specification;
+import org.springframework.util.CollectionUtils;
 
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
@@ -32,7 +43,22 @@ public class OrderServiceImpl implements OrderService {
 	
 	@Autowired
 	private PurchaseService purchaseService;
-	
+
+	@Autowired
+	private GoodsHistoryDao goodsHistoryDao;
+
+	@Autowired
+	private ProductDao productDao;
+
+	@Autowired
+	private OrderDao orderDao;
+
+	@Autowired
+	private UserBaseInfoDao userBaseInfoDao;
+
+	@Autowired
+	private EnterpriseDao enterpriseDao;
+
 	private static final ErpB2cBufferedLogger logger = BufferedLoggerManager.getLogger(ErpB2cBufferedLogger.class);
 
 	@Override
@@ -46,9 +72,12 @@ public class OrderServiceImpl implements OrderService {
 	@Override
 	public List<Order> findAllUnReceived() {
 		// 要获取的采购的状态
-		SimpleExpression status1 = PredicateUtils.eq("status", Status.TOBECONFIRMED.value(), true);
+		SimpleExpression status1 = PredicateUtils.eq("status", Status.PAID.value(), true);
 		SimpleExpression status2 = PredicateUtils.eq("status", Status.CONFIRMED.value(), true);
-		SimpleExpression[] expressions = new SimpleExpression[] { status1, status2 };
+		SimpleExpression status3 = PredicateUtils.eq("status", Status.TOBECONFIRMED.value(), true);
+		SimpleExpression status4 = PredicateUtils.eq("status", Status.UNAVAILABLE_NOPAID.value(), true);
+		SimpleExpression status5 = PredicateUtils.eq("status", Status.UNAVAILABLE_PERSONAL.value(), true);
+		SimpleExpression[] expressions = new SimpleExpression[] { status1, status2, status3, status4, status5};
 		LogicalExpression purLogical = PredicateUtils.or(expressions);
 
 		// 采购单待上传的状态
@@ -56,10 +85,8 @@ public class OrderServiceImpl implements OrderService {
 		// uu
 		SimpleExpression sellerUU = PredicateUtils.eq("sellerenuu", SystemSession.getUser().getEnterprise().getUu(),
 				true);
-		SimpleExpression uasPurcid = PredicateUtils.isNotNull("uasPurcid");
 
-		LogicalExpression statusUUAS = PredicateUtils.and(new SimpleExpression[] { sendStatus, sellerUU, uasPurcid});
-		System.out.println(SystemSession.getUser().getEnterprise().getEnName() + SystemSession.getUser().getEnterprise().getUu());
+		LogicalExpression statusUUAS = PredicateUtils.and(new SimpleExpression[] { sendStatus, sellerUU});
 		final LogicalExpression allCondition = PredicateUtils.and(new LogicalExpression[] { purLogical, statusUUAS });
 
 		List<Purchase> purcs = purchaseDao.findAll(new Specification<Purchase>() {
@@ -71,8 +98,31 @@ public class OrderServiceImpl implements OrderService {
 		});
 		List<Order> orders = new ArrayList<Order>();
 		for (Purchase purchase : purcs) {
+			boolean codeExists = false;
 			Order order = ModelConverter.getOrder(purchase);
-			orders.add(order);
+			UserBaseInfo buyer = userBaseInfoDao.findUserByUserUU(purchase.getBuyeruu());
+			if (buyer != null) {// 设置买方用户信息
+				order.setBuyer(com.uas.platform.b2c.external.erp.common.util.ModelConverter.convert(buyer));
+			}
+
+			Enterprise enterprise = enterpriseDao.findByUu(purchase.getBuyerenuu());
+			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;
+					}
+				}
+			}
+			if (codeExists)
+				orders.add(order);
 		}
 		return orders;
 	}
@@ -80,11 +130,11 @@ public class OrderServiceImpl implements OrderService {
 	@Override
 	public void agree(long orderId) {
 		// TODO Auto-generated method stub
-		System.out.println("hi, i received " + orderId);
-		Purchase purchase = purchaseDao.findOne(orderId);
-		Long userUU = SystemSession.getUser().getUserUU();
-		logger.log("UAS接口", "采购单接收动作 id=" + orderId);
-		purchaseService.purToBeShiped(orderId);
+//		System.out.println("hi, i received " + orderId);
+//		Purchase purchase = purchaseDao.findOne(orderId);
+//		Long userUU = SystemSession.getUser().getUserUU();
+//		logger.log("UAS接口", "采购单接收动作 id=" + orderId);
+//		purchaseService.purToBeShiped(orderId);
 //		if (purchase == null) {
 //			throw new B2CException("没有传入有效的订单信息");
 //		}
@@ -114,12 +164,22 @@ public class OrderServiceImpl implements OrderService {
 		logger.log("UAS接口", "采购单拒收成功 id=" + orderId);
 	}
 
+	@Override
+	public Long findAdminuu() {
+		return SystemSession.getUser().getEnterprise().getEnAdminuu();
+	}
+
 	@Override
 	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);
+
 		}
 		return true;
 	}

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

@@ -1,10 +1,14 @@
 package com.uas.platform.b2c.external.erp.order.util;
 
+import com.uas.api.b2c_erp.buyer.model.B2cOrder;
+import com.uas.api.b2c_erp.buyer.model.B2cOrderDetail;
+import com.uas.api.b2c_erp.buyer.model.Payment;
 import com.uas.api.b2c_erp.operation.model.OperationInfoUas;
 import com.uas.api.b2c_erp.seller.model.Order;
 import com.uas.api.b2c_erp.seller.model.OrderDetail;
 import com.uas.api.domain.IPage;
 import com.uas.platform.b2c.external.erp.product.model.OperationInfo;
+import com.uas.platform.b2c.fa.payment.model.BankTransfer;
 import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.b2c.trade.order.model.PurchaseDetail;
 import org.springframework.data.domain.Page;
@@ -28,13 +32,15 @@ public class ModelConverter {
     public static Order getOrder(Purchase purchase) {
 		Order order = new Order();
 		order.setCreateTime(purchase.getCreatetime());
-		order.setOrderid(purchase.getPurchaseid());
+		order.setOrderid(purchase.getOrderid());
 		order.setId(purchase.getId());
 		order.setShipAddress(purchase.getJsonAddress());
 		order.setTotal(purchase.getEnsurePrice());
 		order.setStatus(purchase.getStatus());
 		order.setTaxes(purchase.getTaxes());
 		order.setCurrency(purchase.getCurrency());
+		order.setSendType(purchase.getSendType());
+		order.setFare(purchase.getFare());
 		Set<PurchaseDetail> details = purchase.getPurchaseDetails();
 		if (!CollectionUtils.isEmpty(details)) {
 			List<OrderDetail> orderDetails = new ArrayList<OrderDetail>();
@@ -104,4 +110,67 @@ public class ModelConverter {
 		operationInfoUas.setUuid(operationInfo.getUuid());
 		return operationInfoUas;
 	}
+
+	/**
+	 * 商城订单明细转为ERP采购单明细
+	 * @param orderDetail
+	 * @return
+	 */
+	public static B2cOrderDetail convertUas(com.uas.platform.b2c.trade.order.model.OrderDetail orderDetail) {
+		B2cOrderDetail b2cOrderDetail = new B2cOrderDetail();
+		b2cOrderDetail.setPrice(orderDetail.getPrice());
+		b2cOrderDetail.setBatchCode(orderDetail.getBatchCode());
+		b2cOrderDetail.setCmpCode(orderDetail.getCmpCode());
+		b2cOrderDetail.setDetailid(orderDetail.getDetailid());
+		b2cOrderDetail.setDetno(orderDetail.getDetno());
+		b2cOrderDetail.setImg(orderDetail.getImg());
+		b2cOrderDetail.setNumber(orderDetail.getNumber());
+		b2cOrderDetail.setTax(orderDetail.getTax());
+		b2cOrderDetail.setTaxes(orderDetail.getTaxes());
+		b2cOrderDetail.setUnitprice(orderDetail.getTaxUnitprice());
+		b2cOrderDetail.setUuid(orderDetail.getUuid());
+
+		return b2cOrderDetail;
+	}
+
+	/**
+	 * 商城订单转为erp采购单
+	 * @param order
+	 * @return
+	 */
+	public static B2cOrder convert(com.uas.platform.b2c.trade.order.model.Order order) {
+		B2cOrder b2cOrder = new B2cOrder();
+		b2cOrder.setId(order.getId());
+		b2cOrder.setCurrency(order.getCurrency());
+		b2cOrder.setTaxes(order.getTaxes());
+		b2cOrder.setBuyerenuu(order.getBuyerenuu());
+		b2cOrder.setBuyeruu(order.getBuyeruu());
+		b2cOrder.setCreattime(order.getCreattime());
+		b2cOrder.setDeliverytype(order.getDeliverytype());
+		b2cOrder.setJsonAddress(order.getJsonAddress());
+		b2cOrder.setLgtId(order.getLgtId());
+		b2cOrder.setOrderid(order.getOrderid());
+		b2cOrder.setPaytype(order.getPaytype());
+		b2cOrder.setPrice(order.getEnsurePrice());
+		b2cOrder.setFare(order.getFare());
+		b2cOrder.setQty(order.getQty());
+		b2cOrder.setSellerenuu(order.getSellerenuu());
+		b2cOrder.setStatus(order.getStatus());
+
+		return b2cOrder;
+	}
+
+	/**
+	 * 将ERP付款信息转换为商城付款信息
+	 * @param payment
+	 * @return
+	 */
+	public static BankTransfer convert(Payment payment) {
+		BankTransfer bankTransfer = new BankTransfer();
+		bankTransfer.setJsonPament(payment.getJsonPament());
+		bankTransfer.setTotal(payment.getTotal());
+		bankTransfer.setTranferCreateTime(payment.getTransferTime());
+		bankTransfer.setImgUrl(payment.getImgUrl());
+		return bankTransfer;
+	}
 }

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

@@ -0,0 +1,111 @@
+package com.uas.platform.b2c.external.erp.prod.service.impl;
+
+import com.uas.api.b2c_erp.seller.model.Prod;
+import com.uas.api.b2c_erp.seller.service.ProdService;
+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.product.util.ModelConverter;
+import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
+import com.uas.platform.b2c.prod.commodity.model.Product;
+import com.uas.platform.b2c.prod.commodity.service.ProductService;
+import com.uas.platform.b2c.prod.store.dao.StoreInDao;
+import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.core.logging.BufferedLoggerManager;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by wangyc on 2017/10/26.
+ *
+ * @version 2017/10/26 11:34 wangyc
+ */
+public class ProdServiceImpl implements ProdService {
+
+    @Autowired
+    private ProductDao productDao;
+
+    @Autowired
+    private ProductService productService;
+
+    @Autowired
+    private StoreInDao storeInDao;
+
+    private static final ErpB2cBufferedLogger logger = BufferedLoggerManager.getLogger(ErpB2cBufferedLogger.class);
+
+    // TODO
+    private final Logger loggerOut = Logger.getLogger(getClass());
+
+    @Override
+    public String uploadProducts(List<Prod> prods) {
+        List<Product> products = new ArrayList<Product>();
+        Long enuu = SystemSession.getUser().getEnterprise().getUu();
+        for (Prod prod : prods) {
+            List<Product> productExists = productDao.getProductByEnUUAndProdNum(enuu, prod.getPr_code());
+            Product product = ModelConverter.convert(prod);
+            if (!CollectionUtils.isEmpty(productExists)) {
+                product.setId(productExists.get(0).getId());
+                product.setCmpUuId(null);// 将已存在的变更过物料uuid置为null,以便后续进行重新匹配
+            }
+            products.add(product);
+        }
+        productDao.save(products);// 保存上传的物料
+
+        logger.log("物料资料", "上传物料资料,数量:" + prods.size());
+        loggerOut.info("--------------" + SystemSession.getUser().getEnterprise().getEnName() + " 上传物料资料,数量:" + prods.size() + "---------------");
+        return "success";
+    }
+
+    @Override
+    public void callMatch() {
+        loggerOut.info("开始匹配");
+        Date start = new Date();
+        productService.matchAll();// 匹配上传的物料
+        Date end = new Date();
+        loggerOut.info("匹配完成, 历时" + (start.getTime() - end.getTime())/1000 + "秒");
+    }
+
+    @Override
+    public List<Prod> downloadProducts() {
+        List<Prod> prods = new ArrayList<Prod>();
+        List<Product> products = productDao.findBySourceAppAndB2cDownStatusAndEnUUAndCmpUuIdIsNotNull("ERP", Status.NOT_UPLOAD.value(), SystemSession.getUser().getEnterprise().getUu());
+        if (!CollectionUtils.isEmpty(products)) {
+            for (Product product : products) {
+                Prod prod = new Prod();
+                prod.setPr_uuid(product.getCmpUuId());
+                prod.setPr_id(product.getSourceId());
+                prods.add(prod);
+            }
+        }
+        logger.log("物料资料", "ERP下载更新物料资料,企业:" + SystemSession.getUser().getEnterprise().getEnName());
+        return prods;
+    }
+
+    @Override
+    public void refreshDownloadstatus(List<String> codes){
+        List<Product> products = new ArrayList<Product>();
+        Long enuu = SystemSession.getUser().getEnterprise().getUu();
+        for (String code : codes) {
+            Product product = productDao.getProductByEnUUAndProdNum(enuu, code).get(0);
+            product.setB2cDownStatus(Status.DOWNLOADED.value());
+            products.add(product);
+        }
+        logger.log("物料资料", "ERP回调修改物料资料下载状态,企业:" + SystemSession.getUser().getEnterprise().getEnName());
+        productDao.save(products);
+    }
+
+    @Override
+    public String returnStoreUrl() {
+        String url = "";
+        List<StoreIn> storeIn = storeInDao.findByEnUU(SystemSession.getUser().getEnterprise().getUu());
+        if (!CollectionUtils.isEmpty(storeIn)) {
+            return url = "/store/" + storeIn.get(0).getUuid();
+        }
+        return url;
+    }
+}

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

@@ -36,7 +36,8 @@ public class OperationInfoServiceImpl implements OperationInfoService {
     @Autowired
     private CreateNumberService createNumberService;
 
-    public static SysConf sysConf = new SysConf();
+    @Autowired
+    private SysConf sysConf;
 
     @Autowired
     private UserBaseInfoDao userBaseInfoDao;

+ 41 - 4
src/main/java/com/uas/platform/b2c/external/erp/product/util/ModelConverter.java

@@ -3,8 +3,13 @@ package com.uas.platform.b2c.external.erp.product.util;
 import com.uas.api.b2c_erp.baisc.model.*;
 import com.uas.api.b2c_erp.operation.model.OperationInfoUas;
 import com.uas.api.b2c_erp.seller.model.GoodsSimpleUas;
+import com.uas.api.b2c_erp.seller.model.Prod;
 import com.uas.api.domain.IPage;
+import com.uas.platform.b2c.common.account.model.Enterprise;
+import com.uas.platform.b2c.core.constant.Status;
+import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.external.erp.product.model.OperationInfo;
+import com.uas.platform.b2c.prod.commodity.model.Product;
 import com.uas.platform.b2c.prod.product.brand.modal.Brand;
 import com.uas.platform.b2c.prod.product.brand.modal.BrandInfo;
 import com.uas.platform.b2c.prod.product.brand.modal.BrandSubmit;
@@ -16,13 +21,11 @@ import com.uas.platform.b2c.prod.product.kind.model.*;
 import com.uas.platform.b2c.prod.product.property.model.Property;
 import com.uas.platform.b2c.prod.product.property.model.PropertyValue;
 import com.uas.platform.b2c.prod.product.property.model.PropertyValueSubmit;
+import com.uas.platform.core.model.Constant;
 import org.springframework.data.domain.Page;
 import org.springframework.util.CollectionUtils;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 /**
  * erp<==>商城对象转换类
@@ -499,4 +502,38 @@ public class ModelConverter {
 		operationInfoUas.setUuid(operationInfo.getUuid());
 		return operationInfoUas;
 	}
+
+	/**
+	 * 转为平台的产品
+	 *
+	 * @return
+	 */
+	public static Product convert(Prod prod) {
+		Product product = new Product();
+		product.setProdNum(prod.getPr_code());
+		product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
+		product.setUserUU(SystemSession.getUser().getUserUU());
+		product.setProdName(prod.getPr_detail());
+		product.setSpec(prod.getPr_spec());
+		product.setUnit(prod.getPr_unit());
+		product.setSourceId(prod.getPr_id());
+		product.setBrand(prod.getPr_brand());
+		if (prod.getPr_orispeccode() != null) {
+			product.setCmpCode(prod.getPr_orispeccode());
+		} else {
+			product.setCmpCode(prod.getPr_spec());
+		}
+		int i = Constant.NO;
+		product.setStandard(i);// 默认设置为非标准,到平台做匹配更新
+		Enterprise enter = SystemSession.getUser().getEnterprise();
+		// erp上传的数据默认赋值给标准信息
+		product.setPbrand(product.getBrand());
+		product.setPcmpcode(product.getCmpCode());
+		product.setB2cEnabled((product.getBrand() == null) || (product.getCmpCode() == null) ? 0 : 1);
+		product.setKind(product.getProdName());
+		product.setSourceApp("ERP");
+		product.setErpDate(new Date());
+		product.setB2cDownStatus(Status.NOT_UPLOAD.value());
+		return product;
+	}
 }

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

@@ -119,6 +119,12 @@ public class BankInfo implements Serializable{
 	@Column(name = "binfo_dissociative")
 	private Integer dissociative;
 
+	/**
+	 * 如果为erp同步科目,此项纪录erp科目编号
+	 */
+	@Column(name = "binfo_erpnum")
+	private String erpNum;
+
 	public Long getId() {
 		return id;
 	}
@@ -244,6 +250,14 @@ public class BankInfo implements Serializable{
 		this.dissociative = dissociative;
 	}
 
+	public String getErpNum() {
+		return erpNum;
+	}
+
+	public void setErpNum(String erpNum) {
+		this.erpNum = erpNum;
+	}
+
 	@Override
 	public String toString() {
 		return "BankInfo [id=" + id + ", useruu=" + useruu + ", enuu=" + enuu

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

@@ -400,6 +400,7 @@ public class BankTransferServiceImpl implements BankTransferService {
 							}
 						}
 						purchase.setStatusPaid(userUU);
+                        purchase.setSendstatus(com.uas.platform.b2c.core.constant.Status.NOT_UPLOAD.value());
 					}
 				}
 				purchaseDao.save(purchases);

+ 11 - 15
src/main/java/com/uas/platform/b2c/logistics/service/impl/InvoiceFPurchaseServiceImpl.java

@@ -5,8 +5,11 @@ import com.uas.api.b2c_erp.seller.model.Invoice;
 import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
 import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.common.account.model.TradeLog;
-import com.uas.platform.b2c.trade.aftersale.model.AfterSaleStatus;
 import com.uas.platform.b2c.core.config.SysConf;
+import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.core.support.log.TradeBufferedLogger;
+import com.uas.platform.b2c.core.utils.NumberUtil;
+import com.uas.platform.b2c.core.utils.StringUtilB2C;
 import com.uas.platform.b2c.logistics.dao.InvoiceFPurchaseDao;
 import com.uas.platform.b2c.logistics.dao.LogisticsCompanyCodeDao;
 import com.uas.platform.b2c.logistics.dao.LogisticsDao;
@@ -15,18 +18,15 @@ import com.uas.platform.b2c.logistics.model.InvoiceFPurchaseDetail;
 import com.uas.platform.b2c.logistics.model.Logistics;
 import com.uas.platform.b2c.logistics.service.InvoiceFPurchaseService;
 import com.uas.platform.b2c.logistics.service.LogisticsOldService;
+import com.uas.platform.b2c.prod.commodity.service.ProductService;
+import com.uas.platform.b2c.prod.product.common.service.CreateNumberService;
+import com.uas.platform.b2c.trade.aftersale.model.AfterSaleStatus;
 import com.uas.platform.b2c.trade.order.dao.OrderDao;
 import com.uas.platform.b2c.trade.order.dao.PurchaseDao;
 import com.uas.platform.b2c.trade.order.model.Order;
 import com.uas.platform.b2c.trade.order.model.OrderDetail;
 import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.b2c.trade.order.model.PurchaseDetail;
-import com.uas.platform.b2c.prod.commodity.service.ProductService;
-import com.uas.platform.b2c.prod.product.common.service.CreateNumberService;
-import com.uas.platform.b2c.core.support.SystemSession;
-import com.uas.platform.b2c.core.support.log.TradeBufferedLogger;
-import com.uas.platform.b2c.core.utils.NumberUtil;
-import com.uas.platform.b2c.core.utils.StringUtilB2C;
 import com.uas.platform.b2c.trade.support.CodeType;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.b2c.trade.util.TradeLogUtil;
@@ -42,7 +42,6 @@ import org.springframework.data.domain.Page;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.NumberUtils;
 import org.springframework.util.StringUtils;
 
 import javax.management.OperationsException;
@@ -50,12 +49,7 @@ import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 @Service
 public class InvoiceFPurchaseServiceImpl implements InvoiceFPurchaseService {
@@ -112,7 +106,7 @@ public class InvoiceFPurchaseServiceImpl implements InvoiceFPurchaseService {
 	@Override
 	public InvoiceFPurchase createInvoiceFPurchase(Long puid) {
 		Purchase purchase = purchaseDao.findOne(puid);
-		if (purchase.getStatus() != Status.TOBESHIPPED.value()) {
+		if (purchase.getStatus() != Status.TOBESHIPPED.value() && purchase.getStatus() != Status.CONFIRMED.value()) {
 			throw new IllegalAccessError(
 					"采购单" + purchase.getPurchaseid() + "的状态是" + Status.valueOf(purchase.getStatus()).getPhrase() + ",不能转出货");
 		}
@@ -363,6 +357,7 @@ public class InvoiceFPurchaseServiceImpl implements InvoiceFPurchaseService {
 //			}
 			order.setJsonSdAddress(inFpu.getJsonSdAddress());
 			order.setStatusInBound(userUU);
+            order.setSendstatus(Status.NOT_UPLOAD.value());// 将订单设置为未下载状态,以便erp下载
 			for (OrderDetail detail : order.getOrderDetails()) {
 				detail.setStatusInBound(userUU);
 			}
@@ -481,6 +476,7 @@ public class InvoiceFPurchaseServiceImpl implements InvoiceFPurchaseService {
 		logisticsInfo.put("companyName", invoice.getCompanyName());
 		logisticsInfo.put("number", invoice.getCompanyNumber());
 		jsonObject.put("logisticsInfo", logisticsInfo);
+		jsonObject.put("sendType", purchase.getSendType());
 		saveInvoiceFPurchaseList(jsonObject, invoiceFpurc.getId());
 
 //		Logistics logist = new Logistics();

+ 35 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/controller/ProductController.java

@@ -1,11 +1,13 @@
 package com.uas.platform.b2c.prod.commodity.controller;
 
+import com.alibaba.fastjson.JSONObject;
+import com.uas.platform.b2c.core.constant.SplitChar;
+import com.uas.platform.b2c.core.support.view.JxlsExcelView;
 import com.uas.platform.b2c.prod.commodity.facade.ProductFacade;
 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.ProductService;
-import com.uas.platform.b2c.core.constant.SplitChar;
-import com.uas.platform.b2c.core.support.view.JxlsExcelView;
 import com.uas.platform.b2c.prod.commodity.type.ProductConstant;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.model.PageInfo;
@@ -212,4 +214,35 @@ public class ProductController {
 	private ResultMap deleteStandardByBatch() {
 		return productService.deleteBatch(ProductConstant.STANDARD);
 	}
+
+	/**
+	 * 通过物料id获取物料交易详情
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
+	private ProductDetail getbyProductId(@PathVariable("id") Long id) {
+		return productService.findByProductId(id);
+	}
+
+	/**
+	 * 提交申请
+	 * @param jsonObject
+	 * @return
+	 */
+	@RequestMapping(value = "/validition", method = RequestMethod.POST)
+	private ResultMap validitionStandard(@RequestBody JSONObject jsonObject) {
+		return productService.validitonStandard(jsonObject);
+	}
+
+	/**
+	 * 保存物料交易详情
+	 * @param productId
+	 * @param goods
+	 * @return
+	 */
+	@RequestMapping(value = "/savedetail/{productId}", method = RequestMethod.POST)
+	public ProductDetail saveDetail(@PathVariable("productId") Long productId, @RequestBody Goods goods) {
+		return productService.saveDetail(productId, goods);
+	}
 }

+ 26 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/dao/GoodsDao.java

@@ -495,4 +495,30 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
      * @return list
      */
     List<Goods> findByEnUU(Long enuu);
+
+    /**
+     * 根据企业uu和器件uuid获取goods信息
+     * @return
+     */
+    List<Goods> findByEnUUAndUuidOrderByReserveAsc(Long enuu, String uuid);
+
+    /**
+     * 根据企业uu和器件uuid获取当前在售商品总库存
+     * @param enuu
+     * @param uuid
+     * @return
+     */
+    @Deprecated
+    @Query(value = "select sum(go_reserve) from trade$goods where go_enuu=:enuu and cmp_uuid=:uuid", nativeQuery = true)
+    Double getSumReserveByEnUUAndUuid(@Param("enuu") Long enuu, @Param("uuid") String uuid);
+
+
+    /**
+     * 根据企业uu和器件uuid和状态获取商品总库存
+     * @param enuu
+     * @param uuid
+     * @return
+     */
+    @Query(value = "select sum(go_reserve) from trade$goods where go_enuu=:enuu and cmp_uuid=:uuid and go_status=:status ", nativeQuery = true)
+    Double getSumReserveByEnUUAndUuidAndStatus(@Param("enuu") Long enuu, @Param("uuid") String uuid, @Param("status") Integer status);
 }

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

@@ -71,6 +71,23 @@ public interface ProductDao extends JpaSpecificationExecutor<Product>, JpaReposi
     @Query(value = "select p from Product p where p.pcmpcode=:pcmpcode and p.pbranden=:pbranden and p.enUU=:enUU and p.standard=:standard")
     List<Product> findProductByPcmpcodeAndPbrandenAndEnUUAndStandard(@Param("pcmpcode") String pcmpcode, @Param("pbranden") String pbranden, @Param("enUU") Long enUU, @Param("standard") Integer standard);
 
+    /**
+     * 根据应用、b2c下载状态、企业uu下载标准物料
+     * @param sourceapp
+     * @param b2cDownStatus
+     * @param enUU
+     * @return
+     */
+    List<Product> findBySourceAppAndB2cDownStatusAndEnUUAndCmpUuIdIsNotNull(String sourceapp, Integer b2cDownStatus, Long enUU);
+
+    /**
+     * 通过企业uu、标准器件uuid获取标准物料信息
+     * @param enuu
+     * @param uuid
+     * @return
+     */
+    List<Product> findByEnUUAndCmpUuId(Long enuu, String uuid);
+
     /**
      * 获取该企业的产品信息
      * @param enuu 企业的uu号

+ 20 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductDetailDao.java

@@ -0,0 +1,20 @@
+package com.uas.platform.b2c.prod.commodity.dao;
+
+import com.uas.platform.b2c.prod.commodity.model.ProductDetail;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+ * Created by wangyc on 2017/10/28.
+ *
+ * @version 2017/10/28 18:13 wangyc
+ */
+public interface ProductDetailDao extends JpaRepository<ProductDetail, Long>, JpaSpecificationExecutor<ProductDetail> {
+
+    /**
+     * 通过物料id获取物料交易详情
+     * @param productId
+     * @return
+     */
+    public ProductDetail findByProductId(Long productId);
+}

+ 5 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/facade/impl/ProductFacadeImpl.java

@@ -81,7 +81,11 @@ public class ProductFacadeImpl implements ProductFacade {
 		goods.setStoreName(store.getStoreName());
 
 		// 发布商品
-		goods = goodsService.publish(goods, "NORMAL");
+		if ("ERP".equals(product.getSourceApp())) {
+			goods = goodsService.publish(goods, "NORMAL", product);
+		} else {
+			goods = goodsService.publish(goods, "NORMAL");
+		}
 
 		return ResultMap.success(goods);
 	}

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/model/Goods.java

@@ -38,7 +38,7 @@ public class Goods implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	@Id
-	@GeneratedValue
+	@GeneratedValue(strategy = GenerationType.IDENTITY)
 	@Column(name = "go_id")
 	private Long id;
 

+ 30 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/model/Product.java

@@ -129,7 +129,6 @@ public class Product {
 	private String sourceApp;
 
 
-
 	/**
 	 * 类目(平台)(中文)
 	 */
@@ -267,6 +266,20 @@ public class Product {
 	@Column(name = "pr_tostandard")
 	private Date tostandard;
 
+	/**
+	 * b2c更新后下载状态
+	 * DOWNLOADED(203, "已下载")
+	 * NOT_UPLOAD(202, "待下载")
+	 */
+	@Column(name = "pr_b2cdownstatus")
+	private Integer b2cDownStatus;
+
+	/**
+	 * 针对erp的物料交易信息
+	 */
+	@Transient
+	private ProductDetail productDetail;
+
 	public Product() {
 	}
 
@@ -605,8 +618,24 @@ public class Product {
 		return tostandard;
 	}
 
+	public Integer getB2cDownStatus() {
+		return b2cDownStatus;
+	}
+
+	public void setB2cDownStatus(Integer b2cDownStatus) {
+		this.b2cDownStatus = b2cDownStatus;
+	}
+
 	public Product setTostandard(Date tostandard) {
 		this.tostandard = tostandard;
 		return this;
 	}
+
+	public ProductDetail getProductDetail() {
+		return productDetail;
+	}
+
+	public void setProductDetail(ProductDetail productDetail) {
+		this.productDetail = productDetail;
+	}
 }

+ 245 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/model/ProductDetail.java

@@ -0,0 +1,245 @@
+package com.uas.platform.b2c.prod.commodity.model;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+/**
+ * 物料交易信息,主要针对ERP使用
+ *
+ * @version 2017/10/28 10:48 wangyc
+ */
+@Entity
+@Table(name = "products_detail_erp")
+public class ProductDetail implements Serializable{
+
+    private static final long serialVersionUID = 6044581872012738780L;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "prd_id")
+    private Long id;
+
+    /**
+     * 物料编号
+     */
+    @Column(name = "prd_code")
+    private String code;
+
+    /**
+     * 物料id
+     */
+    @Column(name = "prd_productid")
+    private Long productId;
+
+    /**
+     * 空闲库存
+     */
+    @Column(name = "prd_reserve")
+    private Double reserve;
+
+    /**
+     * 产品生产日期
+     */
+    @Column(name = "prd_manufacturedate")
+    private String produceDate;
+
+    /**
+     * 最小包装量
+     */
+    @Column(name = "prd_minpackqty")
+    private Double minPackQty;
+
+    /**
+     * 最小起订量
+     */
+    @Column(name = "prd_minbuyqty")
+    private Double minBuyQty;
+
+    /**
+     * 最长交期
+     */
+    @Column(name = "prd_maxdelivery")
+    private Short maxDelivery;
+
+    /**
+     * 最短交期
+     */
+    @Column(name = "prd_mindelivery")
+    private Short minDelivery;
+
+    /**
+     * 商城最长交期
+     */
+    @Column(name = "prd_b2cmaxdelivery")
+    private Short b2cMaxDelivery;
+
+    /**
+     * 商城最短交期
+     */
+    @Column(name = "prd_b2cmindelivery")
+    private Short b2cMinDelivery;
+
+    /**
+     * 包装:托盘、管装、卷带
+     */
+    @Column(name = "prd_packaging")
+    private String packaging;
+
+    /**
+     * 单价
+     */
+    @Column(name = "prd_price")
+    private Double price;
+
+    /**
+     * 是否拆卖
+     */
+    @Column(name = "go_isbreakup", columnDefinition = "TINYINT(1)")
+    private Boolean breakUp;
+
+    /**
+     * 商城已上架库存
+     */
+    @Column(name = "prd_b2creserve")
+    private Double b2cReserve;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public Double getReserve() {
+        return reserve;
+    }
+
+    public void setReserve(Double reserve) {
+        this.reserve = reserve;
+    }
+
+    public String getProduceDate() {
+        return produceDate;
+    }
+
+    public void setProduceDate(String produceDate) {
+        this.produceDate = produceDate;
+    }
+
+    public Double getMinPackQty() {
+        return minPackQty;
+    }
+
+    public void setMinPackQty(Double minPackQty) {
+        this.minPackQty = minPackQty;
+    }
+
+    public Double getMinBuyQty() {
+        return minBuyQty;
+    }
+
+    public void setMinBuyQty(Double minBuyQty) {
+        this.minBuyQty = minBuyQty;
+    }
+
+    public Short getMaxDelivery() {
+        return maxDelivery;
+    }
+
+    public void setMaxDelivery(Short maxDelivery) {
+        this.maxDelivery = maxDelivery;
+    }
+
+    public Short getMinDelivery() {
+        return minDelivery;
+    }
+
+    public void setMinDelivery(Short minDelivery) {
+        this.minDelivery = minDelivery;
+    }
+
+    public Short getB2cMaxDelivery() {
+        return b2cMaxDelivery;
+    }
+
+    public void setB2cMaxDelivery(Short b2cMaxDelivery) {
+        this.b2cMaxDelivery = b2cMaxDelivery;
+    }
+
+    public Short getB2cMinDelivery() {
+        return b2cMinDelivery;
+    }
+
+    public void setB2cMinDelivery(Short b2cMinDelivery) {
+        this.b2cMinDelivery = b2cMinDelivery;
+    }
+
+    public String getPackaging() {
+        return packaging;
+    }
+
+    public void setPackaging(String packaging) {
+        this.packaging = packaging;
+    }
+
+    public Double getPrice() {
+        return price;
+    }
+
+    public void setPrice(Double price) {
+        this.price = price;
+    }
+
+    public Boolean getBreakUp() {
+        return breakUp;
+    }
+
+    public void setBreakUp(Boolean breakUp) {
+        this.breakUp = breakUp;
+    }
+
+    public Double getB2cReserve() {
+        return b2cReserve;
+    }
+
+    public void setB2cReserve(Double b2cReserve) {
+        this.b2cReserve = b2cReserve;
+    }
+
+    public ProductDetail() {
+
+    }
+
+    public ProductDetail convertFromGoods(Goods goods, Product product) {
+        this.code = product.getProdNum();
+        this.productId = product.getId();
+        this.produceDate = goods.getProduceDate();
+        this.minPackQty = goods.getMinPackQty();
+        this.minBuyQty = goods.getMinBuyQty();
+        this.maxDelivery = goods.getMaxDelivery();
+        this.minDelivery = goods.getMinDelivery();
+        this.b2cMaxDelivery = goods.getB2cMaxDelivery();
+        this.b2cMinDelivery = goods.getB2cMinDelivery();
+        this.packaging = goods.getPackaging();
+        this.price = goods.getMinPrice();
+        this.breakUp = goods.getBreakUp();
+        return this;
+    }
+}

+ 10 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/service/GoodsService.java

@@ -133,6 +133,16 @@ public interface GoodsService {
      */
     Goods publish(Goods goods, String deviceInfo);
 
+    /**
+     * 发布(上架)商品
+     *
+     * @param goods      the goods 库存
+     * @param deviceInfo the device info 设备信息
+     * @param product  物料信息
+     * @return
+     */
+    Goods publish(Goods goods, String deviceInfo, Product  product);
+
     /**
      * 批量发布(上架)商品,
      *

+ 24 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/service/ProductService.java

@@ -1,6 +1,9 @@
 package com.uas.platform.b2c.prod.commodity.service;
 
+import com.alibaba.fastjson.JSONObject;
+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.model.ProductStandardPutOnInfo;
 import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.b2c.trade.support.ResultMap;
@@ -116,4 +119,25 @@ public interface ProductService {
      * @return
      */
     List<Product> save(List<Product> products);
+
+    /**
+     * 通过product id获取物料交易详情
+     * @param id
+     * @return
+     */
+    ProductDetail findByProductId(Long id);
+
+    /**
+     * 验证物料申请是否为标准物料
+     * @return
+     */
+    ResultMap validitonStandard(JSONObject jsonObject);
+
+    /**
+     * 保存物料交易详情
+     * @param productId
+     * @param goods
+     * @return
+     */
+    ProductDetail saveDetail(Long productId, Goods goods);
 }

+ 21 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -180,6 +180,9 @@ public class GoodsServiceImpl implements GoodsService {
 	@Autowired
 	private OrderDetailService detailService;
 
+	@Autowired
+	private ProductDetailDao productDetailDao;
+
 	private final Logger logger = Logger.getLogger(getClass());
 
 	@Autowired
@@ -564,6 +567,24 @@ public class GoodsServiceImpl implements GoodsService {
 		return goods;
 	}
 
+	@Override
+	@Transactional
+	public Goods publish(Goods goods, String deviceInfo, Product product) {
+		ProductDetail productDetail = productDetailDao.findByProductId(product.getId());
+		if (productDetail == null) {
+			productDetail = new ProductDetail();
+		} else if (productDetail.getReserve() != null) {
+			ProductDetail newProductDetail = productService.findByProductId(product.getId());
+			if (productDetail.getReserve() < goods.getReserve() + newProductDetail.getB2cReserve()) {
+				throw new IllegalOperatorException("本次上架数量和已上架数量之和不可超过ERP空闲库存数量");
+			}
+		}
+		productDetail.convertFromGoods(goods, product);
+		productDetailDao.save(productDetail);
+		Goods saveGoods = publish(goods, deviceInfo);
+		return goods;
+	}
+
 	@Override
 	@Transactional
 	public List<Goods> publish(List<Goods> goodses, String deviceInfo) {

+ 132 - 3
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -3,6 +3,7 @@ package com.uas.platform.b2c.prod.commodity.service.impl;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2c.advertise.ad.service.RecommendProductService;
+import com.uas.platform.b2c.common.account.service.EnterpriseService;
 import com.uas.platform.b2c.core.constant.IntegerConstant;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
@@ -15,7 +16,11 @@ import com.uas.platform.b2c.prod.commodity.type.ProductConstant;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
 import com.uas.platform.b2c.prod.product.brand.modal.Brand;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
+import com.uas.platform.b2c.prod.product.component.dao.ComponentSubmitDao;
 import com.uas.platform.b2c.prod.product.component.modal.Component;
+import com.uas.platform.b2c.prod.product.component.modal.ComponentSubmit;
+import com.uas.platform.b2c.prod.product.kind.model.Kind;
+import com.uas.platform.b2c.trade.order.dao.OrderDetailDao;
 import com.uas.platform.b2c.trade.order.model.Order;
 import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.b2c.trade.order.model.PurchaseDetail;
@@ -25,6 +30,7 @@ import com.uas.platform.b2c.trade.presale.service.CartService;
 import com.uas.platform.b2c.trade.support.CodeType;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.exception.IllegalOperatorException;
+import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.Status;
 import com.uas.platform.core.model.Type;
@@ -37,6 +43,7 @@ import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.dao.DataAccessException;
 import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
 import org.springframework.data.domain.Sort;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.jdbc.core.CallableStatementCallback;
@@ -110,6 +117,18 @@ public class ProductServiceImpl implements ProductService {
     @Autowired
     private OrderService orderService;
 
+    @Autowired
+    private ProductDetailDao productDetailDao;
+
+    @Autowired
+    private OrderDetailDao orderDetailDao;
+
+    @Autowired
+    private ComponentSubmitDao componentSubmitDao;
+
+    @Autowired
+    private EnterpriseService enterpriseService;
+
     private ConcurrentHashMap<String, Field> sortFields = new ConcurrentHashMap<String, Field>();
 
     @Override
@@ -136,7 +155,7 @@ public class ProductServiceImpl implements ProductService {
         }
 
         if (StringUtils.hasText(keyword)) {
-            SimpleExpression code = PredicateUtils.like("kind", keyword, true);
+            SimpleExpression code = PredicateUtils.like("prodNum", keyword, true);
             SimpleExpression brandEn = PredicateUtils.like("pbranden", keyword, true);
             SimpleExpression cmpCode = PredicateUtils.like("pcmpcode", keyword, true);
             SimpleExpression[] expressions2 = new SimpleExpression[]{code, brandEn, cmpCode};
@@ -144,13 +163,24 @@ public class ProductServiceImpl implements ProductService {
             page.expression(logicalExpression2);
         }
 
-        return productDao.findAll(new Specification<Product>() {
+        Page<Product> productPage = productDao.findAll(new Specification<Product>() {
             @Override
             public Predicate toPredicate(Root<Product> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                 query.where(page.getPredicates(root, query, cb));
                 return null;
             }
         }, page);
+        List<Product> productList = productPage.getContent();
+        for (Product product : productList) {
+            if ("ERP".equals(product.getSourceApp())) {
+                ProductDetail productDetail = productDetailDao.findByProductId(product.getId());
+                if (productDetail != null) {
+                    product.setProductDetail(productDetail);
+                }
+            }
+        }
+
+        return new PageImpl<Product>(productList, page, productPage.getTotalElements());
     }
 
     @Override
@@ -278,7 +308,13 @@ public class ProductServiceImpl implements ProductService {
         if (CollectionUtils.isEmpty(components))
             throw new IllegalOperatorException("匹配失败,商城暂无该型号信息,可前往“器件申请”,提出申请");
         product.setCmpUuId(components.get(0).getUuid());
-
+        product.setPbrand(brands.get(0).getNameCn());
+        product.setPbranden(brands.get(0).getNameEn());
+        product.setPbranduuid(brands.get(0).getUuid());
+        product.setKind(components.get(0).getKind().getNameCn());
+        product.setPcmpcode(components.get(0).getCode());
+        product.setB2cDownStatus(com.uas.platform.b2c.core.constant.Status.NOT_UPLOAD.value());
+        product.setStandard((int) Constant.YES);
         return productDao.save(product);
     }
 
@@ -590,5 +626,98 @@ public class ProductServiceImpl implements ProductService {
     public List<Product> save(List<Product> products) {
         return productDao.save(products);
     }
+
+    @Override
+    public ProductDetail findByProductId(Long id) {
+        Product product = productDao.findOne(id);
+        if (product == null) {
+            throw new IllegalOperatorException("此产品不存在,请重新确认产品信息");
+        }
+        ProductDetail productDetail = productDetailDao.findByProductId(id);
+        if (productDetail != null) {
+            Double b2cReserve = 0d;
+            if (product.getCmpUuId() != null) {// 获取当前商城已上架数量(含锁库存)
+                b2cReserve = goodsDao.getSumReserveByEnUUAndUuidAndStatus(SystemSession.getUser().getEnterprise().getUu(), product.getCmpUuId(), Status.AVAILABLE.value());
+                Double lockReserve = orderDetailDao.getSumReserveBySupEnUuAndUuidAndStatus(SystemSession.getUser().getEnterprise().getUu(), product.getCmpUuId(), Status.TOBEPAID.value());
+                b2cReserve = (b2cReserve == null ? 0d : b2cReserve) + (lockReserve == null ? 0d :lockReserve);
+            }
+            productDetail.setB2cReserve(b2cReserve);
+        }
+
+        return productDetail;
+    }
+
+    @Override
+    public ResultMap validitonStandard(JSONObject jsonObject) {
+        Component component = (Component)jsonObject.get("component");
+        if (component == null || component.getCode() == null)
+            throw new IllegalOperatorException("请填写器件原厂型号");
+        Brand brand = (Brand)jsonObject.get("brand");
+        if (brand == null || brand.getNameEn() == null)
+            throw new IllegalOperatorException("请填写品牌英文名");
+        List<Brand> brands = brandDao.findByNameEn(brand.getNameEn());
+        if (CollectionUtils.isEmpty(brands))
+            throw new IllegalOperatorException(("商城不存在:" + brand.getNameEn() + " 品牌,请选择商城品牌或申请该品牌"));
+        List<Component> componentMatched = componentDao.findByCodeAndBrandid(component.getCode(), brands.get(0).getId());
+        if (CollectionUtils.isEmpty(componentMatched)) {// 提交申请为非标准器件则转成器件申请
+            Kind kind = (Kind)jsonObject.get("kind");
+            if (kind == null || kind.getId() == null)
+                throw new IllegalOperatorException("请选择商城类目");
+            String attach = jsonObject.getString("attach");
+            if (attach == null)
+                throw new IllegalOperatorException("请上传规格书");
+            ComponentSubmit submit = new ComponentSubmit();
+            submit.setAttach(attach);
+            submit.setBrandid(brands.get(0).getId());
+            submit.setCode(component.getCode());
+            submit.setDefineentuu(SystemSession.getUser().getEnterprise().getUu());
+            submit.setDefineuu(SystemSession.getUser().getUserUU());
+            submit.setDefinetime(new Date());
+            submit.setIsUpdate(0);
+            submit.setKindid(kind.getId());
+            componentSubmitDao.save(submit);
+
+            return ResultMap.success("提交申请成功,请等待审核结果");
+        } else {
+            return ResultMap.success("已存在此器件");
+        }
+    }
+
+    @Override
+    public ProductDetail saveDetail(Long productId, Goods goods) {
+        Product product = productDao.findOne(productId);
+        if (product == null)
+            throw new IllegalOperatorException("此物料信息不存在,请重新确认");
+        ProductDetail productDetail = productDetailDao.findByProductId(productId);
+        if (productDetail == null)
+            productDetail = new ProductDetail();
+
+        productDetail.setBreakUp(goods.getBreakUp());
+        productDetail.setProduceDate(goods.getProduceDate());
+        productDetail.setProductId(productId);
+        productDetail.setCode(goods.getCode());
+        productDetail.setB2cMaxDelivery(goods.getB2cMaxDelivery());
+        productDetail.setB2cMinDelivery(goods.getB2cMinDelivery());
+        productDetail.setMaxDelivery(goods.getMaxDelivery());
+        productDetail.setMinBuyQty(goods.getMinBuyQty());
+        productDetail.setMinDelivery(goods.getMinDelivery());
+        productDetail.setMinPackQty(goods.getMinPackQty());
+        productDetail.setPackaging(goods.getPackaging());
+
+        if (enterpriseService.getCurrencyByRegisterAddress().getData() == null)
+            throw new IllegalOperatorException("注册地址为空,无法确认币别信息,请前往-优软云补充注册地址信息");
+        String currency = enterpriseService.getCurrencyByRegisterAddress().getData().toString();
+        List<GoodsQtyPrice> qtyPrice = FastjsonUtils.fromJsonArray(goods.getQtyPrice(), GoodsQtyPrice.class);
+        if (!CollectionUtils.isEmpty(qtyPrice)) {
+            if ("RMB".equals(currency)) {
+                productDetail.setPrice(qtyPrice.get(0).getRMBPrice());
+            }
+            if ("USD".equals(currency)) {
+                productDetail.setPrice(qtyPrice.get(0).getUSDPrice());
+            }
+        }
+
+        return productDetailDao.save(productDetail);
+    }
 }
 

+ 22 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/controller/BrandSubmitController.java

@@ -17,6 +17,7 @@ import com.uas.platform.core.model.Status;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.dao.DataIntegrityViolationException;
 import org.springframework.data.domain.Page;
+import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -179,4 +180,25 @@ public class BrandSubmitController {
 			throw new IllegalOperatorException("品牌已存在,请重新确认品牌信息");
 		}
 	}
+
+	/**
+	 * 通过非标物料申请品牌
+	 * @param json
+	 * @return
+	 */
+	@RequestMapping(value = "/fromunstandard", method = RequestMethod.POST)
+	public ModelMap saveFromUnstandard(@RequestBody String json) {
+		ModelMap map = new ModelMap();
+		logger.log("品牌维护", "通过非标器件申请品牌", "通过非标器件申请品牌");
+		String brandSubmit = brandSubmitService.saveFromUnstandard(json);
+		if (brandSubmit == null) {
+			map.put("code", 400);
+			map.put("message", "商城已存在相同品牌");
+		} else {
+			map.put("code", 200);
+			map.put("message", "品牌申请提交成功,请等待审核");
+			map.put("brandsubmit", brandSubmit);
+		}
+		return map;
+	}
 }

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/product/brand/modal/Brand.java

@@ -26,7 +26,7 @@ public class Brand implements Serializable {
 	 */
 	@Id
 	@Column(name = "br_id")
-	@GeneratedValue
+	@GeneratedValue(strategy = GenerationType.IDENTITY)
 	private Long id;
 
 	/**

+ 8 - 2
src/main/java/com/uas/platform/b2c/prod/product/brand/service/BrandSubmitService.java

@@ -1,10 +1,9 @@
 package com.uas.platform.b2c.prod.product.brand.service;
 
-import org.springframework.data.domain.Page;
-
 import com.uas.platform.b2c.prod.product.brand.modal.Brand;
 import com.uas.platform.b2c.prod.product.brand.modal.BrandSubmit;
 import com.uas.platform.core.model.PageInfo;
+import org.springframework.data.domain.Page;
 
 public interface BrandSubmitService {
 
@@ -64,4 +63,11 @@ public interface BrandSubmitService {
 	 */
 	public Brand audituUpdate(BrandSubmit brandSubmit);
 
+	/**
+	 * 通过非标物料申请品牌
+	 * @param json
+	 * @return
+	 */
+	public String saveFromUnstandard(String json);
+
 }

+ 47 - 1
src/main/java/com/uas/platform/b2c/prod/product/brand/service/impl/BrandSubmitServiceImpl.java

@@ -1,6 +1,8 @@
 package com.uas.platform.b2c.prod.product.brand.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.core.utils.FastjsonUtils;
 import com.uas.platform.b2c.external.erp.product.service.OperationInfoService;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandSubmitDao;
@@ -321,7 +323,7 @@ public class BrandSubmitServiceImpl implements BrandSubmitService {
 			// "user#/home/brandMaintenance", "品牌维护");
 		} else if (brandSubmit.getTel() != null) {
 			// 发送短信
-			// UserBaseInfo userBaseInfo =
+			// UserBaseInfoUas userBaseInfo =
 			// userBaseInfoDao.findOne(brandSubmit.getModifyuu());
 			// sendMessageService.sendMessage("您提交的" + brandSubmit.getNameCn() +
 			// "品牌申请已审核通过。", brandSubmit.getTel(),
@@ -331,4 +333,48 @@ public class BrandSubmitServiceImpl implements BrandSubmitService {
 		return brandVersionService.saveBrandVersion(brandSubmit);
 	}
 
+	@Override
+	public String saveFromUnstandard(String json) {
+		JSONObject jsonObject = FastjsonUtils.parseObject(json);
+//		jsonObject.getObject();
+		String nameEn = jsonObject.getString("nameEn");
+		if (!StringUtils.hasText(nameEn)) {
+			throw new IllegalOperatorException("请填写品牌英文名");
+		}
+		String url = jsonObject.getString("url");
+		String brief = jsonObject.getString("brief");
+		String series = jsonObject.getString("series");
+		String logoUrl = jsonObject.getString("logoUrl");
+
+		List<Brand> brands = brandDao.findByNameEn(nameEn);
+		if (CollectionUtils.isNotEmpty(brands)) {
+			return brands.get(0).getNameEn();
+		} else {
+			if (!StringUtils.hasText(url)) {
+				throw new IllegalOperatorException("请填写品牌官网");
+			}
+			if (!StringUtils.hasText(brief)) {
+				throw new IllegalOperatorException("请填写品牌简介");
+			}
+			if (!StringUtils.hasText(series)) {
+				throw new IllegalOperatorException("请填写主要产品");
+			}
+			if (!StringUtils.hasText(logoUrl)) {
+				throw new IllegalOperatorException("请上传品牌图片");
+			}
+
+			BrandSubmit brandSubmit = new BrandSubmit();
+			brandSubmit.setIsUpdate(0);
+			brandSubmit.setDefineentuu(SystemSession.getUser().getEnterprise().getUu());
+			brandSubmit.setDefineuu(SystemSession.getUser().getUserUU());
+			brandSubmit.setBrief(brief);
+			brandSubmit.setLogoUrl(logoUrl);
+			brandSubmit.setNameEn(nameEn);
+			brandSubmit.setSeries(series);
+			brandSubmit.setUrl(url);
+			brandSubmitDao.save(brandSubmit);
+		}
+		return null;
+	}
+
 }

+ 6 - 0
src/main/java/com/uas/platform/b2c/prod/product/component/service/impl/ComponentSubmitServiceImpl.java

@@ -350,6 +350,8 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 		Set<ComponentCrawlSubDetail> submitDetails = new HashSet<ComponentCrawlSubDetail>();
 		Sheet sheet = workbook.getSheetAt(0);
 		int rowNum = sheet.getLastRowNum();
+		if (rowNum > 10000)
+			throw new IllegalOperatorException("上传文件不可超过10000行");
 		Row headerRow = sheet.getRow(0);
 		if (headerRow.getCell(0) != null && headerRow.getCell(1) != null && headerRow.getCell(2) != null && headerRow.getCell(3) != null && headerRow.getCell(4) != null
 				&& headerRow.getCell(5) != null) {
@@ -534,6 +536,8 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 		List<ComponentCrawl> components = new ArrayList<ComponentCrawl>();
 		Sheet sheet = workbook.getSheetAt(0);
 		int rowNum = sheet.getLastRowNum();
+		if (rowNum > 10000)
+			throw new IllegalOperatorException("上传文件不可超过10000行");
 		Row fourthRow = sheet.getRow(3);
 		if (fourthRow.getCell(1) != null && fourthRow.getCell(2) != null && fourthRow.getCell(3) != null && fourthRow.getCell(4) != null) {
 			// 商城类目
@@ -722,6 +726,8 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 		List<ComponentCrawl> components = new ArrayList<ComponentCrawl>();
 		Sheet sheet = workbook.getSheetAt(0);
 		int rowNum = sheet.getLastRowNum();
+		if (rowNum > 10000)
+			throw new IllegalOperatorException("上传文件不可超过10000行");
 		Date date = new Date();
 		
 		KindCrawl kindCrawl = kindContrastDao.findOne(kindContrastId);

+ 3 - 0
src/main/java/com/uas/platform/b2c/trade/order/dao/OrderDetailDao.java

@@ -42,4 +42,7 @@ public interface OrderDetailDao extends JpaSpecificationExecutor<OrderDetail>, J
 	 */
 	@Query(value = "select d from OrderDetail d where d.batchCode =:batchCode and d.status =:status")
 	List<OrderDetail> findByBatchCodeAndStatus(@Param("batchCode") String batchCode, @Param("status") Integer status);
+
+	@Query(value = "select sum(detail_number) from trade$order_detail where detail_sup_en_uu=:enuu and cmp_uuid=:uuid and detail_status=:status", nativeQuery = true)
+	Double getSumReserveBySupEnUuAndUuidAndStatus(@Param("enuu") Long enuu, @Param("uuid") String uuid, @Param("status") Integer status);
 }

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

@@ -260,6 +260,12 @@ public class Order extends Document implements Serializable {
 	@StatusColumn
 	private Integer status;
 
+	/**
+	 * uas获取状态 待上传 (202) | 已下载 (203)
+	 */
+	@Column(name = "or_sendstatus")
+	private Integer sendstatus;
+
 	/**
 	 * 评论状态
 	 */
@@ -483,6 +489,14 @@ public class Order extends Document implements Serializable {
 	@Transient
 	private Map<String, AfterSaleStatus> puExInfoMap;
 
+	public Integer getSendstatus() {
+		return sendstatus;
+	}
+
+	public void setSendstatus(Integer sendstatus) {
+		this.sendstatus = sendstatus;
+	}
+
 	/**
 	 * 退货单单号
 	 */

+ 1 - 1
src/main/java/com/uas/platform/b2c/trade/order/model/OrderDetail.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.trade.order.model;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.uas.api.b2c_erp.buyer.model.PurchaseDetail;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.logistics.model.InvoiceFOrderDetail;
@@ -13,7 +14,6 @@ import com.uas.platform.core.model.EncodingRulesConstant;
 import com.uas.platform.core.model.Status;
 import com.uas.platform.core.persistence.StatusColumn;
 import org.apache.commons.collections.CollectionUtils;
-import org.codehaus.jackson.annotate.JsonIgnore;
 
 import javax.persistence.CascadeType;
 import javax.persistence.Column;

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

@@ -104,7 +104,6 @@ import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
-import java.io.IOException;
 import java.util.*;
 
 import static com.uas.platform.b2c.trade.aftersale.model.AfterSaleStatus.*;
@@ -820,6 +819,7 @@ public class OrderServiceImpl implements OrderService {
             or.setOrderDetails(newOrderDetails);
             updateOrderBill(or);
             or.setOrderid(createNumberService.generateOrderNumber(EncodingRulesConstant.ORDER, "trade$order", 8));
+            or.setSendstatus(Status.NOT_UPLOAD.value());// 将订单设置为未下载状态,以便erp下载
             orders.add(or);
         }
         List<Order> orderList = orderDao.save(orders);
@@ -1094,7 +1094,7 @@ public class OrderServiceImpl implements OrderService {
         }
 
         Long uu = SystemSession.getUser().getUserUU();
-        order.setStatusToBePaid(uu);
+        order.setStatusToBePaid(uu);// 确认订单设置订单状态为待付款
         /**
          * @TODO 这里需要用定时器去检查,过期失效后要返还库存等
          */
@@ -1408,6 +1408,7 @@ public class OrderServiceImpl implements OrderService {
 
         // 设置为等待卖家同意
         order.setStatusMonecyReceviced(userUU);
+        order.setSendstatus(Status.NOT_UPLOAD.value());// 将订单设置为未下载状态,以便erp下载
         order.setPaytime(new Date());
         Order newOrder = orderDao.save(order);
 
@@ -3171,6 +3172,7 @@ public class OrderServiceImpl implements OrderService {
         for (Purchase purchase : purchases) {
             if (purchase.getStatus().intValue() == Status.PAID.value()) {
                 purchase.setStatusToBeConfirmed(sysConf.getAdminUU());
+                purchase.setSendstatus(Status.NOT_UPLOAD.value());// 将确认付款审核失败的采购单ERP下载状态置为待下载,以便ERP用于取消出货单
                 for (PurchaseDetail purchaseDetail : purchase.getPurchaseDetails()) {
                     if (purchaseDetail.getStatus().intValue() == Status.PAID.value()) {
                         purchaseDetail.setStatusToBeConfirmed(sysConf.getAdminUU());

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

@@ -465,7 +465,7 @@ public class PurchaseServiceImpl implements PurchaseService {
 			Goods goods = goodsDao.findByBatchCode(orderDetail.getBatchCode());
 			purchase.setUasPurcid(goods.getSourceId());
 		}
-		purchase.setSendstatus(Status.NOT_UPLOAD.value());
+//		purchase.setSendstatus(Status.NOT_UPLOAD.value());
 		// 生成采购单号
 		String purchaseid = createNumberService.generateOrderNumber(EncodingRulesConstant.PURCHASE, "trade$purchase", 8);
 		purchase.setPurchaseid(purchaseid);

+ 30 - 21
src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CartServiceImpl.java

@@ -46,36 +46,45 @@ import java.util.*;
 @Service
 public class CartServiceImpl implements CartService {
 
-	private final CartDao cartDao;
-
-	private final GoodsService goodsService;
+	@Autowired
+	private CartDao cartDao;
 
-	private final ComponentService componentService;
+	@Autowired
+	private GoodsService goodsService;
 
-	private final ComponentDao componentDao;
+	@Autowired
+	private ComponentService componentService;
 
-	private final GoodsSimpleDao goodsSimpleDao;
+	@Autowired
+	private ComponentDao componentDao;
 
-	private final GoodsHistoryDao goodsHistoryDao;
+	@Autowired
+	private GoodsSimpleDao goodsSimpleDao;
 
-	private final StoreInDao storeInDao;
+	@Autowired
+	private GoodsHistoryDao goodsHistoryDao;
 
-	private final GoodsDao goodsDao;
+	@Autowired
+	private StoreInDao storeInDao;
 
-	private final EnterpriseDao enterpriseDao;
+	@Autowired
+	private GoodsDao goodsDao;
 
 	@Autowired
-	public CartServiceImpl(CartDao cartDao, GoodsService goodsService, ComponentService componentService, ComponentDao componentDao, GoodsSimpleDao goodsSimpleDao, GoodsHistoryDao goodsHistoryDao, StoreInDao storeInDao, GoodsDao goodsDao, EnterpriseDao enterpriseDao) {
-		this.cartDao = cartDao;
-		this.goodsService = goodsService;
-		this.componentService = componentService;
-		this.componentDao = componentDao;
-		this.goodsSimpleDao = goodsSimpleDao;
-		this.goodsHistoryDao = goodsHistoryDao;
-		this.storeInDao = storeInDao;
-		this.goodsDao = goodsDao;
-		this.enterpriseDao = enterpriseDao;
-	}
+	private EnterpriseDao enterpriseDao;
+
+//	@Autowired
+//	public CartServiceImpl(CartDao cartDao, GoodsService goodsService, ComponentService componentService, ComponentDao componentDao, GoodsSimpleDao goodsSimpleDao, GoodsHistoryDao goodsHistoryDao, StoreInDao storeInDao, GoodsDao goodsDao, EnterpriseDao enterpriseDao) {
+//		this.cartDao = cartDao;
+//		this.goodsService = goodsService;
+//		this.componentService = componentService;
+//		this.componentDao = componentDao;
+//		this.goodsSimpleDao = goodsSimpleDao;
+//		this.goodsHistoryDao = goodsHistoryDao;
+//		this.storeInDao = storeInDao;
+//		this.goodsDao = goodsDao;
+//		this.enterpriseDao = enterpriseDao;
+//	}
 
 	@Override
 	public List<Cart> findByUuAndEnuu() {

+ 2 - 2
src/main/resources/dev/sys.properties

@@ -30,9 +30,9 @@ newsMicroServiceIp=news.usoftchina.com
 newsRedisRefresh=3600
 floorMicroServiceIp=10.10.101.23
 carouselMicroServiceIp=10.10.101.23
-storecmsMicroServiceIp=10.10.101.23
+storecmsMicroServiceIp=192.168.253.12
 endpointUri=10.10.101.23
-recommendPort=20102
+recommendPort=20100
 # upload file
 uploadFileUrl = http://10.10.100.200:9999
 # search file

+ 42 - 1
src/main/webapp/WEB-INF/spring/hessian.xml

@@ -14,6 +14,28 @@
 	<bean id="apiHandlerInterceptor"
 		class="com.uas.platform.b2c.external.erp.support.HandlerInterceptorImpl" />
 
+	<!-- ERP物料接口 -->
+	<bean id="api.ProdService" class="com.uas.platform.b2c.external.erp.prod.service.impl.ProdServiceImpl" />
+
+	<bean name="/api/service/seller/prod" class="com.uas.api.crypto.hessian.PermittedServiceExporter">
+		<property name="secretKeyService" ref="apiSecretKeyService" />
+		<property name="handlerInterceptor" ref="apiHandlerInterceptor" />
+		<property name="service" ref="api.ProdService" />
+		<property name="serviceInterface"
+				  value="com.uas.api.b2c_erp.seller.service.ProdService" />
+	</bean>
+
+	<!-- ERP库存接口 -->
+	<bean id="api.ProductDetailERPService" class="com.uas.platform.b2c.external.erp.commodity.service.impl.ProductDetailERPServiceImpl" />
+
+	<bean name="/api/service/seller/productdetail" class="com.uas.api.crypto.hessian.PermittedServiceExporter">
+		<property name="secretKeyService" ref="apiSecretKeyService" />
+		<property name="handlerInterceptor" ref="apiHandlerInterceptor" />
+		<property name="service" ref="api.ProductDetailERPService" />
+		<property name="serviceInterface"
+				  value="com.uas.api.b2c_erp.seller.service.ProductDetailERPService" />
+	</bean>
+
 	<!-- 卖家收到的采购订单接口 -->
 	<bean id="api.OrderService" class="com.uas.platform.b2c.external.erp.order.service.impl.OrderServiceImpl" />
 
@@ -171,5 +193,24 @@
 		<property name="serviceInterface"
 			value="com.uas.api.b2c_erp.operation.service.OperationInfoUasService"/>
 	</bean>
-	
+
+	<!-- 采购单操作信息 -->
+	<bean id="api.B2cOrderServive" class="com.uas.platform.b2c.external.erp.order.service.impl.B2cOrderServiceImpl"></bean>
+	<bean name="/api/service/b2cOrder" class="com.uas.api.crypto.hessian.PermittedServiceExporter">
+		<property name="secretKeyService" ref="apiSecretKeyService" />
+		<property name="handlerInterceptor" ref="apiHandlerInterceptor" />
+		<property name="service" ref="api.B2cOrderServive"/>
+		<property name="serviceInterface"
+				  value="com.uas.api.b2c_erp.buyer.service.B2cOrderService"/>
+	</bean>
+
+	<!-- 卖家收款账户操作信息 -->
+	<bean id="api.BankInfoService" class="com.uas.platform.b2c.external.erp.commodity.service.impl.BankInfoServiceImpl"></bean>
+	<bean name="/api/service/bankInfo" class="com.uas.api.crypto.hessian.PermittedServiceExporter">
+		<property name="secretKeyService" ref="apiSecretKeyService" />
+		<property name="handlerInterceptor" ref="apiHandlerInterceptor" />
+		<property name="service" ref="api.BankInfoService"/>
+		<property name="serviceInterface"
+				  value="com.uas.api.b2c_erp.seller.service.BankInfoService"/>
+	</bean>
 </beans>

+ 4 - 1
src/main/webapp/WEB-INF/spring/webmvc.xml

@@ -58,7 +58,7 @@
 		<property name="normalPrefix" value="normal/" />
 		<property name="mobilePrefix" value="mobile/" />
 		<property name="tabletPrefix" value="tablet/" />
-	</bean>
+</bean>
 
 	<mvc:view-controller path="/" view-name="index" />
 	<mvc:view-controller path="/index" view-name="index" />
@@ -83,6 +83,9 @@
 	<mvc:view-controller path="/login/proxy" view-name="proxyLogin" />
 	<mvc:view-controller path="/logout/proxy" view-name="proxyLogout" />
 	<mvc:view-controller path="/order/proxy" view-name="proxyOrder" />
+	<!-- erp对接页面 -->
+	<mvc:view-controller path="/user_erp" view-name="erp/user_center" />
+	<mvc:view-controller path="/vendor_erp" view-name="erp/vendor_center" />
 
 	<mvc:interceptors>
 		<!-- SSO过滤 -->

+ 107 - 0
src/main/webapp/WEB-INF/views/normal/erp/user_center.html

@@ -0,0 +1,107 @@
+<!DOCTYPE HTML>
+<html lang="zh-CN">
+<head>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+<meta name="renderer" content="webkit">
+<title>买家中心-优软商城</title>
+<meta name="description" content="优软商城,电子元器件搜索引擎" />
+<meta name="keywords"
+	content="优软商城,B2B,B2C,行业门户,网上贸易,电子商务,网上贸易,网上交易,交易市场,在线交易,供求信息,采购,求购信息,供应信息" />
+<link href="static/img/all/u.png" rel="icon" type="image/x-icon" />
+<link rel="stylesheet" href="static/lib/bootstrap/css/bootstrap.min.css">
+<link rel="stylesheet" href="static/lib/fontawesome/css/font-awesome.min.css" />
+<link rel="stylesheet" href="static/lib/jquery/themes/summernote/css/summernote.css" />
+<link rel="stylesheet" href="static/lib/iconfont/css/iconfont.css" />
+<link rel="stylesheet" href="static/lib/jquery/themes/uploadify/uploadify.css" />
+<link rel="stylesheet" href="static/lib/angular/toaster.css" />
+<link rel="stylesheet" href="static/css/common.css" />
+<!--<link rel="stylesheet" href="static/css/usercenter.css" />-->
+<link rel="stylesheet" href="static/css/user/base.css" />
+<link rel="stylesheet" href="static/css/user/user.css" />
+<link rel="stylesheet" href="static/lib/calendar/calendar.css">
+<link rel="stylesheet" href="static/css/erp/align.css">
+</head>
+<body>
+
+
+	<!-- 消息提示框  Start-->
+	<toaster-container
+			toaster-options="{'position-class': 'toast-bottom-center'}"></toaster-container>
+	<!-- 消息提示框 End -->
+	<!-- Loading Start -->
+	<div id="loading" class="loading">
+		<i></i>
+	</div>
+	<!-- Loading End -->
+
+	<section class="clearfix">
+		<div class="wrap">
+			<div class="user_content">
+				<div ui-view=""></div>
+			</div>
+		</div>
+	</section>
+	<footer class="clearfix">
+		<div ng-include src="'static/view/common/footer_erp.html'" style="margin-top: 40px;"></div>
+	</footer>
+	<!--&lt;!&ndash; header 标题Logo和搜索框 Start &ndash;&gt;-->
+	<!--<div ng-include src="'static/view/common/header.html'"></div>-->
+	<!--&lt;!&ndash; header 标题Logo和搜索框 End &ndash;&gt;-->
+	<!--&lt;!&ndash; navigation 导航栏 Start &ndash;&gt;-->
+	<!--<div ng-include src="'static/view/common/nav.html'"></div>-->
+	<!--&lt;!&ndash; navigation 导航栏  End &ndash;&gt;-->
+
+	<!--&lt;!&ndash; Start &ndash;&gt;-->
+	<!--<div class="main-panel" id="main">-->
+		<!--<div class="container">-->
+			<!--&lt;!&ndash; 左侧导航栏 Start &ndash;&gt;-->
+			<!--<div class="left">-->
+				<!--<div ng-include src="'static/view/usercenter/left_nav.html'"></div>-->
+			<!--</div>-->
+			<!--&lt;!&ndash; 左侧导航栏 End &ndash;&gt;-->
+			<!--&lt;!&ndash; 核心内容 Start &ndash;&gt;-->
+			<!--<div class="right">-->
+				<!--<div ui-view></div>-->
+			<!--</div>-->
+			<!--&lt;!&ndash; 核心内容 End &ndash;&gt;-->
+		<!--</div>-->
+	<!--</div>-->
+	<!--&lt;!&ndash; End &ndash;&gt;-->
+	<!--&lt;!&ndash; 页脚 Start &ndash;&gt;-->
+	<!--<div ng-include src="'static/view/common/footer.html'"></div>-->
+	<!--&lt;!&ndash; 页脚 End &ndash;&gt;-->
+
+	<!--&lt;!&ndash; 侧边栏Start &ndash;&gt;-->
+	<!--<div ng-include src="'static/view/common/sidebar.html'"></div>-->
+	<!--&lt;!&ndash; 侧边栏End &ndash;&gt;-->
+
+	<script type="text/javascript" src="static/lib/require.js"
+		data-main="static/js/usercenter/main.js"></script>
+	<script type="text/ng-template" id="offer/image/insert.html">
+		<div class="modal-header">
+			<button type="button" class="close" ng-click="close()">×</button>
+			<h4 class="modal-title">插入图片</h4>
+		</div>
+		<div class="modal-body">
+			<div class="row">
+				<div class="col-xs-7" style="padding: 20px;">
+					<p class="help-block">提示:选择的图片单张大小不超过3MB,支持jpg,jpeg,gif,bmp,png</p>
+					<div class="upload-container" ng-disabled="getImages().length == images.length">
+						<div id="uploadify" on-success="onUploadSuccess($data)" uploadify="{buttonText:'选择图片'}"></div>
+					</div>
+				</div>
+				<div class="col-xs-5">
+					<h3>预览</h3>
+					<div class="image-content">
+						<img ng-src="{{image.src}}" class="img-thumbnail" style="width: 100px; height: 100px;">
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="modal-footer">
+			<div class="pull-right"><a ng-click="confirm()" class="btn btn-primary" ng-disabled="!image.src">确定</a></div>
+		</div>
+	</script>
+</body>
+</html>

+ 116 - 0
src/main/webapp/WEB-INF/views/normal/erp/vendor_center.html

@@ -0,0 +1,116 @@
+<!DOCTYPE HTML>
+<html lang="zh-CN">
+<head>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+<meta name="renderer" content="webkit">
+<title>卖家中心-优软商城</title>
+<meta name="description" content="优软商城,电子元器件搜索引擎" />
+<meta name="keywords"
+	content="优软商城,B2B,B2C,行业门户,网上贸易,电子商务,网上贸易,网上交易,交易市场,在线交易,供求信息,采购,求购信息,供应信息" />
+<link href="static/img/all/u.png" rel="icon" type="image/x-icon" />
+<link rel="stylesheet" href="static/lib/bootstrap/css/bootstrap.min.css" />
+<link rel="stylesheet" href="static/css/vendor/sell.css" />
+<link rel="stylesheet" href="static/css/common.css" />
+<link rel="stylesheet" href="static/lib/fontawesome/css/font-awesome.min.css" />
+<link rel="stylesheet" href="static/lib/angular/toaster.css" />
+<link rel="stylesheet" href="static/lib/jquery/themes/uploadify/uploadify.css" />
+<link rel="stylesheet" href="static/css/vendor/base.css" />
+<link rel="stylesheet" href="static/lib/calendar/calendar.css">
+<link rel="stylesheet" href="static/lib/angular/ng-table.css">
+<link rel="stylesheet" href="static/css/erp/align.css">
+</head>
+<body>
+	<!-- 消息提示框  Start-->
+	<toaster-container
+		toaster-options="{'position-class': 'toast-bottom-center'}" style="font-size: 14px;"></toaster-container>
+	<!-- 消息提示框 End -->
+	<!-- Loading Start -->
+	<div id="loading" class="loading">
+		<i></i>
+	</div>
+	<!-- Loading End -->
+
+	<!--内容开始-->
+	<section class="clearfix">
+		<div class="wrap">
+			<div class="user_content">
+				<div ui-view></div>
+			</div>
+		</div>
+	</section>
+	<footer class="clearfix" style="margin-top: 40px;">
+		<div ng-include src="'static/view/common/footer_erp.html'"></div>
+	</footer>
+
+	<!--&lt;!&ndash; header 标题Logo和搜索框 Start &ndash;&gt;-->
+	<!--<div ng-include src="'static/view/common/header.html'"></div>-->
+	<!--&lt;!&ndash; header 标题Logo和搜索框 End &ndash;&gt;-->
+
+	<!--&lt;!&ndash; navigation 导航栏 Start &ndash;&gt;-->
+	<!--<div ng-include src="'static/view/common/nav.html'"></div>-->
+	<!--&lt;!&ndash; navigation 导航栏  End &ndash;&gt;-->
+
+	<!--&lt;!&ndash; 主体内容 Start &ndash;&gt;-->
+	<!--<div class="main-panel" id="main">-->
+		<!--<div class="container">-->
+			<!--&lt;!&ndash; 左侧导航栏 Start &ndash;&gt;-->
+			<!--<div class="left">-->
+				<!--<div ng-include src="'static/view/vendor/left.html'"></div>-->
+			<!--</div>-->
+			<!--&lt;!&ndash; 左侧导航栏 End &ndash;&gt;-->
+			<!--&lt;!&ndash; 核心内容 Start &ndash;&gt;-->
+			<!--<div class="right">-->
+				<!--<div ui-view></div>-->
+			<!--</div>-->
+			<!--&lt;!&ndash; 核心内容 End &ndash;&gt;-->
+		<!--</div>-->
+	<!--</div>-->
+	<!--&lt;!&ndash; 主体内容 End &ndash;&gt;-->
+
+	<!--客服咨询-->
+	<!--<div class="kefu" align="center">
+		<a href="javascript:void(0)">
+			<img src="static/img/user/images/kefu.png" width="165px" height="239px" style="position: relative;"/>
+			<span id="service-close" class="service-close">×</span>
+		</a>
+	</div>-->
+
+	<script type="text/javascript" src="static/lib/require.js"
+		data-main="static/js/vendor/main.js"></script>
+	<!-- 产品图片插入modal Start -->
+	<script type="text/ng-template" id="offer/image/insert.html">
+		<div class="modal-header">
+			<button type="button" class="close" ng-click="close()">×</button>
+			<h4 class="modal-title">插入图片</h4>
+		</div>
+		<div class="modal-body">
+			<div class="row">
+				<div class="col-xs-7" style="padding: 20px;">
+					<p class="help-block">提示:选择的图片单张大小不超过3MB,支持jpg,jpeg,gif,bmp,png</p>
+					<div class="upload-container" ng-disabled="getImages().length == images.length">
+						<div id="uploadify" on-success="onUploadSuccess($data)" uploadify="{buttonText:'选择图片'}"></div>
+					</div>
+				</div>
+				<div class="col-xs-5">
+					<h3>预览</h3>
+					<div class="image-content">
+						<img ng-src="{{image.src}}" class="img-thumbnail" style="width: 100px; height: 100px;">
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="modal-footer">
+			<div class="pull-right"><a ng-click="confirm()" class="btn btn-primary" ng-disabled="!image.src">确定</a></div>
+		</div>
+	</script>
+	<script type="text/javascript">
+//		window.onload = function() {
+//			document.getElementById('service-close').onclick = function() {
+//				document.getElementsByClassName('kefu')[0].style.display = 'none';
+//			}
+//		}
+	</script>
+	<!-- 产品图片插入modal End -->
+</body>
+</html>

+ 2 - 2
src/main/webapp/WEB-INF/web.xml

@@ -114,7 +114,7 @@
 		<url-pattern>/*</url-pattern>
 	</filter-mapping>
 
-	<filter>
+	<!--<filter>
 		<filter-name>keyWordFilter</filter-name>
 		<filter-class>com.uas.platform.b2c.core.filter.KeyWordFilter</filter-class>
 	</filter>
@@ -122,7 +122,7 @@
 	<filter-mapping>
 		<filter-name>keyWordFilter</filter-name>
 		<url-pattern>/*</url-pattern>
-	</filter-mapping>
+	</filter-mapping>-->
 
 	<error-page>  
         <error-code>404</error-code>  

+ 3 - 0
src/main/webapp/resources/css/erp/align.css

@@ -0,0 +1,3 @@
+.user_content .user_right {
+    margin-right: 90px;
+}

+ 13 - 6
src/main/webapp/resources/js/common/query/brand.js

@@ -1,6 +1,7 @@
 define([ 'ngResource' ], function() {
-	angular.module('brandServices', [ 'ngResource' ]).factory('BrandsSubmit', ['$resource', function($resource) {
+	angular.module('brandServices', [ 'ngResource' ]).factory('BrandsSubmit', ['$resource', 'BaseService', function($resource, BaseService) {
 		//获取BrandSubmit的分页数据
+		var rootPath = BaseService.getRootPath();
 		return $resource('produce/brandSubmit', {}, {
 			//未审核
 			getUnAudited : {
@@ -15,17 +16,18 @@ define([ 'ngResource' ], function() {
 				params : { _state : 'notAllow'}
 			}
 		});
-	}]).factory('BrandSubmit', ['$resource', function($resource) {
+	}]).factory('BrandSubmit', ['$resource', 'BaseService', function($resource, BaseService) {
 		//对单个BrandSubmit的操作
+		var rootPath = BaseService.getRootPath();
 		return $resource('produce/brandSubmit/:id', {}, {
 			//提交(保存)
 			submit : {
-				url : 'produce/brandSubmit/saveBrandSubmit',
+				url : rootPath + 'produce/brandSubmit/saveBrandSubmit',
 				method : 'POST'
 			},
 			//审核通过
 			valid : {
-				url : 'produce/brandSubmit/audit',
+				url : rootPath + 'produce/brandSubmit/audit',
 				method : 'PUT',
 				params : {
 					valid : true
@@ -33,7 +35,7 @@ define([ 'ngResource' ], function() {
 			},
 			//审核不通过
 			invalid : {
-				url : 'produce/brandSubmit/audit/:id',
+				url : rootPath + 'produce/brandSubmit/audit/:id',
 				method : 'PUT',
 				params : {
 					valid : false
@@ -41,8 +43,13 @@ define([ 'ngResource' ], function() {
 			},
 			// 审核通过信息冲突的更新申请
 			validUpdate : {
-				url : 'produce/brandSubmit/audituUpdate',
+				url : rootPath + 'produce/brandSubmit/audituUpdate',
 				method : 'PUT'
+			},
+			// 非标器件申请品牌
+			unstandardSubmit : {
+				url : rootPath + '/produce/brandSubmit/fromunstandard',
+				method : 'POST'
 			}
 		});
 	}]).factory('BrandVersion', ['$resource', function($resource) {

+ 13 - 0
src/main/webapp/resources/js/common/query/material.js

@@ -42,6 +42,19 @@ define([ 'ngResource' ], function() {
             updateProduct : {
                 url: 'trade/products/update',
                 method: 'POST'
+            },
+            // 获取物料交易信息
+            getProductDetail : {
+                url: 'trade/products/detail/:id',
+                method: 'GET'
+            },
+            submitProduct: {
+                url: 'trade/products/validition',
+                method: 'POST'
+            },
+            saveDetail: {
+                url: 'trade/products/savedetail/:productId',
+                method: 'POST'
             }
         });
     }]);

+ 29 - 5
src/main/webapp/resources/js/vendor/app.js

@@ -498,22 +498,46 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
             templateUrl : 'static/view/vendor/forstore/vendor_material.html',
             controllerUrl : "app/controllers/forstore/vendor_materialCtrl",
             controller : 'vendor_materialCtrl'
-        })).state('vendor_onSale', angularAMD.route({
+        })).state('vendor_material_erp', angularAMD.route({
+			title : '可上架产品toErp',
+			url : '/vendor_material_erp?standardParam',
+			templateUrl : 'static/view/vendor/forstore/erp/vendor_material_erp.html',
+			controllerUrl : "app/controllers/forstore/vendor_materialCtrl",
+			controller : 'vendor_materialCtrl'
+		})).state('vendor_material_unstandard_erp', angularAMD.route({
+			title : '暂不可上架产品toErp',
+			url : '/vendor_material_unstandard_erp?standardParam',
+			templateUrl : 'static/view/vendor/forstore/erp/vendor_material_unstandard_erp.html',
+			controllerUrl : "app/controllers/forstore/vendor_materialCtrl",
+			controller : 'vendor_materialCtrl'
+		})).state('vendor_onSale', angularAMD.route({
             title : '在售产品',
             url : '/vendor_onSale',
             templateUrl : 'static/view/vendor/forstore/vendor_onSale.html',
             controllerUrl : "app/controllers/forstore/vendor_onSaleCtrl",
             controller : 'vendor_onSaleCtrl'
-        })).state('vendor_standardPutOn', angularAMD.route({
+        })).state('vendor_onSale_erp', angularAMD.route({
+			title : '已上架产品toErp',
+			url : '/vendor_onSale_erp',
+			templateUrl : 'static/view/vendor/forstore/erp/vendor_onSale_erp.html',
+			controllerUrl : "app/controllers/forstore/vendor_onSaleCtrl",
+			controller : 'vendor_onSaleCtrl'
+		})).state('vendor_standardPutOn', angularAMD.route({
 			title : '标准上架管理',
 			url : '/vendor_standardPutOn',
 			templateUrl : 'static/view/vendor/forstore/vendor_standard_putOn.html',
 			controllerUrl : "app/controllers/forstore/vendor_standard_putOn_ctrl",
 			controller : 'vendor_standardPutOnCtrl'
 		})).state('vendor_undercarriage', angularAMD.route({
-            title : '下架产品',
-            url : '/vendor_undercarriage',
-            templateUrl : 'static/view/vendor/forstore/vendor_undercarriage.html',
+			title : '下架产品',
+			url : '/vendor_undercarriage',
+			templateUrl : 'static/view/vendor/forstore/vendor_undercarriage.html',
+			controllerUrl : "app/controllers/forstore/vendor_undercarriageCtrl",
+			controller : 'vendor_undercarriageCtrl'
+		})).state('vendor_undercarriage_erp', angularAMD.route({
+            title : '上下架历史toErp',
+            url : '/vendor_undercarriage_erp',
+            templateUrl : 'static/view/vendor/forstore/erp/vendor_undercarriage_erp.html',
             controllerUrl : "app/controllers/forstore/vendor_undercarriageCtrl",
             controller : 'vendor_undercarriageCtrl'
         })).state('pay_center', angularAMD.route({

+ 54 - 39
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -2,45 +2,60 @@
  * Created by yujia on 2017/3/24.
  *  原厂认证
  */
-define(['app/app'], function (app) {
-  "use strict";
-  app.register.controller('vendorAccountManagementCtrl',
-      ['$scope', '$rootScope', 'Enterprise', 'User', 'toaster', '$modal',
-        'BaseService', 'ngTableParams', '$http','$stateParams',
-        function ($scope, $rootScope, Enterprise, User, toaster, $modal,
-            BaseService, ngTableParams, $http,$stateParams) {
-          $rootScope.active = 'vendor_account_management';
-          $scope.tab = 'base';
-          $scope.userInfo = $rootScope.userInfo;
-          $scope.updateState = false;
-          //手机号和邮箱号的部分隐藏
-          if($scope.userInfo.userTel){
-            $scope.userInfo.userTel = $scope.userInfo.userTel.substr(0, 3)
-                + '****' + $scope.userInfo.userTel.substr(7);
-          }
-          var userEmailTemp = $scope.userInfo.userEmail
-              ? $scope.userInfo.userEmail.indexOf("@") : '';
-          if (userEmailTemp != '') {
-            $scope.userInfo.userEmail = $scope.userInfo.userEmail.substr(
-                0,1) + "***"
-                + $scope.userInfo.userEmail.substr(userEmailTemp);
-          }
-          // 获取企业信息
-          Enterprise.getEnterpriseInfo({enuu: $scope.userInfo.enterprise.uu},
-              function (data) {
-                $scope.enterpriseInfo = data;
-                $scope.enterpriseInfoBackup = angular.copy(
-                    $scope.enterpriseInfo);
-                $scope.enAdminuu = $scope.enterpriseInfo.enAdminuu;
-                User.getUserByUU({uu: $scope.enAdminuu}, {}, function (data) {
-                  $scope.adminInfo = data;
-                  console.log($scope.adminInfo);
-                }, function () {
-                  toaster.pop('error', '获取管理员信息失败');
-                });
-              }, function (response) {
-                toaster.pop('error', '获取企业信息失败');
-              });
+define(['app/app'], function(app) {
+    "use strict";
+    app.register.controller('vendorAccountManagementCtrl', ['$scope', '$rootScope', 'Enterprise', 'User', 'toaster', '$modal','BaseService','ngTableParams','$http', 'AuthenticationService','$stateParams' function($scope, $rootScope, Enterprise, User, toaster, $modal, BaseService, ngTableParams, $http, AuthenticationService,$stateParams) {
+        $rootScope.active = 'vendor_account_management';
+		document.title = '账户管理-优软商城';
+		$scope.tab = 'base';
+        $scope.userInfo = $rootScope.userInfo;
+		$scope.updateState = false;
+
+      //手机号和邮箱号的部分隐藏
+      if($scope.userInfo.userTel){
+        $scope.userInfo.userTel = $scope.userInfo.userTel.substr(0, 3)
+            + '****' + $scope.userInfo.userTel.substr(7);
+      }
+      var userEmailTemp = $scope.userInfo.userEmail
+          ? $scope.userInfo.userEmail.indexOf("@") : '';
+      if (userEmailTemp != '') {
+        $scope.userInfo.userEmail = $scope.userInfo.userEmail.substr(
+            0,1) + "***"
+            + $scope.userInfo.userEmail.substr(userEmailTemp);
+      }
+
+		var getEnterprise = function () {
+			// 获取企业信息
+			Enterprise.getEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, function(data) {
+				$scope.enterpriseInfo = data;
+				$scope.enterpriseInfoBackup = angular.copy($scope.enterpriseInfo);
+				$scope.enAdminuu = $scope.enterpriseInfo.enAdminuu;
+				User.getUserByUU({uu: $scope.enAdminuu}, {}, function(data){
+					$scope.adminInfo = data;
+					console.log($scope.adminInfo);
+				}, function(){
+					toaster.pop('error', '获取管理员信息失败');
+				});
+			},function(response) {
+				toaster.pop('error', '获取企业信息失败');
+			});
+		}
+		if (typeof $scope.userInfo != 'undefined' && typeof $scope.userInfo.enterprise != 'undefined') {
+			getEnterprise();
+		} else {
+			AuthenticationService.getAuthentication().success(function (data) {
+				$scope.userInfo = data;
+				for (var i=0; i<$scope.userInfo.enterprises.length; i++) {
+					if ($scope.userInfo.enterprises[i].current) {
+						$scope.userInfo.enterprise = $scope.userInfo.enterprises[i];
+						break;
+					}
+				}
+				getEnterprise();
+			}, function (error) {
+				toaster.pop('error', '获取用户信息失败');
+			})
+		}
 
           $scope.tableParams = new ngTableParams({
             page: 1, // show first page

+ 318 - 17
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -1,12 +1,30 @@
-define([ 'app/app' ], function(app) {
+define([ 'app/app', 'jquery-uploadify' ], function(app) {
 	'use strict';
-	app.register.controller('vendor_materialCtrl', ['$scope', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', function ($scope, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService) {
+	app.register.controller('vendor_materialCtrl', ['$scope', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', '$location', '$stateParams', 'Search', '$modal', 'ComponentActiveAPI', 'BrandSubmit', 'BrandActiveAPI', function ($scope, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService, $location, $stateParams, Search, $modal, ComponentActiveAPI, BrandSubmit, BrandActiveAPI) {
 		$rootScope.active = 'vendor_material';
 		document.title = '卖家产品库-优软商城';
 		$scope.tab = 'material';
-		$scope.standard_tab = 'standard';
+		$scope.standard_tab = $stateParams.standardParam?$stateParams.standardParam:'standard';
 		$scope.choosedIds = [];
 		$scope.deleteDiv = false;
+
+        $scope.param = {
+            page : 1,
+            count : 10,
+            sorting : {
+                id : 'DESC'
+            },
+            isStandard : true,
+            type : "standard"
+        };
+
+		if ($location.$$path.endsWith('vendor_material_unstandard_erp')) {
+			$scope.tab = 'unstandard_material';
+			// $scope.standard_tab = 'unstandard';
+            $scope.param.type = "nStandard";
+            // $scope.param.sorting = {code : 'ASC'};
+            $scope.isBatch = false;
+		}
 		/**
 		 * 最大
 		 * @type {number}
@@ -21,16 +39,6 @@ define([ 'app/app' ], function(app) {
 		//只包含中文和英文的字符
 		var pattern = /^[\u4e00-\u9fa5a-zA-Z]+$/;
 
-		$scope.param = {
-			page : 1,
-			count : 10,
-			sorting : {
-				id : 'DESC'
-			},
-			isStandard : true,
-			type : "standard"
-		};
-
 		$scope.goods = { breakUp: 1, isSelfSupport: 1, prices: [{}] };
 		$scope.isSelfSupport = true;
 		$scope.showShelfArea = showShelfArea;
@@ -479,8 +487,19 @@ define([ 'app/app' ], function(app) {
 			Material.getAll($scope.param, function (data) {
 				$scope.materialAll = data;
 				$scope.currenctMaterial = data.content;
-				angular.forEach($scope.currenctMaterial, function (material) {
+				angular.forEach($scope.currenctMaterial, function (material, index) {
 					material.isChoosed = false;
+					material.submitProduct = {
+						brand: {},
+						commponent: {},
+						kind: {}
+					}
+					//第一个自动展开
+					if (index == 0 && $stateParams.standardParam && ($stateParams.standardParam =='standard' || $stateParams.standardParam =='unstandard')) {
+						material.selected = true;
+						if ('ERP' == material.sourceApp)
+							getProductDetail(material);
+					}
 				});
 				$scope.param.currentPage = data.number;
 				$scope.acculatePages(data.number, data.totalPages);
@@ -510,10 +529,14 @@ define([ 'app/app' ], function(app) {
 		function publishGoods(product) {
 			if (!validateGoods($scope.goods)) return ;
 
-			console.log('product', product);
-			console.log($scope.goods);
 			$scope.goods.breakUp = 1 === $scope.goods.breakUp;
 			$scope.isSelfSupport = 1 === $scope.goods.isSelfSupport;
+			if (product.sourceApp == 'ERP') {
+				if ($scope.goods.erpReserve < $scope.goods.b2cReserve + $scope.goods.reserve) {
+					toaster.pop('error', '本次上架数量和已上架数量之和不可超过ERP空闲库存数量');
+					return;
+				}
+			}
 			Material.newStockByStandardProduct({ id: product.id, isSelfSupport: $scope.isSelfSupport}, $scope.goods, function (result) {
 				if (result.success) {
 					toaster.pop('success', '商品上架成功');
@@ -526,6 +549,17 @@ define([ 'app/app' ], function(app) {
 			});
 		}
 
+		// 保存物料详细信息
+		$scope.saveDetail = function(material) {
+			console.log('product',$scope.goods);
+			console.log(material);
+			Material.saveDetail({productId: material.id}, $scope.goods, function (data) {
+				toaster.pop('success', '保存成功');
+			}, function (response) {
+				toaster.pop('error', response.data);
+			})
+		};
+
 		/**
 		 * 验证商品信息
 		 *
@@ -652,6 +686,31 @@ define([ 'app/app' ], function(app) {
 			return true;
 		}
 
+		/**
+		 * 获取物料交易信息
+		 * @param product
+		 */
+		var getProductDetail = function (product) {
+			Material.getProductDetail({id : product.id}, function (data) {
+				$scope.goods.erpReserve = typeof data.reserve == 'undefined' ? 0 : data.reserve;
+				$scope.goods.b2cReserve = typeof data.b2cReserve == 'undefined' ? 0 : data.b2cReserve;
+				$scope.goods.packaging = data.packaging;
+				$scope.goods.produceDate = data.produceDate;
+				$scope.goods.minPackQty = data.minPackQty;
+				$scope.goods.breakUp = data.breakUp;
+				$scope.goods.minBuyQty = data.minBuyQty;
+				$scope.goods.minDelivery = data.minDelivery;
+				$scope.goods.maxDelivery = data.maxDelivery;
+				$scope.goods.prices = [];
+				product.selected = true;
+				if ('MAINLAND' == $scope.store.enType)
+					$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve, rMBPrice: data.price});
+				if ('HK' == $scope.store.enType)
+					$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve, uSDPrice: data.price});
+
+			});
+		}
+
 		/**
 		 * 展开上架商品填写区域
 		 *
@@ -669,7 +728,11 @@ define([ 'app/app' ], function(app) {
 					$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve});
 					$scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
 					product.img = component.img || null;
-					product.selected = true;
+					if ('ERP' == product.sourceApp) {// 如果是erp上传物料获取物料交易信息
+						getProductDetail(product);
+					} else {
+						product.selected = true;
+					}
 				} else {
 					toaster.pop('error', '当前产品对应的器件[' + product.cmpUuId + ']已失效');
 				}
@@ -1015,6 +1078,244 @@ define([ 'app/app' ], function(app) {
 				}
 			}
 		}
+
+		// 获取品牌联想词
+		$scope.getSimilarBrands = function(keyword) {
+			if (keyword) {
+				return Search.getSimilarBrands({keyword : keyword}).$promise.then(function(data) {
+					return data.map(function(item) {
+						return item;
+					});
+				});
+			}
+		};
+
+		// 选择品牌
+		$scope.onAssociateClickBrand = function (material, brand) {
+			BrandActiveAPI.getBrand({uuid: brand.uuid}, {} , function (data) {
+				material.submitProduct.brand = data;
+			}, function (response) {
+				toaster.pop('error', response.data);
+			});
+		};
+
+		// 获取器件联想词
+		$scope.getSimilarCmps = function(code) {
+			if (code) {
+				return Search.getSimilarComponents({keyword : code}).$promise.then(function(data) {
+					return data.map(function(item) {
+						return item;
+					})
+				});
+			}
+		};
+		// 选择器件
+		$scope.onAssociateClickCmp = function (material, cmp) {
+			$scope.submitProduct.component = cmp;
+			ComponentActiveAPI.get({uuid : cmp.uuid}, {}, function(data) {
+				var component = data;
+				$scope.submitProduct.brand = component.brand;
+				$scope.submitProduct.kind = component.kind;
+			});
+		};
+
+		// 获取末级类目联想词
+		$scope.getSimilarKinds = function(name) {
+			if (name) {
+				return Search.getSimilarLeafKinds({keyword: name}).$promise.then(function(data) {
+					return data.map(function(item) {
+						return item;
+					})
+				})
+			}
+		};
+
+		$scope.onAssociateClickKind = function (material, kind) {
+			$scope.submitProduct.kind = kind;
+		};
+
+		// 选择类目
+		$scope.selectKind = function() {
+			$modal.open({
+				animation: true,
+				size: 'lg',
+				templateUrl: 'static/view/prod/product_kindChoose_modal.html',
+				controller: 'KindChooseCtrl',
+				resolve: {
+					actives: function() {
+						return $scope.actives;
+					}
+				}
+			}).result.then(function(data){
+				$scope.submitProduct.kind = data.actives[data.actives.length - 1];
+			}, function(){
+
+			});
+		};
+
+		// 提交申请
+		$scope.submit = function (material) {
+			if (typeof material.submitProduct.brand == 'undefined' || material.submitProduct.brand.nameEn == null) {
+				toaster.pop('warning', '请填写品牌英文名');
+				return;
+			}
+			if (typeof material.submitProduct.brand.url == 'undefined' || material.submitProduct.brand.url == null) {
+				toaster.pop('warning', '请填写品牌官网');
+				return;
+			}
+			if (!material.pbranduuid) { // 品牌申请
+				if (typeof material.submitProduct.brand.brief == 'undefined' || material.submitProduct.brand.brief == null) {
+					toaster.pop('warning', '请填写品牌简介');
+					return;
+				}
+				if (typeof material.submitProduct.brand.series == 'undefined' || material.submitProduct.brand.series == null) {
+					toaster.pop('warning', '请填写主要产品');
+					return;
+				}
+				BrandSubmit.unstandardSubmit({}, material.submitProduct, function (data) {
+					
+				}, function (response) {
+
+				})
+			} else {
+				toaster.pop('enter component submit');
+				if (typeof material.submitProduct.component == 'undefined' || material.submitProduct.component.code == null) {
+					toaster.pop('warning', '请填写原厂型号');
+					return;
+				}
+
+				if (typeof material.submitProduct.kind == 'undefined' || material.submitProduct.kind.id == null) {
+					toaster.pop('warning', '请填写或选择商城已有类目');
+					return;
+				}
+				if ($scope.attachName == '') {
+					toaster.pop('warning', '请填上传规格书');
+					return;
+				} else {
+					material.submitProduct.attach = $scope.attachName;
+				}
+
+				Material.submitProduct({}, material.submitProduct, function (data) {
+					if (data.data == '已存在此器件') {
+						toaster.pop('info',  '已存在此器件');
+					} else {
+						toaster.pop('info', data.data);
+					}
+				}, function (response) {
+					toaster.pop('error', response.data);
+				})
+			}
+		};
+
+		$scope.attachNameInfo = '';
+		//上传规格书
+		$scope.onAttachInput = function (event) {
+			$scope.attachNameInfo = event.target.files[0].name;
+		};
+		$scope.deleteAttach = function () {
+			$scope.attachNameInfo = '';
+		};
+
+	}]);
+
+	//类目选择模态框
+	app.register.controller('KindChooseCtrl', ['$scope', 'KindAPI', 'actives', 'toaster', '$modalInstance', function($scope, KindAPI, actives, toaster, $modalInstance) {
+		$scope.actives = actives;
+		$scope.kinds = [[], [], [], []];
+		// 获取子类目
+		var getChildren = function(pid, deep) {
+			KindAPI.getChildren({parentId: pid}, function(data) {
+				$scope.kinds[deep] = data;
+			}, function(response) {
+				toaster.pop('error', '获取子类目失败', response.data);
+			});
+		};
+
+		// 改变节点选中状态
+		var changeStatus = function(item, deep) {
+			var actives = [], level = 0;
+			angular.forEach($scope.kinds, function(ks, i) {
+				if(i > deep) {
+					$scope.kinds[i] = [];
+				} else {
+					angular.forEach(ks, function(k, j) {
+						if(i == deep) {
+							if(k.id == item.id) {
+								$scope.kinds[i][j].$active = true;
+								actives.push(k);
+							} else {
+								k.$active = null;
+							}
+						} else {
+							if(k.$active) {
+								actives.push(k);
+							}
+						}
+					});
+				}
+			});
+			// 选择的节点
+			$scope.actives = actives;
+			$scope.active = item;
+			// 当前可操作的层级
+			if(deep < 3) {
+				$scope.activeDeep = deep + 1;
+			}
+		};
+
+		// 节点点击后获取子类目,节点被选中
+		$scope.onItemClick = function(item, deep) {
+			changeStatus(item, deep);
+			if (!item.isLeaf) {
+				getChildren(item.id, deep + 1);
+			}
+		};
+
+		// 重新加载数据
+		function reload(deep) {
+			var pid;
+			if(deep) {
+				pid = $scope.actives[deep - 1].id;
+			} else {
+				pid = 0;
+				deep = 0;
+			}
+			getChildren(pid, deep);
+		}
+
+		// 初始加载数据,获取第一层的类目
+		if($scope.actives) {
+			angular.forEach($scope.actives, function(v, k) {
+				KindAPI.getChildren({parentId: v.parentid}, function(data) {
+					$scope.kinds[k] = data;
+					angular.forEach($scope.kinds[k], function(kind, i){
+						if(kind.id == v.id) {
+							$scope.kinds[k][i].$active = true;
+							$scope.actives[k] = $scope.kinds[k][i];
+						}
+					})
+				}, function(response) {
+					toaster.pop('error', '获取子类目失败', response.data);
+				});
+			});
+		} else {
+			reload();
+		}
+
+		// 取消
+		$scope.cancel = function() {
+			$modalInstance.dismiss();
+		};
+
+		// 确认选择
+		$scope.check = function() {
+			var a = {
+				active: $scope.active,
+				actives: $scope.actives
+			};
+			$modalInstance.close(a);
+		};
 	}]);
 
+
 });

+ 32 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_apply_ctrl.js

@@ -1,6 +1,6 @@
 define(['app/app', 'jquery-uploadify'], function (app) {
 	"use strict";
-	app.register.controller('vendorStoreApplyCtrl', ['$scope', '$rootScope', 'Enterprise', 'StoreInfo', '$modal', 'toaster', '$timeout', '$state', '$q', 'BrandActiveAPI', 'Search', function($scope, $rootScope, Enterprise, StoreInfo, $modal, toaster, $timeout, $state, $q, BrandActiveAPI, Search) {
+	app.register.controller('vendorStoreApplyCtrl', ['$scope', '$rootScope', 'Enterprise', 'StoreInfo', '$modal', 'toaster', '$timeout', '$state', '$q', 'BrandActiveAPI', 'Search','AuthenticationService', function($scope, $rootScope, Enterprise, StoreInfo, $modal, toaster, $timeout, $state, $q, BrandActiveAPI, Search, AuthenticationService) {
 		$rootScope.active = "vendor_store";
 		$scope.tab = 'ORIGINAL_FACTORY';
 
@@ -38,7 +38,6 @@ define(['app/app', 'jquery-uploadify'], function (app) {
 		$scope.deleteTypeName = '';
 		$scope.triggerDeleteTip = triggerDeleteTip;
 		$scope.closeDeleteTip = closeDeleteTip;
-		activate();
 
 		/**
 		 * 初始化数据获取
@@ -81,7 +80,38 @@ define(['app/app', 'jquery-uploadify'], function (app) {
 				toaster.pop('error', '获取企业信息失败');
 			});
 		}
+		// 获取已登录的用户信息
+		var getAuthentication = function() {
+			return AuthenticationService.getAuthentication().success(function(data) {
+				if(data && data.enterprises) {
+					//data.enterprise = data.enterprises[data.enterprises.length - 1];
+					if(data.enterprises.length > 1) {
+						var enSelect = [];
+						angular.forEach(data.enterprises, function(e){
+							if(e.current)
+								data.enterprise = e;
+							else
+								enSelect.push(e);
+						});
+						data.enSelect = enSelect;
+					}
+				}
+				$scope.userInfo = data;
+				// 增加收藏功能的代码
+				$rootScope.userInfo = data;
+				$rootScope.brandCount = 0;
+				$rootScope.componentCount = 0;
 
+				$scope.isAuthed = data != null && data.userUU;
+			});
+		};
+		//根据用户的信息
+		$q.all([getAuthentication()]).then(function () {
+			if(AuthenticationService.isAuthed()) {
+				activate();
+			}
+		}, function () {
+		});
 		/**
 		 * 验证分类信息
 		 */

+ 8 - 0
src/main/webapp/resources/view/common/footer_erp.html

@@ -0,0 +1,8 @@
+<style>
+    #footer {
+        background-color: #f7f7f7;
+        height: 100%;
+        width: 100%;
+    }
+</style>
+<div id="footer"></div>

+ 670 - 0
src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_erp.html

@@ -0,0 +1,670 @@
+<!--右侧主体部分-->
+<style>
+	.tab.active {
+		display: inline-block !important;
+	}
+	*{-webkit-box-sizing: border-box;  -moz-box-sizing: border-box;  box-sizing: border-box;}
+	div.wanted_list01 dt.paging-bar>span {
+		float: right;
+		width: 322px;
+		height: 40px;
+		font-weight: normal;
+	}
+	div.wanted_list01 dt.paging-bar>span button.paging-button {
+		padding: 0;
+		height: 40px;
+		line-height: 40px;
+		border: none;
+		background: #FFFFFF;
+	}
+	div.wanted_list01 dt.paging-bar>span button.paging-button:hover {
+		color: #0C3894;
+	}
+	div.wanted_list01 dt.paging-bar>span input.page-num {
+		width: 25px;
+		height: 25px;
+		line-height: 40px;
+		border: 1px #C7BEBE solid;
+		text-align: center;
+	}
+	label[disabled] {
+		cursor: not-allowed;
+	}
+	.com_tab ul li.down-goods span:hover {
+		cursor: pointer;
+		text-decoration: underline;
+	}
+	.materrial-list span.length01{
+		width: 10% !important;
+	}
+	.materrial-list span{
+		width: 20% !important;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+	ul.pagination.ng-table-pagination > li > a > span {
+		height: 17px;
+		line-height: 17px;
+	}
+
+	div.ng-table-pager  input.page-number {
+		vertical-align: inherit;
+		display: inline-block;
+		width: 40px;
+		height: 31px;
+		padding: 6px 6px;
+		font-size: 14px;
+		line-height: 1.42857143;
+		color: #9B9792;
+		text-align: center;
+		background-color: #F6F5F4;
+		background-image: none;
+		border: 1px solid #ccc;
+		border-top-left-radius: 4px;
+		border-bottom-left-radius: 4px;
+		box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+		transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+	}
+
+	div.ng-table-pager a.page-a {
+		color: #fff;
+		cursor: pointer;
+		background-color: #4574E8;
+		border-color: #4574E8;
+		padding: 6px 6px;
+		font-size: 14px;
+		border-top-right-radius: 4px;
+		border-bottom-right-radius: 4px;
+		text-decoration: none;
+		height: 31px;
+	}
+
+	div.ng-table-pager div.page-go-block {
+		float: right;
+		margin-left: 20px;
+		margin-top: 15px;
+		font-size: 0px;
+		height: 31px;
+		line-height: 31px;
+	}
+	/*公用table*/
+	.public-tab{
+		margin-bottom: 0;
+	}
+	.public-tab.table tr td, .public-tab.table tr th {
+		font-size: 14px;
+		vertical-align: middle !important;
+	}
+	.public-tab.table>tbody+tbody{
+		border-top: none;
+	}
+	.public-tab.table>thead>tr{
+		height: 40px !important;
+	}
+	.public-tab.table>thead>tr>th,.public-tab.table>tbody>tr>td{
+		border-bottom: #e8e8e8 1px solid;
+		text-align: center;
+	}
+	.public-tab.table>tbody>tr>td{
+		border-top: none;
+		border-bottom: #e8e8e8 1px solid;
+	}
+	.public-tab.table>tbody>tr>td a{
+		margin: 0 10px;
+	}
+	.grey{
+		color: #999;
+	}
+	.search-check{
+		width: 100%;
+		height: 54px;
+		background: #fff;
+		padding-top: 10px;
+		margin-bottom: 16px;
+	}
+	.search-check .search{
+		width: 550px;
+		margin-left: 150px;
+	}
+	.search-check .search .form-control{
+		width: 340px;
+		float: left;
+		height: 34px;
+		border-radius: 0;
+		box-shadow: none;
+		border-right: none;
+	}
+	.search-check .search button,.search-check .search a{
+		display: inline-block;
+		width: 94px;
+		height: 34px;
+		line-height: 34px;
+		text-align: center;
+		font-size: 14px;
+	}
+	.search-check .search button{
+		background: #d3e1fc;
+		border-radius: 0;
+		border: #e2dbdb 1px solid;
+		border-left: none;
+	}
+	.search-check .search a{
+		background: #5078cb;
+		color: #fff;
+		float: right;
+	}
+	.search-check .search button:hover,.search-check .search a:hover{
+		color: #fff;
+		background: #3f7ae3;
+	}
+	.search-check .check{
+		font-size: 14px;
+		line-height: 35px;
+	}
+	.search-check .check a{
+		font-size: 14px;
+		margin-right: 20px;
+		color: #333;
+	}
+	.search-check .check a:hover{
+		color: #5078cb;
+	}
+	.search-check .check .check-active{
+		margin-right: 15px;
+	}
+	.search-check .check .check-active span{
+		font-weight: normal;
+		color: #333;
+	}
+	.search-check .check .check-active label{
+		margin-right: 0 !important;
+	}
+	.check-input input{
+		display: none;
+	}
+	.check-input label {
+		width: 15px;
+		height: 15px;
+		display: inline-block;
+		background: url(static/img/user/images/check.png) no-repeat;
+		position: relative;
+		padding-left: 0 !important;
+		overflow: hidden;
+		margin-bottom: 0 !important;
+		vertical-align: sub;
+		min-height: 15px !important;
+		left: 0 !important;
+	}
+	.check-input input[type="checkbox"]:checked + label{
+		background-position: -15px 0;
+	}
+	.record-line{
+		min-height: 30px;
+		font-size: 12px;
+		line-height: 35px;
+		/* margin-top: 5px; */
+		padding-right: 22px
+	}
+	.device .tab{
+		padding-bottom: 20px;
+	}
+	.wanted_list01 .pagination{
+		margin: 0;
+	}
+	.ng-table-pager{
+		padding-bottom: 20px;
+	}
+	.com-del-box{
+		position: fixed;
+		z-index: 2;
+		height: 152px;
+		opacity: 1;
+		background-color: white;
+		width: 310px;
+		-webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+		box-shadow: 0 5px 15px rgba(0,0,0,.5);
+		margin: -155px 0 0 -75px;
+		top: 55%;
+		left: 50%;
+	}
+	.com-del-box .title{
+		height: 30px;
+		background-color: #5078cb;
+		text-align: right;
+		padding-right: 15px;
+		line-height: 30px;
+	}
+	.com-del-box .title a{
+		color: white;
+		font-size: 16px;
+	}
+	.com-del-box .content{
+		width: 100%;
+		text-align: center;
+		margin: 0 auto;
+	}
+	.com-del-box .content p{
+		line-height: 50px;
+		font-size: 14px;
+		padding-top: 10px;
+		padding-bottom: 10px;
+	}
+	.com-del-box .content p i{
+		color: #5078cb;
+		font-size: 16px;
+		margin-right: 10px;
+	}
+	.com-del-box .content div{
+		width: 100%;
+		text-align: center;
+		margin: 0 auto;
+	}
+	.com-del-box .content div a{
+		width: 55px;
+		height: 26px;
+		line-height: 26px;
+		display: inline-block;
+		text-align: center;
+		font-size: 14px;
+	}
+	.com-del-box .content div a:first-child{
+		background: #b4b5b9;
+		color: #333;
+		margin-right: 10px;
+	}
+	.com-del-box .content div a:last-child{
+		background: #5078cb;
+		color: #fff;
+	}
+	.com-del-box .content div a:hover{
+		background: #3f7ae3;
+		color: #fff;
+	}
+	.record-line .prompt{
+		text-align: left;
+		width: 495px;
+		float: left;
+		line-height: 16px;
+		padding-left: 25px;
+		padding-top: 10px;
+	}
+	.record-line .prompt a{
+		color: #5078cb;
+	}
+	/*   编辑*/
+	.edit-content td{
+		background: #daecfb;
+		padding-bottom: 20px !important;
+	}
+	.edit-content img{
+		width: 60px;
+		border: #dfdfdf 1px solid;
+		height: 60px;
+	}
+	.edit-content .form-control{
+		height: 24px;
+		padding: 0;
+		text-align: center;
+		margin-bottom: 5px;
+		line-height: 24px;
+		font-size: 12px;
+		border-radius: 3px;
+	}
+	.edit-content select.form-control{
+		padding-left: 28px;
+		line-height: 23px;
+	}
+	.edit-content p{
+		font-size: 14px;
+	}
+	.edit-content select{
+		-webkit-appearance: inherit;
+		appearance: inherit;
+	}
+	.edit-content select option{
+		text-align: center;
+	}
+	.edit-content div.content,.edit-content div.img{
+		float: left;
+		margin-right: 5px;
+	}
+	.edit-content .wid36{
+		width: 36px;
+	}
+	.edit-content .wid48{
+		width: 48px;
+	}
+	.edit-content .wid42{
+		width: 42px;
+	}
+	.edit-content .wid92{
+		width: 92px;
+	}
+	.edit-content div .input-list p span{
+		float: left;
+		line-height: 24px;
+		color: #999;
+	}
+	.edit-content div .input-list p span input:first-child{
+		margin-left: 5px;
+	}
+	.edit-content .title{
+		height: 40px;
+		line-height: 40px;
+	}
+	.edit-content .reduce{
+		color: #faa002 !important;
+		margin: 0 !important;
+	}
+	.edit-content .add{
+		color: #2ea001 !important;
+		margin: 0 !important;
+	}
+	.edit-content button{
+		width: 56px;
+		height: 24px;
+		border: none;
+		color: #fff;
+		float: left;
+	}
+	.edit-content button.off{
+		background: #f15601;
+		margin-bottom: 5px;
+	}
+	.edit-content button.ok{
+		background: #33b401;
+	}
+	.edit-content button:hover{
+		background: #5078cb;
+	}
+	.wanted_list01 .tab table tr.active{
+		height: 35px;
+	}
+	.wanted_list01 .tab table tr.active td{
+		background: #c2dff7;
+	}
+	div.user_right input::-webkit-outer-spin-button,
+	div.user_right input::-webkit-inner-spin-button{
+		-webkit-appearance: none !important;
+		margin: 0;
+	}
+	div.user_right input[type="number"]{
+		-moz-appearance:textfield;
+	}
+	.public-tab td>div.ellipsis-div {
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+	}
+	.restrict-color {
+		color: #c7c7c7;
+	}
+	a:focus {
+		text-decoration: none;
+	}
+	.col-xs-4 .f16{
+		font-size: 14px;
+	}
+	.pro_management .table tr td div span.switch{
+		width:39px;
+		height: 14px;
+		display: inline-block;
+	}
+	.pro_management .table tr td div span.switch button{
+		border: none;
+		position: relative;
+		top: 2px;
+		left: 5px;
+		width: 39px;
+		height: 14px;
+		background: url(static/img/icon/check-off.png) no-repeat center;
+	}
+	.pro_management .table tr td div span.switch button.active{
+		background: url("static/img/icon/check-ok.png") no-repeat center;
+	}
+	.com_tab ul li.active a {
+		color: #1687ff;
+	}
+</style>
+<div class="user_right fr">
+	<!--货品管理-->
+	<div class="pro_management device">
+		<div class="com_tab">
+			<ul class="fl" style="width: 100%">
+				<li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material_erp({standardParam:'standard'})">可上架产品</a></li>
+				<li ng-class="{'active': tab == 'unstandard_material'}"><a ui-sref="vendor_material_unstandard_erp({standardParam:'unstandard'})">暂不可上架产品</a></li>
+				<li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale_erp">已上架</a></li>
+				<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage_erp">上下架历史</a></li>
+			</ul>
+		</div>
+		<div class="search-check">
+			<div class="search fl">
+				<input type="text" class="form-control" ng-model="param.keyword" ng-search="onSearch()" placeholder="产品编号/品牌/产品型号"/>
+				<button ng-click="onSearch()">搜索</button>
+				<a ng-click="download()">批量导出</a>
+			</div>
+			<div class="check fr">
+				<a ng-show="!isBatch && standard_tab == 'unstandard'" ng-click="matchAll()"><span ng-show="!isBatch && standard_tab == 'unstandard'">一键匹配</span></a>
+				<a ng-show="!isBatch" ng-click="enterBatch()"><span ng-show="!isBatch">批量操作</span></a>
+				<span class="check-btn" ng-show="isBatch">
+                    <label class="check-active">
+                        <input type="checkbox"  ng-click="chooseAll()" ng-checked="isChoosedAll" id="AllChoose"/>
+                        <label for="AllChoose"></label>
+                        <span>全选</span>
+                    </label>
+                    <a ng-click="deleteBatch()">删除</a>
+                    <a ng-click="exitBatch()">取消</a>
+                </span>
+			</div>
+		</div>
+		<div class="wanted_list01">
+			<!--在售产品-->
+			<div class="tab">
+				<table class="public-tab table">
+					<thead>
+					<tr>
+						<th width="80">序号</th>
+						<th width="80">ERP空闲库存</th>
+						<th width="160">产品编号</th>
+						<th width="180">产品名称(类目)</th>
+						<th width="130">品牌</th>
+						<th width="80">单位</th>
+						<th>产品型号</th>
+						<th width="150">操作</th>
+					</tr>
+					</thead>
+					<tbody>
+					<tr style="height: 14px;">
+						<td colspan="8" class="hei16"></td>
+					</tr>
+					</tbody>
+					<tbody ng-repeat="material in currenctMaterial">
+					<tr ng-class="{ 'active': material.selected }">
+						<td class="check-input">
+							<span ng-show="isBatch"><input type="checkbox" ng-checked="material.isChoosed"  ng-click="chooseOne(material)"  id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>
+							<span ng-show="!isBatch" ng-bind="(param.currentPage - 1) * 10 + $index + 1"></span>
+						</td>
+						<td>{{material.productDetail.reserve || 0}}</td>
+						<td ng-bind="material.prodNum" title="{{material.prodNum}}"></td>
+						<td>
+							<span ng-if="material.kind" ng-bind="material.kind" title="{{material.kind}}"></span>
+							<span ng-if="!material.kind" ng-bind="material.kinden" title="{{material.kinden}}"></span>
+						</td>
+						<td>
+							<div class="ellipsis-div" ng-if="material.pbranden" ng-bind="material.pbranden" title="{{material.pbranden}}"></div>
+							<div class="ellipsis-div" ng-if="!material.pbranden" ng-bind="material.pbrand" title="{{material.pbrand}}"></div>
+						</td>
+						<td ng-bind="material.unit || 'PCS'" title="{{material.unit  || 'PCS'}}"></td>
+						<td>
+							<a ng-if="material.cmpUuId" ng-href="product/component/{{material.cmpUuId}}/" ng-bind="material.pcmpcode" title="{{material.pcmpcode}}" style="color: #333;"></a>
+							<span ng-if="!material.cmpUuId" ng-bind="material.pcmpcode" title="{{material.pcmpcode}}"></span>
+						</td>
+						<td>
+							<a ng-show="!material.selected" ng-click="showShelfArea(material)"><span>去上架</span></a>
+							<!--<a ng-show="!material.selected&&!isBatch && standard_tab == 'unstandard'" ng-click="match(material)"><span ng-show="!isBatch">匹配</span></a>-->
+							<a ng-show="!material.selected" ng-click="deleteMaterial(material)"><span>删除</span></a>
+							<a ng-show="material.selected" ng-click="material.selected = false;">取消</a>
+						</td>
+					</tr>
+					<!--编辑内容-->
+					<tr class="edit-content" ng-if="material.selected">
+						<td colspan="8">
+							<div class="img">
+								<p class="title">&nbsp;</p>
+								<img ng-src="{{material.img || 'static/img/store/common/default.png'}}" alt="img"/>
+							</div>
+							<div class="content" ng-show="material.sourceApp == 'ERP'">
+								<!--<p class="title">ERP空闲库存</p>-->
+								<!--<div class="input-list" ng-bind="goods.erpReserve"></div>-->
+								<p class="title">已上架库存</p>
+								<div class="input-list" ng-bind="goods.b2cReserve"></div>
+							</div>
+							<div class="content">
+								<p class="title">上架数量</p>
+								<div class="input-list">
+									<input type="number" class="wid48 form-control" name="reserve" title="库存" placeholder="数量" ng-model="goods.reserve" ng-pattern="/^(-|)[0-9]*$/" ng-blur="setPriceMaxAmount(goods)"/>
+								</div>
+							</div>
+							<div class="content">
+								<p class="title">包装/生产日期</p>
+								<div class="input-list">
+									<input type="text" class="form-control" name="packaging" ng-maxlength="10" title="包装" maxlength="10" placeholder="包装方式" style="width: 108px;" ng-model="goods.packaging"/>
+								</div>
+								<div class="input-list">
+									<input type="text" class="form-control" name="produceDate" ng-maxlength="11" title="生产日期" maxlength="11" placeholder="生产日期" style="width: 108px;" ng-model="goods.produceDate"/>
+									<!--<select name="breakUp" title="breakUp" class="select-adder form-control" style="width: 108px;" ng-model="goods.breakUp">-->
+										<!--<option value="1">可拆卖</option>-->
+										<!--<option value="0">不可拆卖</option>-->
+									<!--</select>-->
+								</div>
+							</div>
+							<div class="content">
+								<p class="title">最小包装量</p>
+								<div class="input-list">
+									<input type="number" class="form-control" name="minPackQty" title="最小包装量"  placeholder="数量" ng-model="goods.minPackQty" ng-pattern="/^(-|)[0-9]*$/" ng-blur="setPriceMinPackAmount(goods)" style="width: 70px;"/>
+								</div>
+								<div style="position: relative;top: 13px;left: 3px;">
+									<span>可拆卖:</span>
+									<span class="switch"><button ng-class="{'active' : goods.breakUp}" ng-click="toggleIsBreadUp(goods)"></button></span>
+								</div>
+							</div>
+							<div class="content">
+								<p class="title">最小起售</p>
+								<div class="input-list">
+									<input type="number" class="wid48 form-control" name="minBuyQty" title="最小起售"  placeholder="数量" ng-model="goods.minBuyQty" ng-pattern="/^(-|)[0-9]*$/" ng-blur="setPriceMinAmount(goods)"/>
+								</div>
+							</div>
+							<div class="content">
+								<p class="title">交期<span style="color:#999;">({{!store.enType || store.enType === 'HK'?'香港:天':!store.enType || store.enType === 'MAINLAND'?'国内:天':''}})</span></p>
+								<div class="input-list">
+									<p ng-if="!store.enType || store.enType === 'HK'">
+										<span><input type="number" class="wid36 form-control" name="minDelivery" title="最小交期" placeholder="天数" ng-model="goods.minDelivery" ng-blur="checkMinDelivery(goods, 'HK')"/></span>
+										<span style="margin-left: 4px;">–</span>
+										<span><input type="number" class="wid36 form-control" name="maxDelivery" title="最大交期" placeholder="天数" ng-model="goods.maxDelivery" ng-blur="checkMaxDelivery(goods, 'HK')"/></span>
+									</p>
+									<p ng-if="!store.enType || store.enType === 'MAINLAND'">
+										<span><input type="number" class="wid36 form-control" name="minDelivery" title="最小交期" placeholder="天数" ng-model="goods.minDelivery" ng-blur="checkMinDelivery(goods, 'DEM')"/></span>
+										<span style="margin-left: 4px;">–</span>
+										<span><input type="number" class="wid36 form-control" name="maxDelivery" title="最大交期" placeholder="天数" ng-model="goods.maxDelivery" ng-blur="checkMaxDelivery(goods, 'DEM')"/></span>
+									</p>
+								</div>
+							</div>
+							<div class="content">
+								<p class="title">价格梯度</p>
+								<div class="input-list" ng-repeat="price in goods.prices">
+									<p>
+										<span><input ng-disabled="$index == 0" type="number" class="wid42 form-control"  placeholder="数量" ng-model="price.start" ng-blur="changePriceStart(goods, $index)" ng-pattern="/^[0-9]*$/"/></span>
+										<span style="margin-left: 4px;">–</span>
+										<span><input ng-disabled="$index == (goods.prices.length -1)" type="number" class="wid42 form-control"  placeholder="数量" ng-model="price.end" ng-blur="changePriceEnd(goods, $index)" ng-pattern="/^[0-9]*$/"/></span>
+									</p>
+								</div>
+							</div>
+							<div class="content" ng-if="!store.enType || store.enType === 'HK'">
+								<p class="title">单价($)</p>
+								<div class="input-list" ng-repeat="price in goods.prices">
+									<input type="number" class="wid92 form-control"  placeholder="单价($) " ng-model="price.uSDPrice"/>
+								</div>
+							</div>
+							<div class="content" ng-if="!store.enType || store.enType === 'MAINLAND'">
+								<p class="title">单价(¥)</p>
+								<div class="input-list" ng-repeat="price in goods.prices">
+									<input type="number" class="wid92 form-control"  placeholder="单价(¥)" ng-model="price.rMBPrice"/>
+								</div>
+							</div>
+							<div class="content">
+								<p class="title">&nbsp;</p>
+								<div class="input-list" ng-repeat="price in goods.prices" style="height: 24px;line-height: 24px;margin-bottom: 5px;">
+									<a class="reduce" ng-click="deletePrice(goods, $index)"><i class="fa fa-minus-circle" ng-class="{ 'restrict-color': goods.prices.length === 1 }"></i></a>
+									<a class="add" ng-click="addPrice(goods, $index)"><i class="fa fa-plus-circle" ng-class="{ 'restrict-color': $index === 2 }"></i></a>
+								</div>
+							</div>
+							<div class="content">
+								<p class="title">自营 / 寄售</p>
+								<div class="input-list">
+									<select name="isSelfSupport" title="isSelfSupport" class="wid92 select-adder form-control" ng-model="goods.isSelfSupport" ng-disabled="store.status != 'OPENED'">
+										<option value="1">自营</option>
+										<option value="0">寄售</option>
+									</select>
+								</div>
+							</div>
+							<div class="content" style="width: 56px; float: right; margin-right: 10px;">
+								<p class="title">&nbsp;</p>
+								<div class="input-list">
+									<!--<button class="off" ng-click="closeShelArea(material)">取消</button>-->
+									<button class="ok" ng-click="saveDetail(material)" style="margin-bottom: 5px">保存</button>
+									<button class="ok" ng-click="publishGoods(material)">上架</button>
+								</div>
+							</div>
+						</td>
+					</tr>
+					</tbody>
+					<tbody ng-if="currenctMaterial.length == 0">
+					<tr style="height: 190px;">
+						<td colspan="7" style="border-bottom: none;">
+							<div class="col-xs-2"  style="margin-left: 34%; margin-top: 65px;">
+								<img src="static/img/all/empty-cart.png">
+							</div>
+							<div class="col-xs-4">
+								<p class="grey f16" style="line-height: 80px; text-align: left; margin-top: 70px;">暂无物料资料记录</p>
+							</div>
+						</td>
+					</tr>
+					</tbody>
+				</table>
+				<div class="record-line text-right" ng-if="currenctMaterial.length != 0">
+					<div class="prompt" ng-show="standard_tab == 'unstandard'">
+						<strong class="text-inverse">*</strong>商城暂未收录的 品牌/器件,”原厂型号“将会显示为空且不可上架售卖,<br/>
+						如需上架可先点击 【匹配】按钮,若匹配不成功,可前往<a ui-sref="vendor_brand_apply" target="_blank"> 品牌申请/</a><a ui-sref="vendor_component_apply" target="_blank">器件申请</a>,提出申请
+					</div>
+					<div ng-if="currenctMaterial.length != 0">显示 {{(param.currentPage - 1) * 10 + 1}}-<!--<span ng-bind="materialAll.size"></span>-->{{ param.currentPage * 10 }}, 共: <span ng-bind="materialAll.totalElements" cl style="color: #5078cb;"></span> 个</div>
+				</div>
+				<div class="ng-cloak ng-table-pager" style="text-align: right;margin-right: 60px;" ng-if="materialAll.totalPages>1">
+					<ul class="pagination ng-table-pagination">
+						<li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
+							<a ng-switch-when="prev" ng-click="setPage(page.type, -1)" href="">&laquo;</a>
+							<a ng-switch-when="first" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="page" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="more" ng-click="setPage(page.type, -1)" href="">&#8230;</a>
+							<a ng-switch-when="last" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="next" ng-click="setPage(page.type, -1)" href="">&raquo;</a>
+						</li>
+					</ul>
+					<div class="page-go-block">
+						<input class="page-number" type="text" ng-model="param.currentPage" ng-keydown="listenEnter()"/>
+						<a class="page-a" ng-click="setPage('page', param.currentPage)" href="">GO</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+<div class="com-del-box" ng-if="deleteDiv">
+	<div class="title">
+		<a ng-click="cancleDelete()"><i class="fa fa-close fa-lg"></i></a>
+	</div>
+	<div class="content">
+		<p><i class="fa fa-exclamation-circle"></i>是否删除选中产品</p>
+		<div><a ng-click="cancleDelete()">取消</a><a ng-click="confirmDelete()">确认</a></div>
+	</div>
+</div>

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

@@ -0,0 +1,704 @@
+<!--右侧主体部分-->
+<style>
+	.tab.active {
+		display: inline-block !important;
+	}
+	*{-webkit-box-sizing: border-box;  -moz-box-sizing: border-box;  box-sizing: border-box;}
+	div.wanted_list01 dt.paging-bar>span {
+		float: right;
+		width: 322px;
+		height: 40px;
+		font-weight: normal;
+	}
+	div.wanted_list01 dt.paging-bar>span button.paging-button {
+		padding: 0;
+		height: 40px;
+		line-height: 40px;
+		border: none;
+		background: #FFFFFF;
+	}
+	div.wanted_list01 dt.paging-bar>span button.paging-button:hover {
+		color: #0C3894;
+	}
+	div.wanted_list01 dt.paging-bar>span input.page-num {
+		width: 25px;
+		height: 25px;
+		line-height: 40px;
+		border: 1px #C7BEBE solid;
+		text-align: center;
+	}
+	label[disabled] {
+		cursor: not-allowed;
+	}
+	.com_tab ul li.down-goods span:hover {
+		cursor: pointer;
+		text-decoration: underline;
+	}
+	.materrial-list span.length01{
+		width: 10% !important;
+	}
+	.materrial-list span{
+		width: 20% !important;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+	ul.pagination.ng-table-pagination > li > a > span {
+		height: 17px;
+		line-height: 17px;
+	}
+
+	div.ng-table-pager  input.page-number {
+		vertical-align: inherit;
+		display: inline-block;
+		width: 40px;
+		height: 31px;
+		padding: 6px 6px;
+		font-size: 14px;
+		line-height: 1.42857143;
+		color: #9B9792;
+		text-align: center;
+		background-color: #F6F5F4;
+		background-image: none;
+		border: 1px solid #ccc;
+		border-top-left-radius: 4px;
+		border-bottom-left-radius: 4px;
+		box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+		transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+	}
+
+	div.ng-table-pager a.page-a {
+		color: #fff;
+		cursor: pointer;
+		background-color: #4574E8;
+		border-color: #4574E8;
+		padding: 6px 6px;
+		font-size: 14px;
+		border-top-right-radius: 4px;
+		border-bottom-right-radius: 4px;
+		text-decoration: none;
+		height: 31px;
+	}
+
+	div.ng-table-pager div.page-go-block {
+		float: right;
+		margin-left: 20px;
+		margin-top: 15px;
+		font-size: 0px;
+		height: 31px;
+		line-height: 31px;
+	}
+	/*公用table*/
+	.public-tab{
+		margin-bottom: 0;
+	}
+	.public-tab.table tr td, .public-tab.table tr th {
+		font-size: 14px;
+		vertical-align: middle !important;
+	}
+	.public-tab.table>tbody+tbody{
+		border-top: none;
+	}
+	.public-tab.table>thead>tr{
+		height: 40px !important;
+	}
+	.public-tab.table>thead>tr>th,.public-tab.table>tbody>tr>td{
+		border-bottom: #e8e8e8 1px solid;
+		text-align: center;
+	}
+	.public-tab.table>tbody>tr>td{
+		border-top: none;
+		border-bottom: #e8e8e8 1px solid;
+        overflow: inherit;
+	}
+	.public-tab.table>tbody>tr>td a{
+		margin: 0 10px;
+	}
+	.public-tab.table>tbody>tr>td .remind-notice {
+		color: #999;
+	}
+	.grey{
+		color: #999;
+	}
+	.search-check{
+		width: 100%;
+		height: 54px;
+		background: #fff;
+		padding-top: 10px;
+		margin-bottom: 16px;
+	}
+	.search-check .search{
+		width: 550px;
+		margin-left: 150px;
+	}
+	.search-check .search .form-control{
+		width: 340px;
+		float: left;
+		height: 34px;
+		border-radius: 0;
+		box-shadow: none;
+		border-right: none;
+	}
+	.search-check .search button,.search-check .search a{
+		display: inline-block;
+		width: 94px;
+		height: 34px;
+		line-height: 34px;
+		text-align: center;
+		font-size: 14px;
+	}
+	.search-check .search button{
+		background: #d3e1fc;
+		border-radius: 0;
+		border: #e2dbdb 1px solid;
+		border-left: none;
+	}
+	.search-check .search a{
+		background: #5078cb;
+		color: #fff;
+		float: right;
+	}
+	.search-check .search button:hover,.search-check .search a:hover{
+		color: #fff;
+		background: #3f7ae3;
+	}
+	.search-check .check{
+		font-size: 14px;
+		line-height: 35px;
+	}
+	.search-check .check a, .search-check .check label span{
+		font-size: 13px;
+		margin-right: 20px;
+		color: #333;
+	}
+	.search-check .check a:hover{
+		color: #5078cb;
+	}
+	.search-check .check .check-active{
+		margin-right: 15px;
+	}
+	.search-check .check .check-active span{
+		font-weight: normal;
+		color: #333;
+	}
+	.search-check .check .check-active label{
+		margin-right: 0 !important;
+	}
+	.check-input input{
+		display: none;
+	}
+	.check-input label {
+		width: 15px;
+		height: 15px;
+		display: inline-block;
+		background: url(static/img/user/images/check.png) no-repeat;
+		position: relative;
+		padding-left: 0 !important;
+		overflow: hidden;
+		margin-bottom: 0 !important;
+		vertical-align: sub;
+		min-height: 15px !important;
+		left: 0 !important;
+	}
+	.check-input input[type="checkbox"]:checked + label{
+		background-position: -15px 0;
+	}
+	.record-line{
+		min-height: 30px;
+		font-size: 12px;
+		line-height: 35px;
+		/* margin-top: 5px; */
+		padding-right: 22px
+	}
+	.device .tab{
+		padding-bottom: 20px;
+	}
+	.wanted_list01 .pagination{
+		margin: 0;
+	}
+	.ng-table-pager{
+		padding-bottom: 20px;
+	}
+	.com-del-box{
+		position: fixed;
+		z-index: 2;
+		height: 152px;
+		opacity: 1;
+		background-color: white;
+		width: 310px;
+		-webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+		box-shadow: 0 5px 15px rgba(0,0,0,.5);
+		margin: -155px 0 0 -75px;
+		top: 55%;
+		left: 50%;
+	}
+	.com-del-box .title{
+		height: 30px;
+		background-color: #5078cb;
+		text-align: right;
+		padding-right: 15px;
+		line-height: 30px;
+	}
+	.com-del-box .title a{
+		color: white;
+		font-size: 16px;
+	}
+	.com-del-box .content{
+		width: 100%;
+		text-align: center;
+		margin: 0 auto;
+	}
+	.com-del-box .content p{
+		line-height: 50px;
+		font-size: 14px;
+		padding-top: 10px;
+		padding-bottom: 10px;
+	}
+	.com-del-box .content p i{
+		color: #5078cb;
+		font-size: 16px;
+		margin-right: 10px;
+	}
+	.com-del-box .content div{
+		width: 100%;
+		text-align: center;
+		margin: 0 auto;
+	}
+	.com-del-box .content div a{
+		width: 55px;
+		height: 26px;
+		line-height: 26px;
+		display: inline-block;
+		text-align: center;
+		font-size: 14px;
+	}
+	.com-del-box .content div a:first-child{
+		background: #b4b5b9;
+		color: #333;
+		margin-right: 10px;
+	}
+	.com-del-box .content div a:last-child{
+		background: #5078cb;
+		color: #fff;
+	}
+	.com-del-box .content div a:hover{
+		background: #3f7ae3;
+		color: #fff;
+	}
+	.record-line .prompt{
+		text-align: left;
+		width: 495px;
+		float: left;
+		line-height: 16px;
+		padding-left: 25px;
+		padding-top: 10px;
+	}
+	.record-line .prompt a{
+		color: #5078cb;
+	}
+	/*   编辑*/
+	.edit-content td{
+		background: #daecfb;
+		padding-bottom: 20px !important;
+	}
+	.edit-content img{
+		width: 60px;
+		border: #dfdfdf 1px solid;
+		height: 60px;
+	}
+	.edit-content .form-control{
+		height: 24px;
+		padding: 0;
+		text-align: center;
+		margin-bottom: 5px;
+		line-height: 24px;
+		font-size: 12px;
+		border-radius: 3px;
+	}
+	.edit-content select.form-control{
+		padding-left: 28px;
+		line-height: 23px;
+	}
+	.edit-content p{
+		font-size: 14px;
+	}
+	.edit-content select{
+		-webkit-appearance: inherit;
+		appearance: inherit;
+	}
+	.edit-content select option{
+		text-align: center;
+	}
+	.edit-content div.content,.edit-content div.img{
+		float: left;
+		margin-right: 5px;
+	}
+	.edit-content .wid36{
+		width: 36px;
+	}
+	.edit-content .wid48{
+		width: 48px;
+	}
+	.edit-content .wid42{
+		width: 42px;
+	}
+	.edit-content .wid92{
+		width: 92px;
+	}
+	.edit-content div .input-list p span{
+		float: left;
+		line-height: 24px;
+		color: #999;
+	}
+	.edit-content div .input-list p span input:first-child{
+		margin-left: 5px;
+	}
+	.edit-content .title{
+		height: 40px;
+		line-height: 40px;
+	}
+	.edit-content .reduce{
+		color: #faa002 !important;
+		margin: 0 !important;
+	}
+	.edit-content .add{
+		color: #2ea001 !important;
+		margin: 0 !important;
+	}
+	.edit-content button{
+		width: 62px;
+		height: 24px;
+		border: none;
+		color: #fff;
+		float: left;
+	}
+	.edit-content button.off{
+		background: #f15601;
+		margin-bottom: 5px;
+	}
+	.edit-content button.ok{
+		background: #33b401;
+	}
+	.edit-content button:hover{
+		background: #5078cb;
+	}
+	.edit-content .img .previewImage {
+		background: #fff;
+	}
+	.edit-content .img >span {
+		font-size: 12px;
+		color: #999;
+	}
+	.edit-content .content .material-form-line {
+		margin-bottom: 10px;
+		text-align: left;
+		position: relative;
+	}
+	.edit-content .content .material-form-line >span {
+		font-size: 12px;
+		color: #008000;
+		font-weight: bold;
+		display: inline-block;
+		width: 104px;
+		text-align: right;
+	}
+	.edit-content .content .material-form-line >input {
+		display: inline-block;
+		width: 280px;
+		border-radius: 0;
+		text-align: left;
+		padding: 0 5px;
+	}
+	.edit-content .content .material-form-line>label input {
+		display: none;
+	}
+	.edit-content .content .material-form-line>label p {
+		background-color: rgba(22, 155, 213, 1);
+		width: 144px;
+		height: 25px;
+		line-height: 25px;
+		color: #fff;
+		font-size: 12px;
+		border-radius: 5px;
+		text-align: center;
+	}
+	.wanted_list01 .tab table tr.active{
+		height: 35px;
+	}
+	.wanted_list01 .tab table tr.active td{
+		background: #c2dff7;
+	}
+	div.user_right input::-webkit-outer-spin-button,
+	div.user_right input::-webkit-inner-spin-button{
+		-webkit-appearance: none !important;
+		margin: 0;
+	}
+	div.user_right input[type="number"]{
+		-moz-appearance:textfield;
+	}
+	.public-tab td>div.ellipsis-div {
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+	}
+	.restrict-color {
+		color: #c7c7c7;
+	}
+	a:focus {
+		text-decoration: none;
+	}
+	.col-xs-4 .f16{
+		font-size: 14px;
+	}
+	.pro_management .table tr td div span.switch{
+		width:39px;
+		height: 14px;
+		display: inline-block;
+	}
+	.pro_management .table tr td div span.switch button{
+		border: none;
+		position: relative;
+		top: 2px;
+		left: 5px;
+		width: 39px;
+		height: 14px;
+		background: url(static/img/icon/check-off.png) no-repeat center;
+	}
+	.pro_management .table tr td div span.switch button.active{
+		background: url("static/img/icon/check-ok.png") no-repeat center;
+	}
+	.com_tab ul li.active a {
+		color: #1687ff;
+	}
+	.material-form-line .dropdown-menu li {
+		width: 279px;
+		overflow: hidden;
+	}
+	.material-form-line .dropdown-menu {
+		z-index: 2;
+	}
+	.material-form-line .dropdown-menu li.active a {
+		color: #fff!important;
+	}
+	.material-form-line .search-more-kind {
+		position: absolute;
+		right: 0;
+		top: 0;
+		width: 24px;
+		height: 24px;
+		background: #eee;
+		text-align: center;
+		border: 1px solid #ccc;
+		cursor: pointer;
+	}
+	.content .material-form-line textarea {
+		display: inline-block;
+		vertical-align: middle;
+		height: 36px;
+		line-height: 12px;
+		text-align: left;
+		padding: 5px;
+		margin: 0;
+		font-size: 12px;
+	}
+</style>
+<div class="user_right fr">
+	<!--货品管理-->
+	<div class="pro_management device">
+		<div class="com_tab">
+			<ul class="fl" style="width: 100%">
+				<li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material_erp({standardParam:'standard'})">可上架产品</a></li>
+				<li ng-class="{'active': tab == 'unstandard_material'}"><a ui-sref="vendor_material_unstandard_erp({standardParam:'unstandard'})">暂不可上架产品</a></li>
+				<li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale_erp">已上架</a></li>
+				<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage_erp">上下架历史</a></li>
+			</ul>
+		</div>
+		<div class="search-check">
+			<div class="search fl">
+				<input type="text" class="form-control" ng-model="param.keyword" ng-search="onSearch()" placeholder="产品编号/品牌/产品型号"/>
+				<button ng-click="onSearch()">搜索</button>
+				<a ng-click="download()">批量导出</a>
+			</div>
+			<div class="check fr">
+				<!--<a ng-show="!isBatch && standard_tab == 'unstandard'" ng-click="matchAll()"><span ng-show="!isBatch && standard_tab == 'unstandard'">一键匹配</span></a>-->
+				<a ng-show="!isBatch" ng-click="enterBatch()"><span ng-show="!isBatch">批量操作</span></a>
+				<span class="check-btn" ng-show="isBatch">
+                    <label class="check-active">
+                        <input type="checkbox"  ng-click="chooseAll()" ng-checked="isChoosedAll" id="AllChoose"/>
+                        <label for="AllChoose"></label>
+                        <span>全选</span>
+                    </label>
+                    <a ng-click="deleteBatch()">删除</a>
+                    <a ng-click="exitBatch()">取消</a>
+                </span>
+			</div>
+		</div>
+		<div class="wanted_list01">
+			<!--在售产品-->
+			<div class="tab">
+				<table class="public-tab table">
+					<thead>
+					<tr>
+						<th width="80">序号</th>
+						<th width="180">产品编号</th>
+						<th width="200">产品名称(类目)</th>
+						<th width="150">品牌</th>
+						<th width="100">单位</th>
+						<th>产品型号</th>
+						<th width="150">操作</th>
+					</tr>
+					</thead>
+					<tbody>
+					<tr style="height: 14px;">
+						<td colspan="7" class="hei16"></td>
+					</tr>
+					</tbody>
+					<tbody ng-repeat="material in currenctMaterial">
+					<tr ng-class="{ 'active': material.selected }">
+						<td class="check-input">
+							<span ng-show="isBatch"><input type="checkbox" ng-checked="material.isChoosed"  ng-click="chooseOne(material)"  id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>
+							<span ng-show="!isBatch" ng-bind="(param.currentPage - 1) * 10 + $index + 1"></span>
+						</td>
+						<td ng-bind="material.prodNum" title="{{material.prodNum}}"></td>
+						<td>
+							<span ng-if="material.kind" ng-bind="material.kind" title="{{material.kind}}"></span>
+							<span ng-if="!material.kind" ng-bind="material.kinden" title="{{material.kinden}}"></span>
+						</td>
+						<td>
+							<div class="ellipsis-div" ng-if="material.pbranden" ng-bind="material.pbranden" title="{{material.pbranden}}"></div>
+							<div class="ellipsis-div" ng-if="!material.pbranden" ng-bind="material.pbrand" title="{{material.pbrand}}"></div>
+						</td>
+						<td ng-bind="material.unit || 'PCS'" title="{{material.unit  || 'PCS'}}"></td>
+						<td>
+							<a ng-if="material.cmpUuId" ng-href="product/component/{{material.cmpUuId}}/" ng-bind="material.pcmpcode" title="{{material.pcmpcode}}" style="color: #333;"></a>
+							<span ng-if="!material.cmpUuId" ng-bind="material.pcmpcode" title="{{material.pcmpcode}}"></span>
+						</td>
+						<td>
+							<a ng-show="!material.selected&&!isBatch" ng-click="material.selected = true;"><span ng-show="!isBatch">编辑</span></a>
+							<a ng-show="!material.selected&&!isBatch" ng-click="match(material)"><span ng-show="!isBatch">匹配</span></a>
+							<!--<a ng-show="!material.selected&&!isBatch" ng-click="deleteMaterial(material)"><span ng-show="!isBatch">删除</span></a>-->
+							<!--<a ng-if="material.selected">取消</a>-->
+						</td>
+					</tr>
+					<!--编辑内容-->
+					<tr class="edit-content" ng-if="material.selected">
+						<td colspan="7">
+							<div class="img">
+								<div image-upload data-src="static/img/vendor/images/upload.png" on-success="" ng-model="material.submitProduct.brand.logoUrl"></div>
+								<span>支持jpg、png</span>
+							</div>
+							<div class="content">
+								<div class="material-form-line">
+									<span>*品牌英文名:</span>
+									<input type="text" class="form-control" name="nameEn" ng-model="material.submitProduct.brand.nameEn"
+										   placeholder="输入品牌名称,例如:Panasonic" autocomplete="off" typeahead="brand.nameEn for brand in getSimilarBrands($viewValue) | limitTo:2"                                              typeahead-on-select="onAssociateClickBrand(material, $item)"
+										   required autofocus />
+								</div>
+								<div class="material-form-line">
+									<span>*品牌官网:</span>
+									<input type="text" placeholder="请输入品牌官网" class="form-control" ng-model="material.submitProduct.brand.url">
+								</div>
+							</div>
+							<div class="content" ng-if="material.pbranduuid">
+								<div class="material-form-line">
+									<span>*原厂标准型号:</span>
+									<input type="text" name="code" ng-model="material.submitProduct.component.code" class="form-control"
+										   placeholder="请输入标准原厂型号" typeahead-on-select="onAssociateClickCmp(material, $item)"
+										   typeahead="component.code for component in getSimilarCmps($viewValue)" autocomplete="off"
+										   required>
+								</div>
+								<div class="material-form-line">
+									<span>*器件分类:</span>
+									<input type="text" class="form-control" name="kindName" ng-model="material.submitProduct.kind.nameCn"  required
+										   placeholder="请输入或选择分类" autocomplete="off" typeahead-on-select="onAssociateClickKind(material, $item)"
+										   typeahead="kind.nameCn for kind in getSimilarKinds($viewValue)"
+										   />
+									<div class="search-more-kind" ng-click="selectKind()">
+										<i class="fa fa-search" aria-hidden="true"></i>
+									</div>
+								</div>
+								<div class="material-form-line">
+									<span>*规格书:</span>
+									<label ng-show="attachNameInfo == ''">
+										<input type="file" onchange="angular.element(this).scope().onAttachInput(event)" accept=".pdf" class="form-control">
+										<!--<div class="form-control" uploadify="{}" on-success="onAttachInput($data)"/>-->
+										<p>上传规格书(pdf格式)</p>{{attachNameInfo}}
+									</label>
+									<label ng-show="attachNameInfo != ''">
+										<p>{{attachNameInfo}}</p>
+										<a style="margin-left: 5px;" href="javascript:void(0)" ng-click="deleteAttach()">删除</a>
+									</label>
+								</div>
+							</div>
+							<div class="content" ng-if="!material.pbranduuid">
+								<div class="material-form-line">
+									<span>*品牌介绍:</span>
+									<textarea class="form-control" required ng-model="material.submitProduct.brand.brief"
+										   placeholder="请输入品牌介绍" autocomplete="off"/>
+								</div>
+								<div class="material-form-line">
+									<span>*主要产品:</span>
+									<textarea class="form-control" required ng-model="material.submitProduct.brand.series"
+											  placeholder="请输入主要产品" autocomplete="off"/>
+								</div>
+							</div>
+							<div class="content" style="width: 56px; float: right; margin-right: 10px;">
+								<p class="title">&nbsp;</p>
+								<div class="input-list">
+									<button class="ok" ng-click="closeShelArea(material)" style="margin-bottom: 5px">取消</button>
+									<!--<button class="ok" ng-click="publishGoods(material)" style="margin-bottom: 5px">保存</button>-->
+									<button class="ok" ng-click="submit(material)">提交申请</button>
+								</div>
+							</div>
+						</td>
+					</tr>
+					</tbody>
+					<tbody ng-if="currenctMaterial.length == 0">
+					<tr style="height: 190px;">
+						<td colspan="7" style="border-bottom: none;">
+							<div class="col-xs-2"  style="margin-left: 34%; margin-top: 65px;">
+								<img src="static/img/all/empty-cart.png">
+							</div>
+							<div class="col-xs-4">
+								<p class="grey f16" style="line-height: 80px; text-align: left; margin-top: 70px;">暂无物料资料记录</p>
+							</div>
+						</td>
+					</tr>
+					</tbody>
+				</table>
+				<!--<div class="record-line text-right" ng-if="currenctMaterial.length != 0">-->
+					<!--<div class="prompt" ng-show="standard_tab == 'unstandard'">-->
+						<!--<strong class="text-inverse">*</strong>商城暂未收录的 品牌/器件,”原厂型号“将会显示为空且不可上架售卖,<br/>-->
+						<!--如需上架可先点击 【匹配】按钮,若匹配不成功,可前往<a ui-sref="vendor_brand_apply" target="_blank"> 品牌申请/</a><a ui-sref="vendor_component_apply" target="_blank">器件申请</a>,提出申请-->
+					<!--</div>-->
+					<!--<div ng-if="currenctMaterial.length != 0">显示 {{(param.currentPage - 1) * 10 + 1}}-&lt;!&ndash;<span ng-bind="materialAll.size"></span>&ndash;&gt;{{ param.currentPage * 10 }}, 共: <span ng-bind="materialAll.totalElements" cl style="color: #5078cb;"></span> 个</div>-->
+				<!--</div>-->
+				<div class="ng-cloak ng-table-pager" style="text-align: right;margin-right: 60px;" ng-if="materialAll.totalPages>1">
+					<ul class="pagination ng-table-pagination">
+						<li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
+							<a ng-switch-when="prev" ng-click="setPage(page.type, -1)" href="">&laquo;</a>
+							<a ng-switch-when="first" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="page" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="more" ng-click="setPage(page.type, -1)" href="">&#8230;</a>
+							<a ng-switch-when="last" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="next" ng-click="setPage(page.type, -1)" href="">&raquo;</a>
+						</li>
+					</ul>
+					<div class="page-go-block">
+						<input class="page-number" type="text" ng-model="param.currentPage" ng-keydown="listenEnter()"/>
+						<a class="page-a" ng-click="setPage('page', param.currentPage)" href="">GO</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+<div class="com-del-box" ng-if="deleteDiv">
+	<div class="title">
+		<a ng-click="cancleDelete()"><i class="fa fa-close fa-lg"></i></a>
+	</div>
+	<div class="content">
+		<p><i class="fa fa-exclamation-circle"></i>是否删除选中产品</p>
+		<div><a ng-click="cancleDelete()">取消</a><a ng-click="confirmDelete()">确认</a></div>
+	</div>
+</div>

+ 853 - 0
src/main/webapp/resources/view/vendor/forstore/erp/vendor_onSale_erp.html

@@ -0,0 +1,853 @@
+<!--右侧主体部分-->
+<style>
+    .tab.active {
+        display: inline-block !important;
+    }
+    *{-webkit-box-sizing: border-box;  -moz-box-sizing: border-box;  box-sizing: border-box;}
+    div.wanted_list01 dt.paging-bar>span {
+        float: right;
+        width: 322px;
+        height: 40px;
+        font-weight: normal;
+    }
+    div.wanted_list01 dt.paging-bar>span button.paging-button {
+        padding: 0;
+        height: 40px;
+        line-height: 40px;
+        border: none;
+        background: #FFFFFF;
+    }
+    div.wanted_list01 dt.paging-bar>span button.paging-button:hover {
+        color: #0C3894;
+    }
+    div.wanted_list01 dt.paging-bar>span input.page-num {
+        width: 25px;
+        height: 25px;
+        line-height: 40px;
+        border: 1px #C7BEBE solid;
+        text-align: center;
+    }
+    label[disabled] {
+        cursor: not-allowed;
+    }
+    .com_tab ul li.down-goods span:hover {
+        cursor: pointer;
+        text-decoration: underline;
+    }
+    .materrial-list span.length01{
+        width: 10% !important;
+    }
+    .materrial-list span{
+        width: 20% !important;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    ul.pagination.ng-table-pagination > li > a > span {
+        height: 17px;
+        line-height: 17px;
+    }
+
+    div.ng-table-pager  input.page-number {
+        vertical-align: inherit;
+        display: inline-block;
+        width: 40px;
+        height: 31px;
+        padding: 6px 6px;
+        font-size: 14px;
+        line-height: 1.42857143;
+        color: #9B9792;
+        text-align: center;
+        background-color: #F6F5F4;
+        background-image: none;
+        border: 1px solid #ccc;
+        border-top-left-radius: 4px;
+        border-bottom-left-radius: 4px;
+        box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+        transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+    }
+
+    div.ng-table-pager a.page-a {
+        color: #fff;
+        cursor: pointer;
+        background-color: #4574E8;
+        border-color: #4574E8;
+        padding: 6px 6px;
+        font-size: 14px;
+        border-top-right-radius: 4px;
+        border-bottom-right-radius: 4px;
+        text-decoration: none;
+        height: 31px;
+    }
+
+    div.ng-table-pager div.page-go-block {
+        float: right;
+        margin-left: 20px;
+        margin-top: 15px;
+        font-size: 0px;
+        height: 31px;
+        line-height: 31px;
+    }
+    .filter:hover .hover-show {
+        display: inline-block;
+    }
+    .filter:hover .angle-hover-up {
+        -webkit-transform: rotateZ(180deg);
+        -moz-transform: rotateZ(180deg);
+        -o-transform: rotateZ(180deg);
+        -ms-transform: rotateZ(180deg);
+        transform: rotateZ(180deg);
+    }
+    .filter .hover-show{
+        width: 100%;
+        height: auto;
+        position: absolute;
+        background-color: #fff;
+        margin-top: -1px;
+        border: 1px solid #e8e8e8;
+        border-top: none;
+        display: none;
+        left: 0;
+        top: 40px;
+    }
+    .filter .hover-show a{
+        width: 100%;
+        height: 40px;
+        display: inline-block;
+        line-height: 40px;
+        text-align: center;
+        font-size: 14px;
+        font-weight: normal;
+    }
+    .filter .hover-show a:hover{
+        background: #ecf2fd;
+        color: #5078cb !important;
+    }
+    .wid02 .fr .hidden-ellipsis-110 {
+        width: 110px;
+        overflow: hidden;
+        word-break: normal;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+    }
+    .com-out-box{
+        position: fixed;
+        z-index: 2;
+        height: 152px;
+        opacity: 1;
+        background-color: white;
+        width: 310px;
+        -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+        box-shadow: 0 5px 15px rgba(0,0,0,.5);
+        margin: -155px 0 0 -75px;
+        top: 55%;
+        left: 50%;
+    }
+    .com-out-box .title{
+        height: 30px;
+        background-color: #5078cb;
+        text-align: right;
+        padding-right: 15px;
+        line-height: 30px;
+    }
+    .com-out-box .title a{
+        color: white;
+        font-size: 16px;
+    }
+    .pay_record .ticket_record_list dl dd{
+        position: relative;
+    }
+    .com-out-box .content{
+        width: 100%;
+        text-align: center;
+        margin: 0 auto;
+    }
+    .com-out-box .content p{
+        line-height: 50px;
+        font-size: 14px;
+        padding-top: 10px;
+    }
+    .com-out-box .content p i{
+        color: #5078cb;
+        font-size: 16px;
+        margin-right: 10px;
+    }
+    .com-out-box .content div{
+        width: 100%;
+        text-align: center;
+        margin: 0 auto;
+    }
+    .com-out-box .content div a{
+        width: 55px;
+        height: 26px;
+        line-height: 26px;
+        display: inline-block;
+        text-align: center;
+        font-size: 14px;
+    }
+    .com-out-box .content div a:first-child{
+        background: #b4b5b9;
+        color: #333;
+        margin-right: 10px;
+    }
+    .com-out-box .content div a:last-child{
+        background: #5078cb;
+        color: #fff;
+    }
+    .com-out-box .content div a:hover{
+        background: #3f7ae3;
+        color: #fff;
+    }
+    .com_tab ul li.down-goods {
+        float: right;
+        margin-right: 24px;
+        font-size: 14px;
+        color: #5078cb;
+    }
+
+    .com_tab ul li.down-goods span:hover {
+        cursor: pointer;
+        text-decoration: underline;
+    }
+    .check-input{
+        position: relative;
+    }
+    .check-input .check-show{
+        position: absolute;
+        top: 21px;
+        height: 15px;
+        line-height: 15px;
+        left: 18px;
+    }
+    .pro_management .product_off dd:last-of-type{
+        border-bottom: #cfcfcf 1px solid;
+    }
+    .record-line{
+        /*height: 30px;*/
+        font-size: 12px;
+        line-height: 35px;
+        /* margin-top: 5px; */
+        padding-right: 22px
+    }
+    .wanted_list01 .pagination{
+        margin: 0;
+    }
+    .ng-table-pager{
+        padding-bottom: 20px;
+    }
+
+    /*编辑*/
+    .vendor-tab .img{
+        width: 60px;
+        height: 60px;
+        border: #e8e8e8 1px solid;
+        overflow: hidden;
+        line-height: 60px;
+        margin-top: 0;
+        border-radius: 3px;
+    }
+    .vendor-tab .img img{
+        width: 60px;
+        height: 60px;
+    }
+    .vendor-tab .img a{
+        margin: 0 !important;
+    }
+    .vendor-tab .img
+    .public-tab.table>tbody>tr>td{
+        font-size: 14px !important;
+        text-align: left !important;
+    }
+    .vendor-tab.table td .wid135{
+        width: 143px;
+        margin-left: 7px;
+        position: relative;
+        top: -10px;
+    }
+    .filter a{
+        color: #333 !important;
+    }
+    .vendor-tab.table td .wid135 p{
+        display: block;
+        width: 100%;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    .vendor-tab.table td p{
+        font-size: 14px;
+        text-align: left;
+    }
+    /*.vendor-tab.table>tbody>tr{*/
+    /*height: 252px;*/
+    /*}*/
+    .public-tab.table>tbody>tr>td{
+        /*border-bottom: #cfcfcf 1px dashed;*/
+        /*padding: 74px 0;*/
+    }
+    .public-tab.table tbody.bottom-no tr td{
+        border-bottom: none;
+    }
+    .edit-form .form-control{
+        height: 24px;
+        padding: 0;
+        text-align: center;
+        font-size: 12px;
+        border-radius: 3px;
+    }
+    .edit-form select.form-control{
+        padding-left: 10px;
+    }
+    .edit-form div{
+        text-align: left;
+    }
+    .wid88{
+        width: 88px;
+    }
+    .wid48{
+        width: 48px;
+    }
+    .wid85{
+        width: 75px;
+    }
+    .wid68{
+        width: 68px;
+    }
+    .wid40{
+        width: 40px;
+    }
+    .wid25{
+        width: 25px;
+        text-align: center !important;
+        padding-left: 0 !important;
+    }
+    .wid56{
+        width: 56px;
+    }
+    .wid90{
+        width: 90px;
+    }
+    .edit-form td div{
+        float: left;
+        height: 24px;
+        margin-top: 5px;
+        line-height: 24px;
+        width: 100%;
+    }
+    .edit-form td div span{
+        float: left;
+    }
+    .edit-form td div span:first-child{
+        margin-right: 2px;
+    }
+    .filter{
+        position: relative;
+    }
+    .edit-form button {
+        width: 56px;
+        height: 24px;
+        border: none;
+        color: #fff;
+        float: left;
+    }
+    .edit-form button.ok {
+        background: #33b401;
+    }
+    .edit-form button.off {
+        background: #f15601;
+        margin-bottom: 5px;
+    }
+    .edit-form button:hover{
+        background: #5078cb;
+    }
+    .public-tab.table>tbody>tr>td.padding0{
+        padding: 8px 0;
+    }
+    .public-tab.table tbody .padding0 div{
+        text-align: center;
+        width: 50px;
+    }
+    .edit-form .reduce{
+        color: #faa002 !important;
+        margin: 0 !important;
+        margin-left: 2px !important;
+    }
+    .edit-form .add{
+        color: #2ea001 !important;
+        margin: 0 !important;
+    }
+    .public-tab.table tr td{
+        vertical-align: top !important;
+    }
+    .public-tab.table tr td.middle{
+        vertical-align: middle !important;
+        padding-left: 0;
+        position: relative;
+    }
+    .record-line{
+        min-height: 30px;
+        font-size: 12px;
+        line-height: 35px;
+    }
+    .text-center{
+        margin-top: 30px;
+    }
+    .text-center .col-xs-2 img{
+        margin-left: 95px;
+    }
+    .text-center .col-xs-4 p{
+        margin-top: 33px;
+        font-size: 14px;
+    }
+    /*查看大图*/
+    .vendor-tab .img{
+        position: relative;
+    }
+    .vendor-tab .img a{
+        width: 60px;
+        height: 60px;
+        display: inline-block;
+    }
+    .vendor-tab .img .hover-show,.vendor-tab .img .edit-img{
+        position: absolute;
+        width: 100%;
+        height: 100%;
+        background: rgba(0,0,0,.5);
+        left: 0;
+        top: 0;
+        font-size: 12px;
+        margin-top: 0;
+    }
+    .vendor-tab .img .hover-show{
+        top: 60px;
+    }
+    .vendor-tab .img:hover .hover-show{
+        top: 0;
+    }
+    .vendor-tab .img .hover-show a, .vendor-tab .img .edit-img a{
+        width: 100%;
+        height: 100%;
+        display: inline-block;
+        text-align: center;
+        line-height: 55px;
+        color: #fff !important;
+    }
+    .vendor-tab .img .hover-show i{
+        margin-right: 3px;
+    }
+    .vendor-tab .img .edit-img{
+
+    }
+    .vendor-tab .img .edit-img a img{
+        width: 38px;
+        height: 38px;
+    }
+    .vendor-tab .middle .prompt{
+        position: absolute;
+        bottom: 4px;
+        left: 0;
+        font-size: 10px;
+        /*color: #999;*/
+    }
+    .vendor-tab .middle .prompt em{
+        color: #ff0000;
+    }
+    .public-tab.table tr td.middle{
+        overflow: inherit;
+    }
+    .public-tab.table tr td.middle .img,.vendor-tab.table td .wid135{
+        margin-top: 15px;
+    }
+    .edit-form .error{
+        border: #f00 1px solid !important;
+    }
+
+    .edit-form .error:focus{
+        box-shadow: none;
+    }
+    .public-tab.table>tbody>tr>td div:last-child a.add[disabled], .public-tab.table>tbody>tr>td div:last-child a.reduce[disabled]{
+        color: #c7c7c7 !important;
+    }
+     .pro_management .table>tbody>tr>td div.img a.delete-img {
+         position: absolute;
+         top: 2px;
+         right: 0;
+         z-index: 20;
+         width: 20px;
+         height: 20px;
+         line-height: 16px;
+         border: none;
+     }
+    .pro_management .table>tbody>tr>td div.img a.delete-img i {
+        color: #fff;
+        font-size: 12px;
+    }
+    .public-tab.table tr td div span.switch{
+        width:39px;
+        height: 14px;
+        display: inline-block;
+    }
+    .public-tab.table tr td div span.switch button{
+        border: none;
+        position: relative;
+        top: 6px;
+        left: 5px;
+        width: 39px;
+        height: 14px;
+        background: url(static/img/icon/check-off.png) no-repeat center;
+    }
+    .public-tab.table tr td div span.switch button.active{
+        background: url("static/img/icon/check-ok.png") no-repeat center;
+    }
+
+    .text-overflow {
+        text-overflow: ellipsis;
+        overflow: hidden;
+        width: 100%;
+        white-space: nowrap;
+    }
+</style>
+<div class="user_right fr">
+    <!--货品管理-->
+    <div class="pro_management device">
+        <div class="com_tab">
+            <ul class="fl" style="width: 100%">
+                <li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material_erp">可上架产品</a></li>
+                <li ng-class="{'active': tab == 'unstandard_material'}"><a ui-sref="vendor_material_unstandard_erp">暂不可上架产品</a></li>
+                <li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale_erp">已上架</a></li>
+                <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage_erp">上下架历史</a></li>
+                <li class="down-goods">
+                    <!--<span ng-click="downGoods()">
+                        <i class="fa fa-file-excel-o fa-fw"></i>导出Excel
+                    </span>
+                    <form style="display: none;" id="down-load-goods" method="get">
+                        <input type="hidden" name="ids" ng-value="localInfo.ids">
+                    </form>-->
+                </li>
+            </ul>
+        </div>
+        <div class="search-check">
+            <div class="search fl">
+                <input type="text" class="form-control" ng-model="keyword" ng-search="onSearch()" placeholder="产品型号/品牌/批次"/>
+                <button ng-click="onSearch()">搜索</button>
+                <a ng-click="downGoods()" class="down-goods-btn">批量导出</a>
+                <form style="display: none;" id="down-load-goods" method="get">
+                    <input type="hidden" name="ids" ng-value="localInfo.ids">
+                </form>
+            </div>
+            <!--<div class="check fr">-->
+            <!--<a  ng-click="">批量操作</a>-->
+            <!--<span class="check-btn">-->
+            <!--<label class="check-active">-->
+            <!--<input type="checkbox" id="AllChoose"/>-->
+            <!--<label for="AllChoose"></label>-->
+            <!--<span>全选</span>-->
+            <!--</label>-->
+            <!--<a href="#">下架</a>-->
+            <!--<a href="#">取消</a>-->
+            <!--<a href="#">确定</a>-->
+            <!--</span>-->
+            <!--</div>-->
+        </div>
+        <!--搜索 批量操作-->
+        <!--<div class="search-check">
+            <div class="search fl">
+                <input type="text" class="form-control" placeholder="型号/品牌"/>
+                <button>搜索产品</button>
+                <a ng-click="">批量导出</a>
+            </div>
+            <div class="check fr">
+                <a  ng-click="">批量操作</a>
+                <span class="check-btn">
+                    <label class="check-active">
+                        <input type="checkbox" id="AllChoose"/>
+                        <label for="AllChoose"></label>
+                        <span>全选</span>
+                    </label>
+                    <a href="#">下架</a>
+                    <a href="#">取消</a>
+                    <a href="#">确定</a>
+                </span>
+            </div>
+        </div>-->
+        <div class="wanted_list01">
+            <!--在售产品-->
+            <div class="tab">
+                <table class="vendor-tab public-tab table">
+                    <thead>
+                    <tr>
+                        <th width="50" style="padding:8px 0;">序号</th>
+                        <th width="220">产品信息</th>
+                        <th width="115">包装/生产日期</th>
+                        <th width="140">库存</th>
+                        <th width="105">数量</th>
+                        <th ng-if="onsale.currency == 'USD'" width="116">单价<b style="font-size: 12px;font-weight: 600">($)</b></th>
+                        <th ng-if="onsale.currency == 'RMB'" width="116">单价<b style="font-size: 12px;font-weight: 600">(¥)</b></th>
+                        <th width="120">交期</th>
+                        <th class="filter" width="90">
+                            <a>{{selfSupport}}<i class="fa fa-angle-double-down angle-hover-up" aria-hidden="true"></i></a>
+                            <div class="hover-show">
+                                <a ng-click="changeSupportType(selfSupportType.ALL)" title="自营/寄售">自营/寄售</a>
+                                <a ng-click="changeSupportType(selfSupportType.SELF_SUPPORT)" title="自营">自营</a>
+                                <a ng-click="changeSupportType(selfSupportType.CONSIGNMENT)" title="寄售">寄售</a>
+                            </div>
+                        </th>
+                        <th width="60" class="padding0">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody class="bottom-no">
+                    <tr style="height: 14px;">
+                        <td colspan="10" class="hei16"></td>
+                    </tr>
+                    </tbody>
+                    <tbody ng-repeat="commodity in currenctGoods">
+                    <tr class="edit-form" ng-if="!commodity.edit">
+                        <td class="middle padding0 check-input">
+                            <!-- <span><input type="checkbox" id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>-->
+                            <div>{{$index + 1}}</div>
+                        </td>
+                        <td class="middle"  style="vertical-align: top !important;">
+                            <div class="fl img">
+                                <a><img ng-src="{{commodity.img ? commodity.img : 'static/img/store/common/default.png'}}"/></a>
+                                <div class="hover-show">
+                                    <a ng-click="showImg(commodity.img || 'static/img/store/common/default.png')" title="查看大图"><i class="fa fa-search"></i>查看</a>
+                                </div>
+                            </div>
+                            <div class="fr wid135">
+                                <p>类目: <em ng-bind="commodity.kindNameCn" title="{{commodity.kindNameCn}}"></em></p>
+                                <p>型号: <em ng-bind="commodity.code" title="{{commodity.code}}">LPC1112</em></p>
+                                <p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>
+                            </div>
+                        </td>
+                        <td style="white-space: inherit;">
+                            <div>
+                                <span class="text-overflow" ng-bind="commodity.packaging || '无包装信息'" title="{{commodity.packaging}}"></span><br/>
+                            </div>
+                            <div>
+                                <span ng-bind="commodity.produceDate || '-'" title="{{commodity.produceDate}}"></span>
+                            </div>
+                            <div>
+                                <span ng-bind="commodity.breakUp ? '可拆卖' : '不可拆卖'">可拆卖</span>
+                            </div>
+                        </td>
+                        <td style="padding: 8px 0;">
+                            <div>
+                                <span>库存: </span>
+                                <span ng-bind="commodity.reserve" title="{{commodity.reserve}}"></span>
+                            </div>
+                            <div>
+                                <span>起拍: </span>
+                                <span ng-bind="commodity.minBuyQty" title="{{commodity.minBuyQty}}"></span>
+                            </div>
+                            <div>
+                                <span>最小包数量: </span>
+                                <span ng-bind="commodity.minPackQty" title="{{commodity.minPackQty}}"></span>
+                            </div>
+                        </td>
+                        <td>
+                            <div ng-repeat="price in commodity.prices" >
+                                <span ng-bind="price.start + '+'" style="margin-left: 20px;"></span>
+                            </div>
+                        </td>
+                        <td ng-if="onsale.currency == 'USD'">
+                            <div  ng-repeat="price in commodity.prices" ng-if="price.uSDPrice" >
+                                <span ng-bind="price.uSDPrice | formateNumber : 6 | currencySysmbol : commodity.currencyName"></span>
+                            </div>
+                        </td>
+                        <td ng-if="onsale.currency == 'RMB'">
+                            <div ng-repeat="price in commodity.prices" ng-if="price.rMBPrice">
+                                <span ng-bind="price.rMBPrice | formateNumber : 6 | currencySysmbol : commodity.currencyName" style="margin-left: 10px;"></span>
+                            </div>
+                        </td>
+                        <td>
+                            <div ng-if="onsale.currency == 'RMB'">
+                                <span ng-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery != commodity.b2cMinDelivery)" ng-bind="'大陆:' + commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery"></span>
+                                <span ng-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery == commodity.b2cMinDelivery)" ng-bind="'大陆:' + commodity.b2cMinDelivery"></span>
+                            </div>
+                            <div ng-if="onsale.currency == 'USD'">
+                                <span ng-if="commodity.b2cMaxDelivery && (commodity.b2cMinDelivery != commodity.b2cMaxDelivery)" ng-bind="'香港:' + commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery"></span>
+                                <span ng-if="commodity.b2cMaxDelivery && (commodity.b2cMinDelivery == commodity.b2cMaxDelivery)" ng-bind="'香港:' + commodity.b2cMinDelivery"></span>
+                            </div>
+                        </td>
+                        <td>
+                            <div>
+                                <span ng-bind="(storeInfo.uuid != 'undefind' && commodity.storeid == storeInfo.uuid && storeInfo.storeName.indexOf('优软测试二') < 0 && storeInfo.storeName.indexOf('优软商城') < 0) ? '自营' : '寄售'"  style="text-align: center; width: 100%;"></span>
+                            </div>
+                        </td>
+                        <td class="padding0">
+                            <div ng-if="!commodity.sourceId"><a class="edit" ng-click="editCommodity(commodity)">修改</a></div><!--updateCommodityInfo(commodity, false)-->
+                            <div ng-if="commodity.sourceId"><a style="margin: 0;">来源UAS</a></div>
+                            <div ng-if="!commodity.sourceId"><a ng-click="soldOut(commodity)">下架</a></div>
+                        </td>
+                    </tr>
+                    <tr class="edit-form" ng-if="commodity.edit">
+                        <td class="middle padding0 check-input">
+                            <div>{{$index + 1}}</div>
+                        </td>
+                        <td class="middle"  style="vertical-align: top !important;">
+                            <div class="fl img">
+                                <a><img ng-src="{{commodity.editPic ? commodity.editPic : 'static/img/store/common/default.png'}}"/></a>
+                                <div class="edit-img">
+                                    <a ng-click="commodity.editPic = null" class="delete-img" title="删除" ng-if="commodity.editPic"><i class="fa fa-trash"></i></a>
+                                    <a ng-click="editGoodsPicture(commodity.editPic || 'static/img/store/common/default.png', commodity)" title="修改图片"><img src="static/img/icon/update-img.png" /></a>
+                                </div>
+                            </div>
+                            <div class="fr wid135">
+                                <p>类目: <em ng-bind="commodity.kindNameCn" title="{{commodity.kindNameCn}}"></em></p>
+                                <p>型号: <em ng-bind="commodity.code" title="{{commodity.code}}">LPC1112</em></p>
+                                <p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>
+                            </div>
+                        </td>
+                        <td>
+                            <div>
+                                <span><input type="text" ng-blur="editPackaging(commodity)" placeholder="包装方式" maxlength="10" ng-model="commodity.editPackaging" ng-class="{'error' : commodity.editPackagingInvalid}" class="wid88 form-control"/></span>
+                            </div>
+                            <div>
+                                <span><input type="text" ng-blur="editProduceDateFa(commodity)" placeholder="生产日期" maxlength="11" ng-model="commodity.editProduceDate" ng-class="{'error' : commodity.editProduceDateInvalid}" class="wid88 form-control"/></span>
+                            </div>
+                            <div>
+                                <span>可拆卖:</span>
+                                <span class="switch"><button ng-class="{'active' : commodity.editBreakUp}" ng-click="toggleIsBreadUp(commodity)"></button></span>
+                            </div>
+                        </td>
+                        <td>
+                            <div>
+                                <span>库存: </span>
+                                <span><input type="text" ng-blur="changeReserve(commodity)" ng-class="{'error' : commodity.editReserveInvalid}" placeholder="库存" ng-model="commodity.editReserve" class="wid48 form-control"/></span>
+                            </div>
+                            <div>
+                                <span>起拍: </span>
+                                <span><input type="text" ng-blur="changeMinBuyQty(commodity)" ng-class="{'error' : commodity.editMinBuyQtyInValid}" placeholder="起拍" ng-model="commodity.editMinBuyQty" class="wid48 form-control"/></span>
+                            </div>
+                            <div>
+                                <span>最小包装数: </span>
+                                <span><input type="text" ng-blur="changeMinPackQty(commodity)" ng-class="{'error' : commodity.editMinPackQtyInValid}" placeholder="倍数" ng-model="commodity.editMinPackQty" class="wid48 form-control"/></span>
+                            </div>
+                            <!--<div>-->
+                            <!--<span>-->
+                            <!--<select class="wid85 select-adder form-control" style="width: 81px;">-->
+                            <!--<option value="1">可拆卖</option>-->
+                            <!--<option value="2">不可拆卖</option>-->
+                            <!--</select>-->
+                            <!--</span>-->
+                            <!--</div>-->
+                        </td>
+                        <td>
+                            <div ng-repeat="price in commodity.editPrices">
+                                <span style="margin-right: 0;"><input type="text" ng-disabled="$index == 0" ng-blur="editQty(commodity, $index, false, price.start)" ng-class="{'error' : price.startInValid}" placeholder="数量"  ng-model="price.start" class="wid40 form-control"/></span>
+                                <span>-</span>
+                                <span><input type="text" ng-disabled="$index == commodity.editPrices.length - 1" ng-blur="editQty(commodity, $index, true, price.end)" ng-class="{'error' : price.endInValid}" placeholder="数量" ng-model="price.end" class="wid40 form-control"/></span>
+                            </div>
+                        </td>
+                        <td ng-if="onsale.currency == 'USD'">
+                            <div style="width: 99px;" ng-repeat="price in commodity.editPrices">
+                                    <span ng-if="commodity.currencyName.indexOf('USD') > -1">
+                                        <form name="usdForm">
+                                            <input type="text" name="usd" ng-blur="priceBlur(price, true)" ng-keyup="priceValid(price, true)" ng-class="{'error' : price.usdPriceInvalid}" placeholder="香港交货($)" autocomplete="off" ng-model="price.uSDPrice" ng-model-options="{debounce : 100}" class="wid85 form-control"/>
+                                        </form>
+                                    </span>
+                            </div>
+                        </td>
+                        <td ng-if="onsale.currency == 'RMB'">
+                            <div style="width: 99px;" ng-repeat="price in commodity.editPrices">
+                                    <span ng-if="commodity.currencyName.indexOf('RMB') > -1">
+                                        <form name="rmbForm">
+                                            <input type="text" name="rmb" ng-blur="priceBlur(price, false)" ng-keyup="priceValid(price, false)" ng-class="{'error' : price.rmbPriceInvalid}" placeholder="大陆交货(¥)" autocomplete="off" ng-model="price.rMBPrice" ng-model-options="{debounce : 100}" class="wid85 form-control"/>
+                                        </form>
+                                    </span>
+                                <a class="reduce" ng-disabled="commodity.editPrices.length < 2" ng-click="deleteFragment(commodity, $index)"><i class="fa fa-minus-circle"></i></a>
+                                <a class="add" ng-disabled="commodity.editPrices.length >= 3" ng-click="addFragment(commodity)"><i class="fa fa-plus-circle"></i></a>
+                            </div>
+                        </td>
+                        <td>
+                            <div ng-if="onsale.currency == 'RMB'">
+                                <span>大陆:</span>
+                                <span><input type="text" ng-class="{'error' : commodity.editMinDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, true, false, commodity)" placeholder="大陆最短交期" ng-model="commodity.editMinDelivery" class="wid25 form-control"/></span>
+                                <span>-</span>
+                                <span><input type="text" ng-class="{'error' : commodity.editMaxDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, false, false, commodity)" placeholder="大陆最长交期" ng-model="commodity.editMaxDelivery" class="wid25 form-control"/></span>
+                            </div>
+                            <div ng-if="onsale.currency == 'USD'">
+                                <span>香港:</span>
+                                <span><input type="text" placeholder="香港最短交期" ng-class="{'error' : commodity.editMinDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, true, true, commodity)" ng-model="commodity.editMinDelivery" class="wid25 form-control"/></span>
+                                <span>-</span>
+                                <span><input type="text" placeholder="香港最长交期" ng-class="{'error' : commodity.editMaxDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, false, true, commodity)" ng-model="commodity.editMaxDelivery" class="wid25 form-control"/></span>
+                            </div>
+
+                        </td>
+                        <td>
+                            <div>
+                                    <span>
+                                        <select ng-change="changeSaleMode(commodity)" class="wid68 select-adder form-control" ng-model="commodity.editSelfSale">
+                                            <option value="1">自营</option>
+                                            <option value="2">寄售</option>
+                                        </select>
+                                    </span>
+                            </div>
+                        </td>
+                        <td class="padding0">
+                            <div>
+                                <span><button class="off" ng-click="commodity.edit = false;">取消</button></span>
+                            </div>
+                            <div>
+                                <span><button class="ok" ng-click="updateGoods(commodity, $index)">保存</button></span>
+                            </div>
+                        </td>
+                    </tr>
+                    </tbody>
+                    <tbody ng-if="!currenctGoods || currenctGoods.length <= 0">
+                    <tr style="height: 252px;">
+                        <td colspan="10" style="padding: 74px 0;">
+                            <div style="line-height: 106px;">
+                                <div class="col-xs-2" style="margin-left: 35%;">
+                                    <img src="static/img/all/empty-cart.png">
+                                </div>
+                                <div class="col-xs-4" style="line-height: 124px;">
+                                    <p class="grey f16">暂无在售产品信息</p>
+                                </div>
+                            </div>
+                        </td>
+                    </tr>
+                    </tbody>
+                </table>
+                <div class="record-line text-right" ng-if="currenctGoods.length != 0">显示1-<span ng-bind="goodsAll.size"></span>个,共:<span ng-bind="goodsAll.totalElements" cl style="color: #5078cb;"></span>个</div>
+                <div class="ng-cloak ng-table-pager" style="text-align: right;margin-right: 60px;" ng-if="goodsAll.totalPages>1">
+                    <ul class="pagination ng-table-pagination">
+                        <li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
+                            <a ng-switch-when="prev" ng-click="setPage(page.type, -1)" href="">&laquo;</a>
+                            <a ng-switch-when="first" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+                            <a ng-switch-when="page" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+                            <a ng-switch-when="more" ng-click="setPage(page.type, -1)" href="">&#8230;</a>
+                            <a ng-switch-when="last" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+                            <a ng-switch-when="next" ng-click="setPage(page.type, -1)" href="">&raquo;</a>
+                        </li>
+                    </ul>
+                    <div class="page-go-block">
+                        <input class="page-number" type="text" ng-model="param.currentPage" ng-keydown="listenEnter()"/>
+                        <a class="page-a" ng-click="setPage('page', param.currentPage)" href="">GO</a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<!--下架操作-->
+<div class="com-out-box" ng-if="isSoldOut">
+    <div class="title">
+        <a ng-click="cancleSoldOut()"><i class="fa fa-close fa-lg"></i></a>
+    </div>
+    <div class="content">
+        <p><i class="fa fa-exclamation-circle"></i>确认下架?</p>
+        <div><a ng-click="cancleSoldOut()">取消</a><a ng-click="updateCommodityInfo(soldOutCommodity, true)">确认</a></div>
+    </div>
+</div>
+
+<!--查看大图-->
+<div id="image-box" style="display: none">
+    <div class="x-floating-wrap"></div>
+    <div class="x-floating">
+        <div id="item-content">
+            <div class="x-close-wrap"><a href="javascript:void(0);">×</a></div>
+            <div class="img"><img/></div>
+        </div>
+    </div>
+</div>

+ 743 - 0
src/main/webapp/resources/view/vendor/forstore/erp/vendor_undercarriage_erp.html

@@ -0,0 +1,743 @@
+<!--右侧主体部分-->
+<style>
+    .tab.active {
+        display: inline-block !important;
+    }
+    *{-webkit-box-sizing: border-box;  -moz-box-sizing: border-box;  box-sizing: border-box;}
+    div.wanted_list01 dt.paging-bar>span {
+        float: right;
+        width: 322px;
+        height: 40px;
+        font-weight: normal;
+    }
+    div.wanted_list01 dt.paging-bar>span button.paging-button {
+        padding: 0;
+        height: 40px;
+        line-height: 40px;
+        border: none;
+        background: #FFFFFF;
+    }
+    div.wanted_list01 dt.paging-bar>span button.paging-button:hover {
+        color: #0C3894;
+    }
+    div.wanted_list01 dt.paging-bar>span input.page-num {
+        width: 25px;
+        height: 25px;
+        line-height: 40px;
+        border: 1px #C7BEBE solid;
+        text-align: center;
+    }
+    label[disabled] {
+        cursor: not-allowed;
+    }
+    .com_tab ul li.down-goods span:hover {
+        cursor: pointer;
+        text-decoration: underline;
+    }
+    .materrial-list span.length01{
+        width: 10% !important;
+    }
+    .materrial-list span{
+        width: 20% !important;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    ul.pagination.ng-table-pagination > li > a > span {
+        height: 17px;
+        line-height: 17px;
+    }
+
+    div.ng-table-pager  input.page-number {
+        vertical-align: inherit;
+        display: inline-block;
+        width: 40px;
+        height: 31px;
+        padding: 6px 6px;
+        font-size: 14px;
+        line-height: 1.42857143;
+        color: #9B9792;
+        text-align: center;
+        background-color: #F6F5F4;
+        background-image: none;
+        border: 1px solid #ccc;
+        border-top-left-radius: 4px;
+        border-bottom-left-radius: 4px;
+        box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+        transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+    }
+
+    div.ng-table-pager a.page-a {
+        color: #fff;
+        cursor: pointer;
+        background-color: #4574E8;
+        border-color: #4574E8;
+        padding: 6px 6px;
+        font-size: 14px;
+        border-top-right-radius: 4px;
+        border-bottom-right-radius: 4px;
+        text-decoration: none;
+        height: 31px;
+    }
+
+    div.ng-table-pager div.page-go-block {
+        float: right;
+        margin-left: 20px;
+        margin-top: 15px;
+        font-size: 0px;
+        height: 31px;
+        line-height: 31px;
+    }
+    .filter:hover .hover-show {
+        display: inline-block;
+    }
+    .filter:hover .angle-hover-up {
+        -webkit-transform: rotateZ(180deg);
+        -moz-transform: rotateZ(180deg);
+        -o-transform: rotateZ(180deg);
+        -ms-transform: rotateZ(180deg);
+        transform: rotateZ(180deg);
+    }
+    .filter .hover-show{
+        width: 100%;
+        height: auto;
+        position: absolute;
+        background-color: #fff;
+        margin-top: -1px;
+        border: 1px solid #e8e8e8;
+        border-top: none;
+        display: none;
+        left: 0;
+        top: 40px;
+    }
+    .filter .hover-show a{
+        width: 100%;
+        height: 40px;
+        display: inline-block;
+        line-height: 40px;
+        text-align: center;
+        font-size: 14px;
+        font-weight: normal;
+    }
+    .filter .hover-show a:hover{
+        background: #ecf2fd;
+        color: #5078cb !important;
+    }
+    .wid02 .fr .hidden-ellipsis-110 {
+        width: 110px;
+        overflow: hidden;
+        word-break: normal;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+    }
+    .com-out-box{
+        position: fixed;
+        z-index: 2;
+        height: 152px;
+        opacity: 1;
+        background-color: white;
+        width: 310px;
+        -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+        box-shadow: 0 5px 15px rgba(0,0,0,.5);
+        margin: -155px 0 0 -75px;
+        top: 55%;
+        left: 50%;
+    }
+    .com-out-box .title{
+        height: 30px;
+        background-color: #5078cb;
+        text-align: right;
+        padding-right: 15px;
+        line-height: 30px;
+    }
+    .com-out-box .title a{
+        color: white;
+        font-size: 16px;
+    }
+    .pay_record .ticket_record_list dl dd{
+        position: relative;
+    }
+    .com-out-box .content{
+        width: 100%;
+        text-align: center;
+        margin: 0 auto;
+    }
+    .com-out-box .content p{
+        line-height: 50px;
+        font-size: 14px;
+        padding-top: 10px;
+    }
+    .com-out-box .content p i{
+        color: #5078cb;
+        font-size: 16px;
+        margin-right: 10px;
+    }
+    .com-out-box .content div{
+        width: 100%;
+        text-align: center;
+        margin: 0 auto;
+    }
+    .com-out-box .content div a{
+        width: 55px;
+        height: 26px;
+        line-height: 26px;
+        display: inline-block;
+        text-align: center;
+        font-size: 14px;
+    }
+    .com-out-box .content div a:first-child{
+        background: #b4b5b9;
+        color: #333;
+        margin-right: 10px;
+    }
+    .com-out-box .content div a:last-child{
+        background: #5078cb;
+        color: #fff;
+    }
+    .com-out-box .content div a:hover{
+        background: #3f7ae3;
+        color: #fff;
+    }
+    .com_tab ul li.down-goods {
+        float: right;
+        margin-right: 24px;
+        font-size: 14px;
+        color: #5078cb;
+    }
+
+    .com_tab ul li.down-goods span:hover {
+        cursor: pointer;
+        text-decoration: underline;
+    }
+    .check-input{
+        position: relative;
+    }
+    .check-input .check-show{
+        position: absolute;
+        top: 21px;
+        height: 15px;
+        line-height: 15px;
+        left: 18px;
+    }
+    .pro_management .product_off dd:last-of-type{
+        border-bottom: #cfcfcf 1px solid;
+    }
+    .record-line{
+        height: 30px;
+        font-size: 12px;
+        line-height: 35px;
+        /* margin-top: 5px; */
+        padding-right: 22px
+    }
+    .wanted_list01 .pagination{
+        margin: 15px 0;
+    }
+    .ng-table-pager{
+        padding-bottom: 20px;
+    }
+
+    /*编辑*/
+    .vendor-tab .img{
+        width: 60px;
+        height: 60px;
+        border: #e8e8e8 1px solid;
+        overflow: hidden;
+        line-height: 60px;
+        margin-top: 0;
+        border-radius: 3px;
+        overflow: hidden !important;
+        text-overflow: clip;
+    }
+    .vendor-tab .img img{
+        width: 60px;
+        height: 60px;
+    }
+    .vendor-tab .img a{
+        margin: 0 !important;
+    }
+    .vendor-tab .img
+    .public-tab.table>tbody>tr>td{
+        font-size: 14px !important;
+        text-align: left !important;
+    }
+    .vendor-tab.table td .wid135{
+        width: 115px;
+        margin-left: 7px;
+        position: relative;
+        top: -10px;
+    }
+    .filter a{
+        color: #333 !important;
+    }
+    .vendor-tab.table td .wid135 p{
+        display: block;
+        width: 100%;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    .vendor-tab.table td p{
+        font-size: 14px;
+        text-align: left;
+    }
+    /*.vendor-tab.table>tbody>tr{*/
+    /*height: 252px;*/
+    /*}*/
+    .public-tab.table>tbody>tr>td{
+        /*border-bottom: #cfcfcf 1px dashed;*/
+        /*padding: 74px 0;*/
+    }
+    .public-tab.table tbody.bottom-no tr td{
+        border-bottom: none;
+    }
+    .edit-form .form-control{
+        height: 24px;
+        padding: 0;
+        text-align: center;
+        font-size: 12px;
+        border-radius: 3px;
+    }
+    .edit-form select.form-control{
+        padding-left: 10px;
+    }
+    .edit-form div{
+        text-align: left;
+    }
+    .edit-form td div{
+        float: left;
+        height: 24px;
+        margin-top: 0;
+        line-height: 24px;
+        width: 100%;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+    .edit-form td div span{
+        float: left;
+    }
+    .edit-form td div span:first-child{
+        /*margin-right: 2px;*/
+    }
+    .filter{
+        position: relative;
+    }
+    .edit-form button {
+        width: 56px;
+        height: 24px;
+        border: none;
+        color: #fff;
+        float: left;
+    }
+    .edit-form button.ok {
+        background: #33b401;
+    }
+    .edit-form button.off {
+        background: #f15601;
+        margin-bottom: 5px;
+    }
+    .edit-form button:hover{
+        background: #5078cb;
+    }
+    .public-tab.table>tbody>tr>td.padding0{
+        padding: 8px 0;
+    }
+    .public-tab.table tbody .padding0 div{
+        text-align: center;
+        width: 50px;
+    }
+    .edit-form .reduce{
+        color: #faa002 !important;
+        margin: 0 !important;
+        margin-left: 2px !important;
+    }
+    .edit-form .add{
+        color: #2ea001 !important;
+        margin: 0 !important;
+    }
+    .public-tab.table tr td{
+        vertical-align: top !important;
+    }
+    .public-tab.table tr td.middle{
+        vertical-align: middle !important;
+        padding-left: 0;
+        position: relative;
+    }
+    .record-line{
+        min-height: 30px;
+        font-size: 12px;
+        line-height: 35px;
+    }
+    .text-center{
+        margin-top: 30px;
+    }
+    .text-center .col-xs-2 img{
+        margin-left: 95px;
+    }
+    .text-center .col-xs-4 p{
+        margin-top: 33px;
+        font-size: 14px;
+    }
+    /*查看大图*/
+    .vendor-tab .img{
+        position: relative;
+    }
+    .vendor-tab .img a{
+        width: 60px;
+        height: 60px;
+        display: inline-block;
+    }
+    .vendor-tab .img .hover-show,.vendor-tab .img .edit-img{
+        position: absolute;
+        width: 100%;
+        height: 100%;
+        background: rgba(0,0,0,.5);
+        left: 0;
+        top: 0;
+        font-size: 12px;
+        margin-top: 0;
+    }
+    .vendor-tab .img .hover-show{
+        top: 60px;
+    }
+    .vendor-tab .img:hover .hover-show{
+        top: 0;
+    }
+    .vendor-tab .img .hover-show a, .vendor-tab .img .edit-img a{
+        width: 100%;
+        height: 100%;
+        display: inline-block;
+        text-align: center;
+        line-height: 55px;
+        color: #fff !important;
+    }
+    .vendor-tab .img .hover-show i{
+        margin-right: 3px;
+    }
+    .vendor-tab .img .edit-img{
+
+    }
+    .vendor-tab .img .edit-img a img{
+        width: 38px;
+        height: 38px;
+    }
+    .vendor-tab .middle .prompt{
+        position: absolute;
+        bottom: 4px;
+        left: 0;
+        font-size: 10px;
+        /*color: #999;*/
+    }
+    .vendor-tab .middle .prompt em{
+        color: #ff0000;
+    }
+    .public-tab.table tr td.middle{
+        overflow: inherit;
+    }
+    .vendor-tab.table td .wid135{
+        margin-top: 10px;
+        overflow: inherit;
+    }
+    .public-tab.table tr td.middle .img{
+        margin-top: 6px;
+    }
+    /* 预览框 end */
+    #image-box .x-floating-wrap {
+        position: fixed;
+        z-index: 99998;
+        background: #000;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        opacity: 0.5;
+    }
+    #image-box .x-floating {
+        position: fixed;
+        z-index: 99999;
+        width: 970px;
+        height: 600px;
+        top: 50%;
+        left: 50%;
+        margin-left: -485px;
+        margin-top: -300px;
+        line-height: 560px;
+        text-align: center;
+        vertical-align: middle;
+    }
+    #image-box .x-floating img {
+        margin: auto auto;
+        max-width: 970px !important;
+        max-height: 600px !important;
+        -webkit-user-select: none;
+        -moz-user-select: none;
+        -ms-user-select: none;
+        user-select: none
+    }
+
+    #image-box .x-close-wrap {
+        position: fixed;
+        top: 0;
+        right: 0;
+        z-index: 100000;
+        width: 120px;
+        height: 120px;
+        margin: -60px -60px 0 0;
+        border-radius: 100%;
+        background: #000;
+        opacity: .3
+    }
+
+    #image-box .x-close-wrap a {
+        position: absolute;
+        left: 25px;
+        bottom: 25px;
+        font-size: 42px;
+        color: #fff
+    }
+
+    #image-box .x-close-wrap:hover {
+        opacity: .7
+    }
+
+    .edit-form .error{
+        border: #f00 1px solid !important;
+    }
+
+    .edit-form .error:focus{
+        box-shadow: none;
+    }
+    .public-tab.table>tbody>tr>td div:last-child a.add[disabled], .public-tab.table>tbody>tr>td div:last-child a.reduce[disabled]{
+        color: #c7c7c7 !important;
+    }
+    .text-left{
+        text-align: left !important;
+    }
+    .wid100{
+        width: 100%;
+        display: inline-block;
+        text-align: center;
+    }
+    .wanted_list01 .tab table tr.tr-bg:hover{
+        background: #c7ebfd;
+    }
+    div.ng-table-pager div.page-go-block{
+        margin-top: 15px !important;
+    }
+    .text-more-80{
+        float: left;
+    }
+    .text-more-80 span:first-child{
+        float: left;
+    }
+    .text-more-80 span.text-more{
+        width: 50px;
+    }
+</style>
+<div class="user_right fr">
+    <!--货品管理-->
+    <div class="pro_management device">
+        <div class="com_tab">
+            <ul class="fl" style="width: 100%">
+                <li ng-class="{'active': tab == 'vendor_material'}"><a ui-sref="vendor_material_erp">可上架产品</a></li>
+                <li ng-class="{'active': tab == 'unstandard_material'}"><a ui-sref="vendor_material_unstandard_erp">暂不可上架产品</a></li>
+                <li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale_erp">已上架</a></li>
+                <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage_erp">上下架历史</a></li>
+            </ul>
+        </div>
+        <div class="search-check">
+            <div class="search fl">
+                <input type="text" class="form-control" ng-model="keyword" ng-search="onSearch()" placeholder="类目/品牌/型号"/>
+                <button ng-click="onSearch()">搜索</button>
+                <a ng-click="downGoods()" class="down-goods-btn">批量导出</a>
+                <form style="display: none;" id="down-load-goods" method="get">
+                    <input type="hidden" name="ids" ng-value="localInfo.ids">
+                </form>
+            </div>
+<!--            <div class="check fr">
+                <a  ng-click="">批量操作</a>
+                <span class="check-btn">
+                    <label class="check-active">
+                        <input type="checkbox" id="AllChoose"/>
+                        <label for="AllChoose"></label>
+                        <span>全选</span>
+                    </label>
+                    <a href="#">上架</a>
+                    <a href="#">取消</a>
+                    <a href="#">确定</a>
+                </span>
+            </div>-->
+        </div>
+        <!--<div class="search-check">
+            <a ng-click="" class="down-goods-btn">批量操作</a>
+        </div>-->
+        <!--搜索 批量操作-->
+        <!-- <div class="search-check">
+             <div class="search fl">
+                 <input type="text" class="form-control" placeholder="型号/品牌"/>
+                 <button>搜索产品</button>
+                 <a ng-click="">批量导出</a>
+             </div>
+             <div class="check fr">
+                 <a  ng-click="">批量操作</a>
+                 <span class="check-btn">
+                     <label class="check-active">
+                         <input type="checkbox" id="AllChoose"/>
+                         <label for="AllChoose"></label>
+                         <span>全选</span>
+                     </label>
+                     <a href="#">上架</a>
+                     <a href="#">取消</a>
+                     <a href="#">确定</a>
+                 </span>
+             </div>
+         </div>-->
+        <div class="wanted_list01">
+            <!--在售产品-->
+            <div class="tab">
+                <table class="vendor-tab public-tab table">
+                    <thead>
+                    <tr>
+                        <th width="45" style="padding:8px 0;">序号</th>
+                        <th>产品信息</th>
+                        <th width="100">&nbsp;</th>
+                        <th width="130">&nbsp;</th>
+                        <th width="110" class="text-left">生产日期</th>
+                        <th width="70">梯度</th>
+                        <th width="120">单价</th>
+                        <th width="130">上/下架时间</th>
+                        <th width="50">状态</th>
+                        <th width="80">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody class="bottom-no">
+                    <tr style="height: 14px;">
+                        <td colspan="10" class="hei16"></td>
+                    </tr>
+                    </tbody>
+                    <tbody>
+                    <tr class="edit-form tr-bg" ng-repeat="commodity in currenctGoods">
+                        <td class="middle padding0 check-input">
+                            <!-- <span><input type="checkbox" id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>-->
+                            <div>{{$index + 1}}</div>
+                        </td>
+                        <td class="middle"  style="vertical-align: top !important;">
+                            <div class="fl img">
+                                <a><img ng-src="{{commodity.img ? commodity.img : 'static/img/store/common/default.png'}}"/></a>
+                                <!-- <div class="hover-show">
+                                     <a ng-click="showImg(commodity.img || 'static/img/store/common/default.png')" title="查看大图"><i class="fa fa-search"></i>查看</a>
+                                 </div>-->
+                            </div>
+                            <div class="fr wid135">
+                                <p>类目: <em ng-bind="commodity.kindNameCn" title="{{commodity.kindNameCn}}"></em></p>
+                                <p>型号: <em ng-bind="commodity.code" title="{{commodity.code}}"></em></p>
+                                <p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}"></em></p>
+                            </div>
+                        </td>
+                        <td style="padding: 8px 0">
+                            <div class="text-more-80">
+                                <span>包装:</span>
+                                <span ng-bind="commodity.packaging" class="text-more" title="{{commodity.packaging}}"></span>
+                            </div>
+                            <div class="text-more-80">
+                                <span>单位:</span>
+                                <span class="text-more" ng-bind="commodity.unit || 'PCS'">PCS</span>
+                            </div>
+                            <div class="text-more-80">
+                                <span>封装:<em ng-bind="commodity.encapsulation || '-'" class="text-more fr" style="width: 60px;" title="{{commodity.encapsulation}}"></em></span>
+                            </div>
+                        </td>
+                        <td>
+                            <div class="text-more-80">
+                                <span>起订量:</span>
+                                <span ng-bind="commodity.minBuyQty" title="{{commodity.minBuyQty}}" class="text-more"></span>
+                            </div>
+                            <div class="text-more-80">
+                                <span>最小包装数:</span>
+                                <span ng-bind="commodity.minPackQty" title="{{commodity.minPackQty}}" class="text-more" style="width: 40px;"></span>
+                            </div>
+                            <div>
+                                <span ng-bind="((storeInfo.uuid != 'undefind')&&(commodity.storeid == storeInfo.uuid)&&(storeInfo.storeName.indexOf('优软测试二') < 0)&&(storeInfo.storeName.indexOf('优软商城') < 0)) ? '自营' : '寄售'">自营</span>
+                            </div>
+                        </td>
+                        <td>
+                            <div>
+                                <span ng-bind="commodity.produceDate" title="{{commodity.produceDate}}"></span>
+                            </div>
+                            <div>
+                                交期 :
+                                <em ng-if="commodity.b2cMinDelivery == commodity.b2cMaxDelivery" ng-bind="commodity.b2cMinDelivery"></em>
+                                <em ng-if="commodity.b2cMinDelivery != commodity.b2cMaxDelivery" ng-bind="commodity.b2cMinDelivery + '-' + commodity.b2cMaxDelivery"></em>
+                                <!--<em ng-bind="commodity.b2cMinDelivery+ '-' + commodity.b2cMaxDelivery"></em>-->
+                            </div>
+                            <div ng-bind="commodity.breakUp ? '可拆卖' : '不可拆卖'"></div>
+                        </td>
+                        <td>
+                            <div ng-repeat="price in commodity.prices">
+                                <span ng-bind="price.start + '+'" class="text-more" style="width: 54px;" title="{{price.start}}"></span>
+                            </div>
+                        </td>
+                        <td>
+                            <div ng-repeat="price in commodity.prices">
+                                <span ng-if="$$upAndDown.currency == 'RMB'" style="margin-left: 20px;" ng-bind="price.rMBPrice | formateNumber : 6 | currencySysmbol : $$upAndDown.currency">0.52</span>
+                                <span ng-if="$$upAndDown.currency == 'USD'" style="margin-left: 20px;" ng-bind="price.uSDPrice | formateNumber : 6 | currencySysmbol : $$upAndDown.currency">0.52</span>
+                            </div>
+                        </td>
+                        <td>
+                            <div>
+                                <span class="wid100 text-more" ng-bind="commodity.operateDate | date: 'yyyy-MM-dd HH:mm:ss'" style="width:100px" title="{{commodity.operateDate | date: 'yyyy-MM-dd HH:mm:ss'}}"></span>
+                            </div>
+                        </td>
+                        <td>
+                            <div>
+                                <span class="wid100" ng-bind="commodity.operateType == '发布商品' ? '上架':'下架'"></span>
+                            </div>
+                        </td>
+                        <td>
+                            <div>
+                                <span class="wid100" ng-bind="commodity.operater.userName"></span>
+                            </div>
+                        </td>
+                    </tr>
+                    </tbody>
+                   <!-- <tbody>
+                    <tr style="height: 252px;" ng-if="!currenctGoods || currenctGoods.length <= 0">
+                        <td colspan="10" style="padding: 74px 0;">
+                            <div style="line-height: 106px;">
+                                <div class="col-xs-2" style="margin-left: 35%;">
+                                    <img src="static/img/all/empty-cart.png">
+                                </div>
+                                <div class="col-xs-4" style="line-height: 124px;">
+                                    <p class="grey f16">暂无下架产品信息</p>
+                                </div>
+                            </div>
+                        </td>
+                    </tr>
+                    </tbody>-->
+                    <tbody class="no-record-list" ng-if="!currenctGoods || currenctGoods.length <= 0">
+                        <tr class="height200">
+                            <td colspan="10"><img src="static/img/all/empty-cart.png"><span>暂无下架产品信息!</span></td>
+                        </tr>
+                    </tbody>
+                </table>
+                <div class="record-line text-right" ng-if="currenctGoods.length != 0">显示<span ng-bind="goodsAll.start"></span>-<span ng-bind="goodsAll.numberOfElements"></span>个,共:<span ng-bind="goodsAll.totalElements" cl style="color: #5078cb;"></span>个</div>
+                <div class="ng-cloak ng-table-pager" style="text-align: right;margin-right: 60px;" ng-if="goodsAll.totalPages>1">
+                    <ul class="pagination ng-table-pagination">
+                        <li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
+                            <a ng-switch-when="prev" ng-click="setPage(page.type, -1)" href="">&laquo;</a>
+                            <a ng-switch-when="first" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+                            <a ng-switch-when="page" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+                            <a ng-switch-when="more" ng-click="setPage(page.type, -1)" href="">&#8230;</a>
+                            <a ng-switch-when="last" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+                            <a ng-switch-when="next" ng-click="setPage(page.type, -1)" href="">&raquo;</a>
+                        </li>
+                    </ul>
+                    <div class="page-go-block">
+                        <input class="page-number" type="text" ng-model="param.currentPage" ng-keydown="listenEnter()"/>
+                        <a class="page-a" ng-click="setPage('page', param.currentPage)" href="">GO</a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>