..
This commit is contained in:
@@ -49,8 +49,8 @@ export const AllTransactionListPage = () => {
|
||||
const [searchCl, setSearchCl] = useState<AllTransactionSearchCl | undefined>();
|
||||
const [searchValue, setSearchValue] = useState<string | undefined>();
|
||||
|
||||
const [totalTransactionCount, setTotalTransactionCount] = useState<number>(0);
|
||||
const [totalTransactionAmount, setTotalTransactionAmount] = useState<number>(0);
|
||||
const [totalCount, setTotalCount] = useState<number>(0);
|
||||
const [totalAmount, setTotalAmount] = useState<number>(0);
|
||||
|
||||
|
||||
useSetHeaderTitle('거래내역 조회');
|
||||
@@ -96,8 +96,8 @@ export const AllTransactionListPage = () => {
|
||||
setListItems(assembleData(rs.content));
|
||||
});
|
||||
allTransactionListSummary(listSummaryParams).then((rs) => {
|
||||
setTotalTransactionAmount(rs.totalTransactionAmount);
|
||||
setTotalTransactionCount(rs.totalTransactionCount);
|
||||
setTotalAmount(rs.totalAmount);
|
||||
setTotalCount(rs.totalCount);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -105,8 +105,8 @@ export const AllTransactionListPage = () => {
|
||||
let data: any = {};
|
||||
if(content && content.length > 0){
|
||||
for(let i=0;i<content?.length;i++){
|
||||
let stateDate = content[i]?.stateDate?.substring(0, 8);
|
||||
let groupDate = moment(stateDate).format('YYYYMMDD');
|
||||
let transactionDateTime = content[i]?.transactionDateTime?.substring(0, 8);
|
||||
let groupDate = moment(transactionDateTime).format('YYYYMMDD');
|
||||
if(!!groupDate && !data.hasOwnProperty(groupDate)){
|
||||
data[groupDate] = [];
|
||||
}
|
||||
@@ -171,9 +171,21 @@ export const AllTransactionListPage = () => {
|
||||
|
||||
useEffect(() => {
|
||||
callServiceCodeOptions();
|
||||
callList();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
}, [
|
||||
mid, moid,
|
||||
tid, fromDate,
|
||||
toDate, stateCode,
|
||||
serviceCode, minAmount,
|
||||
maxAmount, bankCode,
|
||||
cardCode, searchCl,
|
||||
searchValue
|
||||
]);
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<main>
|
||||
@@ -184,10 +196,10 @@ export const AllTransactionListPage = () => {
|
||||
<div className="summary-amount">
|
||||
<span className="amount-text">
|
||||
<NumericFormat
|
||||
value={ totalTransactionAmount }
|
||||
value={ totalAmount }
|
||||
thousandSeparator
|
||||
displayType="text"
|
||||
suffix={ '원' }
|
||||
suffix='원'
|
||||
></NumericFormat>
|
||||
</span>
|
||||
<div className="summary-actions">
|
||||
@@ -216,11 +228,11 @@ export const AllTransactionListPage = () => {
|
||||
<span className="detail-label">거래건수</span>
|
||||
<span className="detail-value">
|
||||
<NumericFormat
|
||||
value={ totalTransactionCount }
|
||||
value={ totalCount }
|
||||
thousandSeparator
|
||||
displayType="text"
|
||||
prefix={ '총 ' }
|
||||
suffix={ ' 건' }
|
||||
prefix='총 '
|
||||
suffix=' 건'
|
||||
></NumericFormat>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user