feat(WEB): 상세 페이지 권한 체계 통합 및 레이아웃/문서 기능 개선

권한 시스템 통합:
- BadDebtDetail, LaborDetail, PricingDetail 권한 로직 정리
- BoardDetail, ClientDetail, ItemDetail 권한 적용 개선
- ProcessDetail, StepDetail, PermissionDetail 권한 리팩토링
- ContractDetail, HandoverReport, ProgressBilling 권한 연동
- ReceivingDetail, ShipmentDetail, WorkOrderDetail 권한 적용
- InspectionDetail, OrderSalesDetail, QuoteFooterBar 권한 개선

기능 개선:
- AuthenticatedLayout 구조 리팩토링
- JointbarInspectionDocument 문서 레이아웃 개선
- PricingTableForm 폼 기능 보강
- DynamicItemForm, SectionsTab 개선
- 주문관리 상세/생산지시 페이지 개선
- VendorLedgerDetail 수정

설정:
- Claude hooks 추가 (빌드 차단, 파일 크기 체크, 미사용 import 체크)
- 품질감사 문서관리 계획 문서 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-02-04 20:26:27 +09:00
parent c1b63b850a
commit bb7e7a75e9
30 changed files with 737 additions and 665 deletions

View File

@@ -3,12 +3,15 @@
/**
* 조인트바 중간검사 성적서 문서 컴포넌트
*
* 공통 컴포넌트 사용:
* - DocumentHeader: quality 레이아웃 + customApproval (QualityApprovalTable)
* 새 기획서(SlatJointBarInspectionContent) 레이아웃 적용:
* - 헤더: 다른 중간검사 성적서(스크린/절곡/슬랫)와 동일한 헤딩 + 결재 테이블
* - 기본정보: 제품명/슬랫, 규격/슬랫, 수주처, 부서
* - 중간검사 기준서 KOPS-20: 도해 이미지 + 겉모양(3행) + 치수(4행)
* - 중간검사 DATA: No, 겉모양(가공/조립), ①②③④ 치수, 판정
* - 부적합 내용 + 종합판정 (한 행)
*/
import React from 'react';
import { DocumentHeader, QualityApprovalTable } from '@/components/document-system';
// 조인트바 중간검사 성적서 데이터 타입
export interface JointbarInspectionData {
@@ -18,7 +21,7 @@ export interface JointbarInspectionData {
client: string;
siteName: string;
lotNo: string;
lotSize: string;
department: string;
inspectionDate: string;
inspector: string;
approvers: {
@@ -26,23 +29,16 @@ export interface JointbarInspectionData {
reviewer?: string;
approver?: string;
};
// 중간검사 기준서 정보
standardInfo: {
appearance: { criteria: string; method: string; frequency: string; regulation: string };
assembly: { criteria: string; method: string; frequency: string; regulation: string };
coating: { criteria: string; method: string; frequency: string; regulation: string };
dimensions: { criteria: string; method: string; frequency: string; regulation: string };
};
// 중간검사 DATA
inspectionData: {
serialNo: string;
processState: '양호' | '불량';
assemblyState: '양호' | '불량';
height: { standard: number; measured: number };
height2: { standard: number; measured: number };
bandLength: { standard: number; measured: number };
gap: { standard: number; measured: number };
result: '적' | '부적합';
height1: { standard: string; measured: string };
height2: { standard: string; measured: string };
length: { standard: string; measured: string };
interval: { standard: string; measured: string };
result: '적' | '부';
}[];
notes: string;
overallResult: '합격' | '불합격';
@@ -51,12 +47,12 @@ export interface JointbarInspectionData {
// Mock 데이터
export const MOCK_JOINTBAR_INSPECTION: JointbarInspectionData = {
documentNo: 'KDQP-01-009',
productName: '조인트바',
specification: '와이어 클러치 크립지름',
productName: '슬랫',
specification: '슬랫',
client: '주일',
siteName: '용산고등학교(4호)',
lotNo: 'KD-WE-251015-01-(3)',
lotSize: '11 개소',
department: '생산부',
inspectionDate: '2025.',
inspector: '',
approvers: {
@@ -64,38 +60,12 @@ export const MOCK_JOINTBAR_INSPECTION: JointbarInspectionData = {
reviewer: '',
approver: '',
},
standardInfo: {
appearance: {
criteria: '사용상 해로운 결함이 없을 것',
method: '',
frequency: 'n = 1, c = 0',
regulation: 'KS F 4510 5.1항',
},
assembly: {
criteria: '밴드시트 읍동에 의해\n견고하게 조립되어야 함',
method: '확인점검',
frequency: '',
regulation: 'KS F 4510 9항',
},
coating: {
criteria: '용접부위에 락터스베이\n도포하여야 함',
method: '',
frequency: '',
regulation: '자체규정',
},
dimensions: {
criteria: '⓪\n16.5 ± 1\n14.5 ± 1\n300(밴드마감재) ± 4\n150 ± 4',
method: '체크검사',
frequency: '',
regulation: 'KS F 4510 7항\n외 9',
},
},
inspectionData: [
{ serialNo: '1', processState: '양호', assemblyState: '양호', height: { standard: 16.5, measured: 14.5 }, height2: { standard: 14.5, measured: 14.5 }, bandLength: { standard: 300, measured: 300 }, gap: { standard: 150, measured: 150 }, result: '적' },
{ serialNo: '2', processState: '양호', assemblyState: '양호', height: { standard: 16.5, measured: 14.5 }, height2: { standard: 14.5, measured: 14.5 }, bandLength: { standard: 300, measured: 300 }, gap: { standard: 150, measured: 150 }, result: '적' },
{ serialNo: '3', processState: '양호', assemblyState: '양호', height: { standard: 16.5, measured: 14.5 }, height2: { standard: 14.5, measured: 14.5 }, bandLength: { standard: 300, measured: 300 }, gap: { standard: 150, measured: 150 }, result: '적' },
{ serialNo: '4', processState: '양호', assemblyState: '양호', height: { standard: 16.5, measured: 14.5 }, height2: { standard: 14.5, measured: 14.5 }, bandLength: { standard: 300, measured: 300 }, gap: { standard: 150, measured: 150 }, result: '적' },
{ serialNo: '5', processState: '양호', assemblyState: '양호', height: { standard: 16.5, measured: 14.5 }, height2: { standard: 14.5, measured: 14.5 }, bandLength: { standard: 300, measured: 300 }, gap: { standard: 150, measured: 150 }, result: '적' },
{ serialNo: '1', processState: '양호', assemblyState: '양호', height1: { standard: '43.1 ± 0.5', measured: '43.1' }, height2: { standard: '14.5 ± 1', measured: '14.5' }, length: { standard: '', measured: '' }, interval: { standard: '150 ± 4', measured: '150' }, result: '적' },
{ serialNo: '2', processState: '양호', assemblyState: '양호', height1: { standard: '43.1 ± 0.5', measured: '43.1' }, height2: { standard: '14.5 ± 1', measured: '14.5' }, length: { standard: '', measured: '' }, interval: { standard: '150 ± 4', measured: '150' }, result: '적' },
{ serialNo: '3', processState: '양호', assemblyState: '양호', height1: { standard: '43.1 ± 0.5', measured: '43.1' }, height2: { standard: '14.5 ± 1', measured: '14.5' }, length: { standard: '', measured: '' }, interval: { standard: '150 ± 4', measured: '150' }, result: '적' },
{ serialNo: '4', processState: '양호', assemblyState: '양호', height1: { standard: '43.1 ± 0.5', measured: '43.1' }, height2: { standard: '14.5 ± 1', measured: '14.5' }, length: { standard: '', measured: '' }, interval: { standard: '150 ± 4', measured: '150' }, result: '적' },
{ serialNo: '5', processState: '양호', assemblyState: '양호', height1: { standard: '43.1 ± 0.5', measured: '43.1' }, height2: { standard: '14.5 ± 1', measured: '14.5' }, length: { standard: '', measured: '' }, interval: { standard: '150 ± 4', measured: '150' }, result: '적' },
],
notes: '',
overallResult: '합격',
@@ -108,37 +78,57 @@ interface JointbarInspectionDocumentProps {
export const JointbarInspectionDocument = ({ data = MOCK_JOINTBAR_INSPECTION }: JointbarInspectionDocumentProps) => {
return (
<div className="bg-white p-8 w-full text-sm shadow-sm print:shadow-none">
{/* 문서 헤더 (공통 컴포넌트) */}
<DocumentHeader
title="조인트바"
subtitle="중간검사 성적서"
layout="quality"
logo={{ text: 'KD', subtext: '경동기업\nKYUNGDONG COMPANY' }}
customApproval={
<QualityApprovalTable
type="4col"
approvers={data.approvers}
/>
}
/>
{/* 헤더 영역 - 다른 중간검사 성적서와 동일 패턴 */}
<div className="flex justify-between items-start mb-6">
<div>
<h1 className="text-2xl font-bold"> ()</h1>
<p className="text-xs text-gray-500 mt-1 whitespace-nowrap">
: {data.documentNo} | : {data.inspectionDate}
</p>
</div>
{/* 결재란 */}
<table className="border-collapse text-sm flex-shrink-0">
<tbody>
<tr>
<td className="border border-gray-400 px-4 py-1 text-center align-middle" rowSpan={3}><br/></td>
<td className="border border-gray-400 px-6 py-1 text-center"></td>
<td className="border border-gray-400 px-6 py-1 text-center"></td>
<td className="border border-gray-400 px-6 py-1 text-center"></td>
<td className="border border-gray-400 px-6 py-1 text-center"></td>
</tr>
<tr>
<td className="border border-gray-400 px-6 py-3 text-center">{data.approvers.writer || ''}</td>
<td className="border border-gray-400 px-6 py-3 text-center text-gray-400">{data.approvers.reviewer || '이름'}</td>
<td className="border border-gray-400 px-6 py-3 text-center text-gray-400">{data.approvers.approver || '이름'}</td>
<td className="border border-gray-400 px-6 py-3 text-center text-gray-400"></td>
</tr>
<tr>
<td className="border border-gray-400 px-6 py-1 text-center whitespace-nowrap"></td>
<td className="border border-gray-400 px-6 py-1 text-center whitespace-nowrap"></td>
<td className="border border-gray-400 px-6 py-1 text-center whitespace-nowrap"></td>
<td className="border border-gray-400 px-6 py-1 text-center whitespace-nowrap"></td>
</tr>
</tbody>
</table>
</div>
{/* 기본 정보 테이블 */}
<table className="w-full border-collapse mb-4 text-xs">
<tbody>
<tr>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 w-20 font-medium"> </td>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 w-24 font-medium"></td>
<td className="border border-gray-400 px-3 py-2">{data.productName}</td>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 w-24 font-medium"> LOT NO</td>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 w-28 font-medium"> LOT NO</td>
<td className="border border-gray-400 px-3 py-2">{data.lotNo}</td>
</tr>
<tr>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 font-medium"> </td>
<td className="border border-gray-400 px-3 py-2">{data.specification}</td>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 font-medium"></td>
<td className="border border-gray-400 px-3 py-2">{data.lotSize}</td>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 font-medium"></td>
<td className="border border-gray-400 px-3 py-2">{data.department}</td>
</tr>
<tr>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 font-medium"></td>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 font-medium"></td>
<td className="border border-gray-400 px-3 py-2">{data.client}</td>
<td className="border border-gray-400 px-3 py-2 bg-gray-100 font-medium"></td>
<td className="border border-gray-400 px-3 py-2">{data.inspectionDate}</td>
@@ -152,131 +142,174 @@ export const JointbarInspectionDocument = ({ data = MOCK_JOINTBAR_INSPECTION }:
</tbody>
</table>
{/* 중간검사 기준서 */}
<table className="w-full border-collapse mb-4 text-xs">
<thead>
<tr className="bg-gray-100">
<th className="border border-gray-400 px-2 py-1 w-24" rowSpan={5}><br/></th>
<th className="border border-gray-400 px-2 py-1 w-16"></th>
<th className="border border-gray-400 px-2 py-1 w-16"></th>
<th className="border border-gray-400 px-2 py-1"></th>
<th className="border border-gray-400 px-2 py-1 w-14"></th>
<th className="border border-gray-400 px-2 py-1 w-14"></th>
<th className="border border-gray-400 px-2 py-1 w-24"></th>
</tr>
</thead>
{/* 중간검사 기준서 KOPS-20 */}
<div className="mb-1 font-bold text-xs"> KOPS-20</div>
<table className="w-full border-collapse text-xs mb-4">
<tbody>
<tr>
<td className="border border-gray-400 p-1 text-center align-middle" rowSpan={4}>
{/* 도해 이미지 영역 */}
<div className="w-14 h-20 mx-auto border border-gray-300 bg-gray-50 flex items-center justify-center">
<div className="text-center text-gray-400">
<div className="flex flex-col items-center gap-1">
<span className="w-3 h-3 border border-gray-400 rounded-full flex items-center justify-center text-[6px]">1</span>
<div className="flex items-center gap-1">
<div className="w-2 h-6 border border-gray-300"></div>
<span className="w-3 h-3 border border-gray-400 flex items-center justify-center text-[6px]"></span>
<div className="w-2 h-6 border border-gray-300"></div>
</div>
<span className="w-3 h-3 border border-gray-400 rounded-full flex items-center justify-center text-[6px]">2</span>
</div>
</div>
</div>
{/* 도해 영역 */}
<td className="border border-gray-400 p-4 text-center text-gray-300 align-middle w-1/5" rowSpan={8}>
<div className="h-40 flex items-center justify-center"> </div>
</td>
<td className="border border-gray-400 px-1 py-1 text-center"></td>
<td className="border border-gray-400 px-1 py-1">{data.standardInfo.appearance.criteria}</td>
<td className="border border-gray-400 px-1 py-1 text-center"></td>
<td className="border border-gray-400 px-1 py-1 text-center">{data.standardInfo.appearance.frequency}</td>
<td className="border border-gray-400 px-1 py-1 text-center text-[9px]">{data.standardInfo.appearance.regulation}</td>
{/* 헤더 행 */}
<th className="border border-gray-400 bg-gray-100 px-2 py-1 text-center" colSpan={2}></th>
<th className="border border-gray-400 bg-gray-100 px-2 py-1 text-center"></th>
<th className="border border-gray-400 bg-gray-100 px-2 py-1 text-center"></th>
<th className="border border-gray-400 bg-gray-100 px-2 py-1 text-center"></th>
<th className="border border-gray-400 bg-gray-100 px-2 py-1 text-center"></th>
</tr>
{/* 겉모양 > 가공상태 */}
<tr>
<td className="border border-gray-400 px-2 py-1 font-medium text-center" rowSpan={3}></td>
<td className="border border-gray-400 px-2 py-1 font-medium"></td>
<td className="border border-gray-400 px-2 py-1"> </td>
<td className="border border-gray-400 px-2 py-1 text-center" rowSpan={3}></td>
<td className="border border-gray-400 px-2 py-1 text-center" rowSpan={7}>n = 1, c = 0</td>
<td className="border border-gray-400 px-2 py-1">KS F 4510 5.1</td>
</tr>
{/* 겉모양 > 조립상태 */}
<tr>
<td className="border border-gray-400 px-2 py-1 font-medium" rowSpan={2}></td>
<td className="border border-gray-400 px-2 py-1"> <br/> </td>
<td className="border border-gray-400 px-2 py-1">KS F 4510 9</td>
</tr>
<tr>
<td className="border border-gray-400 px-1 py-1 text-center"></td>
<td className="border border-gray-400 px-1 py-1 whitespace-pre-line">{data.standardInfo.assembly.criteria}</td>
<td className="border border-gray-400 px-1 py-1 text-center">{data.standardInfo.assembly.method}</td>
<td className="border border-gray-400 px-1 py-1 text-center"></td>
<td className="border border-gray-400 px-1 py-1 text-center text-[9px]">{data.standardInfo.assembly.regulation}</td>
<td className="border border-gray-400 px-2 py-1"> <br/> </td>
<td className="border border-gray-400 px-2 py-1"></td>
</tr>
{/* 치수 > ① 높이 */}
<tr>
<td className="border border-gray-400 px-1 py-1 text-center"></td>
<td className="border border-gray-400 px-1 py-1 whitespace-pre-line">{data.standardInfo.coating.criteria}</td>
<td className="border border-gray-400 px-1 py-1 text-center"></td>
<td className="border border-gray-400 px-1 py-1 text-center"></td>
<td className="border border-gray-400 px-1 py-1 text-center text-[9px]">{data.standardInfo.coating.regulation}</td>
<td className="border border-gray-400 px-2 py-1 font-medium bg-gray-50 text-center" rowSpan={4}><br/>(mm)</td>
<td className="border border-gray-400 px-2 py-1 font-medium"> </td>
<td className="border border-gray-400 px-2 py-1 text-center">43.1 ± 0.5</td>
<td className="border border-gray-400 px-2 py-1 text-center" rowSpan={4}></td>
<td className="border border-gray-400 px-2 py-1" rowSpan={3}>KS F 4510 7<br/>9</td>
</tr>
{/* 치수 > ② 높이 */}
<tr>
<td className="border border-gray-400 px-1 py-1 text-center"><br/>(mm)</td>
<td className="border border-gray-400 px-1 py-1 whitespace-pre-line">{data.standardInfo.dimensions.criteria}</td>
<td className="border border-gray-400 px-1 py-1 text-center">{data.standardInfo.dimensions.method}</td>
<td className="border border-gray-400 px-1 py-1 text-center"></td>
<td className="border border-gray-400 px-1 py-1 text-center text-[9px] whitespace-pre-line">{data.standardInfo.dimensions.regulation}</td>
<td className="border border-gray-400 px-2 py-1 font-medium"> </td>
<td className="border border-gray-400 px-2 py-1 text-center">14.5 ± 1</td>
</tr>
{/* 치수 > 길이 */}
<tr>
<td className="border border-gray-400 px-2 py-1 font-medium"></td>
<td className="border border-gray-400 px-2 py-1 text-center"> ± 4</td>
</tr>
{/* 치수 > 간격 */}
<tr>
<td className="border border-gray-400 px-2 py-1 font-medium"></td>
<td className="border border-gray-400 px-2 py-1 text-center">150 ± 4</td>
<td className="border border-gray-400 px-2 py-1"></td>
</tr>
</tbody>
</table>
{/* 중간검사 DATA */}
<div className="mb-2 text-xs font-medium"> DATA</div>
<div className="mb-1 font-bold text-xs"> DATA</div>
<table className="w-full border-collapse text-xs mb-4">
<thead>
<tr className="bg-gray-100">
<th className="border border-gray-400 px-1 py-1" rowSpan={2}><br/></th>
<th className="border border-gray-400 px-1 py-1" colSpan={2}></th>
<th className="border border-gray-400 px-1 py-1" colSpan={8}> [mm]</th>
<th className="border border-gray-400 px-1 py-1" rowSpan={2}></th>
<th className="border border-gray-400 p-1 w-8" rowSpan={2}>No.</th>
<th className="border border-gray-400 p-1" colSpan={2}></th>
<th className="border border-gray-400 p-1" colSpan={2}> (mm)</th>
<th className="border border-gray-400 p-1" colSpan={2}> (mm)</th>
<th className="border border-gray-400 p-1" colSpan={2}> (mm)</th>
<th className="border border-gray-400 p-1" colSpan={2}> </th>
<th className="border border-gray-400 p-1 w-14" rowSpan={2}><br/>(/)</th>
</tr>
<tr className="bg-gray-100">
<th className="border border-gray-400 px-1 py-1"></th>
<th className="border border-gray-400 px-1 py-1"></th>
<th className="border border-gray-400 px-1 py-1"> <br/></th>
<th className="border border-gray-400 px-1 py-1"></th>
<th className="border border-gray-400 px-1 py-1"> <br/></th>
<th className="border border-gray-400 px-1 py-1"></th>
<th className="border border-gray-400 px-1 py-1"> ()<br/></th>
<th className="border border-gray-400 px-1 py-1"></th>
<th className="border border-gray-400 px-1 py-1"> <br/></th>
<th className="border border-gray-400 px-1 py-1"></th>
<th className="border border-gray-400 p-1 w-16"></th>
<th className="border border-gray-400 p-1 w-16"></th>
<th className="border border-gray-400 p-1 w-16"></th>
<th className="border border-gray-400 p-1 w-16"></th>
<th className="border border-gray-400 p-1 w-16"></th>
<th className="border border-gray-400 p-1 w-16"></th>
<th className="border border-gray-400 p-1 w-16"></th>
<th className="border border-gray-400 p-1 w-16"></th>
<th className="border border-gray-400 p-1 w-16"></th>
<th className="border border-gray-400 p-1 w-16"></th>
</tr>
</thead>
<tbody>
{data.inspectionData.map((item, index) => (
<tr key={index}>
<td className="border border-gray-400 px-1 py-1 text-center">{item.serialNo}</td>
<td className="border border-gray-400 px-1 py-1 text-center">
<td className="border border-gray-400 p-1 text-center">{item.serialNo}</td>
{/* 가공상태 */}
<td className="border border-gray-400 p-1">
<div className="flex flex-col items-center gap-0.5">
<span className="flex items-center gap-0.5 text-xs whitespace-nowrap">
<span className={`inline-flex items-center justify-center w-3 h-3 border rounded-sm text-[8px] leading-none ${item.processState === '양호' ? 'border-gray-600 bg-gray-700 text-white' : 'border-gray-400 bg-white'}`}>
{item.processState === '양호' ? '✓' : ''}
</span>
</span>
<span className="flex items-center gap-0.5 text-xs whitespace-nowrap">
<span className={`inline-flex items-center justify-center w-3 h-3 border rounded-sm text-[8px] leading-none ${item.processState === '불량' ? 'border-gray-600 bg-gray-700 text-white' : 'border-gray-400 bg-white'}`}>
{item.processState === '불량' ? '✓' : ''}
</span>
</span>
</div>
</td>
<td className="border border-gray-400 px-1 py-1 text-center">
{/* 조립상태 */}
<td className="border border-gray-400 p-1">
<div className="flex flex-col items-center gap-0.5">
<span className="flex items-center gap-0.5 text-xs whitespace-nowrap">
<span className={`inline-flex items-center justify-center w-3 h-3 border rounded-sm text-[8px] leading-none ${item.assemblyState === '양호' ? 'border-gray-600 bg-gray-700 text-white' : 'border-gray-400 bg-white'}`}>
{item.assemblyState === '양호' ? '✓' : ''}
</span>
</span>
<span className="flex items-center gap-0.5 text-xs whitespace-nowrap">
<span className={`inline-flex items-center justify-center w-3 h-3 border rounded-sm text-[8px] leading-none ${item.assemblyState === '불량' ? 'border-gray-600 bg-gray-700 text-white' : 'border-gray-400 bg-white'}`}>
{item.assemblyState === '불량' ? '✓' : ''}
</span>
</span>
</div>
</td>
<td className="border border-gray-400 px-1 py-1 text-center">{item.height.standard} ± 1</td>
<td className="border border-gray-400 px-1 py-1 text-center">{item.height.measured}</td>
<td className="border border-gray-400 px-1 py-1 text-center">{item.height2.standard} ± 1</td>
<td className="border border-gray-400 px-1 py-1 text-center">{item.height2.measured}</td>
<td className="border border-gray-400 px-1 py-1 text-center">{item.bandLength.standard} ± 4</td>
<td className="border border-gray-400 px-1 py-1 text-center">{item.bandLength.measured}</td>
<td className="border border-gray-400 px-1 py-1 text-center">{item.gap.standard} ± 4</td>
<td className="border border-gray-400 px-1 py-1 text-center">{item.gap.measured}</td>
<td className="border border-gray-400 px-1 py-1 text-center">
<br/>
{/* ① 높이 */}
<td className="border border-gray-400 p-1 text-center">{item.height1.standard}</td>
<td className="border border-gray-400 p-1 text-center">{item.height1.measured || '-'}</td>
{/* ② 높이 */}
<td className="border border-gray-400 p-1 text-center">{item.height2.standard}</td>
<td className="border border-gray-400 p-1 text-center">{item.height2.measured || '-'}</td>
{/* ③ 길이 */}
<td className="border border-gray-400 p-1 text-center">{item.length.standard || '-'}</td>
<td className="border border-gray-400 p-1 text-center">{item.length.measured || '-'}</td>
{/* ④ 간격 */}
<td className="border border-gray-400 p-1 text-center">{item.interval.standard}</td>
<td className="border border-gray-400 p-1 text-center">{item.interval.measured || '-'}</td>
{/* 판정 */}
<td className={`border border-gray-400 p-1 text-center font-bold ${
item.result === '적' ? 'text-blue-600' : 'text-red-600'
}`}>
{item.result}
</td>
</tr>
))}
</tbody>
</table>
{/* 부적합 내용 */}
<div className="border border-gray-400 mb-4">
<div className="bg-gray-100 px-3 py-1 text-xs font-medium border-b border-gray-400"> </div>
<div className="px-3 py-2 text-xs text-gray-600 min-h-[30px]">{data.notes}</div>
</div>
{/* 부적합 내용 + 종합판정 */}
<table className="w-full border-collapse text-xs mb-4">
<tbody>
<tr>
<td className="border border-gray-400 bg-gray-100 px-3 py-2 font-medium w-24 align-middle text-center"> </td>
<td className="border border-gray-400 px-3 py-2 min-h-[30px]">{data.notes || '\u00A0'}</td>
<td className="border border-gray-400 bg-gray-100 px-3 py-2 font-medium text-center w-24"></td>
<td className={`border border-gray-400 px-3 py-2 text-center font-bold text-sm w-24 ${
data.overallResult === '합격' ? 'text-blue-600' : 'text-red-600'
}`}>
{data.overallResult}
</td>
</tr>
</tbody>
</table>
{/* 문서번호 및 종합판정 */}
{/* 문서번호 */}
<div className="flex justify-between items-end">
<div className="text-xs text-gray-500">{data.documentNo}</div>
<div className="border border-gray-400">
<div className="bg-gray-100 px-4 py-1 text-center text-xs font-medium border-b border-gray-400"></div>
<div className={`px-8 py-2 text-center text-sm font-bold ${data.overallResult === '합격' ? 'text-blue-600' : 'text-red-600'}`}>
{data.overallResult}
</div>
</div>
<div className="text-xs text-gray-500">KDPS-10-03</div>
</div>
</div>

View File

@@ -24,6 +24,7 @@ import {
} from "@/components/ui/table";
import {
Edit,
PenLine,
Factory,
XCircle,
FileSpreadsheet,
@@ -32,6 +33,7 @@ import {
Eye,
CheckCircle2,
RotateCcw,
Undo2,
Package,
ChevronDown,
ChevronRight,
@@ -776,55 +778,55 @@ export default function OrderDetailPage() {
const showRevertConfirmButton = order.status === "order_confirmed";
return (
<div className="flex items-center gap-2 flex-wrap">
<>
{/* 견적 수정 */}
{showEditQuoteButton && (
<Button variant="outline" onClick={handleEditQuote}>
<Edit className="h-4 w-4 mr-2" />
<Button variant="outline" size="sm" onClick={handleEditQuote}>
<PenLine className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline"> </span>
</Button>
)}
{/* 수주서 보기 */}
<Button variant="outline" onClick={handleViewOrderDocument}>
<Eye className="h-4 w-4 mr-2" />
<Button variant="outline" size="sm" onClick={handleViewOrderDocument}>
<Eye className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline"> </span>
</Button>
{/* 수주 확정 */}
{showConfirmButton && (
<Button onClick={handleConfirmOrder} className="bg-green-600 hover:bg-green-700">
<CheckCircle2 className="h-4 w-4 mr-2" />
<Button size="sm" onClick={handleConfirmOrder} className="bg-green-600 hover:bg-green-700">
<CheckCircle2 className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline"> </span>
</Button>
)}
{/* 수주확정 되돌리기 */}
{showRevertConfirmButton && (
<Button variant="outline" onClick={handleRevertConfirmation} className="border-slate-300 text-slate-600 hover:border-slate-400 hover:bg-slate-50">
<RotateCcw className="h-4 w-4 mr-2" />
<Button variant="outline" size="sm" onClick={handleRevertConfirmation} className="border-slate-300 text-slate-600 hover:border-slate-400 hover:bg-slate-50">
<RotateCcw className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline"> </span>
</Button>
)}
{/* 생산지시 생성 */}
{showProductionCreateButton && (
<Button onClick={handleProductionOrder}>
<Factory className="h-4 w-4 mr-2" />
<Button size="sm" onClick={handleProductionOrder}>
<Factory className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline"> </span>
</Button>
)}
{/* 생산지시 되돌리기 */}
{showRevertButton && (
<Button variant="outline" onClick={handleRevertProduction} className="border-amber-200 text-amber-600 hover:border-amber-300 hover:bg-amber-50">
<RotateCcw className="h-4 w-4 mr-2" />
<Button variant="outline" size="sm" onClick={handleRevertProduction} className="border-amber-200 text-amber-600 hover:border-amber-300 hover:bg-amber-50">
<Undo2 className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline"> </span>
</Button>
)}
{/* 수정 */}
{showEditButton && (
<Button variant="outline" onClick={handleEdit}>
<Edit className="h-4 w-4 mr-2" />
<Button variant="outline" size="sm" onClick={handleEdit}>
<Edit className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline"></span>
</Button>
)}
</div>
</>
);
}, [order, handleEditQuote, handleViewOrderDocument, handleConfirmOrder, handleRevertConfirmation, handleProductionOrder, handleRevertProduction, handleEdit]);

View File

@@ -967,18 +967,19 @@ export default function ProductionOrderCreatePage() {
PRIORITY_COLORS[selectedPriority].buttonActive,
"border-0"
)}>
우선순위: {selectedConfig.productionOrder}
<span className="hidden md:inline">우선순위: </span>{selectedConfig.productionOrder}
</BadgeSm>
)}
</div>
<div className="flex items-center gap-2">
<Button variant="outline" onClick={handleBackToDetail}>
<ArrowLeft className="h-4 w-4 mr-2" />
수주상세로
<div className="flex items-center gap-1 md:gap-2">
<Button variant="outline" onClick={handleBackToDetail} size="sm" className="md:size-default">
<ArrowLeft className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline">수주상세로</span>
</Button>
<Button onClick={handleConfirm} disabled={isSubmitting}>
<BarChart3 className="h-4 w-4 mr-2" />
생산지시 확정 ({screenItems.length}건)
<Button onClick={handleConfirm} disabled={isSubmitting} size="sm" className="md:size-default">
<BarChart3 className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline">생산지시 확정</span>
<span className="ml-1">({screenItems.length})</span>
</Button>
</div>
</div>