summaryrefslogtreecommitdiff
path: root/lib/techsales-rfq/service.ts
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-08-11 09:00:38 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-08-11 09:00:38 +0000
commiteb654f88214095f71be142b989e620fd28db3f69 (patch)
treeaaad3074de4a6422a880b35f9e577d489b0a6c91 /lib/techsales-rfq/service.ts
parenta383fd2a30f60360ebc0c1b897b3d43cbae178fa (diff)
(최겸) 기술영업 변경사항 반영, PQ/실사 변경사항 반영
Diffstat (limited to 'lib/techsales-rfq/service.ts')
-rw-r--r--lib/techsales-rfq/service.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/techsales-rfq/service.ts b/lib/techsales-rfq/service.ts
index 0d00a4e2..5ec02f63 100644
--- a/lib/techsales-rfq/service.ts
+++ b/lib/techsales-rfq/service.ts
@@ -911,6 +911,7 @@ export async function getTechSalesVendorQuotation(quotationId: number) {
status: quotation.status,
remark: quotation.remark,
rejectionReason: quotation.rejectionReason,
+ vendorFlags: quotation.vendorFlags,
submittedAt: quotation.submittedAt,
acceptedAt: quotation.acceptedAt,
createdAt: quotation.createdAt,
@@ -3132,6 +3133,7 @@ export async function getTechSalesRfqTechVendors(rfqId: number) {
validUntil: techSalesVendorQuotations.validUntil,
submittedAt: techSalesVendorQuotations.submittedAt,
createdAt: techSalesVendorQuotations.createdAt,
+ vendorFlags: techSalesVendorQuotations.vendorFlags, // 벤더 구분자 정보 추가
})
.from(techSalesVendorQuotations)
.innerJoin(techVendors, eq(techSalesVendorQuotations.vendorId, techVendors.id))
@@ -3794,9 +3796,10 @@ export async function getAcceptedTechSalesVendorQuotations(input: {
if (rfqItems.length === 0) {
// 아이템이 없는 경우 각 벤더별로 행 생성
- vendorQuotations.forEach((quotation) => {
+ vendorQuotations.forEach((quotation: any, vendorIndex: number) => {
expandedData.push({
...quotation.vendorQuotation,
+ uniqueKey: `${quotation.vendorQuotation.id}-${quotation.vendorQuotation.rfqId}-no-item-${vendorIndex}`, // 유니크 키 생성
rfqItems: [],
itemIndex: 0,
totalItems: 0,
@@ -3814,6 +3817,7 @@ export async function getAcceptedTechSalesVendorQuotations(input: {
vendorQuotations.forEach((quotation: { vendorQuotation: any; rfqItems: RfqItemInfo[] }, vendorIndex: number) => {
expandedData.push({
...quotation.vendorQuotation,
+ uniqueKey: `${quotation.vendorQuotation.id}-${quotation.vendorQuotation.rfqId}-item-${itemIndex}-vendor-${vendorIndex}`, // 유니크 키 생성
rfqItems: [rfqItem], // 단일 아이템만 포함
itemIndex: itemIndex,
totalItems: rfqItems.length,