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
da09074d
authored
Mar 02, 2022
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_order_limit_20220218' into development
parents
8b3c23cc
22a1aed7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/OrderController.php
View file @
da09074d
...
@@ -919,27 +919,29 @@ Class OrderController extends Controller
...
@@ -919,27 +919,29 @@ Class OrderController extends Controller
if
(
$count
>
$order_user_limit
)
return
[
'errcode'
=>
11001
,
'errmsg'
=>
'你已达到成交用户上限,请先释放你跟进的已下单用户或联系主管重新分配当前用户'
];
if
(
$count
>
$order_user_limit
)
return
[
'errcode'
=>
11001
,
'errmsg'
=>
'你已达到成交用户上限,请先释放你跟进的已下单用户或联系主管重新分配当前用户'
];
}
}
$perm
=
new
PermController
;
if
(
$request
->
user
->
email
!=
'admin@ichunt.com'
)
{
$OrderModel
=
new
OrderModel
;
$perm
=
new
PermController
;
$relation_id
=
[];
$OrderModel
=
new
OrderModel
;
$relation_id
=
[];
$order_sale_id
=
$OrderModel
->
where
(
'order_id'
,
$order_id
)
->
value
(
'sale_id'
);
// 获取当前订单销售
array_push
(
$relation_id
,
$order_sale_id
);
$order_sale_id
=
$OrderModel
->
where
(
'order_id'
,
$order_id
)
->
value
(
'sale_id'
);
// 获取当前订单销售
array_push
(
$relation_id
,
$order_sale_id
);
$manager
=
$perm
->
getSuperiorManager
(
$order_sale_id
,
'销售经理'
);
// 获取销售主管
if
(
$manager
)
{
$manager
=
$perm
->
getSuperiorManager
(
$order_sale_id
,
'销售经理'
);
// 获取销售主管
$manager_id
=
array_column
(
$manager
,
'userId'
);
if
(
$manager
)
{
$relation_id
=
array_merge
(
$relation_id
,
$manager_id
);
$manager_id
=
array_column
(
$manager
,
'userId'
);
}
$relation_id
=
array_merge
(
$relation_id
,
$manager_id
);
}
$director
=
$perm
->
getSuperiorDirector
(
$order_sale_id
,
'销售总监'
);
// 获取销售总监
if
(
$director
)
{
$director
=
$perm
->
getSuperiorDirector
(
$order_sale_id
,
'销售总监'
);
// 获取销售总监
$director_id
=
array_column
(
$director
,
'userId'
);
if
(
$director
)
{
$relation_id
=
array_merge
(
$relation_id
,
$director_id
);
$director_id
=
array_column
(
$director
,
'userId'
);
}
$relation_id
=
array_merge
(
$relation_id
,
$director_id
);
}
// 校验此是否为此订单销售或者对应主管,总监
// 校验此是否为此订单销售或者对应主管,总监
if
(
!
in_array
(
$request
->
user
->
userId
,
$relation_id
))
return
[
'errcode'
=>-
1
,
'errmsg'
=>
'你没有权限操作此销售订单!'
];
if
(
!
in_array
(
$request
->
user
->
userId
,
$relation_id
))
return
[
'errcode'
=>-
1
,
'errmsg'
=>
'你没有权限操作此销售订单!'
];
}
if
(
!
$request
->
input
(
'pay_time_limit'
))
{
if
(
!
$request
->
input
(
'pay_time_limit'
))
{
$payTime
=
$request
->
input
(
'payTime'
,
''
);
$payTime
=
$request
->
input
(
'payTime'
,
''
);
...
...
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