Merge pull request 'feat(admin): 为预订单表添加导出功能并优化订单导出内容' (#319) from dev into main
Reviewed-on: #319
This commit is contained in:
commit
66138d4670
@ -9,13 +9,14 @@ use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\purchase_product_offer\PurchaseProductOffer;
|
||||
use app\common\model\system_store\SystemStore;
|
||||
use app\common\lists\ListsExcelInterface;
|
||||
|
||||
/**
|
||||
* 预订单表列表
|
||||
* Class BeforehandOrderLists
|
||||
* @package app\admin\listsbeforehand_order
|
||||
*/
|
||||
class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
|
||||
{
|
||||
|
||||
|
||||
@ -105,5 +106,41 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
{
|
||||
return BeforehandOrder::where($this->searchWhere)->count();
|
||||
}
|
||||
/**
|
||||
* @notes 导出文件名
|
||||
* @return string
|
||||
* @author 乔峰
|
||||
* @date 2022/11/24 16:17
|
||||
*/
|
||||
public function setFileName(): string
|
||||
{
|
||||
|
||||
return '预订单表';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出字段
|
||||
* @return string[]
|
||||
* @author 乔峰
|
||||
* @date 2022/11/24 16:17
|
||||
*/
|
||||
public function setExcelFields(): array
|
||||
{
|
||||
$data=[
|
||||
'id'=>'ID',
|
||||
'order_id'=>'单号',
|
||||
'order_type_name'=>'订单类型',
|
||||
'system_store' => '门店',
|
||||
'admin_name' => '门店',
|
||||
'warehousing' => '入库',
|
||||
'outbound' => '出库',
|
||||
'total_price' => '总价',
|
||||
'admin_name' => '用户',
|
||||
'mark' => '备注',
|
||||
'msg' => '通知',
|
||||
'create_time' => '时间',
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
}
|
@ -93,8 +93,17 @@ class OrderOutbound
|
||||
$sheet->mergeCells('G' . ($count + 7) . ':I' . $count + 7);
|
||||
$sheet->setCellValue('G' . ($count + 7),$order['system_store_name']);
|
||||
|
||||
$sheet->mergeCells('B' . ($count + 8) . ':I' . $count + 8);
|
||||
$sheet->mergeCells('B' . ($count + 8) . ':C' . $count + 8);
|
||||
$sheet->setCellValue('A'. ($count + 8), '收货地址:');
|
||||
|
||||
$sheet->mergeCells('E' . ($count + 8) . ':F' . $count + 8);
|
||||
$sheet->setCellValue('D'. ($count + 8), '下单时间:');
|
||||
$sheet->setCellValue('E'. ($count + 8), $order['create_time']);
|
||||
|
||||
$sheet->setCellValue('G'. ($count + 8), '送货时间:');
|
||||
$sheet->mergeCells('H' . ($count + 8) . ':I' . $count + 8);
|
||||
$sheet->setCellValue('H'. ($count + 8), $other_data->arrival_time??'');
|
||||
|
||||
$sheet->setCellValue('B'. ($count + 8), $other_data->address??'');
|
||||
|
||||
$sheet->mergeCells('B' . ($count + 9) . ':E' . $count + 9);
|
||||
|
Loading…
x
Reference in New Issue
Block a user