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
d0929449
authored
May 20, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整退货页面
parent
667e8e68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
28 deletions
app/Http/Controllers/ReturnController.php
app/Http/Controllers/ReturnController.php
View file @
d0929449
...
...
@@ -125,8 +125,8 @@ class ReturnController extends Controller
$map
[
'order_goods_type'
]
=
$type
;
// 类型
$map
[
'sale_id'
]
=
$request
->
input
(
'sale_id'
,
''
);
// 非管理员、
经理、自营主管、自营主管助理
,只能看到自己的退货单
if
(
!
in_array
(
$info
[
'role'
],
[
1
,
2
,
10
,
11
]))
{
// 非管理员、
查看下级
,只能看到自己的退货单
if
(
!
in_array
(
$info
[
'role'
],
[
1
,
2
]))
{
$map
[
'create_uid'
]
=
$request
->
user
->
userId
;
}
...
...
@@ -170,32 +170,8 @@ class ReturnController extends Controller
// $self_kefu = $perm->getRoleUsers($request, '自营客服');
// $info['sale_list'] = array_merge($joint_kefu, $self_kefu);
$key
=
'search_self_sales'
;
$redis
=
Redis
::
connection
(
'read'
);
$sale_list
=
$redis
->
get
(
$key
);
if
(
!
$sale_list
)
{
// 获取所有的业务员 (包括经理、交易员、客服、测试)
$perm
=
new
PermController
;
$sale_list
=
[];
$search_sales
=
Config
(
'perm_args.search_self_sales'
);
if
(
$search_sales
)
{
foreach
(
$search_sales
as
$v
)
{
$role_name
=
array_keys
(
Config
(
'perm_args.roles'
),
$v
);
$temp
=
$perm
->
getRoleUsers
(
$request
,
$role_name
[
0
]);
$sale_list
=
array_merge
(
$sale_list
,
$temp
);
}
}
$sale_list
=
$this
->
assoc_unique
(
$sale_list
);
$expire
=
Config
(
'perm_args.redis_search_sales_expire'
);
// 缓存两小时
Redis
::
setex
(
$key
,
$expire
,
json_encode
(
$sale_list
));
}
else
{
$sale_list
=
json_decode
(
$sale_list
);
}
$perm
=
new
PermController
;
$sale_list
=
$perm
->
getUserByCondition
(
''
,
Config
(
'perm_args.sales_position_id'
));
// 获取所有的销售
$info
[
'sale_list'
]
=
$sale_list
;
...
...
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