카카오톡 인앱 WebView는 서브도메인 간 쿠키를 공유하지 않아 tkds에서 로그인 후 tkfb로 리다이렉트 시 인증이 풀리는 문제. - sso-relay.js: URL hash의 _sso= 토큰을 로컬 쿠키+localStorage로 설정 - gateway dashboard: 로그인 후 redirect URL에 #_sso=<token> 추가 - 전 서비스 HTML: core JS 직전에 sso-relay.js 로드 (81개 파일) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
143 lines
7.1 KiB
HTML
143 lines
7.1 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/tkfb.css?v=2026040103">
|
|
</head>
|
|
<body class="bg-gray-50">
|
|
<header class="bg-orange-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" class="lg:hidden text-orange-200 hover:text-white"><i class="fas fa-bars text-xl"></i></button>
|
|
<i class="fas fa-industry text-xl text-orange-200"></i>
|
|
<h1 class="text-lg font-semibold">TK 공장관리</h1>
|
|
</div>
|
|
<div class="flex items-center gap-4">
|
|
<span id="headerUserName" class="text-sm hidden sm:block">-</span>
|
|
<div id="headerUserAvatar" class="w-8 h-8 bg-orange-600 rounded-full flex items-center justify-center text-sm font-bold">-</div>
|
|
<button onclick="doLogout()" class="text-orange-200 hover:text-white" title="로그아웃"><i class="fas fa-sign-out-alt"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div id="mobileOverlay" class="hidden fixed inset-0 bg-black/50 z-30 lg:hidden"></div>
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 fade-in">
|
|
<div class="flex gap-6">
|
|
<nav id="sideNav" class="hidden lg:flex flex-col gap-1 w-52 flex-shrink-0 pt-2 fixed lg:static z-40 bg-white lg:bg-transparent p-4 lg:p-0 rounded-lg lg:rounded-none shadow-lg lg:shadow-none top-14 left-0 bottom-0 overflow-y-auto"></nav>
|
|
<div class="flex-1 min-w-0">
|
|
|
|
<div class="page-header">
|
|
<div class="page-title-section">
|
|
<h1 class="page-title">소모품 분석</h1>
|
|
<p class="page-description">월간 소모품 현황 분석 및 업체별 정산 관리</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 월 선택 + 기준일 전환 -->
|
|
<div class="flex items-center gap-3 mb-6 flex-wrap">
|
|
<input type="month" id="paMonth" class="px-3 py-2 border rounded-lg text-sm">
|
|
<div class="flex rounded-lg border overflow-hidden text-sm">
|
|
<button id="btnDatePurchase" onclick="setDateBasis('purchase')" class="px-3 py-2 bg-orange-600 text-white">구매일</button>
|
|
<button id="btnDateReceived" onclick="setDateBasis('received')" class="px-3 py-2 bg-white text-gray-600 hover:bg-gray-50">입고일</button>
|
|
</div>
|
|
<button onclick="loadAnalysis()" class="px-4 py-2 bg-orange-600 text-white rounded-lg text-sm hover:bg-orange-700">
|
|
<i class="fas fa-search mr-1"></i>조회
|
|
</button>
|
|
</div>
|
|
|
|
<!-- 분류별 요약 카드 -->
|
|
<div id="paCategorySummary" class="grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
|
|
<div class="bg-white rounded-xl shadow-sm p-4 text-center text-gray-400 col-span-4">월을 선택하고 조회해주세요</div>
|
|
</div>
|
|
|
|
<!-- 업체별 요약 -->
|
|
<div class="bg-white rounded-xl shadow-sm p-5 mb-6">
|
|
<h2 class="text-base font-semibold text-gray-800 mb-4"><i class="fas fa-building text-orange-500 mr-2"></i>업체별 요약</h2>
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full text-sm">
|
|
<thead class="bg-gray-50 text-gray-600 text-xs uppercase">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left">업체</th>
|
|
<th class="px-4 py-3 text-right">건수</th>
|
|
<th class="px-4 py-3 text-right">총액</th>
|
|
<th class="px-4 py-3 text-center">정산</th>
|
|
<th class="px-4 py-3 text-center">액션</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="paVendorSummary" class="divide-y">
|
|
<tr><td colspan="5" class="px-4 py-8 text-center text-gray-400">-</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 상세 구매 목록 -->
|
|
<div class="bg-white rounded-xl shadow-sm p-5 mb-6">
|
|
<h2 class="text-base font-semibold text-gray-800 mb-4"><i class="fas fa-list text-orange-500 mr-2"></i>상세 소모품 목록</h2>
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full text-sm">
|
|
<thead class="bg-gray-50 text-gray-600 text-xs uppercase">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left">품목</th>
|
|
<th class="px-4 py-3 text-left">분류</th>
|
|
<th class="px-4 py-3 text-right">수량</th>
|
|
<th class="px-4 py-3 text-right">단가</th>
|
|
<th class="px-4 py-3 text-right">소계</th>
|
|
<th class="px-4 py-3 text-left">업체</th>
|
|
<th class="px-4 py-3 text-left">구매일</th>
|
|
<th class="px-4 py-3 text-left">비고</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="paPurchaseList" class="divide-y">
|
|
<tr><td colspan="8" class="px-4 py-8 text-center text-gray-400">-</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</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-exchange-alt text-orange-500 mr-2"></i>가격 변동 항목</h2>
|
|
<div id="paPriceChanges" class="overflow-x-auto">
|
|
<p class="text-gray-400 text-center py-4 text-sm">-</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 입고 목록 (입고일 기준 모드에서만 표시) -->
|
|
<div id="paReceivedSection" class="hidden bg-white rounded-xl shadow-sm p-5 mt-6">
|
|
<h2 class="text-base font-semibold text-gray-800 mb-4"><i class="fas fa-box-open text-teal-500 mr-2"></i>월간 입고 내역</h2>
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full text-sm">
|
|
<thead class="bg-gray-50 text-gray-600 text-xs uppercase">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left">품목</th>
|
|
<th class="px-4 py-3 text-left">분류</th>
|
|
<th class="px-4 py-3 text-right">수량</th>
|
|
<th class="px-4 py-3 text-right">단가</th>
|
|
<th class="px-4 py-3 text-left">업체</th>
|
|
<th class="px-4 py-3 text-left">입고일</th>
|
|
<th class="px-4 py-3 text-left">보관위치</th>
|
|
<th class="px-4 py-3 text-left">상태</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="paReceivedList" class="divide-y">
|
|
<tr><td colspan="8" class="px-4 py-8 text-center text-gray-400">-</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="/js/sso-relay.js?v=20260401"></script>
|
|
<script src="/static/js/tkfb-core.js?v=2026040105"></script>
|
|
<script src="/static/js/purchase-analysis.js?v=2026040103"></script>
|
|
</body>
|
|
</html>
|