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
bca64697
authored
Jul 06, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加过滤条件
parent
197b8d9c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/PermController.php
app/Http/Controllers/OrderController.php
View file @
bca64697
...
...
@@ -1041,8 +1041,15 @@ Class OrderController extends Controller
$info
[
'online_sales_kefu_4'
]
=
$perm
->
getUserByCondition
(
37
,
62
,
0
);
// 线上四组销售
$info
[
'offline_sales_chief'
]
=
$perm
->
getUserByCondition
(
40
,
90
,
0
);
// 线下销售-39 线下销售总监-90
$offline_sales_chief
=
[];
foreach
(
$info
[
'offline_sales_chief'
]
as
$v
)
{
$offline_sales_chief
[]
=
$v
->
userId
;
}
// $info['offline_sales_all'] = $perm->getDepartmentUser(40, 62); // 线下销售各组人员
$info
[
'offline_sales_all'
]
=
$perm
->
getUserByDepartmentId
(
40
);
// 线下销售各组人员
$info
[
'offline_sales_all'
]
=
$perm
->
getUserByDepartmentId
(
40
,
0
,
'userId not in ('
.
implode
(
','
,
$offline_sales_chief
)
.
')'
);
// 线下销售各组人员
$info
[
'self_kefu'
]
=
$perm
->
getUserByDepartmentId
(
38
,
0
);
// 自营销售部
...
...
app/Http/Controllers/PermController.php
View file @
bca64697
...
...
@@ -399,7 +399,7 @@
/* 订单系统权限调整 --- 20200511 */
// 获取部门人员
public
function
getUserByDepartmentId
(
$department_id
,
$status
=
''
)
public
function
getUserByDepartmentId
(
$department_id
,
$status
=
''
,
$filter
=
''
)
{
$department_ids
=
[];
...
...
@@ -411,6 +411,11 @@
$query
->
where
(
'status'
,
'='
,
$status
);
}
})
->
where
(
function
(
$query
)
use
(
$filter
)
{
if
(
$filter
)
{
$query
->
whereRaw
(
$filter
);
}
})
->
select
(
'userId'
,
'name'
,
'status'
)
->
get
();
...
...
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