|
|
@@ -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> |
|
|
|