Commit 91855c2a by 朱继来

自营订单导出时添加运费

parent 2a68e776
Showing with 14 additions and 4 deletions
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment