|
@@ -15,12 +15,14 @@ class ManMonthlyWorkHourSheetExport implements WithEvents, WithTitle
|
|
|
protected $monthName;
|
|
protected $monthName;
|
|
|
protected $data;
|
|
protected $data;
|
|
|
protected $daysInMonth;
|
|
protected $daysInMonth;
|
|
|
|
|
+ protected $company_name;
|
|
|
|
|
|
|
|
- public function __construct(string $monthName, array $data, int $daysInMonth)
|
|
|
|
|
|
|
+ public function __construct(string $monthName, array $data, int $daysInMonth, string $company_name)
|
|
|
{
|
|
{
|
|
|
$this->monthName = $monthName;
|
|
$this->monthName = $monthName;
|
|
|
$this->data = $data;
|
|
$this->data = $data;
|
|
|
$this->daysInMonth = $daysInMonth;
|
|
$this->daysInMonth = $daysInMonth;
|
|
|
|
|
+ $this->company_name = $company_name;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function title(): string
|
|
public function title(): string
|
|
@@ -46,7 +48,7 @@ class ManMonthlyWorkHourSheetExport implements WithEvents, WithTitle
|
|
|
|
|
|
|
|
// --- 2. 第二行:单位行 ---
|
|
// --- 2. 第二行:单位行 ---
|
|
|
$sheet->mergeCells("A2:{$highestColumn}2");
|
|
$sheet->mergeCells("A2:{$highestColumn}2");
|
|
|
- $sheet->setCellValue('A2', "单位:");
|
|
|
|
|
|
|
+ $sheet->setCellValue('A2', "单位:" . $this->company_name);
|
|
|
$sheet->getStyle('A2')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT);
|
|
$sheet->getStyle('A2')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT);
|
|
|
|
|
|
|
|
// --- 3. 第三行表头设置 ---
|
|
// --- 3. 第三行表头设置 ---
|