Browse Source

1:批量上架功能切换为单笔别

yujia 8 years ago
parent
commit
a4569ce539
22 changed files with 501 additions and 328 deletions
  1. 13 0
      src/main/java/com/uas/platform/b2c/core/utils/StringUtilB2C.java
  2. 15 0
      src/main/java/com/uas/platform/b2c/prod/commodity/constant/DoubleConstant.java
  3. 8 2
      src/main/java/com/uas/platform/b2c/prod/commodity/controller/ReleaseProductByBatchController.java
  4. 4 4
      src/main/java/com/uas/platform/b2c/prod/commodity/model/GoodsHistory.java
  5. 194 113
      src/main/java/com/uas/platform/b2c/prod/commodity/model/ReleaseProductByBatch.java
  6. 151 145
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java
  7. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls
  8. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatchError-rmb.xls
  9. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatchError-usd.xls
  10. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatcherrdata.xls
  11. BIN
      src/main/resources/jxls-tpl/trade/releasebyBatch-usd.xls
  12. BIN
      src/main/webapp/resources/img/icon/open.png
  13. BIN
      src/main/webapp/resources/img/product/releaseByBatch-rmb.png
  14. BIN
      src/main/webapp/resources/img/product/releaseByBatch-usd.png
  15. 2 2
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_order_ctrl.js
  16. 24 19
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js
  17. 24 1
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_onSaleCtrl.js
  18. 31 5
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js
  19. 3 3
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html
  20. 16 16
      src/main/webapp/resources/view/vendor/forstore/vendor_onSale.html
  21. 2 1
      src/main/webapp/resources/view/vendor/forstore/vendor_undercarriage.html
  22. 14 17
      src/main/webapp/resources/view/vendor/forstore/vendor_upload.html

+ 13 - 0
src/main/java/com/uas/platform/b2c/core/utils/StringUtilB2C.java

@@ -9,6 +9,8 @@ import org.apache.commons.collections.CollectionUtils;
 import org.springframework.util.StringUtils;
 import org.springframework.util.StringUtils;
 
 
 import java.util.*;
 import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 
 /**
 /**
  * B2C项目专用字符串工具方法
  * B2C项目专用字符串工具方法
@@ -230,4 +232,15 @@ public class StringUtilB2C {
 		}
 		}
 		return str.trim();
 		return str.trim();
 	}
 	}
+
+	public static String replaceLineBreak(String str) {
+		Pattern p = Pattern.compile("\\s*|\t|\r|\n");
+		Matcher m = p.matcher(str);
+		str = m.replaceAll("");
+		return str;
+	}
+
+	public static boolean isEmpty(Object str) {
+		return (str == null || "".equals(str) || "null".equals(str));
+	}
 }
 }

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

@@ -11,4 +11,19 @@ public class DoubleConstant {
      * 最大库存
      * 最大库存
      */
      */
     public static final Double maxReserve = 999999999d;
     public static final Double maxReserve = 999999999d;
+
+    /**
+     * double 最小的正整数
+     */
+    public static final Double minReserve = 1d;
+
+    /**
+     * 0.0
+     */
+    public static final Double zero = 0.0d;
+
+    /**
+     * 最小包装量的最大值
+     */
+    public static final Double maxMinPackageQty = 999999d;
 }
 }

+ 8 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/controller/ReleaseProductByBatchController.java

