Commit defdb1ed by 朱继来

调整导出、物流信息

parent 18446595
......@@ -186,7 +186,7 @@ class OrderModel extends Model
})
->where('it.status', '<>', -1)
->where('o.order_goods_type', '=', $map['order_goods_type'])
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'c.com_name', 'oe.send_remark')
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'a.consignee', 'a.address', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'c.com_name', 'oe.send_remark')
->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC')
->get()
......@@ -197,7 +197,7 @@ class OrderModel extends Model
$cellData = $this->exportList($list);
// 标题
$headerCell = ['订单ID', '订单编号', '会员账号', '会员标签', '收货人', '下单日期', '下单时间', '客户名称', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '商品总额', '运费', '附加费', '优惠券', '订单总额', '币种', '订单类型', '订单状态', '发货状态', '发票类型', '发票状态', $sale_name, 'adtags来源', '新用户来源', '取消原因', '推送备注'];
$headerCell = ['订单ID', '订单编号', '会员账号', '收货人', '下单日期', '下单时间', '客户名称', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '商品总额', '运费', '附加费', '优惠券', '订单总额', '币种', '订单类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', '税务登记号', '开户银行', '银行卡号', $sale_name, 'adtags来源', '新用户来源', '取消原因', '推送备注'];
array_unshift($cellData, $headerCell);
......@@ -280,7 +280,7 @@ class OrderModel extends Model
$tmp[$i]['order_id'] = $order[$i]['order_id'];
$tmp[$i]['order_sn'] = "\t".$order[$i]['order_sn']."\t";
$tmp[$i]['user_account'] = $order[$i]['mobile'] ? $order[$i]['mobile'] : $order[$i]['email'];
$tmp[$i]['is_new'] = isset($order[$i]['is_new']) ? $user_tags[$order[$i]['is_new']] : '';
// $tmp[$i]['is_new'] = isset($order[$i]['is_new']) ? $user_tags[$order[$i]['is_new']] : ''; // 会员标签
$tmp[$i]['consignee'] = isset($order[$i]['consignee']) ? $order[$i]['consignee'] : '';
$tmp[$i]['create_time_date'] = date('Y-m-d', $order[$i]['create_time']);
$tmp[$i]['create_time_sec'] = date('H:i:s', $order[$i]['create_time']);
......@@ -306,13 +306,13 @@ class OrderModel extends Model
$tmp[$i]['extra_fee'] = '';
$tmp[$i]['coupon'] = '';
$tmp[$i]['order_amount'] = '';
$tmp[$i]['currency'] = '';
$tmp[$i]['order_type'] = '';
$tmp[$i]['order_status'] = '';
$tmp[$i]['shipping_status'] = ''; // 发货状态
$tmp[$i]['inv_type'] = ''; // 发票类型
$tmp[$i]['invoice_status'] = ''; // 发票状态
$tmp[$i]['sale_name'] = ''; // 推送业务员
// $tmp[$i]['currency'] = '';
// $tmp[$i]['order_type'] = '';
// $tmp[$i]['order_status'] = '';
// $tmp[$i]['shipping_status'] = ''; // 发货状态
// $tmp[$i]['inv_type'] = ''; // 发票类型
// $tmp[$i]['invoice_status'] = ''; // 发票状态
// $tmp[$i]['sale_name'] = ''; // 推送业务员
$tmp[$i]['adtags'] = '';
$tmp[$i]['client_source'] = '';
$tmp[$i]['cancel_reason'] = '';
......@@ -327,8 +327,15 @@ class OrderModel extends Model
$tmp[$i]['order_type'] = !empty($order[$i]['order_pay_type']) ? $order_type[$order[$i]['order_pay_type']] : '未知';
$tmp[$i]['order_status'] = !empty($order[$i]['status']) ? $order_status[$order[$i]['status']] : '未知';
$tmp[$i]['shipping_status'] = !empty($order[$i]['shipping_status']) ? $shipping_status[$order[$i]['shipping_status']] : '无发货信息'; // 发货状态
$tmp[$i]['address'] = $order[$i]['address'];
$tmp[$i]['inv_type'] = $order[$i]['inv_type'] ? $inv_type[$order[$i]['inv_type']] : '未知'; // 发票类型
$tmp[$i]['invoice_status'] = !empty($order[$i]['invoice_status']) ? $invoice_status[$order[$i]['invoice_status']] : '无发票信息'; // 发票状态
$tmp[$i]['tax_title'] = $order[$i]['tax_title'];
$tmp[$i]['company_address'] = $order[$i]['company_address'];
$tmp[$i]['company_phone'] = $order[$i]['company_phone'];
$tmp[$i]['tax_no'] = $order[$i]['tax_no'];
$tmp[$i]['bank_name'] = $order[$i]['bank_name'];
$tmp[$i]['bank_account'] = $order[$i]['bank_account'];
$tmp[$i]['sale_name'] = isset($sales) ? $sales->name : ''; // 推送业务员
$tmp[$i]['adtags'] = $order[$i]['order_source'];
$tmp[$i]['client_source'] = $order[$i]['client_source'];
......
......@@ -190,3 +190,10 @@ li {
float: left;
}
.other-infos, .click-up{
display: none;
}
.click-up, .click-down {
cursor: pointer;
}
......@@ -624,6 +624,20 @@
})
})
// 点击物流展开
$('.click-down').click(function() {
$('.other-infos').show();
$(this).hide();
$('.click-up').show();
})
// 点击物流收起
$('.click-up').click(function() {
$('.other-infos').hide();
$(this).hide();
$('.click-down').show();
})
},
//物流信息
......
......@@ -591,9 +591,9 @@
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
@if (in_array($order_info['status'], [2, 3]) && in_array('check_account', $userPerms))
@if ($order_info['status'] == 3 && (!empty($order_pay_log) && $order_pay_log[0]['pay_type'] != ''))
<a href="javascript:;" data-id="{{$order_info['order_id']}}" class="btn btn-default last-check">对账</a>
<a href="javascript:;" data-id="{{$order_info['order_id']}}" class="btn btn-success last-check">对账</a>
@else
<a href="{{URL('checkPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">对账</a>
<a href="{{URL('checkPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-success">对账</a>
@endif
@endif
......@@ -620,7 +620,7 @@
@endif
@if ($order_info['status'] == 2 && in_array('self_check_pay', $userPerms))
<a href="/self_check_pay/{{$order_info['order_id']}}?tags=self" class="btn btn-default">对账</a>
<a href="/self_check_pay/{{$order_info['order_id']}}?tags=self" class="btn btn-success">对账</a>
@endif
@if ($order_info['status'] == 4 && in_array('self_order_express', $userPerms))
......@@ -643,24 +643,62 @@
@endif
@endif
@if (!empty($order_shipping_inside))
@if (!empty($order_shipping_info['info']) || !empty($order_shipping_inside))
<p>物流信息</p>
<div class="tabs-box">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>物流时间</th>
<th width="15%">物流时间</th>
<th>物流信息</th>
</tr>
</thead>
<tbody>
@foreach ($order_shipping_inside as $v)
<tr>
<td width="15%">{{date('Y-m-d H:i:s', $v['create_time'])}}</td>
<td>{{$v['info']}}</td>
</tr>
@endforeach
@if (!empty($order_shipping_info['info']))
<?php $shippings_info = json_decode($order_shipping_info['info'], true); ?>
@foreach ($shippings_info as $k=>$v)
@if ($k < 4)
<tr>
<td>{{$v['AcceptTime']}}</td>
<td>{{$v['AcceptStation']}}</td>
</tr>
@else
<tr class="other-infos">
<td>{{$v['AcceptTime']}}</td>
<td>{{$v['AcceptStation']}}</td>
</tr>
@endif
@if ($k >= 4 && $k == count($shippings_info)-1)
<tr>
<td colspan="2" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="2" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
@endif
@endforeach
@else
@foreach ($order_shipping_inside as $k=>$v)
@if ($k < 4)
<tr>
<td>{{date('Y-m-d H:i:s', $v['create_time'])}}</td>
<td>{{$v['info']}}</td>
</tr>
@else
<tr class="other-infos">
<td>{{date('Y-m-d H:i:s', $v['create_time'])}}</td>
<td>{{$v['info']}}</td>
</tr>
@endif
@if ($k >= 4 && $k == count($order_shipping_inside)-1)
<tr>
<td colspan="2" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="2" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
@endif
@endforeach
@endif
</tbody>
</table>
</div>
......@@ -678,12 +716,28 @@
</tr>
</thead>
<tbody>
@foreach ($actionLog as $v)
<tr>
<td width="15%">{{date('Y-m-d H:i:s', $v->create_time)}}</td>
<td width="10%">{{App\Http\Controllers\getOperatorName($v->operator_id, $v->operator_type)}}</td>
<td>{{$v->event}}</td>
</tr>
@foreach ($actionLog as $k=>$v)
@if ($k < 4)
<tr>
<td width="15%">{{date('Y-m-d H:i:s', $v->create_time)}}</td>
<td width="10%">{{App\Http\Controllers\getOperatorName($v->operator_id, $v->operator_type)}}</td>
<td>{{$v->event}}</td>
</tr>
@else
<tr class="other-infos">
<td width="15%">{{date('Y-m-d H:i:s', $v->create_time)}}</td>
<td width="10%">{{App\Http\Controllers\getOperatorName($v->operator_id, $v->operator_type)}}</td>
<td>{{$v->event}}</td>
</tr>
@endif
@if ($k >= 4 && $k == count($actionLog)-1)
<tr>
<td colspan="3" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="3" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
@endif
@endforeach
</tbody>
</table>
......
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