feat: 实现订单列表导出功能
This commit is contained in:
parent
4344e46544
commit
d9b553cca3
@ -11,13 +11,14 @@ use app\common\lists\ListsSearchInterface;
|
|||||||
use app\common\model\store_branch_product\StoreBranchProduct;
|
use app\common\model\store_branch_product\StoreBranchProduct;
|
||||||
use app\common\model\store_order_cart_info\StoreOrderCartInfo;
|
use app\common\model\store_order_cart_info\StoreOrderCartInfo;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
|
use app\common\lists\ListsExcelInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单列表列表
|
* 订单列表列表
|
||||||
* Class StoreOrderLists
|
* Class StoreOrderLists
|
||||||
* @package app\admin\listsstore_order
|
* @package app\admin\listsstore_order
|
||||||
*/
|
*/
|
||||||
class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['order_id','store_id', 'pay_type', 'staff_id', 'shipping_type', 'delivery_id','paid', 'status', 'is_writeoff','is_merge'],
|
'=' => ['order_id','store_id', 'pay_type', 'staff_id', 'shipping_type', 'delivery_id','paid', 'status', 'is_writeoff','is_merge','uid'],
|
||||||
'between_time' => 'create_time'
|
'between_time' => 'create_time'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -119,4 +120,36 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
})
|
})
|
||||||
->count();
|
->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'=>'订单号',
|
||||||
|
'store_name'=>'门店',
|
||||||
|
'nickname' => '用户',
|
||||||
|
'total_price' => '总金额',
|
||||||
|
'pay_price' => '实际支付',
|
||||||
|
'pay_time' => '支付时间',
|
||||||
|
];
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user