Commit 926bfbca by 朱继来

添加同步状态

parent c69188f8
......@@ -244,6 +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', '');
}
// 若没有'查看线下订单'权限,则仅查看线上订单
......@@ -396,6 +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', '');
}
// 若没有'查看线下订单'权限,则仅查看线上订单
......@@ -536,6 +538,12 @@ Class OrderController extends Controller
}
})
->where(function ($query) use ($map) {
// 同步状态
if (!empty($map['order_erp_syn'])) {
$query->where('o.erp_syn', '=', $map['order_erp_syn']);
}
})
->where(function ($query) use ($map) {
// 竞调数据
if (isset($map['is_fake'])) {
$query->where('o.is_type', '=', $map['is_fake']);
......@@ -547,10 +555,10 @@ Class OrderController extends Controller
->orderBy('o.create_time', 'DESC')
->get();
if (!empty($list)) {
// 订单数据处理
$export = $this->exportList($list);
if($export){
$xlsName = '订单数据导出';
$xlslist = exportExcel($xlsName, $xlsCell, $export);
$this->$xlslist;
......@@ -615,6 +623,7 @@ Class OrderController extends Controller
);
$i = 0;
$tmp = array();
foreach ($order as $val) {
// 推送人
......@@ -644,11 +653,7 @@ Class OrderController extends Controller
$i++;
}
if (!empty($tmp)) {
return $tmp;
} else {
return false;
}
}
// 详情页
......
......@@ -27,6 +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'),
listUrl = '/list';
listUrl += '?order_type=' + order_type;
......@@ -75,11 +76,15 @@
listUrl += '&order_source_adtag=' + order_source_adtag;
}
if (order_erp_syn) {
listUrl += '&order_erp_syn=' + order_erp_syn;
}
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 && !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 && !order_erp_syn && !test_order.is(':checked')) {
listUrl = '/list';
}
......@@ -99,15 +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'),
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 && !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 && !order_erp_syn && !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) {
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) {
layer.msg('请选择筛选条件,再导出!');
return false;
}
......@@ -127,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+'&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;
})
// 选择查看测试订单
......
......@@ -129,6 +129,19 @@
<input type="text" name="order_source_adtag" value="{{$condition['order_source_adtag']}}" placeholder="请输入内容">
</dd>
</dl>
<dl>
<dt>同步状态:</dt>
<dd>
<div class="droplist" data-default="{{$condition['order_erp_syn']}}" id="order_erp_syn" name="order_erp_syn">
<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>
</dl>
@if (in_array('check_test_order', $userPerms))
<dl>
<dt></dt>
......@@ -163,7 +176,7 @@
<th class="pl30">支付方式</th>
<th class="pl30">推送业务员</th>
<th class="pl30">发货状态</th>
<th class="pl30">配送方式</th>
<th class="pl30">同步状态</th>
<th class="pl30">下单时间</th>
<th class="pl30">操作</th>
</tr>
......@@ -236,13 +249,16 @@
?>
</td>
<td class="show-list">
@if ($v['order_shipping_type'] == '1')
快递配送
@else
自提
@endif
<?php
switch ($v['erp_syn']) {
case -2: echo '同步失败'; break;
case -1: echo '不同步'; break;
case 1: echo '已同步'; break;
default: echo '未配送'; break;
}
?>
</td>
<td class="show-list">{{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>
<div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}">详情</a>
......@@ -280,14 +296,14 @@
<?php
if ($v['order_pay_time'] != 0) {
if ($username != 'vpadmin@ichunt.com') {
echo date('Y-m-d', $v['order_pay_time']);
echo date('Y-m-d h:i:s', $v['order_pay_time']);
} else {
echo date('Y-m-d', $v['order_pay_time']);
}
} else {
if ($v['advance_pay_time'] != 0) {
if ($username != 'vpadmin@ichunt.com') {
echo date('Y-m-d', $v['advance_pay_time']);
echo date('Y-m-d h:i:s', $v['advance_pay_time']);
} else {
echo date('Y-m-d', $v['advance_pay_time']);
}
......@@ -316,13 +332,23 @@
</td>
</tr>
<tr>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-title">配送方式</td>
<td class="table-list-content">
<p class="show-title" title="{{$v['order_source']}}">{{$v['order_source']}}</p>
@if ($v['order_shipping_type'] == '1')
快递配送
@else
自提
@endif
</td>
<td class="table-list-title">优惠金额</td>
<td class="table-list-content"><?php echo App\Http\Controllers\getCoupon($v['order_id']); ?></td>
</tr>
<tr>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-content" colspan="3">
<p class="show-title" title="{{$v['order_source']}}">{{$v['order_source']}}</p>
</td>
</tr>
</table>
</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