feat(malaysia): 입출고 화면 통합 — 낱개(좌)·세트(우) 한 폼, 버튼 하나로 일괄 적용
- /movements/bulk + /movements/set-out-bulk → /movements/apply 단일 엔드포인트 - 낱개는 선택 종류(IN/OUT/ADJUST), 세트는 항상 OUT(BOM 분해) - 2컬럼 그리드 한 폼, "일괄 적용" 버튼 하나 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,14 +5,13 @@
|
||||
{% set active_tab = 'move' %}
|
||||
{% include "malaysia/_nav.html" %}
|
||||
|
||||
<!-- 낱개 입출고 그리드 일괄 -->
|
||||
<div class="erp-card">
|
||||
<div class="cpg-card-head"><h2>입고 / 출고 / 조정 — 낱개 일괄</h2></div>
|
||||
<span class="erp-muted">전체 낱개 아이템에 수량만 입력. 빈칸/0은 제외. IN/OUT 양수, ADJUST는 ±. (세트는 아래에서 출고)</span>
|
||||
<form method="post" action="/malaysia/movements/bulk" style="margin-top:10px;">
|
||||
<input type="hidden" name="warehouse_code" value="{{ selected_wh }}" />
|
||||
<div style="display:flex;gap:10px;flex-wrap:wrap;align-items:end;margin-bottom:10px;">
|
||||
<label class="erp-field"><span>이동 종류</span>
|
||||
<!-- 낱개 + 세트 한 화면 일괄 (버튼 하나) -->
|
||||
<form method="post" action="/malaysia/movements/apply">
|
||||
<input type="hidden" name="warehouse_code" value="{{ selected_wh }}" />
|
||||
|
||||
<div class="erp-card">
|
||||
<div style="display:flex;gap:10px;flex-wrap:wrap;align-items:end;">
|
||||
<label class="erp-field"><span>이동 종류 (낱개)</span>
|
||||
<select class="erp-select" name="movement_type" required>
|
||||
<option value="IN">IN (입고)</option>
|
||||
<option value="OUT">OUT (출고)</option>
|
||||
@@ -27,55 +26,54 @@
|
||||
<label class="erp-field" style="flex:1 1 200px"><span>메모</span>
|
||||
<input class="erp-input" type="text" name="memo" /></label>
|
||||
</div>
|
||||
<div class="erp-table-wrap">
|
||||
<table class="erp-table">
|
||||
<thead><tr><th>Item Code</th><th>Product Name</th><th style="width:140px">Qty</th></tr></thead>
|
||||
<tbody>
|
||||
{% for it in individual_items %}
|
||||
<tr>
|
||||
<td>{{ it.item_code }}</td>
|
||||
<td>{{ it.item_name }}</td>
|
||||
<td><input class="erp-input" type="number" name="qty_{{ it.item_code }}" placeholder="0" style="width:120px" /></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="erp-page-actions" style="margin-top:10px;"><button type="submit" class="erp-btn erp-btn-primary">일괄 등록</button></div>
|
||||
</form>
|
||||
</div>
|
||||
<p class="erp-muted" style="margin:8px 0 0;">낱개는 선택한 종류로, <b>세트는 항상 출고(OUT)</b>로 처리(BOM 분해). 빈칸/0 제외.</p>
|
||||
</div>
|
||||
|
||||
<!-- 세트 출고 그리드 (BOM 분해) -->
|
||||
<div class="erp-card" style="margin-top:16px;">
|
||||
<div class="cpg-card-head"><h2>세트 출고 — BOM 분해 (itemcode_db)</h2></div>
|
||||
<span class="erp-muted">세트 수량 입력 시 set_components 기준으로 구성품별 OUT 자동 생성. 빈칸/0 제외.</span>
|
||||
<form method="post" action="/malaysia/movements/set-out-bulk" style="margin-top:10px;">
|
||||
<input type="hidden" name="warehouse_code" value="{{ selected_wh }}" />
|
||||
<div style="display:flex;gap:10px;flex-wrap:wrap;align-items:end;margin-bottom:10px;">
|
||||
<label class="erp-field"><span>날짜</span>
|
||||
<input class="erp-input" type="date" name="movement_date" value="{{ today }}" required /></label>
|
||||
<label class="erp-field"><span>Ref No</span>
|
||||
<input class="erp-input" type="text" name="ref_no" placeholder="주문번호 등" /></label>
|
||||
<label class="erp-field" style="flex:1 1 200px"><span>메모</span>
|
||||
<input class="erp-input" type="text" name="memo" /></label>
|
||||
<div style="display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;margin-top:16px;">
|
||||
<!-- 좌: 낱개 -->
|
||||
<div class="erp-card">
|
||||
<div class="cpg-card-head"><h2>낱개 아이템</h2></div>
|
||||
<div class="erp-table-wrap" style="margin-top:8px;">
|
||||
<table class="erp-table">
|
||||
<thead><tr><th>Code</th><th>Name</th><th style="width:120px">Qty</th></tr></thead>
|
||||
<tbody>
|
||||
{% for it in individual_items %}
|
||||
<tr>
|
||||
<td>{{ it.item_code }}</td>
|
||||
<td>{{ it.item_name }}</td>
|
||||
<td><input class="erp-input" type="number" name="qty_{{ it.item_code }}" placeholder="—" style="width:100px" /></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="erp-table-wrap">
|
||||
<table class="erp-table">
|
||||
<thead><tr><th>Set Code</th><th>Set Name</th><th style="width:140px">Set Qty (OUT)</th></tr></thead>
|
||||
<tbody>
|
||||
{% for it in set_items %}
|
||||
<tr>
|
||||
<td>{{ it.item_code }}</td>
|
||||
<td>{{ it.item_name }}</td>
|
||||
<td><input class="erp-input" type="number" min="0" name="qty_{{ it.item_code }}" placeholder="0" style="width:120px" /></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 우: 세트 (출고 전용) -->
|
||||
<div class="erp-card">
|
||||
<div class="cpg-card-head"><h2>세트 아이템 — 출고(OUT) · BOM 분해</h2></div>
|
||||
<span class="erp-muted">itemcode_db set_components 기준 구성품별 OUT 자동 생성</span>
|
||||
<div class="erp-table-wrap" style="margin-top:8px;">
|
||||
<table class="erp-table">
|
||||
<thead><tr><th>Set Code</th><th>Set Name</th><th style="width:120px">Qty (OUT)</th></tr></thead>
|
||||
<tbody>
|
||||
{% for it in set_items %}
|
||||
<tr>
|
||||
<td>{{ it.item_code }}</td>
|
||||
<td>{{ it.item_name }}</td>
|
||||
<td><input class="erp-input" type="number" min="0" name="qty_{{ it.item_code }}" placeholder="—" style="width:100px" /></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="erp-page-actions" style="margin-top:10px;"><button type="submit" class="erp-btn erp-btn-primary">세트 출고</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="erp-page-actions" style="margin-top:12px;">
|
||||
<button type="submit" class="erp-btn erp-btn-primary">일괄 적용</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- 이동 이력 -->
|
||||
<div class="erp-card" style="margin-top:16px;">
|
||||
|
||||
Reference in New Issue
Block a user