账单导出

This commit is contained in:
2026-11-01 16:17:12 +08:00
parent f91939f1f0
commit c73910ba74
8 changed files with 69 additions and 9 deletions
+2 -1
View File
@@ -120,7 +120,7 @@ class PurchaseStoreSheet implements FromCollection, WithStrictNullComparison, Wi
}
/**
* 标题/列头/合计加粗;全表居中 + 全边框;金额类列货币格式;
* 标题合并 A:I 并居中;标题/列头/合计加粗;全表居中 + 全边框;金额类列货币格式;
* 数量(浅黄)/金额(浅红)按值条件填色(0 不填、列头固定填色),冻结列头
*/
public function styles(Worksheet $sheet): array
@@ -135,6 +135,7 @@ class PurchaseStoreSheet implements FromCollection, WithStrictNullComparison, Wi
}
// 全部单元格水平/垂直居中
$sheet->mergeCells('A1:I1');
$sheet->getStyle('A1:I' . $this->lastRow)
->getAlignment()
->setHorizontal(Alignment::HORIZONTAL_CENTER)