Commit 7a27307f by 朱继来

调整同步状态

parent 3466b1ab
...@@ -244,7 +244,7 @@ Class OrderController extends Controller ...@@ -244,7 +244,7 @@ Class OrderController extends Controller
// $map['order_pay_status'] = $request->input('order_pay_status', ''); // $map['order_pay_status'] = $request->input('order_pay_status', '');
$map['order_source_pf'] = $request->input('order_source_pf', ''); $map['order_source_pf'] = $request->input('order_source_pf', '');
$map['order_source_adtag'] = $request->input('order_source_adtag', ''); $map['order_source_adtag'] = $request->input('order_source_adtag', '');
$map['order_erp_syn'] = $request->input('order_erp_syn', ''); $map['erp_order_id'] = $request->input('erp_order_id', '');
} }
// 若没有'查看线下订单'权限,则仅查看线上订单 // 若没有'查看线下订单'权限,则仅查看线上订单
...@@ -397,7 +397,7 @@ Class OrderController extends Controller ...@@ -397,7 +397,7 @@ Class OrderController extends Controller
$map['order_type_a'] = $request->input('order_type_a', ''); $map['order_type_a'] = $request->input('order_type_a', '');
$map['order_source_pf'] = $request->input('order_source_pf', ''); $map['order_source_pf'] = $request->input('order_source_pf', '');
$map['order_source_adtag'] = $request->input('order_source_adtag', ''); $map['order_source_adtag'] = $request->input('order_source_adtag', '');
$map['order_erp_syn'] = $request->input('order_erp_syn', ''); $map['erp_order_id'] = $request->input('erp_order_id', '');
} }
// 若没有'查看线下订单'权限,则仅查看线上订单 // 若没有'查看线下订单'权限,则仅查看线上订单
...@@ -539,9 +539,11 @@ Class OrderController extends Controller ...@@ -539,9 +539,11 @@ Class OrderController extends Controller
}) })
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
// 同步状态 // 同步状态
if (!empty($map['order_erp_syn'])) { if ($map['erp_order_id'] == 1) {
$query->where('o.erp_syn', '=', $map['order_erp_syn']); $query->where('o.erp_order_id', '<>', '');
} } else {
$query->where('o.erp_order_id', '=', '');
}
}) })
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
// 竞调数据 // 竞调数据
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
order_source_pf = $('#order_source_pf').data('default'), order_source_pf = $('#order_source_pf').data('default'),
order_source_adtag = $('input[name="order_source_adtag"]').val(), order_source_adtag = $('input[name="order_source_adtag"]').val(),
test_order = $('input[name=test_order]'), test_order = $('input[name=test_order]'),
order_erp_syn = $('#order_erp_syn').data('default'), erp_order_id = $('#erp_order_id').data('default'),
listUrl = '/list'; listUrl = '/list';
listUrl += '?order_type=' + order_type; listUrl += '?order_type=' + order_type;
...@@ -76,15 +76,15 @@ ...@@ -76,15 +76,15 @@
listUrl += '&order_source_adtag=' + order_source_adtag; listUrl += '&order_source_adtag=' + order_source_adtag;
} }
if (order_erp_syn) { if (erp_order_id) {
listUrl += '&order_erp_syn=' + order_erp_syn; listUrl += '&erp_order_id=' + erp_order_id;
} }
if (test_order.is(':checked')) { if (test_order.is(':checked')) {
listUrl += '&test_order=' + 1; listUrl += '&test_order=' + 1;
} }
if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_erp_syn && !test_order.is(':checked')) { if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !erp_order_id && !test_order.is(':checked')) {
listUrl = '/list'; listUrl = '/list';
} }
...@@ -104,16 +104,16 @@ ...@@ -104,16 +104,16 @@
order_send = $('#order_send').data('default'), order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'), order_source_pf = $('#order_source_pf').data('default'),
order_source_adtag = $('input[name="order_source_adtag"]').val(), order_source_adtag = $('input[name="order_source_adtag"]').val(),
order_erp_syn = $('#order_erp_syn').data('default'), erp_order_id = $('#erp_order_id').data('default'),
test_order = $('input[name=test_order]'); test_order = $('input[name=test_order]');
if (test_order.length) { if (test_order.length) {
if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_erp_syn && !test_order.is(':checked')) { if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !erp_order_id && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
} else { } else {
if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_erp_syn) { if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !erp_order_id) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
test_order = ''; test_order = '';
} }
location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_pay_type='+order_pay_type+'&order_status='+order_status+'&shipping_name='+shipping_name+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&order_erp_syn='+order_erp_syn+'&test_order='+test_order; location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_pay_type='+order_pay_type+'&order_status='+order_status+'&shipping_name='+shipping_name+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&erp_order_id='+erp_order_id+'&test_order='+test_order;
}) })
// 选择查看测试订单 // 选择查看测试订单
......
...@@ -132,12 +132,11 @@ ...@@ -132,12 +132,11 @@
<dl> <dl>
<dt>同步状态:</dt> <dt>同步状态:</dt>
<dd> <dd>
<div class="droplist" data-default="{{$condition['order_erp_syn']}}" id="order_erp_syn" name="order_erp_syn"> <div class="droplist" data-default="{{$condition['erp_order_id']}}" id="erp_order_id" name="erp_order_id">
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li data-val="" class="active">全部</li> <li data-val="" class="active">全部</li>
<li data-val="1">已同步</li> <li data-val="1">已同步</li>
<li data-val="-1">不同步</li> <li data-val="-1">不同步</li>
<li data-val="-2">同步失败</li>
</ul> </ul>
</div> </div>
</dd> </dd>
...@@ -249,14 +248,11 @@ ...@@ -249,14 +248,11 @@
?> ?>
</td> </td>
<td class="show-list"> <td class="show-list">
<?php @if ($v['erp_order_id'])
switch ($v['erp_syn']) { 已同步
case -2: echo '同步失败'; break; @else
case -1: echo '不同步'; break; 不同步
case 1: echo '已同步'; break; @endif
default: echo '未配送'; break;
}
?>
</td> </td>
<td class="show-list">{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}</td> <td class="show-list">{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}</td>
<td> <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