From 35f849ba0cfe8c85d424725497194f693caa6188 Mon Sep 17 00:00:00 2001 From: king Date: Wed, 2 Sep 2026 16:34:11 +0900 Subject: [PATCH] =?UTF-8?q?feat(cupang):=20=EB=A7=A4=EC=B6=9C=20=ED=91=9C?= =?UTF-8?q?=EC=97=90=20=EA=B7=B8=EB=A3=B9=20=EC=A4=84=EB=AC=B4=EB=8A=AC=20?= =?UTF-8?q?=E2=80=94=20=EC=9E=85=EA=B3=A0=EC=84=BC=ED=84=B0(=EC=84=BC?= =?UTF-8?q?=ED=84=B0=20=EA=B2=80=EC=83=89=20=EC=8B=9C=20=EC=B6=9C=EA=B3=A0?= =?UTF-8?q?=EC=9D=BC)=20=EA=B8=B0=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 연속된 같은 그룹은 같은 배경, 그룹이 바뀌면 배경을 번갈아 칠한다. Co-Authored-By: Claude Opus 5 --- app/modules/cupang/router.py | 11 +++++++++++ app/modules/cupang/templates/cupang/box_calc.html | 2 +- app/modules/cupang/templates/cupang/box_rules.html | 2 +- app/modules/cupang/templates/cupang/index.html | 2 +- app/modules/cupang/templates/cupang/products.html | 2 +- app/modules/cupang/templates/cupang/sales.html | 5 +++-- app/modules/cupang/templates/cupang/view.html | 2 +- app/static/cupang.css | 3 +++ 8 files changed, 22 insertions(+), 7 deletions(-) diff --git a/app/modules/cupang/router.py b/app/modules/cupang/router.py index 095608d..f769665 100644 --- a/app/modules/cupang/router.py +++ b/app/modules/cupang/router.py @@ -619,6 +619,17 @@ async def sales_page(request: Request) -> HTMLResponse: for key in extra: extra[key] += float(w.get(key) or 0) + # 줄무늬 — 기본은 입고센터가 바뀔 때마다, 센터로 검색 중이면 출고일이 바뀔 때마다. + band_key = "ship_date" if filters["center_name"] else "center_name" + band = 0 + prev = None + for row in rows: + value = row.get(band_key) + if prev is not None and value != prev: + band ^= 1 + prev = value + row["band"] = band + totals = _sales_totals(rows) totals.update(extra) totals["net_margin"] = ( diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html index f506468..4f0d1e5 100644 --- a/app/modules/cupang/templates/cupang/box_calc.html +++ b/app/modules/cupang/templates/cupang/box_calc.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/cupang/templates/cupang/box_rules.html b/app/modules/cupang/templates/cupang/box_rules.html index 145db6b..be30608 100644 --- a/app/modules/cupang/templates/cupang/box_rules.html +++ b/app/modules/cupang/templates/cupang/box_rules.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/cupang/templates/cupang/index.html b/app/modules/cupang/templates/cupang/index.html index 78ccb2a..297486c 100644 --- a/app/modules/cupang/templates/cupang/index.html +++ b/app/modules/cupang/templates/cupang/index.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/cupang/templates/cupang/products.html b/app/modules/cupang/templates/cupang/products.html index 71decaf..dec7c9a 100644 --- a/app/modules/cupang/templates/cupang/products.html +++ b/app/modules/cupang/templates/cupang/products.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/cupang/templates/cupang/sales.html b/app/modules/cupang/templates/cupang/sales.html index f41e736..203e610 100644 --- a/app/modules/cupang/templates/cupang/sales.html +++ b/app/modules/cupang/templates/cupang/sales.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} {# 쿠팡 로켓 매출 — 발주 라인별 공급가·원가·물류비·마진 #} @@ -69,7 +69,8 @@ {% for r in rows %} - + {{ r.week_label }} {{ r.seq or '' }} {{ r.po_no }} diff --git a/app/modules/cupang/templates/cupang/view.html b/app/modules/cupang/templates/cupang/view.html index 428ddb5..3fdcb89 100644 --- a/app/modules/cupang/templates/cupang/view.html +++ b/app/modules/cupang/templates/cupang/view.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} {# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #} diff --git a/app/static/cupang.css b/app/static/cupang.css index 8c9970f..93ddfa9 100644 --- a/app/static/cupang.css +++ b/app/static/cupang.css @@ -1553,7 +1553,10 @@ a.cpg-boxno-dl:hover { background: #1a5c38; border-color: #1a5c38; font-weight: color: var(--color-deep-black); text-align: center; white-space: nowrap; } +/* 줄무늬 — 입고센터(센터 검색 중이면 출고일)가 바뀔 때마다 배경 전환 */ +.cpg-sales-table tbody tr.is-band td { background: #eef2f7; } .cpg-sales-table tbody tr:hover td { background: var(--color-ghost-gray); } +.cpg-sales-table tbody tr.is-band:hover td { background: #e2e8f1; } .cpg-sales-mono { font-family: var(--font-geist-mono); color: var(--color-midtone-gray); } .cpg-sales-week { max-width: 150px; overflow: hidden; text-overflow: ellipsis; } .cpg-sales-act { text-align: center; white-space: nowrap; }