Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/developer' into developerA

# Conflicts:
#	src/main/java/com/caimei/modules/order/web/CmPayShopController.java
zhijiezhao 1 anno fa
parent
commit
f6fa4f96c3

+ 18 - 0
src/main/java/com/caimei/modules/order/entity/CmChangePayShopProduct.java

@@ -18,6 +18,8 @@ public class CmChangePayShopProduct extends DataEntity<CmChangePayShopProduct> {
 	private Integer orderProductId;		// 订单商品ID
 	private String orderProductName;		// 商品名称
 	private Double costPrice;		// 购买时商品成本价
+	private Double organizeCostPrice;	// 购买时商品集团成本
+	private Double cmCostPrice;	// 购买时商品采美成本
 	private Double singleShouldPayTotalTax;		// 单个付供应商税费
 	private String includedTax;//   char(2) comment '是否含税 0不含税 1含税 2未知',
 	private String invoiceType;//   char(2) comment '发票类型 1增值税专用发票 2增值税普通发票 3不开发票',
@@ -79,6 +81,22 @@ public class CmChangePayShopProduct extends DataEntity<CmChangePayShopProduct> {
 		this.costPrice = costPrice;
 	}
 
+	public Double getOrganizeCostPrice() {
+		return organizeCostPrice;
+	}
+
+	public void setOrganizeCostPrice(Double organizeCostPrice) {
+		this.organizeCostPrice = organizeCostPrice;
+	}
+
+	public Double getCmCostPrice() {
+		return cmCostPrice;
+	}
+
+	public void setCmCostPrice(Double cmCostPrice) {
+		this.cmCostPrice = cmCostPrice;
+	}
+
 	public Double getSingleShouldPayTotalTax() {
 		return singleShouldPayTotalTax;
 	}

+ 3 - 0
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -111,6 +111,9 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
                 orderUserInfo.setFirstClubType(club.getFirstClubType());
             }
         }
