Authored by biao

修复结算校验bug. code review by ZB

... ... @@ -133,15 +133,16 @@ if ($('.freebie').length > 0) {
}
$('.btn-balance').on('touchend', function() {
if (shouldSelectGift()) {
showChooseGifDialog();
return false;
}
if (shouldLowStocks()) {
tip.show('库存不足无法结算');
return false;
}
if (shouldSelectGift()) {
showChooseGifDialog();
return false;
}
if (hasChecked) {
window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
} else {
... ...
... ... @@ -190,6 +190,10 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
//全选按钮点击事件
$selectAllBtn.on('touchend', function() {
if ($('.low-stocks').length > 0) {
tip.show('所选商品中含有库存不足的商品');
return false;
}
bottomCheckBoxHandeler($(this).hasClass('icon-cb-checked'), $('#cartType').val(), didUpdateAllGoodsCheckStatus);
});
... ...