Commit 5a472a3c by 朱继来

订单导出添加发票类型

parent e4edf262
Showing with 14 additions and 3 deletions
...@@ -602,6 +602,7 @@ Class OrderController extends Controller ...@@ -602,6 +602,7 @@ Class OrderController extends Controller
array('order_type', '订单类型'), array('order_type', '订单类型'),
array('order_status', '订单状态'), array('order_status', '订单状态'),
array('shipping_status','发货状态'), array('shipping_status','发货状态'),
array('inv_type', '发票类型'),
array('invoice_status', '发票状态'), array('invoice_status', '发票状态'),
array('company_name', '供应商'), array('company_name', '供应商'),
array('sale_name', $sale_name), array('sale_name', $sale_name),
...@@ -752,7 +753,7 @@ Class OrderController extends Controller ...@@ -752,7 +753,7 @@ 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_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'c.com_name', 'oe.send_remark') ->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.inv_type', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'c.com_name', 'oe.send_remark')
->groupBy('it.rec_id') ->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC') ->orderBy('o.create_time', 'DESC')
->get(); ->get();
...@@ -817,6 +818,14 @@ Class OrderController extends Controller ...@@ -817,6 +818,14 @@ Class OrderController extends Controller
'2' => '已签', '2' => '已签',
); );
// 发票类型
$inv_type = array(
'1' => '不开发票',
'2' => '普通发票',
'3' => '增值税专用发票',
'4' => '增值税普通发票',
);
// 发票状态 // 发票状态
$invoice_status = array( $invoice_status = array(
'-1' => '待确认', '-1' => '待确认',
...@@ -834,8 +843,8 @@ Class OrderController extends Controller ...@@ -834,8 +843,8 @@ Class OrderController extends Controller
} }
$tmp[$i]['order_id'] = $order[$i]->order_id; $tmp[$i]['order_id'] = $order[$i]->order_id;
// 自营商品名称换成商品型号
$tmp[$i]['goods_name'] = $order[$i]->goods_name; $tmp[$i]['goods_name'] = $order[$i]->order_goods_type == 1 ? $order[$i]->goods_name : getGoodsName($order[$i]->goods_id);
$tmp[$i]['goods_number'] = $order[$i]->goods_number; $tmp[$i]['goods_number'] = $order[$i]->goods_number;
$tmp[$i]['goods_price'] = $order[$i]->goods_price; $tmp[$i]['goods_price'] = $order[$i]->goods_price;
$tmp[$i]['goods_amount'] = $order[$i]->goods_number*$order[$i]->goods_price; $tmp[$i]['goods_amount'] = $order[$i]->goods_number*$order[$i]->goods_price;
...@@ -856,6 +865,7 @@ Class OrderController extends Controller ...@@ -856,6 +865,7 @@ Class OrderController extends Controller
$tmp[$i]['order_type'] = ''; $tmp[$i]['order_type'] = '';
$tmp[$i]['order_status'] = ''; $tmp[$i]['order_status'] = '';
$tmp[$i]['shipping_status'] = ''; // 发货状态 $tmp[$i]['shipping_status'] = ''; // 发货状态
$tmp[$i]['inv_type'] = ''; // 发票类型
$tmp[$i]['invoice_status'] = ''; // 发票状态 $tmp[$i]['invoice_status'] = ''; // 发票状态
$tmp[$i]['company_name'] = ''; $tmp[$i]['company_name'] = '';
$tmp[$i]['sale_name'] = ''; // 推送业务员 $tmp[$i]['sale_name'] = ''; // 推送业务员
...@@ -879,6 +889,7 @@ Class OrderController extends Controller ...@@ -879,6 +889,7 @@ Class OrderController extends Controller
$tmp[$i]['order_type'] = !empty($order[$i]->order_pay_type) ? $order_type[$order[$i]->order_pay_type] : '未知'; $tmp[$i]['order_type'] = !empty($order[$i]->order_pay_type) ? $order_type[$order[$i]->order_pay_type] : '未知';
$tmp[$i]['order_status'] = !empty($order[$i]->status) ? $order_status[$order[$i]->status] : '未知'; $tmp[$i]['order_status'] = !empty($order[$i]->status) ? $order_status[$order[$i]->status] : '未知';
$tmp[$i]['shipping_status'] = !empty($order[$i]->shipping_status) ? $shipping_status[$order[$i]->shipping_status] : '无发货信息'; // 发货状态 $tmp[$i]['shipping_status'] = !empty($order[$i]->shipping_status) ? $shipping_status[$order[$i]->shipping_status] : '无发货信息'; // 发货状态
$tmp[$i]['inv_type'] = $order[$i]->inv_type ? $inv_type[$order[$i]->inv_type] : '未知'; // 发票类型
$tmp[$i]['invoice_status'] = !empty($order[$i]->invoice_status) ? $invoice_status[$order[$i]->invoice_status] : '无发票信息'; // 发票状态 $tmp[$i]['invoice_status'] = !empty($order[$i]->invoice_status) ? $invoice_status[$order[$i]->invoice_status] : '无发票信息'; // 发票状态
$tmp[$i]['company_name'] = $order[$i]->supplier_name; $tmp[$i]['company_name'] = $order[$i]->supplier_name;
$tmp[$i]['sale_name'] = isset($sales) ? $sales->name : ''; // 推送业务员 $tmp[$i]['sale_name'] = isset($sales) ? $sales->name : ''; // 推送业务员
......
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