현금영수증 리스트
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AllTransactionListProps } from '../model/types';
|
||||
import { AllTransactionListProps, ListItemProps } from '../model/types';
|
||||
import { ListDateGroup } from './list-date-group';
|
||||
|
||||
export const AllTransactionList = ({
|
||||
@@ -8,28 +8,33 @@ export const AllTransactionList = ({
|
||||
const getListDateGroup = () => {
|
||||
let rs = [];
|
||||
let date = '';
|
||||
let list = [];
|
||||
let list: Array<ListItemProps> = [];
|
||||
for(let i=0;i<listItems.length;i++){
|
||||
let transactionDateTime = listItems[i].transactionDateTime;
|
||||
let transactionDate = transactionDateTime.substr(0, 8);
|
||||
if(i === 0){
|
||||
date = transactionDate;
|
||||
}
|
||||
if(date !== transactionDate){
|
||||
date = transactionDate;
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
transactionCategory={ transactionCategory }
|
||||
key={ date + '-' + i }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
)
|
||||
let items = listItems[i];
|
||||
if(!!items){
|
||||
let transactionDateTime = items.transactionDateTime;
|
||||
let transactionDate = transactionDateTime?.substr(0, 8);
|
||||
if(!!transactionDate){
|
||||
if(i === 0){
|
||||
date = transactionDate;
|
||||
}
|
||||
if(date !== transactionDate){
|
||||
date = transactionDate;
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
transactionCategory={ transactionCategory }
|
||||
key={ date + '-' + i }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(items);
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(listItems[i]);
|
||||
}
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
@@ -39,7 +44,7 @@ export const AllTransactionList = ({
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
)
|
||||
);
|
||||
}
|
||||
return rs;
|
||||
};
|
||||
|
||||
@@ -11,15 +11,43 @@ export const BillingList = ({
|
||||
|
||||
const getListDateGroup = () => {
|
||||
let rs = [];
|
||||
for (const [key, value] of Object.entries(listItems)) {
|
||||
let date = '';
|
||||
let list = [];
|
||||
for(let i=0;i<listItems.length;i++){
|
||||
let items = listItems[i];
|
||||
if(!!items){
|
||||
let transactionDate = items.transactionDate;
|
||||
if(!!transactionDate){
|
||||
if(i === 0){
|
||||
date = transactionDate;
|
||||
}
|
||||
if(date !== transactionDate){
|
||||
date = transactionDate;
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
transactionCategory={ transactionCategory }
|
||||
key={ date + '-' + i }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(items);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
transactionCategory={ transactionCategory }
|
||||
key={ key }
|
||||
date={ key }
|
||||
items={ value }
|
||||
key={ date + '-last' }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
);
|
||||
);
|
||||
}
|
||||
return rs;
|
||||
};
|
||||
|
||||
@@ -11,15 +11,43 @@ export const CashReceiptList = ({
|
||||
|
||||
const getListDateGroup = () => {
|
||||
let rs = [];
|
||||
for (const [key, value] of Object.entries(listItems)) {
|
||||
let date = '';
|
||||
let list = [];
|
||||
for(let i=0;i<listItems.length;i++){
|
||||
let items = listItems[i];
|
||||
if(!!items){
|
||||
let transactionDate = items.transactionDate;
|
||||
if(!!transactionDate){
|
||||
if(i === 0){
|
||||
date = transactionDate;
|
||||
}
|
||||
if(date !== transactionDate){
|
||||
date = transactionDate;
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
transactionCategory={ transactionCategory }
|
||||
key={ date + '-' + i }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(items);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
transactionCategory={ transactionCategory }
|
||||
key={ key }
|
||||
date={ key }
|
||||
items={ value }
|
||||
key={ date + '-last' }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
);
|
||||
);
|
||||
}
|
||||
return rs;
|
||||
};
|
||||
@@ -31,13 +59,13 @@ export const CashReceiptList = ({
|
||||
return (
|
||||
<>
|
||||
<div className="transaction-list">
|
||||
{ getListDateGroup() }
|
||||
<div className="apply-row bottom-padding">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={ () => onClickToNavigate() }
|
||||
>수기발행</button>
|
||||
</div>
|
||||
{ getListDateGroup() }
|
||||
</div>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={ () => onClickToNavigate() }
|
||||
>수기발행</button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -8,19 +8,47 @@ export const EscrowList = ({
|
||||
|
||||
const getListDateGroup = () => {
|
||||
let rs = [];
|
||||
for (const [key, value] of Object.entries(listItems)) {
|
||||
let date = '';
|
||||
let list = [];
|
||||
for(let i=0;i<listItems.length;i++){
|
||||
let items = listItems[i];
|
||||
if(!!items){
|
||||
let transactionDate = items.transactionDate;
|
||||
if(!!transactionDate){
|
||||
if(i === 0){
|
||||
date = transactionDate;
|
||||
}
|
||||
if(date !== transactionDate){
|
||||
date = transactionDate;
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
transactionCategory={ transactionCategory }
|
||||
key={ date + '-' + i }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(items);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
transactionCategory={ transactionCategory }
|
||||
key={ key }
|
||||
date={ key }
|
||||
items={ value }
|
||||
key={ date + '-last' }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
);
|
||||
);
|
||||
}
|
||||
return rs;
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="transaction-list">
|
||||
|
||||
@@ -8,14 +8,15 @@ import { FilterCalendar } from '@/shared/ui/filter/calendar';
|
||||
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
||||
import {
|
||||
CashReceiptPurposeTypeBtnGroup,
|
||||
CashReceiptIssueStatusBtnGroup,
|
||||
CashReceiptTransactionTypeBtnGroup,
|
||||
CashReceiptProcessResultBtnGroup
|
||||
} from '@/entities/transaction/model/contant';
|
||||
import {
|
||||
CashReceiptFilterProps,
|
||||
CashReceiptPurposeType,
|
||||
CashReceiptIssueStatus,
|
||||
CashReceiptProcessResult
|
||||
CashReceiptTransactionType,
|
||||
CashReceiptProcessResult,
|
||||
CashReceiptSearchNumberType
|
||||
} from '../../model/types';
|
||||
import {
|
||||
FilterMotionDuration,
|
||||
@@ -31,22 +32,25 @@ export const CashReceiptFilter = ({
|
||||
startDate,
|
||||
endDate,
|
||||
purposeType,
|
||||
issueStatus,
|
||||
transactionType,
|
||||
processResult,
|
||||
searchNumberType,
|
||||
setMid,
|
||||
setStartDate,
|
||||
setEndDate,
|
||||
setPurposeType,
|
||||
setIssueStatus,
|
||||
setProcessResult
|
||||
setTransactionType,
|
||||
setProcessResult,
|
||||
setSearchNumberType
|
||||
}: CashReceiptFilterProps) => {
|
||||
|
||||
const [filterMid, setFilterMid] = useState<string>(mid);
|
||||
const [filterStartDate, setFilterStartDate] = useState<string>(startDate);
|
||||
const [filterEndDate, setFilterEndDate] = useState<string>(endDate);
|
||||
const [filterPurposeType, setFilterPurposeType] = useState<CashReceiptPurposeType>(purposeType);
|
||||
const [filterIssueStatus, setFilterIssueStatus] = useState<CashReceiptIssueStatus>(issueStatus);
|
||||
const [filterTransactionType, setFilterTransactionType] = useState<CashReceiptTransactionType>(transactionType);
|
||||
const [filterProcessResult, setFilterProcessResult] = useState<CashReceiptProcessResult>(processResult);
|
||||
const [filterSearchNumberType, setFilterSearchNumberType] = useState<CashReceiptSearchNumberType>(searchNumberType);
|
||||
|
||||
const [filterIssueType, setFilterIssueType] = useState<string>('');
|
||||
const [filterIssueNumber, setFilterIssueNumber] = useState<string>('');
|
||||
@@ -70,14 +74,14 @@ export const CashReceiptFilter = ({
|
||||
setStartDate(filterStartDate);
|
||||
setEndDate(filterEndDate);
|
||||
setPurposeType(filterPurposeType);
|
||||
setIssueStatus(filterIssueStatus);
|
||||
setTransactionType(filterTransactionType);
|
||||
setProcessResult(filterProcessResult);
|
||||
onClickToClose();
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setFilterIssueStatus(issueStatus);
|
||||
}, [issueStatus]);
|
||||
setFilterTransactionType(transactionType);
|
||||
}, [transactionType]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -129,9 +133,9 @@ export const CashReceiptFilter = ({
|
||||
></FilterButtonGroups>
|
||||
<FilterButtonGroups
|
||||
title='거래구분'
|
||||
activeValue={ filterIssueStatus }
|
||||
btnGroups={ CashReceiptIssueStatusBtnGroup }
|
||||
setter={ setFilterIssueStatus }
|
||||
activeValue={ filterTransactionType }
|
||||
btnGroups={ CashReceiptTransactionTypeBtnGroup }
|
||||
setter={ setFilterTransactionType }
|
||||
></FilterButtonGroups>
|
||||
<FilterButtonGroups
|
||||
title='진행상태'
|
||||
@@ -141,8 +145,8 @@ export const CashReceiptFilter = ({
|
||||
></FilterButtonGroups>
|
||||
<FilterSelectInput
|
||||
title='승인번호/발행번호'
|
||||
selectValue={ filterIssueType }
|
||||
selectSetter={ setFilterIssueType }
|
||||
selectValue={ filterSearchNumberType }
|
||||
selectSetter={ setFilterSearchNumberType }
|
||||
selectOptions={ issueTypeOptionsGroup }
|
||||
inputValue={ filterIssueNumber }
|
||||
inputSetter={ setFilterIssueNumber }
|
||||
|
||||
@@ -51,11 +51,9 @@ export const ListDateGroup = ({
|
||||
serviceDetailName={ items[i]?.serviceDetailName }
|
||||
goodsAmount={ items[i]?.goodsAmount }
|
||||
|
||||
id={ items[i]?.id }
|
||||
amount={ items[i]?.amount }
|
||||
customerName={ items[i]?.customerName }
|
||||
issueNumber={ items[i]?.issueNumber }
|
||||
issueStatus={ items[i]?.issueStatus }
|
||||
paymentMethod={ items[i]?.paymentMethod }
|
||||
processResult={ items[i]?.processResult }
|
||||
transactionDateTime={ items[i]?.transactionDateTime }
|
||||
|
||||
@@ -11,8 +11,8 @@ export const ListItem = ({
|
||||
tid, mid, statusCode,
|
||||
installmentMonth, serviceName, serviceCode,
|
||||
serviceDetailName, goodsAmount,
|
||||
id, amount, customerName, issueNumber,
|
||||
issueStatus, paymentMethod, processResult,
|
||||
amount, customerName, issueNumber,
|
||||
paymentMethod, processResult,
|
||||
transactionDateTime, transactionAmount,
|
||||
deliveryStatus, settlementStatus,
|
||||
cancelStatus, billKey, orderNumber
|
||||
@@ -173,7 +173,7 @@ export const ListItem = ({
|
||||
<div className="transaction-details">
|
||||
<span>{ getTime() }</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ issueStatus }</span>
|
||||
<span>{ }</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ paymentMethod }</span>
|
||||
<span className="separator">|</span>
|
||||
|
||||
@@ -19,11 +19,11 @@ export const IssueInfoSection = ({
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">발행번호</span>
|
||||
<span className="v">{ issueInfo?.issueNumber }</span>
|
||||
<span className="v">{ }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">발행일시</span>
|
||||
<span className="v">{ moment(issueInfo?.issueDateTime).format('YYYY.MM.DD HH:mm:ss') }</span>
|
||||
<span className="v">{ }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">용도</span>
|
||||
|
||||
Reference in New Issue
Block a user