Commit 2f0388c4 by 朱继来

Merge branch 'zjl_order_source_20180904' into development

parents b7693271 864c4622
...@@ -216,8 +216,9 @@ function getGoodsName($goods_id) ...@@ -216,8 +216,9 @@ function getGoodsName($goods_id)
} }
// 获取订单来源 // 获取订单来源
function getOrderSource($order_id) function getOrderSource($order_id, $order_type=1)
{ {
if ($order_type == 1) {
$order = DB::connection('order')->table('lie_order_extend')->where('order_id', $order_id)->select('order_type')->first(); $order = DB::connection('order')->table('lie_order_extend')->where('order_id', $order_id)->select('order_type')->first();
if ($order) { if ($order) {
...@@ -241,6 +242,9 @@ function getOrderSource($order_id) ...@@ -241,6 +242,9 @@ function getOrderSource($order_id)
return $source; return $source;
} }
} else if ($order_type == 3) {
return '京东';
}
return false; return false;
} }
...@@ -379,9 +383,6 @@ Class OrderController extends Controller ...@@ -379,9 +383,6 @@ Class OrderController extends Controller
$map['order_invoice_status']= $request->input('order_invoice_status', ''); $map['order_invoice_status']= $request->input('order_invoice_status', '');
} }
/* 临时添加 所有人只能查看线上订单 */
$map['online_order'] = 1;
// 订单查看权限---交易员、客服、测试 // 订单查看权限---交易员、客服、测试
if (in_array($info['role'], [3, 4, 5])) { if (in_array($info['role'], [3, 4, 5])) {
// 筛选自己的订单 // 筛选自己的订单
...@@ -397,6 +398,12 @@ Class OrderController extends Controller ...@@ -397,6 +398,12 @@ Class OrderController extends Controller
$map['order_goods_type'] = $tid; $map['order_goods_type'] = $tid;
if ($tid == 1) {
$map['order_type_filter'] = [1];
} else {
$map['order_type_filter'] = [1, 3]; // 1. 网站 2. 京东
}
// 获取所有的业务员 (包括经理、交易员、客服、测试) // 获取所有的业务员 (包括经理、交易员、客服、测试)
$perm = new PermController; $perm = new PermController;
...@@ -458,8 +465,10 @@ Class OrderController extends Controller ...@@ -458,8 +465,10 @@ Class OrderController extends Controller
$map['order_source'] = $request->input('order_source', ''); $map['order_source'] = $request->input('order_source', '');
} }
$map['order_goods_type'] = 1; // 联营订单
/* 查看ERP/JD订单 */ /* 查看ERP/JD订单 */
$map['offline_order'] = [2, 3]; // 2-ERP, 3-JD $map['order_type_filter'] = [2, 3]; // 2-ERP, 3-JD
// 非竞调账号,则查看真实数据 // 非竞调账号,则查看真实数据
if ($info['username'] != 'vpadmin@ichunt.com') { if ($info['username'] != 'vpadmin@ichunt.com') {
...@@ -931,7 +940,7 @@ Class OrderController extends Controller ...@@ -931,7 +940,7 @@ Class OrderController extends Controller
{ {
$data = $this->orderDetail($request, $id); $data = $this->orderDetail($request, $id);
if ($data['order_info']['order_goods_type'] == 2 && $data['order_info']['order_type'] == 1) { // 平台自营订单 if ($data['order_info']['order_goods_type'] == 2 && in_array($data['order_info']['order_type'], [1, 3])) { // 平台自营订单
if ($request->input('tags') != 'self') { if ($request->input('tags') != 'self') {
return redirect('self_order'); // URL重定向 return redirect('self_order'); // URL重定向
} else { } else {
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
<li data-val="1">PC端</li> <li data-val="1">PC端</li>
<li data-val="2">移动端</li> <li data-val="2">移动端</li>
<li data-val="3">后台</li> <li data-val="3">后台</li>
<li data-val="4">京东</li>
</ul> </ul>
</div> </div>
</dd> </dd>
...@@ -192,7 +193,7 @@ ...@@ -192,7 +193,7 @@
<td class="show-list"><?php print_r(App\Http\Controllers\getPayName($v['order_id'])); ?></td> <td class="show-list"><?php print_r(App\Http\Controllers\getPayName($v['order_id'])); ?></td>
<td class="show-list"><?php echo App\Http\Controllers\getOrderSource($v['order_id']); ?></td> <td class="show-list"><?php echo App\Http\Controllers\getOrderSource($v['order_id'], $v['order_type']); ?></td>
<td class="show-list" class="show-list"> <td class="show-list" class="show-list">
<?php <?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