feat(cupang): 매출 표에 그룹 줄무늬 — 입고센터(센터 검색 시 출고일) 기준
연속된 같은 그룹은 같은 배경, 그룹이 바뀌면 배경을 번갈아 칠한다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -619,6 +619,17 @@ async def sales_page(request: Request) -> HTMLResponse:
|
|||||||
for key in extra:
|
for key in extra:
|
||||||
extra[key] += float(w.get(key) or 0)
|
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 = _sales_totals(rows)
|
||||||
totals.update(extra)
|
totals.update(extra)
|
||||||
totals["net_margin"] = (
|
totals["net_margin"] = (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904d" />{% endblock %}
|
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904e" />{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="cpg">
|
<section class="cpg">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904d" />{% endblock %}
|
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904e" />{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="cpg">
|
<section class="cpg">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904d" />{% endblock %}
|
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904e" />{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="cpg">
|
<section class="cpg">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904d" />{% endblock %}
|
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904e" />{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="cpg">
|
<section class="cpg">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904d" />{% endblock %}
|
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904e" />{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{# 쿠팡 로켓 매출 — 발주 라인별 공급가·원가·물류비·마진 #}
|
{# 쿠팡 로켓 매출 — 발주 라인별 공급가·원가·물류비·마진 #}
|
||||||
@@ -69,7 +69,8 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody id="cpg-sales-rows">
|
<tbody id="cpg-sales-rows">
|
||||||
{% for r in rows %}
|
{% for r in rows %}
|
||||||
<tr data-id="{{ r.id }}" data-row='{{ r | tojson }}'>
|
<tr data-id="{{ r.id }}" data-row='{{ r | tojson }}'
|
||||||
|
class="{% if r.band %}is-band{% endif %}">
|
||||||
<td class="cpg-sales-week" title="{{ r.week_label }}">{{ r.week_label }}</td>
|
<td class="cpg-sales-week" title="{{ r.week_label }}">{{ r.week_label }}</td>
|
||||||
<td class="cpg-calc-num">{{ r.seq or '' }}</td>
|
<td class="cpg-calc-num">{{ r.seq or '' }}</td>
|
||||||
<td class="cpg-sales-mono">{{ r.po_no }}</td>
|
<td class="cpg-sales-mono">{{ r.po_no }}</td>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904d" />{% endblock %}
|
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260904e" />{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #}
|
{# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #}
|
||||||
|
|||||||
@@ -1553,7 +1553,10 @@ a.cpg-boxno-dl:hover { background: #1a5c38; border-color: #1a5c38; font-weight:
|
|||||||
color: var(--color-deep-black);
|
color: var(--color-deep-black);
|
||||||
text-align: center; white-space: nowrap;
|
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: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-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-week { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
|
||||||
.cpg-sales-act { text-align: center; white-space: nowrap; }
|
.cpg-sales-act { text-align: center; white-space: nowrap; }
|
||||||
|
|||||||
Reference in New Issue
Block a user