Merge branch 'feat/cupang-outbound-height'

This commit is contained in:
2026-10-23 16:27:42 +09:00
4 changed files with 18 additions and 3 deletions
+1
View File
@@ -55,6 +55,7 @@
## 밀크런 출고리스트 작성 (팝업 → 드라이브 엑셀 파일, 2026-10-23)
- 첫 화면 "+ 신규 등록" 옆 엑셀색(#217346) 버튼 → 팝업(`index.html` + `static/cupang-outbound.js`).
팝업 높이 850px 고정(화면이 낮으면 화면 - 32px), 넘치면 팝업 안 스크롤, [취소]·[완료] 줄은 맨 아래(`.cpg-ol-box`).
상자 계산 없이 입고센터 여러 곳을 한 번에 **출고리스트 엑셀 파일에만** 적는다 — cupang_db 출고 묶음은 만들지 않는다(달력에 안 보임).
- 대상 파일은 `router._outbound_target` — `CUPANG_OUTBOUND_XLSX_ID`(기본 `DEFAULT_OUTBOUND_XLSX_ID` = `1J74op7lBZOgE27p4R28I3RWsv0EtXdii`),
항상 `drive_xlsx`. `CUPANG_SHEET_ID`(분배 확정 동기화)와 따로라 그게 구글 시트 문서여도 팝업은 엑셀에만 쓴다.
@@ -4,7 +4,7 @@
{# 출고리스트 작성 팝업의 날짜 칸은 프로젝트 화면의 날짜 팝업을 그대로 쓴다 — project.js 는 PJ_LIB_ONLY 로 부품만 #}
<link rel="stylesheet" href="/static/project.css?v=20261022a" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<link rel="stylesheet" href="/static/cupang.css?v=20261023b" />
<link rel="stylesheet" href="/static/cupang.css?v=20261023c" />
<script>window.PJ_LIB_ONLY = true; window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};</script>
{% endblock %}
+7 -2
View File
@@ -1608,7 +1608,12 @@ a.cpg-boxno-dl:hover { background: #1a5c38; border-color: #1a5c38; font-weight:
.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(820px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; gap: 12px; }
/* 높이 850px 고정(화면이 낮으면 화면에 맞춤) — 넘치면 팝업 안에서 스크롤, 버튼 줄은 맨 아래 */
.cpg-ol-box {
width: min(820px, calc(100vw - 32px)); height: min(850px, calc(100vh - 32px)); box-sizing: border-box;
overflow-y: auto; gap: 12px;
}
.cpg-ol-box > * { flex-shrink: 0; }
.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; }
@@ -1641,7 +1646,7 @@ a.cpg-boxno-dl:hover { background: #1a5c38; border-color: #1a5c38; font-weight:
.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; }
.cpg-ol-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: auto; }
.cpg-ol-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* 입고센터 카드 — 센터마다 출고방식·제품·출고 */
.cpg-ol-centers { display: flex; flex-direction: column; gap: 10px; }
+9
View File
@@ -131,6 +131,15 @@ async function addProduct(card, text, qty) {
await page.waitForFunction(() => document.querySelectorAll(".cpg-ol-center-sel option").length === 4);
assert.deepEqual(await c1.locator(".cpg-ol-center-sel option").allInnerTexts(), ["센터 선택", "대구3", "인천32", "+ 직접 입력"]);
assert.ok(await page.locator("#cpg-ol-progress").isHidden(), "처음엔 진행 막대 숨김");
// 팝업 높이 850px 고정, 버튼 줄은 맨 아래(아래 여백 = 안쪽 여백 20px)
const boxH = await page.evaluate(() => {
const box = document.querySelector(".cpg-ol-box").getBoundingClientRect();
const act = document.querySelector(".cpg-ol-actions").getBoundingClientRect();
return { h: box.height, gap: box.bottom - act.bottom };
});
assert.equal(Math.round(boxH.h), 850);
assert.ok(Math.abs(boxH.gap - 20) <= 1, "버튼 줄이 맨 아래 " + boxH.gap);
await page.screenshot({ path: path.join(OUT, "cupang-outbound-open.png") });
// 출고일 → 센터입고일은 다음날로 자동
await pickDate(page, "cpg-ol-ship-date", "2026-10-26");