From 20c4e9d879e57b5e4fde512fb743bc4142ba0019 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 21:09:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[approvals]=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EC=9D=B8=EA=B0=90=EA=B3=84=20create=20=ED=8F=BC/=EB=AF=B8?= =?UTF-8?q?=EB=A6=AC=EB=B3=B4=EA=B8=B0=20=EC=9D=B8=EA=B0=90=EB=B9=84?= =?UTF-8?q?=EA=B5=90=20=ED=98=95=EC=8B=9D=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - create.blade.php: buildSealUsagePreviewHtml 인감비교 레이아웃 적용 - create.blade.php: saveApproval formContent에서 seal_type/remarks 제거, attachment_desc 추가 - _seal-usage-form.blade.php: 인감비교 2열 레이아웃 + 용도/제출처/첨부서류 필드 - _seal-usage-show.blade.php: 읽기전용 인감비교 레이아웃 --- resources/views/approvals/create.blade.php | 92 +++++++++---------- .../partials/_seal-usage-form.blade.php | 89 ++++++++++-------- .../partials/_seal-usage-show.blade.php | 45 ++++++--- 3 files changed, 124 insertions(+), 102 deletions(-) diff --git a/resources/views/approvals/create.blade.php b/resources/views/approvals/create.blade.php index 11165c07..921a67ae 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -985,10 +985,9 @@ function applyBodyTemplate(formId) { formContent = { usage_date: document.getElementById('su-usage-date').value, - seal_type: getSealUsageType(), purpose: suPurpose, submit_to: suSubmitTo, - remarks: document.getElementById('su-remarks').value.trim(), + attachment_desc: document.getElementById('su-attachment-desc').value.trim(), company_name: document.getElementById('su-company-name').value, business_num: document.getElementById('su-business-num').value, ceo_name: document.getElementById('su-ceo-name').value, @@ -1831,63 +1830,59 @@ function buildCertPreviewHtml(d) { // 사용인감계 관련 함수 // ========================================================================= -document.getElementById('su-seal-type')?.addEventListener('change', function() { - const customWrap = document.getElementById('su-seal-type-custom-wrap'); - if (this.value === '__custom__') { - customWrap.style.display = ''; - document.getElementById('su-seal-type-custom').focus(); - } else { - customWrap.style.display = 'none'; - } -}); - -function getSealUsageType() { - const sel = document.getElementById('su-seal-type'); - if (sel.value === '__custom__') { - return document.getElementById('su-seal-type-custom').value.trim() || '기타'; - } - return sel.value; -} - function buildSealUsagePreviewHtml(data) { const e = (s) => s ? String(s).replace(/&/g,'&').replace(//g,'>') : '-'; + const dateObj = data.usage_date ? new Date(data.usage_date + 'T00:00:00') : new Date(); + const y = dateObj.getFullYear(); + const m = String(dateObj.getMonth() + 1).padStart(2, ' '); + const d = String(dateObj.getDate()).padStart(2, ' '); + return ` -
-

사 용 인 감 계

+
+

사 용 인 감 계

- + +
- - + + - - + + - - - - - - - - - ${data.remarks ? ` - - - ` : ''}
사용일자${e(data.usage_date)}법인인감사용인감
인감종류${e(data.seal_type)} + (인감 날인) + + (인감 날인) +
용 도${e(data.purpose)}
제출처${e(data.submit_to)}
비 고${e(data.remarks)}
-

- 위와 같이 인감 사용을 신청하오니 허가하여 주시기 바랍니다. -

+ +
+

용도: ${e(data.purpose)}

+

제출처: ${e(data.submit_to)}

+
-
-

상 호: ${e(data.company_name)}

-

사업자등록번호: ${e(data.business_num)}

-

주 소: ${e(data.company_address)}

-

대표이사: ${e(data.ceo_name)}

+ +
+

+ 위 사용인감은 당사에서 사용하는 인감입니다. 당사는 위 인감사용으로 인한 모든 책임을 질 것을 확약하고 사용인감계를 제출합니다. +

+
+ + + ${data.attachment_desc ? `

첨부서류: ${e(data.attachment_desc)}

` : ''} + + +

${y}년 ${m}월 ${d}일

+ + +
+

상 호: ${e(data.company_name)}

+

사업자등록번호: ${e(data.business_num)}

+

주 소: ${e(data.company_address)}

+

대표이사: ${e(data.ceo_name)}

`; } @@ -1895,10 +1890,9 @@ function buildSealUsagePreviewHtml(data) { function openSealUsagePreview() { const data = { usage_date: document.getElementById('su-usage-date').value, - seal_type: getSealUsageType(), purpose: document.getElementById('su-purpose').value, submit_to: document.getElementById('su-submit-to').value, - remarks: document.getElementById('su-remarks').value, + attachment_desc: document.getElementById('su-attachment-desc').value, company_name: document.getElementById('su-company-name').value, business_num: document.getElementById('su-business-num').value, ceo_name: document.getElementById('su-ceo-name').value, diff --git a/resources/views/approvals/partials/_seal-usage-form.blade.php b/resources/views/approvals/partials/_seal-usage-form.blade.php index d6fedeed..2fdbe049 100644 --- a/resources/views/approvals/partials/_seal-usage-form.blade.php +++ b/resources/views/approvals/partials/_seal-usage-form.blade.php @@ -14,57 +14,66 @@
- {{-- 인감 사용 정보 --}} + {{-- 1. 인감 날인 비교란 --}}
-

인감 사용 정보

+

1. 인감 날인

-
-
-
- - +
+
+ {{-- 법인인감 --}} +
+
법인인감
+
+ 인감 날인 영역 +
+

인쇄 후 날인

-
- - + {{-- 사용인감 --}} +
+
사용인감
+
+ 인감 날인 영역 +
+

인쇄 후 날인

- -
-
- - -
-
- - -
-
- -
- {{-- 회사 정보 (읽기 전용) --}} + {{-- 2. 사용 정보 --}}
-

회사 정보

+

2. 사용 정보

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + {{-- 3. 회사 정보 (읽기 전용) --}} +
+
+

3. 회사 정보

diff --git a/resources/views/approvals/partials/_seal-usage-show.blade.php b/resources/views/approvals/partials/_seal-usage-show.blade.php index eb0709c3..78bfa3fb 100644 --- a/resources/views/approvals/partials/_seal-usage-show.blade.php +++ b/resources/views/approvals/partials/_seal-usage-show.blade.php @@ -16,21 +16,36 @@ class="px-3 py-1.5 bg-indigo-50 text-indigo-600 hover:bg-indigo-100 border borde
- {{-- 인감 사용 정보 --}} + {{-- 인감 날인 비교란 (인쇄용 안내) --}}
-

인감 사용 정보

+

인감 날인

+
+
+
+
+
법인인감
+
+ 인쇄 후 날인 +
+
+
+
사용인감
+
+ 인쇄 후 날인 +
+
+
+
+
+ + {{-- 사용 정보 --}} +
+
+

사용 정보

-
- 사용일자 -
{{ $content['usage_date'] ?? '-' }}
-
-
- 인감종류 -
{{ $content['seal_type'] ?? '-' }}
-
용도
{{ $content['purpose'] ?? '-' }}
@@ -39,12 +54,16 @@ class="px-3 py-1.5 bg-indigo-50 text-indigo-600 hover:bg-indigo-100 border borde 제출처
{{ $content['submit_to'] ?? '-' }}
- @if(!empty($content['remarks'])) + @if(!empty($content['attachment_desc']))
- 비고 -
{{ $content['remarks'] }}
+ 첨부서류 +
{{ $content['attachment_desc'] }}
@endif +
+ 일자 +
{{ $content['usage_date'] ?? '-' }}
+