huangzhiguo 1 년 전
부모
커밋
2568367227
19개의 변경된 파일696개의 추가작업 그리고 370개의 파일을 삭제
  1. 4 0
      src/main/java/com/caimei/modules/order/dao/CmDiscernReceiptDao.java
  2. 45 0
      src/main/java/com/caimei/modules/order/entity/NewShopOrder.java
  3. 65 0
      src/main/java/com/caimei/modules/order/entity/ReceiptOrderInfoVo.java
  4. 135 71
      src/main/java/com/caimei/modules/order/service/CmDiscernReceiptService.java
  5. 34 0
      src/main/java/com/caimei/modules/order/service/NewOrderService.java
  6. 14 14
      src/main/java/com/caimei/modules/order/web/NewOrderController.java
  7. 1 1
      src/main/java/com/caimei/modules/product/service/ProductService.java
  8. 1 1
      src/main/java/com/caimei/modules/user/dao/NewCmShopDao.java
  9. 9 0
      src/main/java/com/caimei/modules/user/entity/NewCmShop.java
  10. 1 2
      src/main/java/com/caimei/modules/user/service/NewCmShopService.java
  11. 28 7
      src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml
  12. 2 0
      src/main/resources/mappings/modules/order/CmReceiptOrderRelationMapper.xml
  13. 4 0
      src/main/resources/mappings/modules/user/NewCmShopMapper.xml
  14. 229 215
      src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp
  15. 3 2
      src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp
  16. 3 3
      src/main/webapp/WEB-INF/views/modules/order/newOrderList.jsp
  17. 41 4
      src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp
  18. 68 50
      src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp
  19. 9 0
      src/main/webapp/WEB-INF/views/modules/user/newCmShopSetForm.jsp

+ 4 - 0
src/main/java/com/caimei/modules/order/dao/CmDiscernReceiptDao.java

@@ -50,8 +50,12 @@ public interface CmDiscernReceiptDao extends CrudDao<CmDiscernReceipt> {
 
     CmDiscernReceipt findSmoothoutInfo(@Param("orderID") String orderID);
 
+    CmDiscernReceipt findSmoothoutshopInfo(@Param("shopOrderId") Integer shopOrderId);
+
     double getAssociateAmount(@Param("orderID") String orderID);
 
+    double getShopAssociateAmount(@Param("shopOrderId") String shopOrderId);
+
     double getReturnBalanceAmount(@Param("receiptId") String receiptId);
 
     List<CmMainReceiptExport> exportOnlyBalancePay(CmDiscernReceipt cmDiscernReceipt);

+ 45 - 0
src/main/java/com/caimei/modules/order/entity/NewShopOrder.java

@@ -65,6 +65,11 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private Integer canRefundBeans;//    int(11) comment '可以退还的采美豆个数',
     private Integer orderDeliveryID;//   int(1) comment '运费订单ID',
     private Double freePostageFee;//    decimal(10,2) comment '订单包邮时本该支付的运费',
+    private String associationType;//订单关联方式: 1手动 2自动
+    private String confirmType;    // 收款确认类型(1 小额抹平确认,2 大额抹平确认,3 大额退款余额,4 确认关联)
+    private boolean receiptOrderFlag;// 判断订单中抹平的订单是否是和多个订单一起支付的,
+    private Double orderReceivedAmount;//订单已收金额(此收款只计算线上线下收款记录payableAmount表金额)
+    private Double returnBalanceAmount;// 退款余额金额
 
 
 
@@ -556,6 +561,46 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
         this.freePostageFee = freePostageFee;
     }
 
+    public String getAssociationType() {
+        return associationType;
+    }
+
+    public void setAssociationType(String associationType) {
+        this.associationType = associationType;
+    }
+
+    public String getConfirmType() {
+        return confirmType;
+    }
+
+    public void setConfirmType(String confirmType) {
+        this.confirmType = confirmType;
+    }
+
+    public boolean isReceiptOrderFlag() {
+        return receiptOrderFlag;
+    }
+
+    public void setReceiptOrderFlag(boolean receiptOrderFlag) {
+        this.receiptOrderFlag = receiptOrderFlag;
+    }
+
+    public Double getOrderReceivedAmount() {
+        return orderReceivedAmount;
+    }
+
+    public void setOrderReceivedAmount(Double orderReceivedAmount) {
+        this.orderReceivedAmount = orderReceivedAmount;
+    }
+
+    public Double getReturnBalanceAmount() {
+        return returnBalanceAmount;
+    }
+
+    public void setReturnBalanceAmount(Double returnBalanceAmount) {
+        this.returnBalanceAmount = returnBalanceAmount;
+    }
+
     public Integer getFreePostageTicketID() {
         return freePostageTicketID;
     }

+ 65 - 0
src/main/java/com/caimei/modules/order/entity/ReceiptOrderInfoVo.java

