Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

119 righe
4.4 KiB

  1. // material-ui
  2. import {
  3. Grid,
  4. Typography,
  5. Stack,
  6. Button,
  7. } from '@mui/material';
  8. import * as UrlUtils from "utils/ApiPathConst";
  9. import * as React from "react";
  10. import * as HttpUtils from "utils/HttpUtils";
  11. import { useParams } from "react-router-dom";
  12. import { useNavigate } from "react-router-dom";
  13. import Loadable from 'components/Loadable';
  14. const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent')));
  15. import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
  16. import {FormattedMessage} from "react-intl";
  17. const BackgroundHead = {
  18. backgroundImage: `url(${titleBackgroundImg})`,
  19. width: '100%',
  20. height: '100%',
  21. backgroundSize: 'contain',
  22. backgroundRepeat: 'no-repeat',
  23. backgroundColor: '#0C489E',
  24. backgroundPosition: 'right'
  25. }
  26. // ==============================|| DASHBOARD - DEFAULT ||============================== //
  27. const Index = () => {
  28. const params = useParams();
  29. const navigate = useNavigate()
  30. const [record, setRecord] = React.useState();
  31. const [onReady, setOnReady] = React.useState(false);
  32. React.useEffect(() => {
  33. loadForm();
  34. }, []);
  35. React.useEffect(() => {
  36. setOnReady(true);
  37. }, [record]);
  38. const loadForm = () => {
  39. if (params.id > 0) {
  40. HttpUtils.get({
  41. url: UrlUtils.GET_PROOF_PAY + "/" + params.id,
  42. onSuccess: (responseData) => {
  43. if (!responseData.data?.id) {
  44. navigate("/proof/search");
  45. }
  46. setRecord(responseData.data);
  47. }
  48. });
  49. }
  50. }
  51. return (
  52. !onReady ?
  53. <LoadingComponent />
  54. :
  55. (
  56. <Grid container sx={{ minHeight: '110vh', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" >
  57. <Grid item xs={12} width="100%">
  58. <div style={BackgroundHead} width="100%">
  59. <Stack direction="row" height='70px'>
  60. <Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>
  61. <FormattedMessage id="proofRecord"/>
  62. </Typography>
  63. </Stack>
  64. </div>
  65. </Grid>
  66. {/*row 1*/}
  67. <Grid item xs={12} md={12} >
  68. <Grid container justifyContent="flex-start" alignItems="center" >
  69. <center>
  70. <Grid item xs={12} md={8} >
  71. <Typography variant="h2" sx={{ textAlign: "left", ml: 4, mr: 4, mt: 4, borderBottom: "1px solid black" }}>
  72. <FormattedMessage id="publicNoticePaymentProofDone"/>
  73. </Typography>
  74. <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "left" }}>
  75. 我們已收到你已確定申請編號: {record?.appNo} 的稿件校對確定及可付印的指示,並將安排刊登於憲報
  76. 期數 {record?.appNo} 年 {record?.issueVolume} 卷 第 {record?.issueNo} 期內。
  77. <br/><br/>
  78. 此公共啟事申請的費用將於下期發出的繳費發票時收取,請依時繳費。
  79. </Typography>
  80. <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}>
  81. <Button
  82. component="span"
  83. variant="contained"
  84. size="large"
  85. sx={{ m: 4}}
  86. onClick={()=>{
  87. navigate("/publicNotice");
  88. }}
  89. >返回「我的公共啟事」</Button>
  90. </Typography>
  91. </Grid>
  92. </center>
  93. </Grid>
  94. </Grid>
  95. {/*row 2*/}
  96. </Grid >
  97. )
  98. );
  99. };
  100. export default Index;