huangzhiguo 1 éve
szülő
commit
f9ba11a3b9

+ 14 - 7
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -287,15 +287,18 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                     p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
                     p.setNewCostPrice(newCostPrice);*/
 
-                   /* p.setOldDiscountPrice(p.getDiscountPrice());
-                    if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
+                    p.setOldDiscountPrice(p.getDiscountPrice());
+                    /*if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
                         p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
                     }*/
                     // 付采美总金额
                     allServeAmount = MathUtil.add(allServeAmount, MathUtil.mul(p.getNum(), p.getCmCostPrice())).doubleValue();
                     // 子订单利润
-
-                    brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(),p.getNum())).doubleValue();
+                    if (p.getProductType() == 0) {
+                        brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), p.getNum())).doubleValue();
+                    } else {
+                        brokerage = MathUtil.add(brokerage, 0).doubleValue();
+                    }
                 }
                 so.setBrokerage(brokerage);
                 so.setAllServeAmount(allServeAmount);
@@ -443,13 +446,17 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                     newCostPrice = p.getCostPrice();
                     p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
                     p.setNewCostPrice(newCostPrice);*/
-                    /*p.setOldDiscountPrice(p.getDiscountPrice());
-                    if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
+                    p.setOldDiscountPrice(p.getDiscountPrice());
+                    /*if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
                         p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
                     }*/
                     // 付采美总金额
                     allServeAmount = MathUtil.add(allServeAmount, MathUtil.mul(p.getNum(), p.getCmCostPrice())).doubleValue();
-                    brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(),p.getNum())).doubleValue();
+                    if (p.getProductType() == 0) {
+                        brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), p.getNum())).doubleValue();
+                    } else {
+                        brokerage = MathUtil.add(brokerage, 0).doubleValue();
+                    }
                 }
                 so.setBrokerage(brokerage);
                 so.setAllServeAmount(allServeAmount);

+ 16 - 0
src/main/java/com/caimei/modules/order/service/CmRefundShopService.java

@@ -180,11 +180,19 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
                  1. 若发生退货,数量要减去已退货和已取消的数量
                  2. 有赠品的商品只能全退
                  */
+                Double brokerage = 0d;
                 for (NewOrderProduct p : orderProductList) {
                     Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
                     returnNum = returnNum == null ? 0 : returnNum;
                     p.setReturnedNum(returnNum);
+                    // 子订单利润
+                    if (p.getProductType() == 0) {
+                        brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), p.getNum())).doubleValue();
+                    } else {
+                        brokerage = MathUtil.add(brokerage, 0).doubleValue();
+                    }
                 }
+                so.setBrokerage(brokerage);
                 so.setNewOrderProducts(orderProductList);
                 //主订单退款(退货)总金额
                 so.setReturnedPurchaseTotalFee(newShopOrderService.getOrderReturnedPurchaseFee(so));
@@ -247,11 +255,19 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
                  1. 若发生退货,数量要减去已退货和已取消的数量
                  2. 有赠品的商品只能全退
                  */
+                Double brokerage = 0d;
                 for (NewOrderProduct p : orderProductList) {
                     Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
                     returnNum = returnNum == null ? 0 : returnNum;
                     p.setReturnedNum(returnNum);
+                    // 子订单利润
+                    if (p.getProductType() == 0) {
+                        brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), p.getNum())).doubleValue();
+                    } else {
+                        brokerage = MathUtil.add(brokerage, 0).doubleValue();
+                    }
                 }
+                so.setBrokerage(brokerage);
                 so.setNewOrderProducts(orderProductList);
                 so.setRefundAmount(record.getRefundAmount());
                 //主订单退款(退货)总金额

+ 3 - 16
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -1341,23 +1341,10 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                         }
                     }
                     //拼接运费
-                    Double ColdChina = newShopOrderDao.getFreightAmount(7578);
                     String shopPostFlag = shopOrder.getShopPostFlag()!=null?shopOrder.getShopPostFlag():"0";
                     String PostageInfo = null;
