Browse Source

bug fixes

plf 3 years ago
parent
commit
0a31a0ea8c

+ 29 - 11
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -558,6 +558,17 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             cmPayShop.setPayTime(DateUtils.getDateTime());
             cmPayShop.setPayTime(DateUtils.getDateTime());
             cmPayShop.setStatus("1");
             cmPayShop.setStatus("1");
             cmPayShopDao.update(cmPayShop);
             cmPayShopDao.update(cmPayShop);
+            Integer shopOrderId = Integer.valueOf(records.get(0).getShopOrderID());
+            if (3 == cmPayShop.getPaymentType()) {
+                //已付第三方金额
+                BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
+                BigDecimal totalFee = MathUtil.add(shopOtherFee, cmPayShop.getTotalAmount());
+                newShopOrderDao.updateByShopOtherFee(totalFee, shopOrderId);
+            } else if (2 == cmPayShop.getPaymentType()) {
+                NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
+                BigDecimal differencePrice = MathUtil.add(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
+                newShopOrderDao.updateByDifferencePrice(1, differencePrice, shopOrderId);
+            }
         }
         }
         if (cmPayShop.getBalancePayFee() != null && cmPayShop.getBalancePayFee() > 0D) {
         if (cmPayShop.getBalancePayFee() != null && cmPayShop.getBalancePayFee() > 0D) {
             //如果使用了余额付款 往余额记录表里面写入记录的cm_rebate_record
             //如果使用了余额付款 往余额记录表里面写入记录的cm_rebate_record
@@ -718,6 +729,17 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             cmPayShop.setReviewTime(null);
             cmPayShop.setReviewTime(null);
             cmPayShop.setPayType(null);
             cmPayShop.setPayType(null);
             cmPayShopDao.update(cmPayShop);
             cmPayShopDao.update(cmPayShop);
+            Integer shopOrderId = Integer.valueOf(records.get(0).getShopOrderID());
+            if (3 == cmPayShop.getPaymentType()) {
+                //撤回付第三方
+                BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
+                BigDecimal totalFee = MathUtil.sub(shopOtherFee, cmPayShop.getTotalAmount());
+                newShopOrderDao.updateByShopOtherFee(totalFee, shopOrderId);
+            } else if (2 == cmPayShop.getPaymentType()) {
+                NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
+                BigDecimal differencePrice = MathUtil.sub(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
+                newShopOrderDao.updateByDifferencePrice(1, differencePrice, shopOrderId);
+            }
         }
         }
     }
     }
 
 
@@ -768,8 +790,6 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
 
 
     @Transactional(readOnly = false)
     @Transactional(readOnly = false)
     public void saveShopOtherFee(ChangePayShopOther payShopOther) {
     public void saveShopOtherFee(ChangePayShopOther payShopOther) {
-        //已付第三方金额
-        BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(payShopOther.getShopOrderId());
         String[] remarkImages = payShopOther.getRemarkImages();
         String[] remarkImages = payShopOther.getRemarkImages();
         if (remarkImages != null && remarkImages.length > 0) {
         if (remarkImages != null && remarkImages.length > 0) {
             StringBuilder remarkImage = new StringBuilder();
             StringBuilder remarkImage = new StringBuilder();
@@ -783,13 +803,11 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
         }
         }
         payShopOther.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
         payShopOther.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
         cmPayShopRecordDao.insertShopOtherFee(payShopOther);
         cmPayShopRecordDao.insertShopOtherFee(payShopOther);
-        newShopOrderDao.updateByShopOtherFee(payShopOther.getShopOtherFee(), payShopOther.getShopOrderId());
 
 
         //保存付第三方付款记录
         //保存付第三方付款记录
         User currentUser = UserUtils.getUser();
         User currentUser = UserUtils.getUser();
         String time = DateUtils.getDateTime();
         String time = DateUtils.getDateTime();
         NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(payShopOther.getShopOrderId());
         NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(payShopOther.getShopOrderId());
-        double payAmount = MathUtil.sub(payShopOther.getShopOtherFee(), shopOtherFee).doubleValue();
         CmPayShop payShop = new CmPayShop();
         CmPayShop payShop = new CmPayShop();
         payShop.setShopID(shopOrder.getShopID().toString());
         payShop.setShopID(shopOrder.getShopID().toString());
         payShop.setName(payShopOther.getName());
         payShop.setName(payShopOther.getName());
@@ -797,9 +815,9 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
         payShop.setBankAccount(payShopOther.getBankAccount());
         payShop.setBankAccount(payShopOther.getBankAccount());
         payShop.setBankName(payShopOther.getBankName());
         payShop.setBankName(payShopOther.getBankName());
         payShop.setType(payShopOther.getType().toString());
         payShop.setType(payShopOther.getType().toString());
-        payShop.setTotalAmount(payAmount);
+        payShop.setTotalAmount(payShopOther.getShopOtherFee().doubleValue());
         payShop.setBalancePayFee(0d);
         payShop.setBalancePayFee(0d);
-        payShop.setTransferPayFee(payAmount);
+        payShop.setTransferPayFee(payShopOther.getShopOtherFee().doubleValue());
         payShop.setWipePayment(0d);
         payShop.setWipePayment(0d);
         payShop.setApplicant(currentUser.getId());
         payShop.setApplicant(currentUser.getId());
         payShop.setApplyTime(time);
         payShop.setApplyTime(time);
@@ -816,7 +834,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
         payShopRecord.setShopID(shopOrder.getShopID().toString());
         payShopRecord.setShopID(shopOrder.getShopID().toString());
         payShopRecord.setShopOrderID(payShopOther.getShopOrderId().toString());
         payShopRecord.setShopOrderID(payShopOther.getShopOrderId().toString());
         payShopRecord.setShopOrderNo(shopOrder.getOrderNo());
         payShopRecord.setShopOrderNo(shopOrder.getOrderNo());
-        payShopRecord.setPayAmount(payAmount);
+        payShopRecord.setPayAmount(payShopOther.getShopOtherFee().doubleValue());
         payShopRecord.setWipePayment(0d);
         payShopRecord.setWipePayment(0d);
         payShopRecord.setPaymentType(3);
         payShopRecord.setPaymentType(3);
         payShopRecord.setPayShopID(payShop.getId());
         payShopRecord.setPayShopID(payShop.getId());
@@ -847,6 +865,8 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             payShopDifference.setAbleRebateAmount(BigDecimal.valueOf(ableRebateAmount));
             payShopDifference.setAbleRebateAmount(BigDecimal.valueOf(ableRebateAmount));
             double rebateAmount = shop.getRebateAmount() == null ? 0D : shop.getRebateAmount();
             double rebateAmount = shop.getRebateAmount() == null ? 0D : shop.getRebateAmount();
             payShopDifference.setRebateAmount(BigDecimal.valueOf(rebateAmount));
             payShopDifference.setRebateAmount(BigDecimal.valueOf(rebateAmount));
+            payShopDifference.setType(shopOrder.getDifferenceType());
+            payShopDifference.setDifferencePrice(shopOrder.getDifferencePrice());
         }
         }
         payShopDifference.setWaitPayShop(waitPayShop);
         payShopDifference.setWaitPayShop(waitPayShop);
         return payShopDifference;
         return payShopDifference;
@@ -989,11 +1009,9 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
         }
         }
         payShopDifference.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
         payShopDifference.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
         cmPayShopRecordDao.insertDifference(payShopDifference);
         cmPayShopRecordDao.insertDifference(payShopDifference);
-        if ("3".equals(shopOrder.getPayStatus()) && 1 == payShopDifference.getType()) {
-            //多次少付供应商,应加上差价
-            differencePrice = MathUtil.add(shopOrder.getDifferencePrice(), differencePrice);
+        if (!"3".equals(shopOrder.getPayStatus())) {
+            newShopOrderDao.updateByDifferencePrice(payShopDifference.getType(), differencePrice, shopOrderId);
         }
         }
