Files
dbx-main/app/modules/malaysia/templates/malaysia/index.html
T
king d2701c2e22 style(malaysia): 콤보 재고 영역 확대·Last Stocktake 열 축소
콤보 카드 420→520px, Last Stocktake 96px 고정, 콤보 숫자열 nowrap·52px → 가로 스크롤 제거.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 11:52:58 +09:00

118 lines
5.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "erp_base.html" %}
{% block head_extra %}
<style>
.mys-compact .erp-table th,
.mys-compact .erp-table td { padding-top:4px; padding-bottom:4px; }
.mys-compact td.nm { white-space:nowrap; }
.mys-compact th.ccol, .mys-compact td.ccol { white-space:nowrap; width:88px; }
/* Last Stocktake 열 좁게(날짜 고정폭) — 콤보 영역에 공간 양보 */
.mys-compact th.stk, .mys-compact td.stk { white-space:nowrap; width:96px; }
/* 콤보 표 숫자열 compact + 줄바꿈 방지 → 가로 스크롤 제거 */
.mys-combo th.num, .mys-combo td.num { white-space:nowrap; width:52px; text-align:right; }
.mys-combo td.nm { white-space:normal; }
</style>
{% endblock %}
{% block content %}
<section class="mys mys-compact">
{% include "malaysia/_i18n.html" %}
{% set active_tab = 'status' %}
{% include "malaysia/_nav.html" %}
<div class="mys-grid" style="display:grid;grid-template-columns:minmax(0,1fr) 520px;gap:16px;align-items:start;">
<!-- 좌: 낱개로 분리된 전체 재고 -->
<div class="erp-card">
<div class="cpg-card-head" style="display:flex;justify-content:space-between;align-items:center;">
<h2><span class="i18n">전산 재고 현황 — 낱개 기준</span> ({{ rows|length }})</h2>
<span class="erp-muted">현재고 = 입고 − 출고 + 조정 + 재고조사반영 (콤보는 낱개로 분해 반영됨)</span>
</div>
<div class="erp-table-wrap">
<table class="erp-table">
<thead>
<tr>
<th class="ccol">Item Code</th><th>Product Name</th>
<th style="text-align:right">전산재고</th>
<th class="stk">Last Stocktake</th>
<th style="text-align:right">조사수량</th>
<th style="text-align:right">차이</th>
</tr>
</thead>
<tbody>
{% for r in rows %}
<tr>
<td class="ccol">{{ r.item_code }}</td>
<td class="nm" data-en="{{ r.item_name }}" data-ko="{{ ko_names.get(r.item_code, r.item_name) }}">{{ r.item_name }}</td>
<td style="text-align:right;font-weight:600;">{{ "{:,}".format(r.current_qty) }}</td>
<td class="stk">{{ r.last_stocktake_date or '—' }}</td>
<td style="text-align:right">{{ "{:,}".format(r.last_qty) if r.last_qty is not none else '—' }}</td>
<td style="text-align:right;font-weight:600;{% if r.diff %}color:#b91c1c;{% endif %}">
{% if r.diff is not none %}{{ "{:+,}".format(r.diff) }}{% else %}—{% endif %}
</td>
</tr>
{% endfor %}
{% if not rows %}
<tr><td colspan="6" class="erp-muted">표시할 재고가 없습니다.</td></tr>
{% endif %}
</tbody>
</table>
</div>
</div>
<!-- 우: 콤보(세트) 단위 재고 -->
<div class="erp-card">
<div class="cpg-card-head"><h2>콤보 재고 (세트 단위)</h2></div>
<span class="erp-muted">
{% if set_stocktake_date %}<span class="i18n">콤보재고 = 재고조사</span>({{ set_stocktake_date }}) <span class="i18n"> 이후 출고</span>{% else %}재고조사 입력 없음{% endif %}
</span>
<div class="erp-table-wrap" style="margin-top:8px;">
<table class="erp-table mys-combo">
<thead><tr>
<th class="ccol">Set Code</th><th>Set Name</th>
<th class="num" data-ko="조사" data-en="Counted">조사</th>
<th class="num" data-ko="출고" data-en="OUT">출고</th>
<th class="num" data-ko="재고" data-en="Stock">재고</th>
</tr></thead>
<tbody>
{% for s in set_rows %}
<tr>
<td class="ccol">{{ s.set_code }}</td>
<td class="nm" data-en="{{ s.set_name }}" data-ko="{{ ko_names.get(s.set_code, s.set_name) }}">{{ s.set_name }}</td>
<td class="num" style="color:#64748b;">{{ "{:,}".format(s.stocktake_qty) }}</td>
<td class="num">{% if s.out_qty %}<span style="color:#b91c1c;">{{ "{:,}".format(s.out_qty) }}</span>{% else %}<span style="color:#94a3b8;"></span>{% endif %}</td>
<td class="num" style="font-weight:600;">{{ "{:,}".format(s.qty) }}</td>
</tr>
{% endfor %}
{% if not set_rows %}
<tr><td colspan="5" class="erp-muted">콤보 재고 입력이 없습니다.</td></tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
{% if is_super %}
<div class="erp-card" style="margin-top:16px;border:1px solid #fecaca;background:#fef2f2;">
<div class="cpg-card-head"><h2 style="color:#b91c1c;">위험 구역 (슈퍼관리자)</h2></div>
<p class="erp-muted" style="margin:4px 0 12px;">
전체 창고의 입출고 이력·재고조사 데이터를 모두 삭제해 재고 수량을 0으로 초기화합니다.
창고/아이템 마스터는 유지됩니다. <strong>되돌릴 수 없습니다.</strong>
</p>
<form method="post" action="/malaysia/reset" onsubmit="return mysConfirmReset()">
<button type="submit" class="erp-btn" style="background:#b91c1c;color:#fff;">재고 초기화</button>
</form>
</div>
<script>
function mysConfirmReset() {
if (!confirm('전체 창고의 입출고 이력과 재고조사 데이터를 모두 삭제합니다.\n재고 수량이 0으로 초기화되며 되돌릴 수 없습니다.\n\n계속하시겠습니까?')) return false;
var t = prompt('정말 초기화하려면 RESET 을 입력하세요.');
if (t !== 'RESET') { alert('초기화가 취소되었습니다.'); return false; }
return true;
}
</script>
{% endif %}
</section>
{% endblock %}