Commit bc69f462 by 朱继来

调整SKU获取接口

parents 698e493b e02b8a01
......@@ -155,6 +155,9 @@ li {
.preferential_price, .extend_fee { /* 优惠金额、附加费 */
display: none;
}
.price-line {
text-decoration: line-through;
}
/*提交订单成功页面*/
.section-1, .section-3{
......
......@@ -240,19 +240,20 @@
$('.moq').text(data.min_buy);
$('.mpq').text(data.min_mpq);
if (goods_type == 1) {
var status = data.goods_status;
} else {
var status = data.status;
}
switch (status) {
case 0: status_val = '待入库'; break;
case 1: status_val = '审核通过(上架)'; break;
case 3: status_val = '下架'; break;
case 4: status_val = '删除'; break;
}
// if (goods_type == 1) {
// var status = data.goods_status;
// } else {
// var status = data.status;
// }
// switch (status) {
// case 0: status_val = '待入库'; break;
// case 1: status_val = '审核通过(上架)'; break;
// case 3: status_val = '下架'; break;
// case 4: status_val = '删除'; break;
// }
status_val = data.is_buy ? '是' : '否';
$('.status').text(status_val);
$('.goods_id').val(data.goods_id);
$('.goods_type').val(data.goods_type);
......@@ -260,28 +261,52 @@
//阶梯价格
if (data.tiered != null) {
var len = data.tiered.length;
if (len > 0) {
var html = '';
var str = '';
for (var i = 0; i < len; i++) {
if (i == 0) {
html += '<tr><th>阶梯</th><th>RMB价格</th>';
if (data.ac_type == 1) {
html += '<th>活动价</th>';
}
if (goods_type == 1) {
str = '<td>$<span class="goods-min-price-us">'+data.tiered[i]['price_us']+'</span></td>';
html += '<th>USD价格</th>';
}
html += '<tr><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>'+str+'</tr>';
html += '</tr>';
for (var i = 0; i < len; i++) {
html += '<tr>';
if (i == 0) {
if (data.ac_type) {
html += '<td><span class="goods-min-num">'+data.tiered[i]['purchases']+'</span></td><td>¥<span class="goods-min-price price-line">'+data.tiered[i]['price_cn']+'</span><td>¥<span>'+data.tiered[i]['price_ac']+'</span></td>';
} else {
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) {
str = '<td>$<span>'+data.tiered[i]['price_us']+'</span></td>';
html += '<td>$<span class="goods-min-price-us">'+data.tiered[i]['price_us']+'</span></td>';
}
} else {
if (data.ac_type) {
html += '<td><span>'+data.tiered[i]['purchases']+'</span></td><td>¥<span class="price-line">'+data.tiered[i]['price_cn']+'</span></td><td>¥<span>'+data.tiered[i]['price_ac']+'</span></td>';
} else {
html += '<td><span>'+data.tiered[i]['purchases']+'</span></td><td>¥<span>'+data.tiered[i]['price_cn']+'</span></td>';
}
html += '<tr><td><span>'+data.tiered[i]['purchases']+'</span></td><td>¥<span>'+data.tiered[i]['price_cn']+'</span></td>'+str+'</tr>';
if (goods_type == 1) {
html += '<td>$<span>'+data.tiered[i]['price_us']+'</span></td>';
}
}
html += '</tr>';
}
$('.ladder_price_table tr:gt(0)').remove();
$('.ladder_price_table').append(html);
// $('.ladder_price_table tr:gt(0)').remove();
$('.ladder_price_table').empty().append(html);
}
}
}
......@@ -312,7 +337,7 @@
return false;
}
if (type == 0) {
if (type == 3 || type == 4) {
layer.msg('仅支持联营商品下单,请在自营订单中下单');
return false;
}
......
......@@ -301,7 +301,7 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>状态</span>
<span>是否能购买</span>
<span class="status"></span>
</div>
</div>
......@@ -310,10 +310,10 @@
<div class="sku-info-right">
<table class="table table-hover ladder_price_table">
<tr>
<!-- <tr>
<th>阶梯</th>
<th>RMB价格</th>
</tr>
</tr> -->
</table>
</div>
......
......@@ -320,7 +320,7 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>状态</span>
<span>是否能购买</span>
<span class="status"></span>
</div>
</div>
......@@ -329,11 +329,11 @@
<div class="sku-info-right">
<table class="table table-hover ladder_price_table">
<tr>
<!-- <tr>
<th>阶梯</th>
<th>RMB价格</th>
<th>USD价格</th>
</tr>
</tr> -->
</table>
</div>
......
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