zhijiezhao 3 lat temu
rodzic
commit
0924ff343c

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

@@ -908,7 +908,6 @@
         obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
     };
 
-
 </script>
 </body>
 </html>

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

@@ -455,7 +455,7 @@ function getShownCouponList() {
 // 设置页面显示
 function setPageCoupon() {
     var clubCouponId = $("#clubCouponId").val() * 1;
-    var html = '<li><label><input type="radio" name="clubCouponId" value="0"><span class="couponDesc none">不使用优惠券</span></label></li>';
+    var html = '<li><label><input type="radio" name="clubCouponId" id="bsy" value="0"><span class="couponDesc none">不使用优惠券</span></label></li>';
     selectCoupons.forEach(function (item) {
         var checked = '';
         var redemptionCode = '';
@@ -2193,25 +2193,31 @@ function updateRebateFlag() {
     if (rebateFlag) {
         $("#rebateFlag").val(1);
         //选中返佣订单后不可用优惠券
-        $("#couponBox").find("input[name=clubCouponId]").prop('checked', 'checked');
+        // $("#couponBox").find("input[name=clubCouponId]").prop('checked', 'checked');
+        $("#couponBox").find("input[name=clubCouponId]").prop('checked', '');
+        $("#couponBox").find("#bsy").prop('checked', 'checked');
         $("#freePostFlag").attr("value", "-1");
         $("#freeDesc").find(".select2-chosen").text("到付");
-        $("#useBalancePayFee").prop('checked','');
+        $("#useBalancePayFee").prop('checked', '');
         setFreight();
-        $("#freePostFlag").attr("disabled",true);
-        $("#useBalancePayFee").attr("disabled",true);
+        $("#freePostFlag").attr("disabled", true);
+        $("#useBalancePayFee").attr("disabled", true);
+        $("#couponAmount").val(0);
+        setOrderFee();
     } else {
         $("#rebateFlag").val(0);
+        // $("#couponBox").find("input[name=clubCouponId]").prop('checked', '');
         $("#couponBox").find("input[name=clubCouponId]").prop('checked', '');
         $("#freePostFlag").attr("value", "0");
         $("#freeDesc").find(".select2-chosen").text("包邮");
-        $("#useBalancePayFee").prop('checked','');
+        $("#useBalancePayFee").prop('checked', '');
         setFreight();
-        $("#freePostFlag").attr("disabled",false);
-        $("#useBalancePayFee").attr("disabled",false);
-        $(".freight")
+        $("#freePostFlag").attr("disabled", false);
+        $("#useBalancePayFee").attr("disabled", false);
+        $("#couponAmount").val(0);
+        // 重新计算总价
+        setOrderFee();
     }
-
 }
 
 /**