ui(cupang): 박스룰 폼 3행 배치 + 목록 컬럼 정리/하드삭제
- 폼: 1행 제품명180/제품코드100, 2행 박스이름/박스당입수량, 3행 메모(전체폭) - 목록 순서 제품명·제품코드·박스명·입수량·메모, 상태열/비활성 제거 - 삭제 버튼=완전삭제(delete_box_rule, 참조 라인 box_rule_id NULL 처리) - 캐시 버전 f Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530e" />{% endblock %}
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530f" />{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cpg">
|
||||
@@ -20,24 +20,30 @@
|
||||
<form method="post" action="/cupang/box-rules">
|
||||
<input type="hidden" name="product_name_snapshot" id="brule-name-snap" />
|
||||
<div class="cpg-brule-fields">
|
||||
<label class="erp-field"><span>제품명 *</span>
|
||||
<select class="erp-select" id="brule-name" required>
|
||||
<option value="">— 제품명 선택 —</option>
|
||||
{% for p in products %}
|
||||
<option value="{{ p.product_code }}" data-name="{{ p.product_name }}">{{ p.product_name }}</option>
|
||||
{% endfor %}
|
||||
</select></label>
|
||||
<label class="erp-field"><span>제품코드</span>
|
||||
<input class="erp-input" type="text" name="product_code" id="brule-code" required placeholder="자동" /></label>
|
||||
<label class="erp-field"><span>박스이름</span>
|
||||
<input class="erp-input" type="text" name="box_name" value="쿠팡박스" /></label>
|
||||
<label class="erp-field"><span>박스당 입수량 *</span>
|
||||
<span class="cpg-upb-wrap">
|
||||
<input class="erp-input cpg-brule-upb" type="number" name="units_per_box" min="1" required />
|
||||
<span class="cpg-upb-unit">개</span>
|
||||
</span></label>
|
||||
<label class="erp-field cpg-full"><span>메모</span>
|
||||
<input class="erp-input cpg-brule-memo" type="text" name="memo" /></label>
|
||||
<div class="cpg-brule-row">
|
||||
<label class="erp-field"><span>제품명 *</span>
|
||||
<select class="erp-select cpg-brule-name" id="brule-name" required>
|
||||
<option value="">— 제품명 선택 —</option>
|
||||
{% for p in products %}
|
||||
<option value="{{ p.product_code }}" data-name="{{ p.product_name }}">{{ p.product_name }}</option>
|
||||
{% endfor %}
|
||||
</select></label>
|
||||
<label class="erp-field"><span>제품코드</span>
|
||||
<input class="erp-input cpg-brule-code" type="text" name="product_code" id="brule-code" required placeholder="자동" /></label>
|
||||
</div>
|
||||
<div class="cpg-brule-row">
|
||||
<label class="erp-field"><span>박스이름</span>
|
||||
<input class="erp-input cpg-brule-box" type="text" name="box_name" value="쿠팡박스" /></label>
|
||||
<label class="erp-field"><span>박스당 입수량 *</span>
|
||||
<span class="cpg-upb-wrap">
|
||||
<input class="erp-input cpg-brule-upb" type="number" name="units_per_box" min="1" required />
|
||||
<span class="cpg-upb-unit">개</span>
|
||||
</span></label>
|
||||
</div>
|
||||
<div class="cpg-brule-row">
|
||||
<label class="erp-field cpg-brule-memo-field"><span>메모</span>
|
||||
<input class="erp-input cpg-brule-memo" type="text" name="memo" /></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="erp-page-actions" style="margin-top:12px;">
|
||||
<button type="submit" class="erp-btn erp-btn-primary">저장</button>
|
||||
@@ -68,27 +74,27 @@
|
||||
<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>
|
||||
<tr><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>
|
||||
<tr>
|
||||
<td>{{ r.product_name_snapshot or '—' }}</td>
|
||||
<td>{{ r.product_code }}</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>
|
||||
onsubmit="return confirm('이 규칙을 삭제합니다. 계속할까요?');">
|
||||
<button type="submit" class="erp-btn erp-btn-danger">삭제</button>
|
||||
</form>
|
||||
{% else %}—{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% if not box_rules %}
|
||||
<tr><td colspan="6" class="erp-muted">등록된 입수량 규칙이 없습니다.</td></tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530e" />{% endblock %}
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530f" />{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cpg">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530e" />{% endblock %}
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530f" />{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cpg">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530e" />{% endblock %}
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530f" />{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cpg">
|
||||
@@ -118,4 +118,4 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}<script src="/static/cupang.js?v=20260530e" defer></script>{% endblock %}
|
||||
{% block scripts %}<script src="/static/cupang.js?v=20260530f" defer></script>{% endblock %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530e" />{% endblock %}
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530f" />{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cpg">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530e" />{% endblock %}
|
||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260530f" />{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cpg">
|
||||
|
||||
Reference in New Issue
Block a user