|
|
@ -140,10 +140,13 @@ $(document).ready(function(){
|
|
|
|
var taskSeCd = $P.provided.getInfo(sample).TASK_SE_CD;
|
|
|
|
var taskSeCd = $P.provided.getInfo(sample).TASK_SE_CD;
|
|
|
|
|
|
|
|
|
|
|
|
var url = "";
|
|
|
|
var url = "";
|
|
|
|
|
|
|
|
var fileTypeName = "";
|
|
|
|
if(fileType == "pdf"){
|
|
|
|
if(fileType == "pdf"){
|
|
|
|
url = wctx.url("/sprt/sprt01/140/makeAdvntcePdf.do");
|
|
|
|
url = wctx.url("/sprt/sprt01/140/makeAdvntcePdf.do");
|
|
|
|
|
|
|
|
fileTypeName = "PDF 파일";
|
|
|
|
} else if(fileType == "outsourcing"){
|
|
|
|
} else if(fileType == "outsourcing"){
|
|
|
|
url = wctx.url("/sprt/sprt01/140/makeAdvntceOutsourcing.do");
|
|
|
|
url = wctx.url("/sprt/sprt01/140/makeAdvntceOutsourcing.do");
|
|
|
|
|
|
|
|
fileTypeName = "외주 요청 파일";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var formFields = new FimsFormFields("#frmEdit--${pageName}");
|
|
|
|
var formFields = new FimsFormFields("#frmEdit--${pageName}");
|
|
|
@ -170,13 +173,25 @@ $(document).ready(function(){
|
|
|
|
fetch(url + "?" + parameter)
|
|
|
|
fetch(url + "?" + parameter)
|
|
|
|
.then((response) => {
|
|
|
|
.then((response) => {
|
|
|
|
var header = response.headers.get('Content-Disposition');
|
|
|
|
var header = response.headers.get('Content-Disposition');
|
|
|
|
|
|
|
|
if(!header){
|
|
|
|
|
|
|
|
response.json().then((responseJson)=>{
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
|
|
|
content: fileTypeName+" 생성 중 오류가 발생하였습니다."
|
|
|
|
|
|
|
|
+"<br/>"
|
|
|
|
|
|
|
|
+responseJson.description,
|
|
|
|
|
|
|
|
init: () => { setDialogZindex(); }
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
new Error("");
|
|
|
|
|
|
|
|
}
|
|
|
|
var parts = header.split(';');
|
|
|
|
var parts = header.split(';');
|
|
|
|
filenameInHeader = decodeURIComponent(parts[1].split('=')[1]);
|
|
|
|
filenameInHeader = decodeURIComponent(parts[1].split('=')[1]);
|
|
|
|
return response.blob();
|
|
|
|
return response.blob();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then((blob) => {
|
|
|
|
.then((blob) => {
|
|
|
|
openPDF(blob, filenameInHeader);
|
|
|
|
openPDF(blob, filenameInHeader);
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(()=>{});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
var parameter = toQuery(submitParam);
|
|
|
|
var parameter = toQuery(submitParam);
|
|
|
|
document.location.href = url + "?" + parameter;
|
|
|
|
document.location.href = url + "?" + parameter;
|
|
|
|