From a2bc455f654e011c53968b0d3a14389d7259847e Mon Sep 17 00:00:00 2001 From: dujinkim Date: Wed, 3 Sep 2025 10:35:57 +0000 Subject: (최겸) 구매 입찰 개발(벤더 응찰 개발 및 기본계약 요청 개발 필) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bidding/price-adjustment-dialog.tsx | 200 +++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 components/bidding/price-adjustment-dialog.tsx (limited to 'components/bidding/price-adjustment-dialog.tsx') diff --git a/components/bidding/price-adjustment-dialog.tsx b/components/bidding/price-adjustment-dialog.tsx new file mode 100644 index 00000000..b53f9ef1 --- /dev/null +++ b/components/bidding/price-adjustment-dialog.tsx @@ -0,0 +1,200 @@ +'use client' + +import React from 'react' +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog' +import { Badge } from '@/components/ui/badge' +import { Separator } from '@/components/ui/separator' + +interface PriceAdjustmentData { + id: number + itemName?: string | null + adjustmentReflectionPoint?: string | null + majorApplicableRawMaterial?: string | null + adjustmentFormula?: string | null + rawMaterialPriceIndex?: string | null + referenceDate?: Date | null + comparisonDate?: Date | null + adjustmentRatio?: string | null + notes?: string | null + adjustmentConditions?: string | null + majorNonApplicableRawMaterial?: string | null + adjustmentPeriod?: string | null + contractorWriter?: string | null + adjustmentDate?: Date | null + nonApplicableReason?: string | null + createdAt: Date + updatedAt: Date +} + +interface PriceAdjustmentDialogProps { + open: boolean + onOpenChange: (open: boolean) => void + data: PriceAdjustmentData | null + vendorName: string +} + +function formatDate(date: Date | null | undefined): string { + if (!date) return '-' + return new Date(date).toLocaleDateString('ko-KR', { + year: 'numeric', + month: '2-digit', + day: '2-digit', + }) +} + +export function PriceAdjustmentDialog({ + open, + onOpenChange, + data, + vendorName, +}: PriceAdjustmentDialogProps) { + if (!data) return null + + return ( + + + + + 하도급대금등 연동표 + {vendorName} + + + 협력업체가 제출한 연동제 적용 정보입니다. + + + +
+ {/* 기본 정보 */} +
+

기본 정보

+
+
+ +

{data.itemName || '-'}

+
+
+ +

{data.adjustmentReflectionPoint || '-'}

+
+
+
+ + + + {/* 원재료 정보 */} +
+

원재료 정보

+
+
+ +

+ {data.majorApplicableRawMaterial || '-'} +

+
+
+ +

+ {data.majorNonApplicableRawMaterial || '-'} +

+
+
+ +

+ {data.nonApplicableReason || '-'} +

+
+
+
+ + + + {/* 연동 공식 및 지표 */} +
+

연동 공식 및 지표

+
+
+ +
+

+ {data.adjustmentFormula || '-'} +

+
+
+
+ +

+ {data.rawMaterialPriceIndex || '-'} +

+
+
+
+ +

{formatDate(data.referenceDate)}

+
+
+ +

{formatDate(data.comparisonDate)}

+
+
+
+ +

+ {data.adjustmentRatio ? `${data.adjustmentRatio}%` : '-'} +

+
+
+
+ + + + {/* 조정 조건 및 기타 */} +
+

조정 조건 및 기타

+
+
+ +

+ {data.adjustmentConditions || '-'} +

+
+
+
+ +

{data.adjustmentPeriod || '-'}

+
+
+ +

{formatDate(data.adjustmentDate)}

+
+
+
+ +

{data.contractorWriter || '-'}

+
+
+ +

+ {data.notes || '-'} +

+
+
+
+ + + + {/* 메타 정보 */} +
+

작성일: {formatDate(data.createdAt)}

+

수정일: {formatDate(data.updatedAt)}

+
+
+
+
+ ) +} -- cgit v1.2.3