@@ -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 }})
- | No | Tracking ID | 배송사 | Order ID |
+ | No | Tracking ID |
+ 배송사 | Order ID |
{% for t in handover.tracking_list %}
@@ -69,7 +71,7 @@
{% endfor %}
{% if not handover.tracking_list %}
- | 전달할 박스가 없습니다. |
+ | 전달할 박스가 없습니다. |
{% endif %}
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
-
이 화면을 보고 먼저 전체 상품을 꺼내세요.
+
이 화면을 보고 먼저 전체 상품을 꺼내세요.
- | Seller SKU | 상품명 | 수량 |
+ | Seller SKU | 상품명 |
+ 수량 |
{% for r in summary %}
| {{ r.seller_sku }} |
{{ r.product_name or '—' }} |
- {{ r.total_qty }}개 |
+ {{ r.total_qty }} |
{% endfor %}
{% if not summary %}
- | 피킹할 상품이 없습니다. |
+ | 피킹할 상품이 없습니다. |
{% endif %}