Browse Source

付第三方

zhijiezhao 1 year ago
parent
commit
a60545110d

+ 2 - 0
src/main/java/com/caimei/modules/order/dao/CmPayShopDao.java

@@ -35,4 +35,6 @@ public interface CmPayShopDao extends CrudDao<CmPayShop> {
     List<Product> priceNum(@Param("orderNo") String orderNo);
 
     List<CmPayShop> payThirdParties(CmPayShop cmPayShop);
+
+    List<CmPayShop> findOtherList(CmPayShop cmPayShop);
 }

+ 4 - 0
src/main/java/com/caimei/modules/order/entity/ChangePayShopOther.java

@@ -14,6 +14,10 @@ import java.util.Date;
  */
 @Data
 public class ChangePayShopOther implements Serializable {
+    /**
+     * 页面类型 1为账户归属供应商付款列表
+     */
+    private Integer otherType;
     /**
      * 采美中介费开户名
      */

+ 37 - 0
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -1557,4 +1557,41 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             }
         }
     }
+
+    public Page<CmPayShop> findOtherList(Page<CmPayShop> cmPayShopPage, CmPayShop cmPayShop) {
+        cmPayShop.setPage(cmPayShopPage);
+        List<CmPayShop> payList = cmPayShopDao.findOtherList(cmPayShop);
+        for (CmPayShop payShop : payList) {
+            List<NewShopOrder> newShopOrders = cmPayShopDao.orderList(payShop.getId());
+            payShop.setShopOrders(newShopOrders);
+            if (payShop.getStatus().equals("2")) {
+                List<Integer> ids = new ArrayList<>();
+                for (NewShopOrder newShopOrder : newShopOrders) {
+                    ids.add(newShopOrder.getShopOrderID());
+                }
+                List<Integer> id = cmPayShopDao.hasReapply(payShop.getId(), ids);
+                if (id.isEmpty()) {
+                    //可以重申
+                    payShop.setRePayment("1");
+                } else {
+                    //不能重申
+                    payShop.setRePayment("2");
+                }
+            }
+            newShopOrders.forEach(shopOrder -> {
+                if (null != shopOrder) {
+                    NewOrder order = newOrderDao.findByOrderID(shopOrder.getOrderID());
+                    if (null != order && "2".equals(order.getOrderType())) {
+                        //呵呵商城订单
+                        shopOrder.setOrderType(2);
+                        if (StringUtils.isBlank(shopOrder.getClubName())) {
+                            String name = heHeNewOrderDao.findHeUser(order.getUserID());
+                            shopOrder.setClubName(name);
+                        }
+                    }
+                }
+            });
+        }
+        return cmPayShopPage.setList(payList);
+    }
 }

+ 38 - 5
src/main/java/com/caimei/modules/order/web/CmPayShopController.java

@@ -112,6 +112,33 @@ public class CmPayShopController extends BaseController {
         return "modules/order/cmPayFormList";
     }
 
