Commit 439d5c1d by 朱继来

调整下单修改数量

parent 78942a3c
Showing with 5 additions and 4 deletions
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
} }
} }
var joint_goods_type = ['1', '2']; // 商品联营类型 var joint_goods_type = [1, 2]; // 商品联营类型
if (joint_goods_type.indexOf(data.goods_type) != -1) { if (joint_goods_type.indexOf(data.goods_type) != -1) {
html += '<th>USD价格</th>'; html += '<th>USD价格</th>';
...@@ -502,12 +502,13 @@ ...@@ -502,12 +502,13 @@
} }
if (num < min_buy) { if (num < min_buy) {
num = min_buy; self.val(min_buy);
layer.msg('购买数量低于最小起订量,默认调整为最小起订量'); layer.msg('购买数量低于最小起订量,默认调整为最小起订量');
return
} }
var curr_goods_type = $(this).parents('tr').data('goods_type'); var curr_goods_type = $(this).parents('tr').data('goods_type');
var joint_goods_type = ['1', '2']; // 商品联营类型 var joint_goods_type = [1, 2]; // 商品联营类型
// if (goods_type == 1) { // 联营需要选择交货地 // if (goods_type == 1) { // 联营需要选择交货地
if (joint_goods_type.indexOf(curr_goods_type) != -1) { if (joint_goods_type.indexOf(curr_goods_type) != -1) {
...@@ -516,7 +517,7 @@ ...@@ -516,7 +517,7 @@
var mpl = Number(self.parents('tr').find('.goods_mpl').text()); // 倍数 var mpl = Number(self.parents('tr').find('.goods_mpl').text()); // 倍数
num = Math.ceil(num / mpl) * mpl; num = Math.ceil(num / mpl) * mpl;
} }
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: '/ajax/changeNum', url: '/ajax/changeNum',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment