From f477707200736b040b41f1979b99c8f1738dfba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sun, 22 Mar 2026 09:13:21 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[=EC=9E=91=EC=97=85=EC=9D=BC=EC=A7=80]?= =?UTF-8?q?=20=EC=9E=AC=EA=B3=B5=ED=92=88=EC=9D=80=20=EC=A0=88=EA=B3=A1=20?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=9C=A0=EC=A7=80?= =?UTF-8?q?=ED=95=98=EB=90=98=20=EC=88=98=EC=A3=BC=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=EC=88=A8=EA=B9=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../documents/BendingWorkLogContent.tsx | 71 ++++++++++++------- .../production/WorkerScreen/WorkLogModal.tsx | 16 +++-- 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/src/components/production/WorkOrders/documents/BendingWorkLogContent.tsx b/src/components/production/WorkOrders/documents/BendingWorkLogContent.tsx index 188510bf..3f40ef67 100644 --- a/src/components/production/WorkOrders/documents/BendingWorkLogContent.tsx +++ b/src/components/production/WorkOrders/documents/BendingWorkLogContent.tsx @@ -33,9 +33,10 @@ interface BendingWorkLogContentProps { lotNoMap?: Record; // BD-{prefix}-{lengthCode} → LOT NO bendingImages?: Record; // R2 presigned URL 맵 rawMaterialLotNo?: string; // STOCK: 원자재 투입 LOT 번호 + isWip?: boolean; // 재공품 여부 (수주 관련 필드 숨김) } -export function BendingWorkLogContent({ data: order, lotNoMap, bendingImages, rawMaterialLotNo }: BendingWorkLogContentProps) { +export function BendingWorkLogContent({ data: order, lotNoMap, bendingImages, rawMaterialLotNo, isWip }: BendingWorkLogContentProps) { const today = new Date().toLocaleDateString('ko-KR', { year: 'numeric', month: '2-digit', @@ -125,40 +126,62 @@ export function BendingWorkLogContent({ data: order, lotNoMap, bendingImages, ra - - + {!isWip && } + + {!isWip && ( + + + + + + + )} + {!isWip && ( + + + + + + + )} + {isWip && ( + + + + + )} - - - - - - - - - - - - - - + {!isWip && ( + <> + + + + )} - - + {!isWip && ( + <> + + + + )} - - - - - + {!isWip && ( + + + + + + )}
신청업체신청내용신청업체 + {isWip ? '생산정보' : '신청내용'} +
수주일{order.salesOrderDate || '-'}현장명{order.projectName}
수주처{order.client}작업일자{today}
작업일자{today}
수주일{order.salesOrderDate || '-'}현장명{order.projectName}
수주처{order.client}작업일자{today}
담당자{order.salesOrderWriter || '-'}담당자{order.salesOrderWriter || '-'}제품 LOT NO {order.lotNo}
연락처{order.clientContact || '-'}연락처{order.clientContact || '-'}생산담당자 {primaryAssignee}
출고예정일{formattedDueDate}
출고예정일{formattedDueDate}
diff --git a/src/components/production/WorkerScreen/WorkLogModal.tsx b/src/components/production/WorkerScreen/WorkLogModal.tsx index acc52107..3e7649a3 100644 --- a/src/components/production/WorkerScreen/WorkLogModal.tsx +++ b/src/components/production/WorkerScreen/WorkLogModal.tsx @@ -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 ( ); }