Эх сурвалжийг харах

Merge remote-tracking branch 'origin/release-201827-wangcz' into release-201827-wangcz

wangyc 7 жил өмнө
parent
commit
44a23ab3c4
50 өөрчлөгдсөн 373 нэмэгдсэн , 395 устгасан
  1. 0 30
      src/main/java/com/uas/platform/b2c/core/support/log/TradeBufferedLogger.java
  2. 2 2
      src/main/java/com/uas/platform/b2c/external/erp/order/api/PurchaseController.java
  3. 13 12
      src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/InvoiceNotifyServiceImpl.java
  4. 0 2
      src/main/java/com/uas/platform/b2c/logistics/controller/InvoiceController.java
  5. 10 0
      src/main/java/com/uas/platform/b2c/logistics/dao/InvoiceDao.java
  6. 19 0
      src/main/java/com/uas/platform/b2c/logistics/dao/InvoiceDetailDao.java
  7. 0 1
      src/main/java/com/uas/platform/b2c/logistics/service/InvoiceFPurchaseDetailService.java
  8. 7 4
      src/main/java/com/uas/platform/b2c/logistics/service/InvoiceService.java
  9. 0 3
      src/main/java/com/uas/platform/b2c/logistics/service/impl/InvoiceFOrderDetailServiceImpl.java
  10. 0 7
      src/main/java/com/uas/platform/b2c/logistics/service/impl/InvoiceFPurchaseDetailServiceImpl.java
  11. 15 0
      src/main/java/com/uas/platform/b2c/logistics/service/impl/InvoiceServiceImpl.java
  12. 15 2
      src/main/java/com/uas/platform/b2c/prod/commodity/model/Goods.java
  13. 1 1
      src/main/java/com/uas/platform/b2c/prod/commodity/model/ReleaseProductByBatch.java
  14. 4 2
      src/main/java/com/uas/platform/b2c/prod/commodity/service/InOutboundDetailService.java
  15. 1 2
      src/main/java/com/uas/platform/b2c/prod/commodity/service/ProductService.java
  16. 24 4
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/CommodityInOutboundServiceImpl.java
  17. 27 6
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/InOutboundDetailServiceImpl.java
  18. 4 73
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java
  19. 63 43
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java
  20. 14 0
      src/main/java/com/uas/platform/b2c/prod/store/model/StoreApply.java
  21. 1 0
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java
  22. 2 4
      src/main/java/com/uas/platform/b2c/trade/order/controller/PurchaseController.java
  23. 5 5
      src/main/java/com/uas/platform/b2c/trade/order/model/OrderIndex.java
  24. 5 5
      src/main/java/com/uas/platform/b2c/trade/order/model/OrderIndexDetail.java
  25. 2 2
      src/main/java/com/uas/platform/b2c/trade/order/service/PurchaseService.java
  26. 0 4
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java
  27. 13 15
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java
  28. 24 1
      src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekPurchaseBomServiceImpl.java
  29. BIN
      src/main/resources/jxls-tpl/trade/products.xls
  30. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls
  31. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatchError-rmb.xls
  32. BIN
      src/main/resources/jxls-tpl/trade/releasebyBatch-usd.xls
  33. 0 5
      src/main/webapp/resources/js/common/query/seekPurchase.js
  34. 12 49
      src/main/webapp/resources/js/usercenter/controllers/forstore/bomListDetailCtrl.js
  35. 6 3
      src/main/webapp/resources/js/usercenter/controllers/forstore/order_detail_ctrl.js
  36. 23 6
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js
  37. 2 1
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_storageCtrl.js
  38. 7 0
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_apply_ctrl.js
  39. 1 3
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js
  40. 2 2
      src/main/webapp/resources/view/admin/trade/trade_invoicefromorder.html
  41. 2 2
      src/main/webapp/resources/view/admin/trade/trade_invoicefrompurc.html
  42. 21 82
      src/main/webapp/resources/view/usercenter/forstore/bomListDetail.html
  43. 1 1
      src/main/webapp/resources/view/usercenter/forstore/buyer_order.html
  44. 1 1
      src/main/webapp/resources/view/usercenter/forstore/order_detail.html
  45. 2 2
      src/main/webapp/resources/view/vendor/forstore/purchase_detail.html
  46. 2 2
      src/main/webapp/resources/view/vendor/forstore/vendor_delivery.html
  47. 4 3
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html
  48. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_order.html
  49. 3 2
      src/main/webapp/resources/view/vendor/forstore/vendor_storage.html
  50. 12 0
      src/main/webapp/resources/view/vendor/forstore/vendor_store_apply.html

+ 0 - 30
src/main/java/com/uas/platform/b2c/core/support/log/TradeBufferedLogger.java

@@ -4,8 +4,6 @@ import com.uas.platform.b2c.common.account.model.TradeLog;
 import com.uas.platform.b2c.common.account.service.TradeLogService;
 import com.uas.platform.b2c.core.utils.ContextUtils;
 import com.uas.platform.b2c.core.utils.PathUtils;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrder;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchase;
 import com.uas.platform.b2c.trade.order.model.Order;
 import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.core.exception.IllegalOperatorException;
@@ -63,32 +61,4 @@ public class TradeBufferedLogger extends BufferedLogger<TradeLog> {
 		log(purchase.getClass().getSimpleName(), purchase.getPurchaseid(), voucherOperation, changeLog);
 	}
 
-	/**
-	 * 记录交易流程卖家出货单操作日志
-	 *
-	 * @param invoice				状态变更的卖家出货单的实例
-	 * @param voucherOperation		单据操作
-	 * @param changeLog				操作具体日志记录
-	 */
-	public void log(InvoiceFPurchase invoice, TradeLog.VoucherOperation voucherOperation, String changeLog) {
-		if (invoice == null) {
-			throw new IllegalOperatorException("卖家出货单数据已失效");
-		}
-		log(invoice.getClass().getSimpleName(), invoice.getInvoiceid(), voucherOperation, changeLog);
-	}
-
-	/**
-	 * 记录交易流程平台出货单操作日志
-	 *
-	 * @param invoice				状态变更的平台出货单的实例
-	 * @param voucherOperation		单据操作
-	 * @param changeLog				操作具体日志记录
-	 */
-	public void log(InvoiceFOrder invoice, TradeLog.VoucherOperation voucherOperation, String changeLog) {
-		if (invoice == null) {
-			throw new IllegalOperatorException("平台出货单数据已失效");
-		}
-		log(invoice.getClass().getSimpleName(), invoice.getInvoiceid(), voucherOperation, changeLog);
-	}
-
 }

+ 2 - 2
src/main/java/com/uas/platform/b2c/external/erp/order/api/PurchaseController.java

@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchase;
+import com.uas.platform.b2c.logistics.model.Invoice;
 import com.uas.platform.b2c.trade.order.model.Order;
 import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.b2c.trade.order.service.PurchaseService;
