fix: [receiving] 입고 등록 품목코드 선택 시 단위 연동

- ItemSearchModal 콜백에 unit 필드 추가
- ReceivingDetail에서 품목 선택 시 unit 세팅
This commit is contained in:
김보곤
2026-03-18 22:45:22 +09:00
parent f4f2f4b9af
commit f5db1620e5
2 changed files with 3 additions and 1 deletions

View File

@@ -791,6 +791,7 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) {
itemCode: item.code,
itemName: item.name,
specification: item.specification || '',
unit: item.unit || prev.unit || 'EA',
}));
}}
itemType="RM,SM,CS"

View File

@@ -18,7 +18,7 @@ import type { ItemMaster, ItemType } from '@/types/item';
interface ItemSearchModalProps {
open: boolean;
onOpenChange: (open: boolean) => void;
onSelectItem: (item: { code: string; name: string; specification?: string }) => void;
onSelectItem: (item: { code: string; name: string; specification?: string; unit?: string }) => void;
tabLabel?: string;
/** 품목 유형 필터 (예: 'RM', 'SF', 'FG') */
itemType?: string;
@@ -59,6 +59,7 @@ export function ItemSearchModal({
code: item.itemCode,
name: item.itemName,
specification: item.specification || undefined,
unit: item.unit || undefined,
});
}, [onSelectItem]);