diff --git a/src/layout/MainLayout/Header/HeaderContent/LocaleSelector.js b/src/layout/MainLayout/Header/HeaderContent/LocaleSelector.js index 3d276ee..1bb266c 100644 --- a/src/layout/MainLayout/Header/HeaderContent/LocaleSelector.js +++ b/src/layout/MainLayout/Header/HeaderContent/LocaleSelector.js @@ -42,7 +42,7 @@ const LocaleSelector = () => { }; const iconBackColorOpen = 'grey.300'; - const iconBackColor = 'grey.100'; + const iconBackColor = '#ffffff'; return ( diff --git a/src/pages/DemandNote/Search/DataGrid.js b/src/pages/DemandNote/Search/DataGrid.js index b026814..d533c88 100644 --- a/src/pages/DemandNote/Search/DataGrid.js +++ b/src/pages/DemandNote/Search/DataGrid.js @@ -67,6 +67,18 @@ export default function SearchDemandNote({ recordList, reloadFun }) { } + const doUploadFile = (event) => { + let file = event.target.files[0]; + HttpUtils.postWithFiles({ + url:UrlUtils.DEMAND_NOTE_ATTACH, + files:[file], + onSuccess() { + if (reloadFun) reloadFun(); + }, + }); + document.getElementById("uploadFileBtn").value = ""; + } + const markPaid = () => { setConfirmPopUp(false); let idList = []; @@ -171,11 +183,32 @@ export default function SearchDemandNote({ recordList, reloadFun }) { return (
+ + { + doUploadFile(event) + }} + /> + + @@ -193,6 +217,7 @@ const Register = () => { disabled={activeStep === 0} onClick={handleBack} sx={{ mr: 1 }} + variant="h5" > 返回 diff --git a/src/pages/authentication/auth-forms/BusCustomFormWizard.js b/src/pages/authentication/auth-forms/BusCustomFormWizard.js index 3b91408..deb8354 100644 --- a/src/pages/authentication/auth-forms/BusCustomFormWizard.js +++ b/src/pages/authentication/auth-forms/BusCustomFormWizard.js @@ -739,9 +739,8 @@ const BusCustomFormWizard = (props) => { )} - + -
•至少8個字元,字元越多越好
•字母和數字的混合
•英文字母大寫與小寫的混合
@@ -763,7 +762,6 @@ const BusCustomFormWizard = (props) => { -
•請輸入機構/公司英文名稱或中文名稱
•Please enter the English/Chinese name of the organisation/company
@@ -834,7 +832,7 @@ const BusCustomFormWizard = (props) => {
- + 商業登記證號碼 (e.g. 12341234-123-12-12-1) * @@ -966,8 +964,7 @@ const BusCustomFormWizard = (props) => { onChange={(event, newValue) => { setSelectedAddress4(newValue); }} - size="small" - sx={{ "& .MuiInputBase-root": { height: "41px" }, /*"#address4-combo": { padding: "0px 0px 0px 0px" },*/ "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address4-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} renderInput={(params) => } /> { id="address5-combo" value={selectedAddress5} options={address5ComboList} - size="small" onChange={(event, newValue) => { if (newValue !== null) { setSelectedAddress5(newValue); - if (newValue == '香港') { + if (newValue === '香港') { setCheckCountry(false) } else { setSelectedAddress4(""); @@ -991,7 +987,7 @@ const BusCustomFormWizard = (props) => { } }} - sx={{ "& .MuiInputBase-root": { height: "41px" }, /*"#address5-combo": { padding: "0px 0px 0px 0px" },*/ "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address5-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} renderInput={(params) => } /> {formik.touched.address1 && formik.errors.address1 && ( diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js index 7952e4f..956c6f9 100644 --- a/src/pages/authentication/auth-forms/CustomFormWizard.js +++ b/src/pages/authentication/auth-forms/CustomFormWizard.js @@ -771,7 +771,7 @@ const CustomFormWizard = (props) => { )} - + @@ -970,6 +970,11 @@ const CustomFormWizard = (props) => { // sx={{height:"53px"}} startAdornment={(} endAdornment={)} + sx={{ + '& .MuiOutlinedInput-input': { + padding: '5px 5px 5px 5px', // Set the desired padding inline + }, + }} inputProps={{ maxLength: 1, onKeyDown: (e) => { @@ -1163,7 +1168,7 @@ const CustomFormWizard = (props) => { onChange={(event, newValue) => { setSelectedAddress4(newValue); }} - sx={{ "& .MuiInputBase-root": { height: "48px" }, "#address4-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address4-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} renderInput={(params) => } /> { } }} - sx={{ "& .MuiInputBase-root": { height: "48px" }, "#address5-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address5-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} renderInput={(params) => } /> {formik.touched.address1 && formik.errors.address1 && ( diff --git a/src/pages/authentication/auth-forms/UploadFileTable.js b/src/pages/authentication/auth-forms/UploadFileTable.js index 4770c1e..d69c184 100644 --- a/src/pages/authentication/auth-forms/UploadFileTable.js +++ b/src/pages/authentication/auth-forms/UploadFileTable.js @@ -77,7 +77,7 @@ export default function UploadFileTable({ recordList, setUpdateRows, }) { id: 'name', field: 'name', headerName: 檔案名稱, - flex: 5, + flex: 4, }, { id: 'size', @@ -87,7 +87,7 @@ export default function UploadFileTable({ recordList, setUpdateRows, }) { // console.log(params) return Math.ceil(params.value / 1024) + " KB"; }, - flex: 1, + flex: 2, }, ]; diff --git a/src/themes/buttonConst.js b/src/themes/buttonConst.js index 2d889ad..a8c6073 100644 --- a/src/themes/buttonConst.js +++ b/src/themes/buttonConst.js @@ -128,7 +128,7 @@ export const PNSPS_LONG_BUTTON_THEME = createTheme({ root: { fontSize: '1.0rem', height: '40px', - width: '40vw', // Default width for xs screen sizes + width: '70vw', // Default width for xs screen sizes '@media (min-width: 600px)': { // sm breakpoint width: '30vw', }, @@ -136,7 +136,7 @@ export const PNSPS_LONG_BUTTON_THEME = createTheme({ width: '25vw', }, '@media (min-width: 1280px)': { // lg breakpoint - width: '14vw', + width: '19vw', }, textTransform: "none", alignItems: 'center' diff --git a/src/utils/ApiPathConst.js b/src/utils/ApiPathConst.js index d64407b..412b9bf 100644 --- a/src/utils/ApiPathConst.js +++ b/src/utils/ApiPathConst.js @@ -104,6 +104,7 @@ export const DEMAND_NOTE_LIST = apiPath+'/demandNote/list';//GET export const DEMAND_NOTE_LOAD = apiPath+'/demandNote/load';//GET export const DEMAND_NOTE_SEND = apiPath+'/demandNote/send-dn';//POST export const DEMAND_NOTE_MARK_PAID = apiPath+'/demandNote/mark-as-paid';//POST +export const DEMAND_NOTE_ATTACH = apiPath+'/demandNote/attach';//POST diff --git a/src/utils/HttpUtils.js b/src/utils/HttpUtils.js index 1fab4b8..1ab55ba 100644 --- a/src/utils/HttpUtils.js +++ b/src/utils/HttpUtils.js @@ -86,54 +86,9 @@ export const fileDownload = ({url, fileId, skey, filename, onResponse, onError}) }); }; -// export const reportDownload = ({url, onError}) =>{ -// axios.get( url, -// { -// responseType: 'blob', -// } -// ).then( -// (response)=>{ -// const filename = response.headers -// .get("content-disposition") -// .split("filename=")[1] -// .split('"')[1].trim(); -// const url = URL.createObjectURL(response.data); -// const a = document.createElement('a'); -// a.href = url; -// a.setAttribute("download", filename); -// document.body.appendChild(a); -// a.click(); -// document.body.removeChild(a); -// URL.revokeObjectURL(url); -// } -// ).catch(error => { -// return handleError(error,onError); -// }); -// }; -export const fileUpload = ({ refType, refId, files, refCode, onSuccess, onFail, onError}) =>{ - // console.log(files); - // var formData = new FormData(); - // for (let i = 0; i < files.length; i++){ - // const file = files[i] - // formData.append("multipartFileList", file); - // } - // // formData.append("multipartFile", file); - // formData.append("refType", refType); - // formData.append("refId", refId); - // if(refCode){ - // formData.append("refCode", refCode); - // } - // console.log(formData) - // axios.post(FILE_UP_POST,formData,{ - // headers: { - // "Content-Type":"multipart/form-data" - // } - // }).then( - // (response)=>{ - // onResponse(response,onSuccess,onFail); - // } - // ).catch(error => { return handleError(error, onError); }); + +export const fileUpload = ({refType, refId, files, refCode, onSuccess, onFail, onError}) =>{ postWithFiles({ url: FILE_UP_POST, params:{