Commit 8e1a6d52 by 朱继来

调整批量调价

parent 816d531e
......@@ -1925,7 +1925,7 @@
// })
// 设置折扣
$('.set_goods_price').off().on('keyup', function(){
$('.set_goods_price').off().on('blur', function(){
var val = $(this).val();
if (!val) {
......@@ -1948,11 +1948,19 @@
$('.order-change-table').find('tbody tr').each(function(){
var price = $(this).find('.price').val();
var discount_price = parseFloat(price * discount).toFixed(4);
var origin_price = $(this).find('.price').data('price');
var discount_price = 0;
if (val == 1) {
discount_price = origin_price;
} else {
discount_price = parseFloat(price * discount).toFixed(4);
}
$(this).find('.price').val(discount_price);
})
$('.order-change-table input').triggerHandler('blur'); // 自动触发
$('.order-change-table input').triggerHandler('keyup'); // 自动触发
})
// 选择付款时间
......
......@@ -126,7 +126,7 @@
</td>
<td>
<span>{{$currency}}</span>
<input class="price only_number" name="change_info[{{$v['rec_id']}}][goods_price]" data-origin="{{$v['original_price']}}" value="{{$v['goods_price']}}">
<input class="price only_number" name="change_info[{{$v['rec_id']}}][goods_price]" data-origin="{{$v['original_price']}}" data-price="{{$v['goods_price']}}" value="{{$v['goods_price']}}">
</td>
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
......
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