38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Admin\Exporters;
|
|
|
|
use Encore\Admin\Grid\Exporters\ExcelExporter;
|
|
use Maatwebsite\Excel\Concerns\WithMapping;
|
|
|
|
class WoCouponExport extends ExcelExporter implements WithMapping
|
|
{
|
|
protected $headings = ['渠道', '网点', '工号', '业务', '活动编号', '手机号', '电子券面值', '状态', '处理结果', '原发放流水', '发券流水号', '处理时间'];
|
|
|
|
public function __construct()
|
|
{
|
|
$this->fileName = '沃支付业务记录' . date('YmdHis') . '.xlsx';
|
|
}
|
|
|
|
public function map($info): array
|
|
{
|
|
$data = [
|
|
$info->user->nickname,
|
|
$info->outlet ? $info->outlet->nickname : $info->outletId,
|
|
' ' . $info->number,
|
|
' ' . $info->service_text,
|
|
$info->activityId,
|
|
' ' . $info->mobile,
|
|
$info->ticketAmt,
|
|
$info->status_text,
|
|
$info->remark,
|
|
' ' . $info->ologNo,
|
|
' ' . $info->logNo,
|
|
$info->created_at,
|
|
];
|
|
|
|
return $data;
|
|
}
|
|
|
|
}
|