+        //支付凭证
+        List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(shopOrder.getShopOrderID());
+        shopOrder.setVoucherVo(voucherVo);
         List<NewOrderProduct> list = newOrderProductDao.findListByShopOrderID(shopOrder.getShopOrderID());
         List<NewOrderProduct> listAll = new ArrayList<NewOrderProduct>();
         if (null != list && list.size() > 0) {

+ 100 - 94
src/main/java/com/caimei/modules/order/web/CmPayShopController.java

@@ -220,6 +220,8 @@ public class CmPayShopController extends BaseController {
         double totalCostFee = 0D;
         double totalTaxesFee = 0D;
         NewShopOrder shopOrder = newShopOrderService.get(shopOrderID);
+        // 初始运费
+        Double postFee = null == shopOrder.getShopPostFee() ? 0d : shopOrder.getShopPostFee();
         String dbcostType = shopOrder.getCostType();
         String cmChangePayShopRecondId = "0";
         if (StringUtils.isEmpty(dbcostType)) {
@@ -325,70 +327,74 @@ public class CmPayShopController extends BaseController {
         //子订单的成本方式第一次填写以后就不能修改了
         // 固定成本
         //if ("1".equals(costType)) {
-        // List<CmReturnedPurchaseProduct> rL = cmReturnedPurchaseProductService.findReturnedByShopOrderID(Integer.parseInt(shopOrderID));
-        for (NewOrderProduct product : newOrderProducts) {
-            Integer orderProductID = product.getOrderProductID();
-            Double costPrice = product.getCostPrice() == null ? 0d : product.getCostPrice();
-            Double organizeCostPrice = product.getOrganizeCostPrice() == null ? 0d : product.getOrganizeCostPrice();
-            Double cmCostPrice = product.getCmCostPrice() == null ? 0d : product.getCmCostPrice();
-            if (soZeroCostFlag && costPrice > 0) {
-                soZeroCostFlag = false;
-            }
-            // 在订单商品含税的情况下, 成本计算税费
-            if ("0".equals(product.getIncludedTax()) && null != product.getSupplierTaxRate() && product.getSupplierTaxRate() > 0d) {
-                costPrice = MathUtil.add(costPrice, MathUtil.div(MathUtil.mul(costPrice, product.getSupplierTaxRate()), 100)).doubleValue();
-            }
-            // product.setSingleShouldPayTotalTax(MathUtil.div(MathUtil.mul(MathUtil.div(product.getCostPrice(), MathUtil.div(MathUtil.add(product.getTaxRate(), 100),100)), product.getSupplierTaxRate()), 100).doubleValue());
-            Double singleShouldPayTotalTax = product.getSingleShouldPayTotalTax() == null ? 0d : product.getSingleShouldPayTotalTax();
-            Double supplierTaxRate = product.getSupplierTaxRate() == null ? 0d : product.getSupplierTaxRate();
-            // 获取已被退款的商品数量
-            Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(Integer.parseInt(shopOrderID), orderProductID);
-            returnNum = returnNum == null ? 0 : returnNum;
-            NewOrderProduct orderProduct = newOrderProductService.get(String.valueOf(orderProductID));
-            // 修改前
-            if (StringUtils.isEmpty(dbcostType)) {
+            // List<CmReturnedPurchaseProduct> rL = cmReturnedPurchaseProductService.findReturnedByShopOrderID(Integer.parseInt(shopOrderID));
+            for (NewOrderProduct product : newOrderProducts) {
+                Integer orderProductID = product.getOrderProductID();
+                Double costPrice = product.getCostPrice() == null ? 0d : product.getCostPrice();
+                Double organizeCostPrice = product.getOrganizeCostPrice() == null ? 0d : product.getOrganizeCostPrice();
+                Double cmCostPrice = product.getCmCostPrice() == null ? 0d : product.getCmCostPrice();
+                if (soZeroCostFlag && costPrice > 0) {
+                    soZeroCostFlag = false;
+                }
+                // 在订单商品含税的情况下, 成本计算税费
+                if ("0".equals(product.getIncludedTax()) && null != product.getSupplierTaxRate() && product.getSupplierTaxRate() > 0d) {
+                    costPrice = MathUtil.add(costPrice, MathUtil.div(MathUtil.mul(costPrice, product.getSupplierTaxRate()), 100)).doubleValue();
+                }
+                // product.setSingleShouldPayTotalTax(MathUtil.div(MathUtil.mul(MathUtil.div(product.getCostPrice(), MathUtil.div(MathUtil.add(product.getTaxRate(), 100),100)), product.getSupplierTaxRate()), 100).doubleValue());
+                Double singleShouldPayTotalTax = product.getSingleShouldPayTotalTax() == null ? 0d : product.getSingleShouldPayTotalTax();
+                Double supplierTaxRate = product.getSupplierTaxRate() == null ? 0d : product.getSupplierTaxRate();
+                // 获取已被退款的商品数量
+                Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(Integer.parseInt(shopOrderID), orderProductID);
+                returnNum = returnNum == null ? 0 : returnNum;
+                NewOrderProduct orderProduct = newOrderProductService.get(String.valueOf(orderProductID));
+                // 修改前
+                if (StringUtils.isEmpty(dbcostType)) {
+                    CmChangePayShopProduct cmChangePayShopProduct = new CmChangePayShopProduct();
+                    cmChangePayShopProduct.setRecondType("1");
+                    cmChangePayShopProduct.setChangeType("1");
+                    cmChangePayShopProduct.setChangePayShopId(Integer.parseInt(cmChangePayShopRecondId));
+                    cmChangePayShopProduct.setOrderProductId(orderProductID);
+                    cmChangePayShopProduct.setOrderProductName(product.getName());
+                    // 同步使用机构税率 作为供应商税率
+                    cmChangePayShopProduct.setSupplierTaxRate(product.getTaxRate());
+                    cmChangePayShopProduct.setCostPrice(orderProduct.getNewCostPrice());
+                    cmChangePayShopProduct.setOrganizeCostPrice(orderProduct.getOrganizeCostPrice());
+                    cmChangePayShopProduct.setCmCostPrice(orderProduct.getCmCostPrice());
+                    cmChangePayShopProduct.setSingleShouldPayTotalTax(orderProduct.getSingleShouldPayTotalTax());
+                    cmChangePayShopProductService.save(cmChangePayShopProduct);
+                }
+
+                orderProduct.setCostPrice(costPrice);
+                orderProduct.setOrganizeCostPrice(organizeCostPrice);
+                orderProduct.setCmCostPrice(cmCostPrice);
+                // 同步使用机构税率 作为供应商税率
+                orderProduct.setSupplierTaxRate(supplierTaxRate);
+                orderProduct.setTaxRate(product.getTaxRate());
+                orderProduct.setSingleShouldPayTotalTax(singleShouldPayTotalTax);
+                orderProducts.add(orderProduct);
+                int num = orderProduct.getNum() == null ? 0 : orderProduct.getNum();
+                int presentNum = orderProduct.getPresentNum() == null ? 0 : orderProduct.getPresentNum();
+                totalCostFee += (num + presentNum - returnNum) * costPrice;
+                orderProduct.setShouldPayTotalTax(singleShouldPayTotalTax * (num + presentNum - returnNum));
+                totalTaxesFee += singleShouldPayTotalTax * (num + presentNum - returnNum);
+                // 修改后
                 CmChangePayShopProduct cmChangePayShopProduct = new CmChangePayShopProduct();
-                cmChangePayShopProduct.setRecondType("1");
-                cmChangePayShopProduct.setChangeType("1");
-                cmChangePayShopProduct.setChangePayShopId(Integer.parseInt(cmChangePayShopRecondId));
+                cmChangePayShopProduct.setRecondType("2");
+                cmChangePayShopProduct.setChangeType(costType);
+                cmChangePayShopProduct.setChangePayShopId(Integer.parseInt(cmChangePayShopRecondId2));
                 cmChangePayShopProduct.setOrderProductId(orderProductID);
                 cmChangePayShopProduct.setOrderProductName(product.getName());
-                // 同步使用机构税率 作为供应商税率
-                cmChangePayShopProduct.setSupplierTaxRate(product.getTaxRate());
-                cmChangePayShopProduct.setCostPrice(orderProduct.getNewCostPrice());
-                cmChangePayShopProduct.setSingleShouldPayTotalTax(orderProduct.getSingleShouldPayTotalTax());
+                cmChangePayShopProduct.setSupplierTaxRate(supplierTaxRate);
+                cmChangePayShopProduct.setCostPrice(product.getCostPrice());
+                cmChangePayShopProduct.setOrganizeCostPrice(product.getOrganizeCostPrice());
+                cmChangePayShopProduct.setCmCostPrice(product.getCmCostPrice());
+                cmChangePayShopProduct.setSingleShouldPayTotalTax(product.getSingleShouldPayTotalTax());
                 cmChangePayShopProductService.save(cmChangePayShopProduct);
             }
-
-            orderProduct.setCostPrice(costPrice);
-            orderProduct.setOrganizeCostPrice(organizeCostPrice);
-            orderProduct.setCmCostPrice(cmCostPrice);
-            // 同步使用机构税率 作为供应商税率
-            orderProduct.setSupplierTaxRate(supplierTaxRate);
-            orderProduct.setTaxRate(product.getTaxRate());
-            orderProduct.setSingleShouldPayTotalTax(singleShouldPayTotalTax);
-            orderProducts.add(orderProduct);
-            int num = orderProduct.getNum() == null ? 0 : orderProduct.getNum();
-            int presentNum = orderProduct.getPresentNum() == null ? 0 : orderProduct.getPresentNum();
-            totalCostFee += (num + presentNum - returnNum) * costPrice;
-            orderProduct.setShouldPayTotalTax(singleShouldPayTotalTax * (num + presentNum - returnNum));
-            totalTaxesFee += singleShouldPayTotalTax * (num + presentNum - returnNum);
-            // 修改后
-            CmChangePayShopProduct cmChangePayShopProduct = new CmChangePayShopProduct();
-            cmChangePayShopProduct.setRecondType("2");
-            cmChangePayShopProduct.setChangeType(costType);
-            cmChangePayShopProduct.setChangePayShopId(Integer.parseInt(cmChangePayShopRecondId2));
-            cmChangePayShopProduct.setOrderProductId(orderProductID);
-            cmChangePayShopProduct.setOrderProductName(product.getName());
-            cmChangePayShopProduct.setSupplierTaxRate(supplierTaxRate);
-            cmChangePayShopProduct.setCostPrice(product.getCostPrice());
-            cmChangePayShopProduct.setSingleShouldPayTotalTax(product.getSingleShouldPayTotalTax());
-            cmChangePayShopProductService.save(cmChangePayShopProduct);
-        }
-        //总税费
-        shopOrder.setShopTaxFee(totalTaxesFee);
-        //商品费
-        shopOrder.setShopProductAmount(totalCostFee);
+            //总税费
+            shopOrder.setShopTaxFee(totalTaxesFee);
+            //商品费
+            shopOrder.setShopProductAmount(totalCostFee);
         //}
         // 比例成本
         /*if ("2".equals(costType)) {
@@ -482,40 +488,40 @@ public class CmPayShopController extends BaseController {
         }*/
         shopOrder.setPayStatus(soZeroCostFlag ? "3" : "1");
         shopOrder.setZeroCostFlag(soZeroCostFlag ? 1 : 0);
-//        //当子订单0成本时,若主订单中其他子订单(除了运费子订单)都为0成本,设主订单为已付款,否则设为部分付款
-//        NewOrder newOrder = newOrderService.get(shopOrder.getOrderID().toString());
-//        if (soZeroCostFlag) {
-//            AtomicReference<Boolean> zeroCostFlag = new AtomicReference<>(true);
-//            AtomicReference<Boolean> freightFlag = new AtomicReference<>(false);
-//            newOrder.getNewShopOrders().forEach(item -> {
-//                if (item.getShopID().equals(998)) {
-//                    freightFlag.set(true);
-//                } else if (!item.getShopOrderID().equals(shopOrder.getShopOrderID()) && 0 == item.getZeroCostFlag()) {
-//                    zeroCostFlag.set(false);
-//                }
-//            });
-//            //如果含有运费子订单且其他子订单都为0成本,将运费子订单置为已付款
-//            if (freightFlag.get() && zeroCostFlag.get()) {
-//                newOrder.getNewShopOrders().forEach(item -> {
-//                    if (item.getShopID().equals(998)) {
-//                        item.setPayStatus("3");
-//                        //更新运费子订单
-//                        newShopOrderService.updatePayStatus(item);
-//                        cmPayShopService.payFreightShopOrder(item);
-//
-//                    }
-//                });
-//            }
-//            if (zeroCostFlag.get()) {
-//                newOrder.setPayStatus("3");
-//                newOrder.setZeroCostFlag(1);
-//            } else {
-//                newOrder.setPayStatus("2");
-//                newOrder.setZeroCostFlag(0);
-//            }
-//            newOrderService.updatePayStatus(newOrder);
-//        }
-        shopOrder.setSupplierFreight(freight); //运费
+        //当子订单0成本时,若主订单中其他子订单(除了运费子订单)都为0成本,设主订单为已付款,否则设为部分付款
+        NewOrder newOrder = newOrderService.get(shopOrder.getOrderID().toString());
+        if (soZeroCostFlag) {
+            AtomicReference<Boolean> zeroCostFlag = new AtomicReference<>(true);
+            AtomicReference<Boolean> freightFlag = new AtomicReference<>(false);
+            newOrder.getNewShopOrders().forEach(item -> {
+                if (item.getShopID().equals(998)) {
+                    freightFlag.set(true);
+                } else if (!item.getShopOrderID().equals(shopOrder.getShopOrderID()) && 0 == item.getZeroCostFlag()) {
+                    zeroCostFlag.set(false);
+                }
+            });
+            //如果含有运费子订单且其他子订单都为0成本,将运费子订单置为已付款
+            if (freightFlag.get() && zeroCostFlag.get()) {
+                newOrder.getNewShopOrders().forEach(item -> {
+                    if (item.getShopID().equals(998)) {
+                        item.setPayStatus("3");
+                        //更新运费子订单
+                        newShopOrderService.updatePayStatus(item);
+                        cmPayShopService.payFreightShopOrder(item);
+
+                    }
+                });
+            }
+            if (zeroCostFlag.get()) {
+                newOrder.setPayStatus("3");
+                newOrder.setZeroCostFlag(1);
+            } else {
+                newOrder.setPayStatus("2");
+                newOrder.setZeroCostFlag(0);
+            }
+            newOrderService.updatePayStatus(newOrder);
+        }
+        shopOrder.setShopPostFee(freight); //运费
         shopOrder.setShopOtherFee(thirdPartyFee); //付第三方
         shopOrder.setCostType(costType);
         shopOrder.setModifyShouldPayNote(modifyShouldPayNote);  //备注
@@ -526,7 +532,7 @@ public class CmPayShopController extends BaseController {
             shopOrder.setPayStatus("3");
         }
         // 付供应商 - 优惠券 - 促销满减优惠
-        shopOrder.setShouldPayShopAmount(MathUtil.sub(shouldPayShopAmount, MathUtil.add(shopOrder.getCouponAmount(), shopOrder.getPromotionFullReduction())).doubleValue());
+        shopOrder.setShouldPayShopAmount(MathUtil.sub(shouldPayShopAmount , MathUtil.add(shopOrder.getCouponAmount(), shopOrder.getPromotionFullReduction())).doubleValue());
         newShopOrderService.modifyPayShopAmount(shopOrder, orderProducts);
         return "redirect:" + Global.getAdminPath() + "/shopOrder/payOrderList";
     }

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

@@ -697,6 +697,7 @@ public class ProductService extends CrudService<ProductDao, Product> {
         Integer costCheckFlag = productDao.getCostCheckFlag(productID, 4);
         skuOrganizeList.forEach(o -> {
             o.setCostCheckFlag(costCheckFlag);
+            o.ladderPriceList(productDao.findLadderPriceBySku(o.skuId()));
         });
         return skuOrganizeList;
     }

+ 1 - 1
src/main/java/com/caimei/modules/user/web/CmReportingClubController.java

@@ -206,6 +206,6 @@ public class CmReportingClubController extends BaseController
                 .splitSettleTime(new Date())
         );
         addMessage(redirectAttributes, "结算成功");
-        return "redirect:" + Global.getAdminPath() + "/user/reporting/settleClubList?parentId=" + parentId + "&payWay=" + cmReportingClub.payWay();
+        return "redirect:" + Global.getAdminPath() + "/user/reporting/settleClubList?parentIds=" + parentId + "&payWay=" + cmReportingClub.payWay();
     }
 }

+ 3 - 0
src/main/java/com/caimei/modules/user/web/NewCmShopController.java

@@ -103,7 +103,10 @@ public class NewCmShopController extends BaseController {
         //屏蔽特殊供应商
         newCmShop.setShopType(1);
         Page<NewCmShop> page = newCmShopService.findPage(new Page<NewCmShop>(request, response), newCmShop);
+        // 获取www配置跳转登录
+        String wwwServer = Global.getConfig("wwwServer");
         model.addAttribute("page", page);
+        model.addAttribute("wwwServer", wwwServer);
         return "modules/user/newCmShopList";
     }
 

+ 1 - 1
src/main/resources/config/beta/caimei.properties

@@ -135,7 +135,7 @@ userfiles.basedir=/mnt/newdatadrive/nfs_client/
 photoServer=https\://img-b.caimei365.com/
 server=https\://admin-b.caimei365.com/
 admin2Server=https\://admin2-b.caimei365.com/
-wwwServer=https\://www-b.caimei365.com/
+wwwServer=http\://120.79.25.27:8009/
 bServer=http\://b.caimei365.com/
 
 #CRM\u5730\u5740

+ 8 - 0
src/main/resources/mappings/modules/order/CmChangePayShopProductMapper.xml

@@ -11,6 +11,8 @@
 		a.orderProductName AS "orderProductName",
 		a.supplierTaxRate AS "supplierTaxRate",
 		a.costPrice AS "costPrice",
+		a.organizeCostPrice AS "organizeCostPrice",
+		a.cmCostPrice AS "cmCostPrice",
 		a.singleShouldPayTotalTax AS "singleShouldPayTotalTax",
 		cop.includedTax AS "includedTax",
 		cop.invoiceType AS "invoiceType"
@@ -88,6 +90,8 @@
 			orderProductId,
 			orderProductName,
 			costPrice,
+			organizeCostPrice,
+			cmCostPrice,
 			singleShouldPayTotalTax,
 			supplierTaxRate
 		) VALUES (
@@ -97,6 +101,8 @@
 			#{orderProductId},
 			#{orderProductName},
 			#{costPrice},
+		    #{organizeCostPrice},
+		    #{cmCostPrice},
 			#{singleShouldPayTotalTax},
 			#{supplierTaxRate}
 		)