@@ -206,7 +206,7 @@ public class PurchaseController {
      * @return invoice f purchase
      */
     @RequestMapping(value = "/{invoiceid}/ensurereceipt", method = RequestMethod.PUT)
-	public InvoiceFPurchase ensureReceipt(@PathVariable String invoiceid) {
+	public Invoice ensureReceipt(@PathVariable String invoiceid) {
 		return purchaseService.ensuerAcceptInvoise(invoiceid);
 	}
 

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

@@ -4,9 +4,10 @@ import com.uas.api.b2c_erp.buyer.model.AcceptNotify;
 import com.uas.api.b2c_erp.buyer.model.AcceptNotifyDetail;
 import com.uas.api.b2c_erp.buyer.service.InvoiceNotifyService;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.logistics.dao.InvoiceDao;
 import com.uas.platform.b2c.logistics.dao.InvoiceFOrderDao;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrder;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrderDetail;
+import com.uas.platform.b2c.logistics.model.Invoice;
+import com.uas.platform.b2c.logistics.model.InvoiceDetail;
 import com.uas.platform.core.model.Status;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -20,30 +21,30 @@ import java.util.List;
 public class InvoiceNotifyServiceImpl implements InvoiceNotifyService {
 
 	@Autowired
-	private InvoiceFOrderDao inForDao;
+	private InvoiceDao inForDao;
 
 	@Override
 	public List<AcceptNotify> getAllInvoiceNoitify() {
 		List<AcceptNotify> acceptNotifys = new ArrayList<AcceptNotify>();
 		// 获取平台发货单
-		List<InvoiceFOrder> fOrders = inForDao.findByBuyerenuuAndSendstatusAndUasPurcidNotNull(SystemSession.getUser().getEnterprise()
+		List<Invoice> fOrders = inForDao.findByBuyerenuuAndSendstatusAndUasPurcidNotNull(SystemSession.getUser().getEnterprise()
 				.getUu(), Status.NOT_UPLOAD.value());
 		if (!CollectionUtils.isEmpty(fOrders)) {
-			for (InvoiceFOrder fOrder : fOrders) {
+			for (Invoice fOrder : fOrders) {
 				AcceptNotify acceptNotify = new AcceptNotify();
 				acceptNotify.setCreateTime(new Date());
 				acceptNotify.setId(fOrder.getId());
 				// 这里记录的是平台的订单号
-				acceptNotify.setPurchaseId(fOrder.getOrid());
+				acceptNotify.setPurchaseId(fOrder.getOrderId());
 				double qtys = 0D;
 				List<AcceptNotifyDetail> notifyDetails = new ArrayList<AcceptNotifyDetail>();
-				for (InvoiceFOrderDetail detail : fOrder.getInvoiceFOrderDetails()) {
+				for (InvoiceDetail detail : fOrder.getInvoiceDetails()) {
 					AcceptNotifyDetail notifyDetail = new AcceptNotifyDetail();
 					notifyDetail.setBatchcode(detail.getBatchCode());
-					notifyDetail.setQty(detail.getNumber());
-					notifyDetail.setPrice(detail.getTaxunitprice());
+					notifyDetail.setQty(detail.getQty());
+					notifyDetail.setPrice(detail.getTaxUnitprice());
 					notifyDetails.add(notifyDetail);
-					qtys = qtys + detail.getNumber();
+					qtys = qtys + detail.getQty();
 				}
 				acceptNotify.setNotifyDetail(notifyDetails);
 				acceptNotify.setQty(qtys);
@@ -57,7 +58,7 @@ public class InvoiceNotifyServiceImpl implements InvoiceNotifyService {
 	@Override
 	public void backSuccess(long[] ids) {
 		for (long id : ids) {
-			InvoiceFOrder fOrder = inForDao.findOne(id);
+			Invoice fOrder = inForDao.findOne(id);
 			fOrder.setSendstatus(Status.DOWNLOADED.value());
 			inForDao.save(fOrder);
 		}
@@ -66,7 +67,7 @@ public class InvoiceNotifyServiceImpl implements InvoiceNotifyService {
 	@Override
 	public void agreeInvoice(long[] ids) {
 		for (long id : ids) {
-			InvoiceFOrder fOrder = inForDao.findOne(id);
+			Invoice fOrder = inForDao.findOne(id);
 			// 安全性验证一下
 			if (fOrder.getSendstatus() == Status.DOWNLOADED.value()) {
 				fOrder.setStatusReceived(SystemSession.getUser().getUserUU());

+ 0 - 2
src/main/java/com/uas/platform/b2c/logistics/controller/InvoiceController.java

@@ -7,8 +7,6 @@ import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
 import com.uas.platform.b2c.logistics.model.Invoice;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrder;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchase;
 import com.uas.platform.b2c.logistics.service.InvoiceFOrderService;
 import com.uas.platform.b2c.logistics.service.InvoiceFPurchaseService;
 import com.uas.platform.b2c.logistics.service.InvoiceService;

+ 10 - 0
src/main/java/com/uas/platform/b2c/logistics/dao/InvoiceDao.java

@@ -49,4 +49,14 @@ public interface InvoiceDao extends JpaSpecificationExecutor<Invoice>, JpaReposi
 	 */
 	@Query(value = "select count(1) from Invoice ifo where ifo.invoiceid in (:invoiceids) and ifo.status = 404 and ifo.piclass = :piclass")
 	Integer countInBoundInvoice(@Param("invoiceids") List<String> invoiceids, @Param("piclass") Integer piclass);
+
+
+	/**
+	 * 根据买家UU和状态查询平台发货单
+	 *
+	 * @param buyerenuu  the buyerenuu 买家enuu
+	 * @param sendstatus the sendstatus 状态
+	 * @return list 返回InvoiceFOrder列表
+	 */
+	List<Invoice> findByBuyerenuuAndSendstatusAndUasPurcidNotNull(Long buyerenuu, Integer sendstatus);
 }

+ 19 - 0
src/main/java/com/uas/platform/b2c/logistics/dao/InvoiceDetailDao.java

@@ -0,0 +1,19 @@
+package com.uas.platform.b2c.logistics.dao;
+
+import com.uas.platform.b2c.logistics.model.InvoiceDetail;
+import com.uas.platform.b2c.logistics.model.InvoiceFPurchaseDetail;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface InvoiceDetailDao extends JpaSpecificationExecutor<InvoiceDetail>, JpaRepository<InvoiceDetail, Long> {
+
+    /**
+     * 根据采购单明细获取InvoiceFPurchaseDetail对象
+     *
+     * @param pudetailid the pudetailid 采购单明细id
+     * @return InvoiceFPurchaseDetail 返回InvoiceFPurchaseDetail对象
+     */
+    InvoiceDetail findByPurchaseDetailId(Long pudetailid);
+}

+ 0 - 1
src/main/java/com/uas/platform/b2c/logistics/service/InvoiceFPurchaseDetailService.java

@@ -1,6 +1,5 @@
 package com.uas.platform.b2c.logistics.service;
 
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchaseDetail;
 
 /**
  * The interface InvoiceFPurchaseDetail service.

+ 7 - 4
src/main/java/com/uas/platform/b2c/logistics/service/InvoiceService.java

@@ -2,16 +2,12 @@ package com.uas.platform.b2c.logistics.service;
 
 import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2c.logistics.model.Invoice;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrder;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchase;
 import com.uas.platform.b2c.trade.order.model.Order;
 import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
 import org.springframework.data.domain.Page;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 
 import javax.management.OperationsException;
 import java.util.List;
@@ -25,6 +21,13 @@ public interface InvoiceService {
 
     ResultMap convert();
 
+    /**
+     * 批量发货单
+     * @param invoice
+     * @return
+     */
+    Invoice save(Invoice invoice);
+
     /**
      * 根据订单生成平台出货单及其明细信息,并保存出货单和修改订单状态信息
      * Created by huxz 2017-1-13 15:39:40

+ 0 - 3
src/main/java/com/uas/platform/b2c/logistics/service/impl/InvoiceFOrderDetailServiceImpl.java

@@ -1,10 +1,7 @@
 package com.uas.platform.b2c.logistics.service.impl;
 
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.uas.platform.b2c.logistics.dao.InvoiceFOrderDetailDao;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrderDetail;
 import com.uas.platform.b2c.logistics.service.InvoiceFOrderDetailService;
 
 @Service

+ 0 - 7
src/main/java/com/uas/platform/b2c/logistics/service/impl/InvoiceFPurchaseDetailServiceImpl.java

@@ -1,13 +1,6 @@
 package com.uas.platform.b2c.logistics.service.impl;
 
-import com.uas.platform.b2c.core.support.SystemSession;
-import com.uas.platform.b2c.core.utils.NumberUtil;
-import com.uas.platform.b2c.logistics.dao.InvoiceFPurchaseDetailDao;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchase;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchaseDetail;
 import com.uas.platform.b2c.logistics.service.InvoiceFPurchaseDetailService;
-import com.uas.platform.core.model.Status;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 @Service

+ 15 - 0
src/main/java/com/uas/platform/b2c/logistics/service/impl/InvoiceServiceImpl.java

@@ -144,6 +144,21 @@ public class InvoiceServiceImpl implements InvoiceService {
         return ResultMap.success(invoices1.size());
     }
 
+    /**
+     * 批量发货单
+     *
+     * @param invoice
+     * @return
+     */
+    @Override
+    public Invoice save(Invoice invoice) {
+        if (invoice != null) {
+            return null;
+        } else {
+            return invoiceDao.save(invoice);
+        }
+    }
+
     @Override
     public Invoice sendInvoiceFOrder(String inid) {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");

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

@@ -728,6 +728,9 @@ public class Goods implements Serializable {
 	}
 
 	public void setStatus() {
+		if (this.autoPublish == null) {
+			this.autoPublish = Boolean.TRUE;
+		}
 		if (this.autoPublish) {
 			if (StringUtils.isEmpty(this.packaging) || (this.minBuyQty == null) || (this.minPackQty == null) || (this.b2cMinDelivery == null) || (this.b2cMaxDelivery == null) || StringUtils.isEmpty(this.qtyPrice)) {
 				//做未上架处理
@@ -1737,8 +1740,11 @@ public class Goods implements Serializable {
 	 * 根据最小起订量 调整分段信息
 	 */
 	public void adjustFragmentPrice() {
-		if (!StringUtils.isEmpty(this.minBuyQty) && org.apache.commons.lang.StringUtils.isNotEmpty(this.qtyPrice)) {
-			List<GoodsQtyPrice> array = FastjsonUtils.fromJsonArray(this.qtyPrice, GoodsQtyPrice.class);
+		List<GoodsQtyPrice> array = new ArrayList<>();
+		if (org.apache.commons.lang.StringUtils.isNotEmpty(this.qtyPrice)) {
+			array = FastjsonUtils.fromJsonArray(this.qtyPrice, GoodsQtyPrice.class);
+		}
+		if (!StringUtils.isEmpty(this.minBuyQty) && CollectionUtils.isNotEmpty(array)) {
 			GoodsQtyPrice price = array.get(0);
 			if (NumberUtil.compare(price.getStart(), this.minBuyQty) > 0) {
 				price.setStart(this.minBuyQty);
@@ -1835,6 +1841,8 @@ public class Goods implements Serializable {
 		if (this.autoPublish == null) {
 			this.autoPublish = Boolean.TRUE;
 		}
+		setMinBuyQtyByMinPackQty(this.minBuyQty);
+		adjustFragmentPrice();
 		this.setStatus();
 		return this;
 	}
@@ -1920,6 +1928,9 @@ public class Goods implements Serializable {
 			this.breakUp = releaseProductByBatch.getBreakUp();
 			this.perQty = releaseProductByBatch.getBreakUp() ? 1 : releaseProductByBatch.getMinPackage();
 		}
+		if (IntegerConstant.NO_INT == ignoreImport || StringUtils.isEmpty(this.reserve)) {
+			this.reserve = releaseProductByBatch.getReserve();
+		}
 		this.batchid = releaseProductByBatch.getRelbatchid();
 		this.storeid = releaseProductByBatch.getStoreid();
 		this.storeName = releaseProductByBatch.getStoreName();
@@ -1927,6 +1938,8 @@ public class Goods implements Serializable {
 		if (this.autoPublish == null) {
 			this.autoPublish = Boolean.TRUE;
 		}
+		setMinBuyQtyByMinPackQty(this.minBuyQty);
+		adjustFragmentPrice();
 		this.setStatus();
 
 		return this;

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

@@ -701,7 +701,7 @@ public class ReleaseProductByBatch implements Serializable {
 	public void setReserveByExcel(Object value) {
 		setReserveStr(StringUtilB2C.getStr(value));
 		if (StringUtils.isEmpty(value) || !RegexConstant.isNumber(value.toString())) {
-			setReserve(DoubleConstant.zero);
+			addErrmsg(ErrorInfoConstant.RESERVE_NUMBER_INFO.getInfo());
 		} else {
 			Double reserve = Double.valueOf(value.toString());
 			if (reserve % 1 != 0) {

+ 4 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/service/InOutboundDetailService.java

@@ -1,11 +1,10 @@
 package com.uas.platform.b2c.prod.commodity.service;
 
 import com.uas.platform.b2c.logistics.model.InvoiceDetail;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrderDetail;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchaseDetail;
 import com.uas.platform.b2c.prod.commodity.model.InOutboundDetail;
 
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 /**
@@ -26,4 +25,7 @@ public interface InOutboundDetailService {
      * @return
      */
     Set<InOutboundDetail> produceInOutboundDetailByInvoiceDetail(Set<InvoiceDetail> details);
+
+
+    Map<String, Set<InOutboundDetail>> initInOutboundDetailByQty (Set<InOutboundDetail> newInOutboundDetail);
 }

+ 1 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/service/ProductService.java

@@ -341,9 +341,8 @@ public interface ProductService {
      * @param reList 临时表的id
      * @param ignoreImport 1表示忽略导入,0代表覆盖导入
      * @param newInOutboundDetail 出入库明细
-     * @param inOutMap 出入库的map
      */
-    void updateProductsByReleaseProductByBatch(Set<Long> prIds, List<ReleaseProductByBatch> reList, Integer ignoreImport, Set<InOutboundDetail> newInOutboundDetail, Map<String, Set<InOutboundDetail>> inOutMap);
+    void updateProductsByReleaseProductByBatch(Set<Long> prIds, List<ReleaseProductByBatch> reList, Integer ignoreImport, Set<InOutboundDetail> newInOutboundDetail);
 
 
     /**

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

@@ -1,5 +1,6 @@
 package com.uas.platform.b2c.prod.commodity.service.impl;
 
+import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
@@ -179,27 +180,39 @@ public class CommodityInOutboundServiceImpl implements CommodityInOutboundServic
                 }
                 prids.add(inOutboundDetail.getProductId());
             }
+            User user = SystemSession.getUser();
             String inOutboundId = createNumberService.generateOrderNumber(com.uas.platform.b2c.core.constant.EncodingRulesConstant.INOUTBOUND_NUM, "trade$commodity_in_outbound", 8);
             CommodityInOutbound inOutbound = new CommodityInOutbound(type);
             inOutbound.setInOutId(inOutboundId);
             Short i = 1;
             Set<InOutboundDetail> set = new HashSet<>();
+            Set<Product> productSet = new HashSet<>();
             if (CollectionUtils.isNotEmpty(prids)) {
                 List<Product> products = productService.findByProductId(prids);
                 for (InOutboundDetail inOutboundDetail : detaiList) {
                     for (Product product : products) {
+                        if (user.getEnterprise().getUu().longValue() != product.getEnUU().longValue()) {
+                            throw new IllegalOperatorException("型号:" + product.getPcmpcode() + ",品牌:" +product.getPbranden()+"不属于本公司,不能做出入库");
+                        }
                         if (inOutboundDetail.getProductId().longValue() == product.getId().longValue()) {
                             if (InOutBoundType.INBOUND.equals(type) || InOutBoundType.OTHER_INBOUND.equals(type) || InOutBoundType.PURCHASE_INBOUND.equals(type)) {
+                                //只有入库会影响成本单价
+                                if (NumberUtil.compare(inOutboundDetail.getPrice(), DoubleConstant.zero) > 0 && NumberUtil.compare(product.getPrice(), DoubleConstant.zero) > 0) {
+                                    product.setPrice(NumberUtil.div(NumberUtil.add(NumberUtil.mul(product.getPrice(), product.getErpReserve()), NumberUtil.mul(inOutboundDetail.getPrice(), inOutboundDetail.getQty())), NumberUtil.add(product.getErpReserve(), inOutboundDetail.getQty())));
+
+
+                                }
                                 product.setErpReserve(NumberUtil.add(product.getErpReserve(), inOutboundDetail.getQty()));
+                                productSet.add(product);
                             } else {
                                 //出库
                                 if (NumberUtil.compare(product.getErpReserve(), DoubleConstant.zero) == 0) {
-                                    break;
+                                    throw new IllegalOperatorException("型号:" + product.getPcmpcode() + ",品牌:" +product.getPbranden()+"的物料为0,不能做出库");
                                 } else if (NumberUtil.compare(product.getErpReserve(), inOutboundDetail.getQty()) > 0) {
                                     product.setErpReserve(NumberUtil.sub(product.getErpReserve(), inOutboundDetail.getQty()));
+                                    productSet.add(product);
                                 } else {
-                                    inOutboundDetail.setQty(product.getErpReserve());
-                                    product.setErpReserve(DoubleConstant.zero);
+                                    throw new IllegalOperatorException("型号:" + product.getPcmpcode() + ",品牌:" +product.getPbranden()+"的物料库存数为"+product.getErpReserve() + "出库数是:"+inOutboundDetail.getQty()+"不能做出库");
                                 }
 
                             }
@@ -228,7 +241,14 @@ public class CommodityInOutboundServiceImpl implements CommodityInOutboundServic
             //重新计算成本价、在售产品的库存信息需要更新
             List<Long> pridList = new ArrayList<>();
             pridList.addAll(prids);
-            productService.updateProductsByInBound(pridList);
+            List<Product> productList = new ArrayList<>();
+            productList.addAll(productSet);
+            if (CollectionUtils.isNotEmpty(productList)) {
+                productService.save(productList);
+            }
+            if (CollectionUtils.isNotEmpty(pridList)) {
+                productService.updateProductsByInBound(pridList);
+            }
             return ResultMap.success(commodityInOutbound);
         }
     }

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

@@ -1,19 +1,17 @@
 package com.uas.platform.b2c.prod.commodity.service.impl;
 
+import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.logistics.model.InvoiceDetail;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrderDetail;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchaseDetail;
+import com.uas.platform.b2c.prod.commodity.constant.DoubleConstant;
 import com.uas.platform.b2c.prod.commodity.model.InOutboundDetail;
 import com.uas.platform.b2c.prod.commodity.dao.InOutboundDetailDao;
 import com.uas.platform.b2c.prod.commodity.service.InOutboundDetailService;
+import com.uas.platform.b2c.prod.commodity.type.InOutBoundType;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 /**
  * description
@@ -66,4 +64,27 @@ public class InOutboundDetailServiceImpl implements InOutboundDetailService {
         }
         return inOutBoundset;
     }
+
+    public Map<String, Set<InOutboundDetail>> initInOutboundDetailByQty (Set<InOutboundDetail> newInOutboundDetail) {
+        Map<String, Set<InOutboundDetail>> inOutMap = new HashMap<>();
+        if (CollectionUtils.isNotEmpty(newInOutboundDetail)) {
+            Set<InOutboundDetail> inBoundDetail = new HashSet<>();
+            Set<InOutboundDetail> outBoundDetail = new HashSet<>();
+            for (InOutboundDetail detail1 : newInOutboundDetail) {
+                if (NumberUtil.compare(detail1.getQty(), DoubleConstant.zero) < 0) {
+                    detail1.setQty(Math.abs(detail1.getQty()));
+                    outBoundDetail.add(detail1);
+                } else if (NumberUtil.compare(detail1.getQty(), DoubleConstant.zero) > 0) {
+                    inBoundDetail.add(detail1);
+                }
+            }
+            if (CollectionUtils.isNotEmpty(inBoundDetail)) {
+                inOutMap.put(InOutBoundType.OTHER_INBOUND, inBoundDetail);
+            }
+            if (CollectionUtils.isNotEmpty(outBoundDetail)) {
+                inOutMap.put(InOutBoundType.OTHER_OUTBOUND, outBoundDetail);
+            }
+        }
+        return inOutMap;
+    }
 }

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

@@ -24,7 +24,6 @@ import com.uas.platform.b2c.prod.commodity.constant.StringConstant;
 import com.uas.platform.b2c.prod.commodity.dao.*;
 import com.uas.platform.b2c.prod.commodity.model.*;
 import com.uas.platform.b2c.prod.commodity.service.*;
-import com.uas.platform.b2c.prod.commodity.type.InOutBoundType;
 import com.uas.platform.b2c.prod.commodity.type.ProductConstant;
 import com.uas.platform.b2c.prod.commodity.util.GoodsUtil;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
@@ -2214,10 +2213,9 @@ public class ProductServiceImpl implements ProductService {
      * @param reList       临时表的id
      * @param ignoreImport 1表示忽略导入,0代表覆盖导入
      * @param newInOutboundDetail 需要确定的出入库
-     * @param inOutMap 出入库的map
      */
     @Override
-    public void updateProductsByReleaseProductByBatch(Set<Long> prIds, List<ReleaseProductByBatch> reList, Integer ignoreImport, Set<InOutboundDetail> newInOutboundDetail, Map<String, Set<InOutboundDetail>> inOutMap) {
+    public void updateProductsByReleaseProductByBatch(Set<Long> prIds, List<ReleaseProductByBatch> reList, Integer ignoreImport, Set<InOutboundDetail> newInOutboundDetail) {
         if (CollectionUtils.isEmpty(prIds) || CollectionUtils.isEmpty(reList)) {
             return ;
         }
@@ -2230,7 +2228,7 @@ public class ProductServiceImpl implements ProductService {
                         !productByBatch.getReleaseCode().equals(ReleaseStatus.success.value())) {
                     continue;
                 }
-                if ((productByBatch.getId() != null) &&(productByBatch.getId().longValue() == product.getId().longValue()) ) {
+                if ((productByBatch.getProductid() != null) &&(productByBatch.getProductid().longValue() == product.getId().longValue()) ) {
                     // ignoreImport 1表示忽略导入,0代表覆盖导入
                     if (StringUtils.isEmpty(product.getPackaging()) || (ignoreImport == IntegerConstant.NO_SHORT)) {
                         product.setPackaging(productByBatch.getPackaging());
@@ -2245,7 +2243,7 @@ public class ProductServiceImpl implements ProductService {
                     if (StringUtils.isEmpty(product.getSpec()) || (ignoreImport == IntegerConstant.NO_SHORT)) {
                         product.setSpec(productByBatch.getSpec());
                     }
-                    if ((ignoreImport == IntegerConstant.NO_SHORT) || (NumberUtil.compare(product.getErpReserve(), DoubleConstant.zero) == 0)) {
+                    if ((ignoreImport == IntegerConstant.NO_SHORT) || (NumberUtil.compare(product.getErpReserve(), productByBatch.getReserve()) != 0)) {
                         Double qty = NumberUtil.sub(productByBatch.getReserve(), product.getErpReserve());
                         if (NumberUtil.compare(qty, DoubleConstant.zero) != 0) {
                             //做出入库记录
@@ -2261,24 +2259,6 @@ public class ProductServiceImpl implements ProductService {
             }
         }
         productDao.save(freshProducts);
-        if (CollectionUtils.isNotEmpty(newInOutboundDetail)) {
-            Set<InOutboundDetail> inBoundDetail = new HashSet<>();
-            Set<InOutboundDetail> outBoundDetail = new HashSet<>();
-            for (InOutboundDetail detail1 : newInOutboundDetail) {
-                if (NumberUtil.compare(detail1.getQty(), DoubleConstant.zero) < 0) {
-                    detail1.setQty(Math.abs(detail1.getQty()));
-                    outBoundDetail.add(detail1);
-                } else if (NumberUtil.compare(detail1.getQty(), DoubleConstant.zero) > 0) {
-                    inBoundDetail.add(detail1);
-                }
-            }
-            if (CollectionUtils.isNotEmpty(inBoundDetail)) {
-                inOutMap.put(InOutBoundType.OTHER_INBOUND, inBoundDetail);
-            }
-            if (CollectionUtils.isNotEmpty(outBoundDetail)) {
-                inOutMap.put(InOutBoundType.OTHER_OUTBOUND, outBoundDetail);
-            }
-        }
     }
 
 
@@ -2293,62 +2273,13 @@ public class ProductServiceImpl implements ProductService {
             return;
         } else {
             List<Product> products = productDao.findProductInId(prids);
-            Set<Long> idSet = new HashSet<>();
-            idSet.addAll(prids);
-            List<InOutboundDetail> inOutboundDetails = inOutboundDetailService.findByProductId(idSet);
-            Map<Long, List<Double>> map = new HashMap<>();
-            Double qtyContainPrice = 0.0d;
-            Double qty = 0.0d;
-            Double totalPrice = 0.0d;
-            List<Double> doubleList = null;
-            for (InOutboundDetail inOutboundDetail : inOutboundDetails) {
-                doubleList = map.get(inOutboundDetail.getProductId());
-                qtyContainPrice = 0.0d; qty = 0.0d; totalPrice = 0.0d;
-                if (doubleList == null) {
-                    doubleList = new ArrayList<>();
-                    doubleList.add(qtyContainPrice);
-                    doubleList.add(qty);
-                    doubleList.add(totalPrice);
-                } else {
-                    qtyContainPrice = doubleList.get(0);
-                    qty = doubleList.get(1);
-                    totalPrice = doubleList.get(2);
-                }
-                if (InOutBoundType.INBOUND.equals(inOutboundDetail.getCommodityInOutbound().getType())) {
-                    qty = NumberUtil.add(qty, inOutboundDetail.getQty());
-                    if (inOutboundDetail.getPrice() != null) {
-                        qtyContainPrice = NumberUtil.add(qtyContainPrice, inOutboundDetail.getQty());
-                        totalPrice = NumberUtil.add(totalPrice, NumberUtil.mul(inOutboundDetail.getPrice(), inOutboundDetail.getQty()));
-                    }
-                } else {
-                    qty = NumberUtil.sub(qty, inOutboundDetail.getQty());
-                }
-                doubleList.set(0, qtyContainPrice);
-                doubleList.set(1, qty);
-                doubleList.set(2, totalPrice);
-                map.put(inOutboundDetail.getProductId(), doubleList);
-            }
-
-            for (Product product : products) {
-                List<Double> list = map.get(product.getId());
-                if (CollectionUtils.isNotEmpty(list)) {
-                    qty = list.get(1);
-                    if (NumberUtil.compare(qty, DoubleConstant.zero) < 1) {
-                        product.setErpReserve(DoubleConstant.zero);
-                    } else {
-                        product.setErpReserve(qty);
-                    }
-                    double price = NumberUtil.div(list.get(2), list.get(0));
-                    product.setPrice(price);
-                }
-            }
-
             List<Goods> goodsList = goodsService.findByProductids(prids);
             for (Product product : products) {
                 for (Goods goods : goodsList) {
                     if (goods.getProductid().longValue() == product.getId().longValue()) {
                         goods.setReserve(product.getErpReserve());
                         goods.setStatus();
+                        break;
                     }
                 }
             }

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

@@ -142,6 +142,10 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	@Autowired
 	private CommodityInOutboundService commodityInOutboundService;
 
+	@Autowired
+	private InOutboundDetailService inOutboundDetailService;
+
+
 	private final Logger logger = Logger.getLogger(getClass());
 
 	/**
@@ -257,8 +261,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 						releaseProductByBatch.setReleaseCode(ReleaseStatus.lack_info.value());
 						releaseProductByBatch.setReleaseStatus(ReleaseStatus.lack_info.getPhrase());
 					}
-					// 简单验证数据,防止空行保存的情况(品牌、类目、型号)
-					if (blankNum != 3) {
+					// 简单验证数据,防止空行保存的情况(品牌、类目、型号、庫存信息)
+					if (blankNum != 4) {
 						total++;
 						releaseProductByBatchs.add(releaseProductByBatch);
 					}
@@ -497,6 +501,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			goodses = goodsService.findGoodsByBatchCodes(batchCodes);
 		}
 		Goods newGoods = null;
+		List<GoodsHistory> goodsHistoryList = new ArrayList<>();
 		for (ReleaseProductByBatch aBatch : batchList) {
 			newGoods = null;
 			for (Goods goods : goodses) {
@@ -517,7 +522,10 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				}
 			}
 			if (newGoods == null) {
-				newGoods = aBatch.releaseProductByBatchConvertToGoods(aBatch);
+				newGoods = new Goods();
+				TradeDeliveryDelayTime delayTime = getDelayTime(aBatch);
+				newGoods.setGoodsByReleaseProductByBatch(aBatch, delayTime);
+				goodsHistoryList.add(goodsHistoryService.converTGoodsHist(newGoods, GoodsHistory.OperateType.Publish.getPhrase(), false));
 			}
 			ResultMap resultMap = goodsService.updateGoods(newGoods);
 			if (resultMap.isSuccess()) {
@@ -1210,6 +1218,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			Object reserveValue = readWorkBookCell(row.getCell(UploadConstant.RESERVE_NUMBER), Cell.CELL_TYPE_STRING,
 					rowNum, UploadConstant.RESERVE_NUMBER);
 			aProduct.setReserveByExcel(reserveValue);
+			if (StringUtils.isEmpty(reserveValue)) {
+				result += 1;
+			}
 
 			Object costPrice = readWorkBookCell(row.getCell(UploadConstant.COST_PRICE), Cell.CELL_TYPE_STRING,
 					rowNum, UploadConstant.COST_PRICE);
@@ -1341,7 +1352,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		}
 		aProduct.setFragmentPrice(StringUtilB2C.getStr(firstValue), 0);
 		if (StringUtils.isEmpty(firstValue)) {
-			aProduct.addErrmsg(ErrorInfoConstant.PRICE_INFO.getInfo());
+			//aProduct.addErrmsg(ErrorInfoConstant.PRICE_INFO.getInfo());
 		} else {
 			if (RegexConstant.isNumber(firstValue.toString())) {
 				Double cellPrice = Double.valueOf(firstValue.toString());
@@ -1353,7 +1364,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					aProduct.addErrmsg(ErrorInfoConstant.PRICE_INFO.getInfo());
 				}
 			} else {
-				aProduct.addErrmsg(ErrorInfoConstant.PRICE_INFO.getInfo());
+				//aProduct.addErrmsg(ErrorInfoConstant.PRICE_INFO.getInfo());
 			}
 
 		}
@@ -1431,7 +1442,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				Double price = Double.valueOf(priceValue.toString());
 				Double start = Double.valueOf(startValue.toString());
 				if (validatePrice(price) && validateStartNumber(start, aProduct.getMinBuyQty())) {
-					GoodsQtyPrice qtyPrice = getOneQtyPrice(Double.valueOf(startValue.toString()), DoubleConstant.maxMinPackageQty,
+					GoodsQtyPrice qtyPrice = getOneQtyPrice(Double.valueOf(startValue.toString()), DoubleConstant.maxReserve,
 							price, aProduct.getRmbTaxRate(), aProduct.getCurrency());
 					qtyPriceList.add(qtyPrice);
 					qtyPriceList.get(0).setEnd(Double.valueOf(startValue.toString()) - 1);
@@ -1472,7 +1483,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				Double start = Double.valueOf(startValue.toString());
 				Double lastEnd = qtyPriceList.get(qtyPriceList.size() - 1).getStart();
 				if (validatePrice(price) && validateStartNumber(start, lastEnd)) {
-					GoodsQtyPrice qtyPrice = getOneQtyPrice(start, DoubleConstant.maxMinPackageQty,
+					GoodsQtyPrice qtyPrice = getOneQtyPrice(start, DoubleConstant.maxReserve,
 							price, aProduct.getRmbTaxRate(), aProduct.getCurrency());
 					qtyPriceList.get(qtyPriceList.size() - 1).setEnd(start - 1);
 					qtyPriceList.add(qtyPrice);
@@ -1809,8 +1820,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
         if (StringUtils.isEmpty(batch)) {
             return "0";
         }
-		List<ReleaseProductByBatch> releaseProductByBatchList =
-				releaseProductByBatchDao.findByRelbatchid(batch);
+		List<ReleaseProductByBatch> releaseProductByBatchList = releaseProductByBatchDao.findByRelbatchid(batch);
 		if (CollectionUtils.isEmpty(releaseProductByBatchList)) {
 			return String.valueOf(IntegerConstant.NO_SHORT);
 		}
@@ -1846,28 +1856,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		if (CollectionUtils.isNotEmpty(list)) {
 			List<Goods> goodses = new ArrayList<>();
 			Goods goods = null;
-			TradeDeliveryDelayTime delayTime = null;
-			ReleaseProductByBatch releaseProductByBatch1 = list.get(0);
-			if (releaseProductByBatch1.getStoreid().equals(SysConf.getStoreid())) {
-				// 增加交货延长期限
-				List<TradeDeliveryDelayTime> tradeDeliveryDelayTime = tradeDeliveryDelayTimeService.getTradeDeliveryDelayTime();
-				if (releaseProductByBatch1.getCurrency().equals(StringConstant.RMB)) {
-					for (TradeDeliveryDelayTime deliveryDelayTime : tradeDeliveryDelayTime) {
-						if (deliveryDelayTime.getType() == IntegerConstant.DOMESTIC_DELAY) {
-							delayTime = deliveryDelayTime;
-						}
-					}
-				} else {
-					for (TradeDeliveryDelayTime deliveryDelayTime : tradeDeliveryDelayTime) {
-						if (deliveryDelayTime.getType() == IntegerConstant.ABROAD_DELAY) {
-							delayTime = deliveryDelayTime;
-						}
-					}
-				}
-				if (delayTime == null) {
-					throw new IllegalOperatorException("平台未设置供应商延长时间,请联系管理员");
-				}
-			}
+			TradeDeliveryDelayTime delayTime = getDelayTime(list.get(0));
 			List<Goods> goodlist = null;
 			if (CollectionUtils.isNotEmpty(idSet)) {
 				List<Long> prids = new ArrayList<>();
@@ -1877,6 +1866,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			List<ReleaseProductByBatch> insertGoods = new ArrayList<>();
 			Set<Long> prids = new HashSet<>();
 			List<Goods> updateGoods = new ArrayList<>();
+			List<GoodsHistory> goodsHistoryList = new ArrayList<>();
 			for (ReleaseProductByBatch releaseProductByBatch : list) {
 				if (releaseProductByBatch.getReleaseCode().intValue() == ReleaseStatus.success.value() || releaseProductByBatch.getReleaseCode().intValue() == ReleaseStatus.failure.value()) {
                     Boolean isExist = false;
@@ -1888,6 +1878,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
                                 isExist = true;
 								prids.add(releaseProductByBatch.getProductid());
                                 goods1.updateGoodsByReleaseProductByBatch(releaseProductByBatch, delayTime, ignoreImport);
+								goodsHistoryList.add(goodsHistoryService.converTGoodsHist(goods1, GoodsHistory.OperateType.Update.getPhrase(), false));
 								updateGoods.add(goods1);
                                 break;
 							}
@@ -1902,6 +1893,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				for (ReleaseProductByBatch releaseProductByBatch : insertGoods) {
 					goods = new Goods();
 					goods.setGoodsByReleaseProductByBatch(releaseProductByBatch, delayTime);
+					goodsHistoryList.add(goodsHistoryService.converTGoodsHist(goods, GoodsHistory.OperateType.Publish.getPhrase(), false));
 					goodses.add(goods);
 				}
 			}
@@ -1911,12 +1903,40 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			if (CollectionUtils.isNotEmpty(updateGoods)) {
                 goodsDao.save(updateGoods);
             }
+            if (CollectionUtils.isNotEmpty(goodsHistoryList)) {
+				goodsHistoryService.save(goodsHistoryList);
+			}
 			return (goodses.size() + updateGoods.size());
 		} else {
 			return 0;
 		}
 	}
 
+	public TradeDeliveryDelayTime getDelayTime(ReleaseProductByBatch releaseProductByBatch) {
+		TradeDeliveryDelayTime delayTime = null;
+		if (releaseProductByBatch.getStoreid().equals(SysConf.getStoreid())) {
+			// 增加交货延长期限
+			List<TradeDeliveryDelayTime> tradeDeliveryDelayTime = tradeDeliveryDelayTimeService.getTradeDeliveryDelayTime();
+			if (releaseProductByBatch.getCurrency().equals(StringConstant.RMB)) {
+				for (TradeDeliveryDelayTime deliveryDelayTime : tradeDeliveryDelayTime) {
+					if (deliveryDelayTime.getType() == IntegerConstant.DOMESTIC_DELAY) {
+						delayTime = deliveryDelayTime;
+					}
+				}
+			} else {
+				for (TradeDeliveryDelayTime deliveryDelayTime : tradeDeliveryDelayTime) {
+					if (deliveryDelayTime.getType() == IntegerConstant.ABROAD_DELAY) {
+						delayTime = deliveryDelayTime;
+					}
+				}
+			}
+			if (delayTime == null) {
+				throw new IllegalOperatorException("平台未设置供应商延长时间,请联系管理员");
+			}
+		}
+		return delayTime;
+	}
+
 	/**
 	 * 批量保存pcb的信息
 	 * @param idSet id
@@ -2045,9 +2065,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
             commonDao.save(productPrivates, ProductPrivate.class);
 		}
 		//将本次临时表中的数据更新到物料表中
-        if (CollectionUtils.isNotEmpty(updateProducts)) {
-			Map<String, Set<InOutboundDetail>> inOutMap = new HashedMap();
-            productService.updateProductsByReleaseProductByBatch(prIds, releaseProductByBatchList, ignoreImport, newInOutboundDetail, inOutMap);
+		productService.updateProductsByReleaseProductByBatch(prIds, releaseProductByBatchList, ignoreImport, newInOutboundDetail);
+		if (CollectionUtils.isNotEmpty(newInOutboundDetail)) {
+			Map<String, Set<InOutboundDetail>> inOutMap = inOutboundDetailService.initInOutboundDetailByQty(newInOutboundDetail);
 			Set<String> stringSet = inOutMap.keySet();
 			for (String type : stringSet) {
 				CommodityInOutbound commodityInOutbound = commodityInOutboundService.produceCommodityInOutbound(inOutMap.get(type), type);
@@ -2124,15 +2144,15 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			public void run() {
 
 				//创建历史库存
-				List<Goods> goodses1 = goodsService.findByBatchId(batchid);
-				List<GoodsHistory> list = new ArrayList<>();
-				for (Goods goods : goodses1) {
-					GoodsHistory goodsHistory = goodsHistoryService.converTGoodsHist(goods, GoodsHistory.OperateType.Publish.getPhrase(), false);
-					list.add(goodsHistory);
-				}
-				if (CollectionUtils.isNotEmpty(list)) {
-					goodsHistoryService.save(list);
-				}
+//				List<Goods> goodses1 = goodsService.findByBatchId(batchid);
+//				List<GoodsHistory> list = new ArrayList<>();
+//				for (Goods goods : goodses1) {
+//					GoodsHistory goodsHistory = goodsHistoryService.converTGoodsHist(goods, GoodsHistory.OperateType.Publish.getPhrase(), false);
+//					list.add(goodsHistory);
+//				}
+//				if (CollectionUtils.isNotEmpty(list)) {
+//					goodsHistoryService.save(list);
+//				}
 				//创建物料的私有信息
 				productPrivateService.newProductPrivateIfNotExist(productIds);
 

+ 14 - 0
src/main/java/com/uas/platform/b2c/prod/store/model/StoreApply.java

@@ -41,6 +41,12 @@ public class StoreApply {
 	@Column(name = "apply_useruu")
 	private Long userUU;
 
+	/**
+	 * 主营产品
+	 */
+	@Column(name = "apply_description")
+	private String applyDescription;
+
 	/**
 	 * 申请人姓名
 	 */
@@ -181,6 +187,14 @@ public class StoreApply {
 	public StoreApply() {
 	}
 
+	public String getApplyDescription() {
+		return applyDescription;
+	}
+
+	public void setApplyDescription(String applyDescription) {
+		this.applyDescription = applyDescription;
+	}
+
 	public String getStoreUuid() {
 		return storeUuid;
 	}

+ 1 - 0
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java

@@ -151,6 +151,7 @@ public class StoreInServiceImpl implements StoreInService {
 		store.setType(storeApply.getType());
 		store.setCreateTime(date);
 		store.setUpdateTime(date);
+		store.setDescription(storeApply.getApplyDescription());
 
 		store.setEnUU(storeApply.getEnUU());
 		store.setEnterprise(storeApply.getEnterprise());

+ 2 - 4
src/main/java/com/uas/platform/b2c/trade/order/controller/PurchaseController.java

@@ -8,15 +8,13 @@ import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
 import com.uas.platform.b2c.core.support.view.JxlsExcelView;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchase;
-import com.uas.platform.b2c.logistics.model.Logistics;
+import com.uas.platform.b2c.logistics.model.Invoice;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
 import com.uas.platform.b2c.trade.order.model.Order;
 import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.b2c.trade.order.model.PurchaseModifyingHistory;
 import com.uas.platform.b2c.trade.order.service.PurchaseDetailService;
 import com.uas.platform.b2c.trade.order.service.PurchaseService;
-import com.uas.platform.b2c.trade.presale.model.ValidTime;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.logging.BufferedLoggerManager;
 import com.uas.platform.core.model.PageInfo;
@@ -238,7 +236,7 @@ public class PurchaseController {
 	 * @return the invoice f purchase
 	 */
 	@RequestMapping(value = "/{invoiceid}/ensurereceipt", method = RequestMethod.PUT)
-	public InvoiceFPurchase ensureReceipt(@PathVariable String invoiceid) {
+	public Invoice ensureReceipt(@PathVariable String invoiceid) {
 		assert logger != null;
 		logger.log("采购单管理", "平台确认收货,出货单id: " + invoiceid);
 		return purchaseService.ensuerAcceptInvoise(invoiceid);

+ 5 - 5
src/main/java/com/uas/platform/b2c/trade/order/model/OrderIndex.java

@@ -2,7 +2,7 @@ package com.uas.platform.b2c.trade.order.model;
 
 import com.alibaba.fastjson.annotation.JSONField;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrder;
+import com.uas.platform.b2c.logistics.model.Invoice;
 import com.uas.platform.b2c.prod.product.common.service.CreateNumberService;
 import com.uas.platform.core.model.EncodingRulesConstant;
 import com.uas.platform.core.model.Status;
@@ -1130,21 +1130,21 @@ public class OrderIndex extends Document implements Serializable {
 	 * @param createNumberService the create number service
 	 * @return the invoice f order
 	 */
-	public InvoiceFOrder convertInvoiceFOrder(CreateNumberService createNumberService) {
+	public Invoice convertInvoiceFOrder(CreateNumberService createNumberService) {
 		String invoiceid = EncodingRulesConstant.INVOICE_FROMORDER.replace("_TIMESTAP_NUMBER",
 				createNumberService.getTimeNumber("trade$invoice_fmor", 8));
 		Date date = new Date();
-		InvoiceFOrder inFor = new InvoiceFOrder();
+		Invoice inFor = new Invoice();
 		inFor.setInvoiceid(invoiceid);
 		// 给属性赋值
-		inFor.setCreattime(date);
+		inFor.setCreatetime(date);
 		inFor.setBuyeruu(this.getBuyeruu());
 		inFor.setBuyerenuu(this.getBuyerenuu());
 		inFor.setPrice(this.getPrice());
 		// TODO 这里需要考虑确认总价的(默认和总价相等 打折等其他逻辑待考虑)
 		inFor.setEnsurePrice(this.ensurePrice);
 		inFor.setJsonSpAddress(this.getJsonAddress());
-		inFor.setOrid(this.getId());
+		inFor.setOrderId(this.getId());
 		inFor.setSourceid(this.orderid);
 		inFor.setProofingid(this.proofingid);
 		return inFor;

+ 5 - 5
src/main/java/com/uas/platform/b2c/trade/order/model/OrderIndexDetail.java

@@ -1,6 +1,6 @@
 package com.uas.platform.b2c.trade.order.model;
 
-import com.uas.platform.b2c.logistics.model.InvoiceFOrderDetail;
+import com.uas.platform.b2c.logistics.model.InvoiceDetail;
 import com.uas.platform.b2c.prod.product.common.service.CreateNumberService;
 import com.uas.platform.core.model.EncodingRulesConstant;
 import com.uas.platform.core.persistence.StatusColumn;
@@ -473,8 +473,8 @@ public class OrderIndexDetail {
 	 * @param createNumberService the create number service
 	 * @return the invoice f order detail
 	 */
-	public InvoiceFOrderDetail convertInvoiceFOrderDetail(CreateNumberService createNumberService) {
-		InvoiceFOrderDetail inForD = new InvoiceFOrderDetail();
+	public InvoiceDetail convertInvoiceFOrderDetail(CreateNumberService createNumberService) {
+		InvoiceDetail inForD = new InvoiceDetail();
 		String detailid = EncodingRulesConstant.INVOICE_DETAIL_FROMORDER.replace("_TIMESTAP_NUMBER",
 				createNumberService.getTimeNumber("trade$invoice_fmor_dt", 9));
 		inForD.setDetailid(detailid);
@@ -483,12 +483,12 @@ public class OrderIndexDetail {
 		inForD.setCmpCode(this.cmpCode);
 		inForD.setImg(this.img);
 		inForD.setUnitprice(this.getUnitprice());
-		inForD.setNumber(this.getNumber());
+		inForD.setQty(this.getNumber());
 		inForD.setPrice(this.getPrice());
 		// TODO 这里需要考虑确认总价的(默认和总价相等 打折等其他逻辑待考虑)
 		inForD.setEnsurePrice(this.ensurePrice);
 		inForD.setStatus(this.getStatus());
-		inForD.setOrdetailid(this.getId());
+		inForD.setOrderDetailId(this.getId());
 		return inForD;
 	}
 

+ 2 - 2
src/main/java/com/uas/platform/b2c/trade/order/service/PurchaseService.java

@@ -1,7 +1,7 @@
 package com.uas.platform.b2c.trade.order.service;
 
 import com.alibaba.fastjson.JSONArray;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchase;
+import com.uas.platform.b2c.logistics.model.Invoice;
 import com.uas.platform.b2c.logistics.model.Logistics;
 import com.uas.platform.b2c.trade.order.model.Order;
 import com.uas.platform.b2c.trade.order.model.OrderDetail;
@@ -113,7 +113,7 @@ public interface PurchaseService {
 	 * @param invoiceid the invoiceid
 	 * @return invoice f purchase
 	 */
-	InvoiceFPurchase ensuerAcceptInvoise(String invoiceid);
+	Invoice ensuerAcceptInvoise(String invoiceid);
 
 	/**
 	 * 平台批量确定收货

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

@@ -39,11 +39,8 @@ import com.uas.platform.b2c.fa.settlement.model.ExchangeRate;
 import com.uas.platform.b2c.fa.settlement.service.BillSubmitService;
 import com.uas.platform.b2c.fa.settlement.service.ExchangeRateService;
 import com.uas.platform.b2c.logistics.dao.AddressDao;
-import com.uas.platform.b2c.logistics.dao.InvoiceFOrderDao;
-import com.uas.platform.b2c.logistics.dao.InvoiceFPurchaseDao;
 import com.uas.platform.b2c.logistics.dao.PickUpAddressDao;
 import com.uas.platform.b2c.logistics.model.*;
-import com.uas.platform.b2c.logistics.service.InvoiceFPurchaseService;
 import com.uas.platform.b2c.prod.commodity.constant.DoubleConstant;
 import com.uas.platform.b2c.prod.commodity.constant.StringConstant;
 import com.uas.platform.b2c.logistics.service.InvoiceService;
@@ -55,7 +52,6 @@ import com.uas.platform.b2c.prod.commodity.model.GoodsQtyPrice;
 import com.uas.platform.b2c.prod.commodity.service.GoodsHistoryService;
 import com.uas.platform.b2c.prod.commodity.service.GoodsService;
 import com.uas.platform.b2c.prod.product.common.service.CreateNumberService;
-import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
 import com.uas.platform.b2c.prod.product.component.modal.Component;
 import com.uas.platform.b2c.prod.product.component.service.ComponentService;
 import com.uas.platform.b2c.prod.store.dao.StoreInDao;

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

@@ -106,8 +106,6 @@ public class PurchaseServiceImpl implements PurchaseService {
 	@Autowired
 	private OrderDao orderDao;
 	@Autowired
-	private InvoiceFPurchaseDao invoiceFPurchaseDao;
-	@Autowired
 	private EnterpriseDao enterpriseDao;
 	// 这个只是为了粗暴拿到地址
 	@Autowired
@@ -117,8 +115,6 @@ public class PurchaseServiceImpl implements PurchaseService {
 	@Autowired
 	private BillInfoDao billInfoDao;
 	@Autowired
-	private InvoiceFPurchaseDetailDao invoiceFPurchaseDetailDao;
-	@Autowired
 	private ReceiptDetailDao receiptDetailDao;
 	@Autowired
 	private ReceiptDao receiptDao;
@@ -152,6 +148,8 @@ public class PurchaseServiceImpl implements PurchaseService {
 	private InstallmentService installmentService;
 	@Autowired
 	private BillSubmitService billSubmitService;
+	@Autowired
+	private InvoiceDetailDao invoiceDetailDao;
 
 	@Override
 	public Purchase save(Purchase purchase) {
@@ -526,22 +524,22 @@ public class PurchaseServiceImpl implements PurchaseService {
 		if (invoiceids != null) {
 			String[] inids = invoiceids.split(SplitChar.COMMA);
 			for (String invoiceid : inids) {
-				InvoiceFPurchase invoiceFp = invoiceFPurchaseDao.findByInvoiceid(invoiceid);
+				Invoice invoiceFp = invoiceService.getInvoice(invoiceid);
 				if (invoiceFp.getStatus() != Status.INBOUND.value()) {
 					throw new IllegalAccessError("出货单不为待收货状态,不能确认收货");
 				}
 				Long uu = SystemSession.getUser().getUserUU();
-				Purchase purchase = purchaseDao.findOne(invoiceFp.getPuid());
+				Purchase purchase = purchaseDao.findOne(invoiceFp.getPurchaseid());
 				purchase = StatusChangeUtil.updatePurchaseStatus(purchase, Status.INBOUND, Status.RECEIVED);
 				purchaseDao.save(purchase);
 				// 1、生成入库单
 				receiptService.createPreceipts(invoiceFp);
 				// 2、改写订单状态
-				orderService.setShipped(invoiceFp.getPuid());
+				orderService.setShipped(invoiceFp.getPurchaseid());
 				// 3、改写卖方出货单状态 (首先改成出货单已出货,再判断是否为现货,现货在直接保存为待收款)
 				invoiceFp.setStatusReceived(uu);
-				invoiceFPurchaseDao.save(invoiceFp);
-				invoiceService.setToReceiveMoney(invoiceFp.getPuid());
+				invoiceService.save(invoiceFp);
+				invoiceService.setToReceiveMoney(invoiceFp.getPurchaseid());
 			}
 			return "success";
 		}
@@ -550,14 +548,14 @@ public class PurchaseServiceImpl implements PurchaseService {
 
 	@Transactional
 	@Override
-	public InvoiceFPurchase ensuerAcceptInvoise(String invoiceid) {
-		InvoiceFPurchase invoiceFp = invoiceFPurchaseDao.findByInvoiceid(invoiceid);
+	public Invoice ensuerAcceptInvoise(String invoiceid) {
+		Invoice invoiceFp = invoiceService.getInvoice(invoiceid);
 		if (invoiceFp.getStatus().intValue() != Status.INBOUND.value()) {
 			throw new IllegalAccessError("出货单不为待收货状态,不能确认收货");
 		}
 		Long uu = SystemSession.getUser().getUserUU();
 		boolean allReceived = true;
-		Purchase purchase = purchaseDao.findOne(invoiceFp.getPuid());
+		Purchase purchase = purchaseDao.findOne(invoiceFp.getPurchaseid());
 		Set<PurchaseDetail> purchaseDetails = purchase.getPurchaseDetails();
 		for (PurchaseDetail purchaseDetail : purchaseDetails) {
 			if (purchaseDetail.getStatus().intValue() == Status.INBOUND.value() && (NumberUtil.compare(purchaseDetail.getShipQty(), purchaseDetail.getNumber()) == 0)) {
@@ -592,10 +590,10 @@ public class PurchaseServiceImpl implements PurchaseService {
 		}
 		// 3、改写卖方出货单状态 (首先改成出货单已出货,再判断是否为现货,现货在直接保存为待收款)
 		invoiceFp.setStatusReceived(uu);
-		for (InvoiceFPurchaseDetail invoiceF : invoiceFp.getInvoiceFPurchaseDetails()) {
+		for (InvoiceDetail invoiceF : invoiceFp.getInvoiceDetails()) {
 			invoiceF.setStatus(Status.RECEIVED.value());
 		}
-		InvoiceFPurchase thisinvoiceFp = invoiceFPurchaseDao.save(invoiceFp);
+		Invoice thisinvoiceFp = invoiceService.save(invoiceFp);
 		return thisinvoiceFp;
 	}
 
@@ -1020,7 +1018,7 @@ public class PurchaseServiceImpl implements PurchaseService {
 	 */
 // 传入已经修改为已收票状态的明细id
 	public void changeReceiptToReceivedBill(Long purchaseDetailId) {
-		InvoiceFPurchaseDetail invoiceFPurchaseDetail = invoiceFPurchaseDetailDao.findInvoiceFPurchaseDetailByPudetailid(purchaseDetailId);
+		InvoiceDetail invoiceFPurchaseDetail = invoiceDetailDao.findByPurchaseDetailId(purchaseDetailId);
 		List<ReceiptDetail> receiptDetails = receiptDetailDao.findReceiptDetailBySourceid(invoiceFPurchaseDetail.getDetailid());
 		if (receiptDetails == null || receiptDetails.size() == 0) {
 			System.out.println("出货单的明细对应不到入库单的明细行,出库单的明细行是:" + invoiceFPurchaseDetail.getDetailid());

+ 24 - 1
src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekPurchaseBomServiceImpl.java

@@ -685,15 +685,38 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
             return map;
         }
         try {
+            Date now = new Date();
+            List<Product> products = new ArrayList<>();
+            Integer newAmount = 0;
             List<SeekPurchaseByBatch> seekPurchaseByBatches = bom.getSeekPurchaseByBatchs();
             if (!CollectionUtils.isEmpty(seekPurchaseByBatches)) {
                 for (SeekPurchaseByBatch batch : seekPurchaseByBatches) {
+                    if (null == batch.getId()) {
+                        newAmount++;
+                    }
                     if (null == batch.getAmount()) {
                         batch.setAmount(1d);
                     }
+                    batch.setReleaseDate(now);
+                    Product product = new Product();
+                    if (CollectionUtils.isEmpty(productDao.findProductByPcmpcodeAndPbrandenAndEnUU(batch.getCode(), batch.getBrand(), SystemSession.getUser().getEnterprise().getUu()))){
+                        product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
+                        product.setUserUU(SystemSession.getUser().getUserUU());
+                        product.setProdNum(System.currentTimeMillis() + StringUtilB2C.getRandomNumber(5));
+                        product.setBrand(batch.getBrand());
+                        product.setCmpCode(batch.getCode());
+                        product.setPbranden(batch.getBrand());
+                        product.setPcmpcode(batch.getCode());
+                        product.setSpec(batch.getSpec());
+                        product.setProdName(batch.getKind());
+                        product.setKind(batch.getKind());
+                        products.add(product);
+                    }
                 }
                 seekPurchaseByBatchDao.save(seekPurchaseByBatches);
+                productDao.save(products);
             }
+            bom.setAmount(bom.getAmount() + newAmount);
             seekPurchaseBomDao.save(bom);
             map.put("success", true);
         } catch (Exception e) {
@@ -905,7 +928,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
                 newProduct.setReleaseDate(now);
                 //如果该物料在物料表中不存在,则将新增物料添加到物料表中
                 Product product = new Product();
-                if (!CollectionUtils.isEmpty(productDao.findProductByPcmpcodeAndPbrandenAndEnUU(newProduct.getCode(), newProduct.getBrand(), SystemSession.getUser().getEnterprise().getUu()))){
+                if (CollectionUtils.isEmpty(productDao.findProductByPcmpcodeAndPbrandenAndEnUU(newProduct.getCode(), newProduct.getBrand(), SystemSession.getUser().getEnterprise().getUu()))){
                     product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
                     product.setUserUU(SystemSession.getUser().getUserUU());
                     product.setProdNum(System.currentTimeMillis() + StringUtilB2C.getRandomNumber(5));

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


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/releasebyBatch-usd.xls


+ 0 - 5
src/main/webapp/resources/js/common/query/seekPurchase.js

@@ -110,11 +110,6 @@ define([ 'ngResource' ], function() {
             deleteBom: {
                 url: 'seek/bom/delete',
                 method: 'DELETE'
-            },
-            // 新增物料信息
-            addEaterialObj: {
-                url: 'seek/bom/detail/add',
-                method: 'POST'
             }
 		});
 }])

+ 12 - 49
src/main/webapp/resources/js/usercenter/controllers/forstore/bomListDetailCtrl.js

@@ -49,9 +49,6 @@ define(['app/app'], function(app) {
         $scope.editBom = false;
         // 是否编辑询价
         $scope.editSeek = false;
-        // 是否新增物料
-        $scope.addNew = false;
-        $scope.newMateriel = [];
         // bom数据
         $scope.bomData = {};
         // 求购参数
@@ -171,28 +168,6 @@ define(['app/app'], function(app) {
                             })
                         }
                     }
-                } else {
-                    // 批量验证
-                    for (var i = 0; i < $scope.newMateriel.length; i++) {
-                        if (!$scope.checkAllProduct($scope.newMateriel[i])) {
-                            return;
-                        }
-                    }
-                    angular.forEach($scope.newMateriel, function(val){
-                        val.bomId = $scope.bomData.id
-                    })
-                    seekPurchase.addEaterialObj(null, $scope.newMateriel, function (data) {
-                        if (data.success) {
-                            toaster.pop('success', '新增物料成功');
-                            $scope.addNewMateriel(false);
-                            loadData();
-                            $scope.newMateriel = []
-                        } else {
-                            toaster.pop('error', data.message);
-                        }
-                    }, function (err) {
-                        toaster.pop('error', err.data);
-                    })
                 }
             } else {
                 if ($scope.editBom) {
@@ -201,10 +176,6 @@ define(['app/app'], function(app) {
                 } else if($scope.editSeek){
                     // 取消发布求购
                     $scope.setEditSeek(false);
-                } else {
-                    // 取消新增物料
-                    $scope.addNewMateriel(false);
-                    $scope.newMateriel = [];
                 }
             }
         }
@@ -215,10 +186,6 @@ define(['app/app'], function(app) {
                 toaster.pop('info', '请先保存求购信息');
                 return;
             }
-            if (editBom && $scope.addNew) {
-                toaster.pop('info', '请先保存新增物料');
-                return;
-            }
             // 编辑中临时数据
             $scope.tmpEditBom = angular.copy($scope.bomData);
             // 最少选中一个
@@ -242,10 +209,6 @@ define(['app/app'], function(app) {
                 toaster.pop('info', '请先保存BOM修改');
                 return;
             }
-            if (editSeek && $scope.addNew) {
-                toaster.pop('info', '请先保存新增物料');
-                return;
-            }
             if ($scope.editSeek) {
                 $scope.seekObj.endTime = '';
                 $scope.seekObj.count = '';
@@ -258,24 +221,24 @@ define(['app/app'], function(app) {
         };
 
         // 新增单条物料信息
-        $scope.addNewMateriel = function (addNew) {
-            if (addNew && $scope.editSeek) {
-                toaster.pop('info', '请先保存求购信息');
-                return;
-            }
-            if (addNew && $scope.editBom) {
-                toaster.pop('info', '请先保存BOM修改');
-                return;
-            }
-            $scope.newMateriel.push({
+        $scope.addNewMateriel = function () {
+            console.log($scope.bomData.seekPurchaseByBatchs)
+            $scope.bomData.seekPurchaseByBatchs.unshift({
+                bomId: $scope.bomData.id,
                 brand: '',
                 kind: '',
                 code: '',
                 spec: '',
+                $checked: false,
+                showSimilarCodeList: false,
+                showSimilarBrandList: false,
+                isInCodeList: false,
+                isInBrandList: false,
                 amount: 0
             });
-            $scope.setAllCheck(false);
-            $scope.addNew = addNew;
+            $scope.tmpEditBom = angular.copy($scope.bomData);
+            $scope.setAllCheck(true);
+            console.log($scope.bomData.seekPurchaseByBatchs, $scope.tmpEditBom.seekPurchaseByBatchs)
         };
 
         // 打开日期选择框

+ 6 - 3
src/main/webapp/resources/js/usercenter/controllers/forstore/order_detail_ctrl.js

@@ -244,12 +244,15 @@ define(['app/app'], function(app) {
 					return ;
 				}
 				$scope.order = data;
-        $scope.sendGoodsList = $scope.order.inIds.split(',')
+        $scope.sendGoodsList = []
+				if ($scope.order.inIds) {
+          $scope.sendGoodsList = $scope.order.inIds.split(',')
+        }
         $scope.acceptGoods = $scope.order.signReceive
         $scope.ChooseItem = $scope.sendGoodsList.length > 0 ? $scope.sendGoodsList[0] : ''
-				if ($scope.acceptGoods) {
+				// if ($scope.acceptGoods) {
           getReceiveInfo()
-        }
+        // }
 				// todo 这里需要根据 是否存在已收货数据
 
 				$scope.order.orderHistory = angular.fromJson($scope.order.statushistory);

+ 23 - 6
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -3868,11 +3868,18 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       }
       var flag = true
       for (var i = 0; i < $scope.productUpOff.goods.prices.length; i++) {
-        if (!$scope.productUpOff.goods.prices[i].start || !$scope.productUpOff.goods.prices[i].rMBPrice) {
-          toaster.pop('warning','提示','价格梯度不能为空')
+        if (!$scope.productUpOff.goods.prices[i].start
+            || !$scope.productUpOff.goods.prices[i].rMBPrice && $scope.store.enType !== 'HK' ) {
+          toaster.pop('warning', '提示', '价格梯度不能为空')
           flag = false
           break;
         }
+        else if (!$scope.productUpOff.goods.prices[i].start
+              || !$scope.productUpOff.goods.prices[i].uSDPrice && $scope.store.enType === 'HK') {
+            toaster.pop('warning', '提示', '价格梯度不能为空')
+            flag = false
+            break;
+        }
         else if ($scope.productUpOff.goods.prices[i + 1] && Number($scope.productUpOff.goods.prices[i].start) > Number($scope.productUpOff.goods.prices[i + 1].start)) {
           toaster.pop('warning','提示','输入值会导致梯度重叠,请重新修改')
           flag = false
@@ -3883,12 +3890,22 @@ define(['app/app', 'jquery-uploadify'], function(app) {
         return
       }
       if ($scope.productUpOff.goods.prices.length === 1) {
-        $scope.productUpOff.goods.prices[0].rMBNTPrice = ''
-        $scope.productUpOff.goods.prices[0].end = '999999999'
+       if ($scope.store.enType === 'HK') {
+         $scope.productUpOff.goods.prices[0].uSDNTPrice = ''
+         $scope.productUpOff.goods.prices[0].end = '999999999'
+       }else {
+         $scope.productUpOff.goods.prices[0].rMBNTPrice = ''
+         $scope.productUpOff.goods.prices[0].end = '999999999'
+       }
       } else {
         for (var i = 0; i < $scope.productUpOff.goods.prices.length; i++) {
-          $scope.productUpOff.goods.prices[i].rMBNTPrice = ''
-          $scope.productUpOff.goods.prices[i].end = '999999999'
+          if ($scope.store.enType === 'HK') {
+            $scope.productUpOff.goods.prices[i].uSDNTPrice = ''
+            $scope.productUpOff.goods.prices[i].end = '999999999'
+          }else {
+            $scope.productUpOff.goods.prices[i].rMBNTPrice = ''
+            $scope.productUpOff.goods.prices[i].end = '999999999'
+          }
           if ($scope.productUpOff.goods.prices[i + 1]) {
             $scope.productUpOff.goods.prices[i].end = parseInt(
                 $scope.productUpOff.goods.prices[i + 1].start) - 1

+ 2 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_storageCtrl.js

@@ -572,6 +572,7 @@ define([ 'app/app' ], function(app) {
             Goods.getByEnterpriseId({invoiceId: type.invoiceid}, null, function(data) {
                 if(data.code === 1) {
                     toaster.pop("success", "信息保存成功");
+                    getLoadStorageData();
                 }
             }, function(response) {
                 toaster.pop('error', '错误', response.data);
@@ -620,7 +621,7 @@ define([ 'app/app' ], function(app) {
                 // TODO huxz 跳转到订单管理页面
                 if (res.success) {
                     toaster.pop("success", "信息", "发货成功");
-                    // $state.go('vendor_order');
+                    getLoadStorageData();
                 } else {
                     toaster.pop("error", res.message);
                 }

+ 7 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_apply_ctrl.js

@@ -21,6 +21,8 @@ define(['app/app', 'jquery-uploadify'], function (app) {
 			taxRegistration: 'TAX_REGISTRATION',
 			businessLicense: 'BUSINESS_LICENSE'
 		};
+		// 初始化主营产品
+		$scope.description = '';
 		// 初始化品牌信息
 		$scope.brands = [{ type: 'BRAND' }];
 		$scope.reason = null;
@@ -388,6 +390,10 @@ define(['app/app', 'jquery-uploadify'], function (app) {
 				toaster.pop('error', '请上传品牌信息');
 				return ;
 			}
+			if(!$scope.description) {
+                toaster.pop('error', '请填写主营产品信息');
+                return ;
+			}
 
 			// 设置店铺申请资质信息
 			$scope.storeApply.qualifications = [];
@@ -441,6 +447,7 @@ define(['app/app', 'jquery-uploadify'], function (app) {
 				}
 
 				$scope.storeApply.brands = brands;
+				$scope.storeApply.applyDescription = $scope.description
 				console.log(brands);
 				console.log($scope.storeApply);
 				submitApplyInfo();

+ 1 - 3
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js

@@ -51,10 +51,8 @@ define([ 'app/app' ], function(app) {
         //批量发布的类型
         $scope.batch.sellType = null;
 
-
-        $scope.ignorelmport = 0;
 		$scope.switchImport = function (type) {
-			$scope.ignorelmport = type;
+			$scope.ignoreImport = type;
 		};
 
         //翻页的信息

+ 2 - 2
src/main/webapp/resources/view/admin/trade/trade_invoicefromorder.html

@@ -224,8 +224,8 @@ input[type="radio"]:checked+label:after, input[type="checkbox"]:checked+label:af
 							<td class="text-center">{{invoice.buyername}}</td>
 							<td class="text-center text-num">{{invoice.currency}}
 								{{invoice.price}}</td>
-							<td class="text-center">{{invoice.number}}</td>
-							<td class="text-center">{{invoice.creattime | date:"yyyy-MM-dd HH:mm"}}</td>
+							<td class="text-center">{{invoice.qty}}</td>
+							<td class="text-center">{{invoice.createtime | date:"yyyy-MM-dd HH:mm"}}</td>
 							<td class="text-center">{{invoice.status |statusAndTypeFilter}}</td>
 							<td class="text-center">{{invoice.sourceid}}</td>
 							<td class="text-center" ng-show="active=='tobeshipped'">

+ 2 - 2
src/main/webapp/resources/view/admin/trade/trade_invoicefrompurc.html

@@ -56,8 +56,8 @@
 							<td class="text-center"><span ng-bind="invoice.selfSeller ? '自营' : '代售'"></span></td>
 							<td class="text-center">{{invoice.sellername}}</td>
 							<td class="text-center text-num">{{invoice.currencyName}} {{invoice.price}}</td>
-							<td class="text-center">{{invoice.number}}</td>
-							<td class="text-center">{{invoice.creattime | date: "yyyy-MM-dd HH:mm"}}</td>
+							<td class="text-center">{{invoice.qty}}</td>
+							<td class="text-center">{{invoice.createtime | date: "yyyy-MM-dd HH:mm"}}</td>
 							<td class="text-center">{{invoice.orid}}</td>
 							<td class="text-center" ng-show="active=='inbound'">
 								<a ng-show="active=='inbound'" ng-click="ensureAccept(invoice)">

+ 21 - 82
src/main/webapp/resources/view/usercenter/forstore/bomListDetail.html

@@ -205,6 +205,21 @@
     .com-check-box{
         cursor:pointer;
     }
+    .content-clear{
+        position:absolute;
+        right:0;
+        bottom:0;
+        width:20px;
+        height:20px;
+        border-top: 15px solid transparent;
+        border-right: 15px solid #f5f5f5;
+        border-bottom: 20px solid #f5f5f5;
+        border-left: 20px solid transparent;
+        cursor:pointer;
+    }
+    .content-clear i{
+        color:#333;
+    }
 </style>
 <div class="user_right fr bom-list-detail">
     <a class="back" href="user#/seekPurchase?type=bomManage&bomTab=bomList">&lt;返回BOM列表</a>
@@ -214,8 +229,8 @@
         <button class="operate-btn" ng-click="setEditBom(true)">编辑BOM</button>
         <button class="operate-btn" ng-click="deleteProduct()">删除物料</button>
         <button class="operate-btn" ng-click="deleteBom()">删除本BOM</button>
-        <button class="operate-btn" ng-click="addNewMateriel(true)">新增物料</button>
-        <div class="fr" ng-show="editBom || editSeek || addNew">
+        <button class="operate-btn" ng-click="addNewMateriel()" ng-if="editBom">新增物料</button>
+        <div class="fr" ng-show="editBom || editSeek">
             <button class="sure-btn" ng-click="sure(true)">确认</button>
             <button class="sure-btn cancel-btn" ng-click="sure(false)">取消</button>
         </div>
@@ -269,85 +284,6 @@
             </tr>
         </thead>
         <tbody>
-            <tr ng-if="addNew" ng-repeat="(key, item) in newMateriel">
-                <td>
-                    <label class="com-check-box" ng-click="newMateriel.splice(key, 1);" ng-if="key !== 0">
-                        <span class="fa fa-close"></span>
-                    </label>
-                </td>
-                <td class="base-info">
-                    <div class="content-line">
-                        <div class="inline-block title">
-                            <i class="must">*</i>品牌:
-                        </div>
-                        <div class="inline-block" ng-class="{'similar-wrap': item.showSimilarBrandList}" title="{{item.brand}}">
-                            <input ng-model="item.brand"
-                                   ng-change="onBrandChange(item)"
-                                   ng-blur="checkBrand(item)"
-                                   type="text">
-                            <ul class="similar-list"
-                                ng-show="item.showSimilarBrandList"
-                                ng-mouseenter="item.isInBrandList = true;"
-                                ng-mouseleave="item.isInBrandList = false">
-                                <li ng-repeat="sBrand in similarBrand" ng-bind="sBrand.nameEn" title="{{sBrand.nameEn}}" ng-click="setBrand(item, sBrand.nameEn)"></li>
-                            </ul>
-                        </div>
-                    </div>
-                    <div class="content-line">
-                        <div class="inline-block title">
-                            <i class="must">*</i>物料名称:
-                        </div>
-                        <div class="inline-block" title="{{item.kind}}">
-                            <input ng-model="item.kind"
-                                   ng-change="onKindChange(item)"
-                                   ng-blur="checkKind(item)"
-                                   type="text">
-                        </div>
-                    </div>
-                </td>
-                <td class="base-info">
-                    <div class="content-line">
-                        <div class="inline-block title">
-                            <i class="must">*</i>型号:
-                        </div>
-                        <div class="inline-block" ng-class="{'similar-wrap': item.showSimilarCodeList}" title="{{item.code}}">
-                            <input ng-model="item.code"
-                                   ng-change="onCodeChange(item)"
-                                   ng-blur="checkCode(item)"
-                                   type="text">
-                            <ul class="similar-list"
-                                ng-show="item.showSimilarCodeList"
-                                ng-mouseenter="item.isInCodeList = true;"
-                                ng-mouseleave="item.isInCodeList = false">
-                                <li ng-repeat="sCode in similarCode" ng-bind="sCode.code" title="{{sCode.code}}" ng-click="setCode(item, sCode.code)"></li>
-                            </ul>
-                        </div>
-                    </div>
-                    <div class="content-line">
-                        <div class="inline-block title">
-                            规格:
-                        </div>
-                        <div class="inline-block" title="{{item.spec}}">
-                            <input ng-model="item.spec"
-                                   ng-change="onSpecChange(item)"
-                                   ng-blur="checkSpec(item)"
-                                   type="text">
-                        </div>
-                    </div>
-                </td>
-                <td class="base-info pcs-line">
-                    <div class="content-line">
-                        <div class="inline-block title">
-                            单位用量:
-                        </div>
-                        <div class="inline-block" title="{{item.amount}}">
-                            <input ng-model="item.amount"
-                                   ng-change="onAmountChange(item)"
-                                   type="text">
-                        </div>
-                    </div>
-                </td>
-            </tr>
             <tr ng-repeat="detail in bomData.seekPurchaseByBatchs track by $index">
                 <td>
                     <label class="com-check-box">
@@ -423,7 +359,10 @@
                         </div>
                     </div>
                 </td>
-                <td class="base-info pcs-line">
+                <td class="base-info pcs-line" style="position:relative;">
+                    <div class="content-clear" ng-if="!detail.id" ng-click="tmpEditBom.seekPurchaseByBatchs.splice($index, 1);bomData.seekPurchaseByBatchs.splice($index, 1)">
+                        <i class="fa fa-close"></i>
+                    </div>
                     <div class="content-line">
                         <div class="inline-block title">
                             单位用量:

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

@@ -923,7 +923,7 @@
 						</span>
 						<span class="border-bottom-cfcfcf wd03 text-left" ng-class="{true : 'order-border-bottom-solid',false : 'order-border-bottom-dashed'}[$index == order.orderDetails.length - 1 || $index == 2]" ng-bind="::detail.taxUnitprice | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
 						<span class="border-bottom-cfcfcf wd03 text-left" ng-class="{true : 'order-border-bottom-solid',false : 'order-border-bottom-dashed'}[$index == order.orderDetails.length - 1 || $index == 2]" ng-bind="::detail.number | number" class="wd03 text-left"></span>
-						<span class="border-bottom-cfcfcf wd03 text-left" ng-class="{true : 'order-border-bottom-solid',false : 'order-border-bottom-dashed'}[$index == order.orderDetails.length - 1 || $index == 2]" ng-bind="::detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
+						<span class="border-bottom-cfcfcf wd03 text-left" ng-class="{true : 'order-border-bottom-solid',false : 'order-border-bottom-dashed'}[$index == order.orderDetails.length - 1 || $index == 2]" ng-bind="::detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{::detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
 						<span class="logistics_xq" ng-class="{'order-border-bottom-solid' : $index == order.orderDetails.length - 1 || $index==2}">
 							<div ng-if="$index == 0">
 								<div ng-bind="::order.status | statusFilter"></div>

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

@@ -577,7 +577,7 @@
 						</span>
 							<span class="wd01" ng-bind="detail.taxUnitprice | formateNumber : 6 | currencySysmbol : detail.currencyName">$1.23</span>
 							<span style="width: 10%;" ng-bind="detail.number">100</span>
-							<span class="wd01 red" style="overflow: hidden;white-space: nowrap;width: 13%" titl="{{detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName}}" ng-bind="detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
+							<span class="wd01 red" style="overflow: hidden;white-space: nowrap;width: 13%;text-overflow: ellipsis;" title="{{detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName}}" ng-bind="detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
 							<!--物料编码-->
 							<span class="wd01" style="line-height: 18px;">
 								<!--<em ng-if="!detail.goodsnumber">&nbsp;</em>-->

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

@@ -509,8 +509,8 @@
 							</em>
 						</span>
 							<span style="width: 10%;" ng-bind="detail.number">100</span>
-							<span style="overflow: hidden;white-space: nowrap;width: 15%" ng-show="!isChange" class="wd01 red" ng-bind="detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
-							<span style="overflow: hidden;white-space: nowrap;width: 15%" ng-show="isChange" class="wd01 red" ng-bind="detail.detailTotal | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.detailTotal | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
+							<span style="overflow: hidden;white-space: nowrap;width: 15%;    text-overflow: ellipsis;" ng-show="!isChange" class="wd01 red" ng-bind="detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
+							<span style="overflow: hidden;white-space: nowrap;width: 15%;    text-overflow: ellipsis;s" ng-show="isChange" class="wd01 red" ng-bind="detail.detailTotal | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.detailTotal | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
 							<!--物料编码-->
 							<!--<span class="wd01" style="line-height: 18px;">-->
 								<!--<em ng-if="!detail.goodsnumber">&nbsp;</em>-->

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

@@ -767,8 +767,8 @@
                 </em>
               </span>
               <span style="width: 10%;" ng-bind="detail.number">100</span>
-              <span style="white-space: nowrap;overflow: hidden;" ng-show="!isChange" class="wd01 red" ng-bind="detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
-              <span style="white-space: nowrap;overflow: hidden;" ng-show="isChange" class="wd01 red" ng-bind="detail.currentTaxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.currentTaxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
+              <span style="white-space: nowrap;overflow: hidden;    text-overflow: ellipsis;" ng-show="!isChange" class="wd01 red" ng-bind="detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
+              <span style="white-space: nowrap;overflow: hidden;    text-overflow: ellipsis;" ng-show="isChange" class="wd01 red" ng-bind="detail.currentTaxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.currentTaxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
 
               <span class="wd01" style="line-height: 18px;">
                 <!--<textarea placeholder="可填写产品备注!例如物料编号"></textarea>-->

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

@@ -1172,9 +1172,9 @@
 										</li>
 										<li style="font-size: 14px;color: #333;background: #fff;" class='priceInfoList' ng-repeat="price in material.goods.prices">
 											<span class="fl w50" style="width: 50%;border-right:1px solid #dcdcdc">{{price.start}}+</span>
-											<span class="fl w50" style="width: 50%;overflow: hidden" title="{{price.rMBPrice}}">
+											<span class="fl w50" style="width: 50%;overflow: hidden" title="{{price.rMBPrice || price.uSDPrice}}">
 												{{!store.enType || store.enType === 'HK' ? '$' : '¥'}}
-												{{price.rMBPrice || price.uSDNTPrice }}</span>
+												{{price.rMBPrice || price.uSDPrice}}</span>
 											<div class="clearfix"></div>
 										</li>
 										<li style="font-size: 14px;color: #333;background: #fff;" class='priceInfoList' ng-if="!material.goods || material.goods.prices.length === 0">
@@ -1465,7 +1465,8 @@
 																<input text="text" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" maxlength="9" ng-disabled="$index === 0" ng-readonly="$index === 0" ng-model="price.start" ng-blur="productPriceInfoBlur($index, price.start)" />
 															</span>
 															<span class="fl w50" style="width: 50%">
-																<input text="text" autocomplete="off" validata-price ng-blur="changePrices(productUpOff.goods.prices, price.rMBPrice, $index)" oninput="if(value.length>11)value=value.slice(0,11)" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" ng-model="price.rMBPrice" />
+																<input  ng-if="store.enType !== 'HK'" type="text" autocomplete="off" validata-price ng-blur="changePrices(productUpOff.goods.prices, price.rMBPrice, $index)" oninput="if(value.length>11)value=value.slice(0,11)" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" ng-model="price.rMBPrice" />
+																<input  ng-if="store.enType === 'HK'" type="text" autocomplete="off" validata-price ng-blur="changePrices(productUpOff.goods.prices, price.uSDPrice, $index)" oninput="if(value.length>11)value=value.slice(0,11)" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" ng-model="price.uSDPrice" />
 															</span>
 															<div class="clearfix"></div>
 															<div class="input-list ng-scope" style="height: 24px;line-height: 24px;position: absolute;right: -38px;top: 3px">

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

@@ -1402,7 +1402,7 @@
                         </span>
 						<span style="text-align: left;" ng-bind="detail.taxUnitPrice | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
 						<span ng-bind="detail.number | number"></span>
-						<span title="{{detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName}}" ng-bind="detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName" style="overflow: hidden;white-space: nowrap;"></span>
+						<span title="{{detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName}}" ng-bind="detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName" style="overflow: hidden;white-space: nowrap;    text-overflow: ellipsis;"></span>
 						<span class="border01 click_shop">
                             <div ng-if="$index == 0">
                                 <a class="operate-height">

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

@@ -1373,7 +1373,8 @@
                 <tbody ng-if="handleItem === 2" ng-repeat="item in storageList" ng-class="{'toggle-mode': item.seleted}">
                 <tr>
                     <td>系统自动生成</td>
-                    <td><span ng-bind="item.purchaseid" title="{{item.purchaseid}}"></span></td>
+                    <td ng-if="storage_tab === 'outBound'"><span ng-bind="item.purchaseid || '-'" title="{{item.purchaseid}}"></span></td>
+                    <td ng-if="storage_tab === 'inBound'"><span ng-bind="item.invoiceid || '-'" title="{{item.invoiceid}}"></span></td>
                     <td><span ng-bind="item.buyentername || item.buyerentername || item.buyername" title="{{item.buyentername || item.buyerentername || item.buyername}}"></span></td>
                     <td ng-bind="storage_tab === 'outBound' ? '销售出库' : '采购入库'">腌肉入库</td>
                     <td><span ng-bind="item.sellername" title="{{item.sellername}}"></span></td>
@@ -1412,7 +1413,7 @@
                 <tr ng-if="item.seleted && storage_tab === 'inBound' && item.logistics">
                     <td colspan="7" style="background:#f5f5f5;">
                         <div class="logistics-info">
-                            <span style="margin-right:150px;">所属订单:<span ng-bind="item.associateOrderid || '-'"></span></span>
+                            <span style="margin-right:150px;">所属订单:<span ng-bind="item.associateOrderid || item.orid || '-'"></span></span>
                             <span>物流公司 :&nbsp;</span>
                             <span class="input-ul" ng-bind="item.logistics.companyName"></span>
                             <span style="margin-left:100px;">物流单号 :&nbsp;</span>

+ 12 - 0
src/main/webapp/resources/view/vendor/forstore/vendor_store_apply.html

@@ -974,6 +974,18 @@
 					原因:<span style="color: #d32526;">{{reason}}</span>
 				</div>
 			</div>
+			<!--主营产品-->
+			<div class="row brand-type">
+				<div class="col-md-1" style="padding:0;">主营产品<em>*</em></div>
+				<div class="col-md-10">
+                  <textarea ng-model="description"
+							style="line-height: 20px;font-size: 14px;margin-top:25px;"
+							rows="8"
+							maxlength="500"
+							class="form-control"
+							placeholder="例:本店主营Panasonic、IT、三星等知名品牌的触控IC、显示驱动IC、液晶屏、功率模块类、电源芯片、高压熔断、被动器件等产品。"></textarea>
+				</div>
+			</div>
 		</div>
 		<!-- Submit button -->
 		<div style="padding: 28px 40px;">