fix: [receiving] 입고 등록 품목코드 선택 시 단위 연동
- ItemSearchModal 콜백에 unit 필드 추가 - ReceivingDetail에서 품목 선택 시 unit 세팅
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user