Commit 4f057d4f by 朱继来

Merge branch 'zjl_shipping_20201201'

parents 33ced2ce b3d9cf3b
......@@ -1644,7 +1644,7 @@ Class OrderController extends Controller
$erpPayLog = DB::connection('order')->table('lie_erp_pay_log')->where('order_id', $id)->orderBy('create_time', 'DESC')->orderBy('log_id', 'DESC')->get();
$response = [
// 'user_mobile' => $mobile,
// 'user_mobile' => $mobile,
'order_info' => $temp['data']['order_info'],
'user_info' => $temp['data']['order_info']['user_info'],
'company_info' => $temp['data']['order_info']['company_info'],
......@@ -1662,9 +1662,14 @@ Class OrderController extends Controller
'erpPayLog' => $erpPayLog,
'order_refund_info' => $temp['data']['order_refund_info'],
'order_refund_items' => $temp['data']['order_refund_items'],
'order_extra' => $temp['data']['order_extra'],
'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;
......@@ -1813,8 +1818,8 @@ Class OrderController extends Controller
public function shipping(Request $request)
{
if ($request->isMethod('post')) {
$data['id'] = $request->input('order_id');
$data['uid'] = $request->input('user_id');
$data['id'] = $request->input('order_id');
$data['uid'] = $request->input('user_id');
$data['type'] = $request->input('type');
$url = Config('website.api_domain').'order/shipping';
......
......@@ -187,9 +187,9 @@
// 查看物流轨迹
$('.view-shipping').click(function () {
var order_id = $('#order_id').val();
var user_id = $('#user_id').val();
var type = $(this).data('type');
var order_id = $(this).data('oid');
var user_id = $(this).data('uid');
var type = $(this).data('type');
$.ajax({
url : '/ajax/shipping',
......
......@@ -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