fix: [작업일지] 재공품은 절곡 레이아웃 유지하되 수주 관련 필드 숨김

This commit is contained in:
김보곤
2026-03-22 09:13:21 +09:00
parent 59763a7a6e
commit f477707200
2 changed files with 56 additions and 31 deletions

View File

@@ -235,16 +235,16 @@ export function WorkLogModal({
const renderContent = () => {
if (!order) return null;
// 1순위: 작업지시 공정명에서 판별 (재공품 자식 공정은 전용 양식 사용)
const orderProcessType = order.processName?.includes('재공품')
? 'template' as const
: undefined;
// 2순위: 공정관리에서 매핑된 양식명으로 결정
// 1순위: 공정관리에서 매핑된 양식명으로 결정
const templateType = resolveProcessTypeFromTemplate(workLogTemplateName);
// 2순위: 작업지시 공정명에서 판별 (process_id가 자식 공정인 경우)
const orderProcessType = order.processName?.includes('재공품')
? 'bending' as const // 재공품도 절곡 레이아웃 유지 (기본필드만 다름)
: undefined;
// 3순위: processType 폴백 (양식 미매핑 시)
const type = orderProcessType || templateType || processType || order.processType;
const type = templateType || orderProcessType || processType || order.processType;
// 양식이 매핑되어 있지 않은 경우 안내
if (!workLogTemplateId && !processType && !orderProcessType) {
@@ -265,12 +265,14 @@ export function WorkLogModal({
}
// STOCK 단일부품: 원자재 LOT 번호를 직접 전달
const rawMaterialLotNo = materialLots.find(lot => !lot.item_code.startsWith('BD-'))?.lot_no;
const isWipOrder = order.processName?.includes('재공품') || order.projectName === '재고생산';
return (
<BendingWorkLogContent
data={order}
lotNoMap={lotNoMap}
bendingImages={bendingImages}
rawMaterialLotNo={rawMaterialLotNo}
isWip={isWipOrder}
/>
);
}