|
|
@@ -26,7 +26,10 @@ 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, |
|
|
|
checkIsOnlyOnlinePayment |
|
|
|
} from "utils/Utils" |
|
|
|
|
|
|
|
const UploadFileTable = Loadable(React.lazy(() => import('./UploadFileTable'))); |
|
|
|
//import * as ProofStatus from "utils/statusUtils/ProofStatus"; |
|
|
@@ -46,6 +49,7 @@ const FormPanel = ({ formData }) => { |
|
|
|
const [warningTitle, setWarningTitle] = React.useState(""); |
|
|
|
const [isWarningPopUp, setIsWarningPopUp] = React.useState(false); |
|
|
|
const [warningText, setWarningText] = React.useState(""); |
|
|
|
const [isOnlyOnlinePayment, setOnlyOnlinePayment] = React.useState(); |
|
|
|
|
|
|
|
const navigate = useNavigate() |
|
|
|
const params = useParams(); |
|
|
@@ -61,6 +65,7 @@ const FormPanel = ({ formData }) => { |
|
|
|
React.useEffect(() => { |
|
|
|
if (formData) { |
|
|
|
setData(formData); |
|
|
|
setOnlyOnlinePayment(checkIsOnlyOnlinePayment(formData.issueDate)) |
|
|
|
if (isDummyLoggedIn()) { |
|
|
|
set_paymentMethod("demandNote") |
|
|
|
} |
|
|
@@ -461,90 +466,94 @@ const FormPanel = ({ formData }) => { |
|
|
|
}} /> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style={tabelStyle}> |
|
|
|
{isOverDnReviseDeadline() ? |
|
|
|
<></> : |
|
|
|
<Checkbox |
|
|
|
checked={paymentMethod == "demandNote"} |
|
|
|
onChange={() => { |
|
|
|
set_paymentMethod("demandNote") |
|
|
|
}} |
|
|
|
/> |
|
|
|
} |
|
|
|
</td> |
|
|
|
<td style={tabelStyle}> |
|
|
|
<FormattedMessage id="payDn" /> |
|
|
|
<br /><a href="#payOnlineDetails" color='#fff' onClick={() => { |
|
|
|
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" })) |
|
|
|
setWarningText( |
|
|
|
<><FormattedMessage id="paymentMethodMeans" />: |
|
|
|
<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> |
|
|
|
<Typography variant="h6"> |
|
|
|
<div style={{ padding: 12 }} dangerouslySetInnerHTML={{ __html: intl.formatMessage({ id: "proofNote" }) }} /> |
|
|
|
</Typography> |
|
|
|
</> |
|
|
|
); |
|
|
|
setIsWarningPopUp(true); |
|
|
|
}}><u><FormattedMessage id="viewDetail" /></u></a> |
|
|
|
</td> |
|
|
|
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"5:00 p.m.":"下午5時"}</td> |
|
|
|
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"5:00 p.m.":"下午5時"}</td> |
|
|
|
<td style={tabelStyle}> |
|
|
|
<FormattedMessage id="payDnRemark" values={{ |
|
|
|
date: DateUtils.dateFormat(formData.proofPaymentDeadline, intl.formatMessage({ id: "dateStrFormat" })) |
|
|
|
}} /> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<td style={tabelStyle}> |
|
|
|
{ |
|
|
|
isOverNpgoReviseDeadline() ? |
|
|
|
<></> : |
|
|
|
<Checkbox |
|
|
|
checked={paymentMethod == "office"} |
|
|
|
onChange={() => { |
|
|
|
set_paymentMethod("office") |
|
|
|
}} |
|
|
|
/> |
|
|
|
} |
|
|
|
</td> |
|
|
|
<td style={tabelStyle}> |
|
|
|
<FormattedMessage id="payNPGO" /> |
|
|
|
<br /><a href="#payOnlineDetails" color='#fff' onClick={() => { |
|
|
|
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" })) |
|
|
|
setWarningText( |
|
|
|
<><FormattedMessage id="paymentMethodMeans" />: |
|
|
|
<ul> |
|
|
|
<li><FormattedMessage id="cheque" /></li> |
|
|
|
<li><FormattedMessage id="drafts" /></li> |
|
|
|
<li><FormattedMessage id="cashierOrders" /></li> |
|
|
|
<li><FormattedMessage id="cash" /></li> |
|
|
|
</ul> |
|
|
|
</> |
|
|
|
); |
|
|
|
setIsWarningPopUp(true); |
|
|
|
}}><u><FormattedMessage id="viewDetail" /></u></a> |
|
|
|
</td> |
|
|
|
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"11:30 a.m.":"上午11時30分"}</td> |
|
|
|
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"12:00 p.m.":"下午12時"}</td> |
|
|
|
<td style={tabelStyle}> |
|
|
|
<FormattedMessage id="payNPGORemark" values={{ |
|
|
|
date: DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" })) |
|
|
|
}} /> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
{!isOnlyOnlinePayment? |
|
|
|
<> |
|
|
|
<tr> |
|
|
|
<td style={tabelStyle}> |
|
|
|
{isOverDnReviseDeadline() ? |
|
|
|
<></> : |
|
|
|
<Checkbox |
|
|
|
checked={paymentMethod == "demandNote"} |
|
|
|
onChange={() => { |
|
|
|
set_paymentMethod("demandNote") |
|
|
|
}} |
|
|
|
/> |
|
|
|
} |
|
|
|
</td> |
|
|
|
<td style={tabelStyle}> |
|
|
|
<FormattedMessage id="payDn" /> |
|
|
|
<br /><a href="#payOnlineDetails" color='#fff' onClick={() => { |
|
|
|
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" })) |
|
|
|
setWarningText( |
|
|
|
<><FormattedMessage id="paymentMethodMeans" />: |
|
|
|
<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> |
|
|
|
<Typography variant="h6"> |
|
|
|
<div style={{ padding: 12 }} dangerouslySetInnerHTML={{ __html: intl.formatMessage({ id: "proofNote" }) }} /> |
|
|
|
</Typography> |
|
|
|
</> |
|
|
|
); |
|
|
|
setIsWarningPopUp(true); |
|
|
|
}}><u><FormattedMessage id="viewDetail" /></u></a> |
|
|
|
</td> |
|
|
|
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"5:00 p.m.":"下午5時"}</td> |
|
|
|
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"5:00 p.m.":"下午5時"}</td> |
|
|
|
<td style={tabelStyle}> |
|
|
|
<FormattedMessage id="payDnRemark" values={{ |
|
|
|
date: DateUtils.dateFormat(formData.proofPaymentDeadline, intl.formatMessage({ id: "dateStrFormat" })) |
|
|
|
}} /> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<td style={tabelStyle}> |
|
|
|
{ |
|
|
|
isOverNpgoReviseDeadline() ? |
|
|
|
<></> : |
|
|
|
<Checkbox |
|
|
|
checked={paymentMethod == "office"} |
|
|
|
onChange={() => { |
|
|
|
set_paymentMethod("office") |
|
|
|
}} |
|
|
|
/> |
|
|
|
} |
|
|
|
</td> |
|
|
|
<td style={tabelStyle}> |
|
|
|
<FormattedMessage id="payNPGO" /> |
|
|
|
<br /><a href="#payOnlineDetails" color='#fff' onClick={() => { |
|
|
|
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" })) |
|
|
|
setWarningText( |
|
|
|
<><FormattedMessage id="paymentMethodMeans" />: |
|
|
|
<ul> |
|
|
|
<li><FormattedMessage id="cheque" /></li> |
|
|
|
<li><FormattedMessage id="drafts" /></li> |
|
|
|
<li><FormattedMessage id="cashierOrders" /></li> |
|
|
|
<li><FormattedMessage id="cash" /></li> |
|
|
|
</ul> |
|
|
|
</> |
|
|
|
); |
|
|
|
setIsWarningPopUp(true); |
|
|
|
}}><u><FormattedMessage id="viewDetail" /></u></a> |
|
|
|
</td> |
|
|
|
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"11:30 a.m.":"上午11時30分"}</td> |
|
|
|
<td style={tabelStyle}>{DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"12:00 p.m.":"下午12時"}</td> |
|
|
|
<td style={tabelStyle}> |
|
|
|
<FormattedMessage id="payNPGORemark" values={{ |
|
|
|
date: DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" })) |
|
|
|
}} /> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</>:null |
|
|
|
} |
|
|
|
</tbody> |
|
|
|
|
|
|
|
</table> |
|
|
|