계좌성명 조회 페이지 UI 추가 (내역,상세,요청,필터)
This commit is contained in:
@@ -1,18 +1,212 @@
|
||||
import moment from 'moment';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
useSetHeaderType,
|
||||
useSetFooterMode
|
||||
import { useDownloadExcelMutation } from '@/entities/transaction/api/use-download-excel-mutation';
|
||||
import { AccountHolderSearchFilter } from '@/entities/additional-service/ui/account-holder-search/account-holder-search-filter';
|
||||
import { AccountHolderSearchProcessResult, AccountHolderSearchType } from '@/entities/additional-service/model/types';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
useSetHeaderType,
|
||||
useSetFooterMode
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
|
||||
|
||||
export const AccountHolderSearchPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [mid, setMid] = useState<string>('nictest001m');
|
||||
const [searchType, setSearchType] = useState<AccountHolderSearchType>(AccountHolderSearchType.ALL)
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||
const [startDate, setStartDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [bank, setBank] = useState<string>('');
|
||||
const [processResult, setProcessResult] = useState<AccountHolderSearchProcessResult>(AccountHolderSearchProcessResult.ALL);
|
||||
|
||||
useSetHeaderTitle('계좌성명조회');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetFooterMode(true);
|
||||
|
||||
const { mutateAsync: downloadExcel } = useDownloadExcelMutation();
|
||||
|
||||
const transactionData = [
|
||||
{
|
||||
id: '1',
|
||||
accountNumber: '10002464******',
|
||||
time: '20:00',
|
||||
bank: '우리은행',
|
||||
status: 'success',
|
||||
statusColor: 'blue',
|
||||
className: 'approved'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
accountNumber: '10002464******',
|
||||
time: '20:00',
|
||||
details: '결제완료ㅣ결제성공ㅣ호전환',
|
||||
status: 'success',
|
||||
statusColor: 'gray',
|
||||
className: 'refund'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
accountNumber: '10002464******',
|
||||
time: '20:00',
|
||||
details: '결제완료ㅣ결제성공ㅣ호전환',
|
||||
status: 'success',
|
||||
statusColor: 'blue',
|
||||
className: 'approved'
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
accountNumber: '10002464******',
|
||||
time: '20:00',
|
||||
details: '미결제ㅣ취소완료ㅣSMS',
|
||||
status: 'success',
|
||||
statusColor: 'gray',
|
||||
className: 'refund'
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
accountNumber: '10002464******',
|
||||
time: '20:00',
|
||||
details: '미결제ㅣ기간만료ㅣSMS',
|
||||
status: 'fail',
|
||||
statusColor: 'blue',
|
||||
className: 'approved'
|
||||
}
|
||||
];
|
||||
|
||||
const onClickToOpenFilter = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
|
||||
const onClickToDownloadExcel = () => {
|
||||
// tid??? 확인 필요
|
||||
downloadExcel({
|
||||
// tid: tid
|
||||
}).then((rs) => {
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
const onClickToNavigation = () => {
|
||||
navigate(PATHS.additionalService.accountHolderSearch.request);
|
||||
};
|
||||
|
||||
const onClickToGoDetail = (tid?: string) => {
|
||||
navigate(PATHS.additionalService.accountHolderSearch.detail);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<main>
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane sub active">
|
||||
<section className="summary-section">
|
||||
<div className="credit-controls">
|
||||
<div>
|
||||
<input
|
||||
className="credit-period"
|
||||
type="text"
|
||||
value="2025.06.01 ~ 2025.06.30"
|
||||
readOnly={true}
|
||||
/>
|
||||
<button
|
||||
className="filter-btn"
|
||||
aria-label="필터"
|
||||
>
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_setting.svg'}
|
||||
alt="검색옵션"
|
||||
onClick={() => onClickToOpenFilter()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className="download-btn"
|
||||
aria-label="다운로드"
|
||||
>
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||
alt="다운로드"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="filter-section">
|
||||
<div className="sort-options">
|
||||
<button className="sort-btn active">최신순</button>
|
||||
<span className="sort-divider">|</span>
|
||||
<button className="sort-btn">고액순</button>
|
||||
</div>
|
||||
<div className="excrow">
|
||||
<div className="full-menu-keywords no-padding">
|
||||
<span className="keyword-tag active">전체</span>
|
||||
<span className="keyword-tag">성공</span>
|
||||
<span className="keyword-tag">실패</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="transaction-list">
|
||||
<div className="date-group">
|
||||
<div className="date-header">25.06.08(일)</div>
|
||||
{transactionData.map((item) => (
|
||||
<div
|
||||
key={item.id}
|
||||
className={`transaction-item ${item.className}`}
|
||||
onClick={() => onClickToGoDetail(item.id)}
|
||||
>
|
||||
<div className="transaction-status">
|
||||
<div className={`status-dot ${item.statusColor}`}></div>
|
||||
</div>
|
||||
<div className="transaction-content">
|
||||
<div className="transaction-title">{item.accountNumber}</div>
|
||||
<div className="transaction-details">
|
||||
<span>
|
||||
{item.time}ㅣ{item.bank || item.details}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className={`status-label ${item.status}`}>
|
||||
{item.status === 'success' ? '성공' : '실패'}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={() => onClickToNavigation()}
|
||||
>조회 신청</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<AccountHolderSearchFilter
|
||||
filterOn={filterOn}
|
||||
setFilterOn={setFilterOn}
|
||||
mid={mid}
|
||||
searchType={searchType}
|
||||
searchKeyword={searchKeyword}
|
||||
startDate={startDate}
|
||||
endDate={endDate}
|
||||
bank={bank}
|
||||
processResult={processResult}
|
||||
setMid={setMid}
|
||||
setSearchType={setSearchType}
|
||||
setSearchKeyword={setSearchKeyword}
|
||||
setStartDate={setStartDate}
|
||||
setEndDate={setEndDate}
|
||||
setBank={setBank}
|
||||
setProcessResult={setProcessResult}
|
||||
></AccountHolderSearchFilter>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,74 @@
|
||||
import { useState } from 'react';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
useSetHeaderType,
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
|
||||
export const AccountHolderSearchDetailPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
useSetHeaderTitle('계좌성명조회 상세');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetFooterMode(false);
|
||||
useSetOnBack(() => {
|
||||
navigate(PATHS.additionalService.accountHolderSearch.list);
|
||||
});
|
||||
|
||||
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">10002464******</span>
|
||||
</div>
|
||||
<div className="num-store">기업은행</div>
|
||||
<div className="num-day">2025.09.12 16:12:37</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"> </span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">조회 일시</span>
|
||||
<span className="v">2025.09.12 16:12:37</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">결과</span>
|
||||
<span className="v">실패</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">실패사유</span>
|
||||
<span className="v">기관미개시</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">은행</span>
|
||||
<span className="v">기업은행</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">계좌번호</span>
|
||||
<span className="v">1002464642587</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">요청구분</span>
|
||||
<span className="v">API</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
import { useState } from 'react';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
useSetHeaderType,
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
|
||||
export const AccountHolderSearchRequestPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
|
||||
useSetHeaderTitle('계좌성명조회_신청');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetFooterMode(false);
|
||||
useSetOnBack(() => {
|
||||
navigate(PATHS.additionalService.accountHolderSearch.list);
|
||||
});
|
||||
|
||||
const [formData, setFormData] = useState({
|
||||
mid: 'nictest001m',
|
||||
bank: '',
|
||||
accountNum: ''
|
||||
})
|
||||
|
||||
const handleInputChange = (field: string, value: string) => {
|
||||
setFormData(prev => ({
|
||||
...prev,
|
||||
[field]: value
|
||||
}));
|
||||
};
|
||||
|
||||
useSetOnBack(() => {
|
||||
navigate(PATHS.additionalService.accountHolderSearch.list);
|
||||
});
|
||||
|
||||
const onClickToRequest = () => {
|
||||
navigate(PATHS.additionalService.accountHolderSearch.list)
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<main>
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane sub active">
|
||||
<div className="option-list">
|
||||
<div className="billing-form gap-16">
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">가맹점</div>
|
||||
<div className="billing-field">
|
||||
<select
|
||||
className="wid-100"
|
||||
value={formData.mid}
|
||||
onChange={(e) => handleInputChange('mid', e.target.value)}
|
||||
>
|
||||
<option>nictest001m</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">은행</div>
|
||||
<div className="billing-field">
|
||||
<select
|
||||
className="wid-100"
|
||||
value={formData.bank}
|
||||
onChange={(e) => handleInputChange('bank', e.target.value)}
|
||||
>
|
||||
<option>우리은행</option>
|
||||
<option>카카오뱅크</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">계좌번호</div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="number"
|
||||
value="10002464******"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={() => onClickToRequest() }
|
||||
>신청</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -31,6 +31,8 @@ import { LinkPaymentDetailPage } from './link-payment/link-payment-detail-page';
|
||||
import { LinkPaymentPendingDetailPage } from './link-payment/link-payment-pending-detail-page';
|
||||
import { KeyInPaymentRequestPage } from './key-in-payment/requeset-page';
|
||||
import { KeyInPaymentRequestSuccessPage } from './key-in-payment/request-success-page';
|
||||
import { AccountHolderSearchRequestPage } from './account-holder-search/request-page';
|
||||
import { AccountHolderSearchDetailPage } from './account-holder-search/detail-page';
|
||||
|
||||
export const AdditionalServicePages = () => {
|
||||
return (
|
||||
@@ -44,15 +46,19 @@ export const AdditionalServicePages = () => {
|
||||
<Route path={ROUTE_NAMES.additionalService.arsCardPayment.requestSuccess} element={<ArsCardPaymentRequestSuccessPage />} />
|
||||
</Route>
|
||||
<Route path={ROUTE_NAMES.additionalService.keyInPayment.base}>
|
||||
<Route path={ROUTE_NAMES.additionalService.keyInPayment.list} element={<KeyInPaymentPage/>} />
|
||||
<Route path={ROUTE_NAMES.additionalService.keyInPayment.request} element={<KeyInPaymentRequestPage/>} />
|
||||
<Route path={ROUTE_NAMES.additionalService.keyInPayment.requestSuccess} element={<KeyInPaymentRequestSuccessPage/>} />
|
||||
<Route path={ROUTE_NAMES.additionalService.keyInPayment.list} element={<KeyInPaymentPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.keyInPayment.request} element={<KeyInPaymentRequestPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.keyInPayment.requestSuccess} element={<KeyInPaymentRequestSuccessPage />} />
|
||||
</Route>
|
||||
<Route path={ROUTE_NAMES.additionalService.smsPaymentNotification} element={<SmsPaymentNotificationPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.accountHolderSearch} element={<AccountHolderSearchPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.accountHolderSearch.base}>
|
||||
<Route path={ROUTE_NAMES.additionalService.accountHolderSearch.list} element={<AccountHolderSearchPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.accountHolderSearch.detail} element={<AccountHolderSearchDetailPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.accountHolderSearch.request} element={<AccountHolderSearchRequestPage />} />
|
||||
</Route>
|
||||
<Route path={ROUTE_NAMES.additionalService.accountHolderAuth} element={<AccountHolderAuthPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.linkPayment.base}>
|
||||
<Route path={ROUTE_NAMES.additionalService.linkPayment.dispatchList} element={<LinkPaymentDispatchListPage/>} />
|
||||
<Route path={ROUTE_NAMES.additionalService.linkPayment.dispatchList} element={<LinkPaymentDispatchListPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.linkPayment.pendingSend} element={<LinkPaymentPendingSendPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.linkPayment.request} element={<LinkPaymentApplyPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.linkPayment.requestConfirm} element={<LinkPaymentApplyConfirmPage />} />
|
||||
@@ -79,7 +85,7 @@ export const AdditionalServicePages = () => {
|
||||
<Route path={ROUTE_NAMES.additionalService.paymentAgency.base}>
|
||||
<Route path={ROUTE_NAMES.additionalService.paymentAgency.list} element={<PaymentAgencyListPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.paymentAgency.detail} element={<PaymentAgencyDetailPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.paymentAgency.request} element={<PaymentAgencyRequestPage />} />
|
||||
<Route path={ROUTE_NAMES.additionalService.paymentAgency.request} element={<PaymentAgencyRequestPage />} />
|
||||
</Route>
|
||||
</SentryRoutes>
|
||||
</>
|
||||
|
||||
@@ -107,7 +107,7 @@ export const KeyInPaymentRequestPage = () => {
|
||||
<div className="billing-label">구매자 이메일 <span>*</span></div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="text"
|
||||
type="email"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
@@ -117,7 +117,7 @@ export const KeyInPaymentRequestPage = () => {
|
||||
<div className="billing-label">구매자 전화번호 <span>*</span></div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="text"
|
||||
type="tel"
|
||||
value=""
|
||||
placeholder=" '-' 제외하고 입력"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user