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
ea2a2ef7
authored
Nov 08, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整客服搜索权限
parent
b151ce60
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/OrderController.php
View file @
ea2a2ef7
...
...
@@ -429,17 +429,28 @@ Class OrderController extends Controller
if
(
strpos
(
$info
[
'role'
],
','
)
!==
false
)
{
// 多角色情况下
$res
=
$perm
->
checkUserRoles
(
$request
,
$info
[
'role'
]);
if
(
$res
)
{
$info
[
'role'
]
=
$res
[
'role_id'
];
$res
[
'sale_id'
]
&&
$map
[
'sale_id'
]
=
$res
[
'sale_id'
];
}
$map
[
'order_send'
]
&&
$map
[
'sale_id'
]
=
$map
[
'order_send'
];
// 若存在查询指定客服
// 若无指定客服,则返回客服组里的所有订单
if
(
!
$map
[
'order_send'
])
{
$map
[
'sale_id'
]
=
$res
[
'sale_id'
];
}
else
if
(
!
in_array
(
$map
[
'order_send'
],
$res
[
'sale_id'
]))
{
// 若指定客服不存在与客服组,则不能筛选
$map
[
'sale_id'
]
=
-
1
;
}
else
{
if
(
in_array
(
$info
[
'role'
],
Config
(
'perm_args.kefu_order'
)))
{
// 交易员、联营客服(线销一组、二组、三组客服)、自营客服、自营内部采购
$map
[
'sale_id'
]
=
$map
[
'order_send'
];
}
}
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'
)))
{
// 线销一组、二组、三组主管(查看自己及其下组员的订单)
$map
[
'sale_id'
]
=
$perm
->
getGroupSalesId
(
$request
,
$info
[
'role'
]);
$sale_ids
=
$perm
->
getGroupSalesId
(
$request
,
$info
[
'role'
]);
// 若无指定客服,则返回客服组里的所有订单
if
(
!
$map
[
'order_send'
])
{
$map
[
'sale_id'
]
=
$sale_ids
;
}
else
if
(
!
in_array
(
$map
[
'order_send'
],
$sale_ids
))
{
// 若指定客服不存在与客服组,则不能筛选
$map
[
'sale_id'
]
=
-
1
;
}
else
{
$map
[
'sale_id'
]
=
$map
[
'order_send'
];
}
}
...
...
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