-                    if (null != shopOrder.getIsColdChina() && shopOrder.getIsColdChina() == 1) {
-                        if ("2" == shopOrder.getShopPostFlag()) {
-                            // 到付
-                            PostageInfo = "¥" + ColdChina + "(" + (shopOrder.getIsColdChina() == 1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 到付)";
-                        } else if ("0" == shopOrder.getShopPostFlag()) {
-                            // 包邮
-                            PostageInfo = "¥" + ColdChina + "(" + (shopOrder.getIsColdChina() == 1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 包邮)";
-                        } else {
-                            // 有运费
-                            PostageInfo = "¥" + shopOrder.getShopPostFee() + "(" + (shopOrder.getIsColdChina() == 1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: ¥" + MathUtil.sub(shopOrder.getShopPostFee(), ColdChina).doubleValue() + ")";
-                        }
-                    } else {
-                        PostageInfo = shopPostFlag.equals("2") ? "到付" : shopPostFlag.equals("0") ? "包邮" : "¥" + shopOrder.getShopPostFee();
-                    }
+
+                    PostageInfo = shopPostFlag.equals("2") ? "到付" : shopPostFlag.equals("0") ? "包邮" : "¥" + shopOrder.getShopPostFee();
 
                     //支付凭证
                     List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(shopOrder.getShopOrderID() );
@@ -2493,7 +2480,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
     }
 
     /**
-     * 判断是否是游客
+     * 判断是否是游客b
      *
      * @param userId
      * @return

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

@@ -365,8 +365,8 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
                 newCostPrice = p.getCostPrice();
                 p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
                 p.setNewCostPrice(newCostPrice);*/
-                /*p.setOldDiscountPrice(p.getDiscountPrice());
-                if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
+                p.setOldDiscountPrice(p.getDiscountPrice());
+                /*if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
                     p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
                 }*/
             }

+ 16 - 6
src/main/webapp/WEB-INF/views/modules/order/cmPayShopCheck.jsp

@@ -544,13 +544,23 @@
                         <td><fmt:formatNumber
                                 value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
                                 type="number" pattern="#,##0.00"/></td>
-                        <td><fmt:formatNumber
-                                value="${p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice}"
-                                pattern="#,##0.00"/></td>
+                        <td>
+                            <c:if test="${p.productType == 0}">
+                                <fmt:formatNumber value="${p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)}" pattern="#,##0.00"/>
+                            </c:if>
+                            <c:if test="${p.productType != 0}">
+                                0.00
+                            </c:if>
+                        </td>
 
-                        <td class="payCm"><fmt:formatNumber
-                                value="${(p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice) * (p.num + p.presentNum - p.returnedNum)}"
-                                pattern="#,##0.00"/></td>
+                        <td class="payCm">
+                            <c:if test="${p.productType == 0}">
+                                <fmt:formatNumber value="${(p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/>
+                            </c:if>
+                            <c:if test="${p.productType != 0}">
+                                0.00
+                            </c:if>
+                        </td>
 
                         <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
                         <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>

+ 16 - 6
src/main/webapp/WEB-INF/views/modules/order/cmPayShopDetail.jsp

@@ -593,13 +593,23 @@
                             <td colspan="2"><fmt:formatNumber
                                     value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
                                     type="number" pattern="#,##0.00"/></td>
-                            <td><fmt:formatNumber
-                                    value="${p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice}"
-                                    pattern="#,##0.00"/></td>
+                            <td>
+                                <c:if test="${p.productType == 0}">
+                                    <fmt:formatNumber value="${p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)}" pattern="#,##0.00"/>
+                                </c:if>
+                                <c:if test="${p.productType != 0}">
+                                    0.00
+                                </c:if>
+                            </td>
 
-                            <td class="payCm"><fmt:formatNumber
-                                    value="${(p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice) * (p.num + p.presentNum - p.returnedNum)}"
-                                    pattern="#,##0.00"/></td>
+                            <td class="payCm">
+                                <c:if test="${p.productType == 0}">
+                                    <fmt:formatNumber value="${(p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/>
+                                </c:if>
+                                <c:if test="${p.productType != 0}">
+                                    0.00
+                                </c:if>
+                            </td>
                             <td><fmt:formatNumber value="${p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
                             <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
                             <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>

+ 16 - 6
src/main/webapp/WEB-INF/views/modules/order/cmPayShopEdit.jsp

@@ -343,13 +343,23 @@
                             <td colspan="2"><fmt:formatNumber
                                     value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
                                     type="number" pattern="#,##0.00"/></td>
-                            <td><fmt:formatNumber
-                                    value="${p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice}"
-                                    pattern="#,##0.00"/></td>
+                            <td>
+                                <c:if test="${p.productType == 0}">
+                                    <fmt:formatNumber value="${p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)}" pattern="#,##0.00"/>
+                                </c:if>
+                                <c:if test="${p.productType != 0}">
+                                    0.00
+                                </c:if>
+                            </td>
 
