feat(performance): 일자별 표 날짜 mm/dd(요일)·폭 210px, 주문 내역 창 열 제목 고정·취소 표시

- 일자별 × 쇼핑몰: 날짜 "09/01(화)" 형식, 공휴일 이름은 날짜 바로 오른쪽,
  날짜 열 너비 210px 고정
- 주문 내역 창: 열 제목 가운데·굵게·150%(18px), 창을 스크롤해도 위에 고정
- 구분 "취소"는 기울임 + 취소선 + 회색

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 23:52:29 +09:00
parent 643ff25f27
commit bfa55bf367
6 changed files with 21 additions and 10 deletions
+2 -1
View File
@@ -110,7 +110,8 @@ def fmt_md(d: date) -> str:
def day_label(d: date) -> str:
return f"{WEEKDAYS_KO[d.weekday()]} {fmt_md(d)}"
"""일자별 표 날짜 — mm/dd(요일), 예: 09/01(화)."""
return f"{d.month:02d}/{d.day:02d}({WEEKDAYS_KO[d.weekday()]})"
@dataclass
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/performance.css?v=20260930c" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/performance.css?v=20260930d" />{% endblock %}
{%- macro won(v) -%}
{%- if v is none -%}<span class="perf-na"></span>
@@ -239,4 +239,4 @@
} | tojson }}</script>
{% endblock %}
{% block scripts %}<script src="/static/performance.js?v=20260930p" defer></script>{% endblock %}
{% block scripts %}<script src="/static/performance.js?v=20260930q" defer></script>{% endblock %}
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/performance.css?v=20260930c" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/performance.css?v=20260930d" />{% endblock %}
{%- macro when(v) -%}{{ (v or '')[:16] | replace('T', ' ') or '—' }}{%- endmacro -%}
@@ -155,4 +155,4 @@
</section>
{% endblock %}
{% block scripts %}<script src="/static/performance.js?v=20260930p" defer></script>{% endblock %}
{% block scripts %}<script src="/static/performance.js?v=20260930q" defer></script>{% endblock %}
@@ -172,7 +172,7 @@ def test_main_table_week():
cells = _cells_for(days, ["a", "b"])
rows = calc.main_table(p, ["a", "b"], cells, today=date(2026, 9, 30), holidays={"2026-10-03": "개천절"})
assert [r["kind"] for r in rows] == ["day"] * 7 + ["week"]
assert rows[0]["label"] == "월 9/28" and rows[6]["label"] == "일 10/4"
assert rows[0]["label"] == "09/28(월)" and rows[6]["label"] == "10/04(일)"
assert rows[5]["holiday"] == "개천절" and rows[2]["today"] and rows[3]["future"]
week = rows[-1]
assert week["cells"]["a"] == {"gross": 70_000, "commission": 7_000, "net": 63_000}
+11 -2
View File
@@ -109,12 +109,13 @@ a.perf-seg.is-active, a.perf-seg.is-active:link, a.perf-seg.is-active:visited {
.perf-zero { color: #c9c9c9; }
.perf-na::before { content: ""; }
.perf-th-total, .perf-td-total { background: #f6f6f6; font-weight: 600; }
.perf-main .perf-td-label { min-width: 88px; }
/* 날짜 열 너비 고정(210px) — 공휴일 이름이 날짜 오른쪽에 붙는다 */
.perf-main thead th.perf-th-label, .perf-main .perf-td-label { width: 210px; min-width: 210px; max-width: 210px; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
.perf-row-day.is-sat .perf-td-label { color: var(--perf-sat); }
.perf-row-day.is-sun .perf-td-label { color: var(--perf-sun); }
.perf-row-day.is-today .perf-td-label::after { content: "오늘"; margin-left: 6px; font-size: 10px; padding: 0 5px; border-radius: 999px; background: var(--color-deep-black); color: #fff; vertical-align: 1px; }
.perf-row-day.is-future td, .perf-row-month.is-future td, .perf-year tr.is-future td { color: #c9c9c9; }
.perf-hol { display: block; font-size: 10.5px; font-weight: 400; }
.perf-hol { display: inline; margin-left: 6px; font-size: 11px; font-weight: 400; }
.perf-row-week th, .perf-row-week td { background: #f3f3f3; font-weight: 600; border-bottom: 1px solid var(--perf-line); }
.perf-row-week .perf-td-total { background: #e9e9e9; }
.perf-row-total th, .perf-row-total td { background: var(--color-deep-black); color: #fff; font-weight: 600; border-bottom: 0; }
@@ -215,3 +216,11 @@ td.is-link:hover { background: #eef2ff; text-decoration: underline; }
.perf-diff-bad { color: var(--perf-down); font-weight: 600; }
.perf-diff-ok { color: #0f8a3a; }
.perf-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline dotted; cursor: pointer; }
/* 주문 내역 창 — 열 제목은 가운데·굵게·150%, 창을 스크롤해도 위에 고정 */
.perf-ev-wrap { overflow: visible; }
.perf-ev-table thead th, .perf-ev-table thead th.perf-th-label {
text-align: center; font-weight: 700; font-size: 18px; color: var(--color-deep-black, #111);
position: sticky; top: -12px; z-index: 2;
}
.perf-ev-table td.perf-ev-kind-cancel { font-style: italic; text-decoration: line-through; color: #9a9a9a; }
+3 -2
View File
@@ -188,7 +188,8 @@
sum += r.amount;
if (r.amount >= 0) sales += r.amount; else minus += r.amount;
return '<tr class="' + (r.amount < 0 ? "perf-ev-cancel" : "") + '">' +
"<td>" + esc(r.sales_date) + "</td><td>" + esc(KIND[r.event_type] || r.event_type) +
"<td>" + esc(r.sales_date) + "</td><td" + (r.event_type === "CANCEL" ? ' class="perf-ev-kind-cancel"' : "") + ">" +
esc(KIND[r.event_type] || r.event_type) +
(r.is_sample ? ' <span class="perf-pill">테스트</span>' : "") + "</td>" +
"<td>" + esc(r.external_order_id) + "</td>" +
"<td>" + esc(r.product_name) + (r.option_name ? " <span class='perf-muted'>" + esc(r.option_name) + "</span>" : "") + "</td>" +
@@ -198,7 +199,7 @@
"<td>" + esc(r.order_status) + "</td></tr>";
}).join("");
m.body.innerHTML =
'<div class="erp-table-wrap"><table class="perf-table"><thead><tr>' +
'<div class="perf-ev-wrap"><table class="perf-table perf-ev-table"><thead><tr>' +
'<th class="perf-th-label">매출일</th><th class="perf-th-label">구분</th><th class="perf-th-label">주문번호</th>' +
'<th class="perf-th-label">상품명</th><th>수량</th><th>금액</th><th class="perf-th-label">주문일</th>' +
'<th class="perf-th-label">결제일</th><th class="perf-th-label">상태</th></tr></thead><tbody>' + body +