Browse Source

bug fixes

plf 3 years ago
parent
commit
08e490874f

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

@@ -327,6 +327,7 @@
     <br>
     <br>
     <!-- 优惠券 -->
+  <c:if test="${empty order.orderID || order.status eq 0}">
     <div id="couponBox">
         <div style="margin-top:20px;font-size:15px;border-bottom:2px solid #050202"><b>优惠券</b><a id="redeemCoupons" href="javascript:;" class="btn btn-primary" style="padding:1px 10px;margin:2px 30px;">兑换优惠券</a></div>
         <!-- $('input[name=clubCouponId]:checked').val() -->
@@ -335,6 +336,7 @@
         </ul>
         <from:hidden path="clubCouponId" />
     </div>
+  </c:if>
     <br>
     <br>
     <table id="orderPrice" class="table table-striped table-bordered table-condensed">
@@ -363,7 +365,7 @@
             </span>元
             <from:hidden path="promotionFullReduction" />
         </td>
-        <td style="text-align:right;">优惠券抵扣${order.couponAmount}:</td>
+        <td style="text-align:right;">优惠券抵扣:</td>
         <td><span class="couponPrice"><fmt:formatNumber value="${empty order.couponAmount?'0.00':(order.couponAmount)}" pattern="#0.00"/></span>元
             <from:hidden path="couponAmount"/></td>
         <td>商品总数</td>

+ 2 - 2
src/main/webapp/static/modules/bulkpurchase/orderForm.js

@@ -12,7 +12,7 @@ var totalCoupons = [];
 // 当前商品可用优惠券
 var selectCoupons = [];
 // 勾选后的优惠金额
-var couponPrice = 0;
+var couponPrice = $("#couponAmount").val()*1;
 // 添加订单true,修改订单false
 var initFlag = true;
 var orderStatus = 0;
@@ -474,7 +474,7 @@ function setPageCoupon() {
         html += '</span></label></li>';
     });
     $("#couponBox").find(".couponContent").html(html);
-    if (clubCouponId > 0) {
+    if (clubCouponId > 0 && !orderStatus) {
         $("#couponBox").find("input[name=clubCouponId][checked=checked]").trigger("change");
     }
 }