Files
tk-factory-services/tkpurchase/web/daylabor.html
Hyungi Ahn 46a1f8310d fix(cache): tkds→tkfb 변경 후 전 서비스 캐시 버스팅 갱신
tkfb-core.js v=2026040104, tksupport/tksafety/tkpurchase/tkuser-core.js,
system2 api-base.js, system3 app.js 캐시 버스팅 일괄 갱신.
브라우저 캐시에 남은 구버전(tkds 리다이렉트) 강제 갱신.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:31:14 +09:00

156 lines
8.9 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/tkpurchase.css?v=2026031602">
</head>
<body>
<!-- Header -->
<header class="bg-emerald-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">
<button id="mobileMenuBtn" onclick="toggleMobileMenu()" class="lg:hidden text-emerald-200 hover:text-white">
<i class="fas fa-bars text-xl"></i>
</button>
<i class="fas fa-truck text-xl text-emerald-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-emerald-600 rounded-full flex items-center justify-center text-sm font-semibold">-</div>
<button onclick="doLogout()" class="text-emerald-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-4 mb-5">
<div class="flex flex-wrap items-end gap-3 filter-bar">
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">시작일</label>
<input type="date" id="filterDateFrom" class="input-field px-3 py-2 rounded-lg text-sm">
</div>
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">종료일</label>
<input type="date" id="filterDateTo" class="input-field px-3 py-2 rounded-lg text-sm">
</div>
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">상태</label>
<select id="filterStatus" class="input-field px-3 py-2 rounded-lg text-sm">
<option value="">전체</option>
<option value="pending">대기</option>
<option value="approved">승인</option>
<option value="rejected">거절</option>
<option value="completed">완료</option>
</select>
</div>
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">부서</label>
<select id="filterDepartment" class="input-field px-3 py-2 rounded-lg text-sm">
<option value="">전체</option>
<option value="생산">생산</option>
<option value="품질">품질</option>
<option value="구매">구매</option>
<option value="설계">설계</option>
<option value="영업">영업</option>
</select>
</div>
<div class="filter-actions">
<button onclick="loadDayLabor()" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm hover:bg-gray-200">
<i class="fas fa-search mr-1"></i>조회
</button>
<button onclick="openAddDayLabor()" class="px-4 py-2 bg-emerald-600 text-white rounded-lg text-sm hover:bg-emerald-700 font-medium">
<i class="fas fa-plus mr-1"></i>일용공 신청
</button>
</div>
</div>
</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-hard-hat text-amber-500 mr-2"></i>일용공 신청 목록
</h2>
<div class="overflow-x-auto">
<table class="visit-table">
<thead>
<tr>
<th>신청일</th>
<th>작업일</th>
<th>신청자</th>
<th class="hide-mobile">부서</th>
<th class="text-center">인원</th>
<th>작업장</th>
<th>상태</th>
<th class="text-right">관리</th>
</tr>
</thead>
<tbody id="dayLaborTableBody">
<tr><td colspan="8" class="text-center text-gray-400 py-8">로딩 중...</td></tr>
</tbody>
</table>
</div>
<!-- 페이지네이션 -->
<div id="dayLaborPagination" class="flex justify-center items-center gap-2 mt-4"></div>
</div>
</div>
</div>
</div>
<!-- 신청 모달 -->
<div id="addDayLaborModal" class="hidden modal-overlay" onclick="if(event.target===this)closeAddDayLabor()">
<div class="modal-content p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold">일용공 신청</h3>
<button onclick="closeAddDayLabor()" class="text-gray-400 hover:text-gray-600"><i class="fas fa-times"></i></button>
</div>
<form id="addDayLaborForm" onsubmit="submitAddDayLabor(event)">
<div class="space-y-3">
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">작업일 <span class="text-red-400">*</span></label>
<input type="date" id="addWorkDate" 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="number" id="addWorkerCount" min="1" value="1" 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">작업내용</label>
<textarea id="addWorkDescription" rows="3" class="input-field w-full px-3 py-2 rounded-lg text-sm" placeholder="작업 내용을 입력하세요"></textarea>
</div>
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">작업장</label>
<input type="text" id="addWorkplaceName" class="input-field w-full px-3 py-2 rounded-lg text-sm" placeholder="작업 장소">
</div>
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">비고</label>
<textarea id="addNotes" rows="2" class="input-field w-full px-3 py-2 rounded-lg text-sm" placeholder="추가 사항"></textarea>
</div>
</div>
<div class="flex justify-end mt-4 gap-2">
<button type="button" onclick="closeAddDayLabor()" class="px-4 py-2 border rounded-lg text-sm hover:bg-gray-50">취소</button>
<button type="submit" class="px-4 py-2 bg-emerald-600 text-white rounded-lg text-sm hover:bg-emerald-700">신청</button>
</div>
</form>
</div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026040101"></script>
<script src="/static/js/tkpurchase-daylabor.js?v=2026031601"></script>
<script>initDayLaborPage();</script>
</body>
</html>