diff --git a/src/layout/MainLayout/Header/index.js b/src/layout/MainLayout/Header/index.js
index 5d6eba1..5e4b0dc 100644
--- a/src/layout/MainLayout/Header/index.js
+++ b/src/layout/MainLayout/Header/index.js
@@ -169,10 +169,22 @@ function Header(props) {
校對記錄
- 付款記錄
+ 付款記錄
+ {isPrimaryLoggedIn() ?
+
+ -
+ 網上付款記錄
+
+ -
+ 繳款通知記錄
+
+
+ :
+ <>>
+ }
- 設定
+ 設定
{isPrimaryLoggedIn() ?
diff --git a/src/pages/DemandNote/Search/DataGrid.js b/src/pages/DemandNote/Search/DataGrid.js
index c7539a8..b026814 100644
--- a/src/pages/DemandNote/Search/DataGrid.js
+++ b/src/pages/DemandNote/Search/DataGrid.js
@@ -4,15 +4,22 @@ import {
Grid,
Typography,
Button,
- Box
+ Box,
+ Dialog, DialogTitle, DialogContent, DialogActions,
} from '@mui/material';
import * as DateUtils from "utils/DateUtils";
-import * as StatusUtils from "utils/statusUtils/PublicNoteStatusUtils";
+import * as StatusUtils from "utils/statusUtils/DnStatus";
import { useNavigate } from "react-router-dom";
import { FiDataGrid } from "components/FiDataGrid";
+
+import * as UrlUtils from "utils/ApiPathConst";
+import * as HttpUtils from "utils/HttpUtils";
// ==============================|| EVENT TABLE ||============================== //
-export default function SeaarchDemandNote({ recordList }) {
+export default function SearchDemandNote({ recordList, reloadFun }) {
+
+ const [isConfirmPopUp, setConfirmPopUp] = React.useState(false);
+ const [isSendPopUp, setSendPopUp] = React.useState(false);
const [rows, setRows] = React.useState(recordList);
const [selectedRowItems, setSelectedRowItems] = React.useState([]);
@@ -35,14 +42,24 @@ export default function SeaarchDemandNote({ recordList }) {
});
};
- const onSendClick = ()=>{
- let appIdList = [];
+ const onSendClick = () => {
+ setSendPopUp(false)
+ let idList = [];
const datas = rows?.filter((row) =>
selectedRowItems.includes(row.id)
);
for (var i = 0; i < datas?.length; i++) {
- appIdList.push(datas[i].appId);
+ idList.push(datas[i].id);
}
+ HttpUtils.post({
+ url: UrlUtils.DEMAND_NOTE_SEND,
+ params: {
+ dnIdList: idList
+ },
+ onSuccess: () => {
+ if (reloadFun) reloadFun();
+ }
+ });
}
@@ -50,8 +67,24 @@ export default function SeaarchDemandNote({ recordList }) {
}
- const markPaid = ()=>{
-
+ const markPaid = () => {
+ setConfirmPopUp(false);
+ let idList = [];
+ const datas = rows?.filter((row) =>
+ selectedRowItems.includes(row.id)
+ );
+ for (var i = 0; i < datas?.length; i++) {
+ idList.push(datas[i].id);
+ }
+ HttpUtils.post({
+ url: UrlUtils.DEMAND_NOTE_MARK_PAID,
+ params: {
+ dnIdList: idList
+ },
+ onSuccess: () => {
+ if (reloadFun) reloadFun();
+ }
+ });
}
function handleRowDoubleClick(params) {
@@ -114,7 +147,7 @@ export default function SeaarchDemandNote({ recordList }) {
headerName: 'Status',
width: 175,
renderCell: (params) => {
- return [StatusUtils.getStatusEng(params)]
+ return [StatusUtils.getStatus_Eng(params)]
},
},
{
@@ -122,7 +155,7 @@ export default function SeaarchDemandNote({ recordList }) {
headerName: 'DN Sent Date',
flex: 1,
valueGetter: (params) => {
- return params?.value?DateUtils.datetimeStr(params?.value)+" - "+params.row.sentBy:"";
+ return params?.value ? DateUtils.datetimeStr(params?.value) + " - " + params.row.sentBy : "";
}
},
{
@@ -142,7 +175,7 @@ export default function SeaarchDemandNote({ recordList }) {