Commit 9c2e9243 by 朱继来

调整订单总额

parent 91855c2a
Showing with 4 additions and 14 deletions
...@@ -590,14 +590,14 @@ Class OrderController extends Controller ...@@ -590,14 +590,14 @@ Class OrderController extends Controller
}) })
->where('it.status', '<>', -1) ->where('it.status', '<>', -1)
->where('o.order_goods_type', '=', $map['order_goods_type']) ->where('o.order_goods_type', '=', $map['order_goods_type'])
->select('it.goods_name', 'it.goods_number', 'it.goods_price', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.create_time', 'o.status', 'o.currency', 'o.sale_id', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'c.com_name') ->select('it.goods_name', 'it.goods_number', 'it.goods_price', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'c.com_name')
->groupBy('it.rec_id') ->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC') ->orderBy('o.create_time', 'DESC')
->get(); ->get();
if (!empty($list)) { if (!empty($list)) {
// 订单数据处理 // 订单数据处理
$export = $this->exportList($request, $list, $map['order_goods_type']); $export = $this->exportList($list);
$xlsName = '订单数据导出'; $xlsName = '订单数据导出';
$xlslist = exportExcel($xlsName, $xlsCell, $export); $xlslist = exportExcel($xlsName, $xlsCell, $export);
...@@ -626,7 +626,7 @@ Class OrderController extends Controller ...@@ -626,7 +626,7 @@ Class OrderController extends Controller
* @param [type] $order [查询出的订单数据] * @param [type] $order [查询出的订单数据]
* @return [type] [description] * @return [type] [description]
*/ */
public function exportList($request, $order, $type) public function exportList($order)
{ {
// 订单类型 // 订单类型
$order_type = array( $order_type = array(
...@@ -680,17 +680,7 @@ Class OrderController extends Controller ...@@ -680,17 +680,7 @@ Class OrderController extends Controller
$tmp[$i]['goods_name'] = $val->goods_name; $tmp[$i]['goods_name'] = $val->goods_name;
$tmp[$i]['goods_number'] = $val->goods_number; $tmp[$i]['goods_number'] = $val->goods_number;
$tmp[$i]['goods_price'] = $val->goods_price; $tmp[$i]['goods_price'] = $val->goods_price;
$tmp[$i]['order_amount'] = $val->order_amount;
$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]['currency'] = $val->currency == 1 ? 'RMB' : 'USD';
$tmp[$i]['order_type'] = $order_type[$val->order_pay_type]; $tmp[$i]['order_type'] = $order_type[$val->order_pay_type];
$tmp[$i]['order_status'] = $order_status[$val->status]; $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