From 444f0f95f3b981c7bb7264b4bd2a40232ace636f Mon Sep 17 00:00:00 2001 From: SeongHyun Kim Date: Tue, 7 Apr 2026 17:55:40 +0900 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20POP=20=ED=99=94=EB=A9=B4=EC=84=A4?= =?UTF-8?q?=EC=A0=95=EC=97=90=20=EC=B6=9C=EA=B3=A0=20=EC=9E=A5=EB=B0=94?= =?UTF-8?q?=EA=B5=AC=EB=8B=88=20=ED=95=AD=EB=AA=A9=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - screen_definitions에 7010 (POP_OUTBOUND_CART) 신규 등록 - popSettingsMng SCREEN_GROUPS의 outbound에 outbound-cart 추가 - OutboundCartPage 채번규칙 조회 screen_id를 5 → 7010으로 변경 이로써 POP 설정 페이지에서 출고 장바구니 화면도 미리보기 + 채번규칙 설정 가능 --- frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx | 1 + .../components/pop/hardcoded/outbound/OutboundCartPage.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx b/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx index aa42b1a1..58085f8f 100644 --- a/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx +++ b/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx @@ -121,6 +121,7 @@ const SCREEN_GROUPS: ScreenGroup[] = [ screens: [ { id: "sales-outbound", name: "판매출고", url: "/pop/outbound/sales", settingsKey: "outbound", screenId: 5 }, { id: "outbound-type", name: "출고유형선택", url: "/pop/outbound", settingsKey: "outbound", screenId: 6 }, + { id: "outbound-cart", name: "출고 장바구니", url: "/pop/outbound/cart", settingsKey: "outbound", screenId: 7010 }, ], }, { diff --git a/frontend/components/pop/hardcoded/outbound/OutboundCartPage.tsx b/frontend/components/pop/hardcoded/outbound/OutboundCartPage.tsx index 05fd095f..a54bed23 100644 --- a/frontend/components/pop/hardcoded/outbound/OutboundCartPage.tsx +++ b/frontend/components/pop/hardcoded/outbound/OutboundCartPage.tsx @@ -306,9 +306,10 @@ export function OutboundCartPage() { try { // Generate outbound number at confirm time // POP 화면설정에서 선택한 채번규칙 사용 (없으면 기본) + // 출고 장바구니 전용 screen_id 7010 let finalNumber = ""; try { - const settingsRes: any = await apiClient.get("/screen-management/screens/5/layout-pop").catch(() => null); + const settingsRes: any = await apiClient.get("/screen-management/screens/7010/layout-pop").catch(() => null); const ruleId = settingsRes?.data?.data?.settings?.popConfig?.outbound?.numberingRuleId; const url = ruleId && ruleId !== "__none__" ? `/outbound/generate-number?ruleId=${encodeURIComponent(ruleId)}` From dad8df7b10d836cb1ae377c10f259e852568b18a Mon Sep 17 00:00:00 2001 From: SeongHyun Kim Date: Tue, 7 Apr 2026 18:23:36 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20POP=20=ED=99=94=EB=A9=B4=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20iframe=20=EB=A7=A4=EC=B9=AD=20=E2=80=94=20=EC=A0=95?= =?UTF-8?q?=ED=99=95/=EA=B8=B8=EC=9D=B4=20=EA=B8=B4=20url=20=EC=9A=B0?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제: /pop/outbound/cart 진입 시 startsWith 매칭으로 /pop/outbound(출고유형선택)가 먼저 잡혀 selectedScreen이 잘못 설정됨 해결: 정확 일치 1순위 + url 길이 긴 항목 startsWith 우선 --- .../admin/screenMng/popSettingsMng/page.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx b/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx index 58085f8f..b00c69ad 100644 --- a/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx +++ b/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx @@ -830,13 +830,24 @@ export default function PopSettingsMngPage() { const path = iframeRef.current?.contentWindow?.location.pathname; if (path && path !== lastPath) { setLastPath(path); + // 1순위: 정확 일치, 2순위: 길이 긴 url부터 startsWith 매칭 (구체적 경로 우선) + let bestMatch: ScreenItem | null = null; + let bestUrlLength = -1; for (const group of SCREEN_GROUPS) { - const found = group.screens.find((s) => path === s.url || path.startsWith(s.url + "/")); - if (found) { - setSelectedScreen(found); - break; + for (const s of group.screens) { + if (path === s.url) { + bestMatch = s; + bestUrlLength = Infinity; + break; + } + if (path.startsWith(s.url + "/") && s.url.length > bestUrlLength) { + bestMatch = s; + bestUrlLength = s.url.length; + } } + if (bestUrlLength === Infinity) break; } + if (bestMatch) setSelectedScreen(bestMatch); } } catch { // cross-origin: silently ignore From a7b914407cc8c06321fcb8889eb208379aef4bbb Mon Sep 17 00:00:00 2001 From: SeongHyun Kim Date: Tue, 7 Apr 2026 18:46:18 +0900 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=EC=B1=84=EB=B2=88=EA=B7=9C?= =?UTF-8?q?=EC=B9=99=20=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=9E=85=EA=B3=A0/?= =?UTF-8?q?=EC=B6=9C=EA=B3=A0=20=EC=9E=A5=EB=B0=94=EA=B5=AC=EB=8B=88=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=97=90=EC=84=9C=EB=A7=8C=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SettingField에 showOnlyForScreens 옵션 추가 - 입고번호 채번: inbound-cart에서만 표시 - 출고번호 채번: outbound-cart에서만 표시 - 구매입고/판매출고/유형선택 등 다른 화면에서는 채번 필드 숨김 이로써 채번 설정의 컨텍스트가 명확해짐 --- .../(main)/admin/screenMng/popSettingsMng/page.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx b/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx index b00c69ad..619c3675 100644 --- a/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx +++ b/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx @@ -171,11 +171,12 @@ interface SettingField { options?: { value: string; label: string }[]; fields?: { key: string; label: string; type: string }[]; tableFilter?: string; // numbering-rule용: inbound/outbound 등 + showOnlyForScreens?: string[]; // 특정 화면 ID에서만 표시 (예: ["inbound-cart"]) } const SETTINGS_SCHEMA: Record = { inbound: [ - { key: "numberingRuleId", label: "📋 입고번호 채번규칙", description: "입고 확정 시 사용할 채번규칙을 선택합니다", type: "numbering-rule", tableFilter: "inbound" }, + { key: "numberingRuleId", label: "📋 입고번호 채번규칙", description: "입고 확정 시 사용할 채번규칙을 선택합니다", type: "numbering-rule", tableFilter: "inbound", showOnlyForScreens: ["inbound-cart"] }, { key: "barcodeEnabled", label: "바코드 스캔 (미구현)", description: "바코드/QR 스캔 기능을 사용합니다", type: "toggle" }, { key: "inspectionRequired", label: "검사 필수 (미구현)", description: "입고 시 검사 항목을 필수로 표시합니다", type: "toggle" }, { key: "photoUpload", label: "사진 첨부 (미구현)", description: "입고 확정 시 사진 첨부를 허용합니다", type: "toggle" }, @@ -183,7 +184,7 @@ const SETTINGS_SCHEMA: Record = { { key: "defectSeparation", label: "불량 분리 (미구현)", description: "양품/불량 수량을 분리 입력합니다", type: "toggle" }, ], outbound: [ - { key: "numberingRuleId", label: "📋 출고번호 채번규칙", description: "출고 확정 시 사용할 채번규칙을 선택합니다", type: "numbering-rule", tableFilter: "outbound" }, + { key: "numberingRuleId", label: "📋 출고번호 채번규칙", description: "출고 확정 시 사용할 채번규칙을 선택합니다", type: "numbering-rule", tableFilter: "outbound", showOnlyForScreens: ["outbound-cart"] }, { key: "barcodeEnabled", label: "바코드 스캔 (미구현)", description: "바코드/QR 스캔 기능을 사용합니다", type: "toggle" }, { key: "photoUpload", label: "사진 첨부 (미구현)", description: "출고 시 사진 첨부를 허용합니다", type: "toggle" }, ], @@ -944,7 +945,12 @@ export default function PopSettingsMngPage() { // ---- Current screen schema values ---- const currentSettingsKey = selectedScreen?.settingsKey || "inbound"; - const currentFields = SETTINGS_SCHEMA[currentSettingsKey] || []; + const allFields = SETTINGS_SCHEMA[currentSettingsKey] || []; + // showOnlyForScreens 옵션이 있으면 현재 화면 ID와 일치할 때만 표시 + const currentFields = allFields.filter((f) => { + if (!f.showOnlyForScreens) return true; + return selectedScreen?.id ? f.showOnlyForScreens.includes(selectedScreen.id) : false; + }); const currentValues = (settings.screens as Record>)[currentSettingsKey] || {}; return ( From 126f11354e10f98ebef72615aa3be76bd7c823e8 Mon Sep 17 00:00:00 2001 From: SeongHyun Kim Date: Wed, 8 Apr 2026 09:57:57 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20POP=20=EC=B6=9C=EA=B3=A0=20=ED=99=95?= =?UTF-8?q?=EC=A0=95=20=EC=8B=9C=20outbound=5Fstatus=EB=A5=BC=20'=EC=B6=9C?= =?UTF-8?q?=EA=B3=A0=EC=99=84=EB=A3=8C'=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기존: '대기' 하드코딩 → 출고 확정해도 상태 미갱신 수정: '출고완료'로 → 출고 확정 시 정상 상태 반영 --- frontend/components/pop/hardcoded/outbound/OutboundCartPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/pop/hardcoded/outbound/OutboundCartPage.tsx b/frontend/components/pop/hardcoded/outbound/OutboundCartPage.tsx index a54bed23..32bcc462 100644 --- a/frontend/components/pop/hardcoded/outbound/OutboundCartPage.tsx +++ b/frontend/components/pop/hardcoded/outbound/OutboundCartPage.tsx @@ -344,7 +344,7 @@ export function OutboundCartPage() { customer_name: item.customer_name, source_type: "shipment_instruction_detail", source_id: item.source_id || item.id, - outbound_status: "대기", + outbound_status: "출고완료", })), }; From 71abfebb51fe1e5a4668d90bbdc29755d113e647 Mon Sep 17 00:00:00 2001 From: SeongHyun Kim Date: Wed, 8 Apr 2026 10:04:44 +0900 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20POP=20=EC=9E=85=EA=B3=A0=20=ED=99=95?= =?UTF-8?q?=EC=A0=95=20=EC=8B=9C=20inbound=5Fstatus=EB=A5=BC=20'=EC=9E=85?= =?UTF-8?q?=EA=B3=A0=EC=99=84=EB=A3=8C'=EB=A1=9C=20=EC=A0=84=EB=8B=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기존: inbound_status 미전달 → 백엔드 기본값 '대기' 수정: '입고완료' 명시적 전달 --- frontend/components/pop/hardcoded/inbound/InboundCartPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/components/pop/hardcoded/inbound/InboundCartPage.tsx b/frontend/components/pop/hardcoded/inbound/InboundCartPage.tsx index 06d142c2..d6a90ec3 100644 --- a/frontend/components/pop/hardcoded/inbound/InboundCartPage.tsx +++ b/frontend/components/pop/hardcoded/inbound/InboundCartPage.tsx @@ -350,6 +350,7 @@ export function InboundCartPage() { reference_number: item.purchase_no, supplier_code: item.supplier_code, supplier_name: item.supplier_name, + inbound_status: "입고완료", inspection_status: inspResult?.completed ? "검사완료" : item.inspection_required