feat(dispatch): 말레이시아 TikTok 출고관리 모듈 추가

03_TikTok_Order_Export.xlsx 업로드 → 1박스=1카드 출고 작업 리스트,
SKU 피킹 요약, Kagayaku 전달표(A4 인쇄)를 자동 생성.

- 1박스 묶음 기준: Package ID > Tracking ID > Order ID, 같은 박스 같은 SKU 합산
- 작업 상태 5단계 토글(AJAX 즉시 저장) + dispatch_logs 기록
- 고객 이름/주소/전화 미저장(파싱 시 폐기, 스키마에 컬럼 없음)
- 엑셀은 openpyxl 파싱(pandas 미사용), DB는 dispatch_db 전용
- 인증은 기존 Google OAuth + 신규 권한키 dispatch 재사용
- scripts/sql/dispatch_db_init.sql, docs/DISPATCH_MODULE.md 동봉

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 15:11:43 +09:00
parent 8453c425f8
commit 99eea01fc1
19 changed files with 1868 additions and 0 deletions
@@ -0,0 +1,55 @@
{% extends "erp_base.html" %}
{% block content %}
<section class="dsp">
{% include "dispatch/_nav.html" %}
<div class="erp-card" style="max-width:640px;">
<div class="cpg-card-head"><h2>TikTok 파일 업로드</h2></div>
<p class="erp-muted" style="margin:4px 0 16px;">
03_TikTok_Order_Export.xlsx 만 있으면 출고 리스트가 자동 생성됩니다.
PDF 2개는 보관용(선택)입니다. 고객 이름/주소/전화는 저장하지 않습니다.
</p>
<form method="post" action="/dispatch/batches" enctype="multipart/form-data" style="display:flex;flex-direction:column;gap:14px;">
<label style="display:flex;flex-direction:column;gap:4px;">
<span>출고 날짜 <span style="color:#dc2626;">*</span></span>
<input class="erp-input" type="date" name="dispatch_date" value="{{ today }}" required />
</label>
<label style="display:flex;flex-direction:column;gap:4px;">
<span>플랫폼</span>
<select class="erp-select" name="platform">
<option value="TikTok" selected>TikTok</option>
</select>
</label>
<label style="display:flex;flex-direction:column;gap:4px;">
<span>배치명 <span class="erp-muted">(예: 2026-06-19 TikTok 오전 출고)</span></span>
<input class="erp-input" type="text" name="batch_name" placeholder="오전 출고 / 오후 출고 등으로 구분" />
</label>
<label style="display:flex;flex-direction:column;gap:4px;">
<span>01_Picking_List.pdf <span class="erp-muted">(선택 · 전체 피킹 참고용)</span></span>
<input class="erp-input" type="file" name="picking_pdf" accept="application/pdf" />
</label>
<label style="display:flex;flex-direction:column;gap:4px;">
<span>02_Shipping_Label_Packing_Slip.pdf <span class="erp-muted">(선택 · 실제 포장/라벨 원본)</span></span>
<input class="erp-input" type="file" name="label_pdf" accept="application/pdf" />
</label>
<label style="display:flex;flex-direction:column;gap:4px;">
<span>03_TikTok_Order_Export.xlsx <span style="color:#dc2626;">*</span> <span class="erp-muted">(자동 출고 리스트 기준)</span></span>
<input class="erp-input" type="file" name="order_export"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" required />
</label>
<div style="display:flex;gap:8px;margin-top:8px;">
<button class="erp-btn erp-btn-primary" type="submit">업로드 후 배치 생성</button>
<a class="erp-btn erp-btn-outline" href="/dispatch/">취소</a>
</div>
</form>
</div>
</section>
{% endblock %}