867bc510da
- 박스 입수량 폼: 제품명(스냅샷)→제품명, 헤더그리드로 교체해 입력란 겹침 해소
- 입고센터: 추가 폼 슬림화 + 센터 목록 2열 그리드(한 줄/센터)로 압축
- 출고 상세: 완전삭제 버튼 추가(/{id}/hard-delete, 라인 CASCADE). 취소 처리는 outline 로
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
71 lines
3.0 KiB
HTML
71 lines
3.0 KiB
HTML
{% extends "erp_base.html" %}
|
|
|
|
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css" />{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="cpg">
|
|
|
|
<div class="erp-page-actions">
|
|
<a class="erp-btn erp-btn-outline" href="/cupang/">← 달력</a>
|
|
</div>
|
|
|
|
<!-- 추가/수정 (product_code UNIQUE → upsert) -->
|
|
<div class="erp-card cpg-form-card">
|
|
<div class="cpg-card-head">
|
|
<h2>박스 입수량 추가 / 수정</h2>
|
|
<span class="erp-muted">같은 제품코드는 덮어씁니다. 쿠팡박스 1박스당 들어가는 수량.</span>
|
|
</div>
|
|
<form method="post" action="/cupang/box-rules">
|
|
<div class="cpg-header-grid">
|
|
<label class="erp-field"><span>제품코드 *</span>
|
|
<input class="erp-input" type="text" name="product_code" required placeholder="예: MS-1001" /></label>
|
|
<label class="erp-field"><span>제품명</span>
|
|
<input class="erp-input" type="text" name="product_name_snapshot" placeholder="예: 미라네 1호세트" /></label>
|
|
<label class="erp-field"><span>박스명</span>
|
|
<input class="erp-input" type="text" name="box_name" value="쿠팡박스" /></label>
|
|
<label class="erp-field"><span>박스당 입수량 *</span>
|
|
<input class="erp-input" type="number" name="units_per_box" min="1" required /></label>
|
|
<label class="erp-field cpg-full"><span>메모</span>
|
|
<input class="erp-input" type="text" name="memo" /></label>
|
|
</div>
|
|
<div class="erp-page-actions" style="margin-top:12px;">
|
|
<button type="submit" class="erp-btn erp-btn-primary">저장</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- 목록 -->
|
|
<div class="erp-card cpg-form-card">
|
|
<div class="cpg-card-head"><h2>입수량 규칙 ({{ box_rules|length }})</h2></div>
|
|
<div class="erp-table-wrap">
|
|
<table class="erp-table">
|
|
<thead>
|
|
<tr><th>제품코드</th><th>제품명</th><th>박스명</th><th>입수량</th><th>상태</th><th>메모</th><th></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for r in box_rules %}
|
|
<tr {% if not r.active %}style="opacity:.55"{% endif %}>
|
|
<td>{{ r.product_code }}</td>
|
|
<td>{{ r.product_name_snapshot or '—' }}</td>
|
|
<td>{{ r.box_name }}</td>
|
|
<td>{{ r.units_per_box }}</td>
|
|
<td>{% if r.active %}<span class="erp-badge erp-badge-success">활성</span>{% else %}<span class="erp-badge erp-badge-neutral">비활성</span>{% endif %}</td>
|
|
<td>{{ r.memo or '—' }}</td>
|
|
<td>
|
|
{% if r.active %}
|
|
<form method="post" action="/cupang/box-rules/{{ r.id }}/delete" class="cpg-inline-form"
|
|
onsubmit="return confirm('비활성화합니다. 계속할까요?');">
|
|
<button type="submit" class="erp-btn erp-btn-danger">비활성화</button>
|
|
</form>
|
|
{% else %}—{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
{% endblock %}
|