From 6e5ccca038f8e3a3e9f7d4edcf01822d8c374a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Tue, 10 Feb 2026 19:03:19 +0900 Subject: [PATCH] =?UTF-8?q?fix(WEB):=20=EA=B2=AC=EC=A0=81=E2=86=92?= =?UTF-8?q?=EC=88=98=EC=A3=BC=E2=86=92=EC=83=9D=EC=82=B0=EC=A7=80=EC=8B=9C?= =?UTF-8?q?=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=97=B0=EA=B2=B0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - transformFrontendToApi()에 floor_code/symbol_code 추가 (제품 매핑) - BomCalculationResultItem에 item_id 필드 추가 - transformV2ToApi()에서 견적 저장 시 item_id 전달 (공정 매핑 근본 수정) --- src/components/orders/actions.ts | 2 ++ src/components/quotes/types.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/components/orders/actions.ts b/src/components/orders/actions.ts index 1e005723..c9ef8fb8 100644 --- a/src/components/orders/actions.ts +++ b/src/components/orders/actions.ts @@ -669,6 +669,8 @@ function transformFrontendToApi(data: OrderFormData | Record): supply_amount: supplyAmount, tax_amount: taxAmount, total_amount: supplyAmount + taxAmount, + floor_code: item.type || null, + symbol_code: item.symbol || null, }; }), }; diff --git a/src/components/quotes/types.ts b/src/components/quotes/types.ts index 4a264157..eec74a6f 100644 --- a/src/components/quotes/types.ts +++ b/src/components/quotes/types.ts @@ -409,6 +409,7 @@ export interface BomMaterial { // BOM 계산 결과 아이템 타입 export interface BomCalculationResultItem { + item_id?: number | null; item_code: string; item_name: string; item_category?: string; // 품목 카테고리 @@ -758,6 +759,7 @@ export function transformV2ToApi( // 2. items 생성 (BOM 결과 있으면 자재 상세, 없으면 완제품 기준) let items: Array<{ + item_id?: number | null; item_name: string; item_code: string; specification: string | null; @@ -788,6 +790,7 @@ export function transformV2ToApi( : parseFloat((baseQty * orderQty).toFixed(2)); items.push({ + item_id: bomItem.item_id || null, item_name: bomItem.item_name, item_code: bomItem.item_code, specification: bomItem.specification || null, @@ -818,6 +821,7 @@ export function transformV2ToApi( : parseFloat((baseQty * orderQty).toFixed(2)); items.push({ + item_id: bomItem.item_id || null, item_name: bomItem.item_name, item_code: bomItem.item_code, specification: bomItem.specification || null,