diff --git a/src/entities/transaction/model/types.ts b/src/entities/transaction/model/types.ts index e3301fa..34e35d8 100644 --- a/src/entities/transaction/model/types.ts +++ b/src/entities/transaction/model/types.ts @@ -295,19 +295,17 @@ export interface BillingDetailParams { export interface AmountInfo { mid?: string; - amount?: number; - cardAmount?: number; + transactionAmount?: number; + escrowFee?: number; pointAmount?: number; couponAmount?: number; - kakaoMoney?: number; - kakaoPoint?: number; - kakaoInstantDiscount?: number; - naverPoint?: number; - tossMoney?: number; - tossDiscount?: number; - paycoPoint?: number; - paycoCoupon?: number; - escrowFee?: number; + partServiceCode?: number; + kakaoDiscountAmount?: number; + tossDiscountAmount?: number; + multiPointAmount?: number; + multiCouponAmount?: number; + receiptAmount?: number; + cupDepositAmount?: number; }; export interface ImportantInfo { moid?: string; @@ -321,6 +319,8 @@ export interface ImportantInfo { requestDate?: string; cancelDate?: string; goodsName?: string; + + orderNumber?: string; }; export interface PaymentInfo { approvalAcquire?: string; diff --git a/src/entities/transaction/ui/section/amount-info-section.tsx b/src/entities/transaction/ui/section/amount-info-section.tsx index 702f250..24347a3 100644 --- a/src/entities/transaction/ui/section/amount-info-section.tsx +++ b/src/entities/transaction/ui/section/amount-info-section.tsx @@ -18,19 +18,18 @@ export const AmountInfoSection = ({ const subItems: Record> = { mid: {name: 'MID', type: 'string'}, - amount: {name: '거래금액', type: 'number'}, - cardAmount: {name: '신용카드금액', type: 'number'}, + transactionAmount: {name: '거래금액', type: 'number'}, + escrowFee: {name: '에스크로수수료', type: 'number'}, + pointAmount: {name: '포인트금액', type: 'number'}, couponAmount: {name: '쿠폰금액', type: 'number'}, - kakaoMoney: {name: '카카오머니', type: 'number'}, - kakaoPoint: {name: '카카오포인트', type: 'number'}, - kakaoInstantDiscount: {name: '카카오 즉시할인', type: 'number'}, - naverPoint: {name: '네이버 포인트', type: 'number'}, - tossMoney: {name: '토스머니', type: 'number'}, - tossDiscount: {name: '토스할인', type: 'number'}, - paycoPoint: {name: '페이코 포인트', type: 'number'}, - paycoCoupon: {name: '페이코 쿠폰', type: 'number'}, - escrowFee: {name: '에스크로수수료', type: 'number'} + partServiceCode: {name: '간편결제코드', type: 'string' }, + kakaoDiscountAmount: {name: '카카오 즉시할인', type: 'number'}, + tossDiscountAmount: {name: '토스할인', type: 'number'}, + multiPointAmount: {name: '멀티포인트금액', type: 'number'}, + multiCouponAmount: {name: '멀티쿠폰금액', type: 'number'}, + receiptAmount: {name: '영수증금액', type: 'number'}, + cupDepositAmount: {name: '컵보증금', type: 'number'}, }; const showTop = ['01', '02', '03', '26']; @@ -42,21 +41,21 @@ export const AmountInfoSection = ({ 'tossMoney', 'tossDiscount', 'paycoPoint', 'paycoCoupon' ], // 계좌이체 - '02': ['amount', 'mid', 'escrowFee'], + '02': ['mid', 'transactionAmount', 'escrowFee'], // 가상계좌 - '03': ['amount', 'mid'], + '03': ['mid', 'transactionAmount'], // 휴대폰 - '04': ['amount', 'mid'], - // 계좌간편결제 - '26': ['amount', 'mid', 'escrowFee'], - // SSG머니 - '21': ['amount', 'mid'], - // SSG은행계좌 - '24': ['amount', 'mid'], + '05': ['mid', 'transactionAmount'], // 문화상품권 - '14': ['amount', 'mid'], + '14': ['mid', 'transactionAmount'], + // SSG머니 + '21': ['mid', 'transactionAmount'], + // SSG은행계좌 + '24': ['mid', 'transactionAmount'], + // 계좌간편결제 + '26': ['mid', 'transactionAmount', 'escrowFee'], // 티머니페이 - '31': ['amount', 'mid'], + '31': ['mid', 'transactionAmount'], }; const checkValue = (val: any) => { @@ -120,7 +119,7 @@ export const AmountInfoSection = ({
diff --git a/src/entities/transaction/ui/section/payment-info-section.tsx b/src/entities/transaction/ui/section/payment-info-section.tsx index cd79f63..ccc360b 100644 --- a/src/entities/transaction/ui/section/payment-info-section.tsx +++ b/src/entities/transaction/ui/section/payment-info-section.tsx @@ -14,64 +14,69 @@ export const PaymentInfoSection = ({ }: InfoSectionProps) => { const subItems: Record> = { - approvalAcquire: {name: '승인매입', type: 'string'}, - approvalReturn: {name: '승인반송(횟수)', type: 'number'}, - approvalReAcquire: {name: '승인재매입(횟수)', type: 'number'}, + approvalPurchase: {name: '승인매입', type: 'string'}, + approvalRejectCount: {name: '승인반송(횟수)', type: 'number', addString: '건'}, + approvalRepurchaseCount: {name: '승인재매입(횟수)', type: 'number', addString: '건'}, approvalVAN: {name: '승인VAN', type: 'string'}, - cancelAcquire: {name: '취소매입', type: 'string'}, - cancelReturn: {name: '취소반송', type: 'string'}, - cancelReAcquire: {name: '취소재매입', type: 'string'}, - acquireVAN: {name: '매입VAN', type: 'string'}, - acquireCompany: {name: '매입사(발급사)', type: 'string'}, - cardNumber: {name: '카드번호', type: 'string'}, - approvalNumber: {name: '승인번호', type: 'string'}, - installmentPeriod: {name: '할부기간', type: 'number'}, + cancelPurchase: {name: '취소매입', type: 'string'}, + cancelRejectCount: {name: '취소반송', type: 'number', addString: '건'}, + cancelRepurchaseCount: {name: '취소재매입', type: 'number', addString: '건'}, + purchaseVan: {name: '매입VAN', type: 'string'}, + purchaseCompany: {name: '매입사(발급사)', type: 'string'}, + cardNo: {name: '카드번호', type: 'string'}, + approvalNo: {name: '승인번호', type: 'string'}, + installmentMonth: {name: '할부기간', type: 'string', addString: '개월'}, authentication: {name: '인증', type: 'string'}, - accountType: {name: '유형', type: 'string'}, + + joinType: {name: '유형', type: 'string'}, bankName: {name: '은행명', type: 'string'}, - accountNumber: {name: '계좌번호', type: 'string'}, + accountNo: {name: '계좌번호', type: 'string'}, + refundCompleteDate: {name: '환불완료일', type: 'string'}, + customerId: {name: '고객ID', type: 'string'}, + + culturelandId: {name: '컬처랜드ID', type: 'string'}, + + partner: {name: '제휴사', type: 'string'}, + cpid: {name: 'CPID', type: 'string'}, + goodsCategory: {name: '상품구분', type: 'string'}, + cellphoneNo: {name: '휴대폰번호', type: 'string'}, + + giftCardNumber: {name: '상품권번호', type: 'string'}, + depositBankName: {name: '입금금융기관명', type: 'string'}, depositorName: {name: '입금자명', type: 'string'}, depositDeadline: {name: '입금기한', type: 'date'}, depositDate: {name: '입금일', type: 'date'}, refundScheduleDate: {name: '환불예정일', type: 'date'}, refundBankName: {name: '환불은행명', type: 'string'}, - refundAccountNumber: {name: '환불계좌번호', type: 'string'}, + refundAccountNo: {name: '환불계좌번호', type: 'string'}, accountHolder: {name: '예금주', type: 'string'}, - refundCompleteDate: {name: '환불완료일', type: 'date'}, - partner: {name: '제휴사', type: 'string'}, - cpid: {name: 'CPID', type: 'string'}, - productCategory: {name: '상품구분', type: 'string'}, - phoneNumber: {name: '휴대폰번호', type: 'string'}, - customerId: {name: '고객ID', type: 'string'}, - giftCardNumber: {name: '상품권번호', type: 'string'}, - culturelandId: {name: '컬처랜드ID', type: 'string'}, }; const openSubItems: Record> = { // 신용카드 - '01': ['approvalAcquire', 'approvalReturn', 'approvalReAcquire', - 'approvalVAN', 'cancelAcquire', 'cancelReturn', 'cancelReAcquire', - 'acquireVAN', 'acquireCompany', 'cardNumber', 'approvalNumber', - 'installmentPeriod', 'authentication'], + '01': ['approvalPurchase', 'approvalRejectCount', 'approvalRepurchaseCount', + 'approvalVAN', 'cancelPurchase', 'cancelRejectCount', 'cancelRepurchaseCount', + 'purchaseVan', 'purchaseCompany', 'cardNo', 'approvalNo', + 'installmentMonth', 'authentication'], // 계좌이체 - '02': ['accountType', 'bankName', 'accountNumber'], + '02': ['joinType', 'bankName', 'accountNo'], // 가상계좌 - '03': ['bankName', 'accountNumber', 'depositBankName', 'depositorName', + '03': ['bankName', 'accountNo', 'depositBankName', 'depositorName', 'depositDeadline', 'depositDate', 'refundScheduleDate', - 'refundBankName', 'refundAccountNumber', 'accountHolder'], + 'refundBankName', 'refundAccountNo', 'accountHolder'], // 휴대폰 - '04': ['refundCompleteDate', 'partner', 'cpid', 'productCategory', 'phoneNumber'], - // 계좌간편결제 - '26': ['bankName', 'refundCompleteDate', 'accountHolder', 'accountType', 'customerId'], + '05': ['refundCompleteDate', 'partner', 'cpid', 'goodsCategory', 'cellphoneNo'], + // 문화상품권 + '14': ['culturelandId'], // SSG머니 '21': ['giftCardNumber'], // SSG은행계좌 '24': [], - // 문화상품권 - '14': ['culturelandId'], + // 계좌간편결제 + '26': ['bankName', 'refundCompleteDate', 'accountHolder', 'joinType', 'customerId'], // 티머니페이 - '31': ['cardNumber', 'approvalNumber', 'cpid'], + '31': ['cardNo', 'approvalNo', 'cpid'], }; const checkValue = (val: any) => { @@ -93,14 +98,23 @@ export const PaymentInfoSection = ({ ·  { subItems[k]?.name } { (checkValue(newPaymentInfo[k]) && subItems[k]?.type === 'string') && - newPaymentInfo[k] + (k === 'installmentMonth' && newPaymentInfo[k] === '00') && + '일시불' + } + { (checkValue(newPaymentInfo[k]) && subItems[k]?.type === 'string') && + (k === 'installmentMonth' && newPaymentInfo[k] !== '00') && + newPaymentInfo[k] + (subItems[k]?.addString || '') + } + { (checkValue(newPaymentInfo[k]) && subItems[k]?.type === 'string') && + ( k!== 'installmentMonth' ) && + newPaymentInfo[k] + (subItems[k]?.addString || '') } { (checkValue(newPaymentInfo[k]) && subItems[k]?.type === 'number') && } { (checkValue(newPaymentInfo[k]) && subItems[k]?.type === 'date') && diff --git a/src/entities/transaction/ui/section/transaction-info-section.tsx b/src/entities/transaction/ui/section/transaction-info-section.tsx index 2428cec..c8a2b33 100644 --- a/src/entities/transaction/ui/section/transaction-info-section.tsx +++ b/src/entities/transaction/ui/section/transaction-info-section.tsx @@ -15,8 +15,8 @@ export const TransactionInfoSection = ({ const subItems: Record> = { buyerName: {name: '구매자명', type: 'string'}, - email: {name: '이메일', type: 'string'}, - phoneNumber: {name: '전화번호', type: 'string'}, + buyerEmail: {name: '이메일', type: 'string'}, + buyerTel: {name: '전화번호', type: 'string'}, cancelReason: {name: '취소사유', type: 'string'}, cancelRequestor: {name: '취소요청자', type: 'string'}, partialCancel: {name: '부분취소', type: 'string'}, @@ -25,32 +25,35 @@ export const TransactionInfoSection = ({ const openSubItems: Record> = { // 신용카드 - '01': ['buyerName', 'email', 'phoneNumber', 'cancelReason', - 'cancelRequestor', 'partialCancel'], + '01': ['buyerName', 'buyerEmail', 'buyerTel', + 'cancelReason', 'cancelRequestor', 'partialCancel'], // 계좌이체 - '02': ['buyerName', 'email', 'phoneNumber', 'cancelReason', - 'cancelRequestor', 'partialCancel', 'cashReceiptIssue'], + '02': ['buyerName', 'buyerEmail', 'buyerTel', + 'cancelReason', 'cancelRequestor', 'partialCancel', + 'cashReceiptIssue'], // 가상계좌 - '03': ['buyerName', 'email', 'phoneNumber', 'cancelReason', - 'cancelRequestor', 'partialCancel', 'cashReceiptIssue'], + '03': ['buyerName', 'buyerEmail', 'buyerTel', + 'cancelReason', 'cancelRequestor', 'partialCancel', + 'cashReceiptIssue'], // 휴대폰 - '04': ['buyerName', 'email', 'phoneNumber', 'cancelReason', - 'cancelRequestor'], - // 계좌간편결제 - '26': ['buyerName', 'email', 'phoneNumber', 'cancelReason', - 'cancelRequestor', 'partialCancel', 'cashReceiptIssue'], - // SSG머니 - '21': ['buyerName', 'email', 'phoneNumber', 'cancelReason', - 'cancelRequestor'], - // SSG은행계좌 - '24': ['buyerName', 'email', 'phoneNumber', 'cancelReason', - 'cancelRequestor'], + '05': ['buyerName', 'buyerEmail', 'buyerTel', + 'cancelReason', 'cancelRequestor'], // 문화상품권 - '14': ['buyerName', 'email', 'phoneNumber', 'cancelReason', - 'cancelRequestor'], + '14': ['buyerName', 'buyerEmail', 'buyerTel', + 'cancelReason', 'cancelRequestor'], + // SSG머니 + '21': ['buyerName', 'buyerEmail', 'buyerTel', + 'cancelReason', 'cancelRequestor'], + // SSG은행계좌 + '24': ['buyerName', 'buyerEmail', 'buyerTel', + 'cancelReason', 'cancelRequestor'], + // 계좌간편결제 + '26': ['buyerName', 'buyerEmail', 'buyerTel', + 'cancelReason', 'cancelRequestor', 'partialCancel', + 'cashReceiptIssue'], // 티머니페이 - '31': ['buyerName', 'email', 'phoneNumber', 'cancelReason', - 'cancelRequestor'], + '31': ['buyerName', 'buyerEmail', 'buyerTel', + 'cancelReason', 'cancelRequestor'], }; const checkValue = (val: any) => { diff --git a/src/pages/transaction/escrow/detail-page.tsx b/src/pages/transaction/escrow/detail-page.tsx index 406e06a..eef9edc 100644 --- a/src/pages/transaction/escrow/detail-page.tsx +++ b/src/pages/transaction/escrow/detail-page.tsx @@ -71,7 +71,7 @@ export const EscrowDetailPage = () => { setTransactionInfo(rs.transactionInfo); setSettlementInfo(rs.settlementInfo); - setOrderNumber(rs.importantInfo?.ordNo); + setOrderNumber(rs.importantInfo?.orderNumber); setTid(rs.importantInfo?.tid); }); };