Files
sam-manage/resources/views/approvals/partials/_seal-usage-show.blade.php
김보곤 bcd35895d1 fix: [approvals] 사용인감계 create 폼/미리보기 인감비교 형식 반영
- 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: 읽기전용 인감비교 레이아웃
2026-03-06 21:09:27 +09:00

129 lines
7.2 KiB
PHP

{{--
사용인감계 읽기전용 렌더링
Props:
$content (array) - approvals.content JSON
--}}
<div class="space-y-4">
{{-- 미리보기 버튼 --}}
<div class="flex justify-end gap-2">
<button type="button" onclick="openSealUsageShowPreview()"
class="px-3 py-1.5 bg-indigo-50 text-indigo-600 hover:bg-indigo-100 border border-indigo-200 rounded-lg text-sm font-medium transition inline-flex items-center gap-1">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>
</svg>
사용인감계 미리보기
</button>
</div>
{{-- 인감 날인 비교란 (인쇄용 안내) --}}
<div class="border border-gray-200 rounded-lg overflow-hidden">
<div class="bg-gray-50 px-4 py-2 border-b border-gray-200">
<h3 class="text-sm font-semibold text-gray-700">인감 날인</h3>
</div>
<div class="p-4">
<div class="flex gap-6" style="justify-content: center;">
<div style="width: 180px; text-align: center;">
<div class="text-sm font-semibold text-gray-700 mb-2">법인인감</div>
<div style="width: 140px; height: 140px; border: 2px dashed #d1d5db; border-radius: 8px; margin: 0 auto; display: flex; align-items: center; justify-content: center;">
<span class="text-xs text-gray-400">인쇄 날인</span>
</div>
</div>
<div style="width: 180px; text-align: center;">
<div class="text-sm font-semibold text-gray-700 mb-2">사용인감</div>
<div style="width: 140px; height: 140px; border: 2px dashed #d1d5db; border-radius: 8px; margin: 0 auto; display: flex; align-items: center; justify-content: center;">
<span class="text-xs text-gray-400">인쇄 날인</span>
</div>
</div>
</div>
</div>
</div>
{{-- 사용 정보 --}}
<div class="border border-gray-200 rounded-lg overflow-hidden">
<div class="bg-gray-50 px-4 py-2 border-b border-gray-200">
<h3 class="text-sm font-semibold text-gray-700">사용 정보</h3>
</div>
<div class="p-4">
<div class="grid gap-3" style="grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));">
<div style="grid-column: 1 / -1;">
<span class="text-xs text-gray-500">용도</span>
<div class="text-sm font-medium mt-0.5">{{ $content['purpose'] ?? '-' }}</div>
</div>
<div style="grid-column: 1 / -1;">
<span class="text-xs text-gray-500">제출처</span>
<div class="text-sm font-medium mt-0.5">{{ $content['submit_to'] ?? '-' }}</div>
</div>
@if(!empty($content['attachment_desc']))
<div style="grid-column: 1 / -1;">
<span class="text-xs text-gray-500">첨부서류</span>
<div class="text-sm font-medium mt-0.5">{{ $content['attachment_desc'] }}</div>
</div>
@endif
<div>
<span class="text-xs text-gray-500">일자</span>
<div class="text-sm font-medium mt-0.5">{{ $content['usage_date'] ?? '-' }}</div>
</div>
</div>
</div>
</div>
{{-- 회사 정보 --}}
<div class="border border-gray-200 rounded-lg overflow-hidden">
<div class="bg-gray-50 px-4 py-2 border-b border-gray-200">
<h3 class="text-sm font-semibold text-gray-700">회사 정보</h3>
</div>
<div class="p-4">
<div class="grid gap-3" style="grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));">
<div>
<span class="text-xs text-gray-500">상호</span>
<div class="text-sm font-medium mt-0.5">{{ $content['company_name'] ?? '-' }}</div>
</div>
<div>
<span class="text-xs text-gray-500">사업자등록번호</span>
<div class="text-sm font-medium mt-0.5">{{ $content['business_num'] ?? '-' }}</div>
</div>
<div style="grid-column: 1 / -1;">
<span class="text-xs text-gray-500">주소</span>
<div class="text-sm font-medium mt-0.5">{{ $content['company_address'] ?? '-' }}</div>
</div>
<div>
<span class="text-xs text-gray-500">대표이사</span>
<div class="text-sm font-medium mt-0.5">{{ $content['ceo_name'] ?? '-' }}</div>
</div>
</div>
</div>
</div>
</div>
{{-- 미리보기 모달 --}}
<div id="seal-usage-show-preview-modal" style="display: none;" class="fixed inset-0 z-50">
<div class="absolute inset-0 bg-black/50" onclick="closeSealUsageShowPreview()"></div>
<div class="relative flex items-center justify-center min-h-full p-4">
<div class="bg-white rounded-xl shadow-2xl w-full overflow-hidden relative" style="max-width: 700px;">
<div class="flex items-center justify-between px-5 py-3 border-b border-gray-200 bg-gray-50">
<h3 class="text-base font-semibold text-gray-800">사용인감계 미리보기</h3>
<div class="flex items-center gap-2">
<button type="button" onclick="printSealUsageShowPreview()"
class="px-3 py-1.5 bg-white border border-gray-300 hover:bg-gray-50 rounded-lg text-xs font-medium transition inline-flex items-center gap-1">
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"/>
</svg>
인쇄
</button>
<button type="button" onclick="closeSealUsageShowPreview()"
class="p-1 text-gray-400 hover:text-gray-600 transition">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
</div>
<div class="overflow-y-auto" style="max-height: 80vh;">
<div id="seal-usage-show-preview-content" style="padding: 48px 56px; font-family: 'Pretendard', 'Malgun Gothic', sans-serif;">
</div>
</div>
</div>
</div>
</div>