-        newShopOrderDao.updateByDifferencePrice(payShopDifference.getType(), differencePrice, shopOrderId);
     }
     }
 
 
     public ChangePayShopOther shopOtherApplyEdit(Integer payShopId) {
     public ChangePayShopOther shopOtherApplyEdit(Integer payShopId) {

+ 4 - 2
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -618,8 +618,10 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
                         difference.setBankAccount(payShop.getBankAccount());
                         difference.setBankAccount(payShop.getBankAccount());
                         difference.setBankAccountName(payShop.getBankAccountName());
                         difference.setBankAccountName(payShop.getBankAccountName());
                         difference.setBankName(payShop.getBankName());
                         difference.setBankName(payShop.getBankName());
-                        difference.setBalancePayFee(BigDecimal.valueOf(payShop.getBalancePayFee()));
-                        difference.setTransferPayFee(BigDecimal.valueOf(payShop.getTransferPayFee()));
+                        double balancePayFee = payShop.getBalancePayFee() == null ? 0d : payShop.getBalancePayFee();
+                        difference.setBalancePayFee(BigDecimal.valueOf(balancePayFee));
+                        double transferPayFee = payShop.getTransferPayFee() == null ? 0d : payShop.getTransferPayFee();
+                        difference.setTransferPayFee(BigDecimal.valueOf(transferPayFee));
                     }
                     }
                 }
                 }
             });
             });

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

@@ -599,7 +599,7 @@ public class CmPayShopController extends BaseController {
             e.printStackTrace();
             e.printStackTrace();
         }
         }
         if (3 == cmPayShop.getPaymentType()) {
         if (3 == cmPayShop.getPaymentType()) {
-            return "modules/order/cmPayShopOtherDetail";
+            return "modules/order/cmPayShopOtherPrintDetail";
         }
         }
         return "modules/order/cmPayShopDetail";
         return "modules/order/cmPayShopDetail";
     }
     }
@@ -837,8 +837,13 @@ public class CmPayShopController extends BaseController {
             addMessage(redirectAttributes, e.getMessage());
             addMessage(redirectAttributes, e.getMessage());
         }
         }
         if ("3".equals(payShopDifference.getPayStatus())) {
         if ("3".equals(payShopDifference.getPayStatus())) {
-            //去付款列表
-            return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/";
+            if (1 == payShopDifference.getType()) {
+                //去付款列表
+                return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/";
+            } else {
+                //退款列表
+                return "redirect:" + Global.getAdminPath() + "/order/cmRefundShop/";
+            }
         }
         }
         return "redirect:" + Global.getAdminPath() + "/shopOrder/payOrderList?operatingMode=1";
         return "redirect:" + Global.getAdminPath() + "/shopOrder/payOrderList?operatingMode=1";
     }
     }

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

@@ -1,5 +1,6 @@
 package com.caimei.modules.order.web;
 package com.caimei.modules.order.web;
 
 
+import com.caimei.modules.order.dao.CmPayShopRecordDao;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.order.service.CmChangePayShopProductService;
 import com.caimei.modules.order.service.CmChangePayShopProductService;
 import com.caimei.modules.order.service.CmChangePayShopRecondService;
 import com.caimei.modules.order.service.CmChangePayShopRecondService;
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Arrays;
 import java.util.List;
 import java.util.List;