-                            <td class="payCm"><fmt:formatNumber
-                                    value="${(p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice) * (p.num + p.presentNum - p.returnedNum)}"
-                                    pattern="#,##0.00"/></td>
+                            <td class="payCm">
+                                <c:if test="${p.productType == 0}">
+                                    <fmt:formatNumber value="${(p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/>
+                                </c:if>
+                                <c:if test="${p.productType != 0}">
+                                    0.00
+                                </c:if>
+                            </td>
                             <td><fmt:formatNumber value="${p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
                             <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
                             <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>

+ 18 - 8
src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp

@@ -652,8 +652,8 @@
                                 <c:if test="${p.presentNum > 0}">(赠:${p.presentNum})</c:if>
                             </td>
                             <td><font color="${p.returnedNum>0?'red':''}">${p.returnedNum}</font></td>
-                            <td colspan="2"><fmt:formatNumber value="${empty p.touchPrice?p.discountPrice:p.touchPrice}"
-                                                              type="number" pattern="#,##0.00"/>
+                            <td colspan="2">
+                                <fmt:formatNumber value="${empty p.touchPrice?p.discountPrice:p.touchPrice}" type="number" pattern="#,##0.00"/>
                                 <c:if test="${p.includedTax != null and p.includedTax != '' and p.includedTax ne 2}">
                                     <label style="color: red">
                                         (${p.includedTax eq 1?'含税':(p.invoiceType eq 1 or p.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
@@ -675,13 +675,23 @@
                             <td colspan="2"><fmt:formatNumber
                                     value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
                                     type="number" pattern="#,##0.00"/></td>
-                            <td><fmt:formatNumber
-                                    value="${p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice}"
-                                    pattern="#,##0.00"/></td>
+                            <td>
+                                <c:if test="${p.productType == 0}">
+                                    <fmt:formatNumber value="${p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)}" pattern="#,##0.00"/>
+                                </c:if>
+                                <c:if test="${p.productType != 0}">
+                                    0.00
+                                </c:if>
+                            </td>
 
-                            <td class="payCm"><fmt:formatNumber
-                                    value="${(p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice) * (p.num + p.presentNum - p.returnedNum)}"
-                                    pattern="#,##0.00"/></td>
+                            <td class="payCm">
+                                <c:if test="${p.productType == 0}">
+                                    <fmt:formatNumber value="${(p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/>
+                                </c:if>
+                                <c:if test="${p.productType != 0}">
+                                    0.00
+                                </c:if>
+                            </td>
                             <td><fmt:formatNumber value="${p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
                             <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
                             <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>

+ 16 - 6
src/main/webapp/WEB-INF/views/modules/order/cmPayShopPrintDetail.jsp

@@ -351,13 +351,23 @@
 								<td colspan="2"><fmt:formatNumber
 										value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
 										type="number" pattern="#,##0.00"/></td>
-								<td><fmt:formatNumber
-										value="${p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice}"
-										pattern="#,##0.00"/></td>
+								<td>
+									<c:if test="${p.productType == 0}">
+										<fmt:formatNumber value="${p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)}" pattern="#,##0.00"/>
+									</c:if>
+									<c:if test="${p.productType != 0}">
+										0.00
+									</c:if>
+								</td>
 
-								<td class="payCm"><fmt:formatNumber
-										value="${(p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice) * (p.num + p.presentNum - p.returnedNum)}"
-										pattern="#,##0.00"/></td>
+								<td class="payCm">
+									<c:if test="${p.productType == 0}">
+										<fmt:formatNumber value="${(p.oldDiscountPrice - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/>
+									</c:if>
+									<c:if test="${p.productType != 0}">
+										0.00
+									</c:if>
+								</td>
 								<td><fmt:formatNumber value="${p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
 								<td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
 								<td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>

+ 23 - 10
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopDetail.jsp

@@ -107,7 +107,10 @@
                             ${cs}<br/>
                         </c:forEach>
                     </td>
-                    <td>${s.income}</td>
+                    <td>
+                        <c:if test="${empty s.brokerage}">0.00</c:if>
+                        <c:if test="${not empty s.brokerage}">${s.brokerage}</c:if>
+                    </td>
                     <td>
                         <label class="clubFreight"  style="display: none">
                             <c:choose>
@@ -198,9 +201,9 @@
                 <tr>
                     <td>${s.shopOrderNo}(${s.shopOrderID})</td>
                     <td colspan="3">${s.shopName}</td>
-                    <td colspan="3" class="payCm-t">子订单佣金</td>
+                    <c:if test="${empty s.brokerage}"><td colspan="3" class="">0.00</td></c:if>
+                    <c:if test="${not empty s.brokerage}"><td colspan="3" class="">${s.brokerage}</td></c:if>
                     <td colspan="3" class="product-fee">${s.shopProductAmount}</td>
-
                     <td class="taxes">
                         <fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/>
                     </td>
@@ -215,7 +218,7 @@
                         <c:if test="${s.payStatus == 3}"><font color="green">已付款</font></c:if>
                     </td>
                     <td colspan="3" class="supplier-fee">
-                        <div>应付:${s.shouldPayShopAmount}, 已付:<span class="payed">${s.payedShopAmount}</span>
+                        <div>应付:${s.shouldPayShopAmount-s.shopOtherFee}, 已付:<span class="payed">${s.payedShopAmount}</span>
                             <c:if test="${s.wipePayment > 0}"><font color="red">(付款抹平¥${s.wipePayment})</font></c:if>
                         </div>
                         <div>退款:${s.refundAmount}</div>
@@ -273,13 +276,23 @@
                         </c:choose></td>
                         <td><fmt:formatNumber value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}" type="number" pattern="#,##0.00"/></td>
 
-                        <td><fmt:formatNumber
-                                value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
-                                pattern="#,##0.00"/></td>
+                        <td>
+                            <c:if test="${p.productType == 0}">
+                                <fmt:formatNumber value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)}" pattern="#,##0.00"/>
+                            </c:if>
+                            <c:if test="${p.productType != 0}">
+                                0.00
+                            </c:if>
+                        </td>
 
