浏览代码

Merge branch 'Paging_Enhancement' of https://git.2fi-solutions.com/alex/PNSPS-frontend-MaterialUI into Paging_Enhancement

master
Alex Cheung 1年前
父节点
当前提交
de28826498
共有 4 个文件被更改,包括 150 次插入136 次删除
  1. +1
    -1
      src/pages/Proof/Payment/Pay_DN.js
  2. +121
    -107
      src/pages/Proof/Reply_Public/ProofForm.js
  3. +14
    -14
      src/translations/zh-CN.json
  4. +14
    -14
      src/translations/zh-HK.json

+ 1
- 1
src/pages/Proof/Payment/Pay_DN.js 查看文件

@@ -67,7 +67,7 @@ const Index = ({ record }) => {
id: 'proofPaymentBody_demandNote2'
},
{
closingDateOff: "{closingDateOff}",
closingDateOff: DateUtils.dateStr(record.closingDateOff),
email: record?.mail,
}
)


+ 121
- 107
src/pages/Proof/Reply_Public/ProofForm.js 查看文件

@@ -26,7 +26,7 @@ import { notifyActionSuccess } from 'utils/CommonFunction';
import { PNSPS_BUTTON_THEME } from "themes/buttonConst";
import { ThemeProvider } from "@emotion/react";
import { FormattedMessage, useIntl } from "react-intl";
import {isDummyLoggedIn} from "utils/Utils"
import { isDummyLoggedIn } from "utils/Utils"

const UploadFileTable = Loadable(React.lazy(() => import('./UploadFileTable')));
//import * as ProofStatus from "utils/statusUtils/ProofStatus";
@@ -59,7 +59,7 @@ const FormPanel = ({ formData }) => {
React.useEffect(() => {
if (formData) {
setData(formData);
if (isDummyLoggedIn()){
if (isDummyLoggedIn()) {
set_paymentMethod("demandNote")
}
}
@@ -77,13 +77,19 @@ const FormPanel = ({ formData }) => {
setIsWarningPopUp(true);
return;
}
let pm = paymentMethod;
if(pm=="demandNote"){
pm = isOverDnReviseDeadline()?"":pm;
}else if(pm=="office"){
pm = isOverNpgoReviseDeadline()?"":pm;
}

if (actionValue == false && isOverReviseDeadline()) {
setWarningText(intl.formatMessage({ id: 'MSG.overReviseDeadline' }));
setIsWarningPopUp(true);
return;
}
else if ( formData.creditor==false && paymentMethod=="") {
else if(formData.creditor == false && pm == "") {
setWarningText(intl.formatMessage({ id: 'MSG.plzSelectPaymentMethod' }));
setIsWarningPopUp(true);
return;
@@ -103,17 +109,17 @@ const FormPanel = ({ formData }) => {
id: data.id,
action: actionValue,
vaild: values.vaild,
paymentMethod: paymentMethod
paymentMethod: pm
},
files: attachments ? attachments : [],
onSuccess: function (responseData) {
if (responseData.msg) {
setWarningText(intl.formatMessage({ id: responseData.msg}));
setWarningText(intl.formatMessage({ id: responseData.msg }));
setIsWarningPopUp(true);
return;
}
if (responseData.id == params.id) {
notifyActionSuccess(intl.formatMessage({id: "submitted"}))
notifyActionSuccess(intl.formatMessage({ id: "submitted" }))
navigate("/proof/pay/" + params.id);
} else {
navigate("/proof/search");
@@ -292,8 +298,8 @@ const FormPanel = ({ formData }) => {


{
actionValue && formData.creditor==false ?
isDummyLoggedIn()?
actionValue && formData.creditor == false ?
isDummyLoggedIn() ?
<Grid item xs={12} sx={{ mb: 1, }}>
<table style={tabelStyle}>
<tr style={tabelStyle}>
@@ -357,7 +363,7 @@ const FormPanel = ({ formData }) => {
</td>
</tr>
</table>
</Grid>:
</Grid> :
<Grid item xs={12} sx={{ mb: 1, }}>
<table style={tabelStyle}>
<tr style={tabelStyle}>
@@ -387,117 +393,125 @@ const FormPanel = ({ formData }) => {
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} 2:00 p.m.</td>
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} 2:30 p.m.</td>
</tr>
{
isOverDnReviseDeadline() ?
<></> :
<tr>
<td style={tabelStyle}>
<Checkbox
checked={paymentMethod == "demandNote"}
onChange={() => {
set_paymentMethod("demandNote")
}}
/>
</td>
<td style={tabelStyle}><FormattedMessage id="payDn" /></td>
<td style={tabelStyle}>
<ul>
<li><FormattedMessage id="atm" /></li>
<li><FormattedMessage id="pps" /></li>
<li><FormattedMessage id="eBank" /></li>
<li><FormattedMessage id="phoneBank" /></li>
<li><FormattedMessage id="eCheque" /></li>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="hkpo" /></li>
<li><FormattedMessage id="store" /></li>
<li><FormattedMessage id="post" /></li>
</ul>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} 5:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payDnRemark" values={{
date: DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" })) + " 12:30 p.m."
}} />
</td>
</tr>
}
{
isOverNpgoReviseDeadline() ?
<></> :
<tr>
<td style={tabelStyle}>
<tr>
<td style={tabelStyle}>
{isOverDnReviseDeadline() ?
<></> :
<Checkbox
checked={paymentMethod == "demandNote"}
onChange={() => {
set_paymentMethod("demandNote")
}}
/>
}
</td>
<td style={tabelStyle}><FormattedMessage id="payDn" /></td>
<td style={tabelStyle}>
<ul>
<li><FormattedMessage id="atm" /></li>
<li><FormattedMessage id="pps" /></li>
<li><FormattedMessage id="eBank" /></li>
<li><FormattedMessage id="phoneBank" /></li>
<li><FormattedMessage id="eCheque" /></li>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="hkpo" /></li>
<li><FormattedMessage id="store" /></li>
<li><FormattedMessage id="post" /></li>
</ul>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} 5:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payDnRemark" values={{
date: DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" })) + " 12:30 p.m."
}} />
</td>
</tr>
<tr>
<td style={tabelStyle}>
{
isOverNpgoReviseDeadline() ?
<></> :
<Checkbox
checked={paymentMethod == "office"}
onChange={() => {
set_paymentMethod("office")
}}
/>
</td>
<td style={tabelStyle}><FormattedMessage id="payNPGO" /></td>
<td style={tabelStyle}>
<ul>
<li><FormattedMessage id="cheque" /></li>
<li><FormattedMessage id="cash" /></li>
</ul>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} 12:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payNPGORemark" values={{
date: DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" })) + " 12:30 p.m."
}} />
</td>
</tr>
}
}
</td>
<td style={tabelStyle}><FormattedMessage id="payNPGO" /></td>
<td style={tabelStyle}>
<ul>
<li><FormattedMessage id="cheque" /></li>
<li><FormattedMessage id="cash" /></li>
</ul>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} 12:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payNPGORemark" values={{
date: DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" })) + " 12:30 p.m."
}} />
</td>
</tr>


