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
91855c2a
authored
May 17, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
自营订单导出时添加运费
parent
2a68e776
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/OrderController.php
View file @
91855c2a
...
...
@@ -597,7 +597,7 @@ Class OrderController extends Controller
if
(
!
empty
(
$list
))
{
// 订单数据处理
$export
=
$this
->
exportList
(
$
list
);
$export
=
$this
->
exportList
(
$
request
,
$list
,
$map
[
'order_goods_type'
]
);
$xlsName
=
'订单数据导出'
;
$xlslist
=
exportExcel
(
$xlsName
,
$xlsCell
,
$export
);
...
...
@@ -626,7 +626,7 @@ Class OrderController extends Controller
* @param [type] $order [查询出的订单数据]
* @return [type] [description]
*/
public
function
exportList
(
$
order
)
public
function
exportList
(
$
request
,
$order
,
$type
)
{
// 订单类型
$order_type
=
array
(
...
...
@@ -679,8 +679,18 @@ Class OrderController extends Controller
$tmp
[
$i
][
'com_name'
]
=
isset
(
$val
->
com_name
)
?
$val
->
com_name
:
''
;
$tmp
[
$i
][
'goods_name'
]
=
$val
->
goods_name
;
$tmp
[
$i
][
'goods_number'
]
=
$val
->
goods_number
;
$tmp
[
$i
][
'goods_price'
]
=
$val
->
goods_price
;
$tmp
[
$i
][
'order_amount'
]
=
$val
->
goods_number
*
$val
->
goods_price
;
$tmp
[
$i
][
'goods_price'
]
=
$val
->
goods_price
;
$express_fee
=
0
;
// 自营运费
if
(
$type
==
2
)
{
$data
=
array
();
$data
=
$this
->
orderDetail
(
$request
,
$val
->
order_id
);
$express_fee
=
$data
[
'order_price_info'
][
'shipping_price'
];
}
$tmp
[
$i
][
'order_amount'
]
=
$val
->
goods_number
*
$val
->
goods_price
+
$express_fee
;
$tmp
[
$i
][
'currency'
]
=
$val
->
currency
==
1
?
'RMB'
:
'USD'
;
$tmp
[
$i
][
'order_type'
]
=
$order_type
[
$val
->
order_pay_type
];
$tmp
[
$i
][
'order_status'
]
=
$order_status
[
$val
->
status
];
...
...
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