초기화

This commit is contained in:
2026-07-15 18:37:19 +09:00
commit 94abc5461d
1268 changed files with 380198 additions and 0 deletions
+399
View File
@@ -0,0 +1,399 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ChemiFactory 재고 및 자재 관리</title>
<!-- Google Fonts Inter -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<!-- 테마 적용 (base.css보다 먼저 로드해 FOWT 방지) -->
<script src="js/theme.js"></script>
<link rel="stylesheet" href="css/base.css">
<style>
.header-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.search-container {
display: flex;
gap: 12px;
width: 100%;
max-width: 400px;
}
.form-control {
background-color: var(--overlay-hover);
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 10px 16px;
border-radius: 8px;
font-size: 14px;
width: 100%;
transition: all 0.2s ease;
}
.form-control:focus {
outline: none;
border-color: var(--border-focus);
background-color: var(--overlay-strong);
}
.list-table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
.list-table th, .list-table td {
padding: 14px 16px;
border-bottom: 1px solid var(--border-color);
text-align: left;
}
.list-table th {
color: var(--text-secondary);
font-weight: 600;
}
.list-table tr:hover {
background-color: var(--overlay-subtle);
}
/* 탭 구조 */
.tabs-header {
display: flex;
gap: 12px;
border-bottom: 1px solid var(--border-color);
margin-bottom: 24px;
}
.tab-btn {
background: none;
border: none;
color: var(--text-secondary);
padding: 12px 20px;
font-size: 15px;
font-weight: 500;
cursor: pointer;
position: relative;
transition: all 0.2s;
}
.tab-btn:hover {
color: var(--text-primary);
}
.tab-btn.active {
color: var(--accent-blue);
font-weight: 600;
}
.tab-btn.active::after {
content: '';
position: absolute;
bottom: -1px;
left: 0;
right: 0;
height: 2px;
background-color: var(--accent-blue);
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
/* 경고 뱃지 */
.depleted-badge {
background-color: rgba(239, 68, 68, 0.1);
color: var(--accent-red);
border: 1px solid rgba(239, 68, 68, 0.2);
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
}
.active-badge {
background-color: rgba(16, 185, 129, 0.1);
color: var(--accent-green);
border: 1px solid rgba(16, 185, 129, 0.2);
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
}
/* 모달 스타일 */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: var(--modal-backdrop);
backdrop-filter: blur(4px);
align-items: center;
justify-content: center;
}
.modal-content {
background-color: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 24px;
width: 90%;
max-width: 500px;
box-shadow: 0 10px 30px var(--card-shadow);
animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
border-bottom: 1px solid var(--border-color);
padding-bottom: 12px;
}
.modal-title {
font-size: 18px;
font-weight: 700;
}
.close-btn {
font-size: 24px;
background: none;
border: none;
color: var(--text-secondary);
cursor: pointer;
}
.close-btn:hover {
color: var(--text-primary);
}
.form-group {
margin-bottom: 16px;
}
.form-group label {
display: block;
font-size: 13px;
color: var(--text-secondary);
margin-bottom: 6px;
font-weight: 500;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 12px;
margin-top: 24px;
border-top: 1px solid var(--border-color);
padding-top: 16px;
}
.btn-secondary {
background-color: var(--overlay-hover);
color: var(--text-primary);
border: 1px solid var(--border-color);
}
.btn-secondary:hover {
background-color: var(--overlay-strong);
}
</style>
</head>
<body>
<div class="app-container">
<!-- 공통 사이드바 -->
<aside class="sidebar" id="sidebar"></aside>
<!-- 메인 콘텐츠 영역 -->
<main class="main-content">
<header class="content-header">
<div class="page-title">
<h1>재고 및 물성 관리</h1>
<p>자재 물성 데이터 및 원자재 실재고 입출고 상태를 실시간 통합 관리합니다.</p>
</div>
<div class="header-actions" style="display: flex; gap: 12px;">
<button class="btn btn-secondary" id="btn-add-material">+ 자재 규격 추가</button>
<button class="btn btn-primary" id="btn-add-inventory">+ 자재 신규 입고</button>
</div>
</header>
<!-- 탭 헤더 -->
<div class="tabs-header">
<button class="tab-btn active" data-tab="tab-inventory">실재고 현황 이력</button>
<button class="tab-btn" data-tab="tab-materials">자재 기본 규격 (물성)</button>
</div>
<!-- 탭 1: 실재고 입고 및 잔량 현황 -->
<div id="tab-inventory" class="tab-content active card">
<div class="header-row">
<h2 class="section-title" style="margin:0;">재고 원장 목록</h2>
<div class="search-container">
<input type="text" id="search-inventory" class="form-control" placeholder="자재코드, 명칭, 품번 검색...">
</div>
</div>
<div style="overflow-x: auto;">
<table class="list-table">
<thead>
<tr>
<th>입고일자</th>
<th>품명/품번</th>
<th>자재 구분</th>
<th>입고량 (kg)</th>
<th>사용량 (kg)</th>
<th>현재고 (kg)</th>
<th>매입 단가 (원)</th>
<th>공급처</th>
<th>상태</th>
<th>관리</th>
</tr>
</thead>
<tbody id="inventory-list-body">
<tr>
<td colspan="10" style="text-align: center; color: var(--text-muted); padding: 30px 0;">재고 데이터를 로드하고 있습니다...</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 탭 2: 자재 기본 물성 규격 정보 -->
<div id="tab-materials" class="tab-content card">
<div class="header-row">
<h2 class="section-title" style="margin:0;">자재 기준 정보 관리</h2>
<div class="search-container">
<input type="text" id="search-material" class="form-control" placeholder="자재명, 자재코드 검색...">
</div>
</div>
<div style="overflow-x: auto;">
<table class="list-table">
<thead>
<tr>
<th>자재 코드</th>
<th>자재 명칭</th>
<th>자재 구분</th>
<th>밀도 (g/cm³)</th>
<th>상세 비고</th>
<th>관리</th>
</tr>
</thead>
<tbody id="material-list-body">
<tr>
<td colspan="6" style="text-align: center; color: var(--text-muted); padding: 30px 0;">자재 물성 정보를 로드하고 있습니다...</td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
</div>
<!-- 자재 물성 규격 추가/수정 모달 -->
<div id="material-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="material-modal-title">자재 규격 등록</h3>
<button class="close-btn">&times;</button>
</div>
<form id="material-form">
<input type="hidden" id="material-id">
<div class="form-group">
<label for="mat-code">자재 코드 *</label>
<input type="text" id="mat-code" class="form-control" placeholder="예: YRN-CF-12K" required>
</div>
<div class="form-group">
<label for="mat-name">자재 명칭 *</label>
<input type="text" id="mat-name" class="form-control" placeholder="예: 카본원사 12K" required>
</div>
<div class="form-group">
<label for="mat-type">자재 구분 *</label>
<select id="mat-type" class="form-control" required>
<option value="Yarn">원사 (Yarn)</option>
<option value="Bond">본드 (Bond)</option>
<option value="Etc">기타 자재</option>
</select>
</div>
<div class="form-group">
<label for="mat-density">밀도 (Density) *</label>
<input type="number" id="mat-density" step="0.001" class="form-control" placeholder="g/cm³ 단위 수치" required>
</div>
<div class="form-group">
<label for="mat-remarks">비고 설명</label>
<input type="text" id="mat-remarks" class="form-control">
</div>
<div class="modal-actions">
<button type="button" class="btn btn-secondary close-modal-btn">취소</button>
<button type="submit" class="btn btn-primary">저장</button>
</div>
</form>
</div>
</div>
<!-- 재고 입고 추가/수정 모달 -->
<div id="inventory-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="inventory-modal-title">자재 신규 입고 등록</h3>
<button class="close-btn">&times;</button>
</div>
<form id="inventory-form">
<input type="hidden" id="inventory-id">
<div class="form-group">
<label for="inv-material">대상 자재 규격 *</label>
<select id="inv-material" class="form-control" required>
<!-- 자재 규격 리스트 바인딩 -->
</select>
</div>
<div class="form-group">
<label for="inv-supplier">원료 공급처 *</label>
<select id="inv-supplier" class="form-control" required>
<!-- 공급사 리스트 바인딩 -->
</select>
</div>
<div class="form-group">
<label for="inv-date">입고 일자 *</label>
<input type="date" id="inv-date" class="form-control" required>
</div>
<div class="form-group">
<label for="inv-item-name">품명 (입고 세부 명칭)</label>
<input type="text" id="inv-item-name" class="form-control" placeholder="예: 카본 원사 24K A급">
</div>
<div class="form-group">
<label for="inv-item-num">품번 (Lot 번호 / 품격)</label>
<input type="text" id="inv-item-num" class="form-control" placeholder="예: LOT-2026-001">
</div>
<div class="form-group">
<label for="inv-qty">입고 수량 (kg) *</label>
<input type="number" id="inv-qty" step="0.1" class="form-control" min="0.1" required>
</div>
<div class="form-group" id="usage-group" style="display: none;">
<label for="inv-usage">사용 수량 (kg)</label>
<input type="number" id="inv-usage" step="0.1" class="form-control" min="0">
</div>
<div class="form-group">
<label for="inv-cost">매입 단가 (원/kg) *</label>
<input type="number" id="inv-cost" class="form-control" min="1" required>
</div>
<div class="form-group">
<label for="inv-remarks">입고 특이사항 비고</label>
<input type="text" id="inv-remarks" class="form-control">
</div>
<div class="modal-actions">
<button type="button" class="btn btn-secondary close-modal-btn">취소</button>
<button type="submit" class="btn btn-primary">입고 저장</button>
</div>
</form>
</div>
</div>
<!-- 스크립트 연결 -->
<script src="js/common.js"></script>
<script src="js/inventory.js"></script>
</body>
</html>