diff --git a/src/pages/DemandNote/Create/DataGrid.js b/src/pages/DemandNote/Create/DataGrid.js
index 9dad92c..0a4bc9f 100644
--- a/src/pages/DemandNote/Create/DataGrid.js
+++ b/src/pages/DemandNote/Create/DataGrid.js
@@ -50,7 +50,7 @@ export default function SearchPublicNoticeTable({ recordList }) {
headerName: 'Status',
flex: 1,
renderCell: (params) => {
- return PublicNoteStatusUtils.getStatusByTextEng(params.row.status);
+ return PublicNoteStatusUtils.getStatusByTextEng(params.row.status, params.row.creditor);
}
},
{
diff --git a/src/pages/DemandNote/Create/SearchForm.js b/src/pages/DemandNote/Create/SearchForm.js
index 54c317f..6b46abd 100644
--- a/src/pages/DemandNote/Create/SearchForm.js
+++ b/src/pages/DemandNote/Create/SearchForm.js
@@ -14,15 +14,23 @@ import * as DateUtils from "utils/DateUtils";
import * as UrlUtils from "utils/ApiPathConst";
import * as HttpUtils from "utils/HttpUtils";
import { useNavigate } from "react-router-dom";
+import { notifyDownloadSuccess } from 'utils/CommonFunction';
+
+
// ==============================|| DASHBOARD - DEFAULT ||============================== //
-const SearchPublicNoticeForm = ({ applySearch, issueComboData }) => {
+const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _publishCount }) => {
const [isFailPopUp, setIsFailPopUp] = React.useState(false);
const [failText, setFailText] = React.useState("");
+ const [isSuccessPopUp, setIsSuccessPopUp] = React.useState(false);
+ const [resultCount, setResultCount] = React.useState(0);
+
const [issueSelected, setIssueSelected] = React.useState({});
+ const [paymentCount, setPaymentCount] = React.useState(0);
+ const [publishCount, setPublishCount] = React.useState(0);
const [issueCombo, setIssueCombo] = React.useState([]);
const navigate = useNavigate()
@@ -48,7 +56,14 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData }) => {
}
}, [issueComboData]);
-
+ React.useEffect(() => {
+ setPaymentCount(_paymentCount);
+ }, [_paymentCount]);
+
+ React.useEffect(() => {
+ setPublishCount(_publishCount);
+ }, [_publishCount]);
+
React.useEffect(() => {
onPreView();
}, [issueSelected]);
@@ -69,14 +84,33 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData }) => {
} else {
HttpUtils.post({
url: UrlUtils.DEMAND_NOTE_CREATE + "/" + issueSelected.id,
- onSuccess: function () {
- navigate('/paymentPage/demandNote');
+ onSuccess: function (responseData) {
+ setResultCount(responseData.count);
+ setIsSuccessPopUp(true);
}
});
}
};
+ const fileDownload = () => {
+ HttpUtils.fileDownload({
+ url: UrlUtils.DEMAND_NOTE_EXPORT,
+ params: {
+ "issueId": issueSelected.id
+ },
+ onSuccess: function () {
+ notifyDownloadSuccess();
+ }
+ });
+ }
+
+ const onNavigate = () => {
+ setIsSuccessPopUp(false);
+ if(resultCount > 0)
+ navigate('/paymentPage/demandNote');
+ };
+
const onPreView = () => {
if (!issueSelected?.id) {
return;
@@ -104,7 +138,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData }) => {
{/*row 2*/}
-
+
{
Preview
*/}
-
+
+
+
+ Pending Payment: {paymentCount}
+
+
+
+ Pending Publish: {publishCount}
+
@@ -165,6 +207,35 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData }) => {
+
+
+
);
};
diff --git a/src/pages/DemandNote/Create/index.js b/src/pages/DemandNote/Create/index.js
index f92908d..b8740ac 100644
--- a/src/pages/DemandNote/Create/index.js
+++ b/src/pages/DemandNote/Create/index.js
@@ -35,6 +35,9 @@ const Index = () => {
const [searchCriteria, setSearchCriteria] = React.useState({});
const [onReady, setOnReady] = React.useState(false);
+ const [paymentCount, setPaymentCount] = React.useState(0);
+ const [publishCount, setPublishCount] = React.useState(0);
+
React.useEffect(()=>{
getIssueCombo();
},[]);
@@ -51,7 +54,9 @@ const Index = () => {
HttpUtils.get({
url: UrlUtils.DEMAND_NOTE_PREVIEW+"/"+searchCriteria.issueId,
onSuccess: function(responseData){
- setRecord(responseData);
+ setRecord(responseData.records);
+ setPaymentCount(responseData.paymentCount);
+ setPublishCount(responseData.publishCount);
}
});
}
@@ -88,6 +93,8 @@ const Index = () => {
{/*row 2*/}
diff --git a/src/pages/DemandNote/Search/index.js b/src/pages/DemandNote/Search/index.js
index b0ab178..cbe9141 100644
--- a/src/pages/DemandNote/Search/index.js
+++ b/src/pages/DemandNote/Search/index.js
@@ -18,6 +18,7 @@ const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/Loa
const SearchForm = Loadable(React.lazy(() => import('./SearchForm')));
const EventTable = Loadable(React.lazy(() => import('./DataGrid')));
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
+import { notifyDownloadSuccess } from 'utils/CommonFunction';
const BackgroundHead = {
backgroundImage: `url(${titleBackgroundImg})`,
@@ -77,6 +78,7 @@ const UserSearchPage_Individual = () => {
url: UrlUtils.DEMAND_NOTE_EXPORT,
params: searchCriteria,
onSuccess: function () {
+ notifyDownloadSuccess();
}
});
}
diff --git a/src/pages/Payment/index.js b/src/pages/Payment/index.js
index 40d4807..1fdc562 100644
--- a/src/pages/Payment/index.js
+++ b/src/pages/Payment/index.js
@@ -29,6 +29,8 @@ import {
// import FpsIcon from "assets/images/icons/fps.svg";
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
+import {ThemeProvider} from "@emotion/react";
+import {PNSPS_BUTTON_THEME} from "../../themes/buttonConst";
const BackgroundHead = {
backgroundImage: `url(${titleBackgroundImg})`,
width: '100%',
@@ -424,10 +426,10 @@ const Index = () => {
+
{/*row 2*/}
diff --git a/src/pages/Proof/Payment/Pay.js b/src/pages/Proof/Payment/Pay.js
index 4fa0e19..c28940a 100644
--- a/src/pages/Proof/Payment/Pay.js
+++ b/src/pages/Proof/Payment/Pay.js
@@ -32,6 +32,8 @@ import {
// useEffect,
useState
} from "react";
+import {PNSPS_BUTTON_THEME, PNSPS_LONG_BUTTON_THEME} from "../../../themes/buttonConst";
+import {ThemeProvider} from "@emotion/react";
// ==============================|| DASHBOARD - DEFAULT ||============================== //
const Index = () => {
@@ -90,11 +92,11 @@ const Index = () => {
-
+
公共啟事:校對完成及付款
-
+
我們已收到申請編號: {record?.appNo} 的稿件校對確定及可付印的指示。
請於 {DateUtils.dateStr_Cht(record?.returnBeforeDate)} 下午 2:00 前 完成繳費,我們將於收到繳費確認後處理刊出事宜。
@@ -102,36 +104,57 @@ const Index = () => {
如你在憲報期數 {record?.issueYear} 年 {record?.issueVolume} 卷, 第 {record?.issueNo} 期內有多於一個公共啟事的申請,你可選擇完成所有此期所有稿件校對確定後,於繳費期限前在「我的公共啟事」內合併付款。
-
+
請按以下完成繳費:
- { setIsPopUp(true) }}
- >即時網上繳費
+
+
+
+
+ { setIsPopUp(true) }}
+ >
+ 即時網上繳費
+
+
或
- {
- navigate("/publicNotice");
- }}
- >稍後繳費 - 返回「我的公共啟事」
+
+ {
+ navigate("/publicNotice");
+ }}
+ >
+ 稍後繳費
+
+ (返回「我的公共啟事」)
+
-