From 1d3b97c8fc00fce52929c71ff74b8e35a5aca9b0 Mon Sep 17 00:00:00 2001 From: king Date: Mon, 22 Jun 2026 15:47:32 +0900 Subject: [PATCH] =?UTF-8?q?feat(dispatch):=20=ED=95=9C=EA=B8=80/=EC=98=81?= =?UTF-8?q?=EB=AC=B8=20=ED=86=A0=EA=B8=80(=EB=A7=90=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=8B=9C=EC=95=84=20=EC=A7=81=EC=9B=90=EC=9A=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - _nav 에 KO/EN 토글 버튼 + 공용 JS(data-ko/data-en 텍스트, data-*-ph placeholder 교체, localStorage 저장 → 전 페이지 공통, dsp:lang 이벤트 발행) - batches/new/detail/picking/handover 정적 라벨 이중언어화 - 동적 텍스트도 언어 반영: 완료 N/M 라벨, 일괄 토글 확인창, 업로드 안내/파일 라벨 - 카드 작업 버튼은 기존대로 한/영 동시 표기 유지 Co-Authored-By: Claude Opus 4.8 --- .../dispatch/templates/dispatch/_nav.html | 61 +++++++++++++++++-- .../dispatch/templates/dispatch/batches.html | 26 ++++---- .../dispatch/templates/dispatch/detail.html | 45 ++++++++++---- .../dispatch/templates/dispatch/handover.html | 16 ++--- .../dispatch/templates/dispatch/new.html | 53 ++++++++++------ .../dispatch/templates/dispatch/picking.html | 14 +++-- 6 files changed, 154 insertions(+), 61 deletions(-) diff --git a/app/modules/dispatch/templates/dispatch/_nav.html b/app/modules/dispatch/templates/dispatch/_nav.html index 5f7d629..6905ee7 100644 --- a/app/modules/dispatch/templates/dispatch/_nav.html +++ b/app/modules/dispatch/templates/dispatch/_nav.html @@ -1,12 +1,61 @@ -{# 말레이시아 배송 공용 상단 바: 목록/업로드 + (배치 진입 시) 작업/피킹/전달 서브탭 #} +{# 말레이시아 배송 공용 상단 바: 목록/업로드 + (배치 진입 시) 작업/피킹/전달 서브탭 + + 한글/영문 토글(localStorage 저장, 전 페이지 공통). #} + + diff --git a/app/modules/dispatch/templates/dispatch/batches.html b/app/modules/dispatch/templates/dispatch/batches.html index 10a3972..dd3216e 100644 --- a/app/modules/dispatch/templates/dispatch/batches.html +++ b/app/modules/dispatch/templates/dispatch/batches.html @@ -6,17 +6,19 @@
-

출고 배치 ({{ batches|length }})

- + 새 업로드 +

출고 배치 ({{ batches|length }})

+ + 새 업로드
- - - - + + + + + + @@ -33,21 +35,21 @@ {% endfor %} {% if not batches %} - + {% endif %}
날짜플랫폼배치명박스완료생성시각날짜플랫폼배치명박스완료생성시각
{{ b.created_at }} - 작업 - 피킹 - 전달 - 다운로드 + 작업 + 피킹 + 전달 + 다운로드 {% if is_super %}
- +
{% endif %}
아직 출고 배치가 없습니다. 새 업로드로 시작하세요.
아직 출고 배치가 없습니다. 위 + 새 업로드로 시작하세요.
diff --git a/app/modules/dispatch/templates/dispatch/detail.html b/app/modules/dispatch/templates/dispatch/detail.html index f703596..1968728 100644 --- a/app/modules/dispatch/templates/dispatch/detail.html +++ b/app/modules/dispatch/templates/dispatch/detail.html @@ -50,22 +50,27 @@
-

출고 작업 — 박스 {{ parcels|length }}개

- 완료 {{ done_count }} / {{ parcels|length }} +

출고 작업 · 박스 {{ parcels|length }}

+ 완료 {{ done_count }} / {{ parcels|length }}
- - - - + + + +
- - + +
@@ -101,7 +106,7 @@ {% for it in p['items'] %}
  • {{ it.seller_sku }} × {{ it.quantity }}
  • {% else %} -
  • 상품 없음
  • +
  • 상품 없음
  • {% endfor %}
    @@ -132,7 +137,10 @@ var BATCH_ID = document.querySelector('.dsp').getAttribute('data-batch'); // ── 일괄 토글 처리 (전부 완료면 해제, 아니면 완료) ── - var BULK_LABELS = { label_attached: '라벨 부착', handed_to_kagayaku: 'Kagayaku 전달' }; + var BULK_LABELS = { + ko: { label_attached: '라벨 부착', handed_to_kagayaku: 'Kagayaku 전달' }, + en: { label_attached: 'Label Attached', handed_to_kagayaku: 'Kagayaku Handover' }, + }; function allOn(field) { var cards = document.querySelectorAll('.dsp-card'); @@ -151,8 +159,12 @@ window.dspBulk = function (btn, field) { var target = !allOn(field); // 전부 완료면 해제, 아니면 완료 - var verb = target ? '완료로 표시' : '완료 해제'; - if (!confirm('이 배치의 모든 박스를 "' + (BULK_LABELS[field] || field) + '" ' + verb + '할까요?')) return; + var en = (window.dspLang && window.dspLang() === 'en'); + var label = BULK_LABELS[en ? 'en' : 'ko'][field] || field; + var msg = en + ? ('Set ALL boxes "' + label + '" to ' + (target ? 'done' : 'not done') + '?') + : ('이 배치의 모든 박스를 "' + label + '" ' + (target ? '완료로 표시' : '완료 해제') + '할까요?'); + if (!confirm(msg)) return; document.querySelectorAll('.dsp-bulk button').forEach(function (b) { b.disabled = true; }); var body = new URLSearchParams(); body.set('field', field); @@ -207,9 +219,16 @@ var cards = document.querySelectorAll('.dsp-card'); var done = document.querySelectorAll('.dsp-card.is-done').length; var label = document.getElementById('dsp-done-label'); - if (label) label.textContent = '완료 ' + done + ' / ' + cards.length; + if (!label) return; + label.setAttribute('data-done', done); + label.setAttribute('data-total', cards.length); + var prefix = (window.dspLang && window.dspLang() === 'en') ? 'Done ' : '완료 '; + label.textContent = prefix + done + ' / ' + cards.length; } + // 언어 변경 시 동적 라벨(완료 N/M) 다시 그림. + document.addEventListener('dsp:lang', updateDoneLabel); + // ── 필터 ── var currentFilter = 'all'; function matchesFilter(card) { diff --git a/app/modules/dispatch/templates/dispatch/handover.html b/app/modules/dispatch/templates/dispatch/handover.html index a10c8b4..c181482 100644 --- a/app/modules/dispatch/templates/dispatch/handover.html +++ b/app/modules/dispatch/templates/dispatch/handover.html @@ -24,24 +24,25 @@ {% include "dispatch/_nav.html" %}
    - +
    -

    Kagayaku 전달 리스트

    +

    Kagayaku 전달 리스트

    {{ batch.batch_name or 'TikTok 출고' }}

    - 날짜 {{ batch.dispatch_date }} · 플랫폼 {{ batch.platform }} + 날짜 {{ batch.dispatch_date }} · + 플랫폼 {{ batch.platform }}

    {{ handover.total_boxes }}
    -
    총 박스 수
    +
    총 박스 수
    {% for pv in handover.by_provider %}
    @@ -53,11 +54,12 @@ {% endfor %}
    -

    Tracking ID 목록 ({{ handover.tracking_list|length }})

    +

    Tracking ID 목록 ({{ handover.tracking_list|length }})

    - + + {% for t in handover.tracking_list %} @@ -69,7 +71,7 @@ {% endfor %} {% if not handover.tracking_list %} - + {% endif %}
    NoTracking ID배송사Order ID
    NoTracking ID배송사Order ID
    전달할 박스가 없습니다.
    전달할 박스가 없습니다.
    diff --git a/app/modules/dispatch/templates/dispatch/new.html b/app/modules/dispatch/templates/dispatch/new.html index 707fbcf..f9a0a96 100644 --- a/app/modules/dispatch/templates/dispatch/new.html +++ b/app/modules/dispatch/templates/dispatch/new.html @@ -5,17 +5,17 @@ {% include "dispatch/_nav.html" %}
    -

    출고 파일 업로드

    +

    출고 파일 업로드

    - - 취소 + + 취소
    @@ -51,27 +54,43 @@ {% block scripts %} diff --git a/app/modules/dispatch/templates/dispatch/picking.html b/app/modules/dispatch/templates/dispatch/picking.html index 709acec..ca22a49 100644 --- a/app/modules/dispatch/templates/dispatch/picking.html +++ b/app/modules/dispatch/templates/dispatch/picking.html @@ -13,25 +13,27 @@
    -

    피킹 요약 (SKU별 총 수량)

    - 총 {{ total_qty }}개 · {{ summary|length }} SKU +

    피킹 요약 (SKU별 총 수량)

    + {{ total_qty }} · {{ summary|length }} SKU
    -

    이 화면을 보고 먼저 전체 상품을 꺼내세요.

    +

    이 화면을 보고 먼저 전체 상품을 꺼내세요.

    - + + {% for r in summary %} - + {% endfor %} {% if not summary %} - + {% endif %}
    Seller SKU상품명수량
    Seller SKU상품명수량
    {{ r.seller_sku }} {{ r.product_name or '—' }}{{ r.total_qty }}개{{ r.total_qty }}
    피킹할 상품이 없습니다.
    피킹할 상품이 없습니다.