Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
72870baf
authored
Dec 16, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加交易主管权限
parent
c38278c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
11 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/PermController.php
config/perm_args.php
resources/views/detail/sendSales.blade.php
app/Http/Controllers/OrderController.php
View file @
72870baf
...
...
@@ -445,7 +445,7 @@ Class OrderController extends Controller
}
}
else
if
(
in_array
(
$info
[
'role'
],
Config
(
'perm_args.kefu_order'
)))
{
// 交易员、联营客服(线销一组、二组、三组客服)、自营客服、自营内部采购
$map
[
'sale_id'
]
=
$request
->
user
->
userId
;
// 筛选自己的订单
}
else
if
(
in_array
(
$info
[
'role'
],
Config
(
'perm_args.manager_order'
)))
{
// 线销一组、二组、三组主管(查看自己及其下组员的订单)
}
else
if
(
in_array
(
$info
[
'role'
],
Config
(
'perm_args.manager_order'
)))
{
// 线销一组、二组、三组主管
、交易主管
(查看自己及其下组员的订单)
$sale_ids
=
$perm
->
getGroupSalesId
(
$request
,
$info
[
'role'
]);
// 若无指定客服,则返回客服组里的所有订单
...
...
@@ -974,6 +974,7 @@ Class OrderController extends Controller
$joint_kefu_3
=
$perm
->
getRoleUsers
(
$request
,
'线销三组客服'
);
$sale_list
=
$perm
->
getRoleUsers
(
$request
,
'交易员'
);
$test
=
$perm
->
getRoleUsers
(
$request
,
'测试'
);
$sale_manager
=
$perm
->
getRoleUsers
(
$request
,
'交易主管'
);
$self_manager
=
$self_kefu
=
''
;
...
...
@@ -985,7 +986,7 @@ Class OrderController extends Controller
}
$info
[
'joint_manager'
]
=
$this
->
filterLeave
(
$joint_manager
);
$info
[
'kefu_manager'
]
=
Config
(
'perm_args.kefu_manager'
);
$info
[
'kefu_manager'
]
=
Config
(
'perm_args.kefu_manager'
);
$joint_in_charge_1
=
$this
->
filterLeave
(
$joint_in_charge_1
);
$joint_in_charge_2
=
$this
->
filterLeave
(
$joint_in_charge_2
);
...
...
@@ -1006,6 +1007,7 @@ Class OrderController extends Controller
$info
[
'test'
]
=
$this
->
filterLeave
(
$test
);
$info
[
'self_manager'
]
=
$this
->
filterLeave
(
$self_manager
);
$info
[
'self_kefu'
]
=
$this
->
filterLeave
(
$self_kefu
);
$info
[
'sale_manager'
]
=
$this
->
filterLeave
(
$sale_manager
);
$info
[
'sale_id'
]
=
$request
->
user
->
userId
;
$info
[
'role'
]
=
$perm
->
getUserRole
(
$request
);
...
...
app/Http/Controllers/PermController.php
View file @
72870baf
...
...
@@ -143,7 +143,8 @@
$roleId
=
$role
->
roleId
;
$user
=
DB
::
select
(
"SELECT * FROM `t_user_perm` WHERE `bid` =
$bid
AND `roles` REGEXP
$roleId
"
);
// $user = DB::select("SELECT * FROM `t_user_perm` WHERE `bid` = $bid AND `roles` REGEXP $roleId");
$user
=
DB
::
select
(
"SELECT * FROM `t_user_perm` WHERE `bid` =
$bid
AND `roles` LIKE '%
\"
"
.
$roleId
.
"
\"
%'"
);
if
(
$user
)
{
foreach
(
$user
as
$v
)
{
...
...
config/perm_args.php
View file @
72870baf
...
...
@@ -23,6 +23,7 @@ return [
'线销三组客服'
=>
19
,
'运营'
=>
20
,
'产品'
=>
21
,
'交易主管'
=>
22
,
],
// 线销主管 =》 线销客服
...
...
@@ -30,25 +31,26 @@ return [
14
=>
15
,
16
=>
17
,
18
=>
19
,
22
=>
3
,
],
// 筛选自己的订单
'kefu_order'
=>
[
3
,
4
,
7
,
12
,
15
,
17
,
19
],
// 主管角色,查看自己及其组员订单
'manager_order'
=>
[
14
,
16
,
18
],
'manager_order'
=>
[
14
,
16
,
18
,
22
],
// 查看所有订单角色
'check_all_order'
=>
[
1
,
2
,
5
,
20
,
21
],
// 审单时权限 (用于调价权限 changeOrder.blade.php)
'is_manager_perm'
=>
[
1
,
2
,
10
,
11
,
14
,
16
,
18
],
'is_manager_perm'
=>
[
1
,
2
,
10
,
11
,
14
,
16
,
18
,
22
],
// 筛选业务员 -- 联营列表
'search_joint_sales'
=>
[
3
,
4
,
5
,
14
,
15
,
16
,
17
,
18
,
19
],
'search_joint_sales'
=>
[
3
,
4
,
5
,
14
,
15
,
16
,
17
,
18
,
19
,
22
],
// 筛选业务员 -- 自营列表 (包含联营、自营客服)
'search_self_sales'
=>
[
3
,
4
,
5
,
7
,
10
,
11
,
12
,
14
,
15
,
16
,
17
,
18
,
19
],
// 筛选业务员 -- 自营列表 (包含联营、自营客服
、交易员、主管
)
'search_self_sales'
=>
[
3
,
4
,
5
,
7
,
10
,
11
,
12
,
14
,
15
,
16
,
17
,
18
,
19
,
22
],
// 缓存筛选业务员
'redis_search_sales'
=>
[
...
...
@@ -58,10 +60,10 @@ return [
'redis_search_sales_expire'
=>
7200
,
// 缓存两小时
// 客服经理 (固定,用于推送业务员页面)
--- 两个奇葩
// 客服经理 (固定,用于推送业务员页面)
'kefu_manager'
=>
[
(
object
)[
'userId'
=>
1445
,
'name'
=>
'张娟'
,
'status'
=>
0
],
(
object
)[
'userId'
=>
1582
,
'name'
=>
'滕欢欢'
,
'status'
=>
0
],
//
(object)['userId'=>1582, 'name'=>'滕欢欢', 'status'=>0],
],
// 自营角色 无法查看联营订单
...
...
resources/views/detail/sendSales.blade.php
View file @
72870baf
...
...
@@ -11,7 +11,7 @@
<table
class=
"table table-bordered table-hover check-table"
style=
"min-height:150px;"
>
@if (!empty($joint_manager))
<tr>
<td
class=
"check-table-title"
></td>
<td
class=
"check-table-title"
width=
"15%"
></td>
<td>
<ul>
@foreach ($joint_manager as $vo)
...
...
@@ -111,6 +111,23 @@
</tr>
@endif
@if (!empty($sale_manager))
<tr>
<td
class=
"check-table-title"
>
交易主管:
</td>
<td>
<ul>
@foreach ($sale_manager as $vo)
@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
@endforeach
</ul>
</td>
</tr>
@endif
@if (!empty($sale_list))
<tr>
<td
class=
"check-table-title"
>
交易员:
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment