zhijiezhao 1 gadu atpakaļ
vecāks
revīzija
e8d4f9a22e

+ 1 - 1
src/main/java/com/caimei/modules/order/dao/NewShopOrderDao.java

@@ -90,7 +90,7 @@ public interface NewShopOrderDao extends CrudDao<NewShopOrder> {
 
     void updatePayStatus(@Param("shopOrderID") Integer shopOrderID,@Param("payStatus") String payStatus);
 
-    void updateByShopOtherFee(@Param("shopOtherFee") BigDecimal shopOtherFee, @Param("shopOrderId") Integer shopOrderId);
+    void updateByShopOtherFee(@Param("profit")Double profit,@Param("shopOtherFee") BigDecimal shopOtherFee, @Param("shopOrderId") Integer shopOrderId);
 
     void updateByDifferencePrice(@Param("type") Integer type,@Param("differencePrice") BigDecimal differencePrice, @Param("shopOrderId") Integer shopOrderId);
 

+ 19 - 3
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -427,6 +427,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                 csos = newShopOrderDao.findByShopOrderIDs(ids);
             }
             for (NewShopOrder so : csos) {
+                logger.info("付第三方------------------------》" + so.getCmShopOtherFee());
                 CmPayShopRecord cmPayShopRecord = payRecords.stream().filter(p -> p.getShopOrderID().equals(so.getShopOrderID().toString())).findAny().get();
                 // 供应商已退金额
                 Double collect = 0d;
@@ -843,7 +844,12 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             if (3 == cmPayShop.getPaymentType()) {
                 //已付第三方金额
                 BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
-                newShopOrderDao.updateByShopOtherFee(shopOtherFee, shopOrderId);
+                OtherFeeDto cmProfit = newShopOrderDao.findCmProfit(shopOrderId);
+                Double profit = 0d;
+                if (1 == cmProfit.getCmAccountType()) {
+                    profit = cmProfit.getCmProfit();
+                }
+                newShopOrderDao.updateByShopOtherFee(profit, shopOtherFee, shopOrderId);
             } else if (2 == cmPayShop.getPaymentType()) {
                 NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
                 BigDecimal differencePrice = MathUtil.add(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
@@ -1005,7 +1011,12 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             if (3 == cmPayShop.getPaymentType()) {
                 //撤回付第三方
                 BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
-                newShopOrderDao.updateByShopOtherFee(shopOtherFee, shopOrderId);
+                OtherFeeDto cmProfit = newShopOrderDao.findCmProfit(shopOrderId);
+                Double profit = 0d;
+                if (1 == cmProfit.getCmAccountType()) {
+                    profit = cmProfit.getCmProfit();
+                }
+                newShopOrderDao.updateByShopOtherFee(profit, shopOtherFee, shopOrderId);
             } else if (2 == cmPayShop.getPaymentType()) {
                 NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
                 BigDecimal differencePrice = MathUtil.sub(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
@@ -1095,7 +1106,12 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             status = "1";
             //已付第三方金额
             BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(payShopOther.getShopOrderId());
-            newShopOrderDao.updateByShopOtherFee(MathUtil.add(shopOtherFee, payShopOther.getShopOtherFee()), payShopOther.getShopOrderId());
+            OtherFeeDto cmProfit = newShopOrderDao.findCmProfit(payShopOther.getShopOrderId());
+            Double profit = 0d;
+            if (1 == cmProfit.getCmAccountType()) {
+                profit = cmProfit.getCmProfit();
+            }
+            newShopOrderDao.updateByShopOtherFee(profit, MathUtil.add(shopOtherFee, payShopOther.getShopOtherFee()), payShopOther.getShopOrderId());
         } else {
             payShop.setBankAccountName(payShopOther.getBankAccountName());
             payShop.setBankAccount(payShopOther.getBankAccount());

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

@@ -81,6 +81,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
 
     @Resource
     private NewCmClubDao newCmClubDao;
+
     public NewShopOrder findByShopOrderID(Integer shopOrderID) {
         NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(shopOrderID);
         String PostageInfo = null;
@@ -317,6 +318,9 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
 
     public void setValue(List<NewShopOrder> payOrderList) {
         for (NewShopOrder so : payOrderList) {
+            logger.info("shopOrderId------------------------------>" + so.getShopOrderID()
+                    + "shopOtherFee--------------------------->" + so.getShopOtherFee()
+                    + "cmShopOtherFee------------------>" + so.getCmShopOtherFee());
             Integer onlineFlag = newOrderDao.findOnlinePay(so.getOrderID()) > 0 ? 1 : 0;
             so.setOnlineFlag(onlineFlag);
             //统计该子订单的主的收款金额和收款状态
@@ -391,6 +395,9 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
                 p.setOldDiscountPrice(p.getDiscountPrice());
             }
             so.setBrokerage(allBrokerage);
+            if ("1".equals(so.getRebateOrder())) {
+                lr = lr + so.getShopPostFee() - so.getSupplierFreight();
+            }
             so.setAllServeAmount(lr);
             if (so.getShopPostFee() == null) so.setShopPostFee(0D);
             if (so.getShopTaxFee() == null) so.setShopTaxFee(0D);
@@ -1100,4 +1107,8 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
         page.setList(shopOrders);
         return page;
     }
+
+    public Double findProfit(Integer shopOrderID) {
+        return newShopOrderDao.findCmProfit(shopOrderID).getCmProfit();
+    }
 }

+ 10 - 3
src/main/java/com/caimei/modules/order/web/CmPayShopController.java

@@ -522,7 +522,11 @@ public class CmPayShopController extends BaseController {
 //            }
 //            newOrderService.updatePayStatus(newOrder);
 //        }
-        shopOrder.setRebateFee(newShopOrder.getRebateOrder());
+        if (1 == shopOrder.getCmAccountType()) {
+            // 所有私账订单子订单利润算为付第三方采美中介费
+           shopOrder.setCmShopOtherFee(newShopOrderService.findProfit(shopOrder.getShopOrderID()));
+        }
+        shopOrder.setRebateOrder(newShopOrder.getRebateOrder());
         shopOrder.setSupplierFreight(freight); //运费
         shopOrder.setShopOtherFee(thirdPartyFee); //付第三方
         shopOrder.setCostType(costType);
@@ -628,9 +632,10 @@ public class CmPayShopController extends BaseController {
                             filter(r -> r.getOrderProductID().toString().equals(orderProductID)).findAny();
                     CmReturnedPurchaseProduct b = o.isPresent() ? o.get() : null;
                     int returnNum = 0;
-                    if (b != null)
+                    if (b != null) {
                         returnNum = (b.getActualReturnedNum() == null ? 0 : b.getActualReturnedNum())
                                 + (b.getActualCancelNum() == null ? 0 : b.getActualCancelNum());
+                    }
 
                     NewOrderProduct orderProduct = newOrderProductService.get(orderProductID);
                     orderProduct.setCostPrice(costPrice);
@@ -665,8 +670,9 @@ public class CmPayShopController extends BaseController {
                 res.put("msg", "付供应商的金额不能小于已付款金额");
                 return res;
             } else {
-                if (shopOrder.getPayedShopAmount() != null && shouldPayShopAmount == shopOrder.getPayedShopAmount())
+                if (shopOrder.getPayedShopAmount() != null && shouldPayShopAmount == shopOrder.getPayedShopAmount()) {
                     shopOrder.setPayStatus("3");
+                }
                 shopOrder.setShouldPayShopAmount(shouldPayShopAmount);
             }
             newShopOrderService.modifyPayShopAmount(shopOrder, orderProducts);
@@ -1028,6 +1034,7 @@ public class CmPayShopController extends BaseController {
         OtherFeeDto otherFeeDto = newOrderService.getOtherFeeDto(shopOrderId);
         model.addAttribute("otherFee", otherFeeDto);
         model.addAttribute("brokerage", brokerage);
+        model.addAttribute("shouldPayShopAmount", shopOrder.getShouldPayShopAmount());
         model.addAttribute("payShopOther", payShopOther);
         model.addAttribute("payType", payType);
         return "modules/order/shopOtherFeeForm";

+ 3 - 1
src/main/java/com/caimei/modules/order/web/CmShopOrderController.java

@@ -230,7 +230,9 @@ public class CmShopOrderController extends BaseController {
         BigDecimal payShopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(newShopOrder.getShopOrderID());
         model.addAttribute("payShopOtherFee", payShopOtherFee);
         model.addAttribute("dbCostType", dbCostType);
-        if (StringUtils.isEmpty(dbCostType)) dbCostType = costType;
+        if (StringUtils.isEmpty(dbCostType)) {
+            dbCostType = costType;
+        }
         model.addAttribute("page", page);
         model.addAttribute("shopOrderId", newShopOrder.getShopOrderID());
         if (StringUtils.equals("1", dbCostType) || StringUtils.isEmpty(dbCostType)) {

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

@@ -99,6 +99,9 @@
     <select id="get" resultType="NewShopOrder" useCache="false" flushCache="true">
         select
         <include refid="shopOrderColumns"/>
+            ,ifnull(a.cmAccountType,0) as cmAccountType,
+        ifnull(a.rebateOrder,0) as rebateOrder,
+        ifnull(a.supplierFreight,0) as supplierFreight
         from cm_shop_order a
         left join cm_order co on co.orderID = a.orderID
         where a.shopOrderID = #{shopOrderID}
@@ -548,6 +551,9 @@
             <if test="supplierFreight != null">
                 supplierFreight = #{supplierFreight},
             </if>
+            <if test="cmShopOtherFee != null">
+                cmShopOtherFee = #{cmShopOtherFee},
+            </if>
             <if test="rebateOrder != null">
                 rebateOrder = #{rebateOrder},
             </if>
@@ -746,14 +752,15 @@
     <select id="findPayOrderList" resultType="newShopOrder">
         select<include refid="shopOrderColumns"/>,
         co.payTotalFee AS payTotalFee,
-        a.supplierFreight as supplierFreight,
+        ifnull(a.supplierFreight,0) as supplierFreight,
         ifnull(a.rebateOrder,0) as rebateOrder,
         bou.name AS buyer,
         s.name AS shopName,
         c.name AS clubName,
         a.onlinePayWays,
         ifnull(a.cmAccountType,0) as cmAccountType,
-        cdr.payWay AS payWay
+        cdr.payWay AS payWay,
+        ifnull(a.cmShopOtherFee,0) as cmShopOtherFee
         from cm_shop_order a
         left join cm_pay_shop_record cpsr on a.shopOrderID = cpsr.shopOrderID
         left join bp_order_userinfo bou on bou.orderId = a.orderID
@@ -832,6 +839,8 @@
     <select id="payThirdParties" resultType="newShopOrder">
         select<include refid="shopOrderColumns"/>,
         co.payTotalFee AS payTotalFee,
+        ifnull(a.supplierFreight,0) as supplierFreight,
+        ifnull(a.rebateOrder,0) as rebateOrder,
         bou.name AS buyer,
         s.name AS shopName,
         c.name AS clubName,
@@ -921,8 +930,10 @@
         c.name AS clubName,
         cdr.payWay AS payWay,
         a.onlinePayWays,
+        ifnull(a.supplierFreight,0) as supplierFreight,
         ifnull(a.cmAccountType,0) as cmAccountType,
         ifnull(a.cmShopOtherFee,0) as cmShopOtherFee,
+        ifnull(a.rebateOrder,0) as rebateOrder,
         (select sum((num+presentNum)*cmCostPrice) from cm_order_product where shopOrderId = a.shopOrderId) as
         allServeAmount
         from cm_shop_order a
@@ -1037,6 +1048,8 @@
         select distinct<include refid="shopOrderColumns"/>,
         co.payTotalFee AS payTotalFee,
         co.promotionFullReduction,
+        ifnull(a.cmShopOtherFee,0) as cmShopOtherFee,
+        ifnull(a.cmAccountType,0) as cmAccountType,
         bou.name AS buyer,
         ifnull(a.supplierFreight,0) as supplierFreight,
         ifnull(a.rebateOrder,0) as rebateOrder,
@@ -1241,7 +1254,8 @@
 
     <update id="updateByShopOtherFee">
         UPDATE cm_shop_order
-        SET shopOtherFee = #{shopOtherFee}
+        SET shopOtherFee = #{shopOtherFee},
+            cmShopOtherFee = #{profit}
         WHERE shopOrderID = #{shopOrderId}
     </update>
 
@@ -2550,10 +2564,11 @@
             - SUM(IFNULL(op.costprice, 0) * (IFNULL(op.num, 0) + IFNULL(op.presentNum, 0)))
             - SUM(IFNULL(op.organizeCostPrice, 0) * (IFNULL(op.num, 0) + IFNULL(op.presentNum, 0)))
             - SUM(IFNULL(op.cmCostPrice, 0) * (IFNULL(op.num, 0) + IFNULL(op.presentNum, 0)))
-            - (IFNULL(SUM(acso.shopPostFee +
+            - (IFNULL(SUM(acso.supplierFreight +
             IF(acso.differenceType = 1, acso.differencePrice, 0) -
             IF(acso.differenceType = 2, acso.differencePrice, 0)),
             0))
+            + IFNULL(acso.shopPostFee,0)
             FROM cm_order_product op
             WHERE op.shopOrderId = acso.shopOrderId)) as cmProfit,
            acso.onlinePayWays,

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

@@ -597,7 +597,18 @@
                     </td>
                     <td class="product-freight"><fmt:formatNumber value="${s.shopPostFee}" type="number"
                                                                   pattern="#,##0.00"/></td>
-                    <td colspan="2"><fmt:formatNumber value="${s.shopOtherFee}" type="number" pattern="#,##0.00"/></td>
+                    <td colspan="2">
+                        <fmt:formatNumber value="${s.shopOtherFee + s.cmShopOtherFee}" type="number" pattern="#,##0.00"/>
+                        <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee > 0}">
+                            <font color="red">(采美中介费¥${s.cmShopOtherFee},第三方中介费¥${s.shopOtherFee})</font>
+                        </c:if>
+                        <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee eq 0}">
+                            <font color="red">(第三方中介费¥${s.shopOtherFee})</font>
+                        </c:if>
+                        <c:if test="${s.shopOtherFee eq 0 and s.cmShopOtherFee > 0}">
+                            <font color="red">(采美中介费¥${s.cmShopOtherFee})</font>
+                        </c:if>
+                    </td>
 
                 </tr>
                 <tr>

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

@@ -295,7 +295,7 @@
                 <tr>
                     <td>
                         <b>供应商运费:</b><input type="number" id="shopPostFee" name="supplierFreight"
-                                            onchange="changeShouldPay(this)" value="${newShopOrder.supplierFreight}"
+                                            onchange="changeShouldPay(this)" value="${empty newShopOrder.supplierFreight ? 0 : newShopOrder.supplierFreight}"
                                             style="margin-left: 20px"/>
                     </td>
                     <td>
@@ -308,7 +308,7 @@
                     <td>
                         <font color="red">*</font>
                         是否为返佣订单:
-                        <c:if test="${0 eq newShopOrder.rebateOrder}">
+                        <c:if test="${empty newShopOrder.rebateOrder or 0 eq newShopOrder.rebateOrder}">
                         <form:select path="rebateOrder" class="input-medium">
                             <form:option value="0" label="否"/>
                             <form:option value="1" label="是"/>

+ 15 - 4
src/main/webapp/WEB-INF/views/modules/order/cmPayShopCheck.jsp

@@ -369,16 +369,16 @@
                     </c:if>
                     <td>
                         <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">
-                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount - s.cmShopOtherFee}" type="number"
+                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount}" type="number"
                                               pattern="#,##0.00"/>
                         </c:if>
                         <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount - s.differencePrice - s.cmShopOtherFee}"
+                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount - s.differencePrice}"
                                               type="number"
                                               pattern="#,##0.00"/>
                         </c:if>
                         <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount + s.differencePrice - s.cmShopOtherFee}"
+                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount + s.differencePrice}"
                                               type="number"
                                               pattern="#,##0.00"/>
                         </c:if>
@@ -514,7 +514,18 @@
                                 class="red wipeText">¥0.00</em></span></label>
                     </td>
 
-                    <td colspan="2" class="third-party-fee">${s.shopOtherFee}</td>
+                    <td colspan="2" class="third-party-fee">
+                            ${s.shopOtherFee + s.cmShopOtherFee}
+                        <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee > 0}">
+                            <font color="red">(采美中介费¥${s.cmShopOtherFee},第三方中介费¥${s.shopOtherFee})</font>
+                        </c:if>
+                        <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee eq 0}">
+                            <font color="red">(第三方中介费¥${s.shopOtherFee})</font>
+                        </c:if>
+                        <c:if test="${s.shopOtherFee eq 0 and s.cmShopOtherFee > 0}">
+                            <font color="red">(采美中介费¥${s.cmShopOtherFee})</font>
+                        </c:if>
+                    </td>
                 </tr>
                 <tr>
                     <th>商品名</th>

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

@@ -383,16 +383,16 @@
                     </c:if>
                     <td>
                         <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">
-                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount - s.cmShopOtherFee}" type="number"
+                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount}" type="number"
                                               pattern="#,##0.00"/>
                         </c:if>
                         <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount - s.differencePrice - s.cmShopOtherFee}"
