0f4f8cabf0
- 모든 화면 2열, 오른쪽 300x320 달력(프로젝트 달력 모양) — 날짜별 발주·입고, 누르면 목록 - 옵션 → 상품 정보: 그룹(은 함유량·색상 한 번만), 상품별 그룹·색상(마이그레이션 006) - 발주 메일 품목 표에서 색상 있는 품목 줄 배경을 그 색으로(발주 당시 색상 사본) - 옵션 → 담당자 = 아이콘 + 이름, 아래 이메일 - 006 확인을 연결 열기 전에 해 동시 발주에서 연결 풀이 바닥나지 않게 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
2.3 KiB
HTML
34 lines
2.3 KiB
HTML
{# 상태 배지 — 발주서(open·partial·done·over·closed·cancelled) / 품목(none·partial·done·over) #}
|
|
{% macro status_badge(status, label) -%}
|
|
<span class="io-badge io-st-{{ status }}">{{ label }}</span>
|
|
{%- endmacro %}
|
|
|
|
{# 진행률 막대 — 입고 ÷ 발주 #}
|
|
{% macro progress(summary) -%}
|
|
<span class="io-progress" title="입고 {{ '{:,}'.format(summary.received) }} / 발주 {{ '{:,}'.format(summary.ordered) }}">
|
|
<span class="io-progress-bar{% if summary.over %} is-over{% endif %}" style="width:{{ summary.pct }}%"></span>
|
|
</span><span class="io-progress-pct">{{ summary.pct }}%</span>
|
|
{%- endmacro %}
|
|
|
|
{# 날짜 서식 — 2026.10.17(토) / 2026.10.17(토) 15:14 (2026-10-17 요청, 메일·JSON 은 store.fmt_date·fmt_datetime) #}
|
|
{% macro ymd(d) -%}{% if d %}{{ d.strftime('%Y.%m.%d') }}({{ '월화수목금토일'[d.weekday()] }}){% endif %}{%- endmacro %}
|
|
{% macro ymdhm(d) -%}{% if d %}{{ ymd(d) }} {{ d.strftime('%H:%M') }}{% endif %}{%- endmacro %}
|
|
|
|
{# 발주서 상태 — 모든 품목이 입고완료·초과입고면 초록 "✓ 전체 입고 완료"(초과가 있으면 "초과 포함"), 나머지는 상태 배지 #}
|
|
{% macro order_badge(status, label) -%}
|
|
{% if status in ('done', 'over') %}<span class="io-badge io-st-done io-st-all">✓ {{ label }}</span>{% if status == 'over' %}<span class="io-badge-note">초과 포함</span>{% endif %}
|
|
{%- else %}{{ status_badge(status, label) }}{% endif %}
|
|
{%- endmacro %}
|
|
|
|
{# 입고 예정일 — 지났는데 남은 게 있으면 빨강 "지연 N일" #}
|
|
{% macro due(due_date, today, active) -%}
|
|
{% if due_date %}{{ ymd(due_date) }}{% if active and due_date < today %} <span class="io-late">지연 {{ (today - due_date).days }}일</span>{% elif active %} <span class="erp-muted">D-{{ (due_date - today).days }}</span>{% endif %}{% else %}<span class="erp-muted">-</span>{% endif %}
|
|
{%- endmacro %}
|
|
|
|
{% macro n(v) -%}{{ '{:,}'.format(v or 0) }}{%- endmacro %}
|
|
|
|
{# 색상 사각형(006) — 색이 칠해진 네모. 색없음은 빗금 없는 흰 네모 + 테두리. colors = store.COLORS #}
|
|
{% macro swatch(key, colors) -%}
|
|
<i class="io-swatch{% if not colors.get(key or 'none', ('', ''))[1] %} is-none{% endif %}" style="background:{{ colors.get(key or 'none', ('', ''))[1] or '#fff' }}" aria-hidden="true"></i>
|
|
{%- endmacro %}
|