</table>
</Grid>

:
isOverReviseDeadline() ?
<Grid item xs={12} md={12} textAlign="left">
<Typography variant="h5" style={{ color: "red" }}>
<FormattedMessage id="MSG.overReviseDeadline" />
</Typography>
</Grid>
actionValue ?
<></>
:
<>
<Grid item xs={12} md={12} textAlign="left">
<Typography variant="h5">
<FormattedMessage id="requiredUploadFix" />:
</Typography>
</Grid>

<Grid item xs={12} md={12} textAlign="left">
<input
id="uploadFileBtn"
name="file"
type="file"
accept=".pdf"
style={{ display: 'none' }}
disabled={attachments.length >= (formik.values.groupType === "Private Bill" ? 2 : 1)}
onChange={(event) => {
readFile(event)
}}
/>
<label htmlFor="uploadFileBtn">
<ThemeProvider theme={PNSPS_BUTTON_THEME}>
<Button
color="save"
component="span"
variant="contained"
aria-label={intl.formatMessage({ id: 'upload' })}
disabled={attachments.length >= (formik.values.groupType === "Private Bill" ? 2 : 1)}
>
<FormattedMessage id="upload" />
</Button>
</ThemeProvider>
</label>
</Grid>


<Grid item xs={12} sm={12} md={12} lg={12} textAlign="left" sx={{ width: '95%', maxWidth: { xs: '70vw', sm: '72vw', md: '75vw', lg: '80vw' } }} >
<UploadFileTable key="uploadTable" recordList={attachments} setRecordList={setAttachments} />
</Grid>
{
isOverReviseDeadline() ?
<Grid item xs={12} md={12} textAlign="left">
<Typography variant="h5" style={{ color: "red" }}>
<FormattedMessage id="MSG.overReviseDeadline" />
</Typography>
</Grid>
:
<>
<Grid item xs={12} md={12} textAlign="left">
<Typography variant="h5">
<FormattedMessage id="requiredUploadFix" />:
</Typography>
</Grid>

<Grid item xs={12} md={12} textAlign="left">
<input
id="uploadFileBtn"
name="file"
type="file"
accept=".pdf"
style={{ display: 'none' }}
disabled={attachments.length >= (formik.values.groupType === "Private Bill" ? 2 : 1)}
onChange={(event) => {
readFile(event)
}}
/>
<label htmlFor="uploadFileBtn">
<ThemeProvider theme={PNSPS_BUTTON_THEME}>
<Button
color="save"
component="span"
variant="contained"
aria-label={intl.formatMessage({ id: 'upload' })}
disabled={attachments.length >= (formik.values.groupType === "Private Bill" ? 2 : 1)}
>
<FormattedMessage id="upload" />
</Button>
</ThemeProvider>
</label>
</Grid>


<Grid item xs={12} sm={12} md={12} lg={12} textAlign="left" sx={{ width: '95%', maxWidth: { xs: '70vw', sm: '72vw', md: '75vw', lg: '80vw' } }} >
<UploadFileTable key="uploadTable" recordList={attachments} setRecordList={setAttachments} />
</Grid>
</>
}
</>
}



