From f00eee7f120487a4abdc038f1b56ae2b43bb1a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Fri, 6 Mar 2026 10:19:04 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[approvals]=20=EC=9C=84=EC=B4=89?= =?UTF-8?q?=EC=A6=9D=EB=AA=85=EC=84=9C=20=EB=A0=88=EC=9D=B4=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EA=B0=9C=EC=84=A0=20-=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=ED=96=89=20=EB=86=92=EC=9D=B4/=EA=B8=80=EC=9E=90?= =?UTF-8?q?=ED=81=AC=EA=B8=B0=20=EC=A6=9D=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - HTML 미리보기: th/td padding 16px 18px, font-size 16px, th width 140px - PDF(TCPDF): rowHeight 8→12, 본문 폰트 10→12, 증명문구/날짜 12→14, 회사명 14→16 - create/show 동일하게 적용 --- app/Services/AppointmentCertService.php | 24 +++++++++++----------- resources/views/approvals/create.blade.php | 16 +++++++-------- resources/views/approvals/show.blade.php | 16 +++++++-------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/app/Services/AppointmentCertService.php b/app/Services/AppointmentCertService.php index f332316b..9fd9c45a 100644 --- a/app/Services/AppointmentCertService.php +++ b/app/Services/AppointmentCertService.php @@ -95,7 +95,7 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response $pageWidth = $pdf->getPageWidth() - 40; $thWidth = 30; - $rowHeight = 8; + $rowHeight = 12; // 성명 / (빈칸) $this->addTableRow($pdf, $font, [ @@ -125,21 +125,21 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response $pdf->Ln(30); // 증명 문구 - $pdf->SetFont($font, '', 12); - $pdf->Cell(0, 10, '위와 같이 위촉하였음을 증명합니다.', 0, 1, 'C'); + $pdf->SetFont($font, '', 14); + $pdf->Cell(0, 12, '위와 같이 위촉하였음을 증명합니다.', 0, 1, 'C'); $pdf->Ln(20); // 발급일 $issueDate = $content['issue_date'] ?? date('Y-m-d'); $issueDateFormatted = $this->formatDate($issueDate); - $pdf->SetFont($font, 'B', 12); - $pdf->Cell(0, 10, $issueDateFormatted, 0, 1, 'C'); + $pdf->SetFont($font, 'B', 14); + $pdf->Cell(0, 12, $issueDateFormatted, 0, 1, 'C'); $pdf->Ln(30); // 회사명 + 대표이사 $ceoName = $content['ceo_name'] ?? ''; - $pdf->SetFont($font, 'B', 14); - $pdf->Cell(0, 10, ($content['company_name'] ?? '').' 대표이사 '.$ceoName.' (인)', 0, 1, 'C'); + $pdf->SetFont($font, 'B', 16); + $pdf->Cell(0, 12, ($content['company_name'] ?? '').' 대표이사 '.$ceoName.' (인)', 0, 1, 'C'); $pdfContent = $pdf->Output('', 'S'); $fileName = '위촉증명서_'.($content['name'] ?? '').'.pdf'; @@ -153,22 +153,22 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response private function addTableRow(\TCPDF $pdf, string $font, array $cells): void { $pageWidth = $pdf->getPageWidth() - 40; - $rowHeight = 8; + $rowHeight = 12; $thWidth = 30; if (count($cells) === 1) { - $pdf->SetFont($font, 'B', 10); + $pdf->SetFont($font, 'B', 12); $pdf->SetFillColor(248, 249, 250); $pdf->Cell($thWidth, $rowHeight, $cells[0][0], 1, 0, 'L', true); - $pdf->SetFont($font, '', 10); + $pdf->SetFont($font, '', 12); $pdf->Cell($pageWidth - $thWidth, $rowHeight, $cells[0][1], 1, 1, 'L'); } else { $tdWidth = ($pageWidth - $thWidth * 2) / 2; foreach ($cells as $cell) { - $pdf->SetFont($font, 'B', 10); + $pdf->SetFont($font, 'B', 12); $pdf->SetFillColor(248, 249, 250); $pdf->Cell($thWidth, $rowHeight, $cell[0], 1, 0, 'L', true); - $pdf->SetFont($font, '', 10); + $pdf->SetFont($font, '', 12); $pdf->Cell($tdWidth, $rowHeight, $cell[1], 1, 0, 'L'); } $pdf->Ln(); diff --git a/resources/views/approvals/create.blade.php b/resources/views/approvals/create.blade.php index 40043715..f562247b 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -1282,7 +1282,7 @@ function printAppointmentCertPreview() { const content = document.getElementById('appointment-cert-preview-content').innerHTML; const win = window.open('', '_blank', 'width=800,height=1000'); win.document.write('위촉증명서'); - win.document.write(''); + win.document.write(''); win.document.write('
'); win.document.write(content); win.document.write('
'); @@ -1292,11 +1292,11 @@ function printAppointmentCertPreview() { function buildAppointmentCertPreviewHtml(d) { const e = (s) => { const div = document.createElement('div'); div.textContent = s; return div.innerHTML; }; - const thStyle = 'border:1px solid #333; padding:10px 14px; background:#f8f9fa; font-weight:600; text-align:left; white-space:nowrap; width:120px; font-size:14px;'; - const tdStyle = 'border:1px solid #333; padding:10px 14px; font-size:14px;'; + const thStyle = 'border:1px solid #333; padding:16px 18px; background:#f8f9fa; font-weight:600; text-align:left; white-space:nowrap; width:140px; font-size:16px;'; + const tdStyle = 'border:1px solid #333; padding:16px 18px; font-size:16px;'; return ` -

