Commit 0730701f by 朱继来

调整后台下单

parent 81316f88
Showing with 18 additions and 17 deletions
......@@ -281,7 +281,7 @@
return false;
}
if (!/\d/.test(sku_id)) {
if (!/^\d*$/.test(sku_id)) {
layer.msg('参数错误,请输入正确的SKU_ID');
return false;
}
......@@ -301,7 +301,6 @@
$('.sku-info').show();
var data = resp.data;
var status_val = '';
$('.goods_name').text(data.goods_name);
......@@ -312,7 +311,7 @@
$('.mpq').text(data.min_mpq);
if(data.self_supplier_type == 1){
$('.self_supplier_type').text('自采');
$('.self_supplier_type').text('自采');
}else if(data.self_supplier_type == 2){
$('.self_supplier_type').text('立创');
}else{
......@@ -357,7 +356,9 @@
}
}
if (goods_type == 1) {
var joint_goods_type = ['1', '2']; // 商品联营类型
if (joint_goods_type.indexOf(data.goods_type) != -1) {
html += '<th>USD价格</th>';
}
......@@ -373,7 +374,7 @@
html += '<td><span class="goods-min-num">'+data.tiered[i]['purchases']+'</span></td><td>¥<span class="goods-min-price">'+data.tiered[i]['price_cn']+'</span></td>';
}
if (goods_type == 1) {
if (joint_goods_type.indexOf(data.goods_type) != -1) {
html += '<td>$<span class="goods-min-price-us">'+data.tiered[i]['price_us']+'</span></td>';
}
} else {
......@@ -383,7 +384,7 @@
html += '<td><span>'+data.tiered[i]['purchases']+'</span></td><td>¥<span>'+data.tiered[i]['price_cn']+'</span></td>';
}
if (goods_type == 1) {
if (joint_goods_type.indexOf(data.goods_type) != -1) {
html += '<td>$<span>'+data.tiered[i]['price_us']+'</span></td>';
}
}
......@@ -418,7 +419,7 @@
return false;
}
if (goods_type == 1) { // 联营需要选择交货地
// if (goods_type == 1) { // 联营需要选择交货地
delivery_place = $('input[name=delivery_place]:checked').val();
if (delivery_place == null) {
......@@ -426,10 +427,10 @@
return false;
}
if (type == 3 || type == 4) {
layer.msg('仅支持联营商品下单,请在自营订单中下单');
return false;
}
// if (type == 3 || type == 4) {
// layer.msg('仅支持联营商品下单,请在自营订单中下单');
// return false;
// }
var goods_min_price = $(this).parents('.sku-info').find('.goods-min-price').text();
var goods_min_price_us = $(this).parents('.sku-info').find('.goods-min-price-us').text();
......@@ -445,12 +446,12 @@
return false;
}
}
} else {
if (type == 1 || type == 2) { // 1.联营 2.专卖
layer.msg('仅支持自营商品下单,请在联营订单中下单');
return false;
}
}
// } else {
// if (type == 1 || type == 2) { // 1.联营 2.专卖
// layer.msg('仅支持自营商品下单,请在联营订单中下单');
// return false;
// }
// }
var datax = {
uid: user_id,
......
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