@@ -33,6 +33,15 @@ public class ReceiptOrderInfoVo {
     private Double payedShopAmount;     //已付供应商金额
     private Double refundsAmount;       //已退款供应商金额
 
+    private Integer identifying; // 查询标识
+
+
+    private String associationType;//订单关联方式: 1手动 2自动
+    private String confirmType;    // 收款确认类型(1 小额抹平确认,2 大额抹平确认,3 大额退款余额,4 确认关联)
+    private Double restAmount;      // 待付金额
+    private Double orderReceivedAmount;//订单已收金额(此收款只计算线上线下收款记录payableAmount表金额)
+    private Double returnBalanceAmount;// 退款余额金额
+    private Double accountAmount;//     decimal(20,2) comment '余额支付时使用的金额',
 
     public String getOrganizeID() {
         return organizeID;
@@ -217,4 +226,60 @@ public class ReceiptOrderInfoVo {
     public void setShopOrderInfos(List<NewShopOrder> shopOrderInfos) {
         this.shopOrderInfos = shopOrderInfos;
     }
+
+    public Integer getIdentifying() {
+        return identifying;
+    }
+
+    public void setIdentifying(Integer identifying) {
+        this.identifying = identifying;
+    }
+
+    public String getAssociationType() {
+        return associationType;
+    }
+
+    public void setAssociationType(String associationType) {
+        this.associationType = associationType;
+    }
+
+    public String getConfirmType() {
+        return confirmType;
+    }
+
+    public void setConfirmType(String confirmType) {
+        this.confirmType = confirmType;
+    }
+
+    public Double getRestAmount() {
+        return restAmount;
+    }
+
+    public void setRestAmount(Double restAmount) {
+        this.restAmount = restAmount;
+    }
+
+    public Double getOrderReceivedAmount() {
+        return orderReceivedAmount;
+    }
+
+    public void setOrderReceivedAmount(Double orderReceivedAmount) {
+        this.orderReceivedAmount = orderReceivedAmount;
+    }
+
+    public Double getReturnBalanceAmount() {
+        return returnBalanceAmount;
+    }
+
+    public void setReturnBalanceAmount(Double returnBalanceAmount) {
+        this.returnBalanceAmount = returnBalanceAmount;
+    }
+
+    public Double getAccountAmount() {
+        return accountAmount;
+    }
+
+    public void setAccountAmount(Double accountAmount) {
+        this.accountAmount = accountAmount;
+    }
 }

+ 135 - 71
src/main/java/com/caimei/modules/order/service/CmDiscernReceiptService.java

@@ -21,6 +21,8 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -143,80 +145,142 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
 //        vo.setReceiptOrderFlag(receiptOrderFlag);//设置一款多单状态
         List<ReceiptOrderInfoVo> orderInfos = new ArrayList<>(); //一个收款可能会关联了一个或多个订单
         ReceiptOrderInfoVo receiptOrderInfoVo = null;
-        if(null!=cmDiscernReceipt.getShopOrderId()){
-            receiptOrderInfoVo=cmDiscernReceiptDao.getOrderInfoByShopOrderID(cmDiscernReceipt.getShopOrderId().toString());
-            BigDecimal add = MathUtil.add(receiptOrderInfoVo.getReceiptAmount(),cmDiscernReceiptService.findShoOrderIDReceipt(cmDiscernReceipt.getShopOrderId()));
-            receiptOrderInfoVo.setReceiptAmount(add.toString());
-            orderInfos.add(receiptOrderInfoVo);
+        for(CmReceiptOrderRelation relation : relations) {
+            if (null != relation.getShopOrderId()) {
+                receiptOrderInfoVo = cmDiscernReceiptDao.getOrderInfoByShopOrderID(relation.getShopOrderId().toString());
+                BigDecimal add = MathUtil.add(receiptOrderInfoVo.getReceiptAmount(), cmDiscernReceiptService.findShoOrderIDReceipt(relation.getShopOrderId()));
+                receiptOrderInfoVo.setReceiptAmount(add.toString());
+                orderInfos.add(receiptOrderInfoVo);
+                //是否抹平支付过(抹平最多只允许存在一次)
+                CmDiscernReceipt cmDiscernReceiptInfo = cmDiscernReceiptDao.findSmoothoutshopInfo(Integer.parseInt(receiptOrderInfoVo.getShopOrderID()));
+                if (null != cmDiscernReceiptInfo) {
+                    receiptOrderInfoVo.setAssociationType(cmDiscernReceiptInfo.getAssociationType());
+                    String confirmType = cmDiscernReceiptInfo.getConfirmType();
+                    receiptOrderInfoVo.setConfirmType(confirmType);
+
+                    // 是否是一比款收了多个订单
+                    if (StringUtils.equals(confirmType, "1") || StringUtils.equals(confirmType, "2") || StringUtils.equals(confirmType, "3")) {
+                        List<CmReceiptOrderRelation> byReceiptList = cmReceiptOrderRelationService.findByReceiptID(cmDiscernReceiptInfo.getId());
+                        if (CollectionUtils.isNotEmpty(byReceiptList) && byReceiptList.size() > 1) {
+                            receiptOrderInfoVo.setReceiptOrderFlag(true);
+                        }
+                    }
+                    if (StringUtils.equals(cmDiscernReceiptInfo.getConfirmType(), "1") || StringUtils.equals(cmDiscernReceiptInfo.getConfirmType(), "2") || StringUtils.equals(cmDiscernReceiptInfo.getConfirmType(), "3")) {
+                        receiptOrderInfoVo.setRestAmount(0d);
+                    }
+                }
+                // 订单已收款才会出现抹平或者多收退余额,(已收再退款或者撤销退款订单即使存在抹平也需要当未抹平重新计算付款)
+                String receiptStatus = receiptOrderInfoVo.getReceiptStatus();
+                if (StringUtils.equals("3", receiptStatus)) {
+                    if (null != cmDiscernReceiptInfo) {
+                        String confirmType = cmDiscernReceiptInfo.getConfirmType();
+                        receiptOrderInfoVo.setConfirmType(confirmType);
+                        double associateAmount = cmDiscernReceiptDao.getShopAssociateAmount(String.valueOf(receiptOrderInfoVo.getShopOrderID()));
+                        receiptOrderInfoVo.setOrderReceivedAmount(associateAmount + receiptOrderInfoVo.getAccountAmount());
+                        //大额退余额
+                        if (StringUtils.equals("3", confirmType)) {
+                            String shopReceiptId = cmDiscernReceiptInfo.getId();
+                            double returnBalanceAmount = cmDiscernReceiptDao.getReturnBalanceAmount(shopReceiptId);
+                            receiptOrderInfoVo.setReturnBalanceAmount(returnBalanceAmount);
+                        }
+                    }
+                }
+                if (null != receiptOrderInfoVo) {
+                    receiptOrderInfoVo.setRelationType("1");
+                    if ("5".equals(vo.getReceiptType())) {
+                        //供应商退款,已退金额
+                        List<CmRefundShopRecord> records = cmRefundShopRecordDao.getRefundedRecords(receiptOrderInfoVo.getShopOrderID());
+                        if (records != null && records.size() > 0) {
+                            Double collect = records.stream().mapToDouble(CmRefundShopRecord::getRefundAmount).sum();
+                            receiptOrderInfoVo.setRefundsAmount(collect);
+                        } else {
+                            receiptOrderInfoVo.setRefundsAmount(0d);
+                        }
+                    }
+                }
+                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+                String oldDateString = "2023-06-29";
+                try {
+                    Date oldDate = dateFormat.parse(oldDateString);
+                    if (oldDate.after(dateFormat.parse(relation.getReceiptDate()))) {
+                        receiptOrderInfoVo.setIdentifying(2);
+                    } else {
+                        receiptOrderInfoVo.setIdentifying(1);
+                    }
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+                List<ReceiptRecordVo> receiptRecordByOrderID = cmDiscernReceiptDao.findReceiptRecordByOrderID(receiptOrderInfoVo);
+                // 暂时不启用抹平明细
+                if (CollectionUtils.isNotEmpty(receiptRecordByOrderID)) {
+                    for (ReceiptRecordVo v : receiptRecordByOrderID) {
+                        if (StringUtils.equals("3", v.getConfirmType())) {
+                            String id = v.getReceiptID();
+                            double returnBalanceAmount = cmDiscernReceiptDao.getReturnBalanceAmount(id);
+                            v.setReturnBalanceAmount(returnBalanceAmount);
+                        }
+                        //统计当前已收
+                        double associateAmount = cmDiscernReceiptDao.getShopAssociateAmount(String.valueOf(receiptOrderInfoVo.getShopOrderID()));
+                        v.setOrderReceivedAmount(associateAmount);
+                    }
+                }
+                //一个订单又包含了多个收款记录
+                receiptOrderInfoVo.setReceiptRecordVo(receiptRecordByOrderID);
+            }
         }
 
-//        for (CmReceiptOrderRelation relation : relations) {
-//            ReceiptOrderInfoVo roi = null; //这是通过订单列表上的一条收款记录对应的多个订单中的一个订单
-//            if ("1".equals(relation.getRelationType())) { // relation.orderID 指的是子订单id
-//                roi = cmDiscernReceiptDao.getOrderInfoByShopOrderID(relation.getOrderID());
-//                if (null != roi) {
-//                    roi.setRelationType("1");
-//                    if ("5".equals(vo.getReceiptType())) {
-//                        //供应商退款,已退金额
-//                        List<CmRefundShopRecord> records = cmRefundShopRecordDao.getRefundedRecords(roi.getShopOrderID());
-//                        if (records != null && records.size() > 0) {
-//                            Double collect = records.stream().mapToDouble(CmRefundShopRecord::getRefundAmount).sum();
-//                            roi.setRefundsAmount(collect);
-//                        } else {
-//                            roi.setRefundsAmount(0d);
-//                        }
-//                        //查询收款供应商退款金额
-//                        /*BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(Integer.valueOf(roi.getShopOrderID()));
+        /*for (CmReceiptOrderRelation relation : relations) {
+            ReceiptOrderInfoVo roi = null; //这是通过订单列表上的一条收款记录对应的多个订单中的一个订单
+            if ("1".equals(relation.getRelationType())) { // relation.orderID 指的是子订单id
+                roi = cmDiscernReceiptDao.getOrderInfoByShopOrderID(relation.getShopOrderId().toString());
+                if (null != roi) {
+                    roi.setRelationType("1");
+                    if ("5".equals(vo.getReceiptType())) {
+                        //供应商退款,已退金额
+                        List<CmRefundShopRecord> records = cmRefundShopRecordDao.getRefundedRecords(roi.getShopOrderID());
+                        if (records != null && records.size() > 0) {
+                            Double collect = records.stream().mapToDouble(CmRefundShopRecord::getRefundAmount).sum();
+                            roi.setRefundsAmount(collect);
+                        } else {
+                            roi.setRefundsAmount(0d);
+                        }
+                        //查询收款供应商退款金额
+//                        BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(Integer.valueOf(roi.getShopOrderID()));
 //                        BigDecimal refundsAmount = MathUtil.add(roi.getRefundsAmount(), shopRefundAmount);
-//                        roi.setRefundsAmount(refundsAmount.doubleValue());*/
-//                    }
-//                }
-//            }
-//            if ("2".equals(relation.getRelationType())) { // relation.orderID 指的是主订单id
-//                roi = cmDiscernReceiptDao.getOrderInfoByOrderID(relation.getOrderID());
-//                if (null != roi) {
-//                    roi.setRelationType("2");
-//                    if (0 == roi.getOnlinePayFlag()) {
-//                        // 可以线上支付,查询子订单信息
-//                        List<NewShopOrder> shopOrderInfos = cmDiscernReceiptDao.getShopOrderInfos(null, relation.getOrderID());
-//                        roi.setShopOrderInfos(shopOrderInfos);
-//                    }
-//                }
-//            }
-//            if (null != roi) {
-//                List<ReceiptRecordVo> receiptRecordByOrderID = cmDiscernReceiptDao.findReceiptRecordByOrderID(roi);
-//                //                暂时不启用抹平明细
-//                if (CollectionUtils.isNotEmpty(receiptRecordByOrderID)) {
-//                    for (ReceiptRecordVo v : receiptRecordByOrderID) {
-//                        if (StringUtils.equals("3", v.getConfirmType())) {
-//                            String id = v.getReceiptID();
-//                            double returnBalanceAmount = cmDiscernReceiptDao.getReturnBalanceAmount(id);
-//                            v.setReturnBalanceAmount(returnBalanceAmount);
-//                        }
-//                        //统计当前已收
-//                        double associateAmount = cmDiscernReceiptDao.getAssociateAmount(String.valueOf(roi.getOrderID()));
-//                        v.setOrderReceivedAmount(associateAmount);
-//                    }
-//                }
-//                //一个订单又包含了多个收款记录
-//                roi.setReceiptRecordVo(receiptRecordByOrderID);
-//                orderInfos.add(roi);
-//            }
-//        }
-//        if ("6".equals(vo.getReceiptType())) {
-//            // 3超级会员款
-//            ReceiptVipInfoVo receiptVipInfo = cmDiscernReceiptDao.getReceiptVipInfo(vo.getReceiptID());
-//            vo.setVipInfo(receiptVipInfo);
-//        }
-//        if ("7".equals(vo.getReceiptType())) {
-//            // 二手商品上架费
-//
-//        }
-//        if ("8".equals(vo.getReceiptType())) {
-//            //优惠券购买费
-//            ReceipCouponInfoVo couponInfo = cmDiscernReceiptDao.getCouponInfo(vo.getReceiptID());
-//            vo.setCouponInfo(couponInfo);
-//        }
+//                        roi.setRefundsAmount(refundsAmount.doubleValue());
+                    }
+                }
+            }
+            if ("2".equals(relation.getRelationType())) { // relation.orderID 指的是主订单id
+                roi = cmDiscernReceiptDao.getOrderInfoByOrderID(relation.getOrderID());
+                if (null != roi) {
+                    roi.setRelationType("2");
+                    if (0 == roi.getOnlinePayFlag()) {
+                        // 可以线上支付,查询子订单信息
+                        List<NewShopOrder> shopOrderInfos = cmDiscernReceiptDao.getShopOrderInfos(null, relation.getOrderID());
+                        roi.setShopOrderInfos(shopOrderInfos);
+                    }
+                }
+            }
+            if (null != roi) {
+
+                orderInfos.add(roi);
+            }
+        }*/
+        /*if ("6".equals(vo.getReceiptType())) {
+            // 3超级会员款
+            ReceiptVipInfoVo receiptVipInfo = cmDiscernReceiptDao.getReceiptVipInfo(vo.getReceiptID());
+            vo.setVipInfo(receiptVipInfo);
+        }
+        if ("7".equals(vo.getReceiptType())) {
+            // 二手商品上架费
+
+        }
+        if ("8".equals(vo.getReceiptType())) {
+            //优惠券购买费
+            ReceipCouponInfoVo couponInfo = cmDiscernReceiptDao.getCouponInfo(vo.getReceiptID());
+            vo.setCouponInfo(couponInfo);
+        }*/
         vo.setOrderInfos(orderInfos);
         return vo;
     }

+ 34 - 0
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -1429,6 +1429,40 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                         shopOrder.setContactName(cmSecondHandDetail.getContactName());
                         shopOrder.setDockingPeopleName(cmSecondHandDetail.getDockingPeopleName());
                     }
+                    //是否抹平支付过(抹平最多只允许存在一次)
+                    CmDiscernReceipt cmDiscernReceipt = cmDiscernReceiptDao.findSmoothoutshopInfo(shopOrder.getShopOrderID());
+                    if (null != cmDiscernReceipt) {
+                        shopOrder.setAssociationType(cmDiscernReceipt.getAssociationType());
+                        String confirmType = cmDiscernReceipt.getConfirmType();
+                        shopOrder.setConfirmType(confirmType);
+
+                        // 是否是一比款收了多个订单
+                        if (StringUtils.equals(confirmType, "1") || StringUtils.equals(confirmType, "2") || StringUtils.equals(confirmType, "3")) {
+                            List<CmReceiptOrderRelation> byReceiptList = cmReceiptOrderRelationService.findByReceiptID(cmDiscernReceipt.getId());
+                            if (CollectionUtils.isNotEmpty(byReceiptList) && byReceiptList.size() > 1) {
+                                shopOrder.setReceiptOrderFlag(true);
+                            }
+                        }
+                        if (StringUtils.equals(cmDiscernReceipt.getConfirmType(), "1") || StringUtils.equals(cmDiscernReceipt.getConfirmType(), "2") || StringUtils.equals(cmDiscernReceipt.getConfirmType(), "3")) {
+                            shopOrder.setRestAmount(0d);
+                        }
+                    }
+                    // 订单已收款才会出现抹平或者多收退余额,(已收再退款或者撤销退款订单即使存在抹平也需要当未抹平重新计算付款)
+                    String receiptStatus = shopOrder.getReceiptStatus();
+                    if (StringUtils.equals("3", receiptStatus)) {
+                        if (null != cmDiscernReceipt) {
+                            String confirmType = cmDiscernReceipt.getConfirmType();
+                            shopOrder.setConfirmType(confirmType);
+                            double associateAmount = cmDiscernReceiptDao.getShopAssociateAmount(String.valueOf(shopOrder.getShopOrderID()));
+                            shopOrder.setOrderReceivedAmount(associateAmount + shopOrder.getAccountAmount());
+                            //大额退余额
+                            if (StringUtils.equals("3", confirmType)) {
+                                String shopReceiptId = cmDiscernReceipt.getId();
+                                double returnBalanceAmount = cmDiscernReceiptDao.getReturnBalanceAmount(shopReceiptId);
+                                shopOrder.setReturnBalanceAmount(returnBalanceAmount);
+                            }
+                        }
+                    }
                 }
                 newOrder.setNewShopOrders(shopOrders);
             }

+ 14 - 14
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -1262,20 +1262,6 @@ public class NewOrderController extends BaseController {
                 }
             }
         }
-        // 判断订单关闭环境
-        if (StringUtils.isNotBlank(order.getCloseReason())) {
-            if (order.getCloseReason().contains("超时")) {
-                order.setCloseReason("超时关闭");
-            } else if (order.getCloseReason().contains("后台手动关闭")) {
-                order.setCloseReason("后台手动关闭");
-            } else if (order.getCloseReason().contains("用户主动取消订单")) {
-                order.setCloseReason("客户主动关闭");
-            } else if (order.getCloseReason().contains("协销帮用户取消订单")) {
-                order.setCloseReason("协销关闭");
-            } else {
-                order.setCloseReason("未知");
-            }
-        }
         // 订单已收款才会出现抹平或者多收退余额,(已收再退款或者撤销退款订单即使存在抹平也需要当未抹平重新计算付款)
         String receiptStatus = order.getReceiptStatus();
         if (StringUtils.equals("3", receiptStatus)) {
@@ -1292,6 +1278,20 @@ public class NewOrderController extends BaseController {
                 }
             }
         }
