발주기관 > 건설현장 입력 엑셀 양식 다운로드 처리
parent
ade34fad44
commit
8004401036
|
|
@ -3,6 +3,7 @@
|
|||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
|
||||
|
||||
<script src="${pageContext.request.contextPath}/js/admins/notice.js"></script>
|
||||
<%
|
||||
|
||||
|
||||
|
|
@ -34,6 +35,7 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
<c:import url="/drilling/common/includeTopMenu.do" charEncoding="UTF-8" />
|
||||
<!-- header end-->
|
||||
|
||||
<iframe class="iframe-body-none" name="hiddenFrame"></iframe>
|
||||
|
||||
|
||||
|
||||
|
|
@ -82,7 +84,8 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
<!-- 실제 파일 선택 input (숨김 처리) -->
|
||||
<input type="file" id="excel-file-input" accept=".xls" style="display: none;">
|
||||
<button class="btn-green" type="button" onclick="triggerExcelUpload()">엑셀자료입력</button>
|
||||
<button class="btn-green btn-excel-download" type="button" id="excel-download-btn">엑셀 양식 다운로드</button>
|
||||
<button class="btn-green btn-excel-download" type="button" id="excel-download-btn"
|
||||
onclick="javascript:fileDownload('발주기관_건설현장입력_양식.xls', 'drilling_construction_input_form.xls')">엑셀 양식 다운로드</button>
|
||||
</div>
|
||||
<div id="table-container">
|
||||
</div>
|
||||
|
|
@ -227,7 +230,7 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
<tr>
|
||||
<th>건설사</th>
|
||||
<td colspan="3">
|
||||
<input type="text" value="OOO건설" class="input-box information1" id="const-company-dept-` + tableId + `" placeholder="건설사명">
|
||||
<input type="text" value="" class="input-box information1" id="const-company-dept-` + tableId + `" placeholder="건설사명">
|
||||
<input type="text" value="" class="input-box information2" id="const-company-admin-` + tableId + `" placeholder="담당자">
|
||||
<input type="text" value="010-0000-0000" class="input-box information3" id="const-company-tel-` + tableId + `" placeholder="담당자 연락처">
|
||||
<label class="check-box unselected-constructor-label" for="unselected-constructor-` + tableId + `"><input type="checkbox" id="unselected-constructor-` + tableId + `">
|
||||
|
|
@ -280,9 +283,9 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
if (excelInputBtn) {
|
||||
excelInputBtn.style.display = 'none';
|
||||
}
|
||||
if (excelDownloadBtn) {
|
||||
excelDownloadBtn.style.display = 'none';
|
||||
}
|
||||
// if (excelDownloadBtn) {
|
||||
// excelDownloadBtn.style.display = 'none';
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -69,9 +69,16 @@ function fileDownload(fileName,saveName)
|
|||
//var esaveName = encodeURIComponent(saveName);
|
||||
//alert(fileName);
|
||||
console.log(fileName + ", " + saveName);
|
||||
hiddenFrame.location.href= "fileDownload.do?fileName=" + fileName + "&saveName=" + saveName;
|
||||
// hiddenFrame.location.href= "fileDownload.do?fileName=" + fileName + "&saveName=" + saveName;
|
||||
//hiddenFrame.location.href="/body/pds/download_new.jsp?filename=" + fileName + "&path=" + saveName;
|
||||
|
||||
// 절대 경로로 URL 생성
|
||||
var baseUrl = window.location.origin; // http://localhost:8083
|
||||
var downloadUrl = baseUrl + "/fileDownload.do?fileName=" + encodeURIComponent(fileName) + "&saveName=" + encodeURIComponent(saveName);
|
||||
|
||||
// 요청을 해당 URL로 보냄
|
||||
hiddenFrame.location.href = downloadUrl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue