현금영수증 상세
This commit is contained in:
@@ -310,7 +310,7 @@ export interface AllTransactionDetailParams {
|
||||
tid?: string;
|
||||
};
|
||||
export interface CashReceiptDetailParams {
|
||||
issueNumber?: number;
|
||||
approvalNumber?: string;
|
||||
};
|
||||
export interface EscrowDetailParams {
|
||||
issueNumber?: number;
|
||||
@@ -416,12 +416,12 @@ export interface IssueInfo {
|
||||
approvalNumber?: string;
|
||||
issueDate?: string;
|
||||
issueTime?: string;
|
||||
purpose?: CashReceiptPurposeType;
|
||||
|
||||
issueNumber?: string;
|
||||
purpose?: string;
|
||||
paymentMethod?: string;
|
||||
productName?: string;
|
||||
transmissionStatus?: string;
|
||||
transactionType?: string;
|
||||
processResult?: string;
|
||||
transactionType?: CashReceiptTransactionType;
|
||||
};
|
||||
export interface CustomerInfo {
|
||||
customerName: string;
|
||||
@@ -441,6 +441,7 @@ export interface DetailInfo {
|
||||
subMallBusinessNumber?: number;
|
||||
issueChannel?: string;
|
||||
failureReason?: string;
|
||||
canDownloadReceipt?: boolean;
|
||||
};
|
||||
export interface EscrowInfo {
|
||||
deliveryStatus: string;
|
||||
@@ -489,7 +490,7 @@ export interface InfoSectionProps extends DetailResponse {
|
||||
isOpen?: boolean;
|
||||
tid?: string;
|
||||
serviceCode?: string;
|
||||
purposeType?: CashReceiptPurposeType;
|
||||
purposeType?: CashReceiptPurposeType | string;
|
||||
onClickToOpenInfo?: (info: InfoSectionKeys) => void;
|
||||
}
|
||||
|
||||
@@ -665,7 +666,7 @@ export interface BillingFilterProps extends FilterProps {
|
||||
};
|
||||
|
||||
export interface CashReceiptPurposeUpdateParams {
|
||||
issueNumber: number;
|
||||
approvalNumber: string;
|
||||
newPurpose: string;
|
||||
};
|
||||
export interface CashReceiptPurposeUpdateResponse {
|
||||
|
||||
@@ -51,11 +51,13 @@ export const ListDateGroup = ({
|
||||
serviceDetailName={ items[i]?.serviceDetailName }
|
||||
goodsAmount={ items[i]?.goodsAmount }
|
||||
|
||||
approvalNumber={ items[i]?.approvalNumber }
|
||||
amount={ items[i]?.amount }
|
||||
customerName={ items[i]?.customerName }
|
||||
issueNumber={ items[i]?.issueNumber }
|
||||
paymentMethod={ items[i]?.paymentMethod }
|
||||
processResult={ items[i]?.processResult }
|
||||
transactionType={ items[i]?.transactionType }
|
||||
transactionDateTime={ items[i]?.transactionDateTime }
|
||||
|
||||
transactionAmount={ items[i]?.transactionAmount }
|
||||
|
||||
@@ -11,8 +11,8 @@ export const ListItem = ({
|
||||
tid, mid, statusCode,
|
||||
installmentMonth, serviceName, serviceCode,
|
||||
serviceDetailName, goodsAmount,
|
||||
amount, customerName, issueNumber,
|
||||
paymentMethod, processResult,
|
||||
amount, customerName, issueNumber, approvalNumber,
|
||||
paymentMethod, processResult, transactionType,
|
||||
transactionDateTime, transactionAmount,
|
||||
deliveryStatus, settlementStatus,
|
||||
cancelStatus, billKey, orderNumber
|
||||
@@ -58,7 +58,7 @@ export const ListItem = ({
|
||||
else if(transactionCategory === TransactionCategory.CashReceipt){
|
||||
navigate(PATHS.transaction.cashReceipt.detail, {
|
||||
state: {
|
||||
issueNumber: issueNumber
|
||||
approvalNumber: approvalNumber
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -173,7 +173,7 @@ export const ListItem = ({
|
||||
<div className="transaction-details">
|
||||
<span>{ getTime() }</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ }</span>
|
||||
<span>{ transactionType }</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ paymentMethod }</span>
|
||||
<span className="separator">|</span>
|
||||
|
||||
@@ -13,7 +13,7 @@ export const DetailInfoSection = ({
|
||||
|
||||
const onClickToSetOpenInfo = () => {
|
||||
if(!!onClickToOpenInfo){
|
||||
onClickToOpenInfo(InfoSectionKeys.Issue);
|
||||
onClickToOpenInfo(InfoSectionKeys.Detail);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ export const DetailInfoSection = ({
|
||||
<ul className="kv-list">
|
||||
<li className="kv-row">
|
||||
<span className="k">취소일자</span>
|
||||
<span className="v">{ moment(detailInfo?.cancelDate).format('YYYY.MM.DD') }</span>
|
||||
<span className="v">{ detailInfo?.cancelDate? moment(detailInfo?.cancelDate).format('YYYY.MM.DD'): '' }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">취소승인번호</span>
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { InfoSectionProps } from '../../model/types';
|
||||
import moment from 'moment';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export const IssueInfoSection = ({
|
||||
transactionCategory,
|
||||
issueInfo,
|
||||
purposeType,
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
const [issueDateTime, setIssueDateTime] = useState<string>('');
|
||||
|
||||
useEffect(() => {
|
||||
setIssueDateTime(issueInfo?.issueDate + ' ' + issueInfo?.issueTime);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="txn-section">
|
||||
@@ -19,15 +25,15 @@ export const IssueInfoSection = ({
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">발행번호</span>
|
||||
<span className="v">{ }</span>
|
||||
<span className="v">{ issueInfo?.issueNumber }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">발행일시</span>
|
||||
<span className="v">{ }</span>
|
||||
<span className="v">{ moment(issueDateTime).format('YYYY.MM.DD HH:mm:ss') }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">용도</span>
|
||||
<span className="v">{ purposeType }</span>
|
||||
<span className="v">{ issueInfo?.purpose }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">결제수단</span>
|
||||
@@ -39,7 +45,7 @@ export const IssueInfoSection = ({
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">진행상태</span>
|
||||
<span className="v">{ issueInfo?.transmissionStatus }</span>
|
||||
<span className="v">{ issueInfo?.processResult }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">거래구분</span>
|
||||
|
||||
@@ -92,9 +92,9 @@ export const AllTransactionListPage = () => {
|
||||
page: pageParam
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if(listParams.page){
|
||||
listParams.page.sortType = (option?.sortType)? option.sortType: sortType;
|
||||
listParams.page.sortType = option?.sortType || sortType;
|
||||
setPageParam(listParams.page);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export const CashReceiptDetailPage = () => {
|
||||
const [detailInfo, setDetailInfo] = useState<DetailInfo>();
|
||||
const [showDetailInfo, setShowDetailInfo] = useState<boolean>(false);
|
||||
const [bottomSheetOn, setBottomSheetOn] = useState<boolean>(false);
|
||||
const [purposeType, setPurposeType] = useState<CashReceiptPurposeType>();
|
||||
const [purposeType, setPurposeType] = useState<string>();
|
||||
|
||||
useSetHeaderTitle('현금영수증 상세');
|
||||
useSetHeaderType(HeaderType.RightClose);
|
||||
@@ -41,7 +41,7 @@ export const CashReceiptDetailPage = () => {
|
||||
});
|
||||
useSetFooterMode(false);
|
||||
|
||||
const issueNumber = location?.state.issueNumber
|
||||
const approvalNumber = location?.state.approvalNumber
|
||||
|
||||
const { mutateAsync: cashReceiptDetail } = useCashReceiptDetailMutation();
|
||||
const { mutateAsync: cashReceiptPurposeUpdate } = useCashReceiptPurposeUpdateMutation();
|
||||
@@ -50,7 +50,7 @@ export const CashReceiptDetailPage = () => {
|
||||
let newPurpose = (purposeType === CashReceiptPurposeType.EXPENSE_PROOF)
|
||||
? CashReceiptPurposeType.INCOME_DEDUCTION: CashReceiptPurposeType.EXPENSE_PROOF;
|
||||
let params = {
|
||||
issueNumber: issueNumber,
|
||||
approvalNumber: approvalNumber,
|
||||
newPurpose: newPurpose
|
||||
};
|
||||
cashReceiptPurposeUpdate(params).then((rs) => {
|
||||
@@ -62,7 +62,7 @@ export const CashReceiptDetailPage = () => {
|
||||
|
||||
const callDetail = () => {
|
||||
let cashReceitDetailParams: CashReceiptDetailParams = {
|
||||
issueNumber: issueNumber
|
||||
approvalNumber: approvalNumber
|
||||
};
|
||||
cashReceiptDetail(cashReceitDetailParams).then((rs: DetailResponse) => {
|
||||
setIssueInfo(rs.issueInfo);
|
||||
@@ -92,7 +92,7 @@ export const CashReceiptDetailPage = () => {
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane sub active">
|
||||
<div className="option-list">
|
||||
<div className="txn-detail">
|
||||
<div className={ `txn-detail ${(detailInfo?.canDownloadReceipt)? 'pb-86': ''}` }>
|
||||
<IssueInfoSection
|
||||
transactionCategory={ TransactionCategory.CashReceipt }
|
||||
issueInfo={ issueInfo }
|
||||
@@ -107,12 +107,14 @@ export const CashReceiptDetailPage = () => {
|
||||
></DetailInfoSection>
|
||||
</div>
|
||||
</div>
|
||||
{ !!detailInfo?.canDownloadReceipt &&
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={ () => onClickToPurposeUpdate() }
|
||||
>용도 변경</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -57,14 +57,14 @@ export const CashReceiptListPage = () => {
|
||||
|
||||
const callList = (option?: {
|
||||
sortType?: SortTypeKeys,
|
||||
val?: string
|
||||
val?: CashReceiptTransactionType
|
||||
}) => {
|
||||
let listSummaryParams: CashReceiptSummaryParams = {
|
||||
mid: mid,
|
||||
startDate: startDate,
|
||||
endDate: endDate,
|
||||
purposeType: purposeType,
|
||||
transactionType: transactionType,
|
||||
transactionType: option?.val || transactionType,
|
||||
processResult: processResult,
|
||||
searchNumberType: searchNumberType,
|
||||
searchNumber: searchNumber,
|
||||
@@ -76,8 +76,9 @@ export const CashReceiptListPage = () => {
|
||||
page: pageParam
|
||||
}
|
||||
};
|
||||
|
||||
if(listParams.page){
|
||||
listParams.page.sortType = (option?.sortType)? option.sortType: sortType;
|
||||
listParams.page.sortType = option?.sortType || sortType;
|
||||
setPageParam(listParams.page);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user