Files
star-erp/app/Modules/Sales/Exports/SalesImportTemplateExport.php
sky121113 7cf640b2f4
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 50s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped
feat(sales): replace import page with dialog UI and support template download
2026-02-09 17:16:00 +08:00

38 lines
838 B
PHP

<?php
namespace App\Modules\Sales\Exports;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class SalesImportTemplateExport implements WithHeadings, WithTitle, WithStyles
{
public function headings(): array
{
return [
'機台編號',
'交易時間',
'商品代號',
'數量',
'單價',
'總金額',
'貨道', // 新增欄位
'狀態', // 原始狀態
];
}
public function title(): string
{
return '銷售單匯入範本';
}
public function styles(Worksheet $sheet)
{
return [
1 => ['font' => ['bold' => true]],
];
}
}