+ 14
- 14
src/translations/zh-CN.json 查看文件

@@ -136,22 +136,22 @@
"publicNoticePaymentProofComment": "公共启事:校对回复",
"publicNoticePaymentProofInfo": "公共启事:校对资料",

"proofPaymentHeader_demandNote": "Public Notice: Proofreading Completed and Payment Means Selected",
"proofPaymentBody_demandNote": "We have received the manuscript proofreading confirmation and printing instructions for application number: {appNo}<br/><br/>You have selected to make payment by General Demand Note.",
"proofPaymentBody_demandNote2": "The General Demand Note will be sent to the following email address within one working day, but not later than {closingDateOff} 9:00 p.m. : <br/>{email}",
"proofPaymentBody_demandNote3": "Please make payment and return the payment proof (e.g. ATM receipt, internet banking record) to [email protected] by {paymentDeadline}.",
"proofPaymentBody_demandNote4": "We will process the publication after receiving payment confirmation.",
"proofPaymentHeader_demandNote": "公共启事: 已完成校对并已选择付款方式",
"proofPaymentBody_demandNote": "我们已收到以下申请编号的稿件校对确认和印刷指示。<br/>{appNo}<br/><br/>您已选择以一般缴款单付款。",
"proofPaymentBody_demandNote2": "一般缴款单将在一个工作天内,但不迟于{closingDateOff} 晚上9时前发送至以下电子邮件地址: <br/>{email}",
"proofPaymentBody_demandNote3": "请在{paymentDeadline}前缴交费用并将付款证明(例如自动柜员机收据、网上银行记录)发送至[email protected]",
"proofPaymentBody_demandNote4": "我们将在收到付款确认通知后处理刊登事宜。",

"proofPaymentHeader_office": "Public Notice: Proofreading Completed and Payment Means Selected",
"proofPaymentBody_office": "We have received the manuscript proofreading confirmation and printing instructions for application number: {appNo}",
"proofPaymentBody_office2": "You have selected to make payment at North Point Government Offices Collection Office:<center><br/>Collection Office at Accounts Section<br/>10/F North Point Government Offices<br/>333 Java Road North Point</center>",
"proofPaymentBody_office3": "Please print out this page or present your application details on screen at our Collection Office, and complete the payment by {paymentDeadline}.",
"proofPaymentBody_office4": "We will process the publication after receiving payment confirmation.",
"proofPaymentHeader_office": "公共启事: 已完成校对并已选择付款方式",
"proofPaymentBody_office": "我们已收到以下申请编号的稿件校对确认和印刷指示。<br/>{appNo}",
"proofPaymentBody_office2": "您已选择在北角政府合署收款处付款:<center><br/>香港北角渣华道333号<br/>北角政府合署10楼<br/>会计部收款处</center>",
"proofPaymentBody_office3": "请打印此页面或使用电子屏幕设备向收款处职员展示申请详情,并在{paymentDeadline}前完成付款。",
"proofPaymentBody_office4": "我们将在收到付款确认通知后处理刊登事宜。",

