fix(WEB): 영업 페이지 및 견적 타입 수정
- 생산지시 페이지 에러 처리 개선 - 견적관리 상세 페이지 개선 - quotes types 수정
This commit is contained in:
@@ -69,6 +69,7 @@ export interface QuoteItem {
|
||||
id: string;
|
||||
quoteId: string;
|
||||
productId?: string;
|
||||
itemCode?: string; // 품목코드 (item_code)
|
||||
productName: string;
|
||||
specification?: string;
|
||||
unit?: string;
|
||||
@@ -298,6 +299,7 @@ export function transformItemApiToFrontend(apiData: QuoteItemApiData): QuoteItem
|
||||
id: String(apiData.id),
|
||||
quoteId: String(apiData.quote_id),
|
||||
productId: apiData.item_id ? String(apiData.item_id) : (apiData.product_id ? String(apiData.product_id) : undefined),
|
||||
itemCode: apiData.item_code || undefined, // 품목코드
|
||||
productName,
|
||||
specification: apiData.specification || undefined,
|
||||
unit: apiData.unit || undefined,
|
||||
@@ -545,7 +547,7 @@ export function transformQuoteToFormData(quote: Quote): QuoteFormData {
|
||||
? quote.items.map((item, index) => ({
|
||||
itemIndex: index,
|
||||
finishedGoodsCode: '',
|
||||
itemCode: item.productId || item.id || '',
|
||||
itemCode: item.itemCode || '', // 품목코드 사용
|
||||
itemName: item.productName,
|
||||
itemType: '',
|
||||
itemCategory: '',
|
||||
|
||||
Reference in New Issue
Block a user