Commit 065fdfdc by 朱继来

Merge branch 'master' of http://119.23.72.7/zhujilai/Order into zjl_form_duplicate_submit_20191031

parents a8d79868 ad442ca9
......@@ -426,6 +426,8 @@ Class OrderController extends Controller
$perm = new PermController;
$map['sale_id'] = $map['order_send'];
// 订单查看权限
if (strpos($info['role'], ',') !== false) { // 多角色情况下
$res = $perm->checkUserRoles($request, $info['role']);
......
......@@ -257,9 +257,12 @@
*/
public function checkUserRoles($request, $role_id)
{
$data = [];
$roles = explode(',', $role_id);
$data = [];
$data['role_id'] = min($roles); // 默认最小值
$data['sale_id'] = $request->user->userId; // 默认只能查看自己的订单数据
$master = array_intersect($roles, Config('perm_args.check_all_order')); // 交集,是否能查看所有订单
if ($master) {
......
......@@ -95,7 +95,7 @@ class OrderModel extends Model
->where(function ($query) use ($map) {
// 订单推送业务员
if (!empty($map['sale_id'])) {
$query->whereIn('o.sale_id', $map['sale_id']);
$query->whereIn('o.sale_id', explode(',', $map['sale_id']));
}
})
->where(function ($query) use ($map) {
......
......@@ -21,6 +21,8 @@ return [
'线销二组客服' => 17,
'线销三组主管' => 18,
'线销三组客服' => 19,
'运营' => 20,
'产品' => 21,
],
// 线销主管 =》 线销客服
......@@ -37,7 +39,7 @@ return [
'manager_order' => [14, 16, 18],
// 查看所有订单角色
'check_all_order' => [1, 2, 5],
'check_all_order' => [1, 2, 5, 20, 21],
// 审单时权限 (用于调价权限 changeOrder.blade.php)
'is_manager_perm' => [1, 2, 10, 11, 14, 16, 18],
......
......@@ -25,15 +25,6 @@
</dd>
<dd class="order_contain"><input type="text" name="order_contain" value="{{$condition['order_contain']}}" placeholder="请输入内容"></dd>
</dl>
<dl>
<dt>创建日期: </dt>
<dd style="width:auto !important;">
<input type="text" name="time_start" value="{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="开始时间" autocomplete="off" />
</dd>
<dd style="width:auto !important;">
<input type="text" name="time_end" value="{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="结束时间" autocomplete="off" />
</dd>
</dl>
<dl>
<dt>订单编号:</dt>
<dd>
......@@ -47,6 +38,15 @@
</dd>
</dl>
<dl>
<dt>创建日期: </dt>
<dd style="width:auto !important;">
<input type="text" name="time_start" value="{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="开始时间" autocomplete="off" />
</dd>
<dd style="width:auto !important;">
<input type="text" name="time_end" value="{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="结束时间" autocomplete="off" />
</dd>
</dl>
<dl>
<dt>型号名称:</dt>
<dd>
<input type="text" name="goods_name" value="{{$condition['goods_name']}}" placeholder="请输入型号名称">
......
......@@ -27,15 +27,6 @@
<dd class="order_contain"><input type="text" name="order_contain" value="{{$condition['order_contain']}}" placeholder="请输入内容"></dd>
</dl>
<dl>
<dt>创建日期: </dt>
<dd style="width:auto !important;">
<input type="text" name="time_start" value="{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="开始时间" autocomplete="off" />
</dd>
<dd style="width:auto !important;">
<input type="text" name="time_end" value="{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="结束时间" autocomplete="off" />
</dd>
</dl>
<dl>
<dt>订单编号:</dt>
<dd>
<input type="text" name="order_sn" value="{{$condition['order_sn']}}" placeholder="请输入订单编号">
......@@ -48,6 +39,15 @@
</dd>
</dl>
<dl>
<dt>创建日期: </dt>
<dd style="width:auto !important;">
<input type="text" name="time_start" value="{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="开始时间" autocomplete="off" />
</dd>
<dd style="width:auto !important;">
<input type="text" name="time_end" value="{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="结束时间" autocomplete="off" />
</dd>
</dl>
<dl>
<dt>型号名称:</dt>
<dd>
<input type="text" name="goods_name" value="{{$condition['goods_name']}}" placeholder="请输入型号名称">
......
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