-                        <td class="payCm"><fmt:formatNumber
-                                value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
-                                pattern="#,##0.00"/></td>
+                        <td class="payCm">
+                            <c:if test="${p.productType == 0}">
+                                <fmt:formatNumber value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/>
+                            </c:if>
+                            <c:if test="${p.productType != 0}">
+                                0.00
+                            </c:if>
+                        </td>
 
                         <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
                         <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>

+ 22 - 9
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopForm.jsp

@@ -112,7 +112,10 @@
 								${cs}<br/>
 							</c:forEach>
 						</td>
-						<td>${s.income}</td>
+						<td>
+							<c:if test="${empty s.brokerage}">0.00</c:if>
+							<c:if test="${not empty s.brokerage}">${s.brokerage}</c:if>
+						</td>
 						<td>
 							<label class="clubFreight"  style="display: none">
 								<c:choose>
@@ -202,9 +205,9 @@
 					<tr>
 						<td>${s.shopOrderNo}(${s.shopOrderID})</td>
 						<td colspan="3">${s.shopName}</td>
-						<td colspan="3" class="payCm-t">子订单佣金</td>
+						<c:if test="${empty s.brokerage}"><td colspan="3" class="">0.00</td></c:if>
+						<c:if test="${not empty s.brokerage}"><td colspan="3" class="">${s.brokerage}</td></c:if>
 						<td colspan="3" class="product-fee">${s.shopProductAmount}</td>
-
 						<td class="taxes">
 							<fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/>
 						</td>
@@ -280,13 +283,23 @@
 							</c:choose></td>
 							<td><fmt:formatNumber value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}" type="number" pattern="#,##0.00"/></td>
 
-							<td><fmt:formatNumber
-									value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
-									pattern="#,##0.00"/></td>
+							<td>
+								<c:if test="${p.productType == 0}">
+									<fmt:formatNumber value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)}" pattern="#,##0.00"/>
+								</c:if>
+								<c:if test="${p.productType != 0}">
+									0.00
+								</c:if>
+							</td>
 
-							<td class="payCm"><fmt:formatNumber
-									value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
-									pattern="#,##0.00"/></td>
+							<td class="payCm">
+								<c:if test="${p.productType == 0}">
+									<fmt:formatNumber value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) - (p.costPrice + p.cmCostPrice + p.organizeCostPrice)) * (p.num + p.presentNum - p.returnedNum)}" pattern="#,##0.00"/>
+								</c:if>
+								<c:if test="${p.productType != 0}">
+									0.00
+								</c:if>
+							</td>
 
 							<td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
 							<td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>