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
065fdfdc
authored
Nov 13, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/zhujilai/Order
into zjl_form_duplicate_submit_20191031
parents
a8d79868
ad442ca9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
21 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/PermController.php
app/Model/OrderModel.php
config/perm_args.php
resources/views/orderlist/content.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/OrderController.php
View file @
065fdfdc
...
...
@@ -426,6 +426,8 @@ Class OrderController extends Controller
$perm
=
new
PermController
;
$map
[
'sale_id'
]
=
$map
[
'order_send'
];
// 订单查看权限
if
(
strpos
(
$info
[
'role'
],
','
)
!==
false
)
{
// 多角色情况下
$res
=
$perm
->
checkUserRoles
(
$request
,
$info
[
'role'
]);
...
...
app/Http/Controllers/PermController.php
View file @
065fdfdc
...
...
@@ -257,9 +257,12 @@
*/
public
function
checkUserRoles
(
$request
,
$role_id
)
{
$data
=
[];
$roles
=
explode
(
','
,
$role_id
);
$data
=
[];
$data
[
'role_id'
]
=
min
(
$roles
);
// 默认最小值
$data
[
'sale_id'
]
=
$request
->
user
->
userId
;
// 默认只能查看自己的订单数据
$master
=
array_intersect
(
$roles
,
Config
(
'perm_args.check_all_order'
));
// 交集,是否能查看所有订单
if
(
$master
)
{
...
...
app/Model/OrderModel.php
View file @
065fdfdc
...
...
@@ -95,7 +95,7 @@ class OrderModel extends Model
->
where
(
function
(
$query
)
use
(
$map
)
{
// 订单推送业务员
if
(
!
empty
(
$map
[
'sale_id'
]))
{
$query
->
whereIn
(
'o.sale_id'
,
$map
[
'sale_id'
]
);
$query
->
whereIn
(
'o.sale_id'
,
explode
(
','
,
$map
[
'sale_id'
])
);
}
})
->
where
(
function
(
$query
)
use
(
$map
)
{
...
...
config/perm_args.php
View file @
065fdfdc
...
...
@@ -21,6 +21,8 @@ return [
'线销二组客服'
=>
17
,
'线销三组主管'
=>
18
,
'线销三组客服'
=>
19
,
'运营'
=>
20
,
'产品'
=>
21
,
],
// 线销主管 =》 线销客服
...
...
@@ -37,7 +39,7 @@ return [
'manager_order'
=>
[
14
,
16
,
18
],
// 查看所有订单角色
'check_all_order'
=>
[
1
,
2
,
5
],
'check_all_order'
=>
[
1
,
2
,
5
,
20
,
21
],
// 审单时权限 (用于调价权限 changeOrder.blade.php)
'is_manager_perm'
=>
[
1
,
2
,
10
,
11
,
14
,
16
,
18
],
...
...
resources/views/orderlist/content.blade.php
View file @
065fdfdc
...
...
@@ -25,15 +25,6 @@
</dd>
<dd
class=
"order_contain"
><input
type=
"text"
name=
"order_contain"
value=
"{{$condition['order_contain']}}"
placeholder=
"请输入内容"
></dd>
</dl>
<dl>
<dt>
创建日期:
</dt>
<dd
style=
"width:auto !important;"
>
<input
type=
"text"
name=
"time_start"
value=
"{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"开始时间"
autocomplete=
"off"
/>
</dd>
<dd
style=
"width:auto !important;"
>
<input
type=
"text"
name=
"time_end"
value=
"{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"结束时间"
autocomplete=
"off"
/>
</dd>
</dl>
<dl>
<dt>
订单编号:
</dt>
<dd>
...
...
@@ -47,6 +38,15 @@
</dd>
</dl>
<dl>
<dt>
创建日期:
</dt>
<dd
style=
"width:auto !important;"
>
<input
type=
"text"
name=
"time_start"
value=
"{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"开始时间"
autocomplete=
"off"
/>
</dd>
<dd
style=
"width:auto !important;"
>
<input
type=
"text"
name=
"time_end"
value=
"{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"结束时间"
autocomplete=
"off"
/>
</dd>
</dl>
<dl>
<dt>
型号名称:
</dt>
<dd>
<input
type=
"text"
name=
"goods_name"
value=
"{{$condition['goods_name']}}"
placeholder=
"请输入型号名称"
>
...
...
resources/views/selfOrder/content.blade.php
View file @
065fdfdc
...
...
@@ -27,15 +27,6 @@
<dd
class=
"order_contain"
><input
type=
"text"
name=
"order_contain"
value=
"{{$condition['order_contain']}}"
placeholder=
"请输入内容"
></dd>
</dl>
<dl>
<dt>
创建日期:
</dt>
<dd
style=
"width:auto !important;"
>
<input
type=
"text"
name=
"time_start"
value=
"{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"开始时间"
autocomplete=
"off"
/>
</dd>
<dd
style=
"width:auto !important;"
>
<input
type=
"text"
name=
"time_end"
value=
"{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"结束时间"
autocomplete=
"off"
/>
</dd>
</dl>
<dl>
<dt>
订单编号:
</dt>
<dd>
<input
type=
"text"
name=
"order_sn"
value=
"{{$condition['order_sn']}}"
placeholder=
"请输入订单编号"
>
...
...
@@ -48,6 +39,15 @@
</dd>
</dl>
<dl>
<dt>
创建日期:
</dt>
<dd
style=
"width:auto !important;"
>
<input
type=
"text"
name=
"time_start"
value=
"{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"开始时间"
autocomplete=
"off"
/>
</dd>
<dd
style=
"width:auto !important;"
>
<input
type=
"text"
name=
"time_end"
value=
"{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"结束时间"
autocomplete=
"off"
/>
</dd>
</dl>
<dl>
<dt>
型号名称:
</dt>
<dd>
<input
type=
"text"
name=
"goods_name"
value=
"{{$condition['goods_name']}}"
placeholder=
"请输入型号名称"
>
...
...
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