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:
@@ -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>
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user