지급대행 요청
This commit is contained in:
@@ -7,9 +7,35 @@ import {
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { useExtensionPayoutDetailMutation } from '@/entities/additional-service/api/payout/use-extension-payout-detail-mutation';
|
||||
import { useLocation } from 'react-router';
|
||||
import { ExtensionPayoutDetailDownloadCertificateParams, ExtensionPayoutDetailDownloadCertificateResponse, ExtensionPayoutDetailParams, ExtensionPayoutDetailResponse } from '@/entities/additional-service/model/payout/types';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { useExtensionPayoutDetailDownloadCertificateMutation } from '@/entities/additional-service/api/payout/use-extension-payout-detail-download-cetificate-mutation';
|
||||
|
||||
export const PayoutDetailPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const location = useLocation();
|
||||
|
||||
const tid = location.state.tid;
|
||||
const mid = location.state.mid;
|
||||
|
||||
const [detail, setDetail] = useState<ExtensionPayoutDetailResponse>();
|
||||
|
||||
const { mutateAsync: extensionPayoutDetail } = useExtensionPayoutDetailMutation();
|
||||
const { mutateAsync: extensionPayoutDetailDownloadCertification } = useExtensionPayoutDetailDownloadCertificateMutation();
|
||||
|
||||
const callSettlementDetail = () => {
|
||||
let params: ExtensionPayoutDetailParams = {
|
||||
tid: tid,
|
||||
mid: mid,
|
||||
};
|
||||
|
||||
extensionPayoutDetail(params).then((rs: ExtensionPayoutDetailResponse) => {
|
||||
setDetail(rs);
|
||||
});
|
||||
};
|
||||
|
||||
useSetHeaderTitle('지급대행 상세');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
@@ -18,6 +44,20 @@ export const PayoutDetailPage = () => {
|
||||
navigate(PATHS.additionalService.payout.list);
|
||||
});
|
||||
|
||||
const onClickToDownload = () => {
|
||||
let params: ExtensionPayoutDetailDownloadCertificateParams = {
|
||||
tid: tid,
|
||||
mid: mid,
|
||||
};
|
||||
extensionPayoutDetailDownloadCertification(params).then((rs: ExtensionPayoutDetailDownloadCertificateResponse) => {
|
||||
console.log(rs);
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callSettlementDetail();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<main className="full-height">
|
||||
@@ -25,14 +65,22 @@ export const PayoutDetailPage = () => {
|
||||
<div className="tab-pane sub active">
|
||||
<div className="pay-top">
|
||||
<div className="num-amount">
|
||||
<span className="amount">10,000,000원</span>
|
||||
<span className="amount">
|
||||
<NumericFormat
|
||||
value={ detail?.disbursementAmount }
|
||||
thousandSeparator
|
||||
displayType="text"
|
||||
suffix='원'
|
||||
></NumericFormat>
|
||||
</span>
|
||||
</div>
|
||||
<div className="num-store">나이스테스트가맹점</div>
|
||||
<div className="num-day">2025.08.19</div>
|
||||
<div className="receipt-row">
|
||||
<button
|
||||
className="receipt-btn"
|
||||
type="button"
|
||||
type="button"
|
||||
onClick={ onClickToDownload }
|
||||
>
|
||||
<span className="icon-24 download"></span>
|
||||
<span>입출금 확인증</span>
|
||||
@@ -45,43 +93,43 @@ export const PayoutDetailPage = () => {
|
||||
<ul className="kv-list">
|
||||
<li className="kv-row">
|
||||
<span className="k">지급상태</span>
|
||||
<span className="v">요청</span>
|
||||
<span className="v">{ detail?.disbursementStatus }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">거래유형</span>
|
||||
<span className="v">최초요청</span>
|
||||
<span className="v">{ detail?.transTypeName }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">요청일</span>
|
||||
<span className="v">2025.06.05</span>
|
||||
<span className="v">{ detail?.requestDate }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">지급일시</span>
|
||||
<span className="v">2025.06.08 11:00:00</span>
|
||||
<span className="v">{ detail?.settlementDate }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">사업자번호</span>
|
||||
<span className="v">'123456789'</span>
|
||||
<span className="v">{ detail?.companyNo }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">예금주</span>
|
||||
<span className="v">김테스트</span>
|
||||
<span className="v">{ detail?.accountName }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">은행</span>
|
||||
<span className="v">기업은행</span>
|
||||
<span className="v">{ detail?.bankName }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">계좌번호</span>
|
||||
<span className="v">'1123456789'</span>
|
||||
<span className="v">{ detail?.accountNo }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">입금인자</span>
|
||||
<span className="v">나이스정산금</span>
|
||||
<span className="v">{ detail?.depositName }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">실패사유</span>
|
||||
<span className="v"> </span>
|
||||
<span className="v">{ detail?.failReason }</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user