+                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount - s.differencePrice}"
                                               type="number"
                                               pattern="#,##0.00"/>
                         </c:if>
                         <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount + s.differencePrice - s.cmShopOtherFee}"
+                            <fmt:formatNumber value="${s.brokerage + s.allServeAmount + s.differencePrice}"
                                               type="number"
                                               pattern="#,##0.00"/>
                         </c:if>

+ 15 - 4
src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp

@@ -480,16 +480,16 @@
                         </c:if>
                         <td>
                             <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">
-                                <fmt:formatNumber value="${s.brokerage + s.allServeAmount - s.cmShopOtherFee}" type="number"
+                                <fmt:formatNumber value="${s.brokerage + s.allServeAmount}" type="number"
                                                   pattern="#,##0.00"/>
                             </c:if>
                             <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-                                <fmt:formatNumber value="${s.brokerage + s.allServeAmount - s.differencePrice - s.cmShopOtherFee}"
+                                <fmt:formatNumber value="${s.brokerage + s.allServeAmount - s.differencePrice}"
                                                   type="number"
                                                   pattern="#,##0.00"/>
                             </c:if>
                             <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-                                <fmt:formatNumber value="${s.brokerage + s.allServeAmount + s.differencePrice - s.cmShopOtherFee}"
+                                <fmt:formatNumber value="${s.brokerage + s.allServeAmount + s.differencePrice}"
                                                   type="number"
                                                   pattern="#,##0.00"/>
                             </c:if>
