Browse Source

退款页

zhijiezhao 1 year ago
parent
commit
aad3b937b0

+ 81 - 8
src/main/java/com/caimei/modules/bulkpurchase/web/CmRefundsProductController.java

@@ -553,6 +553,43 @@ public class CmRefundsProductController extends BaseController {
         return "";
     }
 
+    @RequestMapping(value = "toRecturnRecordByShopOrder")
+    public String toRecturnRecordByShopOrder(CmReturnedPurchase cmReturnedPurchase, String from, HttpServletRequest request, HttpServletResponse response, Model model) {
+        NewShopOrder byShopOrder = newShopOrderService.findByShopOrderID(cmReturnedPurchase.getShopOrderID());
+        List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
+        for (CmReturnedPurchase returnedPurchase : dataList) {
+            if (null != cmReturnedPurchase.getShopOrderID()) {
+                List<ShopOrderReturned> shopOrderReturneds = returnedPurchase.getShopOrderReturnedList().stream().filter(newShopOrder -> newShopOrder.getShopOrderID().equals(cmReturnedPurchase.getShopOrderID())).collect(Collectors.toList());
+                returnedPurchase.setShopOrderReturnedList(shopOrderReturneds);
+            }
+        }
+        //退款(退货)总金额
+        Double returnedPurchaseFee = 0D;
+        //退款总额(给买家)
+        Double refundFee = 0D;
+        for (CmReturnedPurchase bean : dataList) {
+            if (!bean.getStatus().equals("3")) {
+                returnedPurchaseFee += bean.getReturnedPurchaseFee();
+                refundFee += bean.getRefundFee();
+            }
+        }
+
+        BpClause bpClause = new BpClause();
+        bpClause.setEnabledStatus("1");
+        List<BpClause> bpClauses = bpClauseService.findList(bpClause);
+
+        model.addAttribute("from", from);
+        model.addAttribute("bpClauses", bpClauses);
+        model.addAttribute("cmReturnedPurchaseList", dataList);
+        model.addAttribute("order", byShopOrder);
+        model.addAttribute("orderType", cmReturnedPurchase.getOrderType());
+        model.addAttribute("returnedPurchaseFee", returnedPurchaseFee);
+        model.addAttribute("refundFee", refundFee);
+        model.addAttribute("cmReturnedPurchase", cmReturnedPurchase);
+        return "modules/bulkpurchase/shopOrderReturnRecord";
+    }
+
+
     /**
      * @return
      * @Author ye.qin
@@ -564,11 +601,11 @@ public class CmRefundsProductController extends BaseController {
     public String toRecturnRecordByOrderID(CmReturnedPurchase cmReturnedPurchase, String from, HttpServletRequest request, HttpServletResponse response, Model model) {
         try {
             NewOrder newOrder = newOrderService.get(cmReturnedPurchase.getOrderID().toString());
-           if(null!= cmReturnedPurchase.getShopOrderID()){
-               //过滤子订单
-               List<NewShopOrder>  newShopOrders= newOrder.getNewShopOrders().stream().filter(newShopOrder -> newShopOrder.getShopOrderID().equals(cmReturnedPurchase.getShopOrderID())).collect(Collectors.toList());
-               newOrder.setNewShopOrders(newShopOrders);
-               cmReturnedPurchase.setOrderType(Integer.valueOf(newOrder.getOrderType()));
+            if (null != cmReturnedPurchase.getShopOrderID()) {
+                //过滤子订单
+                List<NewShopOrder> newShopOrders = newOrder.getNewShopOrders().stream().filter(newShopOrder -> newShopOrder.getShopOrderID().equals(cmReturnedPurchase.getShopOrderID())).collect(Collectors.toList());
+                newOrder.setNewShopOrders(newShopOrders);
+                cmReturnedPurchase.setOrderType(Integer.valueOf(newOrder.getOrderType()));
             }
 
             List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
@@ -623,9 +660,7 @@ public class CmRefundsProductController extends BaseController {
             NewOrder order = newOrderService.get(cmReturnedPurchase.getOrderID().toString());
             if (null != cmReturnedPurchase.getShopOrderID()) {
                 //过滤子订单
-                List<NewShopOrder> newShopOrders = order.getNewShopOrders().stream().filter(s ->
-                        s.getShopOrderID().equals(cmReturnedPurchase.getShopOrderID()))
-                        .collect(Collectors.toList());
+                List<NewShopOrder> newShopOrders = order.getNewShopOrders().stream().filter(s -> s.getShopOrderID().equals(cmReturnedPurchase.getShopOrderID())).collect(Collectors.toList());
                 order.setNewShopOrders(newShopOrders);
             }
 
@@ -708,6 +743,44 @@ public class CmRefundsProductController extends BaseController {
         return "modules/bulkpurchase/orderReviewReturnRecord";
     }
 
+    /**
+     * 根据子订单Id查看收付款记录
+     *
+     * @param cmReturnedPurchase
+     * @param from
+     * @param request
+     * @param response
+     * @param model
+     * @return
+     */
+    @RequestMapping(value = "toShopOrderRefundRecord")
+    public String getReturnByShopOrder(CmReturnedPurchase cmReturnedPurchase, String from, HttpServletRequest request, HttpServletResponse response, Model model) {
+        NewShopOrder newOrder = newShopOrderService.findByShopOrderID(cmReturnedPurchase.getShopOrderID());
+        List<CmReceiptOrderRelation> listRelation = cmReceiptOrderRelationService.findByShopOrderIds(Arrays.asList(cmReturnedPurchase.getShopOrderID()));
+        List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
+        Double refundFee = 0D;  //退款总额
+        for (CmReturnedPurchase bean : dataList) {
+            for (ShopOrderReturned shopOrderReturned : bean.getShopOrderReturnedList()) {
+                if (shopOrderReturned.getShopOrderID().equals(cmReturnedPurchase.getShopOrderID())) {
+                    if (!bean.getStatus().equals("3")) {
+                        refundFee += bean.getRefundFee();
+                    }
+                }
+            }
+        }
+        List<CmPayShopRecord> pr = newShopOrderService.getPayedRecords(cmReturnedPurchase.getShopOrderID().toString());
+        model.addAttribute("pr", pr);
+        model.addAttribute("cmReturnedPurchaseList", dataList);
+        model.addAttribute("order", newOrder);
+        model.addAttribute("receipt", listRelation);
+        model.addAttribute("refundFee", refundFee);
+        model.addAttribute("from", from);
+        model.addAttribute("orderID", cmReturnedPurchase.getOrderID().toString());
+        model.addAttribute("orderType", cmReturnedPurchase.getOrderType());
+
+        return "modules/bulkpurchase/shopOrderRefundRecord";
+    }
+
     /**
      * @return
      * @Author ye.qin

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

@@ -172,7 +172,7 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private String rebateFee; //主订单返佣服务费
     private String shopPostFlag; //免邮标志 运费:2到付,0包邮,1需要运费,-2仪器到付其它包邮
     private String postageInfo; //运费字符串
-
+    private String clauseName;
     /**
      *
      */

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