+    @RequiresPermissions("order:cmPayShop:view")
+    @RequestMapping(value = "payOtherList")
+    public String payOtherList(CmPayShop cmPayShop, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if (null != cmPayShop.getStartTime() && !"".equals(cmPayShop.getStartTime()) && !cmPayShop.getStartTime().endsWith("00:00:00")) {
+            model.addAttribute("startTime", cmPayShop.getStartTime());
+            cmPayShop.setStartTime(cmPayShop.getStartTime().trim() + " 00:00:00");
+        }
+        if (null != cmPayShop.getEndTime() && !"".equals(cmPayShop.getEndTime()) && !cmPayShop.getEndTime().endsWith("23:59:59")) {
+            model.addAttribute("endTime", cmPayShop.getEndTime());
+            cmPayShop.setEndTime(cmPayShop.getEndTime().trim() + " 23:59:59");
+        }
+        if (null != cmPayShop.getStartTime2() && !"".equals(cmPayShop.getStartTime2()) && !cmPayShop.getStartTime2().endsWith("00:00:00")) {
+            model.addAttribute("startTime2", cmPayShop.getStartTime2());
+            cmPayShop.setStartTime2(cmPayShop.getStartTime2().trim() + " 00:00:00");
+        }
+        if (null != cmPayShop.getEndTime2() && !"".equals(cmPayShop.getEndTime2()) && !cmPayShop.getEndTime2().endsWith("23:59:59")) {
+            model.addAttribute("endTime2", cmPayShop.getEndTime2());
+            cmPayShop.setEndTime2(cmPayShop.getEndTime2().trim() + " 23:59:59");
+        }
+        Page<CmPayShop> page = cmPayShopService.findOtherList(new Page<CmPayShop>(request, response), cmPayShop);
+        //获取组织列表
+        List<CmUserOrganize> cmUserOrganizeList = cmUserOrganizeService.findOrganize();
+        model.addAttribute("cmUserOrganizeList", cmUserOrganizeList);
+        model.addAttribute("page", page);
+        return "modules/order/cmPayOtherFormList";
+    }
+
     @RequiresPermissions("order:cmPayShop:view")
     @RequestMapping(value = "payList")
     public String payList(CmPayShop cmPayShop, HttpServletRequest request, HttpServletResponse response, Model model) {
@@ -524,7 +551,7 @@ public class CmPayShopController extends BaseController {
 //        }
         if (1 == shopOrder.getCmAccountType()) {
             // 所有私账订单子订单利润算为付第三方采美中介费
-           shopOrder.setCmShopOtherFee(newShopOrderService.findProfit(shopOrder.getShopOrderID()));
+            shopOrder.setCmShopOtherFee(newShopOrderService.findProfit(shopOrder.getShopOrderID()));
         }
         shopOrder.setRebateOrder(newShopOrder.getRebateOrder());
         shopOrder.setSupplierFreight(freight); //运费
@@ -1018,7 +1045,7 @@ public class CmPayShopController extends BaseController {
      * 付第三方数据回显
      */
     @RequestMapping("shopOtherFeeForm")
-    public String shopOtherFeeForm(Integer shopOrderId, Integer payType, Model model) {
+    public String shopOtherFeeForm(Integer shopOrderId, Integer payType, Integer otherType, Model model) {
         ChangePayShopOther payShopOther = cmPayShopService.shopOtherFeeForm(shopOrderId);
         payShopOther.setShopOrderId(shopOrderId);
         NewShopOrder shopOrder = newShopOrderService.findByShopOrderID(shopOrderId);
@@ -1037,6 +1064,8 @@ public class CmPayShopController extends BaseController {
         model.addAttribute("shouldPayShopAmount", shopOrder.getShouldPayShopAmount());
         model.addAttribute("payShopOther", payShopOther);
         model.addAttribute("payType", payType);
+        otherType = null == otherType ? 0 : otherType;
+        model.addAttribute("otherType", otherType);
         return "modules/order/shopOtherFeeForm";
     }
 
@@ -1047,10 +1076,14 @@ public class CmPayShopController extends BaseController {
     public String saveShopOtherFee(ChangePayShopOther payShopOther, RedirectAttributes redirectAttributes) {
         cmPayShopService.saveShopOtherFee(payShopOther);
         addMessage(redirectAttributes, "保存成功");
-        if ((null != payShopOther.getPayType() && 2 == payShopOther.getPayType()) || 2 == payShopOther.getRedirectType()) {
-            return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/payList?repage";
+        if (null != payShopOther.getOtherType() && 1 == payShopOther.getOtherType()) {
+            return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/payOtherList?repage";
+        }else{
+            if ((null != payShopOther.getPayType() && 2 == payShopOther.getPayType()) || 2 == payShopOther.getRedirectType()) {
+                return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/payList?repage";
+            }
+            return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/?repage";
         }
-        return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/?repage";
     }
 
     /**

+ 88 - 0
src/main/resources/mappings/modules/order/CmPayShopMapper.xml

@@ -406,4 +406,92 @@
 		ORDER BY
 		  receiptDate DESC
 	</select>
+
+	<select id="findOtherList" resultType="com.caimei.modules.order.entity.CmPayShop">
+		SELECT
+		<include refid="cmPayShopColumns"/>,
+		u1.name AS applicantName,
+		u2.name AS reviewerName,
+		s.name AS shopName,
+		a.otherFeeFlag,
+		a.cmBankAccountName,
+		a.cmBankAccount,
+		a.cmBankName,
+		ifnull(psr.payCmAmount,0) as cmShopOtherFee,
+		(SELECT paymentType FROM cm_pay_shop_record WHERE payShopID = a.id LIMIT 1) AS paymentType
+		FROM cm_pay_shop a
+		left join sys_user u1 on u1.id = a.applicant
+		left join sys_user u2 on u2.id = a.reviewer
+		left join shop s on s.shopID = a.shopID
+		LEFT JOIN cm_pay_shop_record psr ON psr.payShopID = a.id
+		LEFT JOIN cm_shop_order so ON so.shopOrderID = psr.shopOrderID
+		LEFT JOIN cm_receipt_order_relation cror ON cror.shopOrderId = so.shopOrderId and cror.delFlag = 0
+		LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id and cdr.delFlag = 0
+		<where>
+			s.AccountOwnership = 1
+			and so.shopStatus not in (4, 5)
+			and IFNULL(cdr.receiptType,0) not in (10,11)
+			and cdr.payWay = 2
+			and so.delFlag = '0'
+			and (so.organizeID!=4 or so.organizeID is null)
+			and a.shopID != 998
+			<if test="id != null and id != ''">
+				and a.id = #{id}
+			</if>
+			<if test="shopName != null and shopName != ''">
+				and s.name like concat('%', #{shopName}, '%')
+			</if>
+			<if test="name != null and name != ''">
+				AND a.name LIKE
+				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+			</if>
+			<if test="startTime != null and startTime != ''">
+				AND a.applyTime <![CDATA[  >=  ]]> #{startTime}
+			</if>
+			<if test="endTime != null and endTime != ''">
+				AND a.applyTime <![CDATA[   <=  ]]> #{endTime}
+			</if>
+			<if test="startTime2 != null and startTime2 != ''">
+				AND a.payTime <![CDATA[  >=  ]]> #{startTime2}
+			</if>
+			<if test="endTime2 != null and endTime2 != ''">
+				AND a.payTime <![CDATA[   <=  ]]> #{endTime2}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			<if test="shopOrderNo != null and shopOrderNo != ''">
+				AND a.id in (select cpsr.payShopID from cm_pay_shop_record cpsr where cpsr.shopOrderNo like concat('%',#{shopOrderNo},'%'))
+			</if>
+			<if test="shopOrderID != null and shopOrderID != ''">
+				AND a.id in (SELECT cpsr.payShopID FROM cm_pay_shop_record cpsr WHERE cpsr.shopOrderID=#{shopOrderID})
+			</if>
+			<if test="orderID != null and orderID != ''">
+				AND a.id in (SELECT cpsr.payShopID FROM cm_pay_shop_record  cpsr LEFT JOIN cm_shop_order so ON so.shopOrderID=cpsr.shopOrderID WHERE so.orderID=#{orderID})
+			</if>
+			<if test='organizeID != null and organizeID != "" and organizeID != "9999"'>
+				AND a.id in (SELECT cpsr.payShopID FROM cm_pay_shop_record  cpsr LEFT JOIN cm_shop_order so ON so.shopOrderID=cpsr.shopOrderID WHERE so.organizeID = #{organizeID})
+			</if>
+			<if test='organizeID == "9999"'>
+				AND a.id IN (SELECT cpsr.payShopID FROM cm_pay_shop_record  cpsr LEFT JOIN cm_shop_order so ON so.shopOrderID=cpsr.shopOrderID WHERE so.orderType = 2)
+			</if>
+			<if test="orderNo != null and orderNo != ''">
+				AND a.id in (SELECT cpsr.payShopID FROM cm_pay_shop_record  cpsr LEFT JOIN cm_shop_order so ON so.shopOrderID=cpsr.shopOrderID WHERE so.orderNo LIKE CONCAT('%',#{orderNo},'%'))
+			</if>
+			<if test="paymentType != null">
+				AND a.id IN(SELECT payShopID FROM cm_pay_shop_record WHERE paymentType = #{paymentType} AND delFlag = 0)
+			</if>
+		</where>
+		GROUP BY a.id
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.id desc
+			</otherwise>
+		</choose>
+	</select>
 </mapper>

+ 334 - 0
src/main/webapp/WEB-INF/views/modules/order/cmPayOtherFormList.jsp

@@ -0,0 +1,334 @@
+<%@ 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 type="text/css">
+        .table th {
+            text-align: center
+        }
+
+        .table td {
+            text-align: center
+        }
+
+        #searchForm {
+            white-space: nowrap
+        }
+
+        .ul-form {
+            white-space: nowrap;
+            margin-left: -10px !important
+        }
+
+        .ul-form label {
+            width: 90px;
+            text-align: left;
+            margin-top: 15px
+        }
+
+        .time-space-symbols {
+            width: 100px;
+            display: inline-block;
+            text-align: center
+        }
+
+        #btnSubmit {
+            width: 128px;
+            margin-left: 80%
+        }
+
+        .td-a {
+            width: 100%;
+            float: left;
+            display: block;
+            text-align: center
+        }
+
+        @media screen and (max-width: 1300px) {
+            #searchForm {
+                width: 1460px !important
+            }
+
+            .nav-tabs, #contentTable {
+                width: 1490px !important
+            }
+        }
+
+        .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 () {
+
+        });
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        $(function () {
+            $('#export').click(function () {
+                var formData = $('#searchForm').serialize();
+                window.location.href = "${ctx}/order/cmPayShop/export?" + formData;
+            });
+        })
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li class="active"><a href="${ctx}/order/cmPayShop/payOtherList">付款列表</a></li>
+    <li><a href="${ctx}/shopOrder/payOtherList">申请付第三方-线下订单</a></li>
+</ul>
+<form:form id="searchForm" modelAttribute="cmPayShop" action="${ctx}/order/cmPayShop/" method="post"
+           class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="ul-form">
+        <div>
+            <label>子订单ID:</label>
+            <form:input path="shopOrderID" htmlEscape="false" maxlength="20" class="input-medium"/>
+            <label>子订单编号:</label>
+            <form:input path="shopOrderNo" htmlEscape="false" maxlength="20" class="input-medium"/>
+            <label>订单ID:</label>
+            <form:input path="orderID" htmlEscape="false" maxlength="20" class="input-medium"/>
+            <label>订单编号:</label>
+            <form:input path="orderNo" htmlEscape="false" maxlength="20" class="input-medium"/>
+        </div>
+        <div>
+            <label>付款单ID:</label>
+            <form:input path="id" htmlEscape="false" maxlength="50" class="input-medium"/>
+            <label>供应商:</label>
+            <form:input path="shopName" htmlEscape="false" maxlength="50" class="input-medium"/>
+
+            <label>付款单名称:</label>
+            <form:input path="name" htmlEscape="false" maxlength="250" class="input-medium"/>
+            <label>付款审核状态:</label>
+            <form:select path="status" class="input-medium">
+                <form:option value="" label="所有"/>
+                <form:options items="${fns:getDictList('pay_shop_status')}" itemLabel="label" itemValue="value"
+                              htmlEscape="false"/>
+            </form:select>&nbsp;&nbsp;&nbsp;&nbsp;
+
+        </div>
+        <div>
+            <label>申请时间:</label>
+            <form:input path="startTime" type="text" maxlength="20" class="input-medium Wdate" value="${startTime}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            <span class="time-space-symbols">至</span>
+            <form:input path="endTime" type="text" maxlength="20" class="input-medium Wdate" value="${endTime}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            <label>付款时间:</label>
+            <form:input path="startTime2" type="text" maxlength="20" class="input-medium Wdate" value="${startTime2}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            <span class="time-space-symbols">至</span>
+            <form:input path="endTime2" type="text" maxlength="20" class="input-medium Wdate" value="${endTime2}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        </div>
+        <div>
+            <label>组织:</label>
+            <form:select path="organizeID" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="0" label="采美"/>
+                <form:option value="9999" label="呵呵商城"/>
+                <c:forEach items="${cmUserOrganizeList}" var="organize">
+                    <c:if test="${organize.id!=4}">
+                        <form:option value="${organize.id}" label="${organize.organizeName}"/>
+                    </c:if>
+                </c:forEach>
+                <%--					<form:options items="${cmUserOrganizeList}" itemLabel="organizeName" itemValue="id"--%>
+                <%--								  htmlEscape="false"/>--%>
+            </form:select>&nbsp;&nbsp;&nbsp;&nbsp;
+            <label>付款类型:</label>
+            <form:select path="paymentType" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="付款子订单"/>
+                <form:option value="2" label="供应商差价"/>
+                <form:option value="3" label="付第三方"/>
+            </form:select>
+            <label><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label><input
+                id="export" class="btn btn-primary" value="导出筛选结果"/></label>
+        </div>
+
+
+        <div class="clearfix"></div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr style="width:30%">
+        <th>付款单ID</th>
+        <th style="width:150px">付款单名称</th>
+        <th>付款类型</th>
+        <th>供应商</th>
+        <th>付款金额</th>
+        <th>子订单编号(ID)</th>
+        <th>订单编号(ID)</th>
+        <th>机构</th>
+        <th>申请人</th>
+        <th>申请日期</th>
+        <th>审核人</th>
+        <th>审核时间</th>
+        <th>付款审核状态</th>
+        <shiro:hasPermission name="order:cmPayShop:edit">
+            <th>操作</th>
+        </shiro:hasPermission>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="cmPayShop">
+        <tr>
+            <td>${cmPayShop.id}</td>
+            <td>${cmPayShop.name}</td>
+            <td>
+                    ${cmPayShop.paymentType eq 2 ? "供应商差价":(cmPayShop.paymentType eq 3 ? "付第三方":"子订单付款")}
+            </td>
+            <td>${cmPayShop.shopName}</td>
+            <td>
+                <c:choose>
+                    <c:when test="${cmPayShop.paymentType eq 3}">
+                        ${cmPayShop.cmShopOtherFee + cmPayShop.totalAmount}
+                        <font color="red">
+                            <c:if test="${not empty cmPayShop.cmShopOtherFee and cmPayShop.cmShopOtherFee > 0 and not empty cmPayShop.totalAmount and cmPayShop.totalAmount > 0}">
+                                (采美中介费¥${cmPayShop.cmShopOtherFee},第三方中介费¥${cmPayShop.totalAmount})
+                            </c:if>
+                            <c:if test="${(empty cmPayShop.cmShopOtherFee or cmPayShop.cmShopOtherFee eq 0) and not empty cmPayShop.totalAmount and cmPayShop.totalAmount > 0}">
+                                (第三方中介费¥${cmPayShop.totalAmount})
+                            </c:if>
+                            <c:if test="${(not empty cmPayShop.cmShopOtherFee and cmPayShop.cmShopOtherFee > 0) and (empty cmPayShop.totalAmount or cmPayShop.totalAmount eq 0)}">
+                                (采美中介费¥${cmPayShop.cmShopOtherFee})
+                            </c:if>
+                        </font>
+                    </c:when>
+                    <c:otherwise>
+                        <fmt:formatNumber value="${cmPayShop.totalAmount}" type="number" pattern="#,##0.00"/>
+                        <c:if test="${cmPayShop.wipePayment > 0}">
+                            <br><font color="red">付款抹平¥<fmt:formatNumber value="${cmPayShop.wipePayment}" type="number"
+                                                                         pattern="#,##0.00"/></font>
+                        </c:if>
+                    </c:otherwise>
+                </c:choose>
+            </td>
+            <td>
+                <c:forEach items="${cmPayShop.shopOrders}" var="shopOrder">
+                    <a href="${ctx}/order/detail?id=${shopOrder.orderID}">${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})</a><br>
+                </c:forEach>
+            </td>
+            <td>
+                <c:forEach items="${cmPayShop.shopOrders}" var="shopOrder">
+                    <a href="${ctx}/order/detail?id=${shopOrder.orderID}">${shopOrder.orderNo}(${shopOrder.orderID})</a><br>
+                </c:forEach>
+            </td>
+            <td>
+                <c:forEach items="${cmPayShop.shopOrders}" var="shopOrder">
+                    <c:if test="${shopOrder.organizeID eq 1}">
+                        <span class="org-note">星范</span>
+                    </c:if>
+                    ${shopOrder.clubName}
+                    <c:if test="${shopOrder.orderType eq 2}">
+                        <span><font color="red">(呵呵商城)</font></span>
+                    </c:if>
+                    <c:if test="${shopOrder.organizeID == 3}">
+
+                    </c:if><br>
+                </c:forEach>
+            </td>
+
+            <td>
+                    ${cmPayShop.payType eq '6'? '系统自动':cmPayShop.applicantName}
+            </td>
+            <td>${cmPayShop.applyTime}</td>
+            <td>
+                    ${cmPayShop.payType eq '6'? '系统自动':cmPayShop.reviewerName}
+            </td>
+            <td>${cmPayShop.reviewTime}</td>
+            <td>
+                <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'}">
+                    审核不通过<br><font color="red">原因: ${cmPayShop.reason}</font>
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${cmPayShop.payType ne '6' && cmPayShop.status == '1'}">
+                    <shiro:hasPermission name="order:cmPayShop:check">
+                        <a class="td-a" href="${ctx}/order/cmPayShop/applyCompile?id=${cmPayShop.id}">编辑</a>
+                    </shiro:hasPermission>
+                </c:if>
+                <shiro:hasPermission name="order:cmPayShop:detail">
+                    <a class="td-a" href="${ctx}/order/cmPayShop/applyDetail?id=${cmPayShop.id}">查看详情</a>
+                </shiro:hasPermission>
+                <c:if test="${cmPayShop.status == '0'}">
+                    <shiro:hasPermission name="order:cmPayShop:apply">
+                        <c:if test="${cmPayShop.paymentType ne 3 && cmPayShop.paymentType ne 2}">
+                            <a class="td-a" href="${ctx}/order/cmPayShop/applyEdit?id=${cmPayShop.id}">申请付款</a>
+                        </c:if>
+                        <c:if test="${cmPayShop.paymentType eq 3 && cmPayShop.paymentType ne 2}">
+                            <a class="td-a" href="${ctx}/order/cmPayShop/shopOtherApplyEdit?payShopId=${cmPayShop.id}">申请付款</a>
+                        </c:if>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="order:cmPayShop:cancel">
+                        <a class="td-a" href="${ctx}/order/cmPayShop/cancel?id=${cmPayShop.id}"
+                           onclick="return confirmx('确定要取消此次付款申请吗?', this.href)">取消付款</a>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="order:cmPayShop:check">
+                        <a class="td-a" href="${ctx}/order/cmPayShop/toCheck?id=${cmPayShop.id}">付款审核</a>
+                    </shiro:hasPermission>
+                </c:if>
+                <c:if test="${cmPayShop.payType ne '6' && cmPayShop.status == '1'}">
+                    <shiro:hasPermission name="order:cmPayShop:rollBack">
+                        <a class="td-a" href="${ctx}/order/cmPayShop/rollBackApply?id=${cmPayShop.id}&redirectType=1"
+                           onclick="return confirmx('确定要撤销审核流程,重新来过吗?', this.href)">撤销重来</a>
+                    </shiro:hasPermission>
+                </c:if>
+                <c:if test="${cmPayShop.status == '2'}">
+                    <shiro:hasPermission name="order:cmPayShop:apply">
+                        <c:if test="${cmPayShop.rePayment == '1' && cmPayShop.paymentType ne 2}">
+                            <c:if test="${cmPayShop.paymentType ne 3}">
+                                <a class="td-a" href="${ctx}/order/cmPayShop/applyEdit?id=${cmPayShop.id}">重申付款</a>
+                            </c:if>
+                            <c:if test="${cmPayShop.paymentType eq 3}">
+                                <a class="td-a"
+                                   href="${ctx}/order/cmPayShop/shopOtherApplyEdit?payShopId=${cmPayShop.id}">重申付款</a>
+                            </c:if>
+                        </c:if>
+                        <c:if test="${cmPayShop.rePayment == '2'}">重申付款</c:if>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="order:cmPayShop:cancel">
+                        <a class="td-a" href="${ctx}/order/cmPayShop/cancel?id=${cmPayShop.id}"
+                           onclick="return confirmx('确定要取消此次付款申请吗?', this.href)">取消付款</a>
+                    </shiro:hasPermission>
+                </c:if>
+                <c:if test="${cmPayShop.status == '1'}">
+                    <shiro:hasPermission name="order:cmPayShop:detail">
+                        <a class="td-a" href="${ctx}/order/cmPayShop/printDetail?id=${cmPayShop.id}">打印</a>
+                    </shiro:hasPermission>
+                </c:if>
+            </td>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+</body>
+</html>

+ 39 - 18
src/main/webapp/WEB-INF/views/modules/order/paidShopOtherList.jsp

@@ -235,7 +235,16 @@
             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}
+        .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">
@@ -249,6 +258,7 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/cmPayShop/payOtherList/">付款列表</a></li>
     <li class="active tab-li"><a href="${ctx}/shopOrder/payOtherList">申请付第三方-线下订单</a></li>
 </ul>
 <form:form id="searchForm" onsubmit="submitFunc()" modelAttribute="newShopOrder" action="${ctx}/shopOrder/payOtherList"
@@ -299,7 +309,8 @@
             <table class="table table-striped table-bordered table-condensed pay-table">
                 <tr>
                     <th style="width:20px;">
-                        <input type="checkbox" ${s.status eq 7 ?'disabled':''} data-shoporderid="${s.shopOrderID}" data-shopid="${s.shopID}" data-isPayShopOtherFee="${s.payShopOtherFee}"/>
+                        <input type="checkbox" ${s.status eq 7 ?'disabled':''} data-shoporderid="${s.shopOrderID}"
+                               data-shopid="${s.shopID}" data-isPayShopOtherFee="${s.payShopOtherFee}"/>
                     </th>
                     <th>子订单编号(ID)</th>
                     <th colspan="3">订单编号(ID)</th>
@@ -317,12 +328,15 @@
                     <td colspan="2"><fmt:formatNumber value="${s.payTotalFee}" type="number" pattern="#,##0.00"/></td>
                     <td colspan="3">${s.orderTime}</td>
                         <%--此处对应订单列表收款状态--%>
-                    <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&shopOrderID=${s.shopOrderID}&from=1" style="text-decoration: underline">
-                        <c:if test="${s.receiptStatus == 1}"><font color="red">待收款</font></c:if>
-                        <c:if test="${s.receiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
-                        <c:if test="${s.receiptStatus == 3}"><font color="green">已收款</font></c:if></a>
+                    <td>
+                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&shopOrderID=${s.shopOrderID}&from=1"
+                           style="text-decoration: underline">
+                            <c:if test="${s.receiptStatus == 1}"><font color="red">待收款</font></c:if>
+                            <c:if test="${s.receiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
+                            <c:if test="${s.receiptStatus == 3}"><font color="green">已收款</font></c:if></a>
                     </td>
-                    <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">${s.receiptTotalFee}</a></td>
+                    <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
+                           style="text-decoration: underline">${s.receiptTotalFee}</a></td>
                     <td colspan="3">
                         <fmt:formatNumber value="${s.promotionFullReduction}" type="number" pattern="#,##0.00"/>
                     </td>
@@ -369,29 +383,36 @@
                             <br><font color="red">(采美豆抵用:${s.userBeans})</font>
                         </c:if>
                     </td>
-                    <td class="freight"><fmt:formatNumber value="${empty s.supplierFreight ? 0 : s.supplierFreight}" type="number"
+                    <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"
                                                                           pattern="#,##0.00"/></td>
                     <td colspan="2">
-                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&shopOrderID=${s.shopOrderID}&from=1" style="text-decoration: underline">
-                        <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>
+                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&shopOrderID=${s.shopOrderID}&from=1"
+                           style="text-decoration: underline">
+                            <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>
                         </a>
                     </td>
                     <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number"
                                                                     pattern="#,##0.00"/></td>
                     <td class="supplier-fee">
                         <c:if test="${s.differenceType ne 1 && s.differenceType ne 2 }">
-                        <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount-s.shopOtherFee}" type="number"
-                                                                pattern="#,##0.00"/></font>
+                            <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount-s.shopOtherFee}"
+                                                                    type="number"
+                                                                    pattern="#,##0.00"/></font>
                         </c:if>
                         <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
-                            <font color="black"><fmt:formatNumber value="${s.shouldPayShopAmount+s.differencePrice-s.shopOtherFee}"/></font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
+                            <font color="black"><fmt:formatNumber
+                                    value="${s.shouldPayShopAmount+s.differencePrice-s.shopOtherFee}"/></font><font
+                                color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
                         </c:if>
                         <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
-                            <font color="black"><fmt:formatNumber value="${s.shouldPayShopAmount-s.differencePrice-s.shopOtherFee}"/></font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
+                            <font color="black"><fmt:formatNumber
+                                    value="${s.shouldPayShopAmount-s.differencePrice-s.shopOtherFee}"/></font><font
+                                color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
                         </c:if>
                     </td>
                     <input type="hidden" class="payedShopAmount" value="${s.payedShopAmount}">
@@ -401,7 +422,7 @@
                     <input type="hidden" class="modifyShouldPayNote" value="${s.modifyShouldPayNote}">
                     <td class="third-party-fee">
                         <fmt:formatNumber value="${s.shopOtherFee}" type="number"
-                                                                  pattern="#,##0.00"/>
+                                          pattern="#,##0.00"/>
                         <c:if test="${s.shopOtherFee > 0 and s.cmShopOtherFee > 0}">
                             <font color="red">(采美中介费¥${s.cmShopOtherFee},第三方中介费¥${s.shopOtherFee})</font>
                         </c:if>
@@ -528,7 +549,7 @@
                 return false;
             }
             var shopOrderId = $(checked[0]).attr('data-shoporderid');
-            window.location.href = '${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=' + shopOrderId;
+            window.location.href = '${ctx}/order/cmPayShop/shopOtherFeeForm?otherType=1&shopOrderId=' + shopOrderId;
         });
 
     })();

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

@@ -234,6 +234,7 @@
            class="form-horizontal">
     <form:hidden path="shopOrderId"/>
     <input style="display: none" name="payType" value="${payType}"/>
+    <input style="display: none" name="otherType" value="${otherType}"/>
     <div class="control-group">
         <label class="control-label"><font color='red'>*</font>付款单名称:</label>
         <div class="controls">