Ver código fonte

页面修改

plf 3 anos atrás
pai
commit
006ab1aa55

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

@@ -562,8 +562,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             if (3 == cmPayShop.getPaymentType()) {
                 //已付第三方金额
                 BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
-                BigDecimal totalFee = MathUtil.add(shopOtherFee, cmPayShop.getTotalAmount());
-                newShopOrderDao.updateByShopOtherFee(totalFee, shopOrderId);
+                newShopOrderDao.updateByShopOtherFee(shopOtherFee, shopOrderId);
             } else if (2 == cmPayShop.getPaymentType()) {
                 NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
                 BigDecimal differencePrice = MathUtil.add(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
@@ -625,14 +624,6 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                     cmPayShopDao.update(maxIdpayShop);
                 }
             }
-            if (cmPayShop.getPaymentType() == 2) {
-                //供应商差价付款
-                NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(shopOrderID);
-                if (shopOrder != null) {
-                    BigDecimal differencePrice = MathUtil.sub(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
-                    newShopOrderDao.updateByDifferencePrice(1, differencePrice, shopOrderID);
-                }
-            }
         }
         cmPayShop.setDelFlag("1");
         newShopOrderDao.outPaying(cmPayShop.getId());
@@ -733,8 +724,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             if (3 == cmPayShop.getPaymentType()) {
                 //撤回付第三方
                 BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
-                BigDecimal totalFee = MathUtil.sub(shopOtherFee, cmPayShop.getTotalAmount());
-                newShopOrderDao.updateByShopOtherFee(totalFee, shopOrderId);
+                newShopOrderDao.updateByShopOtherFee(shopOtherFee, shopOrderId);
             } else if (2 == cmPayShop.getPaymentType()) {
                 NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
                 BigDecimal differencePrice = MathUtil.sub(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
@@ -1009,7 +999,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
         }
         payShopDifference.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
         cmPayShopRecordDao.insertDifference(payShopDifference);
-        if (!"3".equals(shopOrder.getPayStatus())) {
+        if (!("3".equals(shopOrder.getPayStatus()) && 1 == payShopDifference.getType())) {
             newShopOrderDao.updateByDifferencePrice(payShopDifference.getType(), differencePrice, shopOrderId);
         }
     }

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

@@ -138,7 +138,6 @@ public class CmShopOrderController extends BaseController {
         if (CollectionUtils.isNotEmpty(list) && list.size() == 1) {
             dbCostType = list.get(0).getCostType();
         }
-        //已审核支付第三方金额
         BigDecimal payShopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(newShopOrder.getShopOrderID());
         model.addAttribute("payShopOtherFee", payShopOtherFee);
         model.addAttribute("dbCostType", dbCostType);

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

@@ -142,7 +142,7 @@
 	</select>
 
 	<select id="findByRefundType" resultType="integer">
-		SELECT refundShopID FROM cm_refund_shop_record WHERE shopOrderID = #{shopOrderId} AND refundType = 5
+		SELECT refundShopID FROM cm_refund_shop_record WHERE shopOrderID = #{shopOrderId} AND refundType = 5 AND delFlag = 0
 	</select>
 
 	<update id="updateByDelFlag">

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

@@ -311,10 +311,10 @@
                         </td>
                         <td colspan="2">
                             <fmt:formatNumber value="${so.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
-                            <c:if test="${so.differenceType eq 1}">
+                            <c:if test="${so.differenceType eq 1 && s.differencePrice > 0}">
                                 <font color="red">(需补差价¥${so.differencePrice})</font>
                             </c:if>
-                            <c:if test="${so.differenceType eq 2}">
+                            <c:if test="${so.differenceType eq 2 && s.differencePrice > 0}">
                                 <font color="red">(需退差价¥${so.differencePrice})</font>
                             </c:if>
                         </td>

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

@@ -183,10 +183,10 @@
 					</shiro:hasPermission>
 					<c:if test="${cmPayShop.status == '0'}">
 						<shiro:hasPermission name="order:cmPayShop:apply">
-							<c:if test="${cmPayShop.paymentType ne 3}">
+							<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}">
+							<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>
@@ -206,7 +206,7 @@
 					</c:if>
 					<c:if test="${cmPayShop.status == '2'}">
 						<shiro:hasPermission name="order:cmPayShop:apply">
-							<c:if test="${cmPayShop.rePayment == '1'}">
+							<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>

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

@@ -240,7 +240,7 @@
 						<b>供应商运费:</b><input type="number" id="shopPostFee" name="shopPostFee"  onchange="changeShouldPay(this)"  value="${newShopOrder.shopPostFee}" style="margin-left: 20px"/>
 					</td>
 					<td>
-						<b>付第三方:</b><input type="number" id="shopOtherFee" name="shopOtherFee"  onchange="inputnum(this)"  value="${newShopOrder.shopOtherFee}" style="margin-left: 5px;" ${payShopOtherFee > 0 ? 'readonly="true"':""}/>
+						<b>付第三方:</b><input type="number" id="shopOtherFee" name="shopOtherFee"  onchange="inputnum(this)"  value="${newShopOrder.shopOtherFee}" style="margin-left: 5px;" ${(!newShopOrder.payShopOtherFee || payShopOtherFee > 0) ? 'readonly="true"':""}/>
 					</td>
 				</tr>
 				<tr>

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

@@ -170,10 +170,10 @@
 						<td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
 						<td colspan="2" class="supplier-fee">
 							<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
-								<c:if test="${s.differenceType eq 1}">
+								<c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
 									<font color="red">(需补差价¥${s.differencePrice})</font>
 								</c:if>
-								<c:if test="${s.differenceType eq 2}">
+								<c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
 									<font color="red">(需退差价¥${s.differencePrice})</font>
 								</c:if>,
 								 已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>

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

@@ -181,10 +181,10 @@
 					<td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
 					<td colspan="2" class="supplier-fee">
 						<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
-							<c:if test="${s.differenceType eq 1}">
+							<c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
 								<font color="red">(需补差价¥${s.differencePrice})</font>
 							</c:if>
-							<c:if test="${s.differenceType eq 2}">
+							<c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
 								<font color="red">(需退差价¥${s.differencePrice})</font>
 							</c:if>,
 							 已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>

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

@@ -166,10 +166,10 @@
                         <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
                         <td colspan="2" class="supplier-fee">
                             <div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
-                                <c:if test="${s.differenceType eq 1}">
+                                <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
                                     <font color="red">(需补差价¥${s.differencePrice})</font>
                                 </c:if>
-                                <c:if test="${s.differenceType eq 2}">
+                                <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
                                     <font color="red">(需退差价¥${s.differencePrice})</font>
                                 </c:if>
                                 ,已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>

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

@@ -194,10 +194,10 @@
 					<td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
 					<td colspan="2" class="supplier-fee">
 						<div><span class="nowrap">应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" pattern="#,##0.00"/>
-							<c:if test="${s.differenceType eq 1}">
+							<c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
 								<font color="red">(需补差价¥${s.differencePrice})</font>
 							</c:if>
-							<c:if test="${s.differenceType eq 2}">
+							<c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
 								<font color="red">(需退差价¥${s.differencePrice})</font>
 							</c:if>,</span>
 							 <span class="nowrap">已付:${s.payedShopAmount},</span></div>

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

@@ -488,10 +488,10 @@
                                                                     pattern="#,##0.00"/></td>
                     <td class="supplier-fee">
                         <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></font>
-                        <c:if test="${s.differenceType eq 1}">
+                        <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
                             <font color="red">(需补差价¥${s.differencePrice})</font>
                         </c:if>
-                        <c:if test="${s.differenceType eq 2}">
+                        <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
                             <font color="red">(需退差价¥${s.differencePrice})</font>
                         </c:if>
                     </td>

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

@@ -5,6 +5,9 @@
     <title>付款单表管理</title>
     <meta name="decorator" content="default"/>
     <style>
+        a[href]:after {
+            content: none !important;
+        }
         .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 solid #eee}

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

@@ -170,10 +170,10 @@
 					<td class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
 					<td class="supplier-fee">
 						<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
-							<c:if test="${s.differenceType eq 1}">
+							<c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
 								<font color="red">(需补差价¥${s.differencePrice})</font>
 							</c:if>
-							<c:if test="${s.differenceType eq 2}">
+							<c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
 								<font color="red">(需退差价¥${s.differencePrice})</font>
 							</c:if>
 							,已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>

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

@@ -263,8 +263,8 @@
     <br>
     <div class="control-group">
         <label class="control-label">差价类型:</label>&nbsp;&nbsp;&nbsp;
-            <input type="radio" name="type" value="1" ${(payShopDifference.differencePrice > 0 && payShopDifference.type eq 1) ? 'disabled="disabled"':'checked="true"'} onclick="showInfo()">少付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <input type="radio" name="type" value="2" ${(payShopDifference.differencePrice > 0 && payShopDifference.type eq 2) ? 'disabled="disabled"':'checked="true"'} onclick="showInfo()">多付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <input type="radio" name="type" value="1" ${(payShopDifference.differencePrice > 0 && payShopDifference.type eq 2) ? 'disabled="disabled"':'checked="true"'} onclick="showInfo()">少付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <input type="radio" name="type" value="2" ${(payShopDifference.differencePrice > 0 && payShopDifference.type eq 1) ? 'disabled="disabled"':'checked="true"'} onclick="showInfo()">多付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             <img src="/static/images/info.jpg" style="height: 20px;width: 20px" onclick="alertx('“少付”指成本变高了,按旧成本付款的话相当于会少付供应商,\n'+
 '在已不能修改成本的情况下,通过补差价的方式来弥补;\n'+
 '\n'+

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

@@ -397,10 +397,10 @@
                                                                     pattern="#,##0.00"/></td>
                     <td class="supplier-fee">
                         <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></font>
-                        <c:if test="${s.differenceType eq 1}">
+                        <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
                             <font color="red">(需补差价¥${s.differencePrice})</font>
                         </c:if>
-                        <c:if test="${s.differenceType eq 2}">
+                        <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
                             <font color="red">(需退差价¥${s.differencePrice})</font>
                         </c:if>
                     </td>