현금영수증 빠진 항목 수정 에스크로 amountInfo 셋팅

This commit is contained in:
focp212@naver.com
2025-10-27 15:44:47 +09:00
parent 333e1182ee
commit 3517157be5
5 changed files with 177 additions and 5 deletions

View File

@@ -336,6 +336,7 @@ export interface AmountInfo {
receiptAmount?: number; receiptAmount?: number;
cupDepositAmount?: number; cupDepositAmount?: number;
customerName?: string;
amount?: number; amount?: number;
supplyAmount?: number; supplyAmount?: number;
vat?: number; vat?: number;
@@ -486,6 +487,8 @@ export interface MerchantInfo {
} }
export interface DetailResponse { export interface DetailResponse {
amount?: number;
customerName?: string;
amountDetail?: AmountInfo; amountDetail?: AmountInfo;
amountInfo?: AmountInfo; amountInfo?: AmountInfo;
importantInfo?: ImportantInfo; importantInfo?: ImportantInfo;

View File

@@ -18,7 +18,6 @@ export const AmountInfoSection = ({
const { mutateAsync: downloadConfirmation } = useDownloadConfirmationMutation(); const { mutateAsync: downloadConfirmation } = useDownloadConfirmationMutation();
let newAmountInfo: Record<string, any> | undefined = amountInfo; let newAmountInfo: Record<string, any> | undefined = amountInfo;
console.log('amountInfo --> ', amountInfo);
const subItems: Record<string, Record<string, string>> = { const subItems: Record<string, Record<string, string>> = {
mid: {name: 'MID', type: 'string'}, mid: {name: 'MID', type: 'string'},
transactionRequestAmount: {name: '거래요청금액', type: 'number'}, transactionRequestAmount: {name: '거래요청금액', type: 'number'},
@@ -274,17 +273,166 @@ export const AmountInfoSection = ({
</> </>
} }
{ (transactionCategory === TransactionCategory.Escrow) && { (transactionCategory === TransactionCategory.Escrow) &&
<></> <>
{ (serviceCode === '02' || serviceCode === '03') &&
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
}
{ (serviceCode === '01') &&
<>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
</>
}
{ (serviceCode === '02' || serviceCode === '03') &&
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
}
{ (serviceCode === '01') &&
<>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
<li className="amount-item">
<span className="label">·&nbsp;&nbsp;</span>
<span className="value">
<NumericFormat
value={ amountInfo?.supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</span>
</li>
</>
}
</>
} }
</ul> </ul>
</div> </div>
} }
</SlideDown> </SlideDown>
{ (transactionCategory === TransactionCategory.AllTransaction) && { ((transactionCategory === TransactionCategory.AllTransaction) ||
(transactionCategory === TransactionCategory.Escrow)) &&
<div className="txn-mid"> <div className="txn-mid">
<span className="value">{ amountInfo?.mid }</span> <span className="value">{ amountInfo?.mid }</span>
</div> </div>
} }
{ (transactionCategory === TransactionCategory.CashReceipt) &&
<div className="txn-mid">
<span className="value">{ amountInfo?.customerName }</span>
</div>
}
<div className="txn-doc"> <div className="txn-doc">
{ {
((transactionCategory === TransactionCategory.CashReceipt) || ((transactionCategory === TransactionCategory.CashReceipt) ||

View File

@@ -76,6 +76,9 @@ export const CashReceiptDetailPage = () => {
tid: tid tid: tid
}; };
cashReceiptDetail(cashReceitDetailParams).then((rs: DetailResponse) => { cashReceiptDetail(cashReceitDetailParams).then((rs: DetailResponse) => {
if(rs.amountDetail){
rs.amountDetail.customerName = rs.customerName;
}
setAmountInfo(rs.amountDetail || {}); setAmountInfo(rs.amountDetail || {});
setIssueInfo(rs.issueInfo || {}); setIssueInfo(rs.issueInfo || {});
setDetailInfo(rs.detailInfo || {}); setDetailInfo(rs.detailInfo || {});

View File

@@ -19,7 +19,8 @@ import {
TransactionInfo, TransactionInfo,
SettlementInfo, SettlementInfo,
InfoSectionKeys, InfoSectionKeys,
MerchantInfo MerchantInfo,
AmountInfo
} from '@/entities/transaction/model/types'; } from '@/entities/transaction/model/types';
import { import {
useSetOnBack, useSetOnBack,
@@ -30,6 +31,7 @@ import {
import { EscrowMailResendBottomSheet } from '@/entities/transaction/ui/escrow-mail-resend-bottom-sheet'; import { EscrowMailResendBottomSheet } from '@/entities/transaction/ui/escrow-mail-resend-bottom-sheet';
import { useEscrowMailResendMutation } from '@/entities/transaction/api/use-escrow-mail-resend-mutation'; import { useEscrowMailResendMutation } from '@/entities/transaction/api/use-escrow-mail-resend-mutation';
import { MerchantInfoSection } from '@/entities/transaction/ui/section/merchant-info-section'; import { MerchantInfoSection } from '@/entities/transaction/ui/section/merchant-info-section';
import { AmountInfoSection } from '@/entities/transaction/ui/section/amount-info-section';
export const EscrowDetailPage = () => { export const EscrowDetailPage = () => {
const { navigate } = useNavigate(); const { navigate } = useNavigate();
@@ -37,7 +39,7 @@ export const EscrowDetailPage = () => {
const paramTid = location?.state.tid; const paramTid = location?.state.tid;
const serviceCode = location?.state.serviceCode; const serviceCode = location?.state.serviceCode;
const [amountInfo, setAmountInfo] = useState<ImportantInfo>(); const [amountInfo, setAmountInfo] = useState<AmountInfo>();
const [importantInfo, setImportantInfo] = useState<ImportantInfo>(); const [importantInfo, setImportantInfo] = useState<ImportantInfo>();
const [escrowInfo, setEscrowInfo] = useState<EscrowInfo>(); const [escrowInfo, setEscrowInfo] = useState<EscrowInfo>();
const [paymentInfo, setPaymentInfo] = useState<PaymentInfo>(); const [paymentInfo, setPaymentInfo] = useState<PaymentInfo>();
@@ -73,6 +75,7 @@ export const EscrowDetailPage = () => {
tid: tid || paramTid, tid: tid || paramTid,
}; };
escrowDetail(escroDetailParams).then((rs: DetailResponse) => { escrowDetail(escroDetailParams).then((rs: DetailResponse) => {
setAmountInfo(rs.amountInfo || {});
setImportantInfo(rs.importantInfo || {}); setImportantInfo(rs.importantInfo || {});
setEscrowInfo(rs.escrowInfo || {}); setEscrowInfo(rs.escrowInfo || {});
setPaymentInfo(rs.paymentInfo || {}); setPaymentInfo(rs.paymentInfo || {});
@@ -133,6 +136,15 @@ export const EscrowDetailPage = () => {
<div className="tab-pane sub active"> <div className="tab-pane sub active">
<div className="option-list"> <div className="option-list">
<div className="txn-detail"> <div className="txn-detail">
<AmountInfoSection
transactionCategory={ TransactionCategory.Escrow }
amountInfo={ amountInfo }
isOpen={ showAmountInfo }
tid={ tid }
serviceCode={ serviceCode }
onClickToOpenInfo={ (infoSectionKey) => onClickToOpenInfo(infoSectionKey) }
></AmountInfoSection>
<div className="txn-divider minus"></div>
<ImportantInfoSection <ImportantInfoSection
transactionCategory={ TransactionCategory.Escrow } transactionCategory={ TransactionCategory.Escrow }
importantInfo={ importantInfo } importantInfo={ importantInfo }

View File

@@ -394,4 +394,10 @@ main.home-main{
} }
.cancel-input{ .cancel-input{
width: calc(100% - 5px); width: calc(100% - 5px);
}
.txn-doc{
padding-top: 12px;
}
.mt12 {
margin-top: 12px;
} }