Commit 7b0c451a by 朱继来

多快递单号显示

parent 2b0e372f
......@@ -111,7 +111,8 @@ function getShipping($order_id)
->table('lie_order_shipping')
->where(['order_id' => $order_id, 'shipping_type' => 1])
->select('shipping_no', 'status')
->first();
->orderBy('order_shipping_id')
->get();
if (!empty($shipping)) {
return $shipping;
......
......@@ -235,15 +235,24 @@
<?php
$shipping = App\Http\Controllers\getShipping($v['order_id']);
if ($shipping) {
switch ($shipping->status) {
case 1: echo '已配送'; break;
case 2: echo '已签收'; break;
default: echo '未配送'; break;
}
} else {
echo '';
}
$shippingStatus = '';
$shippingNo = '';
if ($shipping) {
foreach ($shipping as $s) {
switch ($s->status) {
case 1: $shippingStatus .= '已配送, '; break;
case 2: $shippingStatus .= '已签收, '; break;
default: $shippingStatus .= '未配送, '; break;
}
$shippingNo .= $s->shipping_no ? $s->shipping_no.', ' : '';
}
$shippingStatus = substr($shippingStatus, 0, -2);
}
echo $shippingStatus;
?>
</td>
<td class="show-list">
......@@ -342,8 +351,7 @@
</tr>
<tr>
<td class="table-list-title">快递单号</td>
<td class="table-list-content">{{$shipping ? $shipping->shipping_no : ''}}
</td>
<td class="table-list-content">{{$shippingNo ? substr($shippingNo, 0, -2) : ''}}</td>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-content">
<p class="show-title" title="{{$v['order_source']}}">{{$v['order_source']}}</p>
......
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