@@ -110,6 +116,8 @@
 			orderProductId = #{orderProductId},
 			orderProductName = #{orderProductName},
 			costPrice = #{costPrice},
+			organizeCostPrice = #{organizeCostPrice},
+			cmCostPrice = #{cmCostPrice},
 			singleShouldPayTotalTax = #{singleShouldPayTotalTax},
 			supplierTaxRate = #{supplierTaxRate}
 		WHERE id = #{id}

+ 1 - 1
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -82,7 +82,7 @@
     		ifnull(a.shopTaxFee,0) AS shopTaxFee,
     		a.shouldPayShopAmount AS shouldPayShopAmount,
     		a.payedShopAmount AS payedShopAmount,
-    		a.shopOtherFee AS shopOtherFee,
+    		ifnull(a.shopOtherFee, 0) AS shopOtherFee,
     		a.paying AS paying,
     		a.costType AS costType,
             a.settleStatus AS settleStatus,

+ 1 - 0
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -2084,6 +2084,7 @@
                cs.organizeCostPrice,
                cs.cmCostPrice,
                cs.price,
+               cs.ladderPriceFlag,
                cs.minBuyNumber,
                cs.organizePercent,
                cs.shopPercent,

+ 6 - 6
src/main/resources/mappings/modules/user/CmBehaviorRecordMapper.xml