@@ -660,7 +660,18 @@
                                     class="red wipeText">¥0.00</em></span></label>
                         </td>
 
-                        <td colspan="2" class="third-party-fee">${s.shopOtherFee}</td>
+                        <td colspan="2" class="third-party-fee">
+                                ${s.shopOtherFee + s.cmShopOtherFee}
+                            <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee > 0}">
+                                <font color="red">(采美中介费¥${s.cmShopOtherFee},第三方中介费¥${s.shopOtherFee})</font>
+                            </c:if>
+                            <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee eq 0}">
+                                <font color="red">(第三方中介费¥${s.shopOtherFee})</font>
+                            </c:if>
+                            <c:if test="${s.shopOtherFee eq 0 and s.cmShopOtherFee > 0}">
+                                <font color="red">(采美中介费¥${s.cmShopOtherFee})</font>
+                            </c:if>
+                        </td>
 
                             <%--<td>
                                 <c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if>

+ 13 - 2
src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp

@@ -549,8 +549,19 @@
                     <input type="hidden" class="costType" value="${s.costType}">
                     <input type="hidden" class="proportional" value="${s.proportional}">
                     <input type="hidden" class="modifyShouldPayNote" value="${s.modifyShouldPayNote}">
-                    <td class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number"
-                                                                  pattern="#,##0.00"/></td>
+                    <td class="third-party-fee">
+                        <fmt:formatNumber value="${s.shopOtherFee + s.cmShopOtherFee}" type="number"
+                                                                  pattern="#,##0.00"/>
+                        <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee > 0}">
+                            <font color="red">(采美中介费¥${s.cmShopOtherFee},第三方中介费¥${s.shopOtherFee})</font>
+                        </c:if>
+                        <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee eq 0}">
+                            <font color="red">(第三方中介费¥${s.shopOtherFee})</font>
+                        </c:if>
+                        <c:if test="${s.shopOtherFee eq 0 and s.cmShopOtherFee > 0}">
+                            <font color="red">(采美中介费¥${s.cmShopOtherFee})</font>
+                        </c:if>
+                    </td>
                 </tr>
                 <tr>
                     <th>商品名</th>