+        // 判断订单关闭环境
+        if (StringUtils.isNotBlank(order.getCloseReason())) {
+            if (order.getCloseReason().contains("超时")) {
+                order.setCloseReason("超时关闭");
+            } else if (order.getCloseReason().contains("后台手动关闭")) {
+                order.setCloseReason("后台手动关闭");
+            } else if (order.getCloseReason().contains("用户主动取消订单")) {
+                order.setCloseReason("客户主动关闭");
+            } else if (order.getCloseReason().contains("协销帮用户取消订单")) {
+                order.setCloseReason("协销关闭");
+            } else {
+                order.setCloseReason("未知");
+            }
+        }
         //一个子订单只有一个商品时,不可拆分
         int count = 0;
         for (NewShopOrder newShopOrder : order.getNewShopOrders()) {

+ 1 - 1
src/main/java/com/caimei/modules/product/service/ProductService.java

@@ -672,7 +672,7 @@ public class ProductService extends CrudService<ProductDao, Product> {
     public List<CmSku> findSkuList(Integer productID) {
         List<CmSku> skus = productDao.findSkuListProduct(productID);
         skus.forEach(s -> {
-            s.setCostCheckFlag(2);
+            // s.setCostCheckFlag(2);
             s.ladderPriceList(productDao.findLadderPriceBySku(s.skuId()));
         });
 

+ 1 - 1
src/main/java/com/caimei/modules/user/dao/NewCmShopDao.java

@@ -70,5 +70,5 @@ public interface NewCmShopDao extends CrudDao<NewCmShop> {
      * @param shop 供应商信息
      * @return 结果
      */
-    public int updateShop(NewCmShop shop);
+    int updateShop(NewCmShop shop);
 }

+ 9 - 0
src/main/java/com/caimei/modules/user/entity/NewCmShop.java

@@ -83,6 +83,7 @@ public class NewCmShop extends DataEntity<NewCmShop> {
     private Integer shopType;//供应商类别 0未审核的二手供应商,普通1,新品供应商2,二手供应商3
     private String cardNumber; //收款卡号
     private Integer chargeSupport;//线上支付手续费:默认1采美承担,2供应商承担
+    private Integer AccountOwnership; // 账号归属 0采美 1 供应商
     /**
      * 非持久化字段
      **/
@@ -1063,4 +1064,12 @@ public class NewCmShop extends DataEntity<NewCmShop> {
     public void setChargeSupport(Integer chargeSupport) {
         this.chargeSupport = chargeSupport;
     }
+
+    public Integer getAccountOwnership() {
+        return AccountOwnership;
+    }
+
+    public void setAccountOwnership(Integer accountOwnership) {
+        AccountOwnership = accountOwnership;
+    }
 }

+ 1 - 2
src/main/java/com/caimei/modules/user/service/NewCmShopService.java

@@ -393,8 +393,7 @@ public class NewCmShopService extends CrudService<NewCmShopDao, NewCmShop> {
      * @return 结果
      */
     @Transactional
-    public int updateShop(NewCmShop shop)
-    {
+    public int updateShop(NewCmShop shop) {
         return newCmShopDao.updateShop(shop);
     }
 

+ 28 - 7
src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml

@@ -55,6 +55,13 @@
         and cror.delFlag = 0 and cdr.receiptStatus in (3) and payWay != '3';
     </select>
 
+    <select id="getShopAssociateAmount" resultType="double">
+        select IFNULL(sum(cdr.receiptAmount),0) From cm_receipt_order_relation cror
+                                                         LEFT JOIN cm_discern_receipt cdr on cdr.id = cror.receiptID
+        where cror.shopOrderId =  #{shopOrderId}   and cror.relationType = '2' and cdr.delFlag = 0
+          and cror.delFlag = 0 and cdr.receiptStatus in (3) and payWay != '3';
+    </select>
+
 
     <select id="getReturnBalanceAmount" resultType="double">
         select  IFNULL(sum(amount),0) from cm_user_balance_record where balanceType = 2 and  receiptId = #{receiptId} and delFlag = 0;
@@ -860,6 +867,7 @@
 			co.payableAmount AS payableAmount,
 		    co.onlinePayFlag,
             cso.receiptAmount AS receiptAmount,
+            cso.accountAmount AS accountAmount,
 -- 			(select
 -- 			 sum(o.needPayAmount)
 -- 			 from  cm_receipt_order_relation cror
@@ -942,13 +950,18 @@
         join cm_discern_receipt cdr on cdr.id = cror.receiptID
         join cm_offline_collection cof on cdr.payType = cof.type
         where cror.delFlag = '0' and cdr.delFlag = '0'
-        <if test="relationType == 1">
-            and cror.orderID in (select shopOrderID from cm_shop_order where orderID = #{orderID}) and cror.relationType
-            = '1'
-        </if>
-        <if test="relationType == 2">
-            and cror.orderID = #{orderID} and cror.relationType = '2'
-        </if>
+          <if test="identifying == 1">
+            <if test="relationType == 1">
+                and cror.orderID in (select shopOrderID from cm_shop_order where orderID = #{orderID}) and cror.relationType
+                = '1'
+            </if>
+            <if test="relationType == 2">
+                and cror.orderID = #{orderID} and cror.relationType = '2'
+            </if>
+          </if>
+          <if test="identifying == 2">
+              and cror.shopOrderId = #{shopOrderID} and cror.relationType = 2
+          </if>
     </select>
 
     <select id="findOrderIDs" resultType="string">
@@ -1083,6 +1096,14 @@
       and  cror.orderID = #{orderID} LIMIT 1;
 	</select>
 
+    <select id="findSmoothoutshopInfo" resultType="com.caimei.modules.order.entity.CmDiscernReceipt">
+        select * from cm_discern_receipt cdr
+                          LEFT JOIN cm_receipt_order_relation cror on cror.receiptID = cdr.id
+        where cdr.receiptType = 1 and cror.relationType = 2 and cror.delFlag = 0
+          and cdr.delFlag = 0 and cdr.confirmType in (1,2,3) and cdr.receiptStatus = '3'
+          and  cror.shopOrderId = #{shopOrderId} LIMIT 1;
+    </select>
+
 
     <select id="findOrderReceipt" resultType="double">
 		select sum(associateAmount) from cm_receipt_order_relation cror

+ 2 - 0
src/main/resources/mappings/modules/order/CmReceiptOrderRelationMapper.xml

@@ -8,6 +8,7 @@
 		a.receiptID AS "receiptID",
 		a.associateAmount AS "associateAmount",
 		a.orderID AS "orderID",
+        a.shopOrderId as "shopOrderId",
 		a.delFlag AS "delFlag"
     </sql>
 
@@ -82,6 +83,7 @@
     <select id="findByReceiptID" resultType="CmReceiptOrderRelation">
         select
         <include refid="cmReceiptOrderRelationColumns"/>,
+        b.receiptDate,
         b.newReceiptType
         from cm_receipt_order_relation a
         left join cm_discern_receipt b on a.receiptID = b.id

+ 4 - 0
src/main/resources/mappings/modules/user/NewCmShopMapper.xml

@@ -54,6 +54,7 @@
 		a.rebateAmount AS "rebateAmount",
 		a.bankAccountName AS "bankAccountName",
 		a.bankName AS "bankName",
+        a.AccountOwnership as AccountOwnership,
 		a.socialCreditCode AS "socialCreditCode",
 		u.email,
 		u.source AS "source",
@@ -646,6 +647,9 @@
 <!--            <if test="banOfDeposit != null and banOfDeposit != ''">banOfDeposit = #{banOfDeposit},</if>-->
 <!--            <if test="accountName != null and accountName != ''">accountName = #{accountName},</if>-->
             <if test="chargeSupport != null and chargeSupport != ''">chargeSupport = #{chargeSupport},</if>
+            <if test="AccountOwnership != null">
+                AccountOwnership = #{AccountOwnership}
+            </if>
         </trim>
         where shopID = #{shopID}
     </update>

+ 229 - 215
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp

@@ -256,124 +256,47 @@
             </div>
         </c:if>
     </div>
-<%--    <c:if test="${not empty op.shopOrderNo}">--%>
-<%--        <h5>关联订单</h5>--%>
-<%--        <div class="receipt-order-form">--%>
-<%--            <div class="receipt-order-row2">--%>
-<%--                        <span class="font-blue"><label>子订单编号:</label>--%>
-<%--                               <a href="${ctx}/order/detail?id=${op.orderID}">${op.shopOrderNo}(${op.shopOrderId})</a></span>--%>
-<%--                <span><label>订单金额:</label>¥<fmt:formatNumber--%>
-<%--                        value="${op.productAmount}"--%>
-<%--                        pattern="#0.00"/></span>--%>
-<%--                <span>--%>
-<%--                         <span><label>供应商:</label>${op.shopName}</span>--%>
-<%--                    </span>--%>
-<%--                        <hr style="margin: 10px;"/>--%>
-<%--            </div>--%>
-
-<%--            <div class="receipt-order-row3">--%>
-
-<%--                         <span class="font-blue"><label>订单编号:</label><a--%>
-<%--                                 href="${ctx}/order/detail?id=${op.orderID}">${op.orderNo}(${op.orderID})</a></span>--%>
-
-<%--                <span><label>订单金额:</label>¥<fmt:formatNumber--%>
-<%--                        value="${op.productAmount}"--%>
-<%--                        pattern="#0.00"/></span>--%>
-
-<%--                <span><label>应收金额:</label>¥<fmt:formatNumber value="${op.needPayAmount}"--%>
-<%--                                                             pattern="#0.00"/></span>--%>
-<%--                <span>--%>
-<%--                            <label>已收金额:</label>¥<fmt:formatNumber--%>
-<%--                        value="${empty op.receiptAmount ? 0 : op.receiptAmount}"--%>
-<%--                        pattern="#0.00"/>--%>
-<%--                            </span>--%>
-<%--                <span><label>机构名称:</label>${op.jgName}</span>--%>
-<%--            </div>--%>
-
-<%--            <label>订单类型:</label><c:if test="${op.orderType eq 0}">普通订单</c:if>--%>
-<%--            <c:if test="${op.orderType eq 1}">协销订单</c:if>--%>
-
-<%--            <span><label>下单日期:</label>${cmDiscernReceipt.confirmDate}</span>--%>
-
-<%--        </div>--%>
-<%--        <c:if test="${not empty orderInfo.receiptRecordVo}">--%>
-<%--            <div class="receipt-order-form">--%>
-<%--                <div class="receipt-order-row4">--%>
-<%--                    <div><h5><label>订单收款记录:</label></h5></div>--%>
-<%--                    <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">--%>
-<%--                        <div class="row4-wrapper">--%>
-<%--                            <span class="row4-order-no">${index.index + 1}、</span>--%>
-<%--                            <span class="row4-time">${receiptRecord.receiptTime}</span>--%>
-<%--                            <c:if test="${receiptRecord.payWay == 1}">--%>
-<%--                                &lt;%&ndash;线上收款&ndash;%&gt;--%>
-<%--                                <span>线上&nbsp;${receiptRecord.bankNameType}</span>--%>
-<%--                                <span>${receiptRecord.receiptAmount}</span>--%>
-<%--                                <span><label>交易号:</label>${receiptRecord.mbOrderId}</span>--%>
-<%--                            </c:if>--%>
-<%--                            <c:if test="${receiptRecord.payWay == 2}">--%>
-<%--                                <span>线下&nbsp;${receiptRecord.bankNameType}</span>--%>
-<%--                                <span>${receiptRecord.receiptAmount}</span>--%>
-<%--                                <c:if test="${not empty receiptRecord.confirmUserPermissionID}">--%>
-<%--                                    <span>${receiptRecord.confirmUserName}确认(${receiptRecord.confirmDate})</span>--%>
-<%--                                </c:if>--%>
-<%--                                <c:if test="${not empty receiptRecord.reviewUserPermissionID}">--%>
-<%--                                    <span>--%>
-<%--                                        <c:if test="${receiptRecord.receiptStatus eq 4}">--%>
-<%--                                            ${receiptRecord.reviewUserName}审核不通过(${receiptRecord.reviewDate})--%>
-<%--                                        </c:if>--%>
-<%--                                        <c:if test="${receiptRecord.receiptStatus ne 4}">--%>
-<%--                                            ${receiptRecord.reviewUserName}审核通过(${receiptRecord.reviewDate})--%>
-<%--                                        </c:if>--%>
-<%--                                    </span>--%>
-<%--                                </c:if>--%>
-<%--                            </c:if>--%>
-<%--                            <c:if test="${receiptRecord.payWay == 3}">--%>
-<%--                                &lt;%&ndash;余额抵扣&ndash;%&gt;--%>
-<%--                                <span><a--%>
-<%--                                        href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"--%>
-<%--                                        style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>--%>
-<%--                                <span><a--%>
-<%--                                        href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"--%>
-<%--                                        style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>--%>
-<%--                            </c:if>--%>
-<%--                            <span>--%>
-<%--    &lt;%&ndash;                        一款多单的时候直接显示再订单上即可,无需收款记录显示&ndash;%&gt;--%>
-<%--                                <c:if test="${!vo.receiptOrderFlag}">--%>
-<%--                                    <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">--%>
-<%--                                        <label>抹平明细:</label>--%>
-<%--                                        <c:if test="${receiptRecord.confirmType eq 1}">--%>
-<%--                                                <font color="red">(少收抹平:--%>
-<%--                                                    ¥<fmt:formatNumber--%>
-<%--                                                            value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}"--%>
-<%--                                                            pattern="#0.00"/>元)--%>
-<%--                                                </font>--%>
-<%--                                        </c:if>--%>
-<%--                                        <c:if test="${receiptRecord.confirmType eq 2}">--%>
-<%--                                                <font color="red">(多收抹平:--%>
-<%--                                                    ¥<fmt:formatNumber--%>
-<%--                                                            value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}"--%>
-<%--                                                            pattern="#0.00"/>元)--%>
-<%--                                                </font>--%>
-<%--                                        </c:if>--%>
-<%--                                        <c:if test="${receiptRecord.confirmType eq 3}">--%>
-<%--                                                <font color="red">(多收退余额${receiptRecord.associationType eq 2 ? "(自动)" : ""}:--%>
-<%--                                                    ¥<fmt:formatNumber--%>
-<%--                                                            value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}"--%>
-<%--                                                            pattern="#0.00"/>元)--%>
-<%--                                                </font>--%>
-<%--                                        </c:if>--%>
-<%--                                    </c:if>--%>
-<%--                                </c:if>--%>
-<%--                                </span>--%>
-<%--                            <span>--%>
-<%--                                    ${receiptRecord.receiptAmount}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${vo.confirmer} 确认 ${vo.confirmTime}--%>
-<%--                                </span>--%>
-<%--                        </div>--%>
-<%--                    </c:forEach>--%>
-<%--                </div>--%>
-<%--            </div>--%>
-<%--        </c:if>--%>
-<%--    </c:if>--%>
+<%--    <c:if test="${not empty op.shopOrderNo}">
+        <h5>关联订单</h5>
+        <div class="receipt-order-form">
+            <div class="receipt-order-row2">
+                        <span class="font-blue"><label>子订单编号:</label>
+                               <a href="${ctx}/order/detail?id=${op.orderID}">${op.shopOrderNo}(${op.shopOrderId})</a></span>
+                <span><label>订单金额:</label>¥<fmt:formatNumber
+                        value="${op.productAmount}"
+                        pattern="#0.00"/></span>
+                <span>
+                         <span><label>供应商:</label>${op.shopName}</span>
+                    </span>
+                        <hr style="margin: 10px;"/>
+            </div>
+
+            <div class="receipt-order-row3">
+
+                         <span class="font-blue"><label>订单编号:</label><a
+                                 href="${ctx}/order/detail?id=${op.orderID}">${op.orderNo}(${op.orderID})</a></span>
+
+                <span><label>订单金额:</label>¥<fmt:formatNumber
+                        value="${op.productAmount}"
+                        pattern="#0.00"/></span>
+
+                <span><label>应收金额:</label>¥<fmt:formatNumber value="${op.needPayAmount}"
+                                                             pattern="#0.00"/></span>
+                <span>
+                            <label>已收金额:</label>¥<fmt:formatNumber
+                        value="${empty op.receiptAmount ? 0 : op.receiptAmount}"
+                        pattern="#0.00"/>
+                            </span>
+                <span><label>机构名称:</label>${op.jgName}</span>
+            </div>
+
+            <label>订单类型:</label><c:if test="${op.orderType eq 0}">普通订单</c:if>
+            <c:if test="${op.orderType eq 1}">协销订单</c:if>
+
+            <span><label>下单日期:</label>${cmDiscernReceipt.confirmDate}</span>
+
+        </div>--%>
+
 
 
     <c:if test="${vo.receiptType != 2 and vo.receiptType != 6 and vo.receiptType != 7 and vo.receiptType != 8}">
@@ -408,7 +331,7 @@
 <%--                                value="${orderInfo.orderAmount}"--%>
 <%--                                pattern="#0.00"/></span>--%>
                         <span>
-                            <span><label>子订单应收金额:</label>¥<fmt:formatNumber value="${orderInfo.shouldPayShopAmount}"
+                            <span><label>子订单应收金额:</label>¥<fmt:formatNumber value="${orderInfo.shopOrderAmount}"
                                                                          pattern="#0.00"/></span>
                             <span>
                             <label>子订单已收金额:</label>¥<fmt:formatNumber
@@ -422,40 +345,40 @@
                                                varStatus="index">
                                         <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
                                             <label>抹平明细:</label>
-                                            <c:if test="${receiptRecord.confirmType eq 1}">
-                                                <c:if test="${vo.receiptOrderFlag}">
+                                            <c:if test="${orderInfo.confirmType eq 1}">
+                                                <c:if test="${orderInfo.receiptOrderFlag}">
                                                     <font color="red">(一款多单:少收抹平金额未知)</font>
                                                 </c:if>
-                                                <c:if test="${!vo.receiptOrderFlag}">
-                                                    <font color="red">(少收抹平:
+                                                <c:if test="${!orderInfo.receiptOrderFlag}">
+                                                <font color="red">(少收抹平:
                                                     ¥<fmt:formatNumber
-                                                                value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}"
-                                                                pattern="#0.00"/>)
-                                                    </font>
+                                                            value="${orderInfo.needPayAmount - (empty orderInfo.orderReceivedAmount ? 0 : orderInfo.orderReceivedAmount)}"
+                                                            pattern="#0.00"/>)
+                                                </font>
                                                 </c:if>
                                             </c:if>
-                                            <c:if test="${receiptRecord.confirmType eq 2}">
-                                                <c:if test="${vo.receiptOrderFlag}">
+                                            <c:if test="${orderInfo.confirmType eq 2}">
+                                                <c:if test="${orderInfo.receiptOrderFlag}">
                                                     <font color="red">(一款多单:多收抹平金额未知)</font>
                                                 </c:if>
-                                                <c:if test="${!vo.receiptOrderFlag}">
-                                                    <font color="red">(多收抹平:
+                                                <c:if test="${!orderInfo.receiptOrderFlag}">
+                                                <font color="red">(多收抹平:
                                                     ¥<fmt:formatNumber
-                                                                value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}"
-                                                                pattern="#0.00"/>)
-                                                    </font>
+                                                            value="${(empty orderInfo.receiptAmount ? 0 : orderInfo.orderReceivedAmount) - orderInfo.payableAmount}"
+                                                            pattern="#0.00"/>)
+                                                </font>
                                                 </c:if>
                                             </c:if>
-                                            <c:if test="${receiptRecord.confirmType eq 3}">
-                                                <c:if test="${vo.receiptOrderFlag}">
+                                            <c:if test="${orderInfo.confirmType eq 3}">
+                                                <c:if test="${orderInfo.receiptOrderFlag}">
                                                     <font color="red">(一款多单:多收退余额)</font>
                                                 </c:if>
-                                                <c:if test="${!vo.receiptOrderFlag}">
-                                                    <font color="red">(多收退余额${receiptRecord.associationType eq 2 ? "(自动)" : ""}:
+                                                <c:if test="${!orderInfo.receiptOrderFlag}">
+                                                <font color="red">(多收退余额&nbsp;&nbsp;${orderInfo.associationType eq 2 ? "(自动)" : ""}:
                                                     ¥<fmt:formatNumber
-                                                                value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}"
-                                                                pattern="#0.00"/>)
-                                                    </font>
+                                                            value="${(empty orderInfo.returnBalanceAmount ? 0 : orderInfo.returnBalanceAmount)}"
+                                                            pattern="#0.00"/>)
+                                                </font>
                                                 </c:if>
                                             </c:if>
                                         </c:if>
@@ -499,80 +422,80 @@
                             <span>子订单收款状态:${fns:getDictLabel(shopOrder.shopReceiptStatus,'receiptStatus' ,'' )}</span>
                         </c:forEach>
                     </div>
-<%--                    <div class="receipt-order-row4">--%>
-<%--                        <div><h5><label>订单收款记录:</label></h5></div>--%>
-<%--                        <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">--%>
-<%--                            <div class="row4-wrapper">--%>
-<%--                                <span class="row4-order-no">${index.index + 1}、</span>--%>
-<%--                                <span class="row4-time">${receiptRecord.receiptTime}</span>--%>
-<%--                                <c:if test="${receiptRecord.payWay == 1}">--%>
-<%--                                    &lt;%&ndash;线上收款&ndash;%&gt;--%>
-<%--                                    <span>线上&nbsp;${receiptRecord.bankNameType}</span>--%>
-<%--                                    <span>${receiptRecord.receiptAmount}</span>--%>
-<%--                                    <span><label>交易号:</label>${receiptRecord.mbOrderId}</span>--%>
-<%--                                </c:if>--%>
-<%--                                <c:if test="${receiptRecord.payWay == 2}">--%>
-<%--                                    <span>线下&nbsp;${receiptRecord.bankNameType}</span>--%>
-<%--                                    <span>${receiptRecord.receiptAmount}</span>--%>
-<%--                                    <c:if test="${not empty receiptRecord.confirmUserPermissionID}">--%>
-<%--                                        <span>${receiptRecord.confirmUserName}确认(${receiptRecord.confirmDate})</span>--%>
-<%--                                    </c:if>--%>
-<%--                                    <c:if test="${not empty receiptRecord.reviewUserPermissionID}">--%>
-<%--                                    <span>--%>
-<%--                                        <c:if test="${receiptRecord.receiptStatus eq 4}">--%>
-<%--                                            ${receiptRecord.reviewUserName}审核不通过(${receiptRecord.reviewDate})--%>
-<%--                                        </c:if>--%>
-<%--                                        <c:if test="${receiptRecord.receiptStatus ne 4}">--%>
-<%--                                            ${receiptRecord.reviewUserName}审核通过(${receiptRecord.reviewDate})--%>
-<%--                                        </c:if>--%>
-<%--                                    </span>--%>
-<%--                                    </c:if>--%>
-<%--                                </c:if>--%>
-<%--                                <c:if test="${receiptRecord.payWay == 3}">--%>
-<%--                                    &lt;%&ndash;余额抵扣&ndash;%&gt;--%>
-<%--                                    <span><a--%>
-<%--                                            href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"--%>
-<%--                                            style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>--%>
-<%--                                    <span><a--%>
-<%--                                            href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"--%>
-<%--                                            style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>--%>
-<%--                                </c:if>--%>
-<%--                                <span>--%>
-<%--    &lt;%&ndash;                        一款多单的时候直接显示再订单上即可,无需收款记录显示&ndash;%&gt;--%>
-<%--                                <c:if test="${!vo.receiptOrderFlag}">--%>
-<%--                                    <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">--%>
-<%--                                        <label>抹平明细:</label>--%>
-<%--                                        <c:if test="${receiptRecord.confirmType eq 1}">--%>
-<%--                                                <font color="red">(少收抹平:--%>
-<%--                                                    ¥<fmt:formatNumber--%>
-<%--                                                            value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}"--%>
-<%--                                                            pattern="#0.00"/>元)--%>
-<%--                                                </font>--%>
-<%--                                        </c:if>--%>
-<%--                                        <c:if test="${receiptRecord.confirmType eq 2}">--%>
-<%--                                                <font color="red">(多收抹平:--%>
-<%--                                                    ¥<fmt:formatNumber--%>
-<%--                                                            value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}"--%>
-<%--                                                            pattern="#0.00"/>元)--%>
-<%--                                                </font>--%>
-<%--                                        </c:if>--%>
-<%--                                        <c:if test="${receiptRecord.confirmType eq 3}">--%>
-<%--                                                <font color="red">(多收退余额${receiptRecord.associationType eq 2 ? "(自动)" : ""}:--%>
-<%--                                                    ¥<fmt:formatNumber--%>
-<%--                                                            value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}"--%>
-<%--                                                            pattern="#0.00"/>元)--%>
-<%--                                                </font>--%>
-<%--                                        </c:if>--%>
-<%--                                    </c:if>--%>
-<%--                                </c:if>--%>
-<%--                                </span>--%>
-<%--&lt;%&ndash;                                <span>&ndash;%&gt;--%>
-<%--&lt;%&ndash;                                    ${receiptRecord.receiptAmount}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${vo.confirmer} 确认 ${vo.confirmTime}&ndash;%&gt;--%>
-<%--&lt;%&ndash;                                </span>&ndash;%&gt;--%>
-<%--                            </div>--%>
-<%--                        </c:forEach>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
+                    <%--<div class="receipt-order-row4">
+                        <div><h5><label>订单收款记录:</label></h5></div>
+                        <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
+                            <div class="row4-wrapper">
+                                <span class="row4-order-no">${index.index + 1}、</span>
+                                <span class="row4-time">${receiptRecord.receiptTime}</span>
+                                <c:if test="${receiptRecord.payWay == 1}">
+                                    &lt;%&ndash;线上收款&ndash;%&gt;
+                                    <span>线上&nbsp;${receiptRecord.bankNameType}</span>
+                                    <span>${receiptRecord.receiptAmount}</span>
+                                    <span><label>交易号:</label>${receiptRecord.mbOrderId}</span>
+                                </c:if>
+                                <c:if test="${receiptRecord.payWay == 2}">
+                                    <span>线下&nbsp;${receiptRecord.bankNameType}</span>
+                                    <span>${receiptRecord.receiptAmount}</span>
+                                    <c:if test="${not empty receiptRecord.confirmUserPermissionID}">
+                                        <span>${receiptRecord.confirmUserName}确认(${receiptRecord.confirmDate})</span>
+                                    </c:if>
+                                    <c:if test="${not empty receiptRecord.reviewUserPermissionID}">
+                                    <span>
+                                        <c:if test="${receiptRecord.receiptStatus eq 4}">
+                                            ${receiptRecord.reviewUserName}审核不通过(${receiptRecord.reviewDate})
+                                        </c:if>
+                                        <c:if test="${receiptRecord.receiptStatus ne 4}">
+                                            ${receiptRecord.reviewUserName}审核通过(${receiptRecord.reviewDate})
+                                        </c:if>
+                                    </span>
+                                    </c:if>
+                                </c:if>
+                                <c:if test="${receiptRecord.payWay == 3}">
+                                    &lt;%&ndash;余额抵扣&ndash;%&gt;
+                                    <span><a
+                                            href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
+                                            style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>
+                                    <span><a
+                                            href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
+                                            style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>
+                                </c:if>
+                                <span>
+    &lt;%&ndash;                        一款多单的时候直接显示再订单上即可,无需收款记录显示&ndash;%&gt;
+                                <c:if test="${!vo.receiptOrderFlag}">
+                                    <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
+                                        <label>抹平明细:</label>
+                                        <c:if test="${receiptRecord.confirmType eq 1}">
+                                                <font color="red">(少收抹平:
+                                                    ¥<fmt:formatNumber
+                                                            value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}"
+                                                            pattern="#0.00"/>元)
+                                                </font>
+                                        </c:if>
+                                        <c:if test="${receiptRecord.confirmType eq 2}">
+                                                <font color="red">(多收抹平:
+                                                    ¥<fmt:formatNumber
+                                                            value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}"
+                                                            pattern="#0.00"/>元)
+                                                </font>
+                                        </c:if>
+                                        <c:if test="${receiptRecord.confirmType eq 3}">
+                                                <font color="red">(多收退余额${receiptRecord.associationType eq 2 ? "(自动)" : ""}:
+                                                    ¥<fmt:formatNumber
+                                                            value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}"
+                                                            pattern="#0.00"/>元)
+                                                </font>
+                                        </c:if>
+                                    </c:if>
+                                </c:if>
+                                </span>
+&lt;%&ndash;                                <span>&ndash;%&gt;
+&lt;%&ndash;                                    ${receiptRecord.receiptAmount}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${vo.confirmer} 确认 ${vo.confirmTime}&ndash;%&gt;
+&lt;%&ndash;                                </span>&ndash;%&gt;
+                            </div>
+                        </c:forEach>
+                    </div>
+                </div>--%>
                 <br>
             </c:forEach>
         </div>