"proofPaymentHeader_online": "Public Notice: Proofreading Completed and Payment Means Selected",
"proofPaymentBody_online": "We have received the manuscript proofreading confirmation and printing instructions for application number: {appNo}",
"proofPaymentBody_online2": "Please select either to complete the payment now or make payment by {paymentDeadline}.",
"proofPaymentBody_online3": "We will process the publication after receiving payment confirmation.",
"proofPaymentHeader_online": "公共启事: 已完成校对并已选择付款方式",
"proofPaymentBody_online": "我们已收到以下申请编号的稿件校对确认和印刷指示。<br/>{appNo}",
"proofPaymentBody_online2": "请选择即时完成付款,或在{paymentDeadline}前完成付款。",
"proofPaymentBody_online3": "我们将在收到付款确认通知后处理刊登事宜。",

"proofRecord": "校对记录",
"onlinePaymentHistory": "网上付款记录",


+ 14
- 14
src/translations/zh-HK.json 查看文件

@@ -136,22 +136,22 @@
"publicNoticePaymentProofComment": "公共啟事:校對回覆",
"publicNoticePaymentProofInfo": "公共啟事:校對資料",

"proofPaymentHeader_demandNote": "Public Notice: Proofreading Completed and Payment Means Selected",
"proofPaymentBody_demandNote": "We have received the manuscript proofreading confirmation and printing instructions for application number: {appNo}<br/><br/>You have selected to make payment by General Demand Note.",
"proofPaymentBody_demandNote2": "The General Demand Note will be sent to the following email address within one working day, but not later than {closingDateOff} 9:00 p.m. : <br/>{email}",
"proofPaymentBody_demandNote3": "Please make payment and return the payment proof (e.g. ATM receipt, internet banking record) to [email protected] by {paymentDeadline}.",
"proofPaymentBody_demandNote4": "We will process the publication after receiving payment confirmation.",
"proofPaymentHeader_demandNote": "公共啟事: 已完成校對並已選擇付款方式",
"proofPaymentBody_demandNote": "我們已收到以下申請編號的稿件校對確認和印刷指示。<br/>{appNo}<br/>您已選擇以一般繳款單付款。",
"proofPaymentBody_demandNote2": "一般繳款單將在一個工作天內,但不遲於{closingDateOff} 晚上9時前發送至以下電子郵件地址: <br/>{email}",
"proofPaymentBody_demandNote3": "請在{paymentDeadline}前繳交費用並將付款證明(例如自動櫃員機收據、網上銀行記錄)發送至[email protected]",
"proofPaymentBody_demandNote4": "我們將在收到付款確認通知後處理刊登事宜。",

"proofPaymentHeader_office": "Public Notice: Proofreading Completed and Payment Means Selected",
"proofPaymentBody_office": "We have received the manuscript proofreading confirmation and printing instructions for application number: {appNo}",
"proofPaymentBody_office2": "You have selected to make payment at North Point Government Offices Collection Office:<center><br/>Collection Office at Accounts Section<br/>10/F North Point Government Offices<br/>333 Java Road North Point</center>",
"proofPaymentBody_office3": "Please print out this page or present your application details on screen at our Collection Office, and complete the payment by {paymentDeadline}.",
"proofPaymentBody_office4": "We will process the publication after receiving payment confirmation.",
"proofPaymentHeader_office": "公共啟事: 已完成校對並已選擇付款方式",
"proofPaymentBody_office": "我們已收到以下申請編號的稿件校對確認和印刷指示。<br/>{appNo}",
"proofPaymentBody_office2": "您已選擇在北角政府合署收款處付款:<center><br/>香港北角渣華道333號<br/>北角政府合署10樓<br/>會計部收款處</center>",
"proofPaymentBody_office3": "請列印此頁面或使用電子屏幕設備向收款處職員展示申請詳情,並在{paymentDeadline}之前完成付款。",
"proofPaymentBody_office4": "我們將在收到付款確認通知後處理刊登事宜。",

"proofPaymentHeader_online": "Public Notice: Proofreading Completed and Payment Means Selected",
"proofPaymentBody_online": "We have received the manuscript proofreading confirmation and printing instructions for application number: {appNo}",
"proofPaymentBody_online2": "Please select either to complete the payment now or make payment by {paymentDeadline}.",
"proofPaymentBody_online3": "We will process the publication after receiving payment confirmation.",
"proofPaymentHeader_online": "公共啟事: 已完成校對並已選擇付款方式",
"proofPaymentBody_online": "我們已收到以下申請編號的稿件校對確認和印刷指示。<br/>{appNo}",
"proofPaymentBody_online2": "請選擇即時完成付款,或在{paymentDeadline}前完成付款。",
"proofPaymentBody_online3": "我們將在收到付款確認通知後處理刊登事宜。",





正在加载...
取消
保存