@@ -234,7 +234,7 @@ public class ReleaseProductByBatchController {
      * @return model and view
      * @return model and view
      */
      */
     @RequestMapping(value = "/release/failure/xls", method = RequestMethod.GET)
     @RequestMapping(value = "/release/failure/xls", method = RequestMethod.GET)
-    public ModelAndView exportOrderses(String batch, HttpServletRequest request, @RequestParam(defaultValue = "false") Boolean isAjax) {
+    public ModelAndView exportOrderses(String batch, HttpServletRequest request, @RequestParam(defaultValue = "false") Boolean isAjax, String currency) {
         ModelAndView modelAndView = new ModelAndView();
         ModelAndView modelAndView = new ModelAndView();
         HttpSession session = request.getSession();
         HttpSession session = request.getSession();
         Object loading = session.getAttribute("load-error-ing");
         Object loading = session.getAttribute("load-error-ing");
@@ -254,7 +254,13 @@ public class ReleaseProductByBatchController {
             session.setAttribute("load-error-ing", true);
             session.setAttribute("load-error-ing", true);
         }
         }
         modelAndView.addObject("data", releaseProductByBatchService.findFailureReleaseProductByBatch(batch));
         modelAndView.addObject("data", releaseProductByBatchService.findFailureReleaseProductByBatch(batch));
-        modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/trade/releaseByBatcherrdata", "优软商城批量发布匹配不正确的产品"));
+        String url ="";
+        if(Currency.USD.equals(currency)) {
+            url = "classpath:jxls-tpl/trade/releaseByBatchError-usd";
+        }else {
+            url = "classpath:jxls-tpl/trade/releaseByBatchError-rmb";
+        }
+        modelAndView.setView(new JxlsExcelView(url, "优软商城批量发布匹配不正确的产品"));
         logger.log("批量上架模块", "以Excel形式导出批量上架商品匹配不合格的数据");
         logger.log("批量上架模块", "以Excel形式导出批量上架商品匹配不合格的数据");
         session.setAttribute("load-error-ing", false);
         session.setAttribute("load-error-ing", false);
         return modelAndView;
         return modelAndView;

+ 4 - 4
src/main/java/com/uas/platform/b2c/prod/commodity/model/GoodsHistory.java

@@ -983,10 +983,6 @@ public class GoodsHistory {
         this.rmbTaxRate = goods.getRmbTaxRate();
         this.rmbTaxRate = goods.getRmbTaxRate();
         this.usdTaxRate = goods.getUsdTaxRate();
         this.usdTaxRate = goods.getUsdTaxRate();
         this.shipArea = goods.getShipArea();
         this.shipArea = goods.getShipArea();
-        this.maxDelivery = goods.getMaxDelivery();
-        this.minDelivery = goods.getMinDelivery();
-		this.b2cMaxDelivery = goods.getB2cMaxDelivery();
-		this.b2cMinDelivery = goods.getB2cMinDelivery();
 		this.productid = goods.getProductid();
 		this.productid = goods.getProductid();
 		this.standprodid = goods.getStandprodid();
 		this.standprodid = goods.getStandprodid();
 		this.lastReserve = goods.getLastReserve();
 		this.lastReserve = goods.getLastReserve();
@@ -998,6 +994,10 @@ public class GoodsHistory {
 		this.selfDeliveryDemMinTime = goods.getSelfDeliveryDemMinTime();
 		this.selfDeliveryDemMinTime = goods.getSelfDeliveryDemMinTime();
 		this.selfDeliveryHKMaxTime = goods.getSelfDeliveryHKMaxTime();
 		this.selfDeliveryHKMaxTime = goods.getSelfDeliveryHKMaxTime();
 		this.selftDeliveryHKMinTime = goods.getSelfDeliveryHKMinTime();
 		this.selftDeliveryHKMinTime = goods.getSelfDeliveryHKMinTime();
+		this.maxDelivery = goods.getMaxDelivery();
+		this.minDelivery = goods.getMinDelivery();
+		this.b2cMaxDelivery = goods.getB2cMaxDelivery();
+		this.b2cMinDelivery = goods.getB2cMinDelivery();
 		this.updateDate = new Date();
 		this.updateDate = new Date();
 		this.perQty = goods.getPerQty();
 		this.perQty = goods.getPerQty();
 		this.breakUp = goods.getBreakUp();
 		this.breakUp = goods.getBreakUp();

+ 194 - 113
src/main/java/com/uas/platform/b2c/prod/commodity/model/ReleaseProductByBatch.java

@@ -2,20 +2,13 @@ package com.uas.platform.b2c.prod.commodity.model;
 
 
 import com.alibaba.fastjson.annotation.JSONField;
 import com.alibaba.fastjson.annotation.JSONField;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
+import com.uas.platform.b2c.core.utils.StringUtilB2C;
 import com.uas.platform.b2c.trade.order.StringConstant.Currency;
 import com.uas.platform.b2c.trade.order.StringConstant.Currency;
-import com.uas.platform.core.exception.IllegalOperatorException;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.codehaus.jackson.annotate.JsonIgnore;
 import org.codehaus.jackson.annotate.JsonIgnore;
 import org.springframework.util.StringUtils;
 import org.springframework.util.StringUtils;
 
 
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-import javax.persistence.Transient;
+import javax.persistence.*;
 import java.io.Serializable;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.ArrayList;
@@ -104,12 +97,24 @@ public class ReleaseProductByBatch implements Serializable {
 	@Column(name = "rel_publishreserve")
 	@Column(name = "rel_publishreserve")
 	private Double reserve;
 	private Double reserve;
 
 
+	/**
+	 * 发布库存量的字符串
+	 */
+	@Column(name = "rel_publishreservestr")
+	private String reserveStr;
+
 	/**
 	/**
 	 * 最小起定量
 	 * 最小起定量
 	 */
 	 */
 	@Column(name = "rel_minbuyqty")
 	@Column(name = "rel_minbuyqty")
 	private Double minBuyQty;
 	private Double minBuyQty;
 
 
+	/**
+	 * 最小起定量String 类型
+	 */
+	@Column(name = "rel_minbuyqtystr")
+	private String minBuyQtyStr;
+
 	/**
 	/**
 	 * 分段报价(JSON串) eg:[{"start":0,"end":1000,"price":2.3,"taxPrice":2.5},...]
 	 * 分段报价(JSON串) eg:[{"start":0,"end":1000,"price":2.3,"taxPrice":2.5},...]
 	 */
 	 */
@@ -140,6 +145,12 @@ public class ReleaseProductByBatch implements Serializable {
 	@Column(name = "rel_minpackage")
 	@Column(name = "rel_minpackage")
 	private Double minPackage;
 	private Double minPackage;
 
 
+	/**
+	 * 产品最小包装量
+	 */
+	@Column(name = "rel_minpackagestr")
+	private String minPackageStr;
+
 	/**
 	/**
 	 * 是否可拆卖
 	 * 是否可拆卖
 	 */
 	 */
@@ -167,15 +178,27 @@ public class ReleaseProductByBatch implements Serializable {
 	/**
 	/**
 	 * 自己填写最长交期
 	 * 自己填写最长交期
 	 */
 	 */
-	@Column(name = "go_selfmaxdelivery")
+	@Column(name = "rel_selfmaxdelivery")
 	private Short selfMaxDelivery;
 	private Short selfMaxDelivery;
 
 
 	/**
 	/**
 	 * 自己填写最短交期
 	 * 自己填写最短交期
 	 */
 	 */
-	@Column(name = "go_selfcmindelivery")
+	@Column(name = "rel_selfmindelivery")
 	private Short selfMinDelivery;
 	private Short selfMinDelivery;
 
 
+	/**
+	 * 自己填写最长交期 String
+	 */
+	@Column(name = "rel_selfmaxdeliverystr")
+	private String selfMaxDeliveryStr;
+
+	/**
+	 * 自己填写最短交期 String
+	 */
+	@Column(name = "rel_selfmindeliverystr")
+	private String selfMinDeliveryStr;
+
 //	/**
 //	/**
 //	 * 商城最长交期
 //	 * 商城最长交期
 //	 */
 //	 */
@@ -300,6 +323,12 @@ public class ReleaseProductByBatch implements Serializable {
 	@Column(name = "rel_usdprice")
 	@Column(name = "rel_usdprice")
 	private Double usdMinPackPrice;
 	private Double usdMinPackPrice;
 
 
+	/**
+	 * 最小包价格String 类型
+	 */
+	@Column(name = "rel_minpackpricestr")
+	private String minPackPriceStr;
+
 	/**
 	/**
 	 * 图片path,便于发布
 	 * 图片path,便于发布
 	 */
 	 */
@@ -318,32 +347,41 @@ public class ReleaseProductByBatch implements Serializable {
 	@Column(name = "rel_kind_uuid")
 	@Column(name = "rel_kind_uuid")
 	private Long kindUuid;
 	private Long kindUuid;
 
 
-	@Transient
-	private Double seg1qty;
-
-	@Transient
-	private Double seg1RMBPrice;
-
-	@Transient
-	private Double seg1USDPrice;
-
-	@Transient
-	private Double seg2qty;
+	/**
+	 * 第一个分段数量
+	 */
+	@Column(name = "rel_qty1str")
+	private String qty1Str;
 
 
-	@Transient
-	private Double seg2RMBPrice;
+	/**
+	 * 第二个分段数量
+	 */
+	@Column(name = "rel_qty2str")
+	private String qty2Str;
 
 
-	@Transient
-	private Double seg2USDPrice;
+	/**
+	 * 第三个分段数量
+	 */
+	@Column(name = "rel_qty3str")
+	private String qty3Str;
 
 
-	@Transient
-	private Double seg3qty;
+	/**
+	 * 第一个分段的价格
+	 */
+	@Column(name = "rel_price1")
+	private String price1;
 
 
-	@Transient
-	private Double seg3RMBPrice;
+	/**
+	 * 第二个分段的价格
+	 */
+	@Column(name = "rel_price2")
+	private String price2;
 
 
-	@Transient
-	private Double seg3USDPrice;
+	/**
+	 * 第三个分段的价格
+	 */
+	@Column(name = "rel_price3")
+	private String price3;
 
 
 	/**
 	/**
 	 * 错误的信息
 	 * 错误的信息
@@ -475,76 +513,58 @@ public class ReleaseProductByBatch implements Serializable {
 		this.unit = unit;
 		this.unit = unit;
 	}
 	}
 
 
-	public Double getSeg1qty() {
-		return seg1qty;
-	}
-
-	public void setSeg1qty(Double seg1qty) {
-		this.seg1qty = seg1qty;
-	}
-
-	public Double getSeg1RMBPrice() {
-		return seg1RMBPrice;
-	}
-
-	public void setSeg1RMBPrice(Double seg1rmbPrice) {
-		seg1RMBPrice = seg1rmbPrice;
+	public String getQty1Str() {
+		return qty1Str;
 	}
 	}
 
 
-	public Double getSeg1USDPrice() {
-		return seg1USDPrice;
-	}
-
-	public void setSeg1USDPrice(Double seg1usdPrice) {
-		seg1USDPrice = seg1usdPrice;
-	}
-
-	public Double getSeg2qty() {
-		return seg2qty;
-	}
-
-	public void setSeg2qty(Double seg2qty) {
-		this.seg2qty = seg2qty;
+	public ReleaseProductByBatch setQty1Str(String qty1Str) {
+		this.qty1Str = qty1Str;
+		return this;
 	}
 	}
 
 
-	public Double getSeg2RMBPrice() {
-		return seg2RMBPrice;
+	public String getQty2Str() {
+		return qty2Str;
 	}
 	}
 
 
-	public void setSeg2RMBPrice(Double seg2rmbPrice) {
-		seg2RMBPrice = seg2rmbPrice;
+	public ReleaseProductByBatch setQty2Str(String qty2Str) {
+		this.qty2Str = qty2Str;
+		return this;
 	}
 	}
 
 
-	public Double getSeg2USDPrice() {
-		return seg2USDPrice;
+	public String getQty3Str() {
+		return qty3Str;
 	}
 	}
 
 
-	public void setSeg2USDPrice(Double seg2usdPrice) {
-		seg2USDPrice = seg2usdPrice;
+	public ReleaseProductByBatch setQty3Str(String qty3Str) {
+		this.qty3Str = qty3Str;
+		return this;
 	}
 	}
 
 
-	public Double getSeg3qty() {
-		return seg3qty;
+	public String getPrice1() {
+		return price1;
 	}
 	}
 
 
-	public void setSeg3qty(Double seg3qty) {
-		this.seg3qty = seg3qty;
+	public ReleaseProductByBatch setPrice1(String price1) {
+		this.price1 = price1;
+		return this;
 	}
 	}
 
 
-	public Double getSeg3RMBPrice() {
-		return seg3RMBPrice;
+	public String getPrice2() {
+		return price2;
 	}
 	}
 
 
-	public void setSeg3RMBPrice(Double seg3rmbPrice) {
-		seg3RMBPrice = seg3rmbPrice;
+	public ReleaseProductByBatch setPrice2(String price2) {
+		this.price2 = price2;
+		return this;
 	}
 	}
 
 
-	public Double getSeg3USDPrice() {
-		return seg3USDPrice;
+	public String getPrice3() {
+		return price3;
 	}
 	}
 
 
-	public void setSeg3USDPrice(Double seg3usdPrice) {
-		seg3USDPrice = seg3usdPrice;
+	public ReleaseProductByBatch setPrice3(String price3) {
+		this.price3 = price3;
+		return this;
 	}
 	}
 
 
 	public String getRelbatchid() {
 	public String getRelbatchid() {
@@ -902,39 +922,6 @@ public class ReleaseProductByBatch implements Serializable {
 		}
 		}
 	}
 	}
 
 
-	/**
-	 * 分段填充到字段中
-	 * 
-	 * @return
-	 */
-	public void fillSegData() {
-		List<GoodsQtyPrice> prices2 = getPrices();
-		if (!CollectionUtils.isEmpty(prices2)) {
-			for (int i = 0; i < prices2.size(); i++) {
-				switch (i) {
-				case 0:
-					this.seg1qty = prices2.get(0).getStart();
-					this.seg1RMBPrice = prices2.get(0).getRMBPrice();
-					this.seg1USDPrice = prices2.get(0).getUSDPrice();
-					break;
-				case 1:
-					this.seg1qty = prices2.get(1).getStart();
-					this.seg1RMBPrice = prices2.get(1).getRMBPrice();
-					this.seg1USDPrice = prices2.get(1).getUSDPrice();
-					break;
-				case 2:
-					this.seg1qty = prices2.get(2).getStart();
-					this.seg1RMBPrice = prices2.get(2).getRMBPrice();
-					this.seg1USDPrice = prices2.get(2).getUSDPrice();
-					break;
-				default:
-					throw new IllegalOperatorException("当前的分段超过了三个,请确定信息之后再上传。");
-				}
-
-			}
-		}
-	}
-
 	/**
 	/**
 	 * 用人民币含税单价修改未含税人民币单价
 	 * 用人民币含税单价修改未含税人民币单价
 	 */
 	 */
@@ -1161,4 +1148,98 @@ public class ReleaseProductByBatch implements Serializable {
 		this.breakUpStr = breakUpStr;
 		this.breakUpStr = breakUpStr;
 		return this;
 		return this;
 	}
 	}
+
+	public String getReserveStr() {
+		return reserveStr;
+	}
+
+	public ReleaseProductByBatch setReserveStr(String reserveStr) {
+		this.reserveStr = reserveStr;
+		return this;
+	}
+
+	public String getMinBuyQtyStr() {
+		return minBuyQtyStr;
+	}
+
+	public ReleaseProductByBatch setMinBuyQtyStr(String minBuyQtyStr) {
+		this.minBuyQtyStr = minBuyQtyStr;
+		return this;
+	}
+
+	public String getMinPackageStr() {
+		return minPackageStr;
+	}
+
+	public ReleaseProductByBatch setMinPackageStr(String minPackageStr) {
+		this.minPackageStr = minPackageStr;
+		return this;
+	}
+
+	public String getMinPackPriceStr() {
+		return minPackPriceStr;
+	}
+
+	public ReleaseProductByBatch setMinPackPriceStr(String minPackPriceStr) {
+		this.minPackPriceStr = minPackPriceStr;
+		return this;
+	}
+
+	public String getSelfMaxDeliveryStr() {
+		return selfMaxDeliveryStr;
+	}
+
+	public ReleaseProductByBatch setSelfMaxDeliveryStr(String selfMaxDeliveryStr) {
+		this.selfMaxDeliveryStr = selfMaxDeliveryStr;
+		return this;
+	}
+
+	public String getSelfMinDeliveryStr() {
+		return selfMinDeliveryStr;
+	}
+
+	public ReleaseProductByBatch setSelfMinDeliveryStr(String selfMinDeliveryStr) {
+		this.selfMinDeliveryStr = selfMinDeliveryStr;
+		return this;
+	}
+
+	/**
+	 * 设置结束量的String 值
+	 * @param qty 结束值
+	 * @param i 分段的数值
+	 */
+	public void setFragmentQty(String qty, int i) {
+		qty = StringUtilB2C.isEmpty(qty) ? "" : qty;
+		switch (i) {
+			case 0:
+				this.qty1Str = qty;
+				break;
+			case 1:
+				this.qty2Str = qty;
+				break;
+			case 2:
+				this.qty3Str = qty;
+				break;
+		}
+	}
+
+	/**
+	 * 设置分段价格String 供下载
+	 * @param price 分段价格
+	 * @param i 第几个分段
+	 */
+	public void setFragmentPrice(String price, int i) {
+		price = StringUtilB2C.isEmpty(price) ? "" : price;
+		switch (i) {
+			case 0:
+				this.price1 = price;
+				break;
+			case 1:
+				this.price2 = price;
+				break;
+			case 2:
+				this.price3 = price;
+				break;
+		}
+	}
 }
 }

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

@@ -7,6 +7,7 @@ import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.core.utils.RegexConstant;
 import com.uas.platform.b2c.core.utils.RegexConstant;
+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.DoubleConstant;
 import com.uas.platform.b2c.prod.commodity.constant.ShortConstant;
 import com.uas.platform.b2c.prod.commodity.constant.ShortConstant;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
@@ -25,7 +26,6 @@ import com.uas.platform.b2c.trade.order.StringConstant.Currency;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.ReleaseStatus;
 import com.uas.platform.core.model.ReleaseStatus;
-import com.uas.platform.core.model.Type;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.ss.usermodel.*;
@@ -48,7 +48,6 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.regex.Pattern;
 
 
 import static com.uas.platform.b2c.core.utils.NumberUtil.fractionNumCeil;
 import static com.uas.platform.b2c.core.utils.NumberUtil.fractionNumCeil;
-import static java.util.Collections.emptyList;
 
 
 @Service
 @Service
 public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchService {
 public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchService {
@@ -95,7 +94,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		Pattern chineseAndEnglishPattern = Pattern.compile(RegexConstant.chineseAndEnglish);
 		Pattern chineseAndEnglishPattern = Pattern.compile(RegexConstant.chineseAndEnglish);
 		Sheet sheet = workbook.getSheetAt(0);
 		Sheet sheet = workbook.getSheetAt(0);
 		int colNum = sheet.getRow(0).getPhysicalNumberOfCells();
 		int colNum = sheet.getRow(0).getPhysicalNumberOfCells();
-		if(colNum != 21) {
+		if(colNum != 19 && colNum != 20) {
 			throw new IllegalOperatorException("您上传的信息列信息不正确,请与模板的列做比较");
 			throw new IllegalOperatorException("您上传的信息列信息不正确,请与模板的列做比较");
 		}
 		}
 		int rowNum = sheet.getLastRowNum();
 		int rowNum = sheet.getLastRowNum();
@@ -105,13 +104,13 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		Row headerRow = sheet.getRow(0);
 		Row headerRow = sheet.getRow(0);
 		int total = 0;
 		int total = 0;
 		if (headerRow != null) {
 		if (headerRow != null) {
-			Cell cellHead = headerRow.getCell(0);
-			Object readWorkBookCell = readWorkBookCell(cellHead, Cell.CELL_TYPE_STRING, 0, 0);
-			Pattern p = Pattern.compile("\\s*|\t|\r|\n");
-            Matcher m = p.matcher(readWorkBookCell.toString());
-            String str = m.replaceAll("");
-			if(StringUtils.isEmpty(str) || !("中文产品品牌".equals(str))) {
-				throw new IllegalOperatorException("上传的文件信息第一列的表头为空,或第一列的表头名称不为中文产品品牌");
+			if(colNum == 20) {
+				Cell errorCell = headerRow.getCell(19);
+				Object errorCellObj = readWorkBookCell(errorCell, Cell.CELL_TYPE_STRING, 0, 0);
+				String errorHead = StringUtilB2C.replaceLineBreak(String.valueOf(errorCellObj));
+				if(StringUtils.isEmpty(errorHead) || !("错误提示".equals(errorHead))) {
+					throw new IllegalOperatorException("您上传的信息列信息不正确,请与模板的列做比较");
+				}
 			}
 			}
 			for (int r = 1; r <= rowNum; r++) {
 			for (int r = 1; r <= rowNum; r++) {
 				Row row = sheet.getRow(r);
 				Row row = sheet.getRow(r);
@@ -122,29 +121,20 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					releaseProductByBatch.setReleaseCode(ReleaseStatus.success.value());
 					releaseProductByBatch.setReleaseCode(ReleaseStatus.success.value());
 					releaseProductByBatch.setReleaseStatus(ReleaseStatus.success.getPhrase());
 					releaseProductByBatch.setReleaseStatus(ReleaseStatus.success.getPhrase());
 					releaseProductByBatch.setRelbatchid(batch);
 					releaseProductByBatch.setRelbatchid(batch);
+
 					Cell cell = row.getCell(1);
 					Cell cell = row.getCell(1);
 					Object cellValue = readWorkBookCell(cell, Cell.CELL_TYPE_STRING, r, 1);
 					Object cellValue = readWorkBookCell(cell, Cell.CELL_TYPE_STRING, r, 1);
-					if(StringUtils.isEmpty(cellValue)) {
-						continue;
-					}else {
-						releaseProductByBatch.setBrandNameEn(String.valueOf(cellValue));
-					}
+					releaseProductByBatch.setBrandNameEn(String.valueOf(cellValue));
 
 
 					// 中文品牌名
 					// 中文品牌名
 					Object brandNameCnCellValue = readWorkBookCell(row.getCell(0), Cell.CELL_TYPE_STRING, r, 0);
 					Object brandNameCnCellValue = readWorkBookCell(row.getCell(0), Cell.CELL_TYPE_STRING, r, 0);
-					if(StringUtils.isEmpty(brandNameCnCellValue)) {
-						continue;
-					}else {
-						releaseProductByBatch.setBrandNameCn(String.valueOf(brandNameCnCellValue));
-					}
+					releaseProductByBatch.setBrandNameCn(String.valueOf(brandNameCnCellValue));
 
 
 					// 产品型号
 					// 产品型号
 					Object codeCellValue = readWorkBookCell(row.getCell(2), Cell.CELL_TYPE_STRING, r, 2);
 					Object codeCellValue = readWorkBookCell(row.getCell(2), Cell.CELL_TYPE_STRING, r, 2);
-					if(StringUtils.isEmpty(codeCellValue)) {
-						continue;
-					}else {
+					releaseProductByBatch.setCode(String.valueOf(codeCellValue));
+					if(!StringUtils.isEmpty(codeCellValue)) {
 						String code = codeCellValue.toString();
 						String code = codeCellValue.toString();
-						releaseProductByBatch.setCode(code);
 						Matcher matcher = codePattern.matcher(code);
 						Matcher matcher = codePattern.matcher(code);
 						if(!matcher.find()) {
 						if(!matcher.find()) {
 							releaseProductByBatch.addErrmsg("3:产品型号仅限英文、数字、特殊字符");
 							releaseProductByBatch.addErrmsg("3:产品型号仅限英文、数字、特殊字符");
@@ -161,106 +151,123 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					}
 					}
 
 
 					// 库存类型
 					// 库存类型
-					Object originialCellValue = readWorkBookCell(row.getCell(4), Cell.CELL_TYPE_STRING, r, 4);
-					if (StringUtils.isEmpty(originialCellValue)
-							|| ((!"现货".equals(originialCellValue)) && (!"呆滞库存".equals(originialCellValue)))) {
-						releaseProductByBatch.addErrmsg("5:库存类型为空,或者没有选择现货或者呆滞库存");
-					} else {
-						if ("现货".equals(originialCellValue)) {
-							releaseProductByBatch.setOriginal(Type.Goods_Original_Code.value());
-						} else if ("呆滞库存".equals(originialCellValue)) {
-							releaseProductByBatch.setOriginal(Type.Goods_Inaction_Stock.value());
-						}
-					}
+//					Object originialCellValue = readWorkBookCell(row.getCell(4), Cell.CELL_TYPE_STRING, r, 4);
+//					if (StringUtils.isEmpty(originialCellValue)
+//							|| ((!"现货".equals(originialCellValue)) && (!"呆滞库存".equals(originialCellValue)))) {
+//						releaseProductByBatch.addErrmsg("5:库存类型为空,或者没有选择现货或者呆滞库存");
+//					} else {
+//						if ("现货".equals(originialCellValue)) {
+//							releaseProductByBatch.setOriginal(Type.Goods_Original_Code.value());
+//						} else if ("呆滞库存".equals(originialCellValue)) {
+//							releaseProductByBatch.setOriginal(Type.Goods_Inaction_Stock.value());
+//						}
+//					}
 
 
 					// 发布库存量
 					// 发布库存量
 					Double reserve = null;
 					Double reserve = null;
-					Object reserveCellValue = readWorkBookCell(row.getCell(5), Cell.CELL_TYPE_STRING, r, 5);
+					Object reserveCellValue = readWorkBookCell(row.getCell(4), Cell.CELL_TYPE_STRING, r, 4);
+					releaseProductByBatch.setReserveStr(String.valueOf(reserveCellValue));
 					if (reserveCellValue == null || !isNumber(reserveCellValue.toString())) {
 					if (reserveCellValue == null || !isNumber(reserveCellValue.toString())) {
-						releaseProductByBatch.addErrmsg("6:发布数量为空或者不是数字");
+						releaseProductByBatch.addErrmsg("5:发布数量为空或者不是数字");
 					} else {
 					} else {
 						reserve = Double.valueOf(reserveCellValue.toString());
 						reserve = Double.valueOf(reserveCellValue.toString());
-						int compareTo = reserve.compareTo(99999999d);
+						int compareTo = reserve.compareTo(DoubleConstant.maxReserve);
 						if(compareTo > 0) {
 						if(compareTo > 0) {
 							releaseProductByBatch.addErrmsg("6:发布数量大于了我们设置的最大值99999999");
 							releaseProductByBatch.addErrmsg("6:发布数量大于了我们设置的最大值99999999");
-						}else if(NumberUtil.compare(reserve, 0.0) < 1) {
+						}else if(NumberUtil.compare(reserve, DoubleConstant.zero) < 1) {
 							releaseProductByBatch.addErrmsg("6:发布数量必须大于0");
 							releaseProductByBatch.addErrmsg("6:发布数量必须大于0");
 						}
 						}
 						releaseProductByBatch.setReserve(reserve);
 						releaseProductByBatch.setReserve(reserve);
 					}
 					}
 
 
 					// 生产日期
 					// 生产日期
-					Object produceDateCellValue = readWorkBookCell(row.getCell(6), Cell.CELL_TYPE_STRING, r, 6);
-					if (produceDateCellValue == null) {
-						releaseProductByBatch.addErrmsg("7:产品生产日期不可以为空");
-					} else {
-						releaseProductByBatch.setProductDate(String.valueOf(produceDateCellValue));
+					Object produceDateCellValue = readWorkBookCell(row.getCell(5), Cell.CELL_TYPE_STRING, r, 5);
+					releaseProductByBatch.setProductDate(String.valueOf(produceDateCellValue));
+					if (StringUtils.isEmpty(produceDateCellValue)) {
+						releaseProductByBatch.addErrmsg("6:产品生产日期不可以为空");
 					}
 					}
 
 
 					//包装方式
 					//包装方式
 					String packaging = null;
 					String packaging = null;
-					Object packagingCellValue = readWorkBookCell(row.getCell(7), Cell.CELL_TYPE_STRING, r, 7);
+					Object packagingCellValue = readWorkBookCell(row.getCell(6), Cell.CELL_TYPE_STRING, r, 6);
+					releaseProductByBatch.setPackaging(String.valueOf(packagingCellValue));
 					if (packagingCellValue == null || StringUtils.isEmpty(packagingCellValue.toString())) {
 					if (packagingCellValue == null || StringUtils.isEmpty(packagingCellValue.toString())) {
-						releaseProductByBatch.addErrmsg("8:包装方式不能为空");
+						releaseProductByBatch.addErrmsg("7:包装方式不能为空");
 					} else {
 					} else {
 						packaging = packagingCellValue.toString();
 						packaging = packagingCellValue.toString();
-						releaseProductByBatch.setPackaging(packaging);
 						Matcher matcher = chineseAndEnglishPattern.matcher(packaging);
 						Matcher matcher = chineseAndEnglishPattern.matcher(packaging);
 						if(!matcher.find()) {
 						if(!matcher.find()) {
-							releaseProductByBatch.addErrmsg("8:包装方式仅限中文或英文");
+							releaseProductByBatch.addErrmsg("7:包装方式仅限中文或英文");
 						}
 						}
 					}
 					}
 
 
-					Double sample = null;
-					Object sampleObj = readWorkBookCell(row.getCell(8), Cell.CELL_TYPE_STRING, r, 8);
-					if ((sampleObj != null)&&(isNumber(sampleObj.toString()))) {
-						sample = Double.valueOf(sampleObj.toString());
-						if (sample <= 0) {
-							// 这个是存在输入数据后再删除就会默认成0
-							releaseProductByBatch.setSampleqty((double) 0);
-						} else {
-							releaseProductByBatch.setSampleqty(sample);
+//					Double sample = null;
+//					Object sampleObj = readWorkBookCell(row.getCell(8), Cell.CELL_TYPE_STRING, r, 8);
+//					if ((sampleObj != null)&&(isNumber(sampleObj.toString()))) {
+//						sample = Double.valueOf(sampleObj.toString());
+//						if (sample <= 0) {
+//							// 这个是存在输入数据后再删除就会默认成0
+//							releaseProductByBatch.setSampleqty((double) 0);
+//						} else {
+//							releaseProductByBatch.setSampleqty(sample);
+//						}
+//					} else {
+//						// 这个是没有输入数据默认为null
+//						releaseProductByBatch.setMinPackage((double) 0);
+//					}
+
+					//封装方式
+//					Object encapsulationCellValue = readWorkBookCell(row.getCell(6), Cell.CELL_TYPE_STRING, r, 6);
+//					releaseProductByBatch.setEncapsulation(String.valueOf(encapsulationCellValue));
+
+					// 最小包装量
+					Object minPackQtyCellValue = readWorkBookCell(row.getCell(8), Cell.CELL_TYPE_STRING, r, 8);
+					releaseProductByBatch.setMinPackageStr(String.valueOf(minPackQtyCellValue));
+					if ((minPackQtyCellValue != null)&&(isNumber(minPackQtyCellValue.toString()))) {
+						Double minPackQty = Double.valueOf(minPackQtyCellValue.toString());
+						if (minPackQty <= 0) {
+							// 输入负数,默认为1
+							releaseProductByBatch.setMinPackage(DoubleConstant.minReserve);
+						}else if(NumberUtil.compare(minPackQty, DoubleConstant.maxMinPackageQty) > 0){
+							releaseProductByBatch.setMinPackage(DoubleConstant.maxMinPackageQty);
+						}else {
+							releaseProductByBatch.setMinPackage(minPackQty);
 						}
 						}
-					} else {
-						// 这个是没有输入数据默认为null
-						releaseProductByBatch.setMinPackage((double) 0);
+					}else {
+						releaseProductByBatch.setMinPackage(DoubleConstant.minReserve);
 					}
 					}
 
 
-					//封装方式
-					Object encapsulationCellValue = readWorkBookCell(row.getCell(6), Cell.CELL_TYPE_STRING, r, 6);
-					releaseProductByBatch.setEncapsulation(String.valueOf(encapsulationCellValue));
-					
 					// 最小起订量
 					// 最小起订量
-					Object minBuyCellValue = readWorkBookCell(row.getCell(9), Cell.CELL_TYPE_STRING, r, 9);
+					Object minBuyCellValue = readWorkBookCell(row.getCell(7), Cell.CELL_TYPE_STRING, r, 7);
+					releaseProductByBatch.setMinBuyQtyStr(String.valueOf(minBuyCellValue));
 					if ((minBuyCellValue != null)&&(isNumber(minBuyCellValue.toString()))) {
 					if ((minBuyCellValue != null)&&(isNumber(minBuyCellValue.toString()))) {
 						Double minBuy = Double.valueOf(minBuyCellValue.toString());
 						Double minBuy = Double.valueOf(minBuyCellValue.toString());
 						if (minBuy <= 0) {
 						if (minBuy <= 0) {
 							// 输入负数
 							// 输入负数
-							releaseProductByBatch.addErrmsg("10:最小起订量的数量不能是负数");
-						} else {
+							releaseProductByBatch.setMinBuyQty(releaseProductByBatch.getMinPackage());
+						}else {
 							Double rel_reserve = releaseProductByBatch.getReserve() == null ? 0 : releaseProductByBatch.getReserve();
 							Double rel_reserve = releaseProductByBatch.getReserve() == null ? 0 : releaseProductByBatch.getReserve();
 							int relVal = minBuy.compareTo(rel_reserve);
 							int relVal = minBuy.compareTo(rel_reserve);
 							if(relVal > 0) {
 							if(relVal > 0) {
-								releaseProductByBatch.addErrmsg("10:最小起订量的数量不能大于库存的数量");
+								releaseProductByBatch.setMinBuyQty(releaseProductByBatch.getReserve());
+							}else {
+								releaseProductByBatch.setMinBuyQty(minBuy);
+							}
+							if(!releaseProductByBatch.getBreakUp()) {
+								double v = releaseProductByBatch.getMinBuyQty() % releaseProductByBatch.getMinPackage();
+								if(NumberUtil.compare(v, 0.0) != 0) {
+									double sub = NumberUtil.sub(releaseProductByBatch.getMinBuyQty(), v);
+									double add = NumberUtil.add(sub, releaseProductByBatch.getMinPackage());
+									if(NumberUtil.compare(add, releaseProductByBatch.getReserve()) > 0) {
+										releaseProductByBatch.setMinBuyQty(sub);
+									}else {
+										releaseProductByBatch.setMinBuyQty(add);
+									}
+								}
 							}
 							}
-							releaseProductByBatch.setMinBuyQty(minBuy);
-						}
-					}else {
-						releaseProductByBatch.addErrmsg("10:最小起订量的数量不可以为空且只能是数字");
-					}
-					
-					// 最小包装量
-					Object minPackQtyCellValue = readWorkBookCell(row.getCell(10), Cell.CELL_TYPE_STRING, r, 10);
-					if ((minPackQtyCellValue != null)&&(isNumber(minPackQtyCellValue.toString()))) {
-						Double minPackQty = Double.valueOf(minPackQtyCellValue.toString());
-						if (minPackQty <= 0) {
-							// 输入负数
-							releaseProductByBatch.addErrmsg("11:最小包装量的数量不能是负数");
-						} else {
-							releaseProductByBatch.setMinPackage(minPackQty);
 						}
 						}
 					}else {
 					}else {
-						releaseProductByBatch.addErrmsg("11:最小包装量不可以为空且只能是数字");
+						releaseProductByBatch.setMinBuyQty(releaseProductByBatch.getMinPackage());
 					}
 					}
 
 
 					// 确认币别
 					// 确认币别
@@ -273,7 +280,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					}
 					}
 
 
 					// 最小包单价
 					// 最小包单价
-					Object priceMinPackQtyCellValue = readWorkBookCell(row.getCell(11), Cell.CELL_TYPE_STRING, r, 11);
+					Object priceMinPackQtyCellValue = readWorkBookCell(row.getCell(9), Cell.CELL_TYPE_STRING, r, 9);
+					releaseProductByBatch.setMinPackPriceStr(String.valueOf(priceMinPackQtyCellValue));
 					if ((priceMinPackQtyCellValue != null)&&(isNumber(priceMinPackQtyCellValue.toString()))) {
 					if ((priceMinPackQtyCellValue != null)&&(isNumber(priceMinPackQtyCellValue.toString()))) {
 						Double price = Double.valueOf(priceMinPackQtyCellValue.toString());
 						Double price = Double.valueOf(priceMinPackQtyCellValue.toString());
 						price = fractionNumCeil(price, 6);
 						price = fractionNumCeil(price, 6);
@@ -283,37 +291,39 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 							releaseProductByBatch.setRmbMinPackPrice(price);
 							releaseProductByBatch.setRmbMinPackPrice(price);
 						}
 						}
 					}else {
 					}else {
-						releaseProductByBatch.addErrmsg("最小包单价信息为空");
+						releaseProductByBatch.addErrmsg("10:最小包单价信息为空");
 					}
 					}
 
 
-					Object deliveryMinCellValue = readWorkBookCell(row.getCell(12), Cell.CELL_TYPE_STRING, r, 12);
-					Object deliveryMaxCellValue = readWorkBookCell(row.getCell(13), Cell.CELL_TYPE_STRING, r, 13);
+					Object deliveryMinCellValue = readWorkBookCell(row.getCell(10), Cell.CELL_TYPE_STRING, r, 10);
+					Object deliveryMaxCellValue = readWorkBookCell(row.getCell(11), Cell.CELL_TYPE_STRING, r, 11);
+					releaseProductByBatch.setSelfMinDeliveryStr(String.valueOf(deliveryMinCellValue));
+					releaseProductByBatch.setSelfMaxDeliveryStr(String.valueOf(deliveryMaxCellValue));
 					if(StringUtils.isEmpty(deliveryMinCellValue) && StringUtils.isEmpty(deliveryMaxCellValue)) {
 					if(StringUtils.isEmpty(deliveryMinCellValue) && StringUtils.isEmpty(deliveryMaxCellValue)) {
-						releaseProductByBatch.addErrmsg("13-14:存在交期的信息为空");
+						releaseProductByBatch.addErrmsg("11-12:存在交期的信息为空");
 					}else {
 					}else {
 						setDeliveryTime(releaseProductByBatch, deliveryMinCellValue, deliveryMaxCellValue);
 						setDeliveryTime(releaseProductByBatch, deliveryMinCellValue, deliveryMaxCellValue);
 					}
 					}
 
 
 					// 分段数量
 					// 分段数量
 					List<GoodsQtyPrice> prices = new ArrayList<GoodsQtyPrice>();
 					List<GoodsQtyPrice> prices = new ArrayList<GoodsQtyPrice>();
-					Double[] priceMaxMinPrice = {Double.MAX_VALUE, Double.MIN_VALUE, Double.MAX_VALUE, Double.MIN_VALUE}; //最小人民币价格,最大人民币价格,最小美金价格,最大美金价格
+					Double[] priceMaxMinPrice = {Double.MAX_VALUE, Double.MIN_VALUE}; //最小价格,最大价格
 					for (int i = 0; i < 3; i++) {
 					for (int i = 0; i < 3; i++) {
-						// 起始量必须等于最小起定量
-						readSectionPrice(row.getCell(14 + 2 * i), row.getCell(15 + 2 * i),
-								prices, releaseProductByBatch, r, (14 + 2 * i), priceMaxMinPrice);
+						//起始量必须等于最小起定量
+						readSectionPrice(row.getCell(12 + 2 * i), row.getCell(13 + 2 * i),
+								prices, releaseProductByBatch, r, (12 + 2 * i), priceMaxMinPrice, i);
 					}
 					}
 					if (!CollectionUtils.isEmpty(prices)) {
 					if (!CollectionUtils.isEmpty(prices)) {
-						setPricesQty(prices, releaseProductByBatch);
+						prices = setPricesQty(prices, releaseProductByBatch);
 					} else {
 					} else {
 						// 如果未填分段价格,默认为最小包装量价格
 						// 如果未填分段价格,默认为最小包装量价格
 						GoodsQtyPrice qtyPrice = new GoodsQtyPrice();
 						GoodsQtyPrice qtyPrice = new GoodsQtyPrice();
-						qtyPrice.setStart(releaseProductByBatch.getMinBuyQty());
+						qtyPrice.setStart(DoubleConstant.minReserve);
 						if(Currency.USD.equals(releaseProductByBatch.getCurrency())) {
 						if(Currency.USD.equals(releaseProductByBatch.getCurrency())) {
 							Double usdMinPackPrice = releaseProductByBatch.getUsdMinPackPrice();
 							Double usdMinPackPrice = releaseProductByBatch.getUsdMinPackPrice();
 							qtyPrice.setUSDPrice(usdMinPackPrice);
 							qtyPrice.setUSDPrice(usdMinPackPrice);
 							qtyPrice.setUSDNTPrice(usdMinPackPrice);
 							qtyPrice.setUSDNTPrice(usdMinPackPrice);
-							priceMaxMinPrice[2] = usdMinPackPrice;
-							priceMaxMinPrice[3] = usdMinPackPrice;
+							priceMaxMinPrice[0] = usdMinPackPrice;
+							priceMaxMinPrice[1] = usdMinPackPrice;
 						}else {
 						}else {
 							Double rmbMinPackPrice = releaseProductByBatch.getRmbMinPackPrice();
 							Double rmbMinPackPrice = releaseProductByBatch.getRmbMinPackPrice();
 							qtyPrice.setRMBPrice(rmbMinPackPrice);
 							qtyPrice.setRMBPrice(rmbMinPackPrice);
@@ -323,22 +333,18 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 							priceMaxMinPrice[0] = rmbMinPackPrice;
 							priceMaxMinPrice[0] = rmbMinPackPrice;
 							priceMaxMinPrice[1] = rmbMinPackPrice;
 							priceMaxMinPrice[1] = rmbMinPackPrice;
 						}
 						}
-						qtyPrice.setEnd(reserve);
+						qtyPrice.setEnd(DoubleConstant.maxReserve);
 						prices.add(qtyPrice);
 						prices.add(qtyPrice);
 					}
 					}
 					releaseProductByBatch.setPrices(prices);
 					releaseProductByBatch.setPrices(prices);
-					if(!priceMaxMinPrice[0].equals(Double.MAX_VALUE)) {
+					if(Currency.USD.equals(releaseProductByBatch.getCurrency())) {
+						releaseProductByBatch.setMinPriceUSD(priceMaxMinPrice[0]);
+						releaseProductByBatch.setMaxPriceUSD(priceMaxMinPrice[1]);
+					}else {
 						releaseProductByBatch.setMinPriceRMB(priceMaxMinPrice[0]);
 						releaseProductByBatch.setMinPriceRMB(priceMaxMinPrice[0]);
-					}
-					if(!priceMaxMinPrice[1].equals(Double.MIN_VALUE)) {
 						releaseProductByBatch.setMaxPriceRMB(priceMaxMinPrice[1]);
 						releaseProductByBatch.setMaxPriceRMB(priceMaxMinPrice[1]);
 					}
 					}
-					if(!priceMaxMinPrice[2].equals(Double.MAX_VALUE)) {
-						releaseProductByBatch.setMinPriceUSD(priceMaxMinPrice[2]);
-					}
-					if(!priceMaxMinPrice[3].equals(Double.MIN_VALUE)) {
-						releaseProductByBatch.setMaxPriceUSD(priceMaxMinPrice[3]);
-					}
+
 
 
 					// 备注
 					// 备注
 					Object remarkCellValue = readWorkBookCell(row.getCell(20), Cell.CELL_TYPE_STRING, r, 20);
 					Object remarkCellValue = readWorkBookCell(row.getCell(20), Cell.CELL_TYPE_STRING, r, 20);
@@ -379,8 +385,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	/**
 	/**
 	 * 分析分段的价格
 	 * 分析分段的价格
  	 */
  	 */
-	private void setPricesQty(List<GoodsQtyPrice> prices, ReleaseProductByBatch productByBatch) {
-		double end = -1;
+	private List<GoodsQtyPrice> setPricesQty(List<GoodsQtyPrice> prices, ReleaseProductByBatch productByBatch) {
 		GoodsQtyPrice[] array = new GoodsQtyPrice[prices.size()];
 		GoodsQtyPrice[] array = new GoodsQtyPrice[prices.size()];
 		prices.toArray(array);
 		prices.toArray(array);
 		Arrays.sort(array, new Comparator<GoodsQtyPrice>() {
 		Arrays.sort(array, new Comparator<GoodsQtyPrice>() {
@@ -389,23 +394,32 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				return NumberUtil.compare(o1.getEnd(), o2.getEnd());
 				return NumberUtil.compare(o1.getEnd(), o2.getEnd());
 			}
 			}
 		});
 		});
-		List<GoodsQtyPrice> priceList = Collections.<GoodsQtyPrice>emptyList();
-		for (int j = 0; j < priceList.size(); j++) {
-			GoodsQtyPrice price = priceList.get(j);
-			if(NumberUtil.compare(end, -1d) == 0) {
-				if(NumberUtil.compare(price.getEnd(), productByBatch.getMinBuyQty()) > 0) {
-					price.setStart(productByBatch.getMinBuyQty());
-					end = price.getEnd();
+		List<GoodsQtyPrice> prices1 = Arrays.asList(array);
+		List<GoodsQtyPrice> prices2 = new ArrayList<>();
+		for (int j = 0; j < prices1.size(); j++) {
+			GoodsQtyPrice price = prices1.get(j);
+			if(j == 0) {
+				if(NumberUtil.compare(price.getEnd(), DoubleConstant.minReserve) > 0) {
+					price.setStart(DoubleConstant.minReserve);
+					prices2.add(price);
 				}
 				}
-			}
-
-			if (j < prices.size() - 1) {
-				price.setEnd(prices.get(j - 1).getStart() - 1);
-			}
-			if (j == prices.size() - 1) {
+			}else if (j < prices1.size() - 1) {
+				GoodsQtyPrice qtyPrice = prices1.get(j - 1);
+				if(NumberUtil.compare(qtyPrice.getEnd(), price.getEnd()) < 0 ) {
+					price.setStart(NumberUtil.add(qtyPrice.getEnd(), 1.0d));
+					prices2.add(price);
+				}
+			}else if (j == prices1.size() - 1) {
 				price.setEnd(DoubleConstant.maxReserve);
 				price.setEnd(DoubleConstant.maxReserve);
+				if(prices1.size() == 1) {
+					price.setStart(DoubleConstant.minReserve);
+				}else {
+					price.setStart(NumberUtil.add(prices1.get(j - 1).getEnd(), 1.0d));
+				}
+				prices2.add(price);
 			}
 			}
 		}
 		}
+		return prices2;
 	}
 	}
 
 
 	/**
 	/**
@@ -459,7 +473,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			min  = min == null ? max : min;
 			min  = min == null ? max : min;
 			max  = max == null ? min : max;
 			max  = max == null ? min : max;
 			if(min.shortValue() > ShortConstant.maxDelivery || min.shortValue() < 0 || max.shortValue() > Short.MAX_VALUE || max.shortValue() < 0){
 			if(min.shortValue() > ShortConstant.maxDelivery || min.shortValue() < 0 || max.shortValue() > Short.MAX_VALUE || max.shortValue() < 0){
-				releaseProductByBatch.addErrmsg("13-14:交期的信息必须为正整数并且小于" + ShortConstant.maxDelivery);
+				releaseProductByBatch.addErrmsg("11-12:交期的信息必须为正整数并且小于" + ShortConstant.maxDelivery);
 			}else {
 			}else {
 				if(min.shortValue() > max.shortValue()) {
 				if(min.shortValue() > max.shortValue()) {
 					Short delivery = max;
 					Short delivery = max;
@@ -470,7 +484,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				releaseProductByBatch.setSelfMaxDelivery(max);
 				releaseProductByBatch.setSelfMaxDelivery(max);
 			}
 			}
 		}else {
 		}else {
-			releaseProductByBatch.addErrmsg("13-14:交期的信息必须为正整数并且小于" + ShortConstant.maxDelivery);
+			releaseProductByBatch.addErrmsg("11-12:交期的信息必须为正整数并且小于" + ShortConstant.maxDelivery);
 		}
 		}
 	}
 	}
 
 
@@ -587,8 +601,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	 * 
 	 * 
 	 * @author yujia
 	 * @author yujia
 	 * @param cellQty
 	 * @param cellQty
-	 * @param cellPriceRMB
-	 * @param cellPriceUSD
+	 * @param cellPrice
 	 * @param prices
 	 * @param prices
 	 * @param releaseProductByBatch
 	 * @param releaseProductByBatch
 	 * @param r
 	 * @param r
@@ -599,45 +612,38 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	 * 
 	 * 
 	 */
 	 */
 	private void readSectionPrice(Cell cellQty, Cell cellPrice, List<GoodsQtyPrice> prices,
 	private void readSectionPrice(Cell cellQty, Cell cellPrice, List<GoodsQtyPrice> prices,
-			ReleaseProductByBatch releaseProductByBatch, int r, int num, Double[] priceMaxMinPrice) {
+			ReleaseProductByBatch releaseProductByBatch, int r, int num, Double[] priceMaxMinPrice, int i) {
 		// 先跟据币别判断对应的价格是否有空值
 		// 先跟据币别判断对应的价格是否有空值
 		Object endQtyCellValue = readWorkBookCell(cellQty, Cell.CELL_TYPE_STRING, r, num);
 		Object endQtyCellValue = readWorkBookCell(cellQty, Cell.CELL_TYPE_STRING, r, num);
+		releaseProductByBatch.setFragmentQty(String.valueOf(endQtyCellValue), i);
+
+		Object priceCellValue = readWorkBookCell(cellPrice, Cell.CELL_TYPE_STRING, r, num + 1);
+		releaseProductByBatch.setFragmentPrice(String.valueOf(priceCellValue), i);
 		if ((endQtyCellValue != null)&&(isNumber(endQtyCellValue.toString()))) {
 		if ((endQtyCellValue != null)&&(isNumber(endQtyCellValue.toString()))) {
 			Double end = Double.valueOf(endQtyCellValue.toString());
 			Double end = Double.valueOf(endQtyCellValue.toString());
 			GoodsQtyPrice qtyPrice = new GoodsQtyPrice();
 			GoodsQtyPrice qtyPrice = new GoodsQtyPrice();
-			// 分段数量start不得大于库存量
-			if (end > releaseProductByBatch.getReserve() || end <= 0) {
-				releaseProductByBatch.addErrmsg(num + ": 分段数量存在结束值大于库存量或者结束值小于0");
+			// 分段结束值 与最小库存比较
+			if (NumberUtil.compare(end, DoubleConstant.minReserve) < 1) {
+				return ;
 			}
 			}
 			qtyPrice.setEnd(end);
 			qtyPrice.setEnd(end);
 
 
 			Double price = null;
 			Double price = null;
-			Object priceCellValue = readWorkBookCell(cellPrice, Cell.CELL_TYPE_STRING, r, num + 1);
-			if ((priceCellValue != null)&&(isNumber(priceCellValue.toString()))) {
+			if((priceCellValue != null)&&(isNumber(priceCellValue.toString()))) {
 				price = Double.valueOf(priceCellValue.toString());
 				price = Double.valueOf(priceCellValue.toString());
 			}
 			}
-			if (price != null && price > 0.0) {
+			if ((price != null) && (NumberUtil.compare(price, DoubleConstant.zero) > 0)) {
 				price = fractionNumCeil(price, 6);
 				price = fractionNumCeil(price, 6);
 				if(Currency.USD.equals(releaseProductByBatch.getCurrency())) {
 				if(Currency.USD.equals(releaseProductByBatch.getCurrency())) {
 					qtyPrice.setUSDPrice(price);
 					qtyPrice.setUSDPrice(price);
 					qtyPrice.setUSDNTPrice(price);
 					qtyPrice.setUSDNTPrice(price);
-					if(priceMaxMinPrice[2] > price) {
-						priceMaxMinPrice[2] = price;
-					}
-					if(priceMaxMinPrice[3] < price) {
-						priceMaxMinPrice[3] = price;
-					}
 				}else {
 				}else {
 					qtyPrice.setRMBPrice(price);
 					qtyPrice.setRMBPrice(price);
 					BigDecimal taxNum = new BigDecimal(releaseProductByBatch.getRmbTaxRate() + 1);
 					BigDecimal taxNum = new BigDecimal(releaseProductByBatch.getRmbTaxRate() + 1);
 					qtyPrice.setRMBNTPrice(new BigDecimal(price).divide(taxNum, 6, BigDecimal.ROUND_HALF_UP).doubleValue());
 					qtyPrice.setRMBNTPrice(new BigDecimal(price).divide(taxNum, 6, BigDecimal.ROUND_HALF_UP).doubleValue());
-					if(priceMaxMinPrice[0] > price) {
-						priceMaxMinPrice[0] = price;
-					}
-					if(priceMaxMinPrice[1] < price) {
-						priceMaxMinPrice[1] = price;
-					}
 				}
 				}
+				priceMaxMinPrice[0] = NumberUtil.compare(priceMaxMinPrice[0], price) > 0 ? price : priceMaxMinPrice[0];
+				priceMaxMinPrice[1] = NumberUtil.compare(priceMaxMinPrice[1], price) < 0 ? price : priceMaxMinPrice[1];
 				prices.add(qtyPrice);
 				prices.add(qtyPrice);
 			}
 			}
 		}
 		}

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


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


BIN
src/main/resources/jxls-tpl/trade/releaseByBatchError-usd.xls


BIN
src/main/resources/jxls-tpl/trade/releaseByBatcherrdata.xls


BIN
src/main/resources/jxls-tpl/trade/releasebyBatch-usd.xls


BIN
src/main/webapp/resources/img/icon/open.png


BIN
src/main/webapp/resources/img/product/releaseByBatch-rmb.png


BIN
src/main/webapp/resources/img/product/releaseByBatch-usd.png


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

@@ -215,14 +215,14 @@ define(['app/app'], function (app) {
 		 * @returns hours 多少个小时
 		 * @returns hours 多少个小时
 		 */
 		 */
 		var getHoursFromNow = function(time) {
 		var getHoursFromNow = function(time) {
-			if(!time) {
+			if (!time) {
 				return 0;
 				return 0;
 			}
 			}
 			var newTime = new Date();
 			var newTime = new Date();
 			var msec = newTime.getTime() - time;
 			var msec = newTime.getTime() - time;
 			var hours = parseInt(parseInt(msec) / (1000 * 60 * 60));
 			var hours = parseInt(parseInt(msec) / (1000 * 60 * 60));
 			return hours;
 			return hours;
-		}
+		};
 
 
 		loadData();
 		loadData();
 
 

+ 24 - 19
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app' ], function(app) {
 define([ 'app/app' ], function(app) {
 	'use strict';
 	'use strict';
-	app.register.controller('vendor_materialCtrl', ['$scope', '$rootScope', 'Material', 'toaster', 'ComponentActive', function ($scope, $rootScope, Material, toaster, ComponentActive) {
+	app.register.controller('vendor_materialCtrl', ['$scope', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', function ($scope, $rootScope, Material, toaster, ComponentActive, Enterprise) {
 		$rootScope.active = 'vendor_material';
 		$rootScope.active = 'vendor_material';
 
 
 		$scope.tab = 'material';
 		$scope.tab = 'material';
@@ -36,6 +36,23 @@ define([ 'app/app' ], function(app) {
 
 
 		$scope.error = {};
 		$scope.error = {};
 
 
+		//获取币别信息
+		Enterprise.getCurrencyByRegisterAddress(null, function (data) {
+			if(data.code == 1) {
+				if(data.data == 'USD') {
+					$scope.store.enType = 'HK'
+				}else {
+					$scope.store.enType = 'MAINLAND'
+				}
+			}else {
+				$scope.store.enType = 'MAINLAND';
+				toaster.pop('info', '提示', '您公司的注册地址为空,无法确定币别,系统默认为人民币');
+				// $scope.onsale.currency = 'RMB';
+			}
+		}, function (response) {
+			toaster.pop('info', '提示', '获取不到公司的币别信息');
+		});
+
 		/**
 		/**
 		 * 切换标准/非标准
 		 * 切换标准/非标准
 		 * @param isStandard
 		 * @param isStandard
@@ -549,6 +566,8 @@ define([ 'app/app' ], function(app) {
 						delete product.selected;
 						delete product.selected;
 					});
 					});
 					$scope.goods = { isBreakUp: 1, isSelfSupport: 1, prices: [{}] };
 					$scope.goods = { isBreakUp: 1, isSelfSupport: 1, prices: [{}] };
+					$scope.goods.prices = [];
+					$scope.goods.prices.push({start : 1, end : 999999999});
 					product.img = component.img || null;
 					product.img = component.img || null;
 					product.selected = true;
 					product.selected = true;
 				} else {
 				} else {
@@ -620,9 +639,6 @@ define([ 'app/app' ], function(app) {
 		 */
 		 */
 		function setPriceMaxAmount(goods) {
 		function setPriceMaxAmount(goods) {
 			if (goods.reserve === undefined || goods.reserve === null ) {
 			if (goods.reserve === undefined || goods.reserve === null ) {
-				if (goods.prices && goods.prices.length > 0) {
-					goods.prices[goods.prices.length - 1].end = goods.reserve;
-				}
 				return ;
 				return ;
 			}
 			}
 			if (goods.reserve <= 0) {
 			if (goods.reserve <= 0) {
@@ -632,27 +648,16 @@ define([ 'app/app' ], function(app) {
 					goods.prices[goods.prices.length - 1].end = goods.reserve;
 					goods.prices[goods.prices.length - 1].end = goods.reserve;
 				}
 				}
 				return ;
 				return ;
+			}else if(goods.reserve > 999999999) {
+				toaster.pop('error', '商品库存数量必须小于999999999');
 			}
 			}
 			if (goods.minBuyQty !== undefined && goods.minBuyQty != null) {
 			if (goods.minBuyQty !== undefined && goods.minBuyQty != null) {
 				if (goods.minBuyQty > goods.reserve) {
 				if (goods.minBuyQty > goods.reserve) {
 					toaster.pop('error', '商品库存数量不能小于起拍数量');
 					toaster.pop('error', '商品库存数量不能小于起拍数量');
 					delete goods.reserve;
 					delete goods.reserve;
-					if (goods.prices && goods.prices.length > 0) {
-						goods.prices[goods.prices.length - 1].end = goods.reserve;
-					}
 					return ;
 					return ;
 				}
 				}
 			}
 			}
-			if (goods.prices && goods.prices.length > 0) {
-				if (goods.prices[goods.prices.length - 1].start != null) {
-					if (goods.reserve < goods.prices[goods.prices.length - 1].start) {
-						toaster.pop('error', '商品库存数量不能小于最后一个价格梯度的起始数量');
-						goods.reserve = goods.prices[goods.prices.length - 1].end;
-						return ;
-					}
-				}
-				goods.prices[goods.prices.length - 1].end = goods.reserve;
-			}
 		}
 		}
 
 
 		/**
 		/**
@@ -662,8 +667,8 @@ define([ 'app/app' ], function(app) {
 		 * @param index		价格区间索引
 		 * @param index		价格区间索引
 		 */
 		 */
 		function addPrice(goods, index) {
 		function addPrice(goods, index) {
-			if (goods.prices.length === 5) {
-				toaster.pop('warning', '价格梯度最多只能5个');
+			if (goods.prices.length === 3) {
+				toaster.pop('warning', '价格梯度最多只能3个');
 				return ;
 				return ;
 			}
 			}
 			var price = {};
 			var price = {};

+ 24 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_onSaleCtrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app' ], function(app) {
 define([ 'app/app' ], function(app) {
     'use strict';
     'use strict';
-    app.register.controller('vendor_onSaleCtrl', ['$scope', '$rootScope', 'Goods', '$modal', 'toaster', 'Loading', 'StoreInfo', 'AuthenticationService', '$q', 'StoreCms', 'NumberService', function ($scope, $rootScope, Goods, $modal, toaster, Loading, StoreInfo, AuthenticationService, $q, StoreCms, NumberService) {
+    app.register.controller('vendor_onSaleCtrl', ['$scope', '$rootScope', 'Goods', '$modal', 'toaster', 'Loading', 'StoreInfo', 'AuthenticationService', '$q', 'StoreCms', 'NumberService', 'Enterprise', function ($scope, $rootScope, Goods, $modal, toaster, Loading, StoreInfo, AuthenticationService, $q, StoreCms, NumberService, Enterprise) {
         $rootScope.active = 'vendor_material';
         $rootScope.active = 'vendor_material';
         $scope.keyword = '';
         $scope.keyword = '';
         $scope.tab = 'onSale';
         $scope.tab = 'onSale';
@@ -24,6 +24,20 @@ define([ 'app/app' ], function(app) {
         };
         };
         $scope.selfSupport = $scope.selfSupportType.ALL;
         $scope.selfSupport = $scope.selfSupportType.ALL;
 
 
+        $scope.onsale = {};
+
+        //获取币别信息
+        Enterprise.getCurrencyByRegisterAddress(null, function (data) {
+            if(data.code == 1) {
+                $scope.onsale.currency = data.data;
+            }else {
+                toaster.pop('info', '提示', '您公司的注册地址为空,无法确定币别,系统默认为人民币');
+                $scope.onsale.currency = 'RMB';
+            }
+        }, function (response) {
+            toaster.pop('info', '提示', '获取不到公司的币别信息');
+        });
+
         //获取登录的信息
         //获取登录的信息
         var getAuthentication = function () {
         var getAuthentication = function () {
             return AuthenticationService.getAuthentication().success(function(data) {
             return AuthenticationService.getAuthentication().success(function(data) {
@@ -251,6 +265,15 @@ define([ 'app/app' ], function(app) {
                 $scope.currenctGoods = data.content;
                 $scope.currenctGoods = data.content;
                 $scope.param.currentPage = data.number;
                 $scope.param.currentPage = data.number;
                 $scope.acculatePages(data.number, data.totalPages);
                 $scope.acculatePages(data.number, data.totalPages);
+                if($scope.currenctGoods.length > 0) {
+                    //防止默认选择的RMB不是用户上传的币别信息
+                    if($scope.currenctGoods[0].currencyName == 'USD') {
+                        $scope.onsale.currency = 'USD';
+                    }else {
+                        $scope.onsale.currency = 'RMB';
+                    }
+
+                }
             });
             });
         };
         };
 
 

+ 31 - 5
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js

@@ -63,6 +63,11 @@ define([ 'app/app' ], function(app) {
 						$scope.pageParams.content = page.content;
 						$scope.pageParams.content = page.content;
 						$scope.pageParams.totalElements = page.totalElements;
 						$scope.pageParams.totalElements = page.totalElements;
 						$scope.pageParams.totalPages = page.totalPages;
 						$scope.pageParams.totalPages = page.totalPages;
+						$scope.pageParams.start = ((page.number - 1) * page.size) + 1;
+						$scope.pageParams.end =  page.number * page.size;
+						if($scope.pageParams.end > $scope.pageParams.totalElements) {
+							$scope.pageParams.end = $scope.pageParams.totalElements
+						}
 					}, function(data) {
 					}, function(data) {
 						toaster.pop();
 						toaster.pop();
 					});
 					});
@@ -86,13 +91,13 @@ define([ 'app/app' ], function(app) {
 
 
 		// 查看范例
 		// 查看范例
 		$scope.showImg = function() {
 		$scope.showImg = function() {
-			var src = '', box = $('#image-box');
+			var src = '';
 			if($scope.batch.currency === 'RMB') {
 			if($scope.batch.currency === 'RMB') {
 				src = $rootScope.rootPath + "/static/img/product/releaseByBatch-rmb.png";
 				src = $rootScope.rootPath + "/static/img/product/releaseByBatch-rmb.png";
 			}else {
 			}else {
 				src = $rootScope.rootPath + "/static/img/product/releaseByBatch-usd.png";
 				src = $rootScope.rootPath + "/static/img/product/releaseByBatch-usd.png";
 			}
 			}
-			box.show();
+			var box = $('#image-box');
 			box.find('img').attr('src', src);
 			box.find('img').attr('src', src);
 			box.find('a').click(function(){
 			box.find('a').click(function(){
 				box.hide();
 				box.hide();
@@ -100,6 +105,7 @@ define([ 'app/app' ], function(app) {
 			box.dblclick(function(){
 			box.dblclick(function(){
 				box.hide();
 				box.hide();
 			});
 			});
+			box.show();
 		};
 		};
 
 
 		//获取登录的信息
 		//获取登录的信息
@@ -172,7 +178,28 @@ define([ 'app/app' ], function(app) {
 				$scope.batch.myFiles = [];
 				$scope.batch.myFiles = [];
 				$scope.proInfo = data.info;
 				$scope.proInfo = data.info;
 				$scope.result = data;
 				$scope.result = data;
-				toaster.pop('info', "验证通过"+($scope.result.success || 0) + '条,验证失败' + ($scope.result.failure || 0) +  '条,过滤' + ($scope.result.filter || 0) + '条');
+				var message = "";
+				if($scope.result.success) {
+					message = '验证通过' + $scope.result.success + '条';
+				}
+				if($scope.result.failure) {
+					if(message) {
+						message = message + ',验证失败' + $scope.result.failure +  '条';
+					}else {
+						message = '验证失败' + $scope.result.failure +  '条';
+					}
+				}
+				if($scope.result.filter) {
+					if(message) {
+						message = message + ',过滤' + $scope.result.filter +  '条';
+					}else {
+						message = '过滤' + $scope.result.filter +  '条';
+					}
+				}
+				if(!message) {
+					message = '没有提交任何信息'
+				}
+				toaster.pop('info', '提示', message);
 				$scope.relTableParams.page(1);
 				$scope.relTableParams.page(1);
 				$scope.relTableParams.reload();
 				$scope.relTableParams.reload();
 			}).error(function(response) {
 			}).error(function(response) {
@@ -205,9 +232,8 @@ define([ 'app/app' ], function(app) {
 
 
 		//批量发布
 		//批量发布
 		$scope.publish = function(event) {
 		$scope.publish = function(event) {
-			if ($scope.result && $scope.result.success > 0) {
+			if ($scope.pageParams.totalElements > 0) {
 				ReleaseProductByBatch.batchRelease({batch : $scope.result.batch}, null, function(data) {
 				ReleaseProductByBatch.batchRelease({batch : $scope.result.batch}, null, function(data) {
-					console.log(data);
 					toaster.pop("success", "提示", "发布成功 :" + data.data + "条");
 					toaster.pop("success", "提示", "发布成功 :" + data.data + "条");
 					$scope.relTableParams.page(1);
 					$scope.relTableParams.page(1);
 					$scope.relTableParams.reload();
 					$scope.relTableParams.reload();

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

@@ -563,9 +563,9 @@
 								<p class="title">价格梯度</p>
 								<p class="title">价格梯度</p>
 								<div class="input-list" ng-repeat="price in goods.prices">
 								<div class="input-list" ng-repeat="price in goods.prices">
 									<p>
 									<p>
-										<span><input type="number" class="wid42 form-control"  placeholder="数量" ng-model="price.start" ng-blur="changePriceStart(goods, $index)" ng-pattern="/^[0-9]*$/"/></span>
+										<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 style="margin-left: 4px;">–</span>
-										<span><input type="number" class="wid42 form-control"  placeholder="数量" ng-model="price.end" ng-blur="changePriceEnd(goods, $index)" ng-pattern="/^[0-9]*$/"/></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>
 									</p>
 								</div>
 								</div>
 							</div>
 							</div>
@@ -585,7 +585,7 @@
 								<p class="title">&nbsp;</p>
 								<p class="title">&nbsp;</p>
 								<div class="input-list" ng-repeat="price in goods.prices" style="height: 24px;line-height: 24px;margin-bottom: 5px;">
 								<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="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 === 4 }"></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>
 							</div>
 							<div class="content">
 							<div class="content">

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

@@ -259,7 +259,7 @@
         text-align: left !important;
         text-align: left !important;
     }
     }
     .vendor-tab.table td .wid135{
     .vendor-tab.table td .wid135{
-        width: 110px;
+        width: 175px;
         margin-left: 7px;
         margin-left: 7px;
         position: relative;
         position: relative;
         top: -10px;
         top: -10px;
@@ -568,13 +568,13 @@
                 <table class="vendor-tab public-tab table">
                 <table class="vendor-tab public-tab table">
                     <thead>
                     <thead>
                     <tr>
                     <tr>
-                        <th width="45" style="padding:8px 0;">序号</th>
-                        <th>产品信息</th>
+                        <th width="50" style="padding:8px 0;">序号</th>
+                        <th width="260">产品信息</th>
                         <th width="115">包装/生产日期</th>
                         <th width="115">包装/生产日期</th>
                         <th width="100">库存</th>
                         <th width="100">库存</th>
                         <th width="105">数量</th>
                         <th width="105">数量</th>
-                        <th width="90">香港交货<b style="font-size: 12px;font-weight: 600">($)</b></th>
-                        <th width="116">大陆交货<b style="font-size: 12px;font-weight: 600">(¥)</b></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 width="120">交期</th>
                         <th class="filter" width="90">
                         <th class="filter" width="90">
                             <a>{{selfSupport}}<i class="fa fa-angle-double-down angle-hover-up" aria-hidden="true"></i></a>
                             <a>{{selfSupport}}<i class="fa fa-angle-double-down angle-hover-up" aria-hidden="true"></i></a>
@@ -606,9 +606,9 @@
                                 </div>
                                 </div>
                             </div>
                             </div>
                             <div class="fr wid135">
                             <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.code" title="{{commodity.code}}">LPC1112</em></p>
                                 <p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>
                                 <p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>
-                                <p>批次: <em ng-bind="commodity.batchCode" title="{{commodity.batchCode}}">100008</em></p>
                             </div>
                             </div>
                         </td>
                         </td>
                         <td style="white-space: inherit;">
                         <td style="white-space: inherit;">
@@ -632,7 +632,7 @@
                                 <span ng-bind="commodity.minBuyQty" title="{{commodity.minBuyQty}}"></span>
                                 <span ng-bind="commodity.minBuyQty" title="{{commodity.minBuyQty}}"></span>
                             </div>
                             </div>
                             <div>
                             <div>
-                                <span>倍数: </span>
+                                <span>最小包数量: </span>
                                 <span ng-bind="commodity.minPackQty" title="{{commodity.minPackQty}}"></span>
                                 <span ng-bind="commodity.minPackQty" title="{{commodity.minPackQty}}"></span>
                             </div>
                             </div>
                         </td>
                         </td>
@@ -641,23 +641,23 @@
                                 <span ng-bind="price.start + '+'" style="margin-left: 20px;"></span>
                                 <span ng-bind="price.start + '+'" style="margin-left: 20px;"></span>
                             </div>
                             </div>
                         </td>
                         </td>
-                        <td>
+                        <td ng-if="onsale.currency == 'USD'">
                             <div  ng-repeat="price in commodity.prices" ng-if="price.uSDPrice" >
                             <div  ng-repeat="price in commodity.prices" ng-if="price.uSDPrice" >
                                 <span ng-bind="price.uSDPrice | formateNumber : 6"></span>
                                 <span ng-bind="price.uSDPrice | formateNumber : 6"></span>
                             </div>
                             </div>
                         </td>
                         </td>
-                        <td>
+                        <td ng-if="onsale.currency == 'RMB'">
                             <div ng-repeat="price in commodity.prices" ng-if="price.rMBPrice">
                             <div ng-repeat="price in commodity.prices" ng-if="price.rMBPrice">
                                 <span ng-bind="price.rMBPrice | formateNumber : 6" style="margin-left: 10px;"></span>
                                 <span ng-bind="price.rMBPrice | formateNumber : 6" style="margin-left: 10px;"></span>
                             </div>
                             </div>
                         </td>
                         </td>
                         <td>
                         <td>
-                            <div ng-if="commodity.currencyName.indexOf('RMB') > -1">
+                            <div ng-if="onsale.currency == 'RMB'">
                                 <span ng-if="(commodity.b2cDeliveryDemMinTime != commodity.b2cDeliveryDemMaxTime)&&!commodity.b2cMaxDelivery"  ng-bind="'大陆:' + commodity.b2cDeliveryDemMinTime + '-' + commodity.b2cDeliveryDemMaxTime"></span>
                                 <span ng-if="(commodity.b2cDeliveryDemMinTime != commodity.b2cDeliveryDemMaxTime)&&!commodity.b2cMaxDelivery"  ng-bind="'大陆:' + commodity.b2cDeliveryDemMinTime + '-' + commodity.b2cDeliveryDemMaxTime"></span>
                                 <span ng-if="(commodity.b2cDeliveryDemMinTime == commodity.b2cDeliveryDemMaxTime)&&!commodity.b2cMaxDelivery"  ng-bind="'大陆:' + commodity.b2cDeliveryDemMinTime"></span>
                                 <span ng-if="(commodity.b2cDeliveryDemMinTime == commodity.b2cDeliveryDemMaxTime)&&!commodity.b2cMaxDelivery"  ng-bind="'大陆:' + commodity.b2cDeliveryDemMinTime"></span>
                                 <span ng-if="commodity.b2cMaxDelivery" ng-bind="'大陆:' + commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery"></span>
                                 <span ng-if="commodity.b2cMaxDelivery" ng-bind="'大陆:' + commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery"></span>
                             </div>
                             </div>
-                            <div ng-if="commodity.currencyName.indexOf('USD') > -1">
+                            <div ng-if="onsale.currency == 'USD'">
                                 <span ng-if="(commodity.b2cDeliveryHKMinTime != commodity.b2cDeliveryHKMaxTime)&&!commodity.b2cMaxDelivery" ng-bind="'香港:' + commodity.b2cDeliveryHKMinTime + '-' + commodity.b2cDeliveryHKMaxTime"></span>
                                 <span ng-if="(commodity.b2cDeliveryHKMinTime != commodity.b2cDeliveryHKMaxTime)&&!commodity.b2cMaxDelivery" ng-bind="'香港:' + commodity.b2cDeliveryHKMinTime + '-' + commodity.b2cDeliveryHKMaxTime"></span>
                                 <span ng-if="(commodity.b2cDeliveryHKMinTime == commodity.b2cDeliveryHKMaxTime)&&!commodity.b2cMaxDelivery" ng-bind="'香港:' + commodity.b2cDeliveryHKMinTime"></span>
                                 <span ng-if="(commodity.b2cDeliveryHKMinTime == commodity.b2cDeliveryHKMaxTime)&&!commodity.b2cMaxDelivery" ng-bind="'香港:' + commodity.b2cDeliveryHKMinTime"></span>
                                 <span ng-if="commodity.b2cMaxDelivery" ng-bind="'香港:' + commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery"></span>
                                 <span ng-if="commodity.b2cMaxDelivery" ng-bind="'香港:' + commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery"></span>
@@ -687,9 +687,9 @@
                                 </div>
                                 </div>
                             </div>
                             </div>
                             <div class="fr wid135">
                             <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.code" title="{{commodity.code}}">LPC1112</em></p>
                                 <p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>
                                 <p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>
-                                <p>批次: <em ng-bind="commodity.batchCode" title="{{commodity.batchCode}}">100008</em></p>
                             </div>
                             </div>
                         </td>
                         </td>
                         <td>
                         <td>
@@ -733,7 +733,7 @@
                                 <span><input type="text" ng-blur="editQty(commodity, $index, true, price.end)" ng-class="{'error' : price.endInValid}" placeholder="数量" ng-model="price.end" class="wid40 form-control"/></span>
                                 <span><input type="text" ng-blur="editQty(commodity, $index, true, price.end)" ng-class="{'error' : price.endInValid}" placeholder="数量" ng-model="price.end" class="wid40 form-control"/></span>
                             </div>
                             </div>
                         </td>
                         </td>
-                        <td><!--ng-pattern="^\d{1,4}.\d{0,6}$"-->
+                        <td ng-if="onsale.currency == 'USD'">
                             <div style="width: 99px;" ng-repeat="price in commodity.editPrices">
                             <div style="width: 99px;" ng-repeat="price in commodity.editPrices">
                                     <span ng-if="commodity.currencyName.indexOf('USD') > -1">
                                     <span ng-if="commodity.currencyName.indexOf('USD') > -1">
                                         <form name="usdForm">
                                         <form name="usdForm">
@@ -742,7 +742,7 @@
                                     </span>
                                     </span>
                             </div>
                             </div>
                         </td>
                         </td>
-                        <td>
+                        <td ng-if="onsale.currency == 'RMB'">
                             <div style="width: 99px;" ng-repeat="price in commodity.editPrices">
                             <div style="width: 99px;" ng-repeat="price in commodity.editPrices">
                                     <span ng-if="commodity.currencyName.indexOf('RMB') > -1">
                                     <span ng-if="commodity.currencyName.indexOf('RMB') > -1">
                                         <form name="rmbForm">
                                         <form name="rmbForm">
@@ -754,13 +754,13 @@
                             </div>
                             </div>
                         </td>
                         </td>
                         <td>
                         <td>
-                            <div ng-if="commodity.currencyName.indexOf('RMB') >  -1">
+                            <div ng-if="onsale.currency == 'RMB'">
                                 <span>大陆:</span>
                                 <span>大陆:</span>
                                 <span><input type="text" ng-class="{'error' : commodity.selfDemMinTimeinValid}" ng-blur="changeDelivery(commodity.editSelfDeliveryDemMinTime, commodity.editSelfDeliveryDemMaxTime, true, false, commodity)" placeholder="大陆最短交期" ng-model="commodity.editSelfDeliveryDemMinTime" class="wid25 form-control"/></span>
                                 <span><input type="text" ng-class="{'error' : commodity.selfDemMinTimeinValid}" ng-blur="changeDelivery(commodity.editSelfDeliveryDemMinTime, commodity.editSelfDeliveryDemMaxTime, true, false, commodity)" placeholder="大陆最短交期" ng-model="commodity.editSelfDeliveryDemMinTime" class="wid25 form-control"/></span>
                                 <span>-</span>
                                 <span>-</span>
                                 <span><input type="text" ng-class="{'error' : commodity.selfDemMaxTimeinValid}" ng-blur="changeDelivery(commodity.editSelfDeliveryDemMinTime, commodity.editSelfDeliveryDemMaxTime, false, false, commodity)" placeholder="大陆最长交期" ng-model="commodity.editSelfDeliveryDemMaxTime" class="wid25 form-control"/></span>
                                 <span><input type="text" ng-class="{'error' : commodity.selfDemMaxTimeinValid}" ng-blur="changeDelivery(commodity.editSelfDeliveryDemMinTime, commodity.editSelfDeliveryDemMaxTime, false, false, commodity)" placeholder="大陆最长交期" ng-model="commodity.editSelfDeliveryDemMaxTime" class="wid25 form-control"/></span>
                             </div>
                             </div>
-                            <div ng-if="commodity.currencyName.indexOf('USD') >  -1">
+                            <div ng-if="onsale.currency == 'USD'">
                                 <span>香港:</span>
                                 <span>香港:</span>
                                 <span><input type="text" placeholder="香港最短交期" ng-class="{'error' : commodity.selfHkMinTimeinValid}" ng-blur="changeDelivery(commodity.editSelfDeliveryHKMinTime, commodity.editSelfDeliveryHKMaxTime, true, true, commodity)" ng-model="commodity.editSelfDeliveryHKMinTime" class="wid25 form-control"/></span>
                                 <span><input type="text" placeholder="香港最短交期" ng-class="{'error' : commodity.selfHkMinTimeinValid}" ng-blur="changeDelivery(commodity.editSelfDeliveryHKMinTime, commodity.editSelfDeliveryHKMaxTime, true, true, commodity)" ng-model="commodity.editSelfDeliveryHKMinTime" class="wid25 form-control"/></span>
                                 <span>-</span>
                                 <span>-</span>

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

@@ -643,7 +643,7 @@
                                 <span class="text-more" ng-bind="commodity.unit || 'PCS'">PCS</span>
                                 <span class="text-more" ng-bind="commodity.unit || 'PCS'">PCS</span>
                             </div>
                             </div>
                             <div class="text-more-80">
                             <div class="text-more-80">
-                                <span>封装:<em ng-bind="commodity.encapsulation" class="text-more fr" style="width: 60px;" title="{{commodity.encapsulation}}"></em></span>
+                                <span>封装:<em ng-bind="commodity.encapsulation || '-'" class="text-more fr" style="width: 60px;" title="{{commodity.encapsulation}}"></em></span>
                             </div>
                             </div>
                         </td>
                         </td>
                         <td>
                         <td>
@@ -669,6 +669,7 @@
                                 <em ng-if="commodity.b2cMinDelivery != commodity.b2cMaxDelivery" ng-bind="commodity.b2cMinDelivery + '-' + commodity.b2cMaxDelivery"></em>
                                 <em ng-if="commodity.b2cMinDelivery != commodity.b2cMaxDelivery" ng-bind="commodity.b2cMinDelivery + '-' + commodity.b2cMaxDelivery"></em>
                                 <!--<em ng-bind="commodity.b2cMinDelivery+ '-' + commodity.b2cMaxDelivery"></em>-->
                                 <!--<em ng-bind="commodity.b2cMinDelivery+ '-' + commodity.b2cMaxDelivery"></em>-->
                             </div>
                             </div>
+                            <div ng-bind="commodity.breakUp ? '可拆卖' : '不可拆卖'"></div>
                         </td>
                         </td>
                         <td>
                         <td>
                             <div ng-repeat="price in commodity.prices">
                             <div ng-repeat="price in commodity.prices">

+ 14 - 17
src/main/webapp/resources/view/vendor/forstore/vendor_upload.html

@@ -362,7 +362,7 @@
                                     <th width="150">产品固有属性</th>
                                     <th width="150">产品固有属性</th>
                                     <th width="200">产品自定义属性</th>
                                     <th width="200">产品自定义属性</th>
                                     <th width="100">数量</th>
                                     <th width="100">数量</th>
-                                    <th width="100">单价(¥)</th>
+                                    <th width="100">单价(<em ng-bind="batch.currency == 'RMB' ? '' : '$'"></em>)</th>
                                     <th width="70">操作</th>
                                     <th width="70">操作</th>
                                 </tr>
                                 </tr>
                             </thead>
                             </thead>
@@ -378,16 +378,16 @@
                                         <div class="text-more">型号:&nbsp;<em title="{{batchCommodity.code || '空'}}" ng-bind="batchCommodity.code || '空'"></em></div>
                                         <div class="text-more">型号:&nbsp;<em title="{{batchCommodity.code || '空'}}" ng-bind="batchCommodity.code || '空'"></em></div>
                                     </td>
                                     </td>
                                     <td>
                                     <td>
-                                        <div>类型:&nbsp;<span ng-bind="batchCommodity.original == 1311 ? '现货' : '呆滞库存' "></span></div>
+                                        <!--<div>类型:&nbsp;<span ng-bind="batchCommodity.original == 1311 ? '现货' : '呆滞库存' "></span></div>-->
                                         <div>生产日期:&nbsp;<span ng-bind="batchCommodity.productDate"></span></div>
                                         <div>生产日期:&nbsp;<span ng-bind="batchCommodity.productDate"></span></div>
-                                        <div>封装:&nbsp;<span ng-bind="batchCommodity.encapsulation || '无封装信息'"></span></div>
+                                        <!--<div>封装:&nbsp;<span ng-bind="batchCommodity.encapsulation || '无封装信息'"></span></div>-->
                                         <div>包装:&nbsp;<span ng-bind="batchCommodity.packaging || '无包装信息'"></span></div>
                                         <div>包装:&nbsp;<span ng-bind="batchCommodity.packaging || '无包装信息'"></span></div>
                                         <div>
                                         <div>
                                             <span class="label-commodity">交期:</span>
                                             <span class="label-commodity">交期:</span>
                                             <span>
                                             <span>
-                                                    <span ng-if="batchCommodity.deliveryDemMaxTime" ng-bind="'大陆' + batchCommodity.deliveryDemMinTime + '-' + batchCommodity.deliveryDemMaxTime"></span>/
-                                                    <span ng-if="batchCommodity.deliveryHKMinTime" ng-bind="'香港' + batchCommodity.deliveryHKMinTime + '-' + batchCommodity.deliveryHKMaxTime"></span>
-                                                </span>
+                                                 <span ng-if="batchCommodity.selfMinDelivery == batchCommodity.selfMaxDelivery" ng-bind="batchCommodity.selfMaxDelivery"></span>
+                                                 <span ng-if="batchCommodity.selfMinDelivery != batchCommodity.selfMaxDelivery" ng-bind="batchCommodity.selfMinDelivery + '-' + batchCommodity.selfMaxDelivery"></span>
+                                            </span>
                                         </div>
                                         </div>
                                     </td>
                                     </td>
                                     <td>
                                     <td>
@@ -402,21 +402,17 @@
                                                     <!--/<span ng-bind="batchCommodity.rmbMinPackPrice | formateNumber : 6 | currencySysmbol : 'RMB'"></span>-->
                                                     <!--/<span ng-bind="batchCommodity.rmbMinPackPrice | formateNumber : 6 | currencySysmbol : 'RMB'"></span>-->
                                                 <!--</span>-->
                                                 <!--</span>-->
                                         <!--</div>-->
                                         <!--</div>-->
-                                        <div>样品:&nbsp;<span ng-bind="batchCommodity.sampleqty | number"></span></div>
+                                        <!--<div>样品:&nbsp;<span ng-bind="batchCommodity.sampleqty | number"></span></div>-->
                                         <div>
                                         <div>
-                                            <span>可拆卖:</span>
-                                            <span class="switch"><button ng-class="{'active' : commodity.editBreakUp}" ng-click="toggleIsBreadUp(commodity)"></button></span>
+                                            <span ng-bind="batchCommodity.breakUp ? '可拆卖' : '不可拆卖'"></span>
+                                            <!--<span class="switch"><button ng-class="{'active' : commodity.editBreakUp}" ng-click="toggleIsBreadUp(commodity)"></button></span>-->
                                         </div>
                                         </div>
                                     </td>
                                     </td>
                                     <td style="vertical-align: top !important;">
                                     <td style="vertical-align: top !important;">
-                                        <div>&nbsp;</div>
-                                        <div>1+ </div>
-                                        <div>50000000+</div>
+                                        <div ng-repeat="price in batchCommodity.prices">{{price.start + '+'}}</div>
                                     </td>
                                     </td>
                                     <td style="vertical-align: top !important;">
                                     <td style="vertical-align: top !important;">
-                                        <div>&nbsp;</div>
-                                        <div>0.000005</div>
-                                        <div>0.000005</div>
+                                        <div ng-repeat="price in batchCommodity.prices">{{batchCommodity.currency=='RMB' ? price.rMBPrice : price.uSDPrice}}</div>
                                     </td>
                                     </td>
                                     <td>
                                     <td>
                                         <!--<a ng-click="editBatch(batchCommodity)">编辑</a><br/>-->
                                         <!--<a ng-click="editBatch(batchCommodity)">编辑</a><br/>-->
@@ -425,7 +421,7 @@
                                 </tr>
                                 </tr>
                                 <tr class="record-number" ng-if="pageParams.content.length > 0">
                                 <tr class="record-number" ng-if="pageParams.content.length > 0">
                                     <td colspan="7">
                                     <td colspan="7">
-                                        <div>显示 1- <i>10</i> 个,共:<i style="color: #5078cb;">24</i> 个</div>
+                                        <div>显示 <i ng-bind="pageParams.start"></i>- <i ng-bind="pageParams.end">10</i> 个,共:<i style="color: #5078cb;" ng-bind="pageParams.totalElements"></i> 个</div>
                                     </td>
                                     </td>
                                 </tr>
                                 </tr>
                             </tbody>
                             </tbody>
@@ -436,7 +432,7 @@
                             </tbody>
                             </tbody>
                         </table>
                         </table>
                         <div>3、如核对信息无误之后,点击确认发布</div>
                         <div>3、如核对信息无误之后,点击确认发布</div>
-                        <a class="blue-bg publish" href="javascript:void(0)" ng-click="publish($event)" ng-disabled="!result.success" >确认上架</a>
+                        <a class="blue-bg publish" href="javascript:void(0)" ng-click="publish($event)" ng-disabled="!pageParams.totalElements">确认上架</a>
                     </div>
                     </div>
                 </div>
                 </div>
                 <div class="load_next">
                 <div class="load_next">
@@ -449,6 +445,7 @@
                             <a href="javascript:void(0)" style="width: 206px;" ng-disabled="!result.failure" ng-click="downloadExcel()" class="blue-bg">下载匹配不成功产品信息</a>
                             <a href="javascript:void(0)" style="width: 206px;" ng-disabled="!result.failure" ng-click="downloadExcel()" class="blue-bg">下载匹配不成功产品信息</a>
                             <form id="load-error" style="display: none;" method="get">
                             <form id="load-error" style="display: none;" method="get">
                                 <input type="hidden" name="batch" ng-value="result.batch">
                                 <input type="hidden" name="batch" ng-value="result.batch">
+                                <input type="hidden" name="currency" ng-value="batch.currency">
                             </form>
                             </form>
                         </div>
                         </div>
                     </div>
                     </div>