Commit 9c943632 by 朱继来

添加已出库退货判断

parent ad0240d3
...@@ -239,6 +239,17 @@ ...@@ -239,6 +239,17 @@
return false; return false;
} }
var service_type = $('.service_type').val(); // 售后类型
var fqty = $(this).parents('tr').find('.fqty').text();
if (service_type == 2) { // 出库退货
if (parseInt(val) > parseInt(fqty)) {
layer.tips('不能超过订单出库数量', $(this));
$(this).val('');
return false;
}
}
var single_pre_price = parseFloat($(this).parents('tr').find('.single_pre_price').html()); // 原订单均摊单价 var single_pre_price = parseFloat($(this).parents('tr').find('.single_pre_price').html()); // 原订单均摊单价
var goods_number = parseInt($(this).parents('tr').find('.origin-goods-number').html()); // 原订单数量 var goods_number = parseInt($(this).parents('tr').find('.origin-goods-number').html()); // 原订单数量
var service_goods_number = parseInt($(this).parents('tr').find('.service-goods-number').html()) || 0; // 已售后数量 var service_goods_number = parseInt($(this).parents('tr').find('.service-goods-number').html()) || 0; // 已售后数量
......
...@@ -119,7 +119,7 @@ layui.use(['form', 'table', 'laydate'], function(){ ...@@ -119,7 +119,7 @@ layui.use(['form', 'table', 'laydate'], function(){
<td>'+ items[i].goods_name +'</td>\ <td>'+ items[i].goods_name +'</td>\
<td>'+ items[i].brand_name +'</td>\ <td>'+ items[i].brand_name +'</td>\
<td class="origin-goods-number">'+ items[i].goods_number +'</td>\ <td class="origin-goods-number">'+ items[i].goods_number +'</td>\
<td>'+ items[i].removal_number +'</td>\ <td class="fqty">'+ items[i].removal_number +'</td>\
<td class="single_pre_price">'+ items[i].single_pre_price +'</td>\ <td class="single_pre_price">'+ items[i].single_pre_price +'</td>\
<td class="service-goods-number"></td>'; <td class="service-goods-number"></td>';
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<td>{{ $v['goods_name'] }}</td> <td>{{ $v['goods_name'] }}</td>
<td>{{ $v['brand_name'] }}</td> <td>{{ $v['brand_name'] }}</td>
<td class="origin-goods-number">{{ $v['goods_number'] }}</td> <td class="origin-goods-number">{{ $v['goods_number'] }}</td>
<td>{{ $v['fqty'] }}</td> <td class="fqty">{{ $v['fqty'] }}</td>
<td class="single_pre_price">{{ $v['single_pre_price'] }}</td> <td class="single_pre_price">{{ $v['single_pre_price'] }}</td>
<td class="service-goods-number">{{ App\Http\Controllers\getOrderServiceNum($v['order_id'], $v['goods_id']) }}</td> <td class="service-goods-number">{{ App\Http\Controllers\getOrderServiceNum($v['order_id'], $v['goods_id']) }}</td>
<td><input type="text" class="adjust_number" name="service_item[{{ $v['rec_id'] }}][adjust_number]"></td> <td><input type="text" class="adjust_number" name="service_item[{{ $v['rec_id'] }}][adjust_number]"></td>
......
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