Commit 4f057d4f by 朱继来

Merge branch 'zjl_shipping_20201201'

parents 33ced2ce b3d9cf3b
......@@ -1665,6 +1665,11 @@ Class OrderController extends Controller
'order_extra' => $temp['data']['order_extra'],
];
// 自营物流信息
$response['self_user_id'] = isset($temp['data']['self_user_id']) ? $temp['data']['self_user_id'] : '';
$response['self_order_shipping_info'] = isset($temp['data']['self_order_shipping_info']) ? $temp['data']['self_order_shipping_info'] : '';
$response['self_order_invoice_shipping_info'] = isset($temp['data']['self_order_invoice_shipping_info']) ? $temp['data']['self_order_invoice_shipping_info'] : '';
// 获取收款信息
if ($response['order_info']['order_goods_type'] == 2 && in_array($response['order_info']['status'], [2, 3])) {
$PayExtendModel = new PayExtendModel;
......
......@@ -187,8 +187,8 @@
// 查看物流轨迹
$('.view-shipping').click(function () {
var order_id = $('#order_id').val();
var user_id = $('#user_id').val();
var order_id = $(this).data('oid');
var user_id = $(this).data('uid');
var type = $(this).data('type');
$.ajax({
......
......@@ -12,6 +12,10 @@
<li role="presentation"><a href="#shipping_info" aria-controls="shipping_info" role="tab" data-toggle="tab">物流信息</a></li>
<?php } ?>
<?php if (!empty($self_order_shipping_info) || !empty($self_order_invoice_shipping_info)) { ?>
<li role="presentation"><a href="#self_shipping_info" aria-controls="self_shipping_info" role="tab" data-toggle="tab">自营物流信息</a></li>
<?php } ?>
<?php if ($order_extra && $action_name == 'details') { ?>
<li role="presentation"><a href="#end_client_info" aria-controls="end_client_info" role="tab" data-toggle="tab">终端客户信息</a></li>
<?php } ?>
......@@ -152,7 +156,7 @@
?>
</td>
<td width="5%">
<a class="btn btn-xs btn-success view-shipping" data-type="1">查看物流轨迹</a>
<a class="btn btn-xs btn-success view-shipping" data-type="1" data-oid="<?= $order_info['order_id'] ?>" data-uid="<?= $order_info['user_id'] ?>">查看物流轨迹</a>
</td>
</tr>
<?php } ?>
......@@ -176,7 +180,68 @@
?>
</td>
<td width="5%">
<a class="btn btn-xs btn-success view-shipping" data-type="2">查看物流轨迹</a>
<a class="btn btn-xs btn-success view-shipping" data-type="2" data-oid="<?= $order_info['order_id'] ?>" data-uid="<?= $order_info['user_id'] ?>">查看物流轨迹</a>
</td>
</tr>
<?php } ?>
</table>
</div>
<?php } ?>
<!-- 自营订单或发票物流 -->
<?php if (!empty($self_order_shipping_info) || !empty($self_order_invoice_shipping_info)) { ?>
<div role="tabpanel" class="tab-pane" id="self_shipping_info">
<table class="table table-bordered table-hover">
<tr class="caption">
<th colspan="8" style="text-align: center; background: #f9f9f9;">
自营物流信息
</th>
</tr>
<?php if (!empty($self_order_shipping_info)) { ?>
<tr>
<th width="5%">订单物流</th>
<th width="5%">快递公司:</th>
<td width="10%"><?= $self_order_shipping_info['shipping_name'] ?></td>
<th width="5%">快递单号:</th>
<td width="10%"><?= $self_order_shipping_info['shipping_no'] ?></td>
<th width="5%">配送状态:</th>
<td width="10%">
<?php
switch ($self_order_shipping_info['status']) {
case 0:
case 1: echo '已配送'; break;
case 2: echo '已签收'; break;
default: echo '未配送'; break;
}
?>
</td>
<td width="5%">
<a class="btn btn-xs btn-success view-shipping" data-type="1" data-oid="<?= $self_order_shipping_info['order_id'] ?>" data-uid="<?= $self_user_id ?>">查看物流轨迹</a>
</td>
</tr>
<?php } ?>
<?php if (!empty($self_order_invoice_shipping_info)) { ?>
<tr>
<th width="5%">发票物流</th>
<th width="5%">快递公司:</th>
<td width="10%"><?= $self_order_invoice_shipping_info['shipping_name'] ?></td>
<th width="5%">快递单号:</th>
<td width="10%"><?= $self_order_invoice_shipping_info['shipping_no'] ?></td>
<th width="5%">配送状态:</th>
<td width="10%">
<?php
switch ($self_order_invoice_shipping_info['status']) {
case 0:
case 1: echo '已配送'; break;
case 2: echo '已签收'; break;
default: echo '未配送'; break;
}
?>
</td>
<td width="5%">
<a class="btn btn-xs btn-success view-shipping" data-type="2" data-oid="<?= $self_order_invoice_shipping_info['order_id'] ?>" data-uid="<?= $self_user_id ?>">查看物流轨迹</a>
</td>
</tr>
<?php } ?>
......
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