Commit 7b0c451a by 朱继来

多快递单号显示

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