@@ -43,6 +45,8 @@ public class CmShopOrderController extends BaseController {
     private CmChangePayShopRecondService cmChangePayShopRecondService;
     private CmChangePayShopRecondService cmChangePayShopRecondService;
     @Autowired
     @Autowired
     private CmChangePayShopProductService cmChangePayShopProductService;
     private CmChangePayShopProductService cmChangePayShopProductService;
+    @Autowired
+    private CmPayShopRecordDao cmPayShopRecordDao;
 
 
     @ModelAttribute
     @ModelAttribute
     public NewShopOrder get(@RequestParam(required = false) String id) {
     public NewShopOrder get(@RequestParam(required = false) String id) {
@@ -134,6 +138,9 @@ public class CmShopOrderController extends BaseController {
         if (CollectionUtils.isNotEmpty(list) && list.size() == 1) {
         if (CollectionUtils.isNotEmpty(list) && list.size() == 1) {
             dbCostType = list.get(0).getCostType();
             dbCostType = list.get(0).getCostType();
         }
         }
+        //已审核支付第三方金额
+        BigDecimal payShopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(newShopOrder.getShopOrderID());
+        model.addAttribute("payShopOtherFee", payShopOtherFee);
         model.addAttribute("dbCostType", dbCostType);
         model.addAttribute("dbCostType", dbCostType);
         if (StringUtils.isEmpty(dbCostType)) dbCostType = costType;
         if (StringUtils.isEmpty(dbCostType)) dbCostType = costType;
         model.addAttribute("page", page);
         model.addAttribute("page", page);

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

@@ -97,6 +97,7 @@
 			<tr style="width:30%">
 			<tr style="width:30%">
 				<th>付款单ID</th>
 				<th>付款单ID</th>
 				<th style="width:150px">付款单名称</th>
 				<th style="width:150px">付款单名称</th>
+				<th>付款类型</th>
 				<th>供应商</th>
 				<th>供应商</th>
 				<th>付款金额</th>
 				<th>付款金额</th>
 				<th>子订单编号(ID)</th>
 				<th>子订单编号(ID)</th>
@@ -115,6 +116,9 @@
 			<tr>
 			<tr>
 				<td>${cmPayShop.id}</td>
 				<td>${cmPayShop.id}</td>
 				<td>${cmPayShop.name}</td>
 				<td>${cmPayShop.name}</td>
+				<td>
+					${cmPayShop.paymentType eq 2 ? "供应商差价":(cmPayShop.paymentType eq 3 ? "付第三方":"子订单付款")}
+				</td>
 				<td>${cmPayShop.shopName}</td>
 				<td>${cmPayShop.shopName}</td>
 				<td>
 				<td>
 					<fmt:formatNumber value="${cmPayShop.totalAmount}" type="number" pattern="#,##0.00"/>
 					<fmt:formatNumber value="${cmPayShop.totalAmount}" type="number" pattern="#,##0.00"/>

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

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

@@ -581,7 +581,7 @@
                         <a href="${ctx}/shopOrder/toChangePayShopAmount?shopOrderID=${s.shopOrderID}">修改成本</a>
                         <a href="${ctx}/shopOrder/toChangePayShopAmount?shopOrderID=${s.shopOrderID}">修改成本</a>
                     </shiro:hasPermission>
                     </shiro:hasPermission>
                 </c:if>
                 </c:if>
-                <c:if test="${s.modifyPayable and s.paying ne '1'}">
+                <c:if test="${(s.modifyPayable and s.paying ne '1') || s.payStatus eq '2'}">
                     <a href="${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=${s.shopOrderID}">供应商差价</a>
                     <a href="${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=${s.shopOrderID}">供应商差价</a>
                 </c:if>
                 </c:if>
                 <c:if test="${s.paying ne '1' and s.payStatus eq '2'}">
                 <c:if test="${s.paying ne '1' and s.payStatus eq '2'}">

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

@@ -1,3 +1,4 @@
+<%--
 <%@ page contentType="text/html;charset=UTF-8" %>
 <%@ page contentType="text/html;charset=UTF-8" %>
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <html>
 <html>
@@ -117,3 +118,4 @@
 </script>
 </script>
 </body>
 </body>
 </html>
 </html>
+--%>

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

@@ -41,8 +41,8 @@
 </head>
 </head>
 <body>
 <body>
 <ul class="nav nav-tabs">
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop/">付款管理</a></li>
-    <li class="active"><a href="${ctx}/order/cmPayShop/printDetail?id=${cmPayShop.id}">付款详情</a></li>
+    <li><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
+    <li class="active"><a href="${ctx}/order/cmPayShop/applyDetail?id=${cmPayShop.id}">付款单详情</a></li>
 </ul><br/>
 </ul><br/>
 <div class="payment-form">
 <div class="payment-form">
     <h4>付款单</h4>
     <h4>付款单</h4>
@@ -142,10 +142,10 @@
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>财务签名:</span>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>财务签名:</span>
         &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;<span>审批人签名:</span>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>审批人签名:</span>
+        <div class="check-btn">
+            <button class="export apply-btn btn btn-primary">打印</button>
+        </div>
     </c:if>
     </c:if>
-    <div class="check-btn">
-        <button class="export apply-btn btn btn-primary">打印</button>
-    </div>
 </div>
 </div>
 <script>
 <script>
     (function(){
     (function(){

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

@@ -206,6 +206,21 @@
                         }
                         }
                     }
                     }
                     if (type == 1 && ${payShopDifference.payStatus eq 3}){
                     if (type == 1 && ${payShopDifference.payStatus eq 3}){
+                        var bankAccountName = $("#bankAccountName").val();
+                        if (bankAccountName == '' || bankAccountName == null){
+                            alertx("开户名不能为空");
+                            return false;
+                        }
+                        var bankAccount = $("#bankAccount").val();
+                        if (bankAccount == '' || bankAccount == null){
+                            alertx("账号不能为空");
+                            return false;
+                        }
+                        var bankName = $("#bankName").val();
+                        if (bankName == '' || bankName == null){
+                            alertx("开户行不能为空");
+                            return false;
+                        }
                         var payShopCheckbox = $('.payShop-checkbox:checked');
                         var payShopCheckbox = $('.payShop-checkbox:checked');
                         var totalAmount = 0;
                         var totalAmount = 0;
                         payShopCheckbox.each(function () {
                         payShopCheckbox.each(function () {
@@ -248,9 +263,15 @@
     <br>
     <br>
     <div class="control-group">
     <div class="control-group">
         <label class="control-label">差价类型:</label>&nbsp;&nbsp;&nbsp;
         <label class="control-label">差价类型:</label>&nbsp;&nbsp;&nbsp;
-            <input type="radio" name="type" value="1" checked="true" onclick="showInfo()">少付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <input type="radio" name="type" value="2" onclick="showInfo()">多付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <img src="/static/images/info.jpg" style="height: 20px;width: 20px" onclick="alertx('“少付”指成本变高了,按旧成本付款的话相当于会少付供应商,但是线上支付的订单不能修改成本,所以通过补差价的方式来弥补;“多付”指成本变低了,按旧成本付款的话相当于会多付供应商,但是线上支付的订单不能修改成本,所以通过退差价的方式来弥补。')">
+            <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;
+            <img src="/static/images/info.jpg" style="height: 20px;width: 20px" onclick="alertx('“少付”指成本变高了,按旧成本付款的话相当于会少付供应商,\n'+
+'在已不能修改成本的情况下,通过补差价的方式来弥补;\n'+
+'\n'+
+'“多付”指成本变低了,按旧成本付款的话相当于会多付供应商,\n'+
+'在已不能修改成本的情况下,通过退差价的方式来弥补。\n'+
+'\n'+
+'特别注意:一个子订单可以申请多次供应商差价,但是每次只能选择同一种差价类型。若要修改差价类型,需要将该子订单的所有供应商差价付款单取消后才能操作')">
     </div>
     </div>
     <div class="control-group">
     <div class="control-group">
         <label class="control-label"><font color='red'>*</font>付款单名称:</label>
         <label class="control-label"><font color='red'>*</font>付款单名称:</label>
@@ -275,20 +296,20 @@
                 <div class="control-group">
                 <div class="control-group">
                     <label class="control-label"><font color='red'>*</font>转账金额:</label>
                     <label class="control-label"><font color='red'>*</font>转账金额:</label>
                     <div class="controls">
                     <div class="controls">
-                        <input type="number" required name="transferPayFee" value="" onchange="changeShouldPay(this)"/>
+                        <input type="number" name="transferPayFee" value="" onchange="changeShouldPay(this)"/>
                     </div>
                     </div>
                 </div>
                 </div>
                 <div class="control-group">
                 <div class="control-group">
                     <label class="control-label"><font color='red'>*</font>开户名:</label>&nbsp;&nbsp;&nbsp;&nbsp;
                     <label class="control-label"><font color='red'>*</font>开户名:</label>&nbsp;&nbsp;&nbsp;&nbsp;
-                    <form:input path="bankAccountName" htmlEscape="false" maxlength="100" class="input-xlarge required"/>&nbsp;&nbsp;&nbsp;&nbsp;
+                    <form:input path="bankAccountName" id="bankAccountName" htmlEscape="false" maxlength="100" class="input-xlarge"/>&nbsp;&nbsp;&nbsp;&nbsp;
                     <label><font color='red'>*</font>账号:</label>
                     <label><font color='red'>*</font>账号:</label>
-                    <form:input path="bankAccount" htmlEscape="false" maxlength="100" class="input-xlarge required"/>
+                    <form:input path="bankAccount" id="bankAccount" htmlEscape="false" maxlength="100" class="input-xlarge"/>
                 </div>
                 </div>
                 <div class="control-group">
                 <div class="control-group">
                     <label class="control-label"><font color='red'>*</font>开户行:</label>&nbsp;&nbsp;&nbsp;&nbsp;
                     <label class="control-label"><font color='red'>*</font>开户行:</label>&nbsp;&nbsp;&nbsp;&nbsp;
-                    <form:input path="bankName" htmlEscape="false" maxlength="100" class="input-xlarge required"/>&nbsp;&nbsp;&nbsp;&nbsp;
+                    <form:input path="bankName" id="bankName" htmlEscape="false" maxlength="100" class="input-xlarge"/>&nbsp;&nbsp;&nbsp;&nbsp;
                     <label><font color='red'>*</font>账户类型:</label>
                     <label><font color='red'>*</font>账户类型:</label>
-                    <form:select path="bankType" class="select-ele input-xlarge required">
+                    <form:select path="bankType" class="select-ele input-xlarge">
                         <form:option value="0" label="公账"/>
                         <form:option value="0" label="公账"/>
                         <form:option value="1" label="私账"/>
                         <form:option value="1" label="私账"/>
                     </form:select>
                     </form:select>
@@ -467,6 +488,7 @@
                 $('#remainingBalance').text(ableRebateAmount - thisVal);
                 $('#remainingBalance').text(ableRebateAmount - thisVal);
             }
             }
         });
         });
+        showInfo();
     });
     });
 
 
     /**
     /**

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

@@ -185,9 +185,9 @@
                 $("#inputForm").validate({
                 $("#inputForm").validate({
                     ignore:"",
                     ignore:"",
                     submitHandler: function (form) {
                     submitHandler: function (form) {
-                        var shopPostFee = $("#shopPostFee").val();
+                        var shopOtherFee = $("#shopOtherFee").val();
                         var brokerage = ${brokerage};
                         var brokerage = ${brokerage};
-                        if (brokerage < shopPostFee) {
+                        if (brokerage < shopOtherFee) {
                             top.$.jBox.confirm("付第三方的值不合理,导致佣金为负,确认继续吗?", '提示', function (v, h, f) {
                             top.$.jBox.confirm("付第三方的值不合理,导致佣金为负,确认继续吗?", '提示', function (v, h, f) {
                                 if (v == true) {
                                 if (v == true) {
                                     loading('正在提交,请稍等...');
                                     loading('正在提交,请稍等...');
@@ -231,7 +231,7 @@
     <div class="control-group">
     <div class="control-group">
         <label class="control-label"><font color='red'>*</font>付第三方金额:</label>
         <label class="control-label"><font color='red'>*</font>付第三方金额:</label>
         <div class="controls">
         <div class="controls">
-            <input type="number" id="shopOtherFee" required name="shopOtherFee" value="${payShopOther.shopOtherFee}" onchange="changeShouldPay(this)"/>
+            <input type="number" id="shopOtherFee" required name="shopOtherFee" min="0" value="${payShopOther.shopOtherFee}" onchange="changeShouldPay(this)"/>
         </div>
         </div>
     </div>
     </div>
     <div class="control-group">
     <div class="control-group">