瀏覽代碼

fix bug

master
Anna Ho 1 年之前
父節點
當前提交
8bb1e92704
共有 5 個檔案被更改,包括 13 行新增9 行删除
  1. +9
    -5
      src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
  2. +1
    -1
      src/pages/PublicNotice/ListPanel/BaseGrid.js
  3. +1
    -1
      src/pages/PublicNotice/ListPanel/PendingPaymentTab.js
  4. +1
    -1
      src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js
  5. +1
    -1
      src/utils/HttpUtils.js

+ 9
- 5
src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js 查看文件

@@ -54,11 +54,15 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => {
return;
}
if(!attachment){
setWarningText("請選擇上傳文件");
setWarningText("請選擇上傳檔案");
setIsWarningPopUp(true);
return;
}else if(!attachment.size || attachment.size <=0){
setWarningText("請上傳有效檔案");
setIsWarningPopUp(true);
return;
}else if(attachment.size >= (10*1024*1034)){
setWarningText("上傳文件大小應<10MB");
setWarningText("上傳檔案大小應<10MB");
setIsWarningPopUp(true);
return;
}
@@ -77,7 +81,7 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => {
faxNumber: values.faxNumber
},
issueId:values.issueId,
remarks:values.remarks,
remarks:values.remarks?values.remarks:"",
},
files: [attachment],
onSuccess: function(){
@@ -163,7 +167,7 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => {
<Grid container alignItems={"center"}>
<Grid item lg={4}
sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}>
上傳文件 ({"檔案大小應<10MB"}):
犒件檔案 ({"檔案大小應<10MB"}):
</Grid>
<Grid item lg={4}>
{attachment.name}
@@ -184,7 +188,7 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => {
component="span"
variant="outlined"
size="large"
>{attachment?"上傳文件":"重新上傳"}</Button>
>{attachment?"上傳檔案":"重新上傳"}</Button>
</label>
</Grid>
</Grid>


+ 1
- 1
src/pages/PublicNotice/ListPanel/BaseGrid.js 查看文件

@@ -49,7 +49,7 @@ export default function BaseGrid({rows}) {
contact = "電話: " + phone?.countryCode + " " + phone?.phoneNumber
}

if (faxNo) {
if (faxNo && faxNo?.faxNumber) {
if (contact != "")
contact = contact + ", "
contact = contact + "傳真:" + faxNo?.countryCode + " " + faxNo?.faxNumber


+ 1
- 1
src/pages/PublicNotice/ListPanel/PendingPaymentTab.js 查看文件

@@ -53,7 +53,7 @@ export default function SubmittedTab({ rows }) {
contact = "電話: " + phone?.countryCode + " " + phone?.phoneNumber
}

if (faxNo) {
if (faxNo && faxNo?.faxNumber) {
if (contact != "")
contact = contact + ", "
contact = contact + "傳真:" + faxNo?.countryCode + " " + faxNo?.faxNumber


+ 1
- 1
src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js 查看文件

@@ -55,7 +55,7 @@ export default function SearchPublicNoticeTable({ recordList }) {
contact = "電話: " + phone?.countryCode + " " + phone?.phoneNumber
}

if (faxNo) {
if (faxNo && faxNo?.faxNumber) {
if (contact != "")
contact = contact + ", "
contact = contact + "傳真:" + faxNo?.countryCode + " " + faxNo?.faxNumber


+ 1
- 1
src/utils/HttpUtils.js 查看文件

@@ -45,7 +45,7 @@ export const postWithFiles = ({url, params, files, onSuccess, onFail, onError})
if(typeof(params[key]) ==='object'){
formData.append(key, JSON.stringify(params[key]));
}else{
formData.append(key, params[key]?params[key]:null);
formData.append(key, params[key]);
}
}


Loading…
取消
儲存