+ 60 - 294
src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherCheck.jsp

@@ -1,256 +1,3 @@
-<%--<%@ page contentType="text/html;charset=UTF-8" %>--%>
-<%--<%@ include file="/WEB-INF/views/include/taglib.jsp"%>--%>
-<%--<html>--%>
-<%--<head>--%>
-<%--    <title>付款单表管理</title>--%>
-<%--    <meta name="decorator" content="default"/>--%>
-<%--    <style>--%>
-<%--        .table th{text-align:center}--%>
-<%--        .table td{text-align:center}--%>
-<%--        .payment-form h4{width:96%;margin-left:2%;padding-bottom:20px;text-align:center;border-bottom:1px slid #eee}--%>
-<%--        .required{color:red}--%>
-<%--        .payment-form label{width:100px;text-align:right;vertical-align:middle;font-weight:600}--%>
-<%--        .payment-form-top{padding:10px 0}--%>
-<%--        .payment-form-top>div,.payment-form-bottom>div{width:94%;margin-left:3%;height:50px;line-height:50px;border-bottom:1px slid #eee;white-space:nowrap}--%>
-<%--        .payment-form-top input{vertical-align:baseline}--%>
-<%--        .payment-form-top>div:last-child span{margin-left:15px}--%>
-<%--        .payment-form-top>div:last-child span:nth-of-type(1){margin-left:0}--%>
-<%--        .pay-table th{background:#f9f9f9}--%>
-<%--        .pay-table tr:first-child th{background:#eee !important}--%>
-<%--        .pay-table td{background:#fff !important}--%>
-<%--        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}--%>
-<%--        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px slid #ddd}--%>
-<%--        .payment-form-bottom label{width:140px}--%>
-<%--        .process-details span{width:140px;margin-left:50px;font-weight:600}--%>
-<%--        .process-details div{display:inline-block}--%>
-<%--        .payment-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px slid #ddd}--%>
-<%--        .tips-popup-content div{width:100%;text-align:center}--%>
-<%--        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}--%>
-<%--        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px slid #eee;margin-bottom:20px}--%>
-<%--        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}--%>
-<%--        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px slid #ddd}--%>
-<%--        .mask{width:100%;height:100%;position:fixed;top:0;background:rgba(0,0,0,0.7);display:none}--%>
-<%--        .tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}--%>
-<%--        .tips-popup-content div{width:100%;text-align:center}--%>
-<%--        .tips-popup-content{width:30%}--%>
-<%--        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}--%>
-<%--        .tips-popup-content h4{padding-left:10px;height:40px;line-height:40px;border-bottom:1px slid #eee;margin-bottom:20px}--%>
-<%--        .tips-cfm-btn,.tips-cancel-btn,.check-blue-btn,.check-grey-btn{width:100px;height:40px;margin:auto;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background:#3daae9;color:#fff;border:none}--%>
-<%--        .refuse-btn{margin-left:50px}--%>
-<%--        .return-btn,.tips-cancel-btn,.check-grey-btn{background:#fff;color:#555;margin-left:50px}--%>
-<%--        .tips-cancel-btn,.check-grey-btn{border:1px slid #ddd;margin-left:20px;display:none}--%>
-<%--        #close-btn1{top:8px;right:10px;width:18px;position:absolute;cursr:pointer}--%>
-<%--        .tips-popup-reasn .tips-popup-content{height:250px}--%>
-<%--        .tips-popup-reasn .tips-popup-content div{position:absolute;bottom:15px}--%>
-<%--        .tips-popup-reasn .check-grey-btn{display:inline-block}--%>
-<%--        #refuse-reasn{width:80%;height:48%;left:8%;position:absolute;resize:none}--%>
-<%--        .tips-popup-reasn h5{color:#555;padding-left:8%;margin-bottom:4px;margin-top:-12px}--%>
-<%--        .check-cfm-btn{background:#3daae9;color:#fff}--%>
-<%--    </style>--%>
-<%--    <style media="print">--%>
-<%--        .styleWidth{width:6%;word-break:break-all}--%>
-<%--        .styleWidth{}--%>
-<%--        .styleWidth3{width:10%;word-break:break-all}--%>
-<%--        .table{margin-left:0;margin-bottom:20px;padding-bottom:2px;border-bottom:1px slid #ddd;box-sizing:border-box}--%>
-<%--        .export{display:none}--%>
-<%--    </style>--%>
-<%--</head>--%>
-<%--<body>--%>
-<%--<ul class="nav nav-tabs">--%>
-<%--    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>--%>
-<%--    <li class="active"><a href="${ctx}/order/cmPayShop/toCheck?id=${cmPayShop.id}">付款审核</a></li>--%>
-<%--</ul><br/>--%>
-<%--<div class="payment-form">--%>
-<%--    <h4>付款单</h4>--%>
-<%--    <div class="payment-form-top">--%>
-<%--        <div>--%>
-<%--            <label>订单编号(ID):</label>&nbsp;&nbsp;--%>
-<%--            <span><a href="${ctx}/order/detail?id=${cmPayShop.shopOrders.get(0).orderID}">${cmPayShop.shopOrders.get(0).orderNo}(${cmPayShop.shopOrders.get(0).orderID})</a></span>--%>
-<%--        </div>--%>
-<%--        <div>--%>
-<%--            <label>子订单编号(ID):</label>&nbsp;&nbsp;&nbsp;&nbsp;--%>
-<%--            <span><a href="${ctx}/order/detail?id=${cmPayShop.shopOrders.get(0).orderID}">${cmPayShop.shopOrders.get(0).shopOrderNo}(${cmPayShop.shopOrders.get(0).shopOrderID})</a></span>--%>
-<%--        </div>--%>
-<%--        <div>--%>
-<%--            <label>付款单名称:</label>--%>
-<%--            <span>${cmPayShop.name}</span>--%>
-<%--        </div>--%>
-<%--        <div>--%>
-<%--            <label>付款账号:</label>--%>
-<%--            <c:if test="${cmPayShop.payType eq '6'}">--%>
-<%--                无--%>
-<%--            </c:if>--%>
-<%--            <c:if test="${cmPayShop.payType ne '6'}">--%>
-<%--                <span>户名:${cmPayShop.bankAccountName}</span>--%>
-<%--                <span>账号:${cmPayShop.bankAccount}</span>--%>
-<%--                <span>开户行:${cmPayShop.bankName}</span>--%>
-<%--                <span>账户类型:--%>
-<%--						<c:if test="${cmPayShop.type == '0'}">公帐</c:if>--%>
-<%--						<c:if test="${cmPayShop.type == '1'}">私帐</c:if>--%>
-<%--					</span>--%>
-<%--            </c:if>--%>
-<%--        </div>--%>
-<%--        <div>--%>
-<%--            <label>付第三方金额:</label>--%>
-<%--            <span>${cmPayShop.totalAmount}</span>--%>
-<%--        </div>--%>
-<%--        <div>--%>
-<%--            <label>付款银行:</label><span>--%>
-<%--					<select name="payType">--%>
-<%--						<option value="1">建设银行7297</option>--%>
-<%--						<option value="2">中信银行0897</option>--%>
-<%--						<option value="3">中信银行7172</option>--%>
-<%--						<option value="4">广发银行0115</option>--%>
-<%--						<option value="5">广发银行5461</option>--%>
-<%--					</select>--%>
-<%--				</span>--%>
-<%--            <label>付款时间:</label>--%>
-<%--            <span>${cmPayShop.payTime}</span>--%>
-<%--            <input name="id" value="${cmPayShop.id}" id="id" type="hidden">--%>
-<%--        </div>--%>
-<%--        <div>--%>
-<%--            <label>申请人:</label>--%>
-<%--            <span>${cmPayShop.applicantName}</span>--%>
-<%--        </div>--%>
-<%--        <div>--%>
-<%--            <label>申请时间:</label>--%>
-<%--            <span>${cmPayShop.applyTime}</span>--%>
-<%--        </div>--%>
-<%--        <div>--%>
-<%--            <label>审核状态:</label>--%>
-<%--            <span>--%>
-<%--                <c:if test="${cmPayShop.status == '0'}">--%>
-<%--						<font color="red">--%>
-<%--							<strong>待审核</strong>--%>
-<%--						</font>--%>
-<%--                </c:if>--%>
-<%--                <c:if test="${cmPayShop.status == '1'}">--%>
-<%--                    审核通过--%>
-<%--                </c:if>--%>
-<%--                <c:if test="${cmPayShop.status == '2'}">--%>
-<%--                    审核不通过--%>
-<%--                </c:if>--%>
-<%--            </span>--%>
-<%--        </div>--%>
-<%--        <c:if test="${cmPayShop.status == '2'}">--%>
-<%--            <div>--%>
-<%--                <label>原因:</label>--%>
-<%--                <span>${cmPayShop.reasn}</span>--%>
-<%--            </div>--%>
-<%--        </c:if>--%>
-<%--    </div>--%>
-<%--    <div class="check-btn">--%>
-<%--        <button class="check-cfm-btn" type="button">审核通过</button>--%>
-<%--        <button class="refuse-btn" type="button">审核不通过</button>--%>
-<%--        <button class="return-btn" type="button" onclick="history.go(-1)">返回</button>--%>
-<%--    </div>--%>
-<%--    <div class="mask tips-popup-reasn">--%>
-<%--        <div class="tips-popup-content">--%>
-<%--            <h4>确认提示</h4>--%>
-<%--            <h5><span class="required">* </span>审核不通过原因:</h5>--%>
-<%--            <textarea id="refuse-reasn" cols="30" rows="10" maxlength="200"></textarea>--%>
-<%--            <div>--%>
-<%--                <button class="check-cfm-btn check-blue-btn" type="button">确定</button>--%>
-<%--                <button class="check-grey-btn" type="button">取消</button>--%>
-<%--            </div>--%>
-<%--            <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">--%>
-<%--        </div>--%>
-<%--    </div>--%>
-<%--    <div class="mask tips-popup">--%>
-<%--        <div class="tips-popup-content">--%>
-<%--            <h4>信息提示</h4>--%>
-<%--            <p></p>--%>
-<%--            <div>--%>
-<%--                <button class="tips-cfm-btn tips-cfm-directly" type="button">确定</button>--%>
-<%--                <button class="tips-cancel-btn" type="button">取消</button>--%>
-<%--            </div>--%>
-<%--            <img id="close-btn1" src="/static/images/close-btn.png" alt="close-btn">--%>
-<%--        </div>--%>
-<%--    </div>--%>
-<%--</div>--%>
-<%--<script>--%>
-<%--    (function(){--%>
-<%--        var payTableEle = $('.pay-table'),--%>
-<%--            accessFlag = true,--%>
-<%--            unaccessFlag = true,--%>
-<%--            payProductEle = $('.pay-product-item');--%>
-<%--        payTableEle.each(function (i,l) {--%>
-<%--            var productLength = $(this).find('.pay-product-item').length;--%>
-<%--            // 商品列表合并单元格--%>
-<%--            // $(this).find('.mergeRows').attr('rowspan',productLength);--%>
-<%--        });--%>
-
-<%--        $('.pay-table').each(function(){--%>
-<%--            var thisEle = $(this),--%>
-<%--                totalComissionVal = 0,--%>
-<%--                resVal = '';--%>
-<%--            totalComissionEle = thisEle.find('.payCm'),--%>
-<%--                comissionEle = thisEle.find('.payCm-t'),--%>
-<%--                thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',',''),--%>
-<%--                freightVal = thisEle.find('.freight').text().replace(',','');--%>
-<%--            totalComissionEle.each(function(){--%>
-<%--                totalComissionVal += Number($(this).text().replace(',',''));--%>
-<%--            })--%>
-<%--            resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);--%>
-<%--            comissionEle.text(resVal);--%>
-<%--        })--%>
-
-<%--        $('.tips-cancel-btn, #close-btn1').on('click',function() {--%>
-<%--            $('.mask').hide();--%>
-<%--        })--%>
-<%--        $('.tips-cfm-directly').on('click',function() {--%>
-<%--            if($('.tips-cfm-btn').hasClass('tips-cfm-directly')) {--%>
-<%--                $('.tips-popup').hide();--%>
-<%--            } else {--%>
-<%--                $('#form').submit();--%>
-<%--            }--%>
-<%--        })--%>
-<%--        $('.refuse-btn').on('click',function() {--%>
-<%--            $('.tips-popup-reasn').show();--%>
-<%--        })--%>
-<%--        $('.check-grey-btn').on('click',function() {--%>
-<%--            $('.tips-popup-reasn').hide();--%>
-<%--        })--%>
-
-<%--        function showTips(title,text) {--%>
-<%--            $('.tips-popup h4').text(title);--%>
-<%--            $('.tips-popup p').text(text);--%>
-<%--            $('.tips-popup').show();--%>
-<%--        }--%>
-
-
-<%--        function submitForm() {--%>
-<%--            $('.tips-cfm-btn').removeClass('tips-cfm-directly').addClass('submit-now');--%>
-<%--            $('.tips-cancel-btn').hide();--%>
-<%--            showTips('信息提示','审核通过');--%>
-<%--        }--%>
-
-<%--        $('.check-cfm-btn').on('click',function(e) {--%>
-<%--            var payType = $('select[name="payType"]').val(),--%>
-<%--                id = $('#id').val();--%>
-<%--            if($(this).hasClass('check-blue-btn')) {--%>
-<%--                var textareaVal = $('#refuse-reasn').val();--%>
-<%--                if(!textareaVal.trim()) {--%>
-<%--                    showTips('信息提示','审核原因不能为空');--%>
-<%--                    return false;--%>
-<%--                }--%>
-<%--                if(unaccessFlag) {--%>
-<%--                    window.location.href = '${ctx}/order/cmPayShop/checkNotPass?id=' + id + '&reasn=' + textareaVal;--%>
-<%--                    unaccessFlag = false;--%>
-<%--                }--%>
-<%--            } else {--%>
-<%--                if(accessFlag) {--%>
-<%--                    window.location.href = '${ctx}/order/cmPayShop/checkPass?payType=' + payType + '&id=' + id;--%>
-<%--                    accessFlag = false;--%>
-<%--                }--%>
-<%--            }--%>
-<%--        })--%>
-
-<%--    })()--%>
-<%--</script>--%>
-<%--</body>--%>
-<%--</html>--%>
-
 <%@ page contentType="text/html;charset=UTF-8" %>
 <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
 <html>
@@ -663,8 +410,8 @@
                 <tr>
                     <th>订单编号(ID)</th>
                     <th colspan="3"> 供应商</th>
-                    <th colspan="3">子订单佣金</th>
-                    <th colspan="3">商品费</th>
+<%--                    <th colspan="3">子订单佣金</th>--%>
+                    <th colspan="6">商品费</th>
                     <th>应付税费</th>
                     <th>供应商运费</th>
                     <th>付款状态</th>
@@ -675,8 +422,8 @@
                 <tr>
                     <td> ${s.orderNo}(${s.orderID})</td>
                     <td colspan="3">${s.shopName}</td>
-                    <td colspan="3" class="payCm-t">子订单佣金</td>
-                    <td colspan="3" class="product-fee">${s.shopProductAmount}</td>
+<%--                    <td colspan="3" class="payCm-t">子订单佣金</td>--%>
+                    <td colspan="6" class="product-fee">${s.shopProductAmount}</td>
 
                     <td class="taxes">
                         <fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/>
@@ -719,7 +466,8 @@
                                 class="red wipeText">¥0.00</em></span></label>
                     </td>
 
-                    <td class="third-party-fee">${s.shopOtherFee + s.cmShopOtherFee}
+                    <td class="third-party-fee">
+                            ${s.shopOtherFee + s.cmShopOtherFee}
                         <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee > 0}">
                             <font color="red">(采美中介费¥${s.cmShopOtherFee},第三方中介费¥${s.shopOtherFee})</font>
                         </c:if>
@@ -820,7 +568,7 @@
         <div style="border:solid 1px black;padding: 10px;display: flex;flex-direction: column;height: 15%;">
             <div>
                 <label>第三方中介费:</label>
-                <span>${cmPayShop.totalAmount}</span>
+                <span>${cmPayShop.shopOrders[0].shopOtherFee}</span>
             </div>
             <c:if test="${cmPayShop.payType ne '6'}">
                 <div>
@@ -842,45 +590,63 @@
             </c:if>
         </div>
         <br/>
-        <div style="border:solid 1px black;padding: 10px;display: flex;flex-direction: column;height: 15%;${empty cmPayShop.cmShopOtherFee or cmPayShop.cmShopOtherFee eq 0 ? 'display:none':''}">
+        <div style="border:solid 1px black;padding: 10px;display: flex;flex-direction: column;height: 15%;${empty cmPayShop.shopOrders[0].cmShopOtherFee or cmPayShop.shopOrders[0].cmShopOtherFee eq 0 ? 'display:none':''}">
             <div>
                 <label>采美中介费:</label>
-                <span>${cmPayShop.cmShopOtherFee}</span>
+                <span>${cmPayShop.shopOrders[0].cmShopOtherFee}</span>
             </div>
             <div>
-                <label><em class="required">* </em>付款账号:</label>
-                <c:if test="${cmPayShop.cmOtherPayType eq '6'}">
-                    无
-                </c:if>
-                <c:if test="${cmPayShop.cmOtherPayType ne '6'}">
-                    <span>户名:${cmPayShop.cmBankAccountName}</span>
-                    <span>账号:${cmPayShop.cmBankAccount}</span>
-                    <span>开户行:${cmPayShop.cmBankName}</span>
-                    <span>账户类型:
-        						<c:if test="${cmPayShop.cmType == '0'}">公帐</c:if>
-        						<c:if test="${cmPayShop.cmType == '1'}">私帐</c:if>
-        					</span>
-                </c:if>
-            </div>
-            <c:if test="${cmPayShop.cmOtherPayType ne '6'}">
-                <div>
-                    <label style="font-weight: bold; font-size:18px">转账支付:</label>
-                    <span id="transferAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber
-                            value="${cmPayShop.cmShopOtherFee + cmPayShop.totalAmount}" pattern="#,##0.00"/></span>
-                    <c:if test="${cmPayShop.status != '2'}">
-                        <c:if test="${not empty cmPayShop.cmOtherPayType }">
-                            <label>付款银行:</label>
-                            <span id="payType">
-                                    ${cmPayShop.cmBankNameType}
-                            </span>
-                        </c:if>
-                        <c:if test="${cmPayShop.status != '0'}">
-                            <label>付款时间:</label>
-                            <span>${cmPayShop.cmOtherPayTime}</span>
-                        </c:if>
-                    </c:if>
-                </div>
-            </c:if>
+            <label style="font-weight: bold; font-size:18px">转账支付:</label>
+            <span id="" style="font-weight: bold; font-size:18px">
+                <fmt:formatNumber
+                    value="${cmPayShop.transferPayFee + cmPayShop.cmShopOtherFee}" pattern="#,##0.00"/> </span>
+            <label>付款银行:</label><span>
+					<select name="cmOtherPayType" style="width: 200px">
+						<option value="">请选择</option>
+                        <c:forEach items="${offlineCollections}" var="offlineCollections">
+                            <option value="${offlineCollections.type}">${offlineCollections.bankAccount}</option>
+                        </c:forEach>
+					</select>
+				</span>
+
+            <label>付款时间:</label>
+            <span>${cmPayShop.cmOtherPayTime}</span>
+        </div>
+
+<%--            <div>--%>
+<%--                <label><em class="required">* </em>付款账号:</label>--%>
+<%--                <c:if test="${cmPayShop.cmOtherPayType eq '6'}">--%>
+<%--                    无--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${cmPayShop.cmOtherPayType ne '6'}">--%>
+<%--                    <span>户名:${cmPayShop.cmBankAccountName}</span>--%>
+<%--                    <span>账号:${cmPayShop.cmBankAccount}</span>--%>
+<%--                    <span>开户行:${cmPayShop.cmBankName}</span>--%>
+<%--                    <span>账户类型:--%>
+<%--        						<c:if test="${cmPayShop.cmType == '0'}">公帐</c:if>--%>
+<%--        						<c:if test="${cmPayShop.cmType == '1'}">私帐</c:if>--%>
+<%--        					</span>--%>
+<%--                </c:if>--%>
+<%--            </div>--%>
+<%--            <c:if test="${cmPayShop.cmOtherPayType ne '6'}">--%>
+<%--                <div>--%>
+<%--                    <label style="font-weight: bold; font-size:18px">转账支付:</label>--%>
+<%--                    <span id="transferAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber--%>
+<%--                            value="${cmPayShop.cmShopOtherFee + cmPayShop.totalAmount}" pattern="#,##0.00"/></span>--%>
+<%--                    <c:if test="${cmPayShop.status != '2'}">--%>
+<%--                        <c:if test="${not empty cmPayShop.cmOtherPayType }">--%>
+<%--                            <label>付款银行:</label>--%>
+<%--                            <span id="payType">--%>
+<%--                                    ${cmPayShop.cmBankNameType}--%>
+<%--                            </span>--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${cmPayShop.status != '0'}">--%>
+<%--                            <label>付款时间:</label>--%>
+<%--                            <span>${cmPayShop.cmOtherPayTime}</span>--%>
+<%--                        </c:if>--%>
+<%--                    </c:if>--%>
+<%--                </div>--%>
+<%--            </c:if>--%>
         </div>
         <br/>
         <div class="process-details">

+ 12 - 12
src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherPrintDetail.jsp

@@ -508,7 +508,7 @@
                         <fmt:formatNumber value="${s.promotionFullReduction}" type="number" pattern="#,##0.00"/>
                     </td>
                     <td colspan="2" class="third-party-fee">
-                        <fmt:formatNumber value="${s.shopOtherFee}" type="number" pattern="#,##0.00"/>
+                            ${s.shopOtherFee + s.cmShopOtherFee}
                         <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee > 0}">
                             <font color="red">(采美中介费¥${s.cmShopOtherFee},第三方中介费¥${s.shopOtherFee})</font>
                         </c:if>
@@ -525,11 +525,11 @@
                     <th colspan="3">机构</th>
                     <th>机构运费</th>
                     <th>供应商运费</th>
-                    <th colspan="3">商品费</th>
+                    <th colspan="4">商品费</th>
                     <th colspan="2">付款状态</th>
-                    <th colspan="2">采美佣金</th>
+<%--                    <th colspan="2">采美佣金</th>--%>
                     <th colspan="3">应付税费</th>
-                    <th colspan="2">付供应商</th>
+                    <th colspan="4">付供应商</th>
                 </tr>
                 <tr>
                     <td>${s.shopName}</td>
@@ -568,17 +568,17 @@
                     </td>
                     <td class="freight"><fmt:formatNumber value="${empty s.supplierFreight ? 0 : s.supplierFreight}" type="number"
                                                           pattern="#,##0.00"/></td>
-                    <td colspan="3" class="product-fee"><fmt:formatNumber value="${s.shopProductAmount}" type="number"
+                    <td colspan="4" class="product-fee"><fmt:formatNumber value="${s.shopProductAmount}" type="number"
                                                                           pattern="#,##0.00"/></td>
                     <td colspan="2"><c:if test="${s.payStatus == 1 || empty s.payStatus || s.payStatus == 0}"><font
                             color="red">待付款</font></c:if>
                         <c:if test="${s.payStatus == 2}"><font color="#ff8c00">部分付款</font></c:if>
                         <c:if test="${s.payStatus == 3}"><font color="green">已付款</font></c:if>
                     </td>
-                    <td colspan="2" class="payCm-t"></td>
+<%--                    <td colspan="2" class="payCm-t"></td>--%>
                     <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number"
                                                                     pattern="#,##0.00"/></td>
-                    <td colspan="2" class="supplier-fee">
+                    <td colspan="4" class="supplier-fee">
                         <div>
                             <c:if test="${s.differenceType ne 1 && s.differenceType ne 2}">应付:<fmt:formatNumber
                                     value="${s.shouldPayShopAmount-s.shopOtherFee}" type="number" pattern="#,##0.00"/>
@@ -703,7 +703,7 @@
         <div style="border:solid 1px black;padding: 10px;display: flex;flex-direction: column;height: 15%;">
             <div>
                 <label>第三方中介费:</label>
-                <span>${cmPayShop.totalAmount}</span>
+                <span>${cmPayShop.shopOrders[0].shopOtherFee}</span>
             </div>
             <div>
                 <label><em class="required">* </em>付款账号:</label>
@@ -724,7 +724,7 @@
                 <div>
                     <label style="font-weight: bold; font-size:18px">转账支付:</label>
                     <span id="transferAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber
-                            value="${cmPayShop.transferPayFee}" pattern="#,##0.00"/></span>
+                            value="${cmPayShop.shopOrders[0].cmShopOtherFee + cmPayShop.shopOrders[0].shopOtherFee}" pattern="#,##0.00"/></span>
                     <c:if test="${cmPayShop.status != '2'}">
                         <c:if test="${not empty cmPayShop.payType }">
                             <label>付款银行:</label>
@@ -741,10 +741,10 @@
             </c:if>
         </div>
         <br/>
-        <div style="border:solid 1px black;padding: 10px;display: flex;flex-direction: column;height: 15%;${empty cmPayShop.cmShopOtherFee or cmPayShop.cmShopOtherFee eq 0 ? 'display:none':''}">
+        <div style="border:solid 1px black;padding: 10px;display: flex;flex-direction: column;height: 15%;${empty cmPayShop.shopOrders[0].cmShopOtherFee or cmPayShop.shopOrders[0].cmShopOtherFee eq 0 ? 'display:none':''}">
             <div>
                 <label>采美中介费:</label>
-                <span>${cmPayShop.cmShopOtherFee}</span>
+                <span>${cmPayShop.shopOrders[0].cmShopOtherFee}</span>
             </div>
             <div>
                 <label><em class="required">* </em>付款账号:</label>
@@ -765,7 +765,7 @@
                 <div>
                     <label style="font-weight: bold; font-size:18px">转账支付:</label>
                     <span id="transferAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber
-                            value="${cmPayShop.cmShopOtherFee + cmPayShop.totalAmount}" pattern="#,##0.00"/></span>
+                            value="${cmPayShop.shopOrders[0].cmShopOtherFee + cmPayShop.shopOrders[0].shopOtherFee}" pattern="#,##0.00"/></span>
                     <c:if test="${cmPayShop.status != '2'}">
                         <c:if test="${not empty cmPayShop.cmOtherPayType }">
                             <label>付款银行:</label>

+ 21 - 7
src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherPrintDetails.jsp

@@ -372,8 +372,7 @@
                     <td><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
                             test="${s.costType == '2'}">比例成本</c:if></td>
                     <td class="third-party-fee">
-                        <fmt:formatNumber value="${s.shopOtherFee + s.cmShopOtherFee}" type="number"
-                                          pattern="#,##0.00"/>
+                            ${s.shopOtherFee + s.cmShopOtherFee}
                         <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee > 0}">
                             <font color="red">(采美中介费¥${s.cmShopOtherFee},第三方中介费¥${s.shopOtherFee})</font>
                         </c:if>
@@ -516,13 +515,28 @@
         <div style="border:solid 1px black;padding: 10px;display: flex;flex-direction: column;height: 15%;">
             <div>
                 <label>第三方中介费:</label>
-                <span>${cmPayShop.totalAmount}</span>
+                <span>${cmPayShop.shopOrders[0].shopOtherFee}</span>
+            </div>
+            <div>
+                <label><em class="required">* </em>付款账号:</label>
+                <c:if test="${cmPayShop.payType eq '6'}">
+                    无
+                </c:if>
+                <c:if test="${cmPayShop.payType ne '6'}">
+                    <span>户名:${cmPayShop.bankAccountName}</span>
+                    <span>账号:${cmPayShop.bankAccount}</span>
+                    <span>开户行:${cmPayShop.bankName}</span>
+                    <span>账户类型:
+        						<c:if test="${cmPayShop.type == '0'}">公帐</c:if>
+        						<c:if test="${cmPayShop.type == '1'}">私帐</c:if>
+        					</span>
+                </c:if>
             </div>
             <c:if test="${cmPayShop.payType ne '6'}">
                 <div>
                     <label style="font-weight: bold; font-size:18px">转账支付:</label>
                     <span id="transferAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber
-                            value="${cmPayShop.transferPayFee}" pattern="#,##0.00"/> </span>
+                            value="${cmPayShop.shopOrders[0].cmShopOtherFee + cmPayShop.shopOrders[0].shopOtherFee}" pattern="#,##0.00"/> </span>
                     <c:if test="${not empty cmPayShop.payType }">
                         <label>付款银行:</label>
                         <span id="payType">
@@ -535,10 +549,10 @@
             </c:if>
         </div>
         <br/>
-        <div style="border:solid 1px black;padding: 10px;display: flex;flex-direction: column;height: 15%;${empty cmPayShop.cmShopOtherFee or cmPayShop.cmShopOtherFee eq 0 ? 'display:none':''}">
+        <div style="border:solid 1px black;padding: 10px;display: flex;flex-direction: column;height: 15%;${empty cmPayShop.shopOrders[0].cmShopOtherFee or cmPayShop.shopOrders[0].cmShopOtherFee eq 0 ? 'display:none':''}">
             <div>
                 <label>采美中介费:</label>
-                <span>${cmPayShop.cmShopOtherFee}</span>
+                <span>${cmPayShop.shopOrders[0].cmShopOtherFee}</span>
             </div>
             <div>
                 <label><em class="required">* </em>付款账号:</label>
@@ -559,7 +573,7 @@
                 <div>
                     <label style="font-weight: bold; font-size:18px">转账支付:</label>
                     <span id="transferAmount" style="font-weight: bold; font-size:18px"><fmt:formatNumber
-                            value="${cmPayShop.cmShopOtherFee + cmPayShop.totalAmount}" pattern="#,##0.00"/></span>
+                            value="${cmPayShop.shopOrders[0].cmShopOtherFee + cmPayShop.shopOrders[0].shopOtherFee}" pattern="#,##0.00"/></span>
                     <c:if test="${cmPayShop.status != '2'}">
                         <c:if test="${not empty cmPayShop.cmOtherPayType }">
                             <label>付款银行:</label>

+ 13 - 2
src/main/webapp/WEB-INF/views/modules/order/paidShopOrderList.jsp

@@ -425,8 +425,19 @@
                     <input type="hidden" class="costType" value="${s.costType}">
                     <input type="hidden" class="proportional" value="${s.proportional}">
                     <input type="hidden" class="modifyShouldPayNote" value="${s.modifyShouldPayNote}">
-                    <td class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number"
-                                                                  pattern="#,##0.00"/></td>
+                    <td class="third-party-fee">
+                        <fmt:formatNumber value="${s.shopOtherFee}" type="number"
+                                                                  pattern="#,##0.00"/>
+                        <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee > 0}">
+                            <font color="red">(采美中介费¥${s.cmShopOtherFee},第三方中介费¥${s.shopOtherFee})</font>
+                        </c:if>
+                        <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee eq 0}">
+                            <font color="red">(第三方中介费¥${s.shopOtherFee})</font>
+                        </c:if>
+                        <c:if test="${s.shopOtherFee eq 0 and s.cmShopOtherFee > 0}">
+                            <font color="red">(采美中介费¥${s.cmShopOtherFee})</font>
+                        </c:if>
+                    </td>
                 </tr>
                 <tr>
                     <th>商品名</th>

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

@@ -197,9 +197,9 @@
                 ignore: "",
                 submitHandler: function (form) {
                     var shopOtherFee = $("#shopOtherFee").val();
-                    var brokerage = ${brokerage};
-                    if (brokerage < shopOtherFee) {
-                        top.$.jBox.confirm("付第三方的值不合理,导致佣金为负,确认继续吗?", '提示', function (v, h, f) {
+                    var shouldPayShopAmount = ${shouldPayShopAmount};
+                    if (shouldPayShopAmount < shopOtherFee) {
+                        top.$.jBox.confirm("付第三方的值不合理,不能大于付供应商!", '提示', function (v, h, f) {
                             if (v == true) {
                                 loading('正在提交,请稍等...');
                                 form.submit();