summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-11-27 09:43:55 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-11-27 09:43:55 +0000
commitdaabc02e9ae54f216ada77aa826b349f37c3281a (patch)
tree74c6f94e0c66ee31dfeac2f355c5156431cd42e3 /components
parent5870b73785715d1585531e655c06d8c068eb64ac (diff)
(최겸) 구매 입찰 피드백 반영(80%완)
Diffstat (limited to 'components')
-rw-r--r--components/bidding/manage/bidding-items-editor.tsx28
-rw-r--r--components/bidding/manage/bidding-schedule-editor.tsx15
-rw-r--r--components/common/selectors/procurement-item/procurement-item-selector.tsx12
3 files changed, 29 insertions, 26 deletions
diff --git a/components/bidding/manage/bidding-items-editor.tsx b/components/bidding/manage/bidding-items-editor.tsx
index f61b3960..ef0aa568 100644
--- a/components/bidding/manage/bidding-items-editor.tsx
+++ b/components/bidding/manage/bidding-items-editor.tsx
@@ -676,6 +676,7 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[300px]">자재명</th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">수량(중량) <span className="text-red-500">*</span></th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">단위 <span className="text-red-500">*</span></th>
+ <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">납품요청일 <span className="text-red-500">*</span></th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">가격단위</th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">구매단위</th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[100px]">자재순중량</th>
@@ -686,7 +687,6 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">예산통화</th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">실적금액</th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">실적통화</th>
- <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">납품요청일 <span className="text-red-500">*</span></th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[300px]">WBS코드</th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[150px]">WBS명</th>
<th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">코스트센터코드</th>
@@ -755,6 +755,9 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems
<span className="text-xs text-muted-foreground">-</span>
</td>
<td className="border-r px-3 py-3 text-center">
+ <span className="text-xs text-muted-foreground">-</span>
+ </td>
+ <td className="border-r px-3 py-3 text-center">
<span className="text-xs">{formatNumberWithCommas(totals.targetAmountTotal.toString())}</span>
</td>
<td className="border-r px-3 py-3 text-center">
@@ -784,9 +787,7 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems
<td className="border-r px-3 py-3 text-center">
<span className="text-xs text-muted-foreground">-</span>
</td>
- <td className="border-r px-3 py-3 text-center">
- <span className="text-xs text-muted-foreground">-</span>
- </td>
+
<td className="border-r px-3 py-3 text-center">
<span className="text-xs text-muted-foreground">-</span>
</td>
@@ -998,6 +999,15 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems
</td>
<td className="border-r px-3 py-2">
<Input
+ type="date"
+ value={item.requestedDeliveryDate || ''}
+ onChange={(e) => updatePRItem(item.id, { requestedDeliveryDate: e.target.value })}
+ className="h-8 text-xs"
+ required
+ />
+ </td>
+ <td className="border-r px-3 py-2">
+ <Input
type="number"
min="1"
step="1"
@@ -1124,15 +1134,7 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems
</SelectContent>
</Select>
</td>
- <td className="border-r px-3 py-2">
- <Input
- type="date"
- value={item.requestedDeliveryDate || ''}
- onChange={(e) => updatePRItem(item.id, { requestedDeliveryDate: e.target.value })}
- className="h-8 text-xs"
- required
- />
- </td>
+
<td className="border-r px-3 py-2">
<Button
variant="outline"
diff --git a/components/bidding/manage/bidding-schedule-editor.tsx b/components/bidding/manage/bidding-schedule-editor.tsx
index ca4643ff..4ddaee08 100644
--- a/components/bidding/manage/bidding-schedule-editor.tsx
+++ b/components/bidding/manage/bidding-schedule-editor.tsx
@@ -140,6 +140,15 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc
return round > 1
}
+ // UTC 날짜를 한국 시간(KST) 기준 datetime-local 입력값으로 변환
+ const toKstInputValue = (date: string | Date | undefined | null) => {
+ if (!date) return ''
+ const d = new Date(date)
+ // UTC 시간에 9시간을 더함
+ const kstTime = d.getTime() + (9 * 60 * 60 * 1000)
+ return new Date(kstTime).toISOString().slice(0, 16)
+ }
+
// 데이터 로딩
React.useEffect(() => {
const loadSchedule = async () => {
@@ -156,8 +165,8 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc
})
setSchedule({
- submissionStartDate: bidding.submissionStartDate ? new Date(bidding.submissionStartDate).toISOString().slice(0, 16) : '',
- submissionEndDate: bidding.submissionEndDate ? new Date(bidding.submissionEndDate).toISOString().slice(0, 16) : '',
+ submissionStartDate: toKstInputValue(bidding.submissionStartDate),
+ submissionEndDate: toKstInputValue(bidding.submissionEndDate),
remarks: bidding.remarks || '',
isUrgent: bidding.isUrgent || false,
hasSpecificationMeeting: bidding.hasSpecificationMeeting || false,
@@ -170,7 +179,7 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc
if (meetingDetails.success && meetingDetails.data) {
const meeting = meetingDetails.data
setSpecMeetingInfo({
- meetingDate: meeting.meetingDate ? new Date(meeting.meetingDate).toISOString().slice(0, 16) : '',
+ meetingDate: toKstInputValue(meeting.meetingDate),
meetingTime: meeting.meetingTime || '',
location: meeting.location || '',
address: meeting.address || '',
diff --git a/components/common/selectors/procurement-item/procurement-item-selector.tsx b/components/common/selectors/procurement-item/procurement-item-selector.tsx
index 5650959c..f09fea3d 100644
--- a/components/common/selectors/procurement-item/procurement-item-selector.tsx
+++ b/components/common/selectors/procurement-item/procurement-item-selector.tsx
@@ -44,13 +44,9 @@ export function ProcurementItemSelector({
// 검색 쿼리가 변경될 때마다 검색 실행
useEffect(() => {
const performSearch = async () => {
- if (debouncedSearchQuery.length < 1) {
- setSearchResults([]);
- return;
- }
-
setIsLoading(true);
try {
+ // 검색어가 없어도 기본 목록 로드 (기본 50개 등 백엔드 설정에 따름)
const results = await searchProcurementItemsForSelector(debouncedSearchQuery);
setSearchResults(results);
} catch (error) {
@@ -119,11 +115,7 @@ export function ProcurementItemSelector({
<CommandEmpty>
{isLoading ? (
<div className="py-6 text-center text-sm text-muted-foreground">
- 검색 중...
- </div>
- ) : searchQuery.length < 1 ? (
- <div className="py-6 text-center text-sm text-muted-foreground">
- 품목코드 또는 품목명을 입력하세요
+ 로딩 중...
</div>
) : (
<div className="py-6 text-center text-sm text-muted-foreground">