수정
This commit is contained in:
@@ -295,19 +295,17 @@ export interface BillingDetailParams {
|
|||||||
|
|
||||||
export interface AmountInfo {
|
export interface AmountInfo {
|
||||||
mid?: string;
|
mid?: string;
|
||||||
amount?: number;
|
transactionAmount?: number;
|
||||||
cardAmount?: number;
|
escrowFee?: number;
|
||||||
pointAmount?: number;
|
pointAmount?: number;
|
||||||
couponAmount?: number;
|
couponAmount?: number;
|
||||||
kakaoMoney?: number;
|
partServiceCode?: number;
|
||||||
kakaoPoint?: number;
|
kakaoDiscountAmount?: number;
|
||||||
kakaoInstantDiscount?: number;
|
tossDiscountAmount?: number;
|
||||||
naverPoint?: number;
|
multiPointAmount?: number;
|
||||||
tossMoney?: number;
|
multiCouponAmount?: number;
|
||||||
tossDiscount?: number;
|
receiptAmount?: number;
|
||||||
paycoPoint?: number;
|
cupDepositAmount?: number;
|
||||||
paycoCoupon?: number;
|
|
||||||
escrowFee?: number;
|
|
||||||
};
|
};
|
||||||
export interface ImportantInfo {
|
export interface ImportantInfo {
|
||||||
moid?: string;
|
moid?: string;
|
||||||
@@ -321,6 +319,8 @@ export interface ImportantInfo {
|
|||||||
requestDate?: string;
|
requestDate?: string;
|
||||||
cancelDate?: string;
|
cancelDate?: string;
|
||||||
goodsName?: string;
|
goodsName?: string;
|
||||||
|
|
||||||
|
orderNumber?: string;
|
||||||
};
|
};
|
||||||
export interface PaymentInfo {
|
export interface PaymentInfo {
|
||||||
approvalAcquire?: string;
|
approvalAcquire?: string;
|
||||||
|
|||||||
@@ -18,19 +18,18 @@ export const AmountInfoSection = ({
|
|||||||
|
|
||||||
const subItems: Record<string, Record<string, string>> = {
|
const subItems: Record<string, Record<string, string>> = {
|
||||||
mid: {name: 'MID', type: 'string'},
|
mid: {name: 'MID', type: 'string'},
|
||||||
amount: {name: '거래금액', type: 'number'},
|
transactionAmount: {name: '거래금액', type: 'number'},
|
||||||
cardAmount: {name: '신용카드금액', type: 'number'},
|
escrowFee: {name: '에스크로수수료', type: 'number'},
|
||||||
|
|
||||||
pointAmount: {name: '포인트금액', type: 'number'},
|
pointAmount: {name: '포인트금액', type: 'number'},
|
||||||
couponAmount: {name: '쿠폰금액', type: 'number'},
|
couponAmount: {name: '쿠폰금액', type: 'number'},
|
||||||
kakaoMoney: {name: '카카오머니', type: 'number'},
|
partServiceCode: {name: '간편결제코드', type: 'string' },
|
||||||
kakaoPoint: {name: '카카오포인트', type: 'number'},
|
kakaoDiscountAmount: {name: '카카오 즉시할인', type: 'number'},
|
||||||
kakaoInstantDiscount: {name: '카카오 즉시할인', type: 'number'},
|
tossDiscountAmount: {name: '토스할인', type: 'number'},
|
||||||
naverPoint: {name: '네이버 포인트', type: 'number'},
|
multiPointAmount: {name: '멀티포인트금액', type: 'number'},
|
||||||
tossMoney: {name: '토스머니', type: 'number'},
|
multiCouponAmount: {name: '멀티쿠폰금액', type: 'number'},
|
||||||
tossDiscount: {name: '토스할인', type: 'number'},
|
receiptAmount: {name: '영수증금액', type: 'number'},
|
||||||
paycoPoint: {name: '페이코 포인트', type: 'number'},
|
cupDepositAmount: {name: '컵보증금', type: 'number'},
|
||||||
paycoCoupon: {name: '페이코 쿠폰', type: 'number'},
|
|
||||||
escrowFee: {name: '에스크로수수료', type: 'number'}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const showTop = ['01', '02', '03', '26'];
|
const showTop = ['01', '02', '03', '26'];
|
||||||
@@ -42,21 +41,21 @@ export const AmountInfoSection = ({
|
|||||||
'tossMoney', 'tossDiscount', 'paycoPoint', 'paycoCoupon'
|
'tossMoney', 'tossDiscount', 'paycoPoint', 'paycoCoupon'
|
||||||
],
|
],
|
||||||
// 계좌이체
|
// 계좌이체
|
||||||
'02': ['amount', 'mid', 'escrowFee'],
|
'02': ['mid', 'transactionAmount', 'escrowFee'],
|
||||||
// 가상계좌
|
// 가상계좌
|
||||||
'03': ['amount', 'mid'],
|
'03': ['mid', 'transactionAmount'],
|
||||||
// 휴대폰
|
// 휴대폰
|
||||||
'04': ['amount', 'mid'],
|
'05': ['mid', 'transactionAmount'],
|
||||||
// 계좌간편결제
|
|
||||||
'26': ['amount', 'mid', 'escrowFee'],
|
|
||||||
// SSG머니
|
|
||||||
'21': ['amount', 'mid'],
|
|
||||||
// SSG은행계좌
|
|
||||||
'24': ['amount', 'mid'],
|
|
||||||
// 문화상품권
|
// 문화상품권
|
||||||
'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) => {
|
const checkValue = (val: any) => {
|
||||||
@@ -120,7 +119,7 @@ export const AmountInfoSection = ({
|
|||||||
<div className="txn-amount">
|
<div className="txn-amount">
|
||||||
<div className="value">
|
<div className="value">
|
||||||
<NumericFormat
|
<NumericFormat
|
||||||
value={ amountInfo?.amount }
|
value={ amountInfo?.transactionAmount }
|
||||||
thousandSeparator
|
thousandSeparator
|
||||||
displayType="text"
|
displayType="text"
|
||||||
></NumericFormat>
|
></NumericFormat>
|
||||||
|
|||||||
@@ -14,64 +14,69 @@ export const PaymentInfoSection = ({
|
|||||||
}: InfoSectionProps) => {
|
}: InfoSectionProps) => {
|
||||||
|
|
||||||
const subItems: Record<string, Record<string, string>> = {
|
const subItems: Record<string, Record<string, string>> = {
|
||||||
approvalAcquire: {name: '승인매입', type: 'string'},
|
approvalPurchase: {name: '승인매입', type: 'string'},
|
||||||
approvalReturn: {name: '승인반송(횟수)', type: 'number'},
|
approvalRejectCount: {name: '승인반송(횟수)', type: 'number', addString: '건'},
|
||||||
approvalReAcquire: {name: '승인재매입(횟수)', type: 'number'},
|
approvalRepurchaseCount: {name: '승인재매입(횟수)', type: 'number', addString: '건'},
|
||||||
approvalVAN: {name: '승인VAN', type: 'string'},
|
approvalVAN: {name: '승인VAN', type: 'string'},
|
||||||
cancelAcquire: {name: '취소매입', type: 'string'},
|
cancelPurchase: {name: '취소매입', type: 'string'},
|
||||||
cancelReturn: {name: '취소반송', type: 'string'},
|
cancelRejectCount: {name: '취소반송', type: 'number', addString: '건'},
|
||||||
cancelReAcquire: {name: '취소재매입', type: 'string'},
|
cancelRepurchaseCount: {name: '취소재매입', type: 'number', addString: '건'},
|
||||||
acquireVAN: {name: '매입VAN', type: 'string'},
|
purchaseVan: {name: '매입VAN', type: 'string'},
|
||||||
acquireCompany: {name: '매입사(발급사)', type: 'string'},
|
purchaseCompany: {name: '매입사(발급사)', type: 'string'},
|
||||||
cardNumber: {name: '카드번호', type: 'string'},
|
cardNo: {name: '카드번호', type: 'string'},
|
||||||
approvalNumber: {name: '승인번호', type: 'string'},
|
approvalNo: {name: '승인번호', type: 'string'},
|
||||||
installmentPeriod: {name: '할부기간', type: 'number'},
|
installmentMonth: {name: '할부기간', type: 'string', addString: '개월'},
|
||||||
authentication: {name: '인증', type: 'string'},
|
authentication: {name: '인증', type: 'string'},
|
||||||
accountType: {name: '유형', type: 'string'},
|
|
||||||
|
joinType: {name: '유형', type: 'string'},
|
||||||
bankName: {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'},
|
depositBankName: {name: '입금금융기관명', type: 'string'},
|
||||||
depositorName: {name: '입금자명', type: 'string'},
|
depositorName: {name: '입금자명', type: 'string'},
|
||||||
depositDeadline: {name: '입금기한', type: 'date'},
|
depositDeadline: {name: '입금기한', type: 'date'},
|
||||||
depositDate: {name: '입금일', type: 'date'},
|
depositDate: {name: '입금일', type: 'date'},
|
||||||
refundScheduleDate: {name: '환불예정일', type: 'date'},
|
refundScheduleDate: {name: '환불예정일', type: 'date'},
|
||||||
refundBankName: {name: '환불은행명', type: 'string'},
|
refundBankName: {name: '환불은행명', type: 'string'},
|
||||||
refundAccountNumber: {name: '환불계좌번호', type: 'string'},
|
refundAccountNo: {name: '환불계좌번호', type: 'string'},
|
||||||
accountHolder: {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<string, Array<string>> = {
|
const openSubItems: Record<string, Array<string>> = {
|
||||||
// 신용카드
|
// 신용카드
|
||||||
'01': ['approvalAcquire', 'approvalReturn', 'approvalReAcquire',
|
'01': ['approvalPurchase', 'approvalRejectCount', 'approvalRepurchaseCount',
|
||||||
'approvalVAN', 'cancelAcquire', 'cancelReturn', 'cancelReAcquire',
|
'approvalVAN', 'cancelPurchase', 'cancelRejectCount', 'cancelRepurchaseCount',
|
||||||
'acquireVAN', 'acquireCompany', 'cardNumber', 'approvalNumber',
|
'purchaseVan', 'purchaseCompany', 'cardNo', 'approvalNo',
|
||||||
'installmentPeriod', 'authentication'],
|
'installmentMonth', 'authentication'],
|
||||||
// 계좌이체
|
// 계좌이체
|
||||||
'02': ['accountType', 'bankName', 'accountNumber'],
|
'02': ['joinType', 'bankName', 'accountNo'],
|
||||||
// 가상계좌
|
// 가상계좌
|
||||||
'03': ['bankName', 'accountNumber', 'depositBankName', 'depositorName',
|
'03': ['bankName', 'accountNo', 'depositBankName', 'depositorName',
|
||||||
'depositDeadline', 'depositDate', 'refundScheduleDate',
|
'depositDeadline', 'depositDate', 'refundScheduleDate',
|
||||||
'refundBankName', 'refundAccountNumber', 'accountHolder'],
|
'refundBankName', 'refundAccountNo', 'accountHolder'],
|
||||||
// 휴대폰
|
// 휴대폰
|
||||||
'04': ['refundCompleteDate', 'partner', 'cpid', 'productCategory', 'phoneNumber'],
|
'05': ['refundCompleteDate', 'partner', 'cpid', 'goodsCategory', 'cellphoneNo'],
|
||||||
// 계좌간편결제
|
// 문화상품권
|
||||||
'26': ['bankName', 'refundCompleteDate', 'accountHolder', 'accountType', 'customerId'],
|
'14': ['culturelandId'],
|
||||||
// SSG머니
|
// SSG머니
|
||||||
'21': ['giftCardNumber'],
|
'21': ['giftCardNumber'],
|
||||||
// SSG은행계좌
|
// SSG은행계좌
|
||||||
'24': [],
|
'24': [],
|
||||||
// 문화상품권
|
// 계좌간편결제
|
||||||
'14': ['culturelandId'],
|
'26': ['bankName', 'refundCompleteDate', 'accountHolder', 'joinType', 'customerId'],
|
||||||
// 티머니페이
|
// 티머니페이
|
||||||
'31': ['cardNumber', 'approvalNumber', 'cpid'],
|
'31': ['cardNo', 'approvalNo', 'cpid'],
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkValue = (val: any) => {
|
const checkValue = (val: any) => {
|
||||||
@@ -93,14 +98,23 @@ export const PaymentInfoSection = ({
|
|||||||
<span className="k">· { subItems[k]?.name }</span>
|
<span className="k">· { subItems[k]?.name }</span>
|
||||||
<span className="v">
|
<span className="v">
|
||||||
{ (checkValue(newPaymentInfo[k]) && subItems[k]?.type === 'string') &&
|
{ (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 === 'number') &&
|
||||||
<NumericFormat
|
<NumericFormat
|
||||||
value={ newPaymentInfo[k] }
|
value={ newPaymentInfo[k] }
|
||||||
thousandSeparator
|
thousandSeparator
|
||||||
displayType="text"
|
displayType="text"
|
||||||
suffix='원'
|
suffix={ subItems[k]?.addString }
|
||||||
></NumericFormat>
|
></NumericFormat>
|
||||||
}
|
}
|
||||||
{ (checkValue(newPaymentInfo[k]) && subItems[k]?.type === 'date') &&
|
{ (checkValue(newPaymentInfo[k]) && subItems[k]?.type === 'date') &&
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ export const TransactionInfoSection = ({
|
|||||||
|
|
||||||
const subItems: Record<string, Record<string, string>> = {
|
const subItems: Record<string, Record<string, string>> = {
|
||||||
buyerName: {name: '구매자명', type: 'string'},
|
buyerName: {name: '구매자명', type: 'string'},
|
||||||
email: {name: '이메일', type: 'string'},
|
buyerEmail: {name: '이메일', type: 'string'},
|
||||||
phoneNumber: {name: '전화번호', type: 'string'},
|
buyerTel: {name: '전화번호', type: 'string'},
|
||||||
cancelReason: {name: '취소사유', type: 'string'},
|
cancelReason: {name: '취소사유', type: 'string'},
|
||||||
cancelRequestor: {name: '취소요청자', type: 'string'},
|
cancelRequestor: {name: '취소요청자', type: 'string'},
|
||||||
partialCancel: {name: '부분취소', type: 'string'},
|
partialCancel: {name: '부분취소', type: 'string'},
|
||||||
@@ -25,32 +25,35 @@ export const TransactionInfoSection = ({
|
|||||||
|
|
||||||
const openSubItems: Record<string, Array<string>> = {
|
const openSubItems: Record<string, Array<string>> = {
|
||||||
// 신용카드
|
// 신용카드
|
||||||
'01': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
'01': ['buyerName', 'buyerEmail', 'buyerTel',
|
||||||
'cancelRequestor', 'partialCancel'],
|
'cancelReason', 'cancelRequestor', 'partialCancel'],
|
||||||
// 계좌이체
|
// 계좌이체
|
||||||
'02': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
'02': ['buyerName', 'buyerEmail', 'buyerTel',
|
||||||
'cancelRequestor', 'partialCancel', 'cashReceiptIssue'],
|
'cancelReason', 'cancelRequestor', 'partialCancel',
|
||||||
|
'cashReceiptIssue'],
|
||||||
// 가상계좌
|
// 가상계좌
|
||||||
'03': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
'03': ['buyerName', 'buyerEmail', 'buyerTel',
|
||||||
'cancelRequestor', 'partialCancel', 'cashReceiptIssue'],
|
'cancelReason', 'cancelRequestor', 'partialCancel',
|
||||||
|
'cashReceiptIssue'],
|
||||||
// 휴대폰
|
// 휴대폰
|
||||||
'04': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
'05': ['buyerName', 'buyerEmail', 'buyerTel',
|
||||||
'cancelRequestor'],
|
'cancelReason', 'cancelRequestor'],
|
||||||
// 계좌간편결제
|
|
||||||
'26': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
|
||||||
'cancelRequestor', 'partialCancel', 'cashReceiptIssue'],
|
|
||||||
// SSG머니
|
|
||||||
'21': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
|
||||||
'cancelRequestor'],
|
|
||||||
// SSG은행계좌
|
|
||||||
'24': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
|
||||||
'cancelRequestor'],
|
|
||||||
// 문화상품권
|
// 문화상품권
|
||||||
'14': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
'14': ['buyerName', 'buyerEmail', 'buyerTel',
|
||||||
'cancelRequestor'],
|
'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',
|
'31': ['buyerName', 'buyerEmail', 'buyerTel',
|
||||||
'cancelRequestor'],
|
'cancelReason', 'cancelRequestor'],
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkValue = (val: any) => {
|
const checkValue = (val: any) => {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export const EscrowDetailPage = () => {
|
|||||||
setTransactionInfo(rs.transactionInfo);
|
setTransactionInfo(rs.transactionInfo);
|
||||||
setSettlementInfo(rs.settlementInfo);
|
setSettlementInfo(rs.settlementInfo);
|
||||||
|
|
||||||
setOrderNumber(rs.importantInfo?.ordNo);
|
setOrderNumber(rs.importantInfo?.orderNumber);
|
||||||
setTid(rs.importantInfo?.tid);
|
setTid(rs.importantInfo?.tid);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user