feat(WEB): 수주등록 품목을 제품 모델+타입별 그룹핑 표시

- 견적의 calculation_inputs에서 productCode 정보를 수주등록으로 전달
- quote_items.note 파싱으로 floor/code 추출 (type_code/symbol 컬럼 부재 대응)
- 제품코드(FG-KWE01-벽면형-SUS)에서 그룹핑 키(KWE01-SUS) 추출
- 그룹 내 동일 품목(item_code 기준) 수량/금액 합산하여 1행으로 표시
- quotes/actions.ts BomCalculationResult 타입을 types.ts와 일치시켜 TS 에러 해결
This commit is contained in:
2026-02-04 23:04:47 +09:00
parent abd243fce2
commit f1c4ab62bf
4 changed files with 316 additions and 74 deletions

View File

@@ -94,7 +94,7 @@ export function QuoteSummaryPanel({
Object.entries(subtotals).forEach(([key, value]) => {
if (typeof value === "object" && value !== null) {
// grouped_items에서 items 가져오기 (subtotals에는 items가 없을 수 있음)
const groupItemsRaw = groupedItems?.[key]?.items || value.items || [];
const groupItemsRaw = groupedItems?.[key]?.items || (value as Record<string, unknown>).items as Array<unknown> || [];
// DetailItem 형식으로 변환
const groupItems: DetailItem[] = (groupItemsRaw as Array<{
item_name?: string;

View File

@@ -29,6 +29,7 @@ import type {
QuoteListParams,
QuoteStatus,
ProductCategory,
BomCalculationResultItem,
} from './types';
import { transformApiToFrontend, transformFrontendToApi } from './types';
@@ -925,12 +926,8 @@ export interface BomCalculationResult {
process_group?: string;
process_group_key?: string;
}>;
grouped_items?: Record<string, {
name: string;
items: Array<unknown>;
subtotal: number;
}>;
subtotals: Record<string, { name?: string; count?: number; subtotal?: number; items?: unknown[] } | number>;
grouped_items?: Record<string, { items: BomCalculationResultItem[]; [key: string]: unknown }>;
subtotals: Record<string, { name?: string; count?: number; subtotal?: number } | number>;
grand_total: number;
debug_steps?: Array<{ step: number; name: string; data: Record<string, unknown> }>; // 10단계 계산 과정
}