@@ -224,7 +224,8 @@
         bou.mobile,
         bou.name as buyer,
         co.orderSeen,
-        co.clauseID
+        co.clauseID,
+        co.clauseName
         from cm_shop_order a
         left join cm_order co on co.orderID = a.orderID
         left join bp_order_userinfo bou on bou.orderId = a.orderID

+ 290 - 0
src/main/webapp/WEB-INF/views/modules/bulkpurchase/shopOrderRefundRecord.jsp

@@ -0,0 +1,290 @@
+<%@ taglib prefix="from" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="input" uri="/struts-tags" %>
+<%@ 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>
+        .form-horizontal .controls {
+            margin-left: 0;
+        }
+
+        .dateInput input {
+            width: 150px;
+        }
+
+        .clause span {
+            margin-left: 30px;
+        }
+
+        #productTable th {
+            text-align: center;
+            white-space: nowrap;
+        }
+
+        #productTable td {
+            text-align: center;
+            white-space: nowrap;
+        }
+
+        .controls {
+            font-size: 0;
+        }
+
+        .controls .conList {
+            display: inline-block;
+            margin-right: 15px;
+        }
+
+        .conList .btn:nth-of-type(1) {
+            margin-left: 25px;
+        }
+
+        #refundTable th, #cmReturnedPurchaseTable th {
+            width: 20%;
+        }
+
+        .record-title {
+            height: 30px;
+            line-height: 30px;
+            padding-left: 8px;
+        }
+        .zeroCost .message{
+            display:none;
+            position:absolute;
+            background:#FFF;
+            white-space:nowrap;
+            border:1px solid black;
+
+        }
+        .zeroCost:hover .message{
+            display: inline-block;
+            color: black;
+            padding: 5px;
+            margin-left: 10px;
+        }
+        .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            $("#name").focus();
+            $("#inputForm").validate({
+                submitHandler: function (form) {
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function (error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+        });
+
+
+    </script>
+</head>
+<body>
+<%--<input type="hidden" id="product_index" value="${fn:length(order.orderProduct)}">--%>
+<input type="hidden" id="ctx" value="${ctx}">
+<ul class="nav nav-tabs">
+    <c:if test="${from eq '1' or from eq '2'}">
+        <c:if test="${orderType eq 2}">
+            <li><a href="${ctx}/hehe/new/order/orderList">订单列表</a></li>
+        </c:if>
+        <c:if test="${orderType ne 2}">
+            <li><a href="${ctx}/order/orderList">订单列表</a></li>
+        </c:if>
+    </c:if>
+    <c:if test="${from eq '2'}">
+        <li><a href="${ctx}${orderType == 2 ?'/hehe/new':''}/order/detail?id=${orderID}">订单详情</a></li>
+    </c:if>
+    <c:if test="${from eq '3'}">
+        <li><a href="${ctx}/shopOrder/checkPaymentOrder">订单财务信息</a></li>
+    </c:if>
+    <li class="active"><a href="#">收退款记录</a></li>
+</ul>
+<br/>
+<table id="orderTable" class="table table-striped table-bordered table-condensed">
+        <tr>
+            <td>
+                下单时间:${order.orderTime}
+            </td>
+            <td>
+                子订单号(ID):${order.shopOrderNo}(${order.shopOrderID})
+            </td>
+            <c:if test="${order.organizeID != 4}">
+                <td>
+                    <c:if test="${order.organizeID != 1}">
+                        订单类型:${fns:getDictLabel(order.orderType,'order_type' ,'' )}
+                    </c:if>
+                </td>
+            </c:if>
+            <td>
+                <c:if test="${order.organizeID != 1}">
+                    订单来源:${fns:getDictLabel(order.orderSource,'bp_orderSource' ,'' )}
+                </c:if>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                订单状态:
+                <c:if test="${ not empty order.status}">
+                    ${fns:getNewOrderStatus(order.status)}
+                </c:if>
+            </td>
+            <td>收款状态:
+                <c:if test="${order.receiptStatus == 1}">
+                    <font color="red">待收款</font>
+                </c:if>
+                <c:if test="${order.receiptStatus == 2}">
+                    <font color="#ff8c00">部分收款</font>
+                </c:if>
+                <c:if test="${order.receiptStatus == 3}">
+                    <font color="green">已收款</font>
+                </c:if>
+            </td>
+            <td>
+                付款状态:
+                <c:if test="${order.payStatus == 1}">
+                    <font color="red">待付款</font>
+                </c:if>
+                <c:if test="${order.payStatus == 2}">
+                    <font color="#ff8c00">部分付款</font>
+                </c:if>
+                <c:if test="${order.payStatus == 3}">
+                    <font color="green">已付款</font>
+                </c:if>
+            </td>
+            <td>
+                结算状态:
+                <c:if test="${order.settleStatus == 1}">
+                    <font color="red">待结算</font>
+                </c:if>
+                <c:if test="${order.settleStatus == 2}">
+                    <font color="#ff8c00">部分结算</font>
+                </c:if>
+                <c:if test="${order.settleStatus == 3}">
+                    <font color="green">已结算</font>
+                </c:if>
+            </td>
+            <td>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                机构:${order.buyer}
+                <c:if test="${order.organizeID == 3}"></c:if>
+            </td>
+            <td>
+                收货人:${order.receiver}
+            </td>
+            <td>
+                手机:${order.mobile}
+            </td>
+            <td>
+<%--                地址:${order.bpOrderUserinfo.province}${order.bpOrderUserinfo.city}${order.bpOrderUserinfo.town}${order.bpOrderUserinfo.address}--%>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                子订单金额:¥${order.needPayAmount}
+            </td>
+            <td>
+                应收总额:¥
+                <c:if test="${order.realPay!=null}"><fmt:formatNumber value="${order.realPay}"
+                                                                                  type="currency"/></c:if>
+                <c:if test="${order.realPay==null}"><fmt:formatNumber value="${order.needPayAmount}"
+                                                                          type="currency"/></c:if>
+            </td>
+        </tr>
+        <tr>
+            <td>退款总额:¥${refundFee}</td>
+            <td COLSPAN="3">
+        </tr>
+</table>
+<c:if test="${not empty receipt}">
+    <div class="record-title">收款记录:</div>
+    <table id="refundTable" class="table table-striped table-bordered table-condensed">
+        <tr>
+            <th class="table-order">序号</th>
+            <th class="table-id">收款ID</th>
+            <th class="table-cell3">收款方式</th>
+            <th class="table-cell4">金额</th>
+            <th class="table-cell5">收款时间</th>
+        </tr>
+        <c:forEach items="${receipt}" var="receipt" varStatus="s">
+            <tr>
+                <td>${s.index + 1}</td>
+                <td><a href="${ctx}/order/cmDiscernReceipt/detail?id=${receipt.receiptID}&shopOrderId=${receipt.shopOrderId}"
+                       style="cursor: pointer">${receipt.receiptID}</a></td>
+
+                <td>
+                    <c:if test="${receipt.payWay==1}">线上收款</c:if>
+                    <c:if test="${receipt.payWay==2}">线下收款</c:if>
+                    <c:if test="${receipt.payWay==3}">余额抵扣</c:if>
+                </td>
+                <td><fmt:formatNumber value="${receipt.associateAmount}" type="currency"/></td>
+                <td>${receipt.receiptDate}</td>
+            </tr>
+        </c:forEach>
+    </table>
+    <c:forEach items="${receipt}" var="receipt" varStatus="s">
+        <c:if test="${receipt.confirmType eq 1 || receipt.confirmType eq 2}">
+            <div class="record-title"><p>抹平收款备注:<br>
+                    ${receipt.balanceAccountsRemark}</p></div>
+        </c:if>
+    </c:forEach>
+</c:if>
+
+<c:if test="${empty pr}">
+    <div class="record-title">付款记录:无</div>
+</c:if>
+<c:if test="${not empty pr}">
+    <div class="record-title">付款记录:</div>
+    <table id="contentTable" class="table table-striped table-bordered table-condensed" width="70%" border="1">
+        <thead>
+        <tr>
+            <th>序号</th>
+            <th>付款单ID</th>
+            <th>付款时间</th>
+            <th>付款方式</th>
+            <th>付款金额</th>
+        </tr>
+        </thead>
+        <tbody>
+        <c:forEach items="${pr}" var="p" varStatus="pp">
+            <tr>
+                <td>${pp.index + 1}</td>
+                <td><a href="${ctx}/order/cmPayShop/applyDetail?id=${p.payShopID}">${p.payShopID}</a></td>
+                <td>${p.payTime}</td>
+                <td>${p.bankNameType}
+                </td>
+                <td>${p.payAmount}</td>
+            </tr>
+        </c:forEach>
+        </tbody>
+    </table>
+</c:if>
+    <br>
+
+
+
+<script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/loadAddress.js"></script>
+<script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/orderForm.js"></script>
+<script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/stages.js"></script>
+<script>
+    $(function () {
+
+    });
+
+</script>
+</body>
+</html>

+ 524 - 0
src/main/webapp/WEB-INF/views/modules/bulkpurchase/shopOrderReturnRecord.jsp

@@ -0,0 +1,524 @@
+<%@ taglib prefix="from" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="input" uri="/struts-tags" %>
+<%@ 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 media="print">
+        @page {
+            size: landscape;
+        }
+
+        .refund-btn-top, .nav {
+            display: none;
+        }
+    </style>
+    <style>
+        .form-horizontal .controls {
+            margin-left: 0;
+        }
+
+        #increase, #decrease, .lineNum {
+            width: 30px;
+            height: 30px;
+        }
+
+        .lineNum {
+            text-align: center;
+        }
+
+        .dateInput input {
+            width: 150px;
+        }
+
+        .clause span {
+            margin-left: 30px;
+        }
+
+        #productTable th {
+            text-align: center;
+            white-space: nowrap;
+        }
+
+        #productTable td {
+            text-align: center;
+            white-space: nowrap;
+        }
+
+        .controls {
+            font-size: 0;
+        }
+
+        .controls .conList {
+            display: inline-block;
+            margin-right: 15px;
+        }
+
+        .conList .btn:nth-of-type(1) {
+            margin-left: 25px;
+        }
+
+        .refund-btn-top {
+            float: right;
+            margin-top: -18px;
+            margin-right: 10px;
+            height: 40px;
+        }
+
+        #enlarge-box {
+            position: fixed;
+            /*width: 325px;*/
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            border: 2px solid #eee;
+            background: #fff;
+            display: none;
+        }
+
+        .zeroCost .message {
+            display: none;
+            position: absolute;
+            background: #FFF;
+            white-space: nowrap;
+            border: 1px solid black;
+
+        }
+
+        .zeroCost:hover .message {
+            display: inline-block;
+            color: black;
+            padding: 5px;
+            margin-left: 10px;
+        }
+
+        .weishaIcon {
+            background: darkorange;
+            color: white;
+            margin: 0 0px;
+            padding: 0 3px;
+            font-style: normal;
+            font-size: 12px;
+            display: inline-block;
+            border-radius: 2px
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            $("#name").focus();
+            $("#inputForm").validate({
+                submitHandler: function (form) {
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function (error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+        });
+
+
+        function openClauseInfo(index) {
+            var content = $("#clauseContent" + index).val();
+            if (content == '') {
+                return false;
+            }
+            $.jBox(content, {
+                title: $("#clauseName" + index).val(),
+                width: $(top.document).width() - 440,
+                height: $(top.document).height() - 240,
+                buttons: {'关闭': true}
+            });
+        }
+    </script>
+</head>
+<body>
+<input type="hidden" id="ctx" value="${ctx}">
+<ul class="nav nav-tabs">
+    <c:if test="${from eq '3'}">
+        <li><a href="${ctx}/shopOrder/checkPaymentOrder">订单财务信息</a></li>
+    </c:if>
+    <li class="active"><a
+            href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">退款退货详情</a>
+    </li>
+</ul>
+<br/>
+<div class="refund-btn-top">
+    <c:if test="${from ne '3'}">
+        <input type="button" class="btn btn-primary"
+               onclick="window.location.href='${ctx}${cmReturnedPurchase.orderType eq 2?'/hehe/new/order/orderList':'/order/orderList'}'"
+               value="返回">
+    </c:if>
+</div>
+<c:forEach items="${cmReturnedPurchaseList}" var="cmReturnedPurchase" varStatus="cmReturnedPurchaseStatus">
+    <form:form id="inputForm${cmReturnedPurchaseStatus.index}" modelAttribute="cmReturnedPurchase"
+               action="${ctx}/bulkpurchase/cmRefundsProduct/saveRefound" method="post"
+               class="form-horizontal">
+        <c:if test="${cmReturnedPurchaseStatus.index ne 0}">
+            <hr style="height:5px;border:none;border-top:5px ridge green;"/>
+        </c:if>
+
+        <div id="enlarge-box">
+            <img src="" alt="">
+        </div>
+
+        <table id="contentTable" class="table table-striped table-bordered table-condensed">
+            <tr>
+                <td><b>退款编号:</b>
+                        ${empty cmReturnedPurchase.returnedNo?'':(cmReturnedPurchase.returnedNo)}
+                </td>
+                <td><b>申请时间:</b>
+                        ${cmReturnedPurchase.returnTime}
+                </td>
+                <td><b>申请金额:</b>
+                    <span class="refundFee"><fmt:formatNumber
+                            value="${empty cmReturnedPurchase.refundFee?'0.00':(cmReturnedPurchase.refundFee)}"
+                            pattern="#0.00"/></span>元&nbsp;&nbsp;&nbsp;
+                        (账户余额抵扣:${order.accountAmount})
+                </td>
+            </tr>
+            <tr>
+                <td colspan="4">
+                    <b>退款方式:</b>
+                    <c:if test="${cmReturnedPurchase.returnedWay eq 4}">
+                        未支付无退款
+                    </c:if>
+                    <c:if test="${cmReturnedPurchase.returnedWay eq 1}">
+                        <c:if test="${not empty cmReturnedPurchase.refundBalanceFee && cmReturnedPurchase.refundBalanceFee ne 0 }">
+                            余额账户:<fmt:formatNumber type="number" pattern="#,##0.00"
+                                                   value="${cmReturnedPurchase.refundBalanceFee}"/>元&nbsp;&nbsp;&nbsp;&nbsp;
+                        </c:if>
+                        <c:if test="${not empty cmReturnedPurchase.refundOnlineFee && cmReturnedPurchase.refundOnlineFee ne 0 }">
+                            线上退回:<fmt:formatNumber type="number" pattern="#,##0.00"
+                                                   value="${cmReturnedPurchase.refundOnlineFee}"/>元&nbsp;&nbsp;&nbsp;&nbsp;
+                        </c:if>
+                        <br>
+                        <c:if test="${empty cmReturnedPurchase.refundFee or cmReturnedPurchase.refundFee eq 0}">
+                            暂无支付方式
+                        </c:if>
+                    </c:if>
+                    <c:if test="${empty cmReturnedPurchase.returnedWay}">
+                        线下退回:<fmt:formatNumber type="number" pattern="#,##0.00"
+                                               value="${cmReturnedPurchase.refundOfflineFee}"/>元&nbsp;&nbsp;
+                    </c:if>
+                        <%--存在线下打款才显示银行信息--%>
+                    <br>
+                </td>
+            </tr>
+        </table>
+
+        <%--单个订单汇总信息--%>
+        <table id="orderTable" class="table table-striped table-bordered table-condensed">
+            <thead>
+            </thead>
+            <tr>
+                <td>
+                    机构:${order.buyer}
+                    <c:if test="${order.organizeID == 3}"></c:if>
+                </td>
+                <td>
+                    收货人:${order.receiver}(${order.mobile})
+                </td>
+                <td colspan="2">
+<%--                    地址:${order.bpOrderUserinfo.province}${order.bpOrderUserinfo.city}${order.bpOrderUserinfo.town}${order.bpOrderUserinfo.address}--%>
+                </td>
+            </tr>
+        </table>
+
+        <%--单次退款商品信息汇总--%>
+
+        <table id="cmReturnedPurchaseTable" class="table table-striped table-bordered table-condensed">
+            <c:forEach items="${cmReturnedPurchase.shopOrderReturnedList}" var="shopOrderReturneds"
+                       varStatus="shopOrderReturnedStatus">
+                <tr>
+                    <td colspan="7">
+                        <table id="shopOrderReturnedTable${shopOrderReturnedStatus.index}"
+                               class="table table-striped table-bordered table-condensed">
+                            <tr>
+                                <td style="width: 300px;">
+                                    子订单编号(ID):${shopOrderReturneds.shopOrderNo}(${shopOrderReturneds.shopOrderID})
+                                </td>
+                                <td style="width: 250px;">子订单金额:${shopOrderReturneds.productAmount}</td>
+                                <td>
+                                                                                收款状态:
+                                    <c:if test="${shopOrderReturneds.shopReceiptStatus == 1}">
+                                        <font color="red">待收款</font>
+                                    </c:if>
+                                    <c:if test="${shopOrderReturneds.shopReceiptStatus == 2}">
+                                        <font color="#ff8c00">部分收款</font>
+                                    </c:if>
+                                    <c:if test="${shopOrderReturneds.shopReceiptStatus == 3}">
+                                        <font color="green">已收款</font>
+                                    </c:if>
+                                </td>
+                                <td>发货状态:
+                                    <c:if test="${shopOrderReturneds.sendOutStatus == 1}">
+                                        <font color="red">待发货</font>
+                                    </c:if>
+                                    <c:if test="${shopOrderReturneds.sendOutStatus == 2}">
+                                        <font color="#ff8c00">部分发货</font>
+                                    </c:if>
+                                    <c:if test="${shopOrderReturneds.sendOutStatus == 3}">
+                                        <font color="green">已发货</font>
+                                    </c:if>
+                                </td>
+                                <td>付款状态:
+                                    <c:if test="${shopOrderReturneds.payStatus == 1}">
+                                        <font color="red">待付款</font>
+                                    </c:if>
+                                    <c:if test="${shopOrderReturneds.payStatus == 2}">
+                                        <font color="#ff8c00">部分付款</font>
+                                    </c:if>
+                                    <c:if test="${shopOrderReturneds.payStatus == 3}">
+                                        <font color="green">已付款</font>
+                                    </c:if>
+                                </td>
+                                <td>
+                                    退款状态:
+                                    <c:if test="${order.refundStatus == 0}">
+                                        <font>无退款</font>
+                                    </c:if>
+                                    <c:if test="${order.refundStatus == 3}">
+                                        <font>有退款</font>
+                                    </c:if>
+                                </td>
+                                <td>供应商:${shopOrderReturneds.shopName}</td>
+                            </tr>
+
+                                <tr>
+                                    <td>
+                                        商品总额:¥<fmt:formatNumber type="number"
+                                                                value="${shopOrderReturneds.needPayAmount}"
+                                                                pattern="0.00" maxFractionDigits="2"/>
+                                    </td>
+                                    <td>
+                                        优惠:¥<fmt:formatNumber type="number" value="${shopOrderReturneds.eachDiscount}"
+                                                              pattern="0.00" maxFractionDigits="2"/>
+                                    </td>
+                                    <td>
+                                        应付金额:¥<fmt:formatNumber type="number" value="${shopOrderReturneds.realPay}"
+                                                                pattern="0.00" maxFractionDigits="2"/>
+                                    </td>
+                                    <td>
+                                        已付金额:¥<fmt:formatNumber type="number"
+                                                                value="${shopOrderReturneds.receiptAmount}"
+                                                                pattern="0.00" maxFractionDigits="2"/>
+                                    </td>
+                                    <td>
+                                        待付金额:¥<fmt:formatNumber type="number" value="${shopOrderReturneds.restAmount}"
+                                                                pattern="0.00" maxFractionDigits="2"/>
+                                    </td>
+                                </tr>
+                            <c:forEach items="${shopOrderReturneds.cmReturnedPurchaseProductList}"
+                                       var="cmReturnedPurchaseProduct" varStatus="cmReturnedPurchaseProductStatus">
+                                <tr>
+                                    <td rowspan="4" style="width: 295px;height: 125px">
+                                        <img style="width: 100px;height: 100px"
+                                             src="${cmReturnedPurchaseProduct.mainImage}">
+                                        <font title="${cmReturnedPurchaseProduct.name}">${fns:abbr(cmReturnedPurchaseProduct.name,30)}</font>
+                                    </td>
+                                    <td>单价:¥${cmReturnedPurchaseProduct.price}
+                                    <c:if test="${order.organizeID != 4}">
+                                    <td>折扣:${cmReturnedPurchaseProduct.discount}</td>
+                                    <td>折后单价:¥${cmReturnedPurchaseProduct.discountPrice}</td>
+                                    </c:if>
+                                    <td>
+                                        购买数量(赠品数)X${cmReturnedPurchaseProduct.num}(${cmReturnedPurchaseProduct.presentNum})
+                                    </td>
+                                    <td>运费:${order.shopPostFee}</td>
+                                </tr>
+                                <tr>
+                                    <td>规格:${cmReturnedPurchaseProduct.unit}</td>
+                                    <c:if test="${order.organizeID != 4}">
+                                    <td>税率:${cmReturnedPurchaseProduct.taxRate}</td>
+                                    <td>税费:¥${cmReturnedPurchaseProduct.totalAddedValueTax}</td>
+                                    </c:if>
+                                    <td colspan="2">总额:¥${cmReturnedPurchaseProduct.totalFee}</td>
+                                </tr>
+                                <tr>
+                                    <td><font
+                                            color="red">已发货:${cmReturnedPurchaseProduct.num+cmReturnedPurchaseProduct.presentNum - cmReturnedPurchaseProduct.notOutStore}</font>
+                                    </td>
+                                    <td><font color="red">已退货:<span
+                                            id="applicationReturnedNum${shopOrderReturnedStatus.index}${cmReturnedPurchaseProductStatus.index}">${cmReturnedPurchaseProduct.returnedPurchaseProductNum}</span></font>
+                                    </td>
+                                    <td colspan="2"><font color="red">本次退货:
+                                            ${empty cmReturnedPurchaseProduct.actualReturnedNum ? 0 : cmReturnedPurchaseProduct.actualReturnedNum}
+                                    </font>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td><font
+                                            color="red">待发货:${cmReturnedPurchaseProduct.notOutStore }</font>
+                                    </td>
+                                    <td><font color="red">已取消:<span
+                                            id="applicationCancelNum${shopOrderReturnedStatus.index}${cmReturnedPurchaseProductStatus.index}">${cmReturnedPurchaseProduct.cancelProductNum}</span></font>
+                                    </td>
+                                    <td colspan="2"><font color="red">本次取消:
+                                            ${empty cmReturnedPurchaseProduct.actualCancelNum ? 0 : cmReturnedPurchaseProduct.actualCancelNum}
+                                    </font>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                        </table>
+                    </td>
+                </tr>
+            </c:forEach>
+
+        </table>
+    </form:form>
+</c:forEach>
+
+<c:if test="${empty cmReturnedPurchaseList}">
+    <p style="text-align: center;"><font color="#1e90ff">暂无退货退款详情记录.....</font></p>
+</c:if>
+<c:if test="${not empty cmReturnedPurchaseList and order.organizeID != 4}">
+    <table id="orderTable" class="table table-striped table-bordered table-condensed">
+        <tr>
+            <td>
+                <div class="order-rows">
+                    <label>发票信息:</label>
+                    <input id="invoice1" class="invoice1" name="invoice"
+                           type="radio" ${order.orderInvoice.type == 0 ? 'checked="checked"':''} disabled="disabled">
+                    <label for="invoice1">不需要发票</label>
+                    <input id="invoice2" name="invoice"
+                           type="radio" ${order.orderInvoice.type == 1 ? 'checked="checked"':''} disabled="disabled">
+                    <label for="invoice2">普通发票</label>
+                    <input id="invoice3" name="invoice"
+                           type="radio" ${order.orderInvoice.type == 2 ? 'checked="checked"':''} disabled="disabled">
+                    <label for="invoice3">增值税发票</label>
+                    <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>
+                        </div>
+                    </c:if>
+                    <c:if test="${order.orderInvoice.type == 2}">
+                        <table>
+                            <tr>
+                                <td><span>单位名称:${order.orderInvoice.invoiceTitle}</span></td>
+                                <td><span>纳税人识别号:${order.orderInvoice.corporationTaxNum}</span></td>
+                                <td><span>注册地址:${order.orderInvoice.registeredAddress}</span></td>
+                            </tr>
+                            <tr>
+                                <td><span>注册电话:${order.orderInvoice.registeredPhone}</span></td>
+                                <td><span>开户银行:${order.orderInvoice.openBank}</span></td>
+                                <td><span>银行账号:${order.orderInvoice.bankAccountNo}</span></td>
+                            </tr>
+                        </table>
+                    </c:if>
+                </div>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <div class="order-rows">
+                    <label>售后条款:</label>
+                    <c:forEach items="${bpClauses}" var="items" varStatus="index">
+                        <c:if test="${items.clauseType ne 0  }">
+                <span>
+                    <input id="clauseId${index.index+1}" class="clauseId" name="clauseID" type="radio"
+                           value="${items.id}"${(order.clauseID)==(items.id)?'checked="checked"':''}
+                           class="required" class="clauseId" disabled="disabled">
+                    <c:if test="${order.clauseID eq 1}">
+                        无条款
+                    </c:if>
+                    <c:if test="${order.clauseID ne 1}">
+                        <a href="javascript:void(0);"
+                           onclick="openClauseInfo(${index.index+1});"><label>${order.clauseName}</label></a>
+                    </c:if>
+                </span>
+                        </c:if>
+                    </c:forEach>
+                </div>
+            </td>
+        </tr>
+    </table>
+
+</c:if>
+
+
+<script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/loadAddress.js"></script>
+<script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/orderForm.js"></script>
+<script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/stages.js"></script>
+<script>
+    $(function () {
+        $('.print-now').on('click', function () {
+            window.print();
+        })
+    });
+
+    (function () {
+        $('body').click(function (e) {
+            var target = $(e.target),
+                $block = $('.operation-block');
+            if (target.is('.operation-btn')) {
+                if ($block.css('display') === 'none') {
+                    $block.show();
+                } else {
+                    $block.hide();
+                }
+            }
+            if (!target.is('.operation-block') && !target.is('.operation-btn')) {
+                $block.hide();
+            }
+        });
+
+        $('.clauseId').each(function () {
+            var self = $(this);
+            if (!self.prop("checked")) {
+                self.parent().hide();
+            } else {
+                self.hide();
+            }
+        });
+
+        $('#invoice1, #invoice2, #invoice3').each(function () {
+            var self = $(this);
+            if (!self.prop("checked")) {
+                self.next().remove();
+                self.remove();
+            } else {
+                self.remove();
+            }
+        })
+
+        $('body').on('mouseover', '.enlarge-pic', function () {
+            var thisSrc = $(this).attr('src'),
+                enlargeBox = $('#enlarge-box');
+            if (thisSrc) {
+                enlargeBox.show(50);
+                $('#enlarge-box').find('img').attr('src', thisSrc);
+            }
+        })
+
+        $('body').on('mouseout', '.enlarge-pic', function () {
+            var enlargeBox = $('#enlarge-box');
+            enlargeBox.hide();
+        })
+    })();
+
+</script>
+</body>
+</html>

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

@@ -426,7 +426,7 @@
                         <th colspan="2">子订单金额</th>
 <%--                        <th colspan="3">所有子订单</th>--%>
 <%--                        <th>订单总佣金</th>--%>
-                        <th colspan="4">平台服务费</th>
+                        <th colspan="4">采美平台服务费</th>
 <%--                        <th>机构运费</th>--%>
                         <th colspan="2">收款状态</th>
                         <th colspan="3">收款金额</th>
@@ -532,7 +532,7 @@
                     <tr>
                         <th>客户</th>
                         <th colspan="3"> 供应商</th>
-                        <th colspan="3">订单利润</th>
+                        <th colspan="3">采美自营订单利润</th>
                         <th colspan="3">商品费</th>
                         <th>应付税费</th>
                         <th>机构运费</th>

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

@@ -510,8 +510,8 @@
         <td>订单可见度:</td>
         <td style="position: relative;"><a class="operation-btn btn"
                                            onclick="operation(${order.shopOrderID})">功能</a>
-            <div style="position: relative;">
-                <div class="operation-block ${order.shopOrderID}">
+            <div style="position: absolute;">
+                <div class="operation-block ${order.shopOrderID}" style="position: sticky;">
                     <shiro:hasPermission name="order:order:edit">
                         <%--包含订单充值商品就不显示--%>
                         <c:if test="${order.status == 0}">
@@ -524,8 +524,8 @@
                     <shiro:hasPermission name="order:order:edit">
                         <%--包含订单充值商品就不显示--%>
                         <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}">发货记录</a>
-                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}&from=2">收付款记录</a>
-                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?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>
                         <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=2&shopOrderID=${order.shopOrderID}">订单备注</a>
                     </shiro:hasPermission>
                 </div>