Explorar o código

author:wcq
update:处理界面点击过快上下数量会不一致的问题

wcq %!s(int64=3) %!d(string=hai) anos
pai
achega
9cef987215
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      kmall-admin/src/main/webapp/js/sale/sale.js

+ 1 - 1
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -2411,9 +2411,9 @@ handleSellVolume = function (currentGoodsDetail, type) {
     let sku = currentGoodsDetail.sku;
     let prodBarcode = currentGoodsDetail.prodBarcode;
     if ('add' === type) {
-        number = number + 1;
         $.get("../goods/number/add/"+ storeId +"/" + sku + "/" + prodBarcode + "/" + number, function (res) {
             if (res.code === 0) {
+                number = number + 1;
                 currentGoodsDetail.sellVolume += 1;
                 currentGoodsDetail.goodstaxes = currentGoodsTax.add(singleTax).toString();
                 currentGoodsDetail.actualPaymentAmount = currentActualPaymentAmount.add(singleActualPaymentAmount).toString();