자금이체 이체신청 상세 및 이체 등록
This commit is contained in:
@@ -16,12 +16,12 @@ export enum FundAccountReceiveAccountNameNo {
|
||||
|
||||
|
||||
export interface ExtensionFundAccountTransferRequestParams {
|
||||
mid: string;
|
||||
transferAmount: number;
|
||||
receiveBankCode: string;
|
||||
receiveAccountNo: string;
|
||||
receiveAccountName: string;
|
||||
transferMemo: string;
|
||||
mid?: string;
|
||||
transferAmount?: number;
|
||||
receiveBankCode?: string;
|
||||
receiveAccountNo?: string;
|
||||
receiveAccountName?: string;
|
||||
transferMemo?: string;
|
||||
};
|
||||
export interface ExtensionFundAccountTransferRequestResponse {
|
||||
tid: string;
|
||||
|
||||
@@ -24,6 +24,7 @@ import { FundAccountStatusBtnGroup } from '../../model/fund-account/constant';
|
||||
import { useExtensionFundAccountBalanceMutation } from '../../api/fund-account/use-extension-fund-account-balance-mutation';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { FundAccountTransactionFilter } from '../filter/fund-account-trnasaction-filter';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
|
||||
export const FundAccountTransferListWrap = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -148,6 +149,10 @@ export const FundAccountTransferListWrap = () => {
|
||||
callBalance();
|
||||
}, []);
|
||||
|
||||
const onClickToNavigate = () => {
|
||||
navigate(PATHS.additionalService.fundAccount.transferRequest);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<section className="summary-section pt-30">
|
||||
@@ -224,7 +229,10 @@ export const FundAccountTransferListWrap = () => {
|
||||
{ getListDateGroup() }
|
||||
</section>
|
||||
<div className="apply-row">
|
||||
<button className="btn-50 btn-blue flex-1">이체 등록</button>
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={ onClickToNavigate }
|
||||
>이체 등록</button>
|
||||
</div>
|
||||
<FundAccountTransactionFilter
|
||||
filterOn={ filterOn }
|
||||
|
||||
@@ -142,7 +142,13 @@ export const ListItem = ({
|
||||
});
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccount) {
|
||||
|
||||
navigate(PATHS.additionalService.fundAccount.transferDetail, {
|
||||
state: {
|
||||
additionalServiceCategory: additionalServiceCategory,
|
||||
mid: mid,
|
||||
tid: tid
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.SettlementAgency) {
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import { LinkPaymentWaitSendPage } from './link-payment/link-payment-wait-send-p
|
||||
import { KakaoPaymentNotificationListPage } from './kakao-payment-notification/list-page';
|
||||
import { KakaoPaymentNotificationSettingPage } from './kakao-payment-notification/setting-page';
|
||||
import { FundAccountTransferListPage } from './fund-account/transfer-list-page';
|
||||
import { FundAccountTransferDetailPage } from './fund-account/transfer-detail-page';
|
||||
import { FundAccountTransferRequestPage } from './fund-account/transfer-request-page';
|
||||
import { FundAccountResultListPage } from './fund-account/result-list-page';
|
||||
import { SettlementAgencyManagePage } from './settlement-agency/manage-page';
|
||||
@@ -76,6 +77,7 @@ export const AdditionalServicePages = () => {
|
||||
</Route>
|
||||
<Route path={ROUTE_NAMES.additionalService.fundAccount.base}>
|
||||
<Route path={ROUTE_NAMES.additionalService.fundAccount.transferList} element={<FundAccountTransferListPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.fundAccount.transferDetail} element={<FundAccountTransferDetailPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.fundAccount.transferRequest} element={<FundAccountTransferRequestPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.fundAccount.resultList} element={<FundAccountResultListPage />} />
|
||||
</Route>
|
||||
|
||||
@@ -1,3 +1,137 @@
|
||||
export const FundAccountTransferDetail = () => {
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
useSetHeaderType,
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { useLocation } from 'react-router';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { useExtensionFundAccountTransferDetailMutation } from '@/entities/additional-service/api/fund-account/use-extension-fund-account-transfer-detail-mutation';
|
||||
import { ExtensionFundAccountTransferDetailParams, ExtensionFundAccountTransferDetailResponse, ExtensionFundAccountTransferRequestParams, ExtensionFundAccountTransferRequestResponse } from '@/entities/additional-service/model/fund-account/types';
|
||||
import moment from 'moment';
|
||||
import { useExtensionFundAccountTransferRequestMutation } from '@/entities/additional-service/api/fund-account/use-extension-fund-account-transfer-request-mutation';
|
||||
|
||||
export const FundAccountTransferDetailPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const location = useLocation();
|
||||
|
||||
const tid = location.state.tid;
|
||||
const mid = location.state.mid;
|
||||
|
||||
const [detail, setDetail] = useState<ExtensionFundAccountTransferDetailResponse>();
|
||||
|
||||
const { mutateAsync: extensionFundAccountTransferDetail } = useExtensionFundAccountTransferDetailMutation();
|
||||
const { mutateAsync: extensionFundAccountTransferRequest } = useExtensionFundAccountTransferRequestMutation();
|
||||
|
||||
const callDetail = () => {
|
||||
let params: ExtensionFundAccountTransferDetailParams = {
|
||||
tid: tid,
|
||||
mid: mid,
|
||||
};
|
||||
|
||||
extensionFundAccountTransferDetail(params).then((rs: ExtensionFundAccountTransferDetailResponse) => {
|
||||
setDetail(rs);
|
||||
});
|
||||
};
|
||||
|
||||
useSetHeaderTitle('자금이체 상세');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetFooterMode(false);
|
||||
useSetOnBack(() => {
|
||||
navigate(PATHS.additionalService.fundAccount.transferList);
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
callDetail();
|
||||
}, []);
|
||||
|
||||
const onClickToRequest = () =>{
|
||||
let params: ExtensionFundAccountTransferRequestParams = {
|
||||
mid: mid,
|
||||
transferAmount: detail?.transferAmount,
|
||||
receiveBankCode: detail?.receiveBankName,
|
||||
receiveAccountNo: detail?.receiveAccountNo,
|
||||
receiveAccountName: detail?.receiveAccountName,
|
||||
transferMemo: ''
|
||||
};
|
||||
extensionFundAccountTransferRequest(params).then((rs: ExtensionFundAccountTransferRequestResponse) => {
|
||||
console.log(rs)
|
||||
alert(rs.message);
|
||||
navigate(PATHS.additionalService.fundAccount.transferList);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<main className="full-height">
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane sub active">
|
||||
<div className="pay-top">
|
||||
<div className="num-amount">
|
||||
<span className="amount">
|
||||
<NumericFormat
|
||||
value={ detail?.transferAmount }
|
||||
thousandSeparator
|
||||
displayType="text"
|
||||
suffix='원'
|
||||
></NumericFormat>
|
||||
</span>
|
||||
</div>
|
||||
<div className="num-store">나이스테스트가맹점</div>
|
||||
<div className="num-day">2025.08.19</div>
|
||||
</div>
|
||||
<div className="detail-divider"></div>
|
||||
<div className="pay-detail">
|
||||
<div className="detail-title">상세 정보</div>
|
||||
<ul className="kv-list">
|
||||
<li className="kv-row">
|
||||
<span className="k">등록일시</span>
|
||||
<span className="v">{ moment(detail?.processDate).format('YYYY.MM.DD') }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">처리결과</span>
|
||||
<span className="v">{ detail?.status }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">요청일자</span>
|
||||
<span className="v">{ moment(detail?.requestDate).format('YYYY.MM.DD') }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">이체결과</span>
|
||||
<span className="v">{ detail?.status }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">수취인명</span>
|
||||
<span className="v">{ detail?.receiveAccountName }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">은행</span>
|
||||
<span className="v">{ detail?.receiveBankName }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">계좌번호</span>
|
||||
<span className="v">{ detail?.receiveAccountNo }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">MID</span>
|
||||
<span className="v">{ mid }</span>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={ () => onClickToRequest() }
|
||||
>이체 요청</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,6 +1,126 @@
|
||||
export const FundAccountTransferRequestPage = () => {
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
useSetHeaderType,
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { useState } from 'react';
|
||||
import { useExtensionFundAccountTransferRequestMutation } from '@/entities/additional-service/api/fund-account/use-extension-fund-account-transfer-request-mutation';
|
||||
import { ExtensionFundAccountTransferRequestParams, ExtensionFundAccountTransferRequestResponse } from '@/entities/additional-service/model/fund-account/types';
|
||||
|
||||
|
||||
export const FundAccountTransferRequestPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
const [mid, setMid] = useState<string>('nictest001m')
|
||||
const [transferAmount, setTransferAmount] = useState<number>(0);
|
||||
const [receiveBankCode, setReceiveBankCode] = useState<string>('');
|
||||
const [receiveAccountNo, setReceiveAccountNo] = useState<string>('');
|
||||
const [receiveAccountName, setReceiveAccountName] = useState<string>('');
|
||||
const [transferMemo, setTransferMemo] = useState<string>('');
|
||||
|
||||
const { mutateAsync: extensionFundAccountRequest } = useExtensionFundAccountTransferRequestMutation();
|
||||
|
||||
useSetHeaderTitle('자금이체 이체등록');
|
||||
useSetHeaderType(HeaderType.RightClose);
|
||||
useSetFooterMode(false);
|
||||
useSetOnBack(() => {
|
||||
navigate(PATHS.additionalService.fundAccount.transferList);
|
||||
});
|
||||
|
||||
const callExtensionFundAccountTransferRequest = () => {
|
||||
let params: ExtensionFundAccountTransferRequestParams = {
|
||||
mid: mid,
|
||||
transferAmount: transferAmount,
|
||||
receiveBankCode: receiveBankCode,
|
||||
receiveAccountNo: receiveAccountNo,
|
||||
receiveAccountName: receiveAccountName,
|
||||
transferMemo: transferMemo
|
||||
};
|
||||
extensionFundAccountRequest(params).then((rs: ExtensionFundAccountTransferRequestResponse) => {
|
||||
navigate(PATHS.additionalService.payout.list);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<></>
|
||||
<>
|
||||
<main>
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane sub active">
|
||||
<div className="ing-list">
|
||||
<div className="billing-form gap-30">
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">서브ID</div>
|
||||
<div className="billing-field">
|
||||
<select></select>
|
||||
</div>
|
||||
</div>
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">은행</div>
|
||||
<div className="billing-field">
|
||||
<select></select>
|
||||
</div>
|
||||
</div>
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">계좌번호</div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="text"
|
||||
value={ receiveAccountNo }
|
||||
onChange={ (e) => setReceiveAccountNo(e.target.value) }
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">예금주명</div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="text"
|
||||
value={ receiveAccountName }
|
||||
onChange={ (e) => setReceiveAccountName(e.target.value) }
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">이체금액</div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="text"
|
||||
value={ transferAmount }
|
||||
onChange={ (e) => setTransferAmount(parseInt(e.target.value)) }
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">주문번호</div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">입금인자</div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={ callExtensionFundAccountTransferRequest }
|
||||
>등록</button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -26,7 +26,7 @@ export const PayoutDetailPage = () => {
|
||||
const { mutateAsync: extensionPayoutDetail } = useExtensionPayoutDetailMutation();
|
||||
const { mutateAsync: extensionPayoutDetailDownloadCertification } = useExtensionPayoutDetailDownloadCertificateMutation();
|
||||
|
||||
const callSettlementDetail = () => {
|
||||
const callDetail = () => {
|
||||
let params: ExtensionPayoutDetailParams = {
|
||||
tid: tid,
|
||||
mid: mid,
|
||||
@@ -55,7 +55,7 @@ export const PayoutDetailPage = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callSettlementDetail();
|
||||
callDetail();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user