@@ -618,7 +541,98 @@
             </div>
         </div>
     </c:if>
-
+                <c:if test="${not empty orderInfo.receiptRecordVo}">
+                    <div class="receipt-order-form">
+                        <div class="receipt-order-row4">
+                            <div><h5><label>订单收款记录:</label></h5></div>
+                            <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
+                                <div class="row4-wrapper">
+                                    <span class="row4-order-no">${index.index + 1}、</span>
+                                    <span class="row4-time">${receiptRecord.receiptTime}</span>
+                                    <c:if test="${receiptRecord.payWay == 1}">
+                                        <%--线上收款--%>
+                                        <span>线上&nbsp;${receiptRecord.bankNameType}</span>
+                                        <span>${receiptRecord.receiptAmount}</span>
+                                        <span><label>交易号:</label>${receiptRecord.mbOrderId}</span>
+                                    </c:if>
+                                    <c:if test="${receiptRecord.payWay == 2}">
+                                        <span>线下&nbsp;${receiptRecord.bankNameType}</span>
+                                        <span>${receiptRecord.receiptAmount}</span>
+                                        <c:if test="${not empty receiptRecord.confirmUserPermissionID}">
+                                            <span>${receiptRecord.confirmUserName}确认(${receiptRecord.confirmDate})</span>
+                                        </c:if>
+                                        <c:if test="${not empty receiptRecord.reviewUserPermissionID}">
+                                    <span>
+                                        <c:if test="${receiptRecord.receiptStatus eq 4}">
+                                            ${receiptRecord.reviewUserName}审核不通过(${receiptRecord.reviewDate})
+                                        </c:if>
+                                        <c:if test="${receiptRecord.receiptStatus ne 4}">
+                                            ${receiptRecord.reviewUserName}审核通过(${receiptRecord.reviewDate})
+                                        </c:if>
+                                    </span>
+                                        </c:if>
+                                    </c:if>
+                                    <c:if test="${receiptRecord.payWay == 3}">
+                                        <%--余额抵扣--%>
+                                        <span><a
+                                                href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
+                                                style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>
+                                        <span><a
+                                                href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
+                                                style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>
+                                    </c:if>
+                                    <span>
+    <%--                        一款多单的时候直接显示再订单上即可,无需收款记录显示--%>
+                                <c:if test="${!vo.receiptOrderFlag}">
+                                    <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
+                                        <label>抹平明细:</label>
+                                        <c:if test="${order.confirmType eq 1}">
+                                            <c:if test="${order.receiptOrderFlag}">
+                                                <font color="red">(一款多单:少收抹平金额未知)</font>
+                                            </c:if>
+                                            <c:if test="${!order.receiptOrderFlag}">
+                                                <font color="red">(少收抹平:
+                                                    ¥<fmt:formatNumber
+                                                            value="${order.payableAmount - (empty order.orderReceivedAmount ? 0 : order.orderReceivedAmount)}"
+                                                            pattern="#0.00"/>)
+                                                </font>
+                                            </c:if>
+                                        </c:if>
+                                        <c:if test="${order.confirmType eq 2}">
+                                            <c:if test="${order.receiptOrderFlag}">
+                                                <font color="red">(一款多单:多收抹平金额未知)</font>
+                                            </c:if>
+                                            <c:if test="${!order.receiptOrderFlag}">
+                                                <font color="red">(多收抹平:
+                                                    ¥<fmt:formatNumber
+                                                            value="${(empty order.orderReceivedAmount ? 0 : order.orderReceivedAmount) - order.payableAmount}"
+                                                            pattern="#0.00"/>)
+                                                </font>
+                                            </c:if>
+                                        </c:if>
+                                        <c:if test="${order.confirmType eq 3}">
+                                            <c:if test="${order.receiptOrderFlag}">
+                                                <font color="red">(一款多单:多收退余额)</font>
+                                            </c:if>
+                                            <c:if test="${!order.receiptOrderFlag}">
+                                                <font color="red">(多收退余额&nbsp;&nbsp;${order.associationType eq 2 ? "(自动)" : ""}:
+                                                    ¥<fmt:formatNumber
+                                                            value="${(empty order.returnBalanceAmount ? 0 : order.returnBalanceAmount)}"
+                                                            pattern="#0.00"/>)
+                                                </font>
+                                            </c:if>
+                                        </c:if>
+                                    </c:if>
+                                </c:if>
+                            </span>
+                                    <span>
+                                ${receiptRecord.receiptAmount}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${vo.confirmer} 确认 ${vo.confirmTime}
+                            </span>
+                                </div>
+                            </c:forEach>
+                        </div>
+                    </div>
+                </c:if>
     <c:if test="${ voucherVo ne null }">
         <div class="order-rows">
 

