huangzhiguo 1 year ago
parent
commit
188ade1ac2

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

@@ -1049,6 +1049,9 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             payShop.setApplyTime(format);
             payShop.setReviewTime(format);
             status = "1";
+            //已付第三方金额
+            BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(payShopOther.getShopOrderId());
+            newShopOrderDao.updateByShopOtherFee(MathUtil.add(shopOtherFee, payShopOther.getShopOtherFee()), payShopOther.getShopOrderId());
         } else {
             payShop.setBankAccountName(payShopOther.getBankAccountName());
             payShop.setBankAccount(payShopOther.getBankAccount());

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

@@ -1007,6 +1007,9 @@ public class CmPayShopController extends BaseController {
             logger.info(e.getMessage());
             e.printStackTrace();
         }
+        if (null != cmPayShop.getRedirectType() && 2 == cmPayShop.getRedirectType()) {
+            return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/payList?repage";
+        }
         return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/?repage";
     }
 
@@ -1031,11 +1034,11 @@ public class CmPayShopController extends BaseController {
                 addMessage(redirectAttributes, e.getMessage());
             }
         }
-        if (2 == cmPayShop.getRedirectType()) {
+        if (null != cmPayShop.getRedirectType() && 2 == cmPayShop.getRedirectType()) {
             return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/payList?repage";
-        } else {
-            return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/?repage";
         }
+        return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/?repage";
+
     }
 
     /**

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

@@ -45,7 +45,7 @@
     </shiro:hasPermission>
     <li><a href="${ctx}/shopOrder/settlement">子订单手动结算</a></li>
 </ul>
-<form:form id="searchForm" modelAttribute="cmPayShop" action="${ctx}/order/cmPayShop/" method="post" class="breadcrumb form-search">
+<form:form id="searchForm" modelAttribute="cmPayShop" action="${ctx}/order/cmPayShop/payList" 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">
@@ -202,27 +202,27 @@
             <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>
+                        <a class="td-a" href="${ctx}/order/cmPayShop/applyCompile?id=${cmPayShop.id}&redirectType=2">编辑</a>
                     </shiro:hasPermission>
                 </c:if>
                 <shiro:hasPermission name="order:cmPayShop:detail">
-                    <a class="td-a" href="${ctx}/order/cmPayShop/applyDetail?id=${cmPayShop.id}">查看详情</a>
+                    <a class="td-a" href="${ctx}/order/cmPayShop/applyDetail?id=${cmPayShop.id}&redirectType=2">查看详情</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>
+                            <a class="td-a" href="${ctx}/order/cmPayShop/applyEdit?id=${cmPayShop.id}&redirectType=2">申请付款</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>
+                            <a class="td-a" href="${ctx}/order/cmPayShop/shopOtherApplyEdit?payShopId=${cmPayShop.id}&redirectType=2">申请付款</a>
                         </c:if>
                     </shiro:hasPermission>
                     <shiro:hasPermission name="order:cmPayShop:cancel">
-                        <a class="td-a" href="${ctx}/order/cmPayShop/cancel?id=${cmPayShop.id}"
+                        <a class="td-a" href="${ctx}/order/cmPayShop/cancel?id=${cmPayShop.id}&redirectType=2"
                            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>
+                        <a class="td-a" href="${ctx}/order/cmPayShop/toCheck?id=${cmPayShop.id}&redirectType=2">付款审核</a>
                     </shiro:hasPermission>
                 </c:if>
                 <c:if test="${cmPayShop.payType ne '6' && cmPayShop.status == '1'}">
@@ -235,16 +235,16 @@
                     <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>
+                                <a class="td-a" href="${ctx}/order/cmPayShop/applyEdit?id=${cmPayShop.id}&redirectType=2">重申付款</a>
                             </c:if>
                             <c:if test="${cmPayShop.paymentType eq 3}">
-                                <a class="td-a" href="${ctx}/order/cmPayShop/shopOtherApplyEdit?payShopId=${cmPayShop.id}">重申付款</a>
+                                <a class="td-a" href="${ctx}/order/cmPayShop/shopOtherApplyEdit?payShopId=${cmPayShop.id}&redirectType=2">重申付款</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}"
+                        <a class="td-a" href="${ctx}/order/cmPayShop/cancel?id=${cmPayShop.id}&redirectType=2"
                            onclick="return confirmx('确定要取消此次付款申请吗?', this.href)">取消付款</a>
                     </shiro:hasPermission>
                 </c:if>

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

@@ -289,7 +289,12 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    <c:if test="${cmPayShop.redirectType == 2}" >
+        <li><a href="${ctx}/order/cmPayShop/payList">付款管理</a></li>
+    </c:if>
+    <c:if test="${cmPayShop.redirectType != 2}" >
+        <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    </c:if>
     <li class="active"><a href="${ctx}/order/cmPayShop/toCheck?id=${cmPayShop.id}">付款审核</a></li>
 </ul>
 <br/>

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

@@ -297,7 +297,12 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <c:if test="${cmPayShop.redirectType == 2}" >
+        <li><a href="${ctx}/order/cmPayShop/payList">付款管理</a></li>
+    </c:if>
+    <c:if test="${cmPayShop.redirectType != 2}" >
+        <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    </c:if>
     <li class="active"><a href="${ctx}/order/cmPayShop/applyDetail?id=${cmPayShop.id}">付款单详情</a></li>
 </ul>
 <br/>

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

@@ -51,7 +51,12 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <c:if test="${cmPayShop.redirectType == 2}" >
+        <li><a href="${ctx}/order/cmPayShop/payList">付款管理</a></li>
+    </c:if>
+    <c:if test="${cmPayShop.redirectType != 2}" >
+        <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    </c:if>
     <li class="active"><a href="${ctx}/order/cmPayShop/applyCompile?id=${cmPayShop.id}">编辑</a></li>
 </ul>
 <br/>

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

@@ -379,7 +379,12 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <c:if test="${cmPayShop.redirectType == 2}" >
+        <li><a href="${ctx}/order/cmPayShop/payList">付款管理</a></li>
+    </c:if>
+    <c:if test="${cmPayShop.redirectType != 2}" >
+        <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    </c:if>
     <li class="active"><a>提交付款单</a></li>
 </ul>
 <br/>

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

@@ -308,7 +308,12 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    <c:if test="${cmPayShop.redirectType == 2}" >
+        <li><a href="${ctx}/order/cmPayShop/payList">付款管理</a></li>
+    </c:if>
+    <c:if test="${cmPayShop.redirectType != 2}" >
+        <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    </c:if>
     <li class="active"><a href="${ctx}/order/cmPayShop/toCheck?id=${cmPayShop.id}">付款审核</a></li>
 </ul><br/>
 <div class="payment-form">

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

@@ -38,7 +38,12 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <c:if test="${cmPayShop.redirectType == 2}" >
+        <li><a href="${ctx}/order/cmPayShop/payList">付款管理</a></li>
+    </c:if>
+    <c:if test="${cmPayShop.redirectType != 2}" >
+        <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    </c:if>
     <li class="active"><a href="${ctx}/order/cmPayShop/applyCompile?id=${cmPayShop.id}">编辑</a></li>
 </ul><br/>
 <form:form id="inputForm" modelAttribute="cmPayShop" action="${ctx}/order/cmPayShop/applyCompileSave?id=${cmPayShop.id}" method="post" class="form-horizontal">

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

@@ -222,7 +222,12 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <c:if test="${cmPayShop.redirectType == 2}" >
+        <li><a href="${ctx}/order/cmPayShop/payList">付款管理</a></li>
+    </c:if>
+    <c:if test="${cmPayShop.redirectType != 2}" >
+        <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    </c:if>
     <li class="active"><a>提交付款单</a></li>
 </ul>
 <form:form id="inputForm" modelAttribute="payShopOther" action="${ctx}/order/cmPayShop/saveShopOtherFee" method="post" class="form-horizontal">

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

@@ -452,7 +452,12 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <c:if test="${cmPayShop.redirectType == 2}" >
+        <li><a href="${ctx}/order/cmPayShop/payList">付款管理</a></li>
+    </c:if>
+    <c:if test="${cmPayShop.redirectType != 2}" >
+        <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
+    </c:if>
     <li class="active"><a href="${ctx}/order/cmPayShop/applyDetail?id=${cmPayShop.id}">付款单详情</a></li>
 </ul>
 <br/>