Commit 16cb8539 by 朱继来

Merge branch 'zjl_exception_20210729' into development

parents 6f552918 7913c973
......@@ -747,8 +747,10 @@ Class AddOrderController extends Controller
{
$info = $this->getPageInfo($request);
$order_id = $request->input('order_id');
$type = $request->input('type');
$order_id = $request->input('order_id', 0);
$type = $request->input('type', 1);
if (!$order_id) return redirect('/');
switch ($type) {
case 1: $title = '新增联营订单'; break;
......
......@@ -232,6 +232,15 @@
})
})
// 选择售后类型
$('.service_type').change(function() {
var val = $(this).val();
if (val == 2) { // 出库类型,则校验申请数量
$('.adjust_number').trigger('keyup');
}
})
// 数量输入校验
$(document).delegate('.adjust_number', 'keyup', function() {
var val = $(this).val();
......@@ -247,12 +256,16 @@
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;
}
if (service_type == 2 && parseInt(val) > parseInt(fqty)) { // 出库退货
layer.tips('不能超过订单出库数量', $(this));
$(this).val('');
return false;
}
if (service_type == 1 && fqty) { // 未出库取消类型 且 出库数量存在
layer.tips('该明细已出库,不支持未出库取消类型', $(this));
$(this).val('');
return false;
}
var single_pre_price = parseFloat($(this).parents('tr').find('.single_pre_price').html()); // 原订单均摊单价
......
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