Browse Source

Merge branch 'feature-201839-wangcz' into release-201839-wangcz

# Conflicts:
#	src/main/java/com/uas/platform/b2c/prod/commodity/controller/GoodsController.java
#	src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java
wangcz 7 years ago
parent
commit
e9b1df6d6f
26 changed files with 555 additions and 365 deletions
  1. 1 1
      src/main/java/com/uas/platform/b2c/common/base/service/impl/MinioClientImpl.java
  2. 11 0
      src/main/java/com/uas/platform/b2c/core/config/SysConf.java
  3. 10 0
      src/main/java/com/uas/platform/b2c/prod/commodity/constant/DoubleConstant.java
  4. 10 0
      src/main/java/com/uas/platform/b2c/prod/commodity/constant/ShortConstant.java
  5. 11 0
      src/main/java/com/uas/platform/b2c/prod/commodity/controller/ProductController.java
  6. 2 2
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductPersonDao.java
  7. 8 8
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/ReleaseProductByBatchDao.java
  8. 11 0
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/V_ProductPrivateDao.java
  9. 41 0
      src/main/java/com/uas/platform/b2c/prod/commodity/model/Goods.java
  10. 37 0
      src/main/java/com/uas/platform/b2c/prod/commodity/service/ProductService.java
  11. 6 4
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java
  12. 90 54
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java
  13. 3 9
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java
  14. 8 0
      src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreApplyFacadeImpl.java
  15. 51 17
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseProductServiceImpl.java
  16. 3 0
      src/main/resources/dev/sys.properties
  17. 3 0
      src/main/resources/prod/sys.properties
  18. 3 0
      src/main/resources/test/sys.properties
  19. 3 0
      src/main/resources/txcloud/sys.properties
  20. 2 2
      src/main/webapp/WEB-INF/views/normal/adminWithNav.html
  21. 1 1
      src/main/webapp/resources/js/common/query/material.js
  22. 94 114
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_materialCtrl.js
  23. 81 121
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js
  24. 1 1
      src/main/webapp/resources/view/admin/product/productManage.html
  25. 31 15
      src/main/webapp/resources/view/usercenter/forstore/buyer_material.html
  26. 33 16
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html

+ 1 - 1
src/main/java/com/uas/platform/b2c/common/base/service/impl/MinioClientImpl.java

@@ -38,7 +38,7 @@ public class MinioClientImpl {
      * @throws Exception Exception
      */
     public String upload(InputStream inputStream, int size, String name) throws Exception {
-        String extension = name.lastIndexOf(".") == -1 ? "" : name.substring(name.lastIndexOf(".") + 1);
+        String extension = name.lastIndexOf(".") == -1 ? "" : name.substring(name.lastIndexOf(".") + 1).toLowerCase();
         JSONObject mime = FastjsonUtils.parseObject(COMMON_MIME);
         String contentType = DEFAULT_MIME;
         String objectName = UUID.randomUUID().toString();

+ 11 - 0
src/main/java/com/uas/platform/b2c/core/config/SysConf.java

@@ -188,6 +188,9 @@ public class SysConf {
 	@Value(("#{sys.productServiceIp}"))
 	private String productServiceIp;
 
+	@Value(("#{sys.lastCheckUserUU}"))
+	private Long lastCheckUserUU;
+
 	public Boolean getRebuildIndexesOnRefresh() {
 		return rebuildIndexesOnRefresh;
 	}
@@ -417,4 +420,12 @@ public class SysConf {
 		this.productServiceIp = productServiceIp;
 		return this;
 	}
+
+	public Long getLastCheckUserUU() {
+		return lastCheckUserUU;
+	}
+
+	public void setLastCheckUserUU(Long lastCheckUserUU) {
+		this.lastCheckUserUU = lastCheckUserUU;
+	}
 }

+ 10 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/constant/DoubleConstant.java

@@ -46,4 +46,14 @@ public class DoubleConstant {
      * 最大的浮动率 值
      */
     public static final Double maxFluctuateRate = 2d;
+
+    /**
+     * 默认最小购买量
+     */
+    public static final Double defaultMinBuyQty = 1D;
+
+    /**
+     * 默认最小包装量
+     */
+    public static final Double defaultMinPackQty = 1D;
 }

+ 10 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/constant/ShortConstant.java

@@ -16,4 +16,14 @@ public class ShortConstant {
      * 最短交期
      */
     public static final Short minDelivery = 1;
+
+    /**
+     * 默认最短交期
+     */
+    public static final Short defaultMinDelivery = 1;
+
+    /**
+     * 默认最长交期
+     */
+    public static final Short defaultMaxDelivery = 10;
 }

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

@@ -309,6 +309,17 @@ public class ProductController {
 		 return productService.deleteBatch(ProductConstant.NSTANDARD, isPerson);
 	}
 
+	/**
+	 * 批量删除所有的非标的产品
+	 * @param isPerson 是否是个人
+	 * @return ResultMap
+	 */
+	@RequestMapping(value = "/all", method = RequestMethod.DELETE)
+	public ResultMap deleteUnstandardByBatch(Integer isPerson, String type) {
+		logger.info("删除非标物料信息:操作人:" + SystemSession.getUser().getUserName());
+		return productService.deleteBatch(type, isPerson);
+	}
+
 
 	/**
 	 * 批量删除所有的标准的产品

+ 2 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductPersonDao.java

@@ -66,8 +66,8 @@ public interface ProductPersonDao extends JpaRepository<ProductPerson, Long>, Jp
      * @param userUU
      * @return
      */
-    @Query("select p.productId from ProductPerson p where p.enuu = :enuu and p.userUU = :userUU")
-    List<Long> findIdByEnuuAndUserUU(@Param("enuu") Long enuu, @Param("userUU") Long userUU);
+    @Query("select p.productId from ProductPerson p where p.enuu = :enuu and p.userUU = :userUU and p.productId in (:ids)")
+    List<Long> findIdByEnuuAndUserUUAndIds(@Param("enuu") Long enuu, @Param("userUU") Long userUU, @Param("ids") List<Long> ids);
 
     /**
      * 根据userUU查找物料信息

+ 8 - 8
src/main/java/com/uas/platform/b2c/prod/commodity/dao/ReleaseProductByBatchDao.java

@@ -104,14 +104,6 @@ public interface ReleaseProductByBatchDao
     @Procedure(procedureName = "RELEASE_TO_GOODS_V4", outputParameterName = "v_num")
     Integer publishReleaseProductToGoods(Long enuu, String enName, String batch);
 
-	/**
-	 * 批量上架验证数据信息是否重复
-	 * @param batch 本批次代码
-	 * @param enuu 公司enuu
-	 */
-	@Procedure(procedureName = "PRODUCT_RELEASE_EXIST_VALID_V4")
-	void callReleaseExistValidProcedure(String batch, Long enuu);
-
 	/**
 	 * 验证器件和品牌的信息pcb
 	 * @param publisherUu
@@ -120,6 +112,14 @@ public interface ReleaseProductByBatchDao
 	@Procedure(procedureName = "PRODUCT_RELEASE_VALID_V2_PCB")
 	void callValidProcedurePcb(Long publisherUu, String batchid);
 
+	/**
+	 * 批量上架验证数据信息是否重复
+	 * @param batch 本批次代码
+	 * @param enuu 公司enuu
+	 */
+	@Procedure(procedureName = "PRODUCT_RELEASE_EXIST_VALID_V4")
+	void callReleaseExistValidProcedure(String batch, Long enuu);
+
     /**
      * 创建时间 :2017年1月6日 下午8:25:57
      *

+ 11 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/dao/V_ProductPrivateDao.java

@@ -83,4 +83,15 @@ public interface V_ProductPrivateDao extends JpaRepository<V_ProductPrivate, Lon
      */
     @Query(value = "select p.id from V_ProductPrivate p where p.standard = :standard and p.enUU = :enUU and coalesce(p.b2cEnabled, 1) = 1 and coalesce(p.pcmpcode, '') <> '' and coalesce(p.pbranden, '') <> '' ")
     List<Long> findPridsByEnUUAndStandard(@Param("standard") Integer standard, @Param("enUU") Long enUU);
+
+
+
+    /**
+     * 根据enuu查询所有的prids
+     *
+     * @param enUU     企业的enuu
+     * @return list
+     */
+    @Query(value = "select p.id from V_ProductPrivate p where p.enUU = :enUU and coalesce(p.b2cEnabled, 1) = 1 and coalesce(p.pcmpcode, '') <> '' and coalesce(p.pbranden, '') <> '' ")
+    List<Long> findPridsByEnUU(@Param("enUU") Long enUU);
 }

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

@@ -560,6 +560,9 @@ public class Goods implements Serializable {
 	@Column(name = "go_spec", length = 4000)
 	private String spec;
 
+    /**
+     * 自动上架
+     */
 	@Column(name = "go_autopublish", columnDefinition = "TINYINT(1)")
 	private Boolean autoPublish;
 
@@ -590,6 +593,12 @@ public class Goods implements Serializable {
 	@Transient
     private String priceStr = "";
 
+    /**
+     * 已存在库存状态
+     */
+	@Transient
+    private Integer oldStatus;
+
 	public Double getSaleQty() {
 		return saleQty;
 	}
@@ -1478,6 +1487,30 @@ public class Goods implements Serializable {
 	
 	}
 
+    /**
+     * 根据包装,是否可拆卖,自动上架等状态设置goods信息
+     *
+     * @param packaging 包装
+     * @param breakUp 是否可拆卖
+     * @param autoPublish 自动上架
+     * @param minDelivery 最小交期
+     * @param maxDelivery 最大交期
+     * @param minPackQty 最小包装量
+     * @param minBuyQty 最小起订量
+     * @param status 状态
+     */
+	public Goods(String packaging, Boolean breakUp, Boolean autoPublish, Short maxDelivery,
+                 Short minDelivery, Double minBuyQty, Double minPackQty, Integer status) {
+        this.packaging = packaging;
+        this.breakUp = breakUp;
+        this.autoPublish = autoPublish;
+        this.maxDelivery = maxDelivery;
+        this.minDelivery = minDelivery;
+        this.minBuyQty = minBuyQty;
+        this.minPackQty = minPackQty;
+        this.status = status;
+	}
+
 	public Goods(GoodsHistory history) {
 		this.uuid = history.getUuid();
 		this.code = history.getCode();
@@ -1611,6 +1644,14 @@ public class Goods implements Serializable {
         this.priceStr = priceStr;
     }
 
+    public Integer getOldStatus() {
+        return oldStatus;
+    }
+
+    public void setOldStatus(Integer oldStatus) {
+        this.oldStatus = oldStatus;
+    }
+
     /**
 	 * 获取最大交期
 	 * @return

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

@@ -1,8 +1,10 @@
 package com.uas.platform.b2c.prod.commodity.service;
 
 import com.alibaba.fastjson.JSONObject;
+import com.uas.platform.b2c.prod.commodity.model.CommodityInOutbound;
 import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.commodity.model.GoodsFilter;
+import com.uas.platform.b2c.prod.commodity.model.GoodsHistory;
 import com.uas.platform.b2c.prod.commodity.model.InOutboundDetail;
 import com.uas.platform.b2c.prod.commodity.model.Product;
 import com.uas.platform.b2c.prod.commodity.model.ProductDetail;
@@ -452,4 +454,39 @@ public interface ProductService {
      * @return V_ProductPrivate
      */
     List<V_ProductPrivate> findProductAndGoodsByIds(List<Long> idList);
+
+    /**
+     * 设置库存上下架历史
+     *
+     * @param goods 库存
+     * @return  GoodsHistory
+     */
+    GoodsHistory assignmentGoodsHistory(Goods goods);
+
+    /**
+     * 记录出入库信息
+     * 如果新填写的库存数大于原库存数,做入库。否则做出库。
+     *
+     * @param product 前台传入的物料数据
+     * @param existProduct 数据库存在的物料信息
+     * @return CommodityInOutbound
+     */
+    CommodityInOutbound recordInventory(Product product, V_ProductPrivate existProduct);
+
+    /**
+     * 绑定物料信息到goods信息
+     *
+     * @param goods 库存
+     * @param productInfo 物料信息
+     * @return Goods
+     */
+    Goods bindProductToGoods(Goods goods, Product productInfo);
+
+    /**
+     * 设置goods的价格信息
+     *
+     * @param goods Goods
+     * @return Goods
+     */
+    Goods checkPrice(Goods goods);
 }

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

@@ -2221,7 +2221,7 @@ public class GoodsServiceImpl implements GoodsService {
             return null;
         }
         // pageInfo.expression(PredicateUtils.or(new SimpleExpression[]{PredicateUtils.eq("status", 601, true), PredicateUtils.eq("status", 602, true)}));
-        pageInfo.expression(PredicateUtils.eq("status", 601, true));
+        pageInfo.expression(PredicateUtils.in("status", new Integer[]{601, 602, 613}, true));
         pageInfo.sorting(Sort.Direction.DESC, "updateDate");
         pageInfo.expression(PredicateUtils.eq("storeid", storeid, false));
         if (StringUtils.hasText(kindUuid)) {
@@ -2466,7 +2466,7 @@ public class GoodsServiceImpl implements GoodsService {
         if (goods == null) {
             return new ResultMap(CodeType.NOT_EXiST.code(), "对应的批次号" + batchCode + "不存在,请刷新界面再操作");
         }
-        if (Status.AVAILABLE.value() != goods.getStatus() && Status.UNAVAILABLE.value() != goods.getStatus()) {
+        if (Status.AVAILABLE.value() != goods.getStatus() && Status.UNAVAILABLE.value() != goods.getStatus() && Status.NO_SHELVE.value() != goods.getStatus()) {
             return new ResultMap(CodeType.NOT_EXiST.code(), "对应的批次号" + batchCode + "未上架,不要下架");
         }
 //        if (!goods.getEnUU().equals(enUU)) {
@@ -3757,6 +3757,7 @@ public class GoodsServiceImpl implements GoodsService {
                 if (Status.AVAILABLE.value() == goodsFilter.getSaleStatus()) {
                     statusSet.add(Status.AVAILABLE.value());
                     statusSet.add(Status.UNAVAILABLE.value());
+                    statusSet.add(Status.NO_SHELVE.value());
                 } else {
                     statusSet.add(goodsFilter.getSaleStatus());
                 }
@@ -3851,7 +3852,7 @@ public class GoodsServiceImpl implements GoodsService {
                 goods.adjustFragmentPrice();
                 Integer status = goods.getStatus();
                 goods.setStatus();
-                if ((Status.AVAILABLE.value() == goods.getStatus()) || (Status.UNAVAILABLE.value() == goods.getStatus()) && (Status.NO_SHELVE.value() == status) || (Status.REMOVED.value() == status)) {
+                if ((Status.AVAILABLE.value() == goods.getStatus()) || (Status.UNAVAILABLE.value() == goods.getStatus() || Status.NO_SHELVE.value() == goods.getStatus()) && (Status.REMOVED.value() == status)) {
                     //如果现在是已上架,原先是未上架或者已下架,则做上架处理。否则做更新处理
                     list.add(goodsHistoryService.converTGoodsHist(goods, GoodsHistory.OperateType.Publish.getPhrase(), false));
                 } else {
@@ -4145,6 +4146,7 @@ public class GoodsServiceImpl implements GoodsService {
      */
     @Override
     public com.uas.sso.support.Page<KindHierarchicalCount> getKindProductsCount(Pageable pageable, Date startTime, Date endTime) {
+        System.out.println();
         // 查询一段时间内类目数量,按类目分组查询统计数量
         StringBuffer sql = new StringBuffer("select pr_kind as thirdKind, pr_kindid as kindId, count(1) as count from products where pr_kind is not null ");
 
@@ -4163,7 +4165,7 @@ public class GoodsServiceImpl implements GoodsService {
 
         // 分页参数
         Integer offset = (pageable.getPageNumber() - 1) * pageable.getPageSize();
-        sql.append(" limit ? offset ?");
+        sql.append(" order by count desc limit ? offset ?");
         List<KindHierarchicalCount> kindList = commonDao.query(sql.toString(), KindHierarchicalCount.class, pageable.getPageSize(), offset);
 
         // 根据父级类目id一层层判断是否存在

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

@@ -309,7 +309,7 @@ public class ProductServiceImpl implements ProductService {
         List<ProductDetail> productDetails = productDetailDao.findByProductIds(idList);
         userUU = SystemSession.getUser().getUserUU();
         List<ProductAttachSubmit> productAttachSubmits = productAttachService.findByProductidsAndStatus(idList, Status.UNAUDIT.value());
-        List<Long> productIds = productPersonDao.findIdByEnuuAndUserUU(enUU, userUU);
+        List<Long> productIds = productPersonDao.findIdByEnuuAndUserUUAndIds(enUU, userUU, idList);
         List<Goods> goodsList = goodsService.findByProductids(idList);
         for (V_ProductPrivate product : productList) {
             // 设置ERP信息
@@ -471,7 +471,7 @@ public class ProductServiceImpl implements ProductService {
         //查找物料信息
         User user = SystemSession.getUser();
         if (IntegerConstant.YES_SHORT.equals(isAll)) {
-            prIds = productDao.findPridsByEnuuAndStardand(user.getEnterprise().getUu(), isStardand);
+            prIds = v_productPrivateDao.findPridsByEnUU(user.getEnterprise().getUu());
         }
 
         //筛选已经存在个人物料库的信息
@@ -618,7 +618,6 @@ public class ProductServiceImpl implements ProductService {
             return ResultMap.success("删除成功");
         } else {
             String message = "";
-            List<Goods> goodsList = goodsDao.findByProductIds(ids);
             String codes = OrderStatus.UNAVAILABLE.getCodes() + "-" + Status.TOBECONFIRMED.value();
             List<OrderDetail> orderDetailList = orderDetailService.findOrderDetailByProductids(ids);
             for (OrderDetail detail : orderDetailList) {
@@ -693,13 +692,21 @@ public class ProductServiceImpl implements ProductService {
             ResultMap resultMap = deletePersonalProductByBatch(type);
             return resultMap;
         }
-        Integer standard = ProductConstant.STANDARD.equals(type) ? IntegerConstant.YES_SHORT : IntegerConstant.NO_SHORT;
+        Long uu = SystemSession.getUser().getEnterprise().getUu();
+        List<Long> products = null;
+        if (ProductConstant.ALL.equals(type)) {
+            products = v_productPrivateDao.findPridsByEnUU(uu);
+        } else {
+            Integer standard =  ProductConstant.STANDARD.equals(type)? IntegerConstant.YES_SHORT : IntegerConstant.NO_SHORT;
+            products = v_productPrivateDao.findPridsByEnUUAndStandard(standard, uu);
+        }
+        if (CollectionUtils.isEmpty(products)) {
+            return new ResultMap(CodeType.OK, "沒有需要刪除的数据");
+        }
         List<ProductPerson> personList;
         Integer fail = 0;
         Integer success = 0;
         Integer isHave = 0;
-        Long uu = SystemSession.getUser().getEnterprise().getUu();
-        List<Long> products = v_productPrivateDao.findPridsByEnUUAndStandard(standard, uu);
         for (Long prid : products) {
             try {
                 personList = productPersonDao.findByProductId(prid);
@@ -2557,7 +2564,14 @@ public class ProductServiceImpl implements ProductService {
         }
 
         // 设置库存信息
-        assignmentGoods(goods, productInfo);
+        goods = bindProductToGoods(goods, productInfo);
+        goods = checkPrice(goods);
+        goodsService.setGoodsDefault(goods);
+        GoodsHistory goodsHistory = assignmentGoodsHistory(goods);
+        goodsHistory = goodsHistoryService.save(goodsHistory);
+        LOGGER.log("库存操作", "单个物料上传更新库存操作", "操作方式-> " + goodsHistory.getOperateType(), goodsHistory.getCode(), goodsHistory.getId());
+        goods = goodsDao.save(goods);
+        LOGGER.log("上架商品", "新增上架商品", "通过卖家中心单个物料上传新增上架商品", goods.getCode(), goods.getId());
         // 保存到商城私有库
         addToPrivate(productInfo, product);
         if (needAddInventory) {
@@ -2576,6 +2590,51 @@ public class ProductServiceImpl implements ProductService {
         return ResultMap.success();
     }
 
+    /**
+     * 设置goods的价格信息
+     *
+     * @param goods Goods
+     * @return Goods
+     */
+    @Override
+    public Goods checkPrice(Goods goods) {
+        final Double minBuyQty = goods.getMinBuyQty();
+        // 判断前端传入的分段价格是默认的值还是填写错误
+        List<GoodsQtyPrice> qtyPrices = goods.getOriginalPrices();
+        int size = qtyPrices.size();
+        if (size == 1) {
+            GoodsQtyPrice qtyPrice = goods.getOriginalPrices().get(0);
+            // 前端设置的默认值,不用保存
+            if (null == qtyPrice.getUSDPrice() && null == qtyPrice.getRMBPrice()) {
+                goods.setQtyPrice("");
+            }
+        } else if (size > 1) {
+            StringBuffer errMsg = new StringBuffer();
+            for (int i = 0; i < size; i++) {
+                if (null == qtyPrices.get(i).getRMBPrice() && null == qtyPrices.get(i).getUSDPrice()) {
+                    jointErrMsg(errMsg, String.valueOf(i + 1));
+                }
+            }
+            if (!StringUtils.isEmpty(errMsg.toString())) {
+                throw new IllegalOperatorException("第 " + errMsg.toString() + " 行价格未填写");
+            }
+        }
+        if (!StringUtils.isEmpty(qtyPrices)) {
+            if (CollectionUtils.isNotEmpty(goods.getOriginalPrices())) {
+                qtyPrices.forEach(qtyPrice -> {
+                    // 分段数量不能超过最大数量
+                    Double endQty = NumberUtil.compare(qtyPrice.getEnd(), DoubleConstant.maxReserve) == 1 ? DoubleConstant.maxReserve : qtyPrice.getEnd();
+                    qtyPrice.setEnd(endQty);
+                });
+
+                // 起始数量不能大于最小订购数
+                Double startQty = NumberUtil.compare(minBuyQty, qtyPrices.get(0).getStart()) == 1 ? qtyPrices.get(0).getStart() : minBuyQty;
+                qtyPrices.get(0).setStart(startQty);
+            }
+        }
+        return goods;
+    }
+
     /**
      * 物料信息赋值
      *
@@ -2747,7 +2806,8 @@ public class ProductServiceImpl implements ProductService {
      * @param product 前台传入的物料数据
      * @param existProduct 数据库存在的物料信息
      */
-    private CommodityInOutbound recordInventory(Product product, V_ProductPrivate existProduct) {
+    @Override
+    public CommodityInOutbound recordInventory(Product product, V_ProductPrivate existProduct) {
         // 入库
         String type;
         CommodityInOutbound inOutbound;
@@ -2858,69 +2918,48 @@ public class ProductServiceImpl implements ProductService {
     }
 
     /**
-     * 设置库存信息
+     * 绑定物料信息到goods信息
      *
      * @param goods 库存
      * @param productInfo 物料信息
+     * @return Goods
      */
-    private void assignmentGoods(Goods goods, Product productInfo) {
-        GoodsHistory goodsHistory;
+    @Override
+    public Goods bindProductToGoods(Goods goods, Product productInfo) {
         goods = Goods.productConvertGoods(goods, productInfo);
-        Integer status = null;
         if (productInfo.getId() != null) {
             List<Goods> goodsList = goodsDao.findByProductId(productInfo.getId());
             if (CollectionUtils.isNotEmpty(goodsList)) {
                 goods.setId(goodsList.get(0).getId());
                 goods.setProductid(productInfo.getId());
-                status = goodsList.get(0).getStatus();
-            }
-        }
-        final Double minBuyQty = goods.getMinBuyQty();
-        // 判断前端传入的分段价格是默认的值还是填写错误
-        List<GoodsQtyPrice> qtyPrices = goods.getOriginalPrices();
-        int size = qtyPrices.size();
-        if (size == 1) {
-            GoodsQtyPrice qtyPrice = goods.getOriginalPrices().get(0);
-            // 前端设置的默认值,不用保存
-            if (null == qtyPrice.getUSDPrice() && null == qtyPrice.getRMBPrice()) {
-                goods.setQtyPrice("");
-            }
-        } else if (size > 1) {
-            StringBuffer errMsg = new StringBuffer();
-            for (int i = 0; i < size; i++) {
-                if (null == qtyPrices.get(i).getRMBPrice() && null == qtyPrices.get(i).getUSDPrice()) {
-                    jointErrMsg(errMsg, String.valueOf(i + 1));
-                }
-            }
-            if (!StringUtils.isEmpty(errMsg.toString())) {
-                throw new IllegalOperatorException("第 " + errMsg.toString() + " 行价格未填写");
+                goods.setOldStatus(goodsList.get(0).getStatus());
             }
         }
-        if (!StringUtils.isEmpty(qtyPrices)) {
-            if (CollectionUtils.isNotEmpty(goods.getOriginalPrices())) {
-                qtyPrices.forEach(qtyPrice -> {
-                    // 分段数量不能超过最大数量
-                    Double endQty = NumberUtil.compare(qtyPrice.getEnd(), DoubleConstant.maxReserve) == 1 ? DoubleConstant.maxReserve : qtyPrice.getEnd();
-                    qtyPrice.setEnd(endQty);
-                });
+        return goods;
+    }
 
-                // 起始数量不能大于最小订购数
-                Double startQty = NumberUtil.compare(minBuyQty, qtyPrices.get(0).getStart()) == 1 ? qtyPrices.get(0).getStart() : minBuyQty;
-                qtyPrices.get(0).setStart(startQty);
-            }
-        }
-        goodsService.setGoodsDefault(goods);
+    /**
+     * 设置库存上下架历史
+     *
+     * @param goods 库存
+     * @return  GoodsHistory
+     */
+    @Override
+    public GoodsHistory assignmentGoodsHistory(Goods goods) {
+        GoodsHistory goodsHistory;
         String type;
         if (null != goods.getId()) {
-            if ((Status.AVAILABLE.value() == goods.getStatus() || Status.UNAVAILABLE.value() == goods.getStatus()) && (Status.NO_SHELVE.value() == status) || (Status.REMOVED.value() == status)) {
-                //如果现在是已上架,原先是未上架或者已下架,则做上架处理。否则做更新处理
+            //如果现在是已上架,原先是未上架或者已下架,则做上架处理。否则做更新处理
+            boolean publish = (Status.AVAILABLE.value() == goods.getStatus() || Status.UNAVAILABLE.value() == goods.getStatus()
+                    || Status.NO_SHELVE.value() == goods.getStatus()) && (Status.REMOVED.value() == goods.getOldStatus());
+            if (publish) {
                 type = GoodsHistory.OperateType.Publish.getPhrase();
             } else {
                 type = GoodsHistory.OperateType.Update.getPhrase();
             }
             goodsHistory = goodsHistoryService.converTGoodsHist(goods, type, false);
         } else  {
-            if ((Status.AVAILABLE.value() == goods.getStatus()) || Status.UNAVAILABLE.value() == goods.getStatus()) {
+            if (Status.AVAILABLE.value() == goods.getStatus() || Status.UNAVAILABLE.value() == goods.getStatus() || Status.NO_SHELVE.value() == goods.getStatus()) {
                 //如果现在是已上架,原先是未上架或者已下架,则做上架处理。否则做更新处理
                 type = GoodsHistory.OperateType.Publish.getPhrase();
             } else {
@@ -2928,10 +2967,7 @@ public class ProductServiceImpl implements ProductService {
             }
             goodsHistory = goodsHistoryService.converTGoodsHist(goods, type, false);
         }
-        goodsHistory = goodsHistoryService.save(goodsHistory);
-        logger.info("库存操作", "单个物料上传更新库存操作", "操作方式-> " + type, goodsHistory.getCode(), goodsHistory.getId());
-        goods = goodsDao.save(goods);
-        logger.info("上架商品", "新增上架商品", "通过卖家中心单个物料上传新增上架商品", goods.getCode(), goods.getId());
+        return goodsHistory;
     }
 
     /**

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

@@ -640,13 +640,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					goodsService.setGoodsDefault(needGoods);
 					needGoods.setStatus();
 					goodsDao.save(needGoods);
-					GoodsHistory history = null;
-					if ((Status.AVAILABLE.value() == needGoods.getStatus()) || (Status.UNAVAILABLE.value() == needGoods.getStatus())) {
-						//如果现在是已上架,原先是未上架或者已下架,则做上架处理。否则做更新处理
-						history = goodsHistoryService.converTGoodsHist(needGoods, GoodsHistory.OperateType.Publish.getPhrase(), false);
-					} else {
-						history = goodsHistoryService.converTGoodsHist(needGoods, GoodsHistory.OperateType.INIT.getPhrase(), false);
-					}
+					GoodsHistory history = goodsHistoryService.converTGoodsHist(needGoods, GoodsHistory.OperateType.Publish.getPhrase(), false);
 					// 修改上下架状态并产生上下架历史
 					goodsHistoryService.save(history);
 				}
@@ -1914,7 +1908,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 								prids.add(releaseProductByBatch.getProductid());
 								Integer status = g.getStatus();
 								g.updateGoodsByReleaseProductByBatch(releaseProductByBatch, delayTime, ignoreImport);
-								if ((Status.AVAILABLE.value() == g.getStatus()) || (Status.UNAVAILABLE.value() == g.getStatus()) && (Status.NO_SHELVE.value() == status) || (Status.REMOVED.value() == status)) {
+								if ((Status.AVAILABLE.value() == g.getStatus() || Status.UNAVAILABLE.value() == g.getStatus() || Status.NO_SHELVE.value() == g.getStatus()) &&  Status.REMOVED.value() == status) {
 									//如果现在是已上架,原先是未上架或者已下架,则做上架处理。否则做更新处理
 									goodsHistoryList.add(goodsHistoryService.converTGoodsHist(g, GoodsHistory.OperateType.Publish.getPhrase(), false));
 								} else {
@@ -1934,7 +1928,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				for (ReleaseProductByBatch releaseProductByBatch : insertGoods) {
 					goods = new Goods();
 					goods.setGoodsByReleaseProductByBatch(releaseProductByBatch, delayTime);
-					if ((Status.AVAILABLE.value() == goods.getStatus()) || (Status.UNAVAILABLE.value() == goods.getStatus())) {
+					if ((Status.AVAILABLE.value() == goods.getStatus()) || (Status.UNAVAILABLE.value() == goods.getStatus()) || (Status.NO_SHELVE.value() == goods.getStatus())) {
 						goodsHistoryList.add(goodsHistoryService.converTGoodsHist(goods, GoodsHistory.OperateType.Publish.getPhrase(), false));
 					} else {
 						goodsHistoryList.add(goodsHistoryService.converTGoodsHist(goods, GoodsHistory.OperateType.INIT.getPhrase(), false));

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

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.prod.store.facade.impl;
 
 import com.uas.platform.b2c.common.account.model.User;
+import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.prod.store.facade.StoreApplyFacade;
 import com.uas.platform.b2c.prod.store.model.EnterpriseSimple;
@@ -36,6 +37,9 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 
 	private final StoreApplyService storeApplyService;
 
+	@Autowired
+	private SysConf sysConf;
+
 
 	@Autowired
 	public StoreApplyFacadeImpl(StoreInService storeService, StoreApplyService storeApplyService) {
@@ -50,6 +54,10 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 		if (user == null || user.getEnterprise() == null) {
 			return new ResultMap(CodeType.NOT_PERMIT, "请进行用户登录操作");
 		}
+		// 验证终审人
+		if (!sysConf.getLastCheckUserUU().equals(user.getUserUU())) {
+			return new ResultMap(CodeType.NOT_PERMIT, "您无该操作权限");
+		}
 		// 验证参数合法性
 		if (StringUtils.isEmpty(uuid) || status == null) {
 			return new ResultMap(CodeType.NO_INFO, "店铺申请UUID或状态信息不存在");

+ 51 - 17
src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseProductServiceImpl.java

@@ -2,14 +2,21 @@ package com.uas.platform.b2c.trade.order.service.impl;
 
 import com.uas.platform.b2c.core.constant.IntegerConstant;
 import com.uas.platform.b2c.core.constant.ReleaseStatus;
+import com.uas.platform.b2c.core.constant.SplitChar;
+import com.uas.platform.b2c.core.constant.Status;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
 import com.uas.platform.b2c.prod.commodity.constant.DoubleConstant;
 import com.uas.platform.b2c.prod.commodity.constant.ErrorInfoConstant;
-import com.uas.platform.b2c.prod.commodity.constant.StringConstant;
+import com.uas.platform.b2c.prod.commodity.constant.ShortConstant;
 import com.uas.platform.b2c.prod.commodity.constant.UploadConstant;
+import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
+import com.uas.platform.b2c.prod.commodity.dao.GoodsHistoryDao;
 import com.uas.platform.b2c.prod.commodity.dao.ProductPrivateDao;
 import com.uas.platform.b2c.prod.commodity.dao.ReleaseProductByBatchDao;
+import com.uas.platform.b2c.prod.commodity.model.Goods;
+import com.uas.platform.b2c.prod.commodity.model.GoodsHistory;
 import com.uas.platform.b2c.prod.commodity.model.ProductPrivate;
 import com.uas.platform.b2c.prod.commodity.model.ReleaseProductByBatch;
 import com.uas.platform.b2c.prod.commodity.service.ProductService;
@@ -19,6 +26,7 @@ import com.uas.platform.b2c.prod.product.common.service.CreateNumberService;
 import com.uas.platform.b2c.trade.order.service.PurchaseProductService;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.exception.IllegalOperatorException;
+import com.uas.platform.core.logging.BufferedLoggerManager;
 import com.uas.platform.core.util.HttpUtil;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.poi.ss.usermodel.Cell;
@@ -64,6 +72,12 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
     @Autowired
     private ProductPrivateDao productPrivateDao;
 
+    @Autowired
+    private GoodsDao goodsDao;
+
+    @Autowired
+    private GoodsHistoryDao goodsHistoryDao;
+
     /**
      * 物料服务访问路径
      */
@@ -75,6 +89,11 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
      */
     private static final Logger LOGGER = LoggerFactory.getLogger(PurchaseProductServiceImpl.class);
 
+    /**
+     * 系统操作日志
+     */
+    private static final UsageBufferedLogger USE_LOG = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
+
     /**
      * 不需要传入的状态码
      */
@@ -161,7 +180,7 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
             // 去重后的数据
             List<ReleaseProductByBatch> uniqueBatchList = releaseProductByBatchDao.findByRelbatchidAndReleaseCodeNot(userUU, batch, failCode);
             if (!CollectionUtils.isEmpty(uniqueBatchList)) {
-                assignNumber = assignBatch(uniqueBatchList);
+                assignNumber = assignBatch(uniqueBatchList, batch);
             }
             modelMap.put("assignSuccess", assignNumber);
             modelMap.put("assignFailure", total - assignNumber);
@@ -218,13 +237,11 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
         // 统计为空的个数
         int result = 0;
         aProduct.setNum(rowNum - 2);
-        StringBuilder errMsg = new StringBuilder();
         // 品牌
         Object brandValue = releaseProductByBatchService.readWorkBookCell(row.getCell(UploadConstant.BRAND_ENGLISH), Cell.CELL_TYPE_STRING,
                 rowNum, UploadConstant.BRAND_ENGLISH);
         if (StringUtils.isEmpty(brandValue)) {
             result += 1;
-            errMsg.append(String.format(StringConstant.EXCEL_POSITION + ErrorInfoConstant.BRAND_EMPTY_INFO.getInfo(), rowNum + 1, "A"));
         }
         aProduct.setBrandEnByExcel(brandValue);
 
@@ -233,10 +250,6 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
                 rowNum, UploadConstant.KIND);
         if (StringUtils.isEmpty(kindValue)) {
             result += 1;
-            if (errMsg.length() > 0) {
-                errMsg.append(",");
-            }
-            errMsg.append(String.format(StringConstant.EXCEL_POSITION + ErrorInfoConstant.KIND_EMPTY_INFO.getInfo(), rowNum + 1, "B"));
         }
         aProduct.setKindByExcel(kindValue);
 
@@ -245,10 +258,6 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
                 rowNum, UploadConstant.PRODUCT_CODE);
         if (StringUtils.isEmpty(codeValue)) {
             result += 1;
-            if (errMsg.length() > 0) {
-                errMsg.append(",");
-            }
-            errMsg.append(String.format(StringConstant.EXCEL_POSITION + ErrorInfoConstant.CODE_EMPTY_INFO.getInfo(), rowNum + 1, "C"));
         }
         aProduct.setCodeByExcel(codeValue);
 
@@ -257,8 +266,10 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
                 rowNum, UploadConstant.SPEC);
         aProduct.setSpecByExcel(specValue);
 
-        if (errMsg.length() > 0) {
-            aProduct.setErrmsg(errMsg.toString());
+        if (!StringUtils.isEmpty(aProduct.getErrmsg())) {
+            if (aProduct.getErrmsg().startsWith(SplitChar.COMMA)) {
+                aProduct.setErrmsg(aProduct.getErrmsg().replaceFirst(SplitChar.COMMA, ""));
+            }
             aProduct.setReleaseCode(ReleaseStatus.lack_info.value());
             aProduct.setReleaseStatus(ReleaseStatus.lack_info.getPhrase());
         }
@@ -311,10 +322,11 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
      * 将去重的数据批量绑定到个人物料库
      *
      * @param uniqueBatchList 去重后的物料信息
+     * @param batch 批次号
      * @return 保存成功的数量
      */
-    private Integer assignBatch(List<ReleaseProductByBatch> uniqueBatchList) {
-        Set<Long> idSet = getProductIdSet(uniqueBatchList);
+    private Integer assignBatch(List<ReleaseProductByBatch> uniqueBatchList, String batch) {
+        Set<Long> idSet = getProductIdSet(uniqueBatchList, batch);
         if (CollectionUtils.isNotEmpty(idSet)) {
             HashMap<String, Object> params = new HashMap<>(5);
             ModelMap data = new ModelMap();
@@ -338,9 +350,10 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
      * 获取物料id字段
      *
      * @param uniqueBatchList 去重后的物料信息
+     * @param batchCode 批次号
      * @return 物料id集合
      */
-    private Set<Long> getProductIdSet(List<ReleaseProductByBatch> uniqueBatchList) {
+    private Set<Long> getProductIdSet(List<ReleaseProductByBatch> uniqueBatchList, String batchCode) {
         List<String> productCodeList = new ArrayList<>();
         Set<Long> idSet = new HashSet<>();
         List<ReleaseProductByBatch> batchList = new ArrayList<>();
@@ -360,7 +373,18 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
         productService.saveByJdbcTemplate(batchList);
         List<com.uas.platform.b2c.prod.commodity.model.Product> productList = productService.findProductIdAndProdnumsByProdNums(productCodeList);
         List<ProductPrivate> privateList = new ArrayList<>();
+        String defaultPackaging = "其他";
+        Boolean defaultBreakUp = true;
+        Boolean defaultAutoPublish = true;
+        List<Goods> goodsList = new ArrayList<>();
+        List<GoodsHistory> historyList = new ArrayList<>();
         productList.forEach(product -> {
+            Goods goods = new Goods(defaultPackaging, defaultBreakUp, defaultAutoPublish, ShortConstant.defaultMaxDelivery,
+                    ShortConstant.defaultMinDelivery, DoubleConstant.defaultMinBuyQty, DoubleConstant.defaultMinPackQty, Status.NO_SHELVE.value());
+            goods = productService.bindProductToGoods(goods, product);
+            goodsList.add(goods);
+            GoodsHistory goodsHistory = productService.assignmentGoodsHistory(goods);
+            historyList.add(goodsHistory);
             ProductPrivate productPrivate;
             List<ProductPrivate> privates = productPrivateDao.findByPrId(product.getId());
             if (CollectionUtils.isNotEmpty(privates)) {
@@ -376,6 +400,16 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
             idSet.add(product.getId());
         });
 
+        // 保存goods
+        if (CollectionUtils.isNotEmpty(goodsList)) {
+            goodsDao.save(goodsList);
+            USE_LOG.log("上架商品", "新增上架商品", "批量导入上架商品,数量 " + goodsList.size() + ", 批号 " + batchCode);
+        }
+        // 保存goodsHistory
+        if (CollectionUtils.isNotEmpty(historyList)) {
+            goodsHistoryDao.save(historyList);
+            USE_LOG.log("库存操作", "批量导入上架商品更新库存操作", "数量 " + historyList.size() + ", 批次号 " + batchCode);
+        }
         // 保存到私有库
         if (CollectionUtils.isNotEmpty(privateList)) {
             productPrivateDao.save(privateList);

+ 3 - 0
src/main/resources/dev/sys.properties

@@ -15,6 +15,9 @@ adminName=\u5218\u840C\u51B0
 enName=\u4F18\u8F6F\u6D4B\u8BD5\u4E8C
 storeid = 33069557578d44e69bd91ad12d28a8d4
 
+# Store check
+lastCheckUserUU=1000017605
+
 # YesPay config
 yes_gateway=https://mertest.ysepay.com/openapi_gateway/gateway.do
 notifyURL=http://218.17.158.219:9090/platform-b2c/api/payment/ysepayNotify

+ 3 - 0
src/main/resources/prod/sys.properties

@@ -16,6 +16,9 @@ adminName=\u5218\u840C\u51B0
 storeid = 33069557578d44e69bd91ad12d28a8d4
 enName=\u6DF1\u5733\u4F18\u8F6F\u5546\u57CE\u79D1\u6280\u6709\u9650\u516C\u53F8
 
+# Store check
+lastCheckUserUU=1000002242
+
 # YesPay config
 yes_gateway=https://openapi.ysepay.com/gateway.do
 notifyURL=https://www.usoftmall.com/api/payment/ysepayNotify

+ 3 - 0
src/main/resources/test/sys.properties

@@ -15,6 +15,9 @@ storeid = 33069557578d44e69bd91ad12d28a8d4
 adminName=\u5218\u840C\u51B0
 enName=\u4F18\u8F6F\u6D4B\u8BD5\u4E8C
 
+# Store check
+lastCheckUserUU=1000017605
+
 # YesPay config
 yes_gateway=https://mertest.ysepay.com/openapi_gateway/gateway.do
 notifyURL=http://218.17.158.219:9090/platform-b2c/api/payment/ysepayNotify

+ 3 - 0
src/main/resources/txcloud/sys.properties

@@ -16,6 +16,9 @@ adminName=\u5218\u840C\u51B0
 storeid = 33069557578d44e69bd91ad12d28a8d4
 enName=\u6DF1\u5733\u5E02\u4F18\u8F6F\u5546\u57CE\u79D1\u6280\u6709\u9650\u516C\u53F8
 
+# Store check
+lastCheckUserUU=1000002242
+
 # YesPay config
 yes_gateway=https://openapi.ysepay.com/gateway.do
 notifyURL=https://mall.usoftchina.com/api/payment/ysepayNotify

+ 2 - 2
src/main/webapp/WEB-INF/views/normal/adminWithNav.html

@@ -116,8 +116,8 @@
 					class="fa fa-filter"></i><span> 出售中的产品</span></a></li>
 			<li class="nav-node"><a href="#product/downedGoods"><i
 					class="fa fa-filter"></i><span> 已下架的产品</span></a></li>
-			<li class="nav-node"><a href="#product/downAllGoodsByEnterprise"><i
-					class="fa fa-cloud-download"></i><span> 下架公司产品</span></a></li>
+			<!--<li class="nav-node"><a href="#product/downAllGoodsByEnterprise"><i-->
+					<!--class="fa fa-cloud-download"></i><span> 下架公司产品</span></a></li>-->
 
 			<li class="nav-header">物流管理</li>
 			<!--<li class="nav-node"><a href="#logistics/company"><i-->

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

@@ -34,7 +34,7 @@ define([ 'ngResource' ], function() {
             },
             // 删除所有非标的信息
             deleteUnstandardAll: {
-                url: 'trade/products/unstandard',
+                url: 'trade/products/all',
                 method: 'DELETE'
             },
             // 删除所有非标的信息

+ 94 - 114
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_materialCtrl.js

@@ -5,7 +5,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     $rootScope.active = 'buyer_material';
     document.title = '买家产品库-优软商城';
     $scope.tab = 'material';
-    $scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
+    // $scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
     $scope.choosedIds = [];
     $scope.showTip = true;
     $scope.resultTip = true;
@@ -265,7 +265,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
      * 切换标准/非标准
      * @param isStandard
      */
-    $scope.toggleStandard = function(isStandard) {
+    /*$scope.toggleStandard = function(isStandard) {
       if ($scope.standard_tab == 'matchResult') {
         $scope.lastMaterial = $scope.currenctMaterial;
       }
@@ -282,7 +282,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       $scope.param.count = 10;
       loadDataReload();
     }
-    ;
+    ;*/
 
     var updateTagCount = function(item) {
       Material.getCountOfProduct(item, {}, function(data) {
@@ -543,9 +543,9 @@ define(['app/app', 'jquery-uploadify'], function(app) {
           selectAll: function() {
             return $scope.chooseAllPage;
           },
-          standard_tab: function() {
-            return $scope.standard_tab;
-          },
+          // standard_tab: function() {
+          //   return $scope.standard_tab;
+          // },
           message: function() {
             return $scope.$$nonProduct.deleteMessage;
           },
@@ -795,7 +795,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
           $scope.repeatList = data.data.repeatList;
           $scope.haveRepeat = true;
           // loadData();
-          $scope.standard_tab = 'matchResult';
+          // $scope.standard_tab = 'matchResult';
         } else {
           $scope.haveRepeat = false;
           $scope.matchSuccess = $scope.matchSuccess + 1;
@@ -907,26 +907,26 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     }
     ;
 
-    $scope.toggleTab = function(status) {
-      $scope.param.type = 'nStandard';
-      $scope.param.count = $scope.$$nonProduct.count;
-      if (status == 'matchResult') {
-        $scope.currenctMaterial = $scope.lastMaterial;
-        $scope.materialAll = {};
-      } else {
-        loadData();
-      }
-      $scope.standard_tab = status;
-    }
-    ;
+    // $scope.toggleTab = function(status) {
+    //   $scope.param.type = 'nStandard';
+    //   $scope.param.count = $scope.$$nonProduct.count;
+    //   if (status == 'matchResult') {
+    //     $scope.currenctMaterial = $scope.lastMaterial;
+    //     $scope.materialAll = {};
+    //   } else {
+    //     loadData();
+    //   }
+    //   $scope.standard_tab = status;
+    // }
+    // ;
 
-    $scope.closeResultFrame = function(status) {
-      $scope.standard_tab = status;
-      $scope.resultFrame = false;
-      $scope.param.type = 'nStandard';
-      loadData();
-    }
-    ;
+    // $scope.closeResultFrame = function(status) {
+    //   $scope.standard_tab = status;
+    //   $scope.resultFrame = false;
+    //   $scope.param.type = 'nStandard';
+    //   loadData();
+    // }
+    // ;
 
     $scope.closeTip = function() {
       $scope.resultTip = false;
@@ -1505,11 +1505,12 @@ define(['app/app', 'jquery-uploadify'], function(app) {
 
     var init = function() {
       $scope.param.keyword = '';
-      if ($scope.standard_tab == 'standard') {
-        $scope.param.type = "standard";
-      } else if ($scope.standard_tab == 'unstandard') {
-        $scope.param.type = "nStandard";
-      }
+      // if ($scope.standard_tab == 'standard') {
+      //   $scope.param.type = "standard";
+      // } else if ($scope.standard_tab == 'unstandard') {
+      //   $scope.param.type = "nStandard";
+      // }
+        $scope.param.type = "all";
       $scope.isBatch = false;
       $scope.param.count = 10;
     };
@@ -2505,33 +2506,33 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     /**
      * 批量上架信息
      */
-    $scope.batchPutOn = function() {
-      var isFluctuateRateChange = $scope.uasBatchPutOnProperty.editFluctuateRate != $scope.uasBatchPutOnProperty.fluctuateRate * 100;
-      var isMinDeliveryChange = $scope.uasBatchPutOnProperty.editMinDelivery != $scope.uasBatchPutOnProperty.minDelivery;
-      var isMaxDeliveryChange = $scope.uasBatchPutOnProperty.editMaxDelivery != $scope.uasBatchPutOnProperty.maxDelivery;
-      if (isFluctuateRateChange || isMinDeliveryChange || isMaxDeliveryChange) {
-        toaster.pop('warning', '提示', '批量上架配置信息被修改,请保存批量上架配置信息之后再上架');
-        return;
-      }
-      $scope.choosedIds = [];
-      $scope.getChoosedInfo();
-      if (!$scope.isChoosedAll && (!$scope.choosedIds || $scope.choosedIds.length == 0)) {
-        toaster.pop('warning', '提示', '请选择要删除的信息');
-        return true;
-      }
-      var idStr = ($scope.choosedIds != null) ? $scope.choosedIds.join(',') : null;
-      var std = $scope.standard_tab == 'standard' ? 1 : 0;
-      Material.batchPutOn({
-        'standard': std,
-        ids: idStr
-      }, null, function(data) {
-        loadData();
-        toaster.pop('success', '成功', data.message);
-      }, function(response) {
-        toaster.pop('error', '失败', response.data);
-      });
-
-    }
+    // $scope.batchPutOn = function() {
+    //   var isFluctuateRateChange = $scope.uasBatchPutOnProperty.editFluctuateRate != $scope.uasBatchPutOnProperty.fluctuateRate * 100;
+    //   var isMinDeliveryChange = $scope.uasBatchPutOnProperty.editMinDelivery != $scope.uasBatchPutOnProperty.minDelivery;
+    //   var isMaxDeliveryChange = $scope.uasBatchPutOnProperty.editMaxDelivery != $scope.uasBatchPutOnProperty.maxDelivery;
+    //   if (isFluctuateRateChange || isMinDeliveryChange || isMaxDeliveryChange) {
+    //     toaster.pop('warning', '提示', '批量上架配置信息被修改,请保存批量上架配置信息之后再上架');
+    //     return;
+    //   }
+    //   $scope.choosedIds = [];
+    //   $scope.getChoosedInfo();
+    //   if (!$scope.isChoosedAll && (!$scope.choosedIds || $scope.choosedIds.length == 0)) {
+    //     toaster.pop('warning', '提示', '请选择要删除的信息');
+    //     return true;
+    //   }
+    //   var idStr = ($scope.choosedIds != null) ? $scope.choosedIds.join(',') : null;
+    //   var std = $scope.standard_tab == 'standard' ? 1 : 0;
+    //   Material.batchPutOn({
+    //     'standard': std,
+    //     ids: idStr
+    //   }, null, function(data) {
+    //     loadData();
+    //     toaster.pop('success', '成功', data.message);
+    //   }, function(response) {
+    //     toaster.pop('error', '失败', response.data);
+    //   });
+    //
+    // }
 
     /**
      * 编辑包装方式的信息
@@ -4364,70 +4365,49 @@ define(['app/app', 'jquery-uploadify'], function(app) {
   ]);
 
   //批量删除信息
-  app.register.controller('vendor_delete_ctrl', ['$scope', 'ids', 'Goods', 'Material', 'toaster', 'deleteMaterial', 'deleteGoods', 'selectAll', 'ProductServiceQuery', 'standard_tab', '$modalInstance', 'message', 'chooseTypePeople', function($scope, ids, Goods, Material, toaster, deleteMaterial, deleteGoods, selectAll, ProductServiceQuery, standard_tab, $modalInstance, message, chooseTypePeople) {
+  app.register.controller('vendor_delete_ctrl', ['$scope', 'ids', 'Goods', 'Material', 'toaster', 'deleteMaterial', 'deleteGoods', 'selectAll', 'ProductServiceQuery', '$modalInstance', 'message', 'chooseTypePeople', function($scope, ids, Goods, Material, toaster, deleteMaterial, deleteGoods, selectAll, ProductServiceQuery, $modalInstance, message, chooseTypePeople) {
     $scope.deleteModal = true;
     $scope.message = message;
-
     $scope.ids = ids;
 
     // 确认删除
     $scope.confirmDelete = function() {
       if (deleteMaterial) {
-        if (selectAll) {
-          if (standard_tab == 'standard') {
-            if (chooseTypePeople === 'all') {
-              Material.deleteStandardAll(null, null, function (data) {
-                if (data.code != 1) {
-                  toaster.pop('error', '错误', data.message);
-                } else {
-                  toaster.pop('success', '删除成功');
-                  $scope.deleteModal = false;
-                  $modalInstance.close(data);
-                }
-              }, function (response) {
-                toaster.pop('error', '错误', response.data);
-              });
-            } else {
-              Material.deleteStandardAll({isPerson: 1}, function (data) {
-                if (data.code != 1) {
-                  toaster.pop('error', '错误', data.message);
-                } else {
-                  toaster.pop('success', '删除成功');
-                  $scope.deleteModal = false;
-                  $modalInstance.close(data);
-                }
-              }, function (response) {
-                toaster.pop('error', '错误', response.data);
-              });
-            }
+          if (selectAll) {
+              if (chooseTypePeople === 'all') {
+                  Material.deleteUnstandardAll({isPerson: 0, type: 'all'}, function (data) {
+                      if (data.code != 1) {
+                          toaster.pop('error', '错误', data.message);
+                      } else {
+                          toaster.pop('success', '删除成功');
+                          $scope.deleteModal = false;
+                          $modalInstance.close(data);
+                      }
+                  }, function (response) {
+                      if (response.data.indexOf('系统') > -1 ){
+                          toaster.pop('error', '错误',response.data);
+                          return
+                      }
+                      toaster.pop('info', '提示', '信息删除中,请耐心等待!');
+                  });
+              } else {
+                  Material.deleteUnstandardAll({isPerson: 1, type: 'all'}, function (data) {
+                      if (data.code != 1) {
+                          toaster.pop('error', '错误', data.message);
+                      } else {
+                          toaster.pop('success', '删除成功');
+                          $scope.deleteModal = false;
+                          $modalInstance.close(data);
+                      }
+                  }, function (response) {
+                      if (response.data.indexOf('系统') > -1 ){
+                          toaster.pop('error', '错误',response.data);
+                          returns
+                      }
+                      toaster.pop('info', '提示', '信息删除中,请耐心等待!');
+                  });
+              }
           } else {
-            if (chooseTypePeople === 'all') {
-              Material.deleteUnstandardAll(null, null, function (data) {
-                if (data.code != 1) {
-                  toaster.pop('error', '错误', data.message);
-                } else {
-                  toaster.pop('success', '删除成功');
-                  $scope.deleteModal = false;
-                  $modalInstance.close(data);
-                }
-              }, function (response) {
-                toaster.pop('error', '错误', response.data);
-              });
-            } else {
-              Material.deleteUnstandardAll({isPerson: 1}, function (data) {
-                if (data.code != 1) {
-                  toaster.pop('error', '错误', data.message);
-                } else {
-                  toaster.pop('success', '删除成功');
-                  $scope.deleteModal = false;
-                  $modalInstance.close(data);
-                }
-              }, function (response) {
-                toaster.pop('error', '错误', response.data);
-              });
-            }
-          }
-        } else {
           if (!$scope.ids || $scope.ids.length == 0) {
             toaster.pop('warning', '提示', '请选择要删除的信息');
             return;

+ 81 - 121
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -4,7 +4,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     $rootScope.active = 'vendor_material';
     document.title = '卖家产品库-优软商城';
     $scope.tab = 'material';
-    $scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
+    // $scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
     $scope.choosedIds = [];
     $scope.showTip = true;
     $scope.resultTip = true;
@@ -264,24 +264,23 @@ define(['app/app', 'jquery-uploadify'], function(app) {
      * 切换标准/非标准
      * @param isStandard
      */
-    $scope.toggleStandard = function(isStandard) {
-      if ($scope.standard_tab == 'matchResult') {
-        $scope.lastMaterial = $scope.currenctMaterial;
-      }
-      $scope.standard_tab = isStandard;
-      $scope.param.keyword = '';
-      if ($scope.chooseAllPage) {
-        $scope.chooseAllPage = false;
-      }
-      if (isStandard == 'standard')
-        $scope.param.type = "standard";
-      if (isStandard == 'unstandard')
-        $scope.param.type = "nStandard";
-      $scope.isBatch = false;
-      $scope.param.count = 10;
-      loadDataReload();
-    }
-    ;
+    // $scope.toggleStandard = function(isStandard) {
+    //   if ($scope.standard_tab == 'matchResult') {
+    //     $scope.lastMaterial = $scope.currenctMaterial;
+    //   }
+    //   $scope.standard_tab = isStandard;
+    //   $scope.param.keyword = '';
+    //   if ($scope.chooseAllPage) {
+    //     $scope.chooseAllPage = false;
+    //   }
+    //   if (isStandard == 'standard')
+    //     $scope.param.type = "standard";
+    //   if (isStandard == 'unstandard')
+    //     $scope.param.type = "nStandard";
+    //   $scope.isBatch = false;
+    //   $scope.param.count = 10;
+    //   loadDataReload();
+    // };
 
     var updateTagCount = function(item) {
       Material.getCountOfProduct(item, {}, function(data) {
@@ -542,9 +541,9 @@ define(['app/app', 'jquery-uploadify'], function(app) {
           selectAll: function() {
             return $scope.chooseAllPage;
           },
-          standard_tab: function() {
-            return $scope.standard_tab;
-          },
+          // standard_tab: function() {
+          //   return $scope.standard_tab;
+          // },
           message: function() {
             return $scope.$$nonProduct.deleteMessage;
           },
@@ -794,7 +793,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
           $scope.repeatList = data.data.repeatList;
           $scope.haveRepeat = true;
           // loadData();
-          $scope.standard_tab = 'matchResult';
+          // $scope.standard_tab = 'matchResult';
         } else {
           $scope.haveRepeat = false;
           $scope.matchSuccess = $scope.matchSuccess + 1;
@@ -903,34 +902,30 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       $scope.$$nonProduct.count = count;
       $scope.param.count = $scope.$$nonProduct.count;
       loadData();
-    }
-    ;
+    };
 
-    $scope.toggleTab = function(status) {
-      $scope.param.type = 'nStandard';
-      $scope.param.count = $scope.$$nonProduct.count;
-      if (status == 'matchResult') {
-        $scope.currenctMaterial = $scope.lastMaterial;
-        $scope.materialAll = {};
-      } else {
-        loadData();
-      }
-      $scope.standard_tab = status;
-    }
-    ;
+    // $scope.toggleTab = function(status) {
+    //   $scope.param.type = 'nStandard';
+    //   $scope.param.count = $scope.$$nonProduct.count;
+    //   if (status == 'matchResult') {
+    //     $scope.currenctMaterial = $scope.lastMaterial;
+    //     $scope.materialAll = {};
+    //   } else {
+    //     loadData();
+    //   }
+    //   $scope.standard_tab = status;
+    // };
 
-    $scope.closeResultFrame = function(status) {
-      $scope.standard_tab = status;
-      $scope.resultFrame = false;
-      $scope.param.type = 'nStandard';
-      loadData();
-    }
-    ;
+    // $scope.closeResultFrame = function(status) {
+    //   $scope.standard_tab = status;
+    //   $scope.resultFrame = false;
+    //   $scope.param.type = 'nStandard';
+    //   loadData();
+    // };
 
     $scope.closeTip = function() {
       $scope.resultTip = false;
-    }
-    ;
+    };
 
     var loadSelectedData = function() {
       $scope.materialAll = {};
@@ -950,7 +945,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
             $scope.matchTotal = data.data.total;
             $scope.matchSuccess = data.data.success;
             $scope.matchFail = data.data.fail;
-            $scope.standard_tab = 'matchResult';
+            // $scope.standard_tab = 'matchResult';
             $scope.param.type = "nStandard";
             loadData();
           } else {
@@ -971,7 +966,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
             $scope.matchTotal = data.data.total;
             $scope.matchSuccess = data.data.success;
             $scope.matchFail = data.data.fail;
-            $scope.standard_tab = 'matchResult';
+            // $scope.standard_tab = 'matchResult'
             $scope.batch = data.data.batch;
             $scope.currenctMaterial = [];
             loadSelectedData();
@@ -992,7 +987,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
           $scope.matchTotal = data.data.total;
           $scope.matchSuccess = data.data.success;
           $scope.matchFail = data.data.fail;
-          $scope.standard_tab = 'matchResult';
+          // $scope.standard_tab = 'matchResult';
           $scope.param.type = "nStandard";
           loadData();
         } else {
@@ -1504,11 +1499,12 @@ define(['app/app', 'jquery-uploadify'], function(app) {
 
     var init = function() {
       $scope.param.keyword = '';
-      if ($scope.standard_tab == 'standard') {
-        $scope.param.type = "standard";
-      } else if ($scope.standard_tab == 'unstandard') {
-        $scope.param.type = "nStandard";
-      }
+      // if ($scope.standard_tab == 'standard') {
+      //   $scope.param.type = "standard";
+      // } else if ($scope.standard_tab == 'unstandard') {
+      //   $scope.param.type = "nStandard";
+      // }
+        $scope.param.type = "all";
       $scope.isBatch = false;
       $scope.param.count = 10;
     };
@@ -4156,7 +4152,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
   ]);
 
   //批量删除信息
-  app.register.controller('vendor_delete_ctrl', ['$scope', 'ids', 'Goods', 'Material', 'toaster', 'deleteMaterial', 'deleteGoods', 'selectAll', 'ProductServiceQuery', 'standard_tab', '$modalInstance', 'message', 'chooseTypePeople', function($scope, ids, Goods, Material, toaster, deleteMaterial, deleteGoods, selectAll, ProductServiceQuery, standard_tab, $modalInstance, message, chooseTypePeople) {
+  app.register.controller('vendor_delete_ctrl', ['$scope', 'ids', 'Goods', 'Material', 'toaster', 'deleteMaterial', 'deleteGoods', 'selectAll', 'ProductServiceQuery', '$modalInstance', 'message', 'chooseTypePeople', function($scope, ids, Goods, Material, toaster, deleteMaterial, deleteGoods, selectAll, ProductServiceQuery, $modalInstance, message, chooseTypePeople) {
     $scope.deleteModal = true;
     $scope.message = message;
 
@@ -4166,75 +4162,39 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     $scope.confirmDelete = function() {
       if (deleteMaterial) {
         if (selectAll) {
-          if (standard_tab == 'standard') {
-            if (chooseTypePeople === 'all') {
-              Material.deleteStandardAll(null, null, function (data) {
-                if (data.code != 1) {
-                  toaster.pop('error', '错误', data.message);
-                } else {
-                  toaster.pop('success', '删除成功');
-                  $scope.deleteModal = false;
-                  $modalInstance.close(data);
-                }
-              }, function (response) {
-                if (response.data.indexOf('系统') > -1 ){
-                  toaster.pop('error', '错误',response.data);
-                  return
-                }
-                toaster.pop('info', '提示', '信息删除中,请耐心等待!');
-              });
-            } else {
-              Material.deleteStandardAll({isPerson: 1}, function (data) {
-                if (data.code != 1) {
-                  toaster.pop('error', '错误', data.message);
-                } else {
-                  toaster.pop('success', '删除成功');
-                  $scope.deleteModal = false;
-                  $modalInstance.close(data);
-                }
-              }, function (response) {
-                if (response.data.indexOf('系统') > -1 ){
-                  toaster.pop('error', '错误',response.data);
-                  return
-                }
-                toaster.pop('info', '提示', '信息删除中,请耐心等待!');
-              });
-            }
-          } else {
             if (chooseTypePeople === 'all') {
-              Material.deleteUnstandardAll(null, null, function (data) {
-                if (data.code != 1) {
-                  toaster.pop('error', '错误', data.message);
-                } else {
-                  toaster.pop('success', '删除成功');
-                  $scope.deleteModal = false;
-                  $modalInstance.close(data);
-                }
-              }, function (response) {
-                if (response.data.indexOf('系统') > -1 ){
-                  toaster.pop('error', '错误',response.data);
-                  return
-                }
-                  toaster.pop('info', '提示', '信息删除中,请耐心等待!');
-              });
+                Material.deleteUnstandardAll({isPerson: 0, type: 'all'}, function (data) {
+                    if (data.code != 1) {
+                        toaster.pop('error', '错误', data.message);
+                    } else {
+                        toaster.pop('success', '删除成功');
+                        $scope.deleteModal = false;
+                        $modalInstance.close(data);
+                    }
+                }, function (response) {
+                    if (response.data.indexOf('系统') > -1 ){
+                        toaster.pop('error', '错误',response.data);
+                        return
+                    }
+                    toaster.pop('info', '提示', '信息删除中,请耐心等待!');
+                });
             } else {
-              Material.deleteUnstandardAll({isPerson: 1}, function (data) {
-                if (data.code != 1) {
-                  toaster.pop('error', '错误', data.message);
-                } else {
-                  toaster.pop('success', '删除成功');
-                  $scope.deleteModal = false;
-                  $modalInstance.close(data);
-                }
-              }, function (response) {
-                if (response.data.indexOf('系统') > -1 ){
-                  toaster.pop('error', '错误',response.data);
-                  return
-                }
-                toaster.pop('info', '提示', '信息删除中,请耐心等待!');
-              });
+                Material.deleteUnstandardAll({isPerson: 1, type: 'all'}, function (data) {
+                    if (data.code != 1) {
+                        toaster.pop('error', '错误', data.message);
+                    } else {
+                        toaster.pop('success', '删除成功');
+                        $scope.deleteModal = false;
+                        $modalInstance.close(data);
+                    }
+                }, function (response) {
+                    if (response.data.indexOf('系统') > -1 ){
+                        toaster.pop('error', '错误',response.data);
+                        returns
+                    }
+                    toaster.pop('info', '提示', '信息删除中,请耐心等待!');
+                });
             }
-          }
         } else {
           if (!$scope.ids || $scope.ids.length == 0) {
             toaster.pop('warning', '提示', '请选择要删除的信息');

+ 1 - 1
src/main/webapp/resources/view/admin/product/productManage.html

@@ -116,7 +116,7 @@
                             <option value="">全部</option>
                             <option value="601">已上架</option>
                             <!--<option value="613">新品未上架</option>-->
-                            <option value="612">未上架</option>
+                            <option value="612">已下架</option>
                         </select>
                     </label>
                 </div>

+ 31 - 15
src/main/webapp/resources/view/usercenter/forstore/buyer_material.html

@@ -1052,6 +1052,20 @@
 		overflow: hidden;
 		white-space: nowrap;
 	}
+	.img-info i{
+		position:absolute;
+		top:0;
+		left:0;
+		display:block;
+		width:30px;
+		height:30px;
+	}
+	.img-info i.icon-fei{
+		background: url('static/img/icon/icon-detail.png')no-repeat 0px -38px;
+	}
+	.img-info i.icon-biao{
+		background: url('static/img/icon/icon-detail.png')no-repeat;
+	}
 </style>
 <div class="user_right fr">
 	<!--货品管理-->
@@ -1065,21 +1079,21 @@
 				<!--<li ng-class="{'active': tab == 'B2b'}"><a ui-sref="sale_badOut">B2B客户出入库</a></li>-->
 			</ul>
 		</div>
-		<div class="com_tab com_tab2" ng-if="!isPcbStore" style="margin-bottom: 0px">
-			<ul class="fl distance" style="width: 100%">
-				<li ng-class="{active : standard_tab == 'unstandard'}"  ng-click="toggleStandard('unstandard')" title="非标产品({{nCount}})"><a href="" class="standard">非标产品(<em class="count">{{nCount}}</em>)</a></li>
-				<li ng-class="{active : standard_tab =='standard'}" ng-click="toggleStandard('standard')" title="标准产品({{sCount}})"><a href="" class="standard">标准产品(<em class="count">{{sCount}}</em>)</a></li>
-			</ul>
-			<!--匹配结果导航-->
-			<div class="match-menu" ng-if="resultFrame">
-                <span>
-                    <a ng-click="toggleTab('matchResult')">匹配结果</a>
-                    <i class="fa fa-remove" ng-click="closeResultFrame('unstandard')"></i>
-                </span>
-			</div>
-		</div>
+		<!--<div class="com_tab com_tab2" ng-if="!isPcbStore" style="margin-bottom: 0px">-->
+			<!--<ul class="fl distance" style="width: 100%">-->
+				<!--<li ng-class="{active : standard_tab == 'unstandard'}"  ng-click="toggleStandard('unstandard')" title="非标产品({{nCount}})"><a href="" class="standard">非标产品(<em class="count">{{nCount}}</em>)</a></li>-->
+				<!--<li ng-class="{active : standard_tab =='standard'}" ng-click="toggleStandard('standard')" title="标准产品({{sCount}})"><a href="" class="standard">标准产品(<em class="count">{{sCount}}</em>)</a></li>-->
+			<!--</ul>-->
+			<!--&lt;!&ndash;匹配结果导航&ndash;&gt;-->
+			<!--<div class="match-menu" ng-if="resultFrame">-->
+                <!--<span>-->
+                    <!--<a ng-click="toggleTab('matchResult')">匹配结果</a>-->
+                    <!--<i class="fa fa-remove" ng-click="closeResultFrame('unstandard')"></i>-->
+                <!--</span>-->
+			<!--</div>-->
+		<!--</div>-->
 		<!--非标和标准产品列表页-->
-		<div ng-if="standard_tab == 'unstandard' || standard_tab =='standard'">
+		<div>
 			<div class="search-check">
 				<div class="fl" style="font-size: 14px;color: #666;margin-left: 12px;line-height: 34px;">
 					更多筛选:
@@ -1165,8 +1179,10 @@
 									<img src="static/img/vendor/images/person-material-pc.png" ng-if="material.addProductPerson" alt="">
 									<span style="float:left;margin-top:40px;margin-left:10px"><input type="checkbox" ng-checked="material.isChoosed"  ng-click="chooseOne(material)"  id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>
 									<div class="blue-bg" style="float:left;border: 1px solid #dcdcdc;border-radius: 4px;margin: 20px 0 20px 10px">
-										<div class="img" style="margin: 0;">
+										<div class="img img-info" style="margin: 0;">
 											<a><img ng-src="{{material.cmpImg || 'static/img/store/common/default.png'}}" alt="img"/></a>
+											<i class="icon-fei" ng-if="!material.cmpUuId"></i>
+											<i class="icon-biao" ng-if="material.cmpUuId"></i>
 										</div>
 									</div>
 									<div style="clear: both"></div>

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

@@ -1052,6 +1052,21 @@
 		overflow: hidden;
 		white-space: nowrap;
 	}
+
+	.img-info i{
+		position:absolute;
+		top:0;
+		left:0;
+		display:block;
+		width:30px;
+		height:30px;
+	}
+	.img-info i.icon-fei{
+		background: url('static/img/icon/icon-detail.png')no-repeat 0px -38px;
+	}
+	.img-info i.icon-biao{
+		background: url('static/img/icon/icon-detail.png')no-repeat;
+	}
 </style>
 <div class="user_right fr">
 	<!--货品管理-->
@@ -1065,21 +1080,21 @@
 				<!--<li ng-class="{'active': tab == 'B2b'}"><a ui-sref="sale_badOut">B2B客户出入库</a></li>-->
 			</ul>
 		</div>
-		<div class="com_tab com_tab2" ng-if="!isPcbStore" style="margin-bottom: 0px">
-			<ul class="fl distance" style="width: 100%">
-				<li ng-class="{active : standard_tab == 'unstandard'}"  ng-click="toggleStandard('unstandard')" title="非标产品({{nCount}})"><a href="" class="standard">非标产品(<em class="count">{{nCount}}</em>)</a></li>
-				<li ng-class="{active : standard_tab =='standard'}" ng-click="toggleStandard('standard')" title="标准产品({{sCount}})"><a href="" class="standard">标准产品(<em class="count">{{sCount}}</em>)</a></li>
-			</ul>
-			<!--匹配结果导航-->
-			<div class="match-menu" ng-if="resultFrame">
-                <span>
-                    <a ng-click="toggleTab('matchResult')">匹配结果</a>
-                    <i class="fa fa-remove" ng-click="closeResultFrame('unstandard')"></i>
-                </span>
-			</div>
-		</div>
+		<!--<div class="com_tab com_tab2" ng-if="!isPcbStore" style="margin-bottom: 0px">-->
+			<!--<ul class="fl distance" style="width: 100%">-->
+				<!--<li ng-class="{active : standard_tab == 'unstandard'}"  ng-click="toggleStandard('unstandard')" title="非标产品({{nCount}})"><a href="" class="standard">非标产品(<em class="count">{{nCount}}</em>)</a></li>-->
+				<!--<li ng-class="{active : standard_tab =='standard'}" ng-click="toggleStandard('standard')" title="标准产品({{sCount}})"><a href="" class="standard">标准产品(<em class="count">{{sCount}}</em>)</a></li>-->
+			<!--</ul>-->
+			<!--&lt;!&ndash;匹配结果导航&ndash;&gt;-->
+			<!--<div class="match-menu" ng-if="resultFrame">-->
+                <!--<span>-->
+                    <!--<a ng-click="toggleTab('matchResult')">匹配结果</a>-->
+                    <!--<i class="fa fa-remove" ng-click="closeResultFrame('unstandard')"></i>-->
+                <!--</span>-->
+			<!--</div>-->
+		<!--</div>-->
 		<!--非标和标准产品列表页-->
-		<div ng-if="standard_tab == 'unstandard' || standard_tab =='standard'">
+		<div>
 			<div class="search-check">
 				<div class="fl" style="font-size: 14px;color: #666;margin-left: 12px;line-height: 34px;">
 					更多筛选:
@@ -1165,8 +1180,10 @@
 									<img src="static/img/vendor/images/person-material-pc.png" ng-if="material.addProductPerson" alt="">
 									<span style="float:left;margin-top:40px;margin-left:10px"><input type="checkbox" ng-checked="material.isChoosed"  ng-click="chooseOne(material)"  id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>
 									<div class="blue-bg" style="float:left;border: 1px solid #dcdcdc;border-radius: 4px;margin: 20px 0 20px 10px">
-										<div class="img" style="margin: 0;">
+										<div class="img img-info" style="margin: 0;">
 											<a><img ng-src="{{material.cmpImg || 'static/img/store/common/default.png'}}" alt="img"/></a>
+											<i class="icon-fei" ng-if="!material.cmpUuId"></i>
+											<i class="icon-biao" ng-if="material.cmpUuId"></i>
 										</div>
 									</div>
 									<div style="clear: both"></div>
@@ -1234,7 +1251,7 @@
 									</div>
 									<div ng-if="material.goods" ng-bind="(storeInfo.uuid != 'undefind' && material.goods.storeid == storeInfo.uuid && storeInfo.storeName.indexOf('优软测试二') < 0 && storeInfo.storeName.indexOf('优软商城') < 0) ? '自营': '寄售'">自营</div>
 									<div>{{material.goods.breakUp ? '可拆卖' : '不可拆卖'}}</div>
-									<div>{{material.goods.status === 601 || material.goods.status === 602 ? '已上架' : '未上架' }}</div>
+									<div>{{material.goods.status === 601 || material.goods.status === 602 || material.goods.status === 613 ? '已上架' : '未上架' }}</div>
 								</td>
 								<td class="edit">
 									<div style="text-align: center">