Commit 6bd0cfff by 朱继来

Merge branch 'master' of http://119.23.72.7/zhujilai/Order into zjl_order_msg_20180402

parents 2411f3ea 11573682
......@@ -110,11 +110,11 @@ function getShipping($order_id)
$shipping = DB::connection('order')
->table('lie_order_shipping')
->where(['order_id' => $order_id, 'shipping_type' => 1])
->select('status')
->select('shipping_no', 'status')
->first();
if (!empty($shipping)) {
return $shipping->status;
return $shipping;
}
return false;
......@@ -244,7 +244,7 @@ Class OrderController extends Controller
// $map['order_pay_status'] = $request->input('order_pay_status', '');
$map['order_source_pf'] = $request->input('order_source_pf', '');
$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
$map['order_type_a'] = $request->input('order_type_a', '');
$map['order_source_pf'] = $request->input('order_source_pf', '');
$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,9 @@ Class OrderController extends Controller
})
->where(function ($query) use ($map) {
// 同步状态
if (!empty($map['order_erp_syn'])) {
$query->where('o.erp_syn', '=', $map['order_erp_syn']);
}
if (!empty($map['erp_order_id'])) {
$query->where('o.erp_order_id', '<>', '');
}
})
->where(function ($query) use ($map) {
// 竞调数据
......
......@@ -27,7 +27,7 @@
order_source_pf = $('#order_source_pf').data('default'),
order_source_adtag = $('input[name="order_source_adtag"]').val(),
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 += '?order_type=' + order_type;
......@@ -76,15 +76,15 @@
listUrl += '&order_source_adtag=' + order_source_adtag;
}
if (order_erp_syn) {
listUrl += '&order_erp_syn=' + order_erp_syn;
if (erp_order_id) {
listUrl += '&erp_order_id=' + erp_order_id;
}
if (test_order.is(':checked')) {
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';
}
......@@ -104,16 +104,16 @@
order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'),
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]');
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('请选择筛选条件,再导出!');
return false;
}
} 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('请选择筛选条件,再导出!');
return false;
}
......@@ -133,7 +133,7 @@
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,10 @@
<dl>
<dt>同步状态:</dt>
<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">
<li data-val="" class="active">全部</li>
<li data-val="1">已同步</li>
<li data-val="-1">不同步</li>
<li data-val="-2">同步失败</li>
</ul>
</div>
</dd>
......@@ -235,10 +233,10 @@
</td>
<td class="show-list" class="show-list">
<?php
$status = App\Http\Controllers\getShipping($v['order_id']);
$shipping = App\Http\Controllers\getShipping($v['order_id']);
if ($status) {
switch ($status) {
if ($shipping) {
switch ($shipping->status) {
case 1: echo '已配送'; break;
case 2: echo '已签收'; break;
default: echo '未配送'; break;
......@@ -250,11 +248,10 @@
</td>
<td class="show-list">
<?php
switch ($v['erp_syn']) {
case -2: echo '同步失败'; break;
case -1: echo '不同步'; break;
case 1: echo '已同步'; break;
default: echo '未配送'; break;
if (in_array($v['status'], [-1, 1, 2])) {
echo '不需同步';
} else {
echo $v['erp_order_id'] ? '<span class="list-text-success"><b>已同步</b></span>' : '<span class="list-text-checking"><b>未同步</b></span>';
}
?>
</td>
......@@ -343,9 +340,12 @@
<td class="table-list-title">优惠金额</td>
<td class="table-list-content"><?php echo App\Http\Controllers\getCoupon($v['order_id']); ?></td>
</tr>
<tr>
<tr>
<td class="table-list-title">快递单号</td>
<td class="table-list-content">{{$shipping ? $shipping->shipping_no : ''}}
</td>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-content" colspan="3">
<td class="table-list-content">
<p class="show-title" title="{{$v['order_source']}}">{{$v['order_source']}}</p>
</td>
</tr>
......
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