Commit af71e07f by 朱继来

推送人重新分组

parent b3922ea1
...@@ -299,18 +299,19 @@ Class OrderController extends Controller ...@@ -299,18 +299,19 @@ Class OrderController extends Controller
$map['order_goods_type'] = $tid; $map['order_goods_type'] = $tid;
// 获取所有的业务员 (包括经理、交易员、客服) // 获取所有的业务员 (包括经理、交易员、客服、测试
$perm = new PermController; $perm = new PermController;
$manager = $perm->getRoleUsers($request, '经理');
if ($tid == 1) { if ($tid == 1) {
$manager = $perm->getRoleUsers($request, '经理');
$test = $perm->getRoleUsers($request, '测试');
$sale_list = $perm->getRoleUsers($request, '交易员'); $sale_list = $perm->getRoleUsers($request, '交易员');
$sale_list = array_merge($manager, $sale_list, $test);
} else { } else {
$sale_list = $perm->getRoleUsers($request, '客服'); $sale_list = $perm->getRoleUsers($request, '客服');
} }
$sale_list = array_merge($manager, $sale_list);
//获取订单列表 //获取订单列表
$url = Config('website.api_domain').'order/getAllOrder'; $url = Config('website.api_domain').'order/getAllOrder';
...@@ -368,8 +369,9 @@ Class OrderController extends Controller ...@@ -368,8 +369,9 @@ Class OrderController extends Controller
$perm = new PermController; $perm = new PermController;
$manager = $perm->getRoleUsers($request, '经理'); $manager = $perm->getRoleUsers($request, '经理');
$sale_list = $perm->getRoleUsers($request, '交易员'); $sale_list = $perm->getRoleUsers($request, '交易员');
$test = $perm->getRoleUsers($request, '测试');
$sale_list = array_merge($manager, $sale_list); $sale_list = array_merge($manager, $sale_list, $test);
//获取订单列表 //获取订单列表
$url = Config('website.api_domain').'order/getAllOrder'; $url = Config('website.api_domain').'order/getAllOrder';
...@@ -797,17 +799,6 @@ Class OrderController extends Controller ...@@ -797,17 +799,6 @@ Class OrderController extends Controller
return redirect('/prompt')->with(['message'=>"该订单不符合人工审单条件~【status:{$info['order_info']['status']}】",'url' =>$_SERVER['HTTP_REFERER'], 'jumpTime'=>3,'status'=>false]); return redirect('/prompt')->with(['message'=>"该订单不符合人工审单条件~【status:{$info['order_info']['status']}】",'url' =>$_SERVER['HTTP_REFERER'], 'jumpTime'=>3,'status'=>false]);
} }
// 获取所有的业务员
$sale_list = $this->getSales('销售');
$perm = new PermController;
$manager = $perm->getRoleUsers($request, '经理');
$sale_list = $perm->getRoleUsers($request, '交易员');
$info['sale_list'] = $sale_list;
$info['manager'] = $manager;
return view('detail', $info); return view('detail', $info);
} }
...@@ -964,10 +955,14 @@ Class OrderController extends Controller ...@@ -964,10 +955,14 @@ Class OrderController extends Controller
$perm = new PermController; $perm = new PermController;
$manager = $perm->getRoleUsers($request, '经理'); $manager = $perm->getRoleUsers($request, '经理');
$test = $perm->getRoleUsers($request, '测试');
$sale_list = $perm->getRoleUsers($request, '交易员'); $sale_list = $perm->getRoleUsers($request, '交易员');
$kefu = $perm->getRoleUsers($request, '客服');
$info['sale_list'] = $sale_list;
$info['manager'] = $manager; $info['manager'] = $manager;
$info['test'] = $test;
$info['sale_list'] = $sale_list;
$info['kefu'] = $kefu;
return view('detail', $info); return view('detail', $info);
} }
......
...@@ -51,7 +51,9 @@ ...@@ -51,7 +51,9 @@
return 3; return 3;
} else if ($department->name == '客服') { } else if ($department->name == '客服') {
return 4; return 4;
}else { } else if ($department->name == '测试') {
return 5;
} else {
return 0; return 0;
} }
} }
......
...@@ -714,7 +714,9 @@ ...@@ -714,7 +714,9 @@
location.reload(); location.reload();
}, 1000); }, 1000);
} else { } else {
layer.alert(resp.errmsg || '网络异常'); layer.alert(resp.errmsg || '网络异常', function(){
location.reload();
});
} }
}, },
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<table class="table table-bordered table-hover check-table" style="min-height:150px;"> <table class="table table-bordered table-hover check-table" style="min-height:150px;">
<tr> <tr>
<td class="check-table-title" width="20%">业务员</td> <td class="check-table-title" width="20%">经理</td>
<td> <td>
@if (!empty($manager)) @if (!empty($manager))
@foreach ($manager as $k => $v) @foreach ($manager as $k => $v)
...@@ -26,10 +26,13 @@ ...@@ -26,10 +26,13 @@
</ul> </ul>
@endif @endif
@endforeach @endforeach
<hr/>
@endif @endif
</td>
</tr>
<tr>
<td class="check-table-title" width="20%">交易员:</td>
<td>
@foreach ($sale_list as $key => $vo) @foreach ($sale_list as $key => $vo)
@if(($key + 1) % 8 == 1) @if(($key + 1) % 8 == 1)
<ul> <ul>
...@@ -45,6 +48,44 @@ ...@@ -45,6 +48,44 @@
@endforeach @endforeach
</td> </td>
</tr> </tr>
<tr>
<td class="check-table-title" width="20%">客服:</td>
<td>
@foreach ($kefu as $key => $vo)
@if(($key + 1) % 8 == 1)
<ul>
@endif
@if ($vo->userId == $order_info['sale_id'])
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
@else
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif
@if(($key + 1) % 8 == 0 || $key + 1 == count($kefu))
</ul>
@endif
@endforeach
</td>
</tr>
<tr>
<td class="check-table-title" width="20%">测试:</td>
<td>
@foreach ($test as $key => $vo)
@if(($key + 1) % 8 == 1)
<ul>
@endif
@if ($vo->userId == $order_info['sale_id'])
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
@else
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif
@if(($key + 1) % 8 == 0 || $key + 1 == count($test))
</ul>
@endif
@endforeach
</td>
</tr>
</table> </table>
<a class="btn btn-primary send_sales">提交</a> <a class="btn btn-primary send_sales">提交</a>
......
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
<div class="btn-group btn-group-xs"> <div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}" target="_blank">详情</a> <a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}" target="_blank">详情</a>
@if (in_array('check_order', $userPerms)) @if (in_array('check_order', $userPerms) && in_array($v['status'], [1, 2, 3]))
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$v['order_id']])}}" target="_blank">人工审单</a> <a class="btn btn-success" href="{{URL('change', ['order_id'=>$v['order_id']])}}" target="_blank">人工审单</a>
@endif @endif
......
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