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:
|
||||
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"] = (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% 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 %}
|
||||
<section class="cpg">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% 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 %}
|
||||
<section class="cpg">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% 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 %}
|
||||
<section class="cpg">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% 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 %}
|
||||
<section class="cpg">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% 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 %}
|
||||
{# 쿠팡 로켓 매출 — 발주 라인별 공급가·원가·물류비·마진 #}
|
||||
@@ -69,7 +69,8 @@
|
||||
</thead>
|
||||
<tbody id="cpg-sales-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-calc-num">{{ r.seq or '' }}</td>
|
||||
<td class="cpg-sales-mono">{{ r.po_no }}</td>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% 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 %}
|
||||
{# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #}
|
||||
|
||||
Reference in New Issue
Block a user