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
089fdaf6
authored
Dec 03, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_iteration_20181127' into development
parents
4d5f9429
87a3ecab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
58 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/OrderController.php
View file @
089fdaf6
...
@@ -372,6 +372,7 @@ Class OrderController extends Controller
...
@@ -372,6 +372,7 @@ Class OrderController extends Controller
$map
[
'test_order'
]
=
$request
->
input
(
'test_order'
,
''
);
$map
[
'test_order'
]
=
$request
->
input
(
'test_order'
,
''
);
$map
[
'order_pay_type'
]
=
$request
->
input
(
'order_pay_type'
,
''
);
$map
[
'order_pay_type'
]
=
$request
->
input
(
'order_pay_type'
,
''
);
$map
[
'order_type_a'
]
=
$request
->
input
(
'order_type_a'
,
''
);
$map
[
'order_type_a'
]
=
$request
->
input
(
'order_type_a'
,
''
);
$map
[
'order_source'
]
=
$request
->
input
(
'order_source'
,
''
);
$map
[
'order_source_pf'
]
=
$request
->
input
(
'order_source_pf'
,
''
);
$map
[
'order_source_pf'
]
=
$request
->
input
(
'order_source_pf'
,
''
);
$map
[
'order_source_adtag'
]
=
$request
->
input
(
'order_source_adtag'
,
''
);
$map
[
'order_source_adtag'
]
=
$request
->
input
(
'order_source_adtag'
,
''
);
$map
[
'order_source_ptag'
]
=
$request
->
input
(
'order_source_ptag'
,
''
);
$map
[
'order_source_ptag'
]
=
$request
->
input
(
'order_source_ptag'
,
''
);
...
@@ -389,6 +390,7 @@ Class OrderController extends Controller
...
@@ -389,6 +390,7 @@ Class OrderController extends Controller
$data
[
'sale_id'
]
=
$request
->
user
->
userId
;
$data
[
'sale_id'
]
=
$request
->
user
->
userId
;
}
}
// 自营客服权限
if
(
$tid
==
2
&&
$info
[
'role'
]
==
6
)
{
if
(
$tid
==
2
&&
$info
[
'role'
]
==
6
)
{
$map
[
'check_jd_order'
]
=
1
;
// 只允许查看京东自营订单
$map
[
'check_jd_order'
]
=
1
;
// 只允许查看京东自营订单
}
}
...
@@ -404,14 +406,17 @@ Class OrderController extends Controller
...
@@ -404,14 +406,17 @@ Class OrderController extends Controller
if
(
$tid
==
1
)
{
if
(
$tid
==
1
)
{
$map
[
'order_type_filter'
]
=
[
1
];
$map
[
'order_type_filter'
]
=
[
1
];
}
else
{
}
else
if
(
$tid
==
2
)
{
$map
[
'order_type_filter'
]
=
[
1
,
3
];
// 1. 网站 2. 京东
$map
[
'order_type_filter'
]
=
[
1
,
3
];
// 1. 网站 2. 京东
}
else
if
(
$tid
==
3
)
{
$map
[
'order_goods_type'
]
=
1
;
// 联营订单
$map
[
'order_type_filter'
]
=
[
2
,
3
];
// 2-ERP, 3-JD
}
}
// 获取所有的业务员 (包括经理、交易员、客服、测试)
// 获取所有的业务员 (包括经理、交易员、客服、测试)
$perm
=
new
PermController
;
$perm
=
new
PermController
;
if
(
$tid
==
1
)
{
if
(
$tid
==
1
||
$tid
==
3
)
{
$manager
=
$perm
->
getRoleUsers
(
$request
,
'经理'
);
$manager
=
$perm
->
getRoleUsers
(
$request
,
'经理'
);
$test
=
$perm
->
getRoleUsers
(
$request
,
'测试'
);
$test
=
$perm
->
getRoleUsers
(
$request
,
'测试'
);
$sales
=
$perm
->
getRoleUsers
(
$request
,
'交易员'
);
$sales
=
$perm
->
getRoleUsers
(
$request
,
'交易员'
);
...
@@ -454,64 +459,9 @@ Class OrderController extends Controller
...
@@ -454,64 +459,9 @@ Class OrderController extends Controller
// erp订单
// erp订单
public
function
erpOrder
(
Request
$request
)
public
function
erpOrder
(
Request
$request
)
{
{
$info
=
$this
->
get
PageInfo
(
$request
);
$info
=
$this
->
get
OrderInfo
(
$request
,
3
);
$info
[
'title'
]
=
'ERP订单'
;
$info
[
'title'
]
=
'ERP订单'
;
$map
=
array
();
// 页面参数
if
(
$request
->
isMethod
(
'get'
))
{
$map
[
'order_type'
]
=
$request
->
input
(
'order_type'
,
''
);
$map
[
'order_contain'
]
=
$request
->
input
(
'order_contain'
,
''
);
$map
[
'time_start'
]
=
$request
->
input
(
'time_start'
,
''
);
$map
[
'time_end'
]
=
$request
->
input
(
'time_end'
,
''
);
$map
[
'order_status'
]
=
$request
->
input
(
'order_status'
,
''
);
$map
[
'order_send'
]
=
$request
->
input
(
'order_send'
,
''
);
$map
[
'order_source'
]
=
$request
->
input
(
'order_source'
,
''
);
}
$map
[
'order_goods_type'
]
=
1
;
// 联营订单
/* 查看ERP/JD订单 */
$map
[
'order_type_filter'
]
=
[
2
,
3
];
// 2-ERP, 3-JD
// 非竞调账号,则查看真实数据
if
(
$info
[
'username'
]
!=
'vpadmin@ichunt.com'
)
{
$map
[
'is_fake'
]
=
0
;
}
else
{
$map
[
'vp_time_set'
]
=
strtotime
(
Config
(
'website.vp_time_set'
));
}
// 获取所有的业务员 (包括经理和交易员)
$perm
=
new
PermController
;
$manager
=
$perm
->
getRoleUsers
(
$request
,
'经理'
);
$sale_list
=
$perm
->
getRoleUsers
(
$request
,
'交易员'
);
$test
=
$perm
->
getRoleUsers
(
$request
,
'测试'
);
$sale_list
=
array_merge
(
$manager
,
$sale_list
,
$test
);
//获取订单列表
$url
=
Config
(
'website.api_domain'
)
.
'order/getAllOrder'
;
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'p'
]
=
$request
->
input
(
'p'
,
1
);
// 当前页码
$data
[
'map'
]
=
$map
;
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
// 分页
$page
=
new
Page
(
$response
[
'data'
][
'count'
],
10
);
$page
->
setConfig
(
'theme'
,
'%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%'
);
$show
=
$page
->
show
();
$info
[
'condition'
]
=
$map
;
$info
[
'sale_list'
]
=
$sale_list
;
$info
[
'list'
]
=
$response
[
'data'
][
'data'
];
$info
[
'pay_count'
]
=
$response
[
'data'
][
'pay_count'
];
$info
[
'count'
]
=
$response
[
'data'
][
'count'
];
$info
[
'page'
]
=
$show
;
return
view
(
'erpOrder'
,
$info
);
return
view
(
'erpOrder'
,
$info
);
}
}
...
...
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