zhijiezhao 3 years ago
parent
commit
36902b9fc1
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/main/webapp/static/modules/bulkpurchase/orderForm.js

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

@@ -1249,7 +1249,6 @@ function setOrderFee() { //不考虑经理折扣、运费,此时 商品总金
         svipFullReduction = 0;   //超级会员优惠
     var couponPrice = $("#couponAmount").val() ? $("#couponAmount").val() * 1 : 0;
     $('.productTable tbody tr:not(.gift)').each(function (index, element) {
-        debugger
         var obj = JSON.parse($(this).attr("data-value"));
         productTotalFee = ((Number(productTotalFee) * 100 + Number(obj.num * obj.price) * 100 + Number(obj
             .totalAddedValueTax) * 100) / 100 + Number(obj.svipTaxReduction)).toFixed(2);
@@ -1266,6 +1265,7 @@ function setOrderFee() { //不考虑经理折扣、运费,此时 商品总金
     // 计算促销折扣
     totalPromotions.forEach(function (item) {
         console.log(totalPromotions);
+        debugger
         if (item.mode == 2) {
             var touchPrice = 0;
             item.promotionProducts.forEach(function (product) {
@@ -1274,7 +1274,7 @@ function setOrderFee() { //不考虑经理折扣、运费,此时 商品总金
             if (touchPrice >= item.touchPrice) {
                 if (item.discount * 1 === 1) {
                     var b = Math.floor(touchPrice/item.touchPrice);
-                    reducedPrice = b * item.reducedPrice;
+                    reducedPrice += (b * item.reducedPrice);
                     payTotalFee -= reducedPrice;
                 } else {
                     reducedPrice += item.reducedPrice;
@@ -2058,7 +2058,7 @@ function setProductTotalFee() {
             if (touchPrice >= item.touchPrice) {
                 if (item.discount * 1 === 1) {
                     var b = Math.floor(touchPrice/item.touchPrice);
-                    reducedPrice = b * item.reducedPrice;
+                    reducedPrice += (b * item.reducedPrice);
                     payTotalFee -= reducedPrice;
                 } else {
                     reducedPrice += item.reducedPrice;
@@ -2147,8 +2147,8 @@ function setProductTotalFee() {
         var index = $(this).attr("data-index");
         $('#orderProduct' + index + '\\.enabledStatus').val(JSON.stringify(obj));
     });
-    debugger
     if (initFlag) {
+        debugger;
         $(".productTotalFee").html(productTotalFee);
         $(".productCount").html(productCount);
         $(".presentCount").text(presentCount + giftCount);