+ 3 - 2
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp

@@ -339,10 +339,11 @@
 <%--                <c:if test="${cmDiscernReceipt.receiptType != 6}">${cmDiscernReceipt.orders}</c:if>--%>
 <%--                <c:if test="${cmDiscernReceipt.receiptType == 6}">-----</c:if>--%>
 <%--                <c:if test="${cmDiscernReceipt.receiptType == 7}">-----</c:if>--%>
-                <c:if test="${cmDiscernReceipt.shopOrderId == null}">-----</c:if>
+                    ${cmDiscernReceipt.orders}
+                <%--<c:if test="${cmDiscernReceipt.shopOrderId == null}">-----</c:if>
                 <c:if test="${cmDiscernReceipt.shopOrderId != null}">
                     <a href="${ctx}/order/detail?id=${cmDiscernReceipt.orderID}&shopOrderID=${cmDiscernReceipt.shopOrderId}">子订单${cmDiscernReceipt.shopOrderNo}(${cmDiscernReceipt.shopOrderId})</a>
-                </c:if>
+                </c:if>--%>
             </td>
             <shiro:hasPermission name="order:cmDiscernReceipt:edit">
                 <td>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/order/newOrderList.jsp

@@ -309,8 +309,8 @@
                     <font color="green">已收款</font>
                 </c:if>
                 <br>
-                    <%--抹平明细--%>
-                <c:if test="${order.confirmType eq 1}">
+                    <%--抹平明细 主订单不在展示抹平 由子订单展示--%>
+                <%--<c:if test="${order.confirmType eq 1}">
                     <c:if test="${order.receiptOrderFlag}">
                         一款多单:少收抹平金额未知
                     </c:if>
@@ -345,7 +345,7 @@
                                     pattern="#0.00"/>
                         </font>
                     </c:if>
-                </c:if>
+                </c:if>--%>
             </li>
             <li>
                 <c:if test="${order.payStatus == 1}">

+ 41 - 4
src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp

@@ -447,8 +447,8 @@
                 <c:if test="${order.receiptStatus == 3}">
                     <font color="green">已收款</font>
                 </c:if>
-                    <%--抹平明细--%>
-                <c:if test="${order.confirmType eq 1}">
+                    <%--抹平明细 主订单不显示抹平,关联子订单--%>
+                <%--<c:if test="${order.confirmType eq 1}">
                     <c:if test="${order.receiptOrderFlag}">
                         <font color="red">(一款多单:少收抹平金额未知)</font>
                     </c:if>
@@ -483,7 +483,7 @@
                                     pattern="#0.00"/>)
                         </font>
                     </c:if>
-                </c:if>
+                </c:if>--%>
             </td>
             <td>发货状态:
                 <c:if test="${order.sendOutStatus == 1}">
@@ -918,7 +918,7 @@
                             </c:if>
 
                         </span>
-        <span>收款状态:
+                        <span>收款状态:
                             <c:if test="${shopOrder.shopReceiptStatus == 1}">
                                 <font color="red">待收款</font>
                             </c:if>
@@ -928,6 +928,43 @@
                             <c:if test="${shopOrder.shopReceiptStatus == 3}">
                                 <font color="green">已收款</font>
                             </c:if>
+                            <%--抹平明细--%>
+                            <c:if test="${shopOrder.confirmType eq 1}">
+                                <c:if test="${shopOrder.receiptOrderFlag}">
+                                    <font color="red">(一款多单:少收抹平金额未知)</font>
+                                </c:if>
+                                <c:if test="${!shopOrder.receiptOrderFlag}">
+                                    <font color="red">(少收抹平:
+                                        ¥<fmt:formatNumber
+                                                value="${shopOrder.needPayAmount - (empty shopOrder.orderReceivedAmount ? 0 : shopOrder.orderReceivedAmount)}"
+                                                pattern="#0.00"/>)
+                                    </font>
+                                </c:if>
+                            </c:if>
+                            <c:if test="${shopOrder.confirmType eq 2}">
+                                <c:if test="${shopOrder.receiptOrderFlag}">
+                                    <font color="red">(一款多单:多收抹平金额未知)</font>
+                                </c:if>
+                                <c:if test="${!shopOrder.receiptOrderFlag}">
+                                    <font color="red">(多收抹平:
+                                        ¥<fmt:formatNumber
+                                                value="${(empty shopOrder.receiptAmount ? 0 : shopOrder.orderReceivedAmount) - shopOrder.payableAmount}"
+                                                pattern="#0.00"/>)
+                                    </font>
+                                </c:if>
+                            </c:if>
+                            <c:if test="${shopOrder.confirmType eq 3}">
+                                <c:if test="${shopOrder.receiptOrderFlag}">
+                                    <font color="red">(一款多单:多收退余额)</font>
+                                </c:if>
+                                <c:if test="${!shopOrder.receiptOrderFlag}">
+                                    <font color="red">(多收退余额&nbsp;&nbsp;${shopOrder.associationType eq 2 ? "(自动)" : ""}:
+                                        ¥<fmt:formatNumber
+                                                value="${(empty shopOrder.returnBalanceAmount ? 0 : shopOrder.returnBalanceAmount)}"
+                                                pattern="#0.00"/>)
+                                    </font>
+                                </c:if>
+                            </c:if>
                         </span>
 
         <span>发货状态:

+ 68 - 50
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -8,6 +8,12 @@
     <meta name="decorator" content="default"/>
     <link type="text/css" rel="stylesheet" href="${ctxStatic}/bootstrap-select/css/bootstrap-select.css"></link>
     <style>
+        .sku-item-li{
+            width: 100%;
+            height: auto;
+            float: left;
+            margin-bottom: 5px;
+        }
         .sku {
             display: flex;
             align-items: center;
@@ -16,10 +22,16 @@
             padding: 10px;
             white-space: nowrap;
             margin-top: 10px;
-            width: 1200px;
+            width: 1000px;
+        }
+        .sku-item-delete{
+            width: 40%;
+            height: auto;
+            float: left;
+            margin-left: 10px;
         }
-
         .sku .sku-item {
+            float: left;
             margin-right: 12px;
             padding: 4px 0;
         }
@@ -857,54 +869,60 @@
         <input type="hidden" name="skuId">
         <input type="hidden" name="organizeId">
         <input type="hidden" name="mallProductId">
-        <div class="sku-item sku-unit">
-            <span class="red">*</span>包装规格:
-            <input name="unit" type="text" maxlength="15" style="width: 40px" class="short required"/>
-        </div>
-        <div class="sku-item sku-normalPrice">
-            <span class="red">*</span>市场价:
-            <input style="width: 60px" name="normalPrice" type="number" maxlength="10"
-                   class="short input-small required"/>元
-        </div>
-        <div class="sku-item sku-stock">
-            <span>库存:</span>
-            <input name="stock" style="width: 50px" type="number" maxlength="11" class="short required"/>
-        </div>
-        <div class="sku-item sku-costCheckFlag">
-            <span class="red">*</span>成本:
-            <label><input type="radio" name="costCheckFlag" value="1" checked/>固定成本</label>
-            <b class="line">|</b>
-            <label><input type="radio" name="costCheckFlag" value="2"/>比例成本</label>
-        </div>
-        <div class="sku-item sku-costPrice">
-            <span class="red">*</span>
-            <span class="costFlagText">成本价</span>:
-            <input style="width: 60px" name="costPrice" type="number" maxlength="11" class="short"/> 元
-        </div>
-        <div class="sku-item sku-shopPercent" style="display: none;">
-            <span class="red">*</span>佣金比例:
-            供应商:<input style="width: 50px" name="shopPercent" type="number" maxlength="11" class="short"/>%
-            集团:<input style="width: 50px" name="organizePercent" type="number" maxlength="11" class="short"/>%
-            采美:<input style="width: 50px" name="cmPercent" type="number" maxlength="11" class="short"/>%
-        </div>
-        <div class="sku-item sku-price">
-            <span class="red">*</span>机构价:
-            <input name="price" type="number" id="price" maxlength="11" style="width: 70px"
-                   class="short computedPrice required"
-                   onkeyup="computedPriceLevel(this.value)"/>
+        <div class="sku-item-li">
+            <div class="sku-item sku-unit">
+                <span class="red">*</span>包装规格:
+                <input name="unit" type="text" maxlength="15" style="width: 40px" class="short required"/>
+            </div>
+            <div class="sku-item sku-normalPrice">
+                <span class="red">*</span>市场价:
+                <input style="width: 60px" name="normalPrice" type="number" maxlength="10"
+                       class="short input-small required"/>元
+            </div>
+            <div class="sku-item sku-price">
+                <span class="red">*</span>机构价:
+                <input name="price" type="number" id="price" maxlength="11" style="width: 70px"
+                       class="short computedPrice required"
+                       onkeyup="computedPriceLevel(this.value)"/>
+            </div>
+            <div class="sku-item sku-stock">
+                <span>库存:</span>
+                <input name="stock" style="width: 50px" type="number" maxlength="11" class="short required"/>
+            </div>
+            <div class="sku-item sku-minBuyNumber">
+                <span class="red">*</span>起订量:
+                <input style="width: 40px" type="number" name="minBuyNumber" maxlength="11" class="short  required"/>
+            </div>
         </div>
-        <div class="sku-item sku-ladderPriceFlag">
-            <span class="red">*</span>商品展示价格:
-            <label> <input type="radio" name="ladderPriceFlag" value="0" checked/> 不使用阶梯价格
-            </label>
-            <b class="line">|</b>
-            <label> <input type="radio" name="ladderPriceFlag" value="1"/>使用阶梯价格</label>
+        <div class="sku-item-li">
+            <div class="sku-item sku-costCheckFlag">
+                <span class="red">*</span>成本:
+                <label><input type="radio" name="costCheckFlag" value="1" checked/>固定成本</label>
+                <b class="line">|</b>
+                <label><input type="radio" name="costCheckFlag" value="2"/>比例成本</label>
+            </div>
+            <div class="sku-item sku-costPrice">
+                <span class="red">*</span>
+                <span class="costFlagText">成本价</span>:
+                <input style="width: 60px" name="costPrice" type="number" maxlength="11" class="short"/> 元
+            </div>
+            <div class="sku-item sku-shopPercent" style="display: none;">
+                <span class="red">*</span>佣金比例:
+                供应商:<input style="width: 50px" name="shopPercent" type="number" maxlength="11" class="short"/>%
+                集团:<input style="width: 50px" name="organizePercent" type="number" maxlength="11" class="short"/>%
+                采美:<input style="width: 50px" name="cmPercent" type="number" maxlength="11" class="short"/>%
+            </div>
         </div>
-        <div class="sku-item sku-minBuyNumber">
-            <span class="red">*</span>起订量:
-            <input style="width: 40px" type="number" name="minBuyNumber" maxlength="11" class="short  required"/>
+        <div class="sku-item-li sku-item-delete">
+            <div class="sku-item sku-ladderPriceFlag">
+                <span class="red">*</span>商品展示价格:
+                <label> <input type="radio" name="ladderPriceFlag" value="0" checked/> 不使用阶梯价格
+                </label>
+                <b class="line">|</b>
+                <label> <input type="radio" name="ladderPriceFlag" value="1"/>使用阶梯价格</label>
+            </div>
         </div>
-        <div><span><button class="deleteSku" onclick="deleteDiv(this)">删除SKU</button></span></div>
+        <div class="sku-item-delete"><span><button class="deleteSku" onclick="deleteDiv(this)">删除SKU</button></span></div>
         <div class="ladderPriceBox" style="display: none;">
             <div class="ladderPrice">
                 起订量:
@@ -2006,7 +2024,7 @@
         }
         var product = {
             skuIndex: ++skuIndex-1,
-            costCheckFlag: '2',
+            costCheckFlag: '1',
             ladderPriceFlag: '0'
         }
         setSkuPrototypeValues(current, product, 0);
@@ -2024,7 +2042,7 @@
         }
         var product = {
             skuIndex: ++skuIndex-1,
-            costCheckFlag: '2',
+            costCheckFlag: '1',
             ladderPriceFlag: '0'
         }
         setSkuPrototypeValues(current, product, 4);
@@ -2169,7 +2187,7 @@
         // if (organize != 0) {
         //     ladderPriceFlag.parent().parent().hide();
         // }
-        costCheckFlag.parent().parent().hide();
+        // costCheckFlag.parent().parent().hide();
 
         ladderPriceBox.find('.ladderPrice').each(function (index, item) {
             var ladderPrice = {}

+ 9 - 0
src/main/webapp/WEB-INF/views/modules/user/newCmShopSetForm.jsp

@@ -34,6 +34,15 @@
 	<form:form id="inputForm" modelAttribute="newCmShop" action="${ctx}/user/newCmShop/updateShop" method="post" class="form-horizontal">
 		<form:hidden path="shopID"/>
 		<sys:message content="${message}"/>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>账号归属:</label>
+			<div class="controls">
+				<form:select path="AccountOwnership" placeholder="请选择" class="input-xlarge required">
+					<form:option value="0" label="采美" />
+					<form:option value="1" label="供应商" />
+				</form:select>
+			</div>
+		</div>
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font>开户行:</label>
 			<div class="controls">