에스크로 빌링 현금영수증 세금계산서 필터 뱃지
This commit is contained in:
@@ -10,8 +10,8 @@ export const getVatReturnReceiptTypeBtnGroup = (t: TFunction) => [
|
||||
export const getVatReturnTargetTypeBtnGroup = (t: TFunction) => [
|
||||
{name: t('transaction.constants.all'), value: VatReturnTargetType.ALL },
|
||||
{name: t('vatReturn.general'), value: VatReturnTargetType.GENERAL },
|
||||
{name: t('vatReturn.differenceSettlement'), value: VatReturnTargetType.DIFFERENCE_COLLECTION },
|
||||
{name: t('vatReturn.refundSettlement'), value: VatReturnTargetType.REFUND_SETTLEMENT }
|
||||
{name: t('vatReturn.differenceSettlement'), value: VatReturnTargetType.DIFF_SETTLE },
|
||||
{name: t('vatReturn.refundSettlement'), value: VatReturnTargetType.REFUND_SETTLE }
|
||||
];
|
||||
|
||||
export const getVatReturnTaxBtnGroups = (t: TFunction) => [
|
||||
|
||||
@@ -20,8 +20,8 @@ export enum VatReturnPayTax {
|
||||
export enum VatReturnTargetType {
|
||||
ALL = 'ALL',
|
||||
GENERAL = 'GENERAL',
|
||||
DIFFERENCE_COLLECTION = 'DIFFERENCE_COLLECTION',
|
||||
REFUND_SETTLEMENT = 'REFUND_SETTLEMENT',
|
||||
DIFF_SETTLE = 'DIFF_SETTLE',
|
||||
REFUND_SETTLE = 'REFUND_SETTLE',
|
||||
};
|
||||
|
||||
export interface VatReturnListParams {
|
||||
|
||||
@@ -29,6 +29,12 @@ import { snackBar } from '@/shared/lib';
|
||||
|
||||
/* 세금계산서 48 */
|
||||
const menuId = 48;
|
||||
const defaultParams = {
|
||||
startMonth: moment().format('YYYYMM'),
|
||||
endMonth: moment().format('YYYYMM'),
|
||||
receiptType: VatReturnReceiptType.ALL,
|
||||
targetType: VatReturnTargetType.ALL,
|
||||
};
|
||||
export const ListWrap = () => {
|
||||
const { t } = useTranslation();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
@@ -39,10 +45,10 @@ export const ListWrap = () => {
|
||||
const [listItems, setListItems] = useState<Array<VatReturnListContent>>([]);
|
||||
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [startMonth, setStartMonth] = useState<string>(moment().format('YYYYMM'));
|
||||
const [endMonth, setEndMonth] = useState<string>(moment().format('YYYYMM'));
|
||||
const [receiptType, setReceiptType] = useState<VatReturnReceiptType>(VatReturnReceiptType.ALL);
|
||||
const [targetType, setTargetType] = useState<VatReturnTargetType>(VatReturnTargetType.ALL);
|
||||
const [startMonth, setStartMonth] = useState<string>(defaultParams.startMonth);
|
||||
const [endMonth, setEndMonth] = useState<string>(defaultParams.endMonth);
|
||||
const [receiptType, setReceiptType] = useState<VatReturnReceiptType>(defaultParams.receiptType);
|
||||
const [targetType, setTargetType] = useState<VatReturnTargetType>(defaultParams.targetType);
|
||||
|
||||
const [downloadBottomSheetOn, setDownloadBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
@@ -53,6 +59,7 @@ export const ListWrap = () => {
|
||||
const [groupDateOn, setGroupDateOn] = useState<boolean>(false);
|
||||
|
||||
const [listHeight, setListHeight] = useState<number>(0);
|
||||
const [filterUsed, setFilterUsed] = useState<boolean>(false);
|
||||
|
||||
const { mutateAsync: vatReturnList } = useVatReturnListMutation();
|
||||
const { mutateAsync: vatReturnDownloadExcel } = useVatReturnDownloadExcelMutation();
|
||||
@@ -214,8 +221,21 @@ export const ListWrap = () => {
|
||||
return rs;
|
||||
};
|
||||
|
||||
const checkUsedFilter = () => {
|
||||
let rs: boolean = true;
|
||||
if(startMonth === defaultParams.startMonth
|
||||
&& endMonth=== defaultParams.endMonth
|
||||
&& receiptType === defaultParams.receiptType
|
||||
&& targetType === defaultParams.targetType
|
||||
){
|
||||
rs = false;
|
||||
}
|
||||
setFilterUsed(rs);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
checkUsedFilter();
|
||||
}, [
|
||||
mid, startMonth, endMonth,
|
||||
receiptType, targetType, sortType
|
||||
@@ -258,6 +278,9 @@ export const ListWrap = () => {
|
||||
src={ IMAGE_ROOT + '/ico_setting.svg' }
|
||||
alt={ t('transaction.searchOptions') }
|
||||
/>
|
||||
{ filterUsed &&
|
||||
<span className="notification-badge2"></span>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
<button className="download-btn">
|
||||
@@ -285,6 +308,9 @@ export const ListWrap = () => {
|
||||
alt={ t('transaction.searchOptions') }
|
||||
onClick={ onClickToOpenFilter }
|
||||
/>
|
||||
{ filterUsed &&
|
||||
<span className="notification-badge2"></span>
|
||||
}
|
||||
</button>
|
||||
<button className="download-btn">
|
||||
<img
|
||||
|
||||
@@ -40,6 +40,17 @@ import { useBillingExcelMutation } from '@/entities/transaction/api/use-billing-
|
||||
|
||||
/* 빌링 34 */
|
||||
const menuId = 34;
|
||||
const defaultParams = {
|
||||
searchType: BillingSearchType.ALL,
|
||||
searchKeyword: '',
|
||||
startDate: moment().format('YYYYMMDD'),
|
||||
endDate: moment().format('YYYYMMDD'),
|
||||
requestStatus: BillingRequestStatus.ALL,
|
||||
processResult: BillingProcessResult.ALL,
|
||||
paymentMethod: BillingPaymentMethod.ALL,
|
||||
minAmount: undefined,
|
||||
maxAmount: undefined
|
||||
};
|
||||
export const BillingListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
@@ -51,21 +62,23 @@ export const BillingListPage = () => {
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [searchType, setSearchType] = useState<BillingSearchType>(BillingSearchType.ALL);
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||
const [startDate, setStartDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [requestStatus, setRequestStatus] = useState<BillingRequestStatus>(BillingRequestStatus.ALL);
|
||||
const [processResult, setProcessResult] = useState<BillingProcessResult>(BillingProcessResult.ALL);
|
||||
const [paymentMethod, setPaymentMethod] = useState<BillingPaymentMethod>(BillingPaymentMethod.ALL);
|
||||
const [minAmount, setMinAmount] = useState<number>();
|
||||
const [maxAmount, setMaxAmount] = useState<number>();
|
||||
const [searchType, setSearchType] = useState<BillingSearchType>(defaultParams.searchType);
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>(defaultParams.searchKeyword);
|
||||
const [startDate, setStartDate] = useState<string>(defaultParams.startDate);
|
||||
const [endDate, setEndDate] = useState<string>(defaultParams.endDate);
|
||||
const [requestStatus, setRequestStatus] = useState<BillingRequestStatus>(defaultParams.requestStatus);
|
||||
const [processResult, setProcessResult] = useState<BillingProcessResult>(defaultParams.processResult);
|
||||
const [paymentMethod, setPaymentMethod] = useState<BillingPaymentMethod>(defaultParams.paymentMethod);
|
||||
const [minAmount, setMinAmount] = useState<number | undefined>(defaultParams.minAmount);
|
||||
const [maxAmount, setMaxAmount] = useState<number | undefined>(defaultParams.maxAmount);
|
||||
|
||||
const [downloadBottomSheetOn, setDownloadBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
const [detailOn, setDetailOn] = useState<boolean>(false);
|
||||
const [detailTid, setDetailTid] = useState<string>('');
|
||||
|
||||
const [filterUsed, setFilterUsed] = useState<boolean>(false);
|
||||
|
||||
useSetHeaderTitle(t('billing.title'));
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetOnBack(() => {
|
||||
@@ -213,8 +226,26 @@ export const BillingListPage = () => {
|
||||
setDetailTid(detailData.tid);
|
||||
};
|
||||
|
||||
const checkUsedFilter = () => {
|
||||
let rs: boolean = true;
|
||||
if(searchType === defaultParams.searchType
|
||||
&& searchKeyword === defaultParams.searchKeyword
|
||||
&& startDate === defaultParams.startDate
|
||||
&& endDate === defaultParams.endDate
|
||||
&& requestStatus === defaultParams.requestStatus
|
||||
&& processResult === defaultParams.processResult
|
||||
&& paymentMethod === defaultParams.paymentMethod
|
||||
&& minAmount === defaultParams.minAmount
|
||||
&& maxAmount === defaultParams.maxAmount
|
||||
){
|
||||
rs = false;
|
||||
}
|
||||
setFilterUsed(rs);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
checkUsedFilter();
|
||||
}, [
|
||||
mid, searchType, searchKeyword,
|
||||
startDate, endDate, sortType,
|
||||
@@ -242,6 +273,9 @@ export const BillingListPage = () => {
|
||||
alt={ t('transaction.searchOptions') }
|
||||
onClick={ onClickToOpenFilter }
|
||||
/>
|
||||
{ filterUsed &&
|
||||
<span className="notification-badge2"></span>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
<button className="download-btn">
|
||||
|
||||
@@ -45,6 +45,15 @@ import { useCashReceiptExcelDownloadMutation } from '@/entities/transaction/api/
|
||||
|
||||
/* 현금영수증 32 */
|
||||
const menuId = 32;
|
||||
const defaultParams = {
|
||||
startDate: moment().format('YYYYMMDD'),
|
||||
endDate: moment().format('YYYYMMDD'),
|
||||
purposeType: CashReceiptPurposeType.ALL,
|
||||
transactionType: CashReceiptTransactionType.ALL,
|
||||
processResult: CashReceiptProcessResult.ALL,
|
||||
searchNumberType: CashReceiptSearchNumberType.APPROVAL_NUMBER,
|
||||
searchNumber: '',
|
||||
};
|
||||
export const CashReceiptListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const { t, i18n } = useTranslation();
|
||||
@@ -56,8 +65,8 @@ export const CashReceiptListPage = () => {
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [startDate, setStartDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [startDate, setStartDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
const [endDate, setEndDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
const [purposeType, setPurposeType] = useState<CashReceiptPurposeType>(CashReceiptPurposeType.ALL);
|
||||
const [transactionType, setTransactionType] = useState<CashReceiptTransactionType>(CashReceiptTransactionType.ALL);
|
||||
const [processResult, setProcessResult] = useState<CashReceiptProcessResult>(CashReceiptProcessResult.ALL);
|
||||
@@ -75,6 +84,8 @@ export const CashReceiptListPage = () => {
|
||||
const [detailTid, setDetailTid] = useState<string>('');
|
||||
const [detailServiceCode, setDetailServiceCode] = useState<string>('');
|
||||
|
||||
const [filterUsed, setFilterUsed] = useState<boolean>(false);
|
||||
|
||||
useSetHeaderTitle(t('cashReceipt.title'));
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetOnBack(() => {
|
||||
@@ -244,8 +255,24 @@ export const CashReceiptListPage = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const checkUsedFilter = () => {
|
||||
let rs: boolean = true;
|
||||
if(startDate === defaultParams.startDate
|
||||
&& endDate === defaultParams.endDate
|
||||
&& purposeType === defaultParams.purposeType
|
||||
&& transactionType === defaultParams.transactionType
|
||||
&& processResult === defaultParams.processResult
|
||||
&& searchNumberType === defaultParams.searchNumberType
|
||||
&& searchNumber === defaultParams.searchNumber
|
||||
){
|
||||
rs = false;
|
||||
}
|
||||
setFilterUsed(rs);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
checkUsedFilter();
|
||||
}, [
|
||||
mid, startDate, endDate, sortType,
|
||||
purposeType, transactionType, processResult,
|
||||
@@ -272,6 +299,9 @@ export const CashReceiptListPage = () => {
|
||||
alt={ t('transaction.searchOptions') }
|
||||
onClick={ onClickToOpenFilter }
|
||||
/>
|
||||
{ filterUsed &&
|
||||
<span className="notification-badge2"></span>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
<button className="download-btn">
|
||||
|
||||
@@ -40,6 +40,16 @@ import { useEscrowDownloadExcelMutation } from '@/entities/transaction/api/use-e
|
||||
|
||||
/* 에스크로 33 */
|
||||
const menuId = 33;
|
||||
const defaultParams = {
|
||||
searchType: EscrowSearchType.ALL,
|
||||
searchKeyword: '',
|
||||
startDate: moment().format('YYYYMMDD'),
|
||||
endDate: moment().format('YYYYMMDD'),
|
||||
deliveryStatus: EscrowDeliveryStatus.ALL,
|
||||
settlementStatus: EscrowSettlementStatus.ALL,
|
||||
minAmount: undefined,
|
||||
maxAmount: undefined
|
||||
};
|
||||
export const EscrowListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
@@ -54,12 +64,12 @@ export const EscrowListPage = () => {
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [searchType, setSearchType] = useState<EscrowSearchType>(EscrowSearchType.ALL);
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||
const [startDate, setStartDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [startDate, setStartDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
const [endDate, setEndDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
const [deliveryStatus, setDeliveryStatus] = useState<EscrowDeliveryStatus>(EscrowDeliveryStatus.ALL);
|
||||
const [settlementStatus, setSettlementStatus] = useState<EscrowSettlementStatus>(EscrowSettlementStatus.ALL);
|
||||
const [minAmount, setMinAmount] = useState<number>();
|
||||
const [maxAmount, setMaxAmount] = useState<number>();
|
||||
const [minAmount, setMinAmount] = useState<number | undefined>();
|
||||
const [maxAmount, setMaxAmount] = useState<number | undefined>();
|
||||
|
||||
const [downloadBottomSheetOn, setDownloadBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
@@ -67,6 +77,8 @@ export const EscrowListPage = () => {
|
||||
const [detailTid, setDetailTid] = useState<string>('');
|
||||
const [detailServiceCode, setDetailServiceCode] = useState<string>('');
|
||||
|
||||
const [filterUsed, setFilterUsed] = useState<boolean>(false);
|
||||
|
||||
useSetHeaderTitle(t('escrow.title'));
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetOnBack(() => {
|
||||
@@ -206,8 +218,26 @@ export const EscrowListPage = () => {
|
||||
setDeliveryStatus(val);
|
||||
};
|
||||
|
||||
const checkUsedFilter = () => {
|
||||
let rs: boolean = true;
|
||||
if(searchType === defaultParams.searchType
|
||||
&& searchKeyword === defaultParams.searchKeyword
|
||||
&& startDate === defaultParams.startDate
|
||||
&& endDate === defaultParams.endDate
|
||||
&& deliveryStatus === defaultParams.deliveryStatus
|
||||
&& settlementStatus === defaultParams.settlementStatus
|
||||
&& minAmount === defaultParams.minAmount
|
||||
&& maxAmount === defaultParams.maxAmount
|
||||
){
|
||||
rs = false;
|
||||
}
|
||||
setFilterUsed(rs);
|
||||
};
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
checkUsedFilter();
|
||||
}, [
|
||||
mid, searchType, searchKeyword,
|
||||
startDate, endDate, sortType,
|
||||
@@ -235,6 +265,9 @@ export const EscrowListPage = () => {
|
||||
alt={ t('transaction.searchOptions') }
|
||||
onClick={ onClickToOpenFilter }
|
||||
/>
|
||||
{ filterUsed &&
|
||||
<span className="notification-badge2"></span>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
<button className="download-btn">
|
||||
|
||||
Reference in New Issue
Block a user