summaryrefslogtreecommitdiff
path: root/lib/bidding/vendor
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-11-25 11:51:27 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-11-25 11:51:27 +0000
commit835df8ddc115ffa74414db2a4fab7efc0d0056a9 (patch)
treebfe814c7b51ee1541d84b6e2dee01f28594763ac /lib/bidding/vendor
parent6160e8bd61360ada9e8e0574671c38292eaba9e7 (diff)
(최겸) 구매 입찰 수정v2
Diffstat (limited to 'lib/bidding/vendor')
-rw-r--r--lib/bidding/vendor/components/pr-items-pricing-table.tsx8
-rw-r--r--lib/bidding/vendor/partners-bidding-detail.tsx62
2 files changed, 35 insertions, 35 deletions
diff --git a/lib/bidding/vendor/components/pr-items-pricing-table.tsx b/lib/bidding/vendor/components/pr-items-pricing-table.tsx
index 22051a13..a0230478 100644
--- a/lib/bidding/vendor/components/pr-items-pricing-table.tsx
+++ b/lib/bidding/vendor/components/pr-items-pricing-table.tsx
@@ -279,7 +279,7 @@ export function PrItemsPricingTable({
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Package className="w-5 h-5" />
- 품목별 견적 작성
+ 품목별 입찰 작성
</CardTitle>
</CardHeader>
<CardContent>
@@ -299,8 +299,8 @@ export function PrItemsPricingTable({
<TableHead>중량단위</TableHead>
<TableHead>구매단위</TableHead>
<TableHead>SHI 납품요청일</TableHead>
- <TableHead>견적단가</TableHead>
- <TableHead>견적금액</TableHead>
+ <TableHead>입찰단가</TableHead>
+ <TableHead>입찰금액</TableHead>
<TableHead>납품예정일</TableHead>
{/* <TableHead>기술사양</TableHead> */}
<TableHead>SPEC</TableHead>
@@ -449,7 +449,7 @@ export function PrItemsPricingTable({
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
<Calculator className="w-4 h-4" />
- <Label className="font-semibold">총 사전견적 금액</Label>
+ <Label className="font-semibold">총 입찰 금액</Label>
</div>
<div className="text-2xl font-bold text-primary">
{formatCurrency(totalAmount)}
diff --git a/lib/bidding/vendor/partners-bidding-detail.tsx b/lib/bidding/vendor/partners-bidding-detail.tsx
index 504fc916..10fe71a9 100644
--- a/lib/bidding/vendor/partners-bidding-detail.tsx
+++ b/lib/bidding/vendor/partners-bidding-detail.tsx
@@ -93,7 +93,7 @@ interface BiddingDetail {
additionalProposals: string | null
responseSubmittedAt: Date | null
priceAdjustmentResponse: boolean | null // 연동제 적용 여부
- isPreQuoteParticipated: boolean | null // 사전견적 참여 여부
+ isPreQuoteParticipated: boolean | null // 입찰 참여 여부
isPriceAdjustmentApplicableQuestion: boolean // 연동제 적용요건 문의 여부
}
@@ -174,7 +174,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
const [biddingConditions, setBiddingConditions] = React.useState<BiddingConditions | null>(null)
const [isNoticeOpen, setIsNoticeOpen] = React.useState(false)
- // 품목별 견적 관련 상태
+ // 품목별 입찰 관련 상태
const [prItems, setPrItems] = React.useState<PrItem[]>([])
const [prItemQuotations, setPrItemQuotations] = React.useState<BiddingPrItemQuotation[]>([])
const [totalQuotationAmount, setTotalQuotationAmount] = React.useState(0)
@@ -293,16 +293,16 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
// PR 아이템 설정
setPrItems(prItemsResult)
- // 사전견적 데이터를 본입찰용으로 로드 (응찰 확정 시 또는 사전견적이 있는 경우)
+ // 입찰 데이터를 본입찰용으로 로드 (응찰 확정 시 또는 입찰이 있는 경우)
if (result?.biddingCompanyId) {
try {
- // 사전견적 데이터를 가져와서 본입찰용으로 변환
+ // 입찰 데이터를 가져와서 본입찰용으로 변환
const preQuoteData = await getSavedPrItemQuotations(result.biddingCompanyId)
if (preQuoteData && Array.isArray(preQuoteData) && preQuoteData.length > 0) {
- console.log('사전견적 데이터:', preQuoteData)
+ console.log('입찰 데이터:', preQuoteData)
- // 사전견적 데이터를 본입찰 포맷으로 변환
+ // 입찰 데이터를 본입찰 포맷으로 변환
const convertedQuotations = preQuoteData
.filter(item => item && typeof item === 'object' && item.prItemId)
.map(item => ({
@@ -313,7 +313,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
technicalSpecification: item.technicalSpecification || undefined
}))
- console.log('변환된 견적 데이터:', convertedQuotations)
+ console.log('변환된 입찰 데이터:', convertedQuotations)
if (Array.isArray(convertedQuotations) && convertedQuotations.length > 0) {
setPrItemQuotations(convertedQuotations)
@@ -328,19 +328,19 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
}
}
- // 응찰 확정 시에만 사전견적 금액을 finalQuoteAmount로 설정
+ // 응찰 확정 시에만 입찰 금액을 finalQuoteAmount로 설정
if (totalQuotationAmount > 0 && result?.isBiddingParticipated === true) {
- console.log('응찰 확정됨, 사전견적 금액 설정:', totalQuotationAmount)
- console.log('사전견적 금액을 finalQuoteAmount로 설정:', totalQuotationAmount)
+ console.log('응찰 확정됨, 입찰 금액 설정:', totalQuotationAmount)
+ console.log('입찰 금액을 finalQuoteAmount로 설정:', totalQuotationAmount)
setResponseData(prev => ({
...prev,
finalQuoteAmount: totalQuotationAmount.toString()
}))
}
- // 연동제 데이터 로드 (사전견적에서 답변했으면 로드, 아니면 입찰 조건 확인)
+ // 연동제 데이터 로드 (입찰에서 답변했으면 로드, 아니면 입찰 조건 확인)
if (result.priceAdjustmentResponse !== null) {
- // 사전견적에서 이미 답변한 경우 - 연동제 폼 로드
+ // 입찰에서 이미 답변한 경우 - 연동제 폼 로드
const savedPriceAdjustmentForm = await getPriceAdjustmentFormByBiddingCompanyId(result.biddingCompanyId)
if (savedPriceAdjustmentForm) {
setPriceAdjustmentForm({
@@ -397,7 +397,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
toast({
title: participated ? '참여 확정' : '미참여 확정',
description: participated
- ? '입찰에 참여하셨습니다. 이제 견적을 작성할 수 있습니다.'
+ ? '입찰에 참여하셨습니다. 이제 입찰을 작성할 수 있습니다.'
: '입찰 참여를 거절하셨습니다.',
})
@@ -406,13 +406,13 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
if (updatedDetail) {
setBiddingDetail(updatedDetail)
- // 참여 확정 시 사전견적 데이터가 있다면 로드
+ // 참여 확정 시 입찰 데이터가 있다면 로드
if (participated && updatedDetail.biddingCompanyId) {
try {
const preQuoteData = await getSavedPrItemQuotations(updatedDetail.biddingCompanyId)
if (preQuoteData && Array.isArray(preQuoteData) && preQuoteData.length > 0) {
- console.log('참여확정 후 사전견적 데이터:', preQuoteData)
+ console.log('참여확정 후 입찰 데이터:', preQuoteData)
const convertedQuotations = preQuoteData
.filter(item => item && typeof item === 'object' && item.prItemId)
@@ -424,7 +424,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
technicalSpecification: item.technicalSpecification || undefined
}))
- console.log('참여확정 후 변환된 견적 데이터:', convertedQuotations)
+ console.log('참여확정 후 변환된 입찰 데이터:', convertedQuotations)
if (Array.isArray(convertedQuotations) && convertedQuotations.length > 0) {
setPrItemQuotations(convertedQuotations)
@@ -467,16 +467,16 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
}
}
- // 품목별 견적 변경 핸들러
+ // 품목별 입찰 변경 핸들러
const handleQuotationsChange = (quotations: BiddingPrItemQuotation[]) => {
- console.log('견적 변경:', quotations)
+ console.log('입찰 변경:', quotations)
setPrItemQuotations(quotations)
}
// 총 금액 변경 핸들러
const handleTotalAmountChange = (total: number) => {
setTotalQuotationAmount(total)
- // 자동으로 총 견적 금액도 업데이트
+ // 자동으로 총 입찰 금액도 업데이트
setResponseData(prev => ({
...prev,
finalQuoteAmount: total.toString()
@@ -517,7 +517,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
if (prItemQuotations.length === 0) {
toast({
title: '저장할 데이터 없음',
- description: '저장할 품목별 견적이 없습니다.',
+ description: '저장할 품목별 입찰이 없습니다.',
variant: 'destructive',
})
return
@@ -545,7 +545,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
if (result.success) {
toast({
title: '임시 저장 완료',
- description: '품목별 견적이 임시 저장되었습니다.',
+ description: '품목별 입찰이 임시 저장되었습니다.',
})
} else {
toast({
@@ -580,7 +580,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
return
}
- if (isBrowser && !window.confirm('응찰을 취소하시겠습니까? 작성한 견적 내용이 모두 삭제됩니다.')) {
+ if (isBrowser && !window.confirm('응찰을 취소하시겠습니까? 작성한 입찰 내용이 모두 삭제됩니다.')) {
return
}
@@ -653,17 +653,17 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
if (!responseData.finalQuoteAmount.trim()) {
toast({
title: '유효성 오류',
- description: '견적 금액을 입력해주세요.',
+ description: '입찰 금액을 입력해주세요.',
variant: 'destructive',
})
return
}
- // 품목별 견적이 있는지 확인
+ // 품목별 입찰이 있는지 확인
if (prItems.length > 0 && prItemQuotations.length === 0) {
toast({
title: '유효성 오류',
- description: '품목별 견적을 작성해주세요.',
+ description: '품목별 입찰을 작성해주세요.',
variant: 'destructive',
})
return
@@ -683,7 +683,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
throw new Error(participationResult.error)
}
- // 2. 최종 견적 응답 제출 (PR 아이템별 견적 포함)
+ // 2. 최종 입찰 응답 제출 (PR 아이템별 입찰 포함)
const result = await submitPartnerResponse(
biddingDetail.biddingCompanyId,
{
@@ -708,7 +708,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
if (result.success) {
toast({
title: isFinalSubmission ? '응찰 완료' : '임시 저장 완료',
- description: isFinalSubmission ? '견적이 최종 제출되었습니다.' : '견적이 임시 저장되었습니다.',
+ description: isFinalSubmission ? '입찰이 최종 제출되었습니다.' : '입찰이 임시 저장되었습니다.',
})
// 데이터 새로고침
@@ -1060,7 +1060,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
<XCircle className="w-16 h-16 text-destructive mx-auto mb-4" />
<h3 className="text-lg font-semibold text-destructive mb-2">입찰에 참여하지 않기로 결정했습니다</h3>
<p className="text-muted-foreground">
- 해당 입찰에 대한 견적 제출 및 관련 기능은 이용할 수 없습니다.
+ 해당 입찰에 대한 입찰 제출 및 관련 기능은 이용할 수 없습니다.
</p>
</div>
</CardContent>
@@ -1081,7 +1081,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
</div>
<h3 className="text-lg font-semibold mb-2">이 입찰에 참여하시겠습니까?</h3>
<p className="text-muted-foreground mb-6">
- 참여를 선택하시면 견적 작성 및 제출이 가능합니다.
+ 참여를 선택하시면 입찰 작성 및 제출이 가능합니다.
</p>
<div className="flex justify-center gap-4">
<Button
@@ -1115,7 +1115,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
</CardTitle>
</CardHeader>
<CardContent className="space-y-6">
- {/* 품목별 상세 견적 테이블 */}
+ {/* 품목별 상세 입찰 테이블 */}
{prItems.length > 0 ? (
<PrItemsPricingTable
prItems={prItems}
@@ -1133,7 +1133,7 @@ export function PartnersBiddingDetail({ biddingId, companyId }: PartnersBiddingD
</div>
)}
- {/* 견적 첨부파일 섹션 */}
+ {/* 입찰 첨부파일 섹션 */}
{biddingDetail && userId && (
<SimpleFileUpload
biddingId={biddingId}