From bfa55bf367e2aaf38807d4bca12a363bc4b215b2 Mon Sep 17 00:00:00 2001 From: king Date: Tue, 29 Sep 2026 23:52:29 +0900 Subject: [PATCH] =?UTF-8?q?feat(performance):=20=EC=9D=BC=EC=9E=90?= =?UTF-8?q?=EB=B3=84=20=ED=91=9C=20=EB=82=A0=EC=A7=9C=20mm/dd(=EC=9A=94?= =?UTF-8?q?=EC=9D=BC)=C2=B7=ED=8F=AD=20210px,=20=EC=A3=BC=EB=AC=B8=20?= =?UTF-8?q?=EB=82=B4=EC=97=AD=20=EC=B0=BD=20=EC=97=B4=20=EC=A0=9C=EB=AA=A9?= =?UTF-8?q?=20=EA=B3=A0=EC=A0=95=C2=B7=EC=B7=A8=EC=86=8C=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 일자별 × 쇼핑몰: 날짜 "09/01(화)" 형식, 공휴일 이름은 날짜 바로 오른쪽, 날짜 열 너비 210px 고정 - 주문 내역 창: 열 제목 가운데·굵게·150%(18px), 창을 스크롤해도 위에 고정 - 구분 "취소"는 기울임 + 취소선 + 회색 Co-Authored-By: Claude Opus 5.5 --- app/modules/performance/calc.py | 3 ++- .../performance/templates/performance/index.html | 4 ++-- .../performance/templates/performance/settings.html | 4 ++-- app/modules/performance/tests/test_performance.py | 2 +- app/static/performance.css | 13 +++++++++++-- app/static/performance.js | 5 +++-- 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/app/modules/performance/calc.py b/app/modules/performance/calc.py index 16d5617..c430e3e 100644 --- a/app/modules/performance/calc.py +++ b/app/modules/performance/calc.py @@ -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 diff --git a/app/modules/performance/templates/performance/index.html b/app/modules/performance/templates/performance/index.html index ece17db..a7e0148 100644 --- a/app/modules/performance/templates/performance/index.html +++ b/app/modules/performance/templates/performance/index.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {%- macro won(v) -%} {%- if v is none -%} @@ -239,4 +239,4 @@ } | tojson }} {% endblock %} -{% block scripts %}{% endblock %} +{% block scripts %}{% endblock %} diff --git a/app/modules/performance/templates/performance/settings.html b/app/modules/performance/templates/performance/settings.html index 26de82c..99e7a08 100644 --- a/app/modules/performance/templates/performance/settings.html +++ b/app/modules/performance/templates/performance/settings.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {%- macro when(v) -%}{{ (v or '')[:16] | replace('T', ' ') or '—' }}{%- endmacro -%} @@ -155,4 +155,4 @@ {% endblock %} -{% block scripts %}{% endblock %} +{% block scripts %}{% endblock %} diff --git a/app/modules/performance/tests/test_performance.py b/app/modules/performance/tests/test_performance.py index f4cb766..bd9389b 100644 --- a/app/modules/performance/tests/test_performance.py +++ b/app/modules/performance/tests/test_performance.py @@ -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} diff --git a/app/static/performance.css b/app/static/performance.css index 2bf3cfb..d6ed4bc 100644 --- a/app/static/performance.css +++ b/app/static/performance.css @@ -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; } diff --git a/app/static/performance.js b/app/static/performance.js index dc19c62..2a74e43 100644 --- a/app/static/performance.js +++ b/app/static/performance.js @@ -188,7 +188,8 @@ sum += r.amount; if (r.amount >= 0) sales += r.amount; else minus += r.amount; return '' + - "" + esc(r.sales_date) + "" + esc(KIND[r.event_type] || r.event_type) + + "" + esc(r.sales_date) + "" + + esc(KIND[r.event_type] || r.event_type) + (r.is_sample ? ' 테스트' : "") + "" + "" + esc(r.external_order_id) + "" + "" + esc(r.product_name) + (r.option_name ? " " + esc(r.option_name) + "" : "") + "" + @@ -198,7 +199,7 @@ "" + esc(r.order_status) + ""; }).join(""); m.body.innerHTML = - '
' + + '
' + '' + '' + '' + body +
매출일구분주문번호상품명수량금액주문일결제일상태