@@ -192,7 +192,7 @@
     </select>
 
     <select id="behaviorAgency" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
-            SELECT
+            (SELECT
             <include refid="behaviorRecord"/>
             ,b.accessDuration,
             u.userIdentity,
@@ -214,9 +214,9 @@
                      LEFT JOIN product p ON b.productID = p.productID
                      LEFT JOIN cm_page_type pt ON b.pageType = pt.id
             WHERE b.IP = #{IP} AND b.accessDate BETWEEN #{startTime} AND #{registerTime}
-            GROUP BY b.pageLabel
+            GROUP BY b.pageLabel, b.recordID)
         UNION
-            SELECT
+            (SELECT
             <include refid="behaviorRecord"/>
             ,b.accessDuration,
             u.userIdentity,
@@ -238,9 +238,9 @@
                      LEFT JOIN product p ON b.productID = p.productID
                      LEFT JOIN cm_page_type pt ON b.pageType = pt.id
             WHERE b.IP = #{IP} AND b.accessDate BETWEEN #{registerTime} AND #{endTime}
-            GROUP BY b.pageLabel
+            GROUP BY b.pageLabel, b.recordID)
         UNION
-            SELECT
+            (SELECT
             <include refid="behaviorRecord"/>
             ,b.accessDuration,
             u.userIdentity,
@@ -262,7 +262,7 @@
                  LEFT JOIN product p ON b.productID = p.productID
                  LEFT JOIN cm_page_type pt ON b.pageType = pt.id
         WHERE c.clubID = #{clubID} AND b.accessDate BETWEEN #{registerTime} AND #{endTime}
-        GROUP BY b.pageLabel
+        GROUP BY b.pageLabel, b.recordID)
         ORDER BY accessTime DESC
     </select>
     <select id="selRegion" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">

+ 38 - 6
src/main/webapp/WEB-INF/views/modules/order/cmPayShopChangeRecond.jsp

@@ -116,7 +116,9 @@
                             <table class="table table-striped table-bordered table-condensed" style="width: 900px">
                                 <tr>
                                     <td>商品名</td>
-                                    <td>成本(单)</td>
+                                    <td>供应商成本(单)</td>
+                                    <td>集团成本(单)</td>
+                                    <td>平台服务费(单)</td>
                                     <td>供应商税率</td>
                                     <td>供应商税费(单)</td>
                                 </tr>
@@ -130,6 +132,20 @@
                                                 </label>
                                             </c:if>
                                         </td>
+                                        <td>${payShopProduct.organizeCostPrice}
+                                            <c:if test="${payShopProduct.includedTax != null and payShopProduct.includedTax != '' and payShopProduct.includedTax ne 2}">
+                                                <label style="color: red">
+                                                    (${payShopProduct.includedTax eq 1?'含税':(payShopProduct.invoiceType eq 1 or payShopProduct.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
+                                                </label>
+                                            </c:if>
+                                        </td>
+                                        <td>${payShopProduct.cmCostPrice}
+                                            <c:if test="${payShopProduct.includedTax != null and payShopProduct.includedTax != '' and payShopProduct.includedTax ne 2}">
+                                                <label style="color: red">
+                                                    (${payShopProduct.includedTax eq 1?'含税':(payShopProduct.invoiceType eq 1 or payShopProduct.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
+                                                </label>
+                                            </c:if>
+                                        </td>
                                         <td>${(payShopProduct.includedTax ne '' and payShopProduct.includedTax eq 0 and payShopProduct.invoiceType eq 3)?'-----':empty payShopProduct.supplierTaxRate?'0%':payShopProduct.supplierTaxRate}</td>
                                         <td>${payShopProduct.includedTax ne '' and ((payShopProduct.includedTax eq 0 and payShopProduct.invoiceType eq 3) or payShopProduct.includedTax eq 1 )?'-----':empty payShopProduct.singleShouldPayTotalTax?'0':payShopProduct.singleShouldPayTotalTax}</td>
                                     </tr>
@@ -139,7 +155,7 @@
                                 <tr>
                                 <lable>供应商运费:<fmt:formatNumber type="number" pattern="0.00" value="${payShopRecond.shopPostFee}"/></lable>
                                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                <%--<lable>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></lable>--%>
+                                <lable>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></lable>
                                 </tr>
                             </table>
                             <br>
@@ -155,9 +171,9 @@
                                 <tr>
                                     <td>供应商运费:<fmt:formatNumber type="number" pattern="0.00" value="${payShopRecond.shopPostFee}"/></td>
                                 </tr>
-                                <%--<tr>
+                                <tr>
                                     <td>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></td>
-                                </tr>--%>
+                                </tr>
                             </table>
                             <br>
                         </c:if>
@@ -189,7 +205,9 @@
                     <table class="table table-striped table-bordered table-condensed" style="width: 900px">
                         <tr>
                             <td>商品名</td>
-                            <td>成本(单)</td>
+                            <td>供应商成本(单)</td>
+                            <td>集团成本(单)</td>
+                            <td>平台服务费(单)</td>
                             <td>供应商税率</td>
                             <td>供应商税费(单)</td>
                         </tr>
@@ -203,6 +221,20 @@
                                         </label>
                                     </c:if>
                                 </td>
+                                <td>${payShopProduct.organizeCostPrice}
+                                    <c:if test="${payShopProduct.includedTax != null and payShopProduct.includedTax != '' and payShopProduct.includedTax ne 2}">
+                                        <label style="color: red">
+                                            (${payShopProduct.includedTax eq 1?'含税':(payShopProduct.invoiceType eq 1 or payShopProduct.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
+                                        </label>
+                                    </c:if>
+                                </td>
+                                <td>${payShopProduct.cmCostPrice}
+                                    <c:if test="${payShopProduct.includedTax != null and payShopProduct.includedTax != '' and payShopProduct.includedTax ne 2}">
+                                        <label style="color: red">
+                                            (${payShopProduct.includedTax eq 1?'含税':(payShopProduct.invoiceType eq 1 or payShopProduct.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
+                                        </label>
+                                    </c:if>
+                                </td>
                                 <td>${(payShopProduct.includedTax ne '' and payShopProduct.includedTax eq 0 and payShopProduct.invoiceType eq 3)?'-----':empty payShopProduct.supplierTaxRate?'0%':payShopProduct.supplierTaxRate}</td>
                                 <td>${payShopProduct.includedTax ne '' and ((payShopProduct.includedTax eq 0 and payShopProduct.invoiceType eq 3) or payShopProduct.includedTax eq 1 )?'-----':empty payShopProduct.singleShouldPayTotalTax?'0':payShopProduct.singleShouldPayTotalTax}</td>
                             </tr>
@@ -212,7 +244,7 @@
                         <tr>
                         <lable>供应商运费:<fmt:formatNumber type="number" pattern="0.00" value="${payShopRecond.shopPostFee}"/></lable>
                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <%--<lable>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></lable>--%>
+                        <lable>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></lable>
                         </tr>
                     </table>
                 </c:if>

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

@@ -260,7 +260,7 @@
                 </c:if>
                 <c:if test="${order.orderType == 0}">
                     协销订单
-                    <c:if test="${not empty order.spName}">
+                    <c:if test="${not empty order.spName and order.organizeID != 4}">
                         <br>${fns:appendLast1('(',order.spName,')')}
                     </c:if>
                 </c:if>

+ 47 - 17
src/main/webapp/WEB-INF/views/modules/order/shopOrderDetail.jsp

@@ -127,7 +127,7 @@
                 <div class="operation-block ${order.shopOrderID}" style="position: sticky;">
                     <shiro:hasPermission name="order:order:edit">
                         <%--包含订单充值商品就不显示--%>
-                        <c:if test="${order.status == 0}">
+                        <c:if test="${order.status == 0 and order.organizeID != 4}">
                             <a href="${ctx}/order/confirmOrder?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}"
                                onclick="return confirmx('是否确认订单?', this.href)">确认订单</a>
                         </c:if>
@@ -139,7 +139,7 @@
                         <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}">发货记录</a>
                         <a href="${ctx}/bulkpurchase/cmRefundsProduct/toShopOrderRefundRecord.rpc?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}&from=2">收付款记录</a>
                         <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByShopOrder.rpc?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}">退款(退货)记录</a>
-                        <c:if test="${order.status != 4 and order.payStatus eq 1 and order.receiptStatus eq 1 and order.sendOutStatus eq 1}">
+                        <c:if test="${order.status != 4 and order.payStatus eq 1 and order.receiptStatus eq 1 and order.sendOutStatus eq 1 and order.organizeID != 4}">
                             <a href="${ctx}/order/cancelShopOrder?shopOrderId=${order.shopOrderID}"
                                onclick="return confirmx('是否取消订单?', this.href)">取消订单</a>
                         </c:if>
@@ -220,7 +220,7 @@
 <%--    </c:if>--%>
 <%--</div>--%>
 <div class="remarkShow">
-    <b>订单备注<a onclick="openRemarks(${order.orderID},${order.shopOrderID})" style="color: white">展开 《</a></b>
+    <b><a onclick="openRemarks(${order.orderID},${order.shopOrderID})" style="color: white">订单备注展开 《</a></b>
 </div>
 <div class="order-rows">
     <div>
@@ -556,7 +556,12 @@
     </c:if>
     <c:if test="${order.orderInvoice.type eq 1}">
         <%--            <input name="invoice" type="radio" checked="checked">--%>
-        <label>增值税普通发票</label>
+        <c:if test="${order.orderInvoice.invoiceTitleType eq 0}">
+            <label>普票 - 个人</label>
+        </c:if>
+        <c:if test="${order.orderInvoice.invoiceTitleType eq 1}">
+            <label>普票 - 单位</label>
+        </c:if>
     </c:if>
     <c:if test="${order.orderInvoice.type eq 2}">
         <%--            <input name="invoice" type="radio" checked="checked">--%>
@@ -569,19 +574,20 @@
     <c:if test="${order.orderInvoice.type == 1}">
         <br>
         <div>
-                    <span>
-                        <c:if test="${order.orderInvoice.invoiceTitleType eq 0}">
-                            个人抬头:
-                            <span>${order.orderInvoice.invoiceTitle}</span>
-                        </c:if>
-                        <c:if test="${order.orderInvoice.invoiceTitleType eq 1}">
-                            企业抬头:
-                            <span>${order.orderInvoice.invoiceTitle}</span>
-                            &nbsp;&nbsp;&nbsp;&nbsp;
-                            纳税人识别号:
-                            <span>${order.orderInvoice.corporationTaxNum}</span>
-                        </c:if>
-                    </span>
+            <span> 发票抬头: ${order.orderInvoice.invoiceTitle} </span>
+            <c:if test="${order.orderInvoice.invoiceTitleType eq 1}">
+                <span>单位税号:${order.orderInvoice.corporationTaxNum}</span>
+                <table>
+                    <tr>
+                        <td><span>注册地址:${order.orderInvoice.registeredAddress}</span></td>
+                        <td><span>注册电话:${order.orderInvoice.registeredPhone}</span></td>
+                    </tr>
+                    <tr>
+                        <td><span>开户银行:${empty order.orderInvoice.openBank ? '无' : order.orderInvoice.openBank }</span></td>
+                        <td><span>银行账号:${empty order.orderInvoice.bankAccountNo ? '无' : order.orderInvoice.bankAccountNo }</span></td>
+                    </tr>
+                </table>
+            </c:if>
         </div>
     </c:if>
     <c:if test="${order.orderInvoice.type == 2}">
@@ -619,6 +625,30 @@
         </c:forEach>
     </div>
 </c:if>
+<c:if test="${ order.voucherVo ne null }">
+    <div class="order-rows">
+
+        <label>线下支付凭证:</label>
+        <c:forEach items="${order.voucherVo}" var="voucher">
+            <div>
+                <p><fmt:formatDate value="${voucher.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></p>
+                <c:if test="${voucher.images ne null  }">
+                    <div>
+                        <c:forEach items="${voucher.images}" var="items" varStatus="index">
+                            <c:if test="${items.image ne null  }">
+                                <a href="${items.image}" target="_blank">
+                                    <img class="supplier-img" src="${items.image}"
+                                         style="width: 120px;height: 120px"/>
+                                </a>
+                            </c:if>
+                        </c:forEach>
+                    </div>
+                </c:if>
+                <p>备注: ${voucher.remarks}</p>
+            </div>
+        </c:forEach>
+    </div>
+</c:if>
 <%-- 订单备注抽屉 --%>
 <%--<div class="remarks-drawer-content">--%>
 <%--    <div class="drawer-btn-main">--%>

+ 13 - 13
src/main/webapp/WEB-INF/views/modules/user/cmDistributionMemberSettleList.jsp

@@ -71,7 +71,7 @@
 <body>
 <ul class="nav nav-tabs">
 		<li ><a href="${ctx}/user/distribution/settleList?parentId=0">分销订单佣金</a></li>
-		<li class="active"><a href="${ctx}/user/reporting/settleClubList?parentId=${cmReportingClub.parentIds}&payWay=${cmReportingClub.payWay}">佣金明细</a></li>
+		<li class="active"><a href="${ctx}/user/reporting/settleClubList?parentIds=${cmReportingClub.parentIds}&payWay=${cmReportingClub.payWay}">佣金明细</a></li>
 </ul>
 <ul class="livelyProportion">
 	<li>
@@ -125,21 +125,21 @@
 	</tr>
 	</thead>
 	<tbody>
-	<c:forEach items="${page.list}" var="cmReportingClub" varStatus="status">
+	<c:forEach items="${page.list}" var="item" varStatus="status">
 		<tr>
-			<td>${cmReportingClub.distributionName}</td>
-			<td>${cmReportingClub.distributionMobile}</td>
-			<td>${cmReportingClub.orderId}</td>
-			<td>${cmReportingClub.organizeCostPrice}</td>
-			<td>${cmReportingClub.splitSettleStatus eq null?'----':cmReportingClub.splitSettleStatus==0?'待确认':cmReportingClub.splitSettleStatus==1?'待手动分账':cmReportingClub.splitSettleStatus==2?'待手动结算':'已结算'}</td>
-			<td><fmt:formatDate value="${cmReportingClub.orderTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
-			<td>${cmReportingClub.splitSettleTime eq null?'----':''}<c:if test="${cmReportingClub.splitSettleTime ne null}"><fmt:formatDate value="${cmReportingClub.splitSettleTime}" pattern="yyyy-MM-dd HH:mm:ss"/></c:if></td>
+			<td>${item.distributionName}</td>
+			<td>${item.distributionMobile}</td>
+			<td>${item.orderId}</td>
+			<td>${item.organizeCostPrice}</td>
+			<td>${item.splitSettleStatus eq null?'----':item.splitSettleStatus==0?'待确认':item.splitSettleStatus==1?'待手动分账':item.splitSettleStatus==2?'待手动结算':'已结算'}</td>
+			<td><fmt:formatDate value="${item.orderTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+			<td>${item.splitSettleTime eq null?'----':''}<c:if test="${item.splitSettleTime ne null}"><fmt:formatDate value="${item.splitSettleTime}" pattern="yyyy-MM-dd HH:mm:ss"/></c:if></td>
 			<td>
-				<c:if test="${cmReportingClub.payWay==2&&cmReportingClub.splitSettleStatus==2}">
-				<a href="${ctx}/user/reporting/splitSettleStatus?id=${cmReportingClub.id}&parentId=${cmDistribution.parentId}&payWay=${cmReportingClub.payWay}">结算</a>
+				<c:if test="${item.payWay==2&&item.splitSettleStatus==2}">
+				<a href="${ctx}/user/reporting/splitSettleStatus?id=${item.id}&parentId=${cmReportingClub.parentIds}&payWay=${item.payWay}">结算</a>
 				</c:if>
-				<a href="${ctx}/user/reporting/settleClubFrom?id=${cmReportingClub.id}">查看详情</a>
-				<a href="${ctx}/order/detail?id=${cmReportingClub.orderId}">查看订单</a>
+				<a href="${ctx}/user/reporting/settleClubFrom?id=${item.id}">查看详情</a>
+				<a href="${ctx}/order/detail?id=${item.orderId}">查看订单</a>
 			</td>
 		</tr>
 	</c:forEach>

+ 22 - 14
src/main/webapp/WEB-INF/views/modules/user/newCmShopList.jsp

@@ -300,19 +300,22 @@
 			<td>
 					${newCmShop.auditTime}
 			</td>
-			<shiro:hasPermission name="user:newCmShop:edit"><td>
-				<a href="${ctx}/user/newCmShop/form?id=${newCmShop.shopID}&editStatus=1">编辑</a>
-				<c:if test="${newCmShop.status eq 3 || newCmShop.status eq 92}">
-					<%--						<a href="${ctx}/user/newCmShop/form?id=${newCmShop.shopID}&editStatus=2">审核</a>--%>
-					<a href="javascript:void(0)"  onclick="auditShop(${newCmShop.shopID},${newCmShop.userID},'${newCmShop.townID}','${newCmShop.address}','${newCmShop.name}','${newCmShop.linkMan}','${newCmShop.contractMobile}')"> 审核</a>
-				</c:if>
-				<c:if test="${newCmShop.status eq 90 || newCmShop.status eq 91 }">
-					<a href="javascript:void(0);" onclick="updatePwd(${newCmShop.userID})">重置密码</a>
-				</c:if>
-				<a href="${ctx}/user/newCmShop/viewOperationUser?shopID=${newCmShop.shopID}&userID=${newCmShop.userID}&name=${newCmShop.name}">查看运营人员</a>
-				<a href="${ctx}/user/newCmShop/maintenanceList?shopID=${newCmShop.shopID}&shopName=${newCmShop.name}">上架费记录</a>
-				<a href="${ctx}/user/newCmShop/formShop?shopID=${newCmShop.shopID}">线下转账信息</a>
-			</td></shiro:hasPermission>
+			<shiro:hasPermission name="user:newCmShop:edit">
+				<td>
+					<a href="${ctx}/user/newCmShop/form?id=${newCmShop.shopID}&editStatus=1">编辑</a>
+					<c:if test="${newCmShop.status eq 3 || newCmShop.status eq 92}">
+						<%--						<a href="${ctx}/user/newCmShop/form?id=${newCmShop.shopID}&editStatus=2">审核</a>--%>
+						<a href="javascript:void(0)"  onclick="auditShop(${newCmShop.shopID},${newCmShop.userID},'${newCmShop.townID}','${newCmShop.address}','${newCmShop.name}','${newCmShop.linkMan}','${newCmShop.contractMobile}')"> 审核</a>
+					</c:if>
+					<c:if test="${newCmShop.status eq 90 || newCmShop.status eq 91 }">
+						<a href="javascript:void(0);" onclick="updatePwd(${newCmShop.userID})">重置密码</a>
+					</c:if>
+					<a href="${ctx}/user/newCmShop/viewOperationUser?shopID=${newCmShop.shopID}&userID=${newCmShop.userID}&name=${newCmShop.name}">查看运营人员</a>
+					<a href="${ctx}/user/newCmShop/maintenanceList?shopID=${newCmShop.shopID}&shopName=${newCmShop.name}">上架费记录</a>
+					<a href="${ctx}/user/newCmShop/formShop?shopID=${newCmShop.shopID}">线下转账信息</a>
+					<a href="javascript:void(0)" onclick="empowerLogin(${newCmShop.userID})">授权登录</a>
+				</td>
+			</shiro:hasPermission>
 		</tr>
 	</c:forEach>
 	</tbody>
@@ -839,7 +842,12 @@
 			$("#auditNopass").hide();
 		}
 	});
-
+	// 授权登录
+	function empowerLogin(userId) {
+		var wwwServer = "${wwwServer}";
+		console.log(userId);
+		window.open(wwwServer + "login-fast.html?userId=" + userId, "_blank");
+	}
 </script>
 </body>
 </html>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/weisha/cmMallOrganizeList.jsp

@@ -119,7 +119,7 @@
 <%--						<a href="${ctx}/weisha/cmOrganizeBuyer?organizeId=${cmUserOrganize.id}">采购员</a>--%>
 						<a href="${ctx}/weisha/cmOrganizeStore/list?organizeId=${cmUserOrganize.id}">机构列表</a>
 <%--						<a href="${ctx}/weisha/cmOrganizeProduct/list?organizeId=${cmUserOrganize.id}">商品列表</a>--%>
-						<a href="${ctx}/weisha/cmMallOrganize/procure?organizeId=${cmUserOrganize.id}">采购员列表</a>
+						<%--<a href="${ctx}/weisha/cmMallOrganize/procure?organizeId=${cmUserOrganize.id}">采购员列表</a>--%>
 						<a href="${ctx}/weisha/cmMallUser/getMallUser?organizeId=${cmUserOrganize.id}">后台用户</a>
 <%--						<a href="${ctx}/weisha/cmOrganizePromotions/list?organizeId=${cmUserOrganize.id}&type=1">促销活动</a>--%>
 					</td>

+ 3 - 0
src/main/webapp/static/modules/cmClubPortrait/cmClubPortrait.css

@@ -59,6 +59,9 @@
     color: #FFFFFF;
     float: left;
     text-align: center;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
 }
 .flex-header-main .flex-header-td.last{
     width: 36%;