위 촉 증 명 서

+

위 촉 증 명 서

@@ -1325,17 +1325,17 @@ function buildAppointmentCertPreviewHtml(d) {
-

+

위와 같이 위촉하였음을 증명합니다.

-

+

${e(d.issueDateFormatted)}

-

${e(d.company)}

-

대표이사    ${e(d.ceoName)}    (인)

+

${e(d.company)}

+

대표이사    ${e(d.ceoName)}    (인)

`; } diff --git a/resources/views/approvals/show.blade.php b/resources/views/approvals/show.blade.php index 2ff6ca8f..edea7199 100644 --- a/resources/views/approvals/show.blade.php +++ b/resources/views/approvals/show.blade.php @@ -599,7 +599,7 @@ function printAppointmentCertShowPreview() { const content = document.getElementById('appointment-cert-show-preview-content').innerHTML; const win = window.open('', '_blank', 'width=800,height=1000'); win.document.write('위촉증명서'); - win.document.write(''); + win.document.write(''); win.document.write('
'); win.document.write(content); win.document.write('
'); @@ -609,11 +609,11 @@ function printAppointmentCertShowPreview() { function _buildAppointmentCertHtml(d) { const e = (s) => { const div = document.createElement('div'); div.textContent = s; return div.innerHTML; }; - const thStyle = 'border:1px solid #333; padding:10px 14px; background:#f8f9fa; font-weight:600; text-align:left; white-space:nowrap; width:120px; font-size:14px;'; - const tdStyle = 'border:1px solid #333; padding:10px 14px; font-size:14px;'; + const thStyle = 'border:1px solid #333; padding:16px 18px; background:#f8f9fa; font-weight:600; text-align:left; white-space:nowrap; width:140px; font-size:16px;'; + const tdStyle = 'border:1px solid #333; padding:16px 18px; font-size:16px;'; return ` -

위 촉 증 명 서

+

위 촉 증 명 서

@@ -621,11 +621,11 @@ function _buildAppointmentCertHtml(d) {
성 명${e(d.name)}
주민등록번호${e(d.resident)}
위촉(재직)기간${e(d.hireDate)} ~ ${e(d.resignDate)}계약자격${e(d.contractType)}
용 도${e(d.purpose)}
-

위와 같이 위촉하였음을 증명합니다.

-

${e(d.issueDateFormatted)}

+

위와 같이 위촉하였음을 증명합니다.

+

${e(d.issueDateFormatted)}

-

${e(d.company)}

-

대표이사    ${e(d.ceoName)}    (인)

+

${e(d.company)}

+

대표이사    ${e(d.ceoName)}    (인)

`; }