feat: [process] 공정 단계에 검사범위(InspectionScope) 설정 추가

- 전수검사/샘플링/그룹 유형 선택 UI
- 샘플링 시 샘플 크기(n) 입력
- options JSON으로 API 저장/복원
This commit is contained in:
2026-03-04 21:56:28 +09:00
parent f653960a30
commit 0b81e9c1dd
3 changed files with 121 additions and 0 deletions

View File

@@ -192,6 +192,8 @@ export interface ProcessStep {
completionType: StepCompletionType;
// 검사 설정 (검사여부가 true일 때)
inspectionSetting?: InspectionSetting;
// 검사 범위 (검사여부가 true일 때)
inspectionScope?: InspectionScope;
}
// 연결 유형 옵션
@@ -295,6 +297,35 @@ export const INSPECTION_METHOD_OPTIONS: { value: InspectionMethodType; label: st
{ value: '양자택일', label: '양자택일' },
];
// ============================================================================
// 검사 범위 (Inspection Scope) 타입 정의
// ============================================================================
// 검사 범위 유형
export type InspectionScopeType = 'all' | 'sampling' | 'group';
// 샘플 기준
export type InspectionSampleBase = 'order' | 'lot';
// 검사 범위 설정
export interface InspectionScope {
type: InspectionScopeType; // 전수검사 | 샘플링 | 그룹
sampleSize?: number; // 샘플 크기 (n값, sampling일 때만)
sampleBase?: InspectionSampleBase; // 샘플 기준 (order | lot)
}
// 검사 범위 유형 옵션
export const INSPECTION_SCOPE_TYPE_OPTIONS: { value: InspectionScopeType; label: string; description: string }[] = [
{ value: 'all', label: '전수검사', description: '모든 개소 검사' },
{ value: 'sampling', label: '샘플링', description: '마지막 N개 개소만 검사' },
{ value: 'group', label: '그룹', description: '그룹 마지막 개소만 검사' },
];
// 기본 검사 범위
export const DEFAULT_INSPECTION_SCOPE: InspectionScope = {
type: 'all',
};
// 기본 검사 설정값
export const DEFAULT_INSPECTION_SETTING: InspectionSetting = {
standardName: '',