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
a8d79868
authored
Nov 08, 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
a95946d4
1839bc13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
49 deletions
app/Http/Controllers/OrderController.php
app/Model/OrderModel.php
app/Http/Controllers/OrderController.php
View file @
a8d79868
...
...
@@ -662,11 +662,11 @@ Class OrderController extends Controller
// 订单导出
public
function
export
(
Request
$request
)
{
$info
=
$this
->
getPageInfo
(
$request
);
$info
=
$this
->
_search
(
$request
,
$request
->
input
(
'order_goods_type'
)
);
$orderModel
=
new
OrderModel
();
return
$orderModel
->
orderExport
(
$
request
,
$info
);
return
$orderModel
->
orderExport
(
$
info
[
'map'
]
);
}
// 下载合同
...
...
app/Model/OrderModel.php
View file @
a8d79868
...
...
@@ -15,58 +15,14 @@ class OrderModel extends Model
public
$timestamps
=
false
;
// 订单导出
public
function
orderExport
(
$
request
,
$info
)
public
function
orderExport
(
$
map
)
{
set_time_limit
(
0
);
ini_set
(
'memory_limit'
,
'2048M'
);
$map
=
array
();
$userMainModel
=
new
UserMainModel
();
$map
[
'testMobile'
]
=
$userMainModel
->
testMobile
();
// 页面参数
if
(
$request
->
isMethod
(
'get'
))
{
$map
[
'order_type'
]
=
$request
->
input
(
'order_type'
,
''
);
$map
[
'order_contain'
]
=
$request
->
input
(
'order_contain'
,
''
);
$map
[
'order_sn'
]
=
$request
->
input
(
'order_sn'
,
''
);
$map
[
'erp_sn'
]
=
$request
->
input
(
'erp_sn'
,
''
);
$map
[
'goods_name'
]
=
$request
->
input
(
'goods_name'
,
''
);
$map
[
'time_start'
]
=
$request
->
input
(
'time_start'
,
''
);
$map
[
'time_end'
]
=
$request
->
input
(
'time_end'
,
''
);
$map
[
'order_status'
]
=
$request
->
input
(
'order_status'
,
''
);
$map
[
'shipping_name'
]
=
$request
->
input
(
'shipping_name'
,
''
);
$map
[
'order_send'
]
=
$request
->
input
(
'order_send'
,
''
);
$map
[
'test_order'
]
=
$request
->
input
(
'test_order'
,
''
);
$map
[
'order_pay_type'
]
=
$request
->
input
(
'order_pay_type'
,
''
);
$map
[
'order_type_a'
]
=
$request
->
input
(
'order_type_a'
,
''
);
$map
[
'order_source_pf'
]
=
$request
->
input
(
'order_source_pf'
,
''
);
$map
[
'order_source_adtag'
]
=
$request
->
input
(
'order_source_adtag'
,
''
);
$map
[
'order_source_ptag'
]
=
$request
->
input
(
'order_source_ptag'
,
''
);
$map
[
'erp_order_id'
]
=
$request
->
input
(
'erp_order_id'
,
''
);
$map
[
'order_payment_mode'
]
=
$request
->
input
(
'order_payment_mode'
,
''
);
$map
[
'order_invoice_status'
]
=
$request
->
input
(
'order_invoice_status'
,
''
);
$map
[
'order_goods_type'
]
=
$request
->
input
(
'order_goods_type'
,
''
);
$map
[
'is_new'
]
=
$request
->
input
(
'is_new'
,
''
);
$map
[
'is_new_order'
]
=
$request
->
input
(
'is_new_order'
,
''
);
$map
[
'sale_type'
]
=
$request
->
input
(
'sale_type'
,
''
);
$map
[
'business_type'
]
=
$request
->
input
(
'business_type'
,
''
);
}
/* 临时添加 所有人只能查看线上订单 */
// $map['online_order'] = 1;
// 非竞调账号,则查看真实数据
if
(
$info
[
'role'
]
!=
13
)
{
$map
[
'is_fake'
]
=
0
;
}
if
(
$map
[
'order_goods_type'
]
==
1
)
{
$map
[
'order_type_filter'
]
=
in_array
(
$info
[
'role'
],
[
1
,
13
])
?
[
1
,
2
,
3
]
:
[
1
];
// 管理员和尽调账号可以查看平台、ERP、京东订单
}
else
{
$map
[
'order_type_filter'
]
=
[
1
,
3
,
4
];
// 1.网站 3.京东 4.象牙宝
}
$list
=
$this
->
from
(
'lie_order_items as it'
)
->
leftJoin
(
'lie_order as o'
,
'it.order_id'
,
'='
,
'o.order_id'
)
->
leftJoin
(
'lie_pay_log as p'
,
'it.order_id'
,
'='
,
'p.order_id'
)
...
...
@@ -138,8 +94,8 @@ class OrderModel extends Model
})
->
where
(
function
(
$query
)
use
(
$map
)
{
// 订单推送业务员
if
(
!
empty
(
$map
[
'
order_sen
d'
]))
{
$query
->
whereIn
(
'o.sale_id'
,
explode
(
','
,
$map
[
'order_send'
])
);
if
(
!
empty
(
$map
[
'
sale_i
d'
]))
{
$query
->
whereIn
(
'o.sale_id'
,
$map
[
'sale_id'
]
);
}
})
->
where
(
function
(
$query
)
use
(
$map
)
{
...
...
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