feat(cupang): 밀크런 출고리스트 작성 팝업 — 구글 시트 출고일 시트 아래에 덧붙임

- 첫 화면 "+ 신규 등록" 옆 엑셀색 버튼 → 작성일·출고일·센터입고일(프로젝트 날짜 팝업),
  입고센터(시트 F열 + 등록 센터, 직접 입력), 출고방식(파렛트/택배), 코드표 검색 제품·수량, 출고, 작업자(기본 핫프렌즈)
- POST /cupang/api/outbound-sheet: 출고일 시트 YYYYMMDD(요일) 맨 아래에 기존 양식으로 추가
  (순번 이어짐·파렛트 배경색), 시트가 없으면 5행 양식째 생성. cupang_db 에는 저장하지 않음
- GET /cupang/api/outbound-sheet/centers: 입고센터 후보(10분 캐시)
- export.build_block 분리(기존 build_table 결과 동일), google_sheets 에 sheet_titles·read_ranges·append_block 추가
- 테스트: pytest(양식·입력 검사·덧붙일 위치·Sheets 요청·실제 앱), Playwright 화면 테스트

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 14:57:43 +09:00
parent 9883971beb
commit e63734c984
11 changed files with 1411 additions and 63 deletions
+43
View File
@@ -1602,3 +1602,46 @@ a.cpg-boxno-dl:hover { background: #1a5c38; border-color: #1a5c38; font-weight:
@media (max-width: 640px) {
.cpg-sales-form { grid-template-columns: minmax(0, 1fr); }
}
/* ── 밀크런 출고리스트 작성 (index.html 팝업 · cupang-outbound.js) ── */
/* 엑셀 초록 버튼 */
.cpg-btn-excel { background: #217346; color: #fff; padding: 8px 16px; }
.cpg-btn-excel:hover { background: #185c37; }
.cpg-btn-excel:disabled { opacity: .6; cursor: default; }
.cpg-ol-box { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; gap: 12px; }
.cpg-ol-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cpg-ol-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cpg-ol-box .erp-input { box-sizing: border-box; }
/* 날짜 칸 = 프로젝트 날짜 버튼. 칸 너비에 맞추고, 지난 날짜도 빨강(마감 지남)으로 칠하지 않는다 */
.cpg-ol-box .pj-date-btn { width: 100%; margin-top: 0; height: 34px; justify-content: flex-start; }
.cpg-ol-box .pj-date-btn.is-overdue { color: var(--color-rich-black); }
.cpg-ol-search { position: relative; }
.cpg-ol-results {
position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px);
margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow-y: auto;
background: var(--color-canvas-white); border: 1px solid var(--color-subtle-ash);
border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.cpg-ol-results[hidden] { display: none; }
.cpg-ol-hit { display: flex; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--color-rich-black); }
.cpg-ol-hit b { flex: 0 0 auto; min-width: 96px; }
.cpg-ol-hit.is-active, .cpg-ol-hit:hover { background: #e8f3ec; }
.cpg-ol-noresult { padding: 8px; font-size: 13px; color: var(--color-midtone-gray); }
.cpg-ol-lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.cpg-ol-lines th { text-align: center; font-weight: 600; background: #dbe9f7; padding: 6px 8px; border: 1px solid var(--color-subtle-ash); }
.cpg-ol-lines td { padding: 4px 8px; border: 1px solid var(--color-subtle-ash); text-align: center; }
.cpg-ol-lines td:nth-child(2) { text-align: left; }
.cpg-ol-lines[hidden] { display: none; }
.cpg-ol-box .cpg-ol-qty { width: 110px; min-width: 0; text-align: right; }
.cpg-ol-lines th:nth-child(1) { width: 120px; }
.cpg-ol-lines th:nth-child(3) { width: 130px; }
.cpg-ol-lines th:nth-child(4) { width: 56px; }
.cpg-ol-center-custom[hidden] { display: none; }
.cpg-ol-empty { margin: 0; }
.cpg-ol-empty[hidden] { display: none; }
.cpg-ol-target { margin: 0; font-size: 12px; }
.cpg-ol-error { margin: 0; font-size: 13px; color: #c22b10; }
.cpg-ol-actions { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 640px) {
.cpg-ol-grid, .cpg-ol-grid-2 { grid-template-columns: minmax(0, 1fr); }
}