Commit 0f3dc01e by 朱继来

只验证正常订单

parent 48257c6b
...@@ -1934,6 +1934,7 @@ ...@@ -1934,6 +1934,7 @@
var sale_id = $('input[name=sale_id]').val(); var sale_id = $('input[name=sale_id]').val();
var order_goods_type = $('input[name=order_goods_type]').val(); var order_goods_type = $('input[name=order_goods_type]').val();
var order_id = $('input[name=order_id]').val(); var order_id = $('input[name=order_id]').val();
var business_type = $('input[name=business_type]').val();
// 联营订单需要先指派业务员 // 联营订单需要先指派业务员
if (order_goods_type == 1 && sale_id == 0) { if (order_goods_type == 1 && sale_id == 0) {
...@@ -1961,30 +1962,32 @@ ...@@ -1961,30 +1962,32 @@
return false; return false;
} }
// 校验商品数量、单价 // 正常订单校验数量、单价
var change_price = false; if (business_type == 0) {
var change_goods_number = false; var change_price = false;
var change_str = ''; var change_goods_number = false;
$('.order-change-table').find('tbody tr').each(function(){ var change_str = '';
var goods_number = $(this).find('.change_goods_number').val(); $('.order-change-table').find('tbody tr').each(function(){
var price = $(this).find('.price').val(); var goods_number = $(this).find('.change_goods_number').val();
var goods_name = $(this).find('.change_goods_name').val(); var price = $(this).find('.price').val();
var goods_name = $(this).find('.change_goods_name').val();
if (goods_number == '' || goods_number == 0) {
change_goods_number = true; if (goods_number == '' || goods_number == 0) {
change_str += goods_name+'数量不能为0或空 '; change_goods_number = true;
} change_str += goods_name+'数量不能为0或空 ';
}
if (price == '' || price == 0) {
change_price = true;
change_str += goods_name+'单价不能为0或空 ';
}
})
if (price == '' || price == 0) { if (change_price || change_goods_number) {
change_price = true; layer.alert(change_str)
change_str += goods_name+'单价不能为0或空 '; return false;
} }
}) }
if (change_price || change_goods_number) {
layer.alert(change_str)
return false;
}
// 预付款 // 预付款
if (pay_type == 2) { if (pay_type == 2) {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<input type="hidden" name="check_failed" value=""> <input type="hidden" name="check_failed" value="">
<input type="hidden" name="check_failed_info" value=""> <input type="hidden" name="check_failed_info" value="">
<input type="hidden" name="change_pay_type" value=""> <input type="hidden" name="change_pay_type" value="">
<input type="hidden" name="business_type" value="{{$order_temp_info['business_type']}}">
<?php $isNewClient = App\Http\Controllers\isNewClient($order_info['order_goods_type'], $order_info['user_id'], $order_info['create_time']); ?> <?php $isNewClient = App\Http\Controllers\isNewClient($order_info['order_goods_type'], $order_info['user_id'], $order_info['create_time']); ?>
@if ($isNewClient) @if ($isNewClient)
......
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