Kaynağa Gözat

添加订单优惠券选择bugfix

Aslee 3 yıl önce
ebeveyn
işleme
875b22e2e8

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

@@ -491,6 +491,10 @@ $("#couponBox").on("change", "input[name=clubCouponId]", function(){
             couponPrice = item.couponAmount;
             $("#clubCouponId").val(clubCouponId);
             $("#couponAmount").val(couponPrice);
+        } else if (clubCouponId == 0) {
+            couponPrice = 0;
+            $("#clubCouponId").val('');
+            $("#couponAmount").val(couponPrice);
         }
     });
     // 重新计算总价
@@ -1237,7 +1241,6 @@ function setOrderFee() { //不考虑经理折扣、运费,此时 商品总金
         presentCount = Number(presentCount) + Number(obj.presentNum);
         orderTotalFee = ((Number(orderTotalFee) * 100 + Number(obj.totalFee) * 100) / 100).toFixed(2);
         payTotalFee = ((Number(payTotalFee) * 100 + Number(obj.totalFee) * 100) / 100).toFixed(2);
-        debugger
         svipFullReduction = ((Number(svipFullReduction) * 100 + Number(obj.svipReduction) * obj.num * 100) / 100).toFixed(2);
     });
     $('.productTable tbody tr.promotions').each(function(index, element) {
@@ -1895,7 +1898,6 @@ function num(obj) {
 
 // 添加供应应付商金额
 function shopFee(i) {
-    debugger
     var $shopFee = $("#shopFee1" + i).val();
     var shopFee = Number($shopFee);
     var $checkItem = eval('(' + $("#check-item" + i).val() + ')');
@@ -1945,7 +1947,6 @@ function otherFee(i) {
 }
 // 添加采美应付金额
 function cmFee(i) {
-    debugger
     var discountPrice = $("#discountPrice" + i).val(); //折后单价
     var shopFee1 = $("#shopFee1" + i).val(); //应付供应商
     var otherFee1 = $("#otherFee1" + i).val() //应付第三方