Files
tk-factory-services/tksafety/web/visit-request.html
2026-03-13 13:43:49 +09:00

129 lines
7.5 KiB
HTML

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>출입 신청 - TK 안전관리</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="/static/css/tksafety.css">
</head>
<body>
<!-- Header -->
<header class="bg-blue-700 text-white sticky top-0 z-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-14">
<div class="flex items-center gap-3">
<i class="fas fa-shield-alt text-xl text-blue-200"></i>
<h1 class="text-lg font-semibold">TK 안전관리</h1>
</div>
<div class="flex items-center gap-4">
<div id="headerUserName" class="text-sm font-medium hidden sm:block">-</div>
<div id="headerUserAvatar" class="w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center text-sm font-semibold">-</div>
<button onclick="doLogout()" class="text-blue-200 hover:text-white" title="로그아웃"><i class="fas fa-sign-out-alt"></i></button>
</div>
</div>
</div>
</header>
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 fade-in">
<div class="flex gap-6">
<!-- Sidebar Nav -->
<nav id="sideNav" class="hidden lg:flex flex-col gap-1 w-48 flex-shrink-0 pt-2"></nav>
<!-- Main -->
<div class="flex-1 min-w-0">
<!-- 출입 신청 폼 -->
<div class="bg-white rounded-xl shadow-sm p-5 mb-5">
<h2 class="text-base font-semibold text-gray-800 mb-4"><i class="fas fa-file-signature text-blue-500 mr-2"></i>출입 신청</h2>
<form id="visitRequestForm">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3">
<!-- 업체명 -->
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">업체명 <span class="text-red-400">*</span></label>
<input type="text" id="visitorCompany" class="input-field w-full px-3 py-2 rounded-lg text-sm" placeholder="방문 업체명" required>
</div>
<!-- 인원 -->
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">방문 인원</label>
<input type="number" id="visitorCount" value="1" min="1" class="input-field w-full px-3 py-2 rounded-lg text-sm">
</div>
<!-- 작업장 분류 -->
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">작업장 분류 <span class="text-red-400">*</span></label>
<select id="categoryId" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
<option value="">선택</option>
</select>
</div>
<!-- 작업장 -->
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">작업장 <span class="text-red-400">*</span></label>
<select id="workplaceId" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
<option value="">분류를 먼저 선택하세요</option>
</select>
</div>
<!-- 방문일 -->
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">방문일 <span class="text-red-400">*</span></label>
<input type="date" id="visitDate" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
</div>
<!-- 방문시간 -->
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">방문시간 <span class="text-red-400">*</span></label>
<input type="time" id="visitTime" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
</div>
<!-- 방문 목적 -->
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">방문 목적 <span class="text-red-400">*</span></label>
<select id="purposeId" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
<option value="">선택</option>
</select>
</div>
<!-- 비고 -->
<div class="sm:col-span-2">
<label class="block text-xs font-medium text-gray-600 mb-1">비고</label>
<textarea id="notes" class="input-field w-full px-3 py-2 rounded-lg text-sm" rows="2" placeholder="추가 메모 (선택사항)"></textarea>
</div>
</div>
<div class="flex justify-end mt-4">
<button type="submit" class="px-6 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 text-sm font-medium">
<i class="fas fa-paper-plane mr-2"></i>신청
</button>
</div>
</form>
</div>
<!-- 내 신청 현황 -->
<div class="bg-white rounded-xl shadow-sm p-5">
<h2 class="text-base font-semibold text-gray-800 mb-4"><i class="fas fa-list text-blue-500 mr-2"></i>내 신청 현황</h2>
<div class="overflow-x-auto">
<table class="visit-table">
<thead>
<tr>
<th>신청일</th>
<th>업체</th>
<th class="text-center">인원</th>
<th>작업장</th>
<th>방문일</th>
<th class="hide-mobile">방문시간</th>
<th>목적</th>
<th>상태</th>
<th class="text-right">관리</th>
</tr>
</thead>
<tbody id="myRequestsBody">
<tr><td colspan="9" class="text-center text-gray-400 py-8">로딩 중...</td></tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script src="/static/js/tksafety-core.js"></script>
<script src="/static/js/tksafety-visit-request.js"></script>
<script>initVisitRequestPage();</script>
</body>
</html>