Commit e1c68e6c by 朱继来

添加运费

parent 8bdef0c5
......@@ -960,17 +960,20 @@
}
// 自营商品检查数量
if (goods_type == 2) {
// if (goods_type == 2) { // 20200826 订单合并后,不以goods_type为判断条件
var changeGoods = [];
$('.shop-table tbody tr').each(function() {
var goods_id = $(this).find('.goods_id').text();
var num = Number($(this).find('.goods_num').val());
var mpl = Number($(this).find('.goods_mpl').text());
var cart_id = $(this).data('cid');
var type = $(this).data('type');
if (num % mpl != 0) {
var goods_id = $(this).find('.goods_id').text();
var num = Number($(this).find('.goods_num').val());
var mpl = Number($(this).find('.goods_mpl').text());
var cart_id = $(this).data('cid');
var type = $(this).data('type');
var curr_goods_type = $(this).data('goods_type');
var self_goods_type = ['3', '4']; // 自营商品类型
// 自营商品 且 数量与倍数不匹配
if (self_goods_type.indexOf(curr_goods_type) != -1 && num % mpl != 0) {
num = Math.ceil(num / mpl) * mpl;
$.ajax({
......@@ -992,7 +995,7 @@
layer.alert('已按倍数调整购买数量,商品ID:'+changeGoods.join(', '));
self.lists(user_id, goods_type, is_online, delivery_place); // 加载购物车列表
}
}
// }
} else {
layer.msg(resp.errmsg || '网络异常');
......@@ -1108,9 +1111,11 @@
$('.extend_fee_val').empty().text(data.extend_fee_format); // 附加费
}
if (goods_type == 2 && business_type != 2) { // 自营仓库损耗不需要运费
$('.express_fee_val').empty().text(data.finally_shipping_price_format); // 运费
}
// if (goods_type == 2 && business_type != 2) { // 自营仓库损耗不需要运费
// $('.express_fee_val').empty().text(data.finally_shipping_price_format); // 运费
// }
$('.express_fee_val').empty().text(data.finally_shipping_price_format); // 订单合并后,如果存在运费则需要展示
} else {
$('.amount-section').show();
$('.order_amount').empty().text(data.order_amount_format);
......
......@@ -468,6 +468,11 @@
</div>
<div class="row">
<p class="con-title"><span>运费:</span></p>
<p class="con-val express_fee_val">0.00</p>
</div>
<div class="row">
<p class="con-title"><span>应付金额:</span></p>
<p class="con-val text-danger order_amount"></p>
</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