diff --git a/src/layout/MainLayout/Header/index.js b/src/layout/MainLayout/Header/index.js
index 2b29398..7061f0e 100644
--- a/src/layout/MainLayout/Header/index.js
+++ b/src/layout/MainLayout/Header/index.js
@@ -105,6 +105,9 @@ function Header(props) {
GFMIS Generate XML
+
+ Recon Report
+
Create Demand Note
diff --git a/src/pages/Recon/SearchForm.js b/src/pages/Recon/SearchForm.js
new file mode 100644
index 0000000..0353df3
--- /dev/null
+++ b/src/pages/Recon/SearchForm.js
@@ -0,0 +1,359 @@
+// material-ui
+import {
+ Button,
+ Grid, TextField,
+ Autocomplete,
+ Typography
+} from '@mui/material';
+import MainCard from "components/MainCard";
+import { useForm } from "react-hook-form";
+import * as React from "react";
+// import * as DateUtils from "utils/DateUtils";
+import {PNSPS_BUTTON_THEME} from "../../themes/buttonConst";
+import {ThemeProvider} from "@emotion/react";
+import * as ComboData from "utils/ComboData";
+import * as DateUtils from "utils/DateUtils";
+const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent')));
+
+// ==============================|| DASHBOARD - DEFAULT ||============================== //
+
+
+const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria,onDownload }) => {
+
+ const [sysTxnMinDate, setSysTxnMinDate] = React.useState(searchCriteria.dateFrom);
+ const [sysTxnMaxDate, setsysTxnMaxDate] = React.useState(searchCriteria.dateTo);
+ const [txnMinDate, setTxnMinDate] = React.useState(searchCriteria.dateFrom);
+ const [txnMaxDate, setTxnMaxDate] = React.useState(searchCriteria.dateTo);
+ const [collMinDate, setCollMinDate] = React.useState(searchCriteria.dateFrom);
+ const [collMaxDate, setCollMaxDate] = React.useState(searchCriteria.dateTo);
+ const [status, setStatus] = React.useState(ComboData.paymentStatus[0]);
+ const [method, setMethod] = React.useState(ComboData.paymentMethod[0]);
+ const marginBottom = 2.5;
+
+ const { register, handleSubmit, getValues } = useForm()
+
+ const onSubmit = () => {
+ const sysTxnDateFrom = getValues("sysTxnDateFrom")
+ const sysTxnDateTo = getValues("sysTxnDateTo")
+ const txnDateFrom = getValues("txnDateFrom")
+ const txnDateTo = getValues("txnDateTo")
+ const collDateFrom = getValues("collDateFrom")
+ const collDateTo = getValues("collDateTo")
+
+ const temp = {
+ PaymentMethod:(method?.type && method?.type != 'Please Select') ? method?.type : "",
+ PaymentStatus : (status?.type && status?.type != 'all') ? status?.type : "",
+ SysTxnDateFrom:sysTxnDateFrom,
+ SysTxnDateTo:sysTxnDateTo,
+ TxnDateFrom:txnDateFrom,
+ TxnDateTo:txnDateTo,
+ CollDateFrom:collDateFrom,
+ CollDateTo:collDateTo,
+ };
+ applySearch(temp);
+ };
+
+ const generatePDFHandler = () => {
+ const sysTxnDateFrom = getValues("sysTxnDateFrom")
+ const sysTxnDateTo = getValues("sysTxnDateTo")
+ const txnDateFrom = getValues("txnDateFrom")
+ const txnDateTo = getValues("txnDateTo")
+ const collDateFrom = getValues("collDateFrom")
+ const collDateTo = getValues("collDateTo")
+
+ const temp = {
+ PaymentMethod:(method?.type && method?.type != 'Please Select') ? method?.type : "",
+ PaymentStatus : (status?.type && status?.type != 'all') ? status?.type : "",
+ SysTxnDateFrom:sysTxnDateFrom,
+ SysTxnDateTo:sysTxnDateTo,
+ TxnDateFrom:txnDateFrom,
+ TxnDateTo:txnDateTo,
+ CollDateFrom:collDateFrom,
+ CollDateTo:collDateTo,
+ ReportFormat:"pdf"
+ };
+ generateReport(temp);
+ }
+
+ const generateCSVHandler = () => {
+ const sysTxnDateFrom = getValues("sysTxnDateFrom")
+ const sysTxnDateTo = getValues("sysTxnDateTo")
+ const txnDateFrom = getValues("txnDateFrom")
+ const txnDateTo = getValues("txnDateTo")
+ const collDateFrom = getValues("collDateFrom")
+ const collDateTo = getValues("collDateTo")
+
+ const temp = {
+ PaymentMethod:(method?.type && method?.type != 'Please Select') ? method?.type : "",
+ PaymentStatus : (status?.type && status?.type != 'all') ? status?.type : "",
+ SysTxnDateFrom:sysTxnDateFrom,
+ SysTxnDateTo:sysTxnDateTo,
+ TxnDateFrom:txnDateFrom,
+ TxnDateTo:txnDateTo,
+ CollDateFrom:collDateFrom,
+ CollDateTo:collDateTo,
+ ReportFormat:"csv"
+ };
+ generateReport(temp);
+ }
+
+
+ return (
+
+
+
+
+ );
+};
+
+export default SearchPublicNoticeForm;
diff --git a/src/pages/Recon/index.js b/src/pages/Recon/index.js
new file mode 100644
index 0000000..3b36940
--- /dev/null
+++ b/src/pages/Recon/index.js
@@ -0,0 +1,118 @@
+// material-ui
+import {
+ Grid,
+ Typography,
+ Stack
+} from '@mui/material';
+// import MainCard from "components/MainCard";
+import * as UrlUtils from "utils/ApiPathConst";
+import * as React from "react";
+import * as HttpUtils from "utils/HttpUtils";
+// import * as DateUtils from "utils/DateUtils";
+
+import Loadable from 'components/Loadable';
+const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent')));
+const SearchForm = Loadable(React.lazy(() => import('./SearchForm')));
+// const EventTable = Loadable(React.lazy(() => import('./DataGrid')));
+import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
+
+const BackgroundHead = {
+ backgroundImage: `url(${titleBackgroundImg})`,
+ width: '100%',
+ height: '100%',
+ backgroundSize:'contain',
+ backgroundRepeat: 'no-repeat',
+ backgroundColor: '#0C489E',
+ backgroundPosition: 'right'
+}
+
+// ==============================|| DASHBOARD - DEFAULT ||============================== //
+
+const Index = () => {
+
+ // const [record,setRecord] = React.useState([]);
+ const [searchCriteria, setSearchCriteria] = React.useState({
+ // dateTo: DateUtils.dateStr(new Date()),
+ // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)),
+ });
+ const [onReady] = React.useState(true);
+ const [onDownload, setOnDownload] = React.useState(false);
+
+ // React.useEffect(() => {
+ // setOnReady(true);
+ // }, [record]);
+
+ React.useEffect(() => {
+ if (Object.keys(searchCriteria).length > 0){
+ console.log(searchCriteria)
+ loadGrid();
+ }
+ }, [searchCriteria]);
+
+ function loadGrid(){
+ HttpUtils.get({
+ url: UrlUtils.VIEW_RECON_REPORT,
+ params: searchCriteria,
+ onSuccess: function(responseData){
+ console.log(responseData)
+ var myWindow = window.open();
+ myWindow.document.write(responseData);
+ }
+ });
+ }
+
+ function downloadXML(input) {
+ // console.log(input)
+ setOnDownload(true)
+ HttpUtils.fileDownload({
+ url: UrlUtils.GEN_RECON_REPORT,
+ params:input,
+ onResponse:(response)=>{
+ console.log(response)
+ setOnDownload(false)
+ },
+ onError:()=>{
+ setOnDownload(false)
+ }
+ });
+ // open(UrlUtils.GEN_GFMIS_XML + "/today?online=true")
+ }
+
+
+ function applySearch(input) {
+ setSearchCriteria(input);
+ }
+
+ function generateReport(input) {
+ downloadXML(input);
+ }
+
+ return (
+ !onReady ?
+
+ :
+
+
+
+
+
+ Recon Report
+
+
+
+
+ {/*row 1*/}
+
+
+
+ {/*row 2*/}
+
+ );
+};
+
+export default Index;
diff --git a/src/routes/GLDUserRoutes.js b/src/routes/GLDUserRoutes.js
index b317f62..84d08ad 100644
--- a/src/routes/GLDUserRoutes.js
+++ b/src/routes/GLDUserRoutes.js
@@ -28,7 +28,7 @@ const HolidayPage = Loadable(lazy(() => import('pages/Holiday')));
const GazetteIssuePage = Loadable(lazy(() => import('pages/GazetteIssue/index')));
const DrImport = Loadable(lazy(() => import('pages/Setting/DrImport')));
const AuditLogPage = Loadable(lazy(() => import('pages/AuditLog/index')));
-
+const ReconReportPage = Loadable(lazy(() => import('pages/Recon')));
// ==============================|| MAIN ROUTING ||============================== //
const GLDUserRoutes = {
@@ -86,6 +86,10 @@ const GLDUserRoutes = {
path: '/paymentPage/demandNote/details/:id',
element:
},
+ {
+ path: '/paymentPage/reconReport',
+ element:
+ },
{
path: '/gfmis/search',
element:
diff --git a/src/utils/ApiPathConst.js b/src/utils/ApiPathConst.js
index 32c1b47..63fd471 100644
--- a/src/utils/ApiPathConst.js
+++ b/src/utils/ApiPathConst.js
@@ -185,6 +185,8 @@ export const GEN_PAYMENT_RECEIPT = apiPath+'/payment/receipt'; //POST
//gen report
export const GEN_GFMIS_XML = apiPath+'/gfmis'; //GET
+export const VIEW_RECON_REPORT = apiPath+'/reportings/report'; //GET
+export const GEN_RECON_REPORT = apiPath+'/reportings/download'; //GET
//Holiday
export const GET_HOLIDAY = apiPath+'/holiday/list'; //GET
diff --git a/src/utils/ComboData.js b/src/utils/ComboData.js
index bed01a4..c96efe3 100644
--- a/src/utils/ComboData.js
+++ b/src/utils/ComboData.js
@@ -130,4 +130,12 @@ export const Locale = [
{ id: 1, key: 1, label: 'English', type: 'en' },
{ id: 2, key: 2, label: '繁體中文', type: 'zh_HK' },
{ id: 3, key: 3, label: '简体中文', type: 'zh_CN' },
-];
\ No newline at end of file
+];
+
+export const paymentMethod = [
+ {label: 'Please Select', type: '' },
+ {label:'01 EPSCO - PPS', type: '01,PPSB' },
+ {label:'02 BCMP - VC/MC/JC', type: '02,BCMP' },
+ {label:'03 CUP', type: '03,BCMP' },
+ {label:'04 FPS', type: '04,BCFP' },
+];