|
@@ -715,11 +715,26 @@ function gotoPatientInfo() {
|
|
|
location.href = url;
|
|
|
}
|
|
|
|
|
|
-function getExcel(type) {
|
|
|
- const phrType = (type === "") ? "all" : type;
|
|
|
+function getExcel() {
|
|
|
|
|
|
- const url = "./excel?patientIdx=" + mPatientIdx + "&phrType=" + phrType;
|
|
|
+ if (!$("#downMemo").val().trim()) {
|
|
|
+ alert("다운로드 사유를 입력해 주세요.");
|
|
|
+ $("#downMemo").val("").foucs();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($("#downMemo").val().trim().length < 3) {
|
|
|
+ alert("다운로드 사유는 3글자 이상이어야 합니다.");
|
|
|
+ $("#downMemo").foucs();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const downMemo = $("#downMemo").val().trim();
|
|
|
+ donwMemo = encodeURIComponent(downMemo);
|
|
|
+ const url = "./excel?patientIdx=" + mPatientIdx + "&downMemo=" + downMemo;
|
|
|
window.open(url);
|
|
|
+
|
|
|
+ $("#excelDownMemo").modal("hide");
|
|
|
}
|
|
|
|
|
|
function handleModifyMemo(memoId, recordedDate) {
|
|
@@ -813,6 +828,11 @@ $(document).ready(function() {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ // 건강정보 엑셀 다운로드 사유 팝업 닫힐 때 처리
|
|
|
+ $('#excelDownMemo').on('hidden.bs.modal', function () {
|
|
|
+ $("#downMemo").val("");
|
|
|
+ })
|
|
|
+
|
|
|
// phrData 기록 추가 클릭 이벤트
|
|
|
$('#defaultModalPrimary_1').on('hidden.bs.modal', function () {
|
|
|
$("#eventDateTime1").val("");
|
|
@@ -1035,6 +1055,37 @@ $(document).ready(function() {
|
|
|
<div class="preloader">
|
|
|
<div class="loadingIcon"></div>
|
|
|
</div>
|
|
|
+ <div class="modal fade" id="excelDownMemo" tabindex="-1" role="dialog" aria-hidden="true" data-memoid="">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">건강정보 Excel 다운로드</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
|
|
+ aria-hidden="true">×</span> </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body m-3">
|
|
|
+ <table class="table mobile-table">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width: 20%">
|
|
|
+ <col style="width: 80%">
|
|
|
+ </colgroup>
|
|
|
+ <tr>
|
|
|
+ <th><span class="fix">*</span>다운로드 사유</th>
|
|
|
+ <td>
|
|
|
+ <div class="form-row">
|
|
|
+ <textarea id="downMemo" name="downMemo" class="form-control" cols="" rows="6" placeholder="" maxlength="200"></textarea>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div class="addMemoTools modal-footer">
|
|
|
+ <button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
|
|
|
+ <button type="button" class="btn btn-primary" onclick="getExcel();">제출 후 다운로드</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="modal fade" id="legendGuide" tabindex="-1" role="dialog" aria-hidden="true">
|
|
|
<div class="modal-dialog modal-sm" role="document">
|
|
|
<div class="modal-content">
|
|
@@ -1239,7 +1290,7 @@ $(document).ready(function() {
|
|
|
<div class="col-12">
|
|
|
<button class="btn btn-lg btn-secondary mr-2" onclick="gotoList()"><i class="mdi mdi-backburger"></i> 대시보드</button>
|
|
|
<c:if test="${data._SES_GROUP_IDX ne '3'}">
|
|
|
- <button id="downloadData" type="button" class="btn btn-lg btn-success" onclick="getExcel('');"><i class="mdi mdi-file-excel-outline"></i> 건강정보 다운로드</button>
|
|
|
+ <button id="downloadData" type="button" class="btn btn-lg btn-success" data-toggle="modal" data-target="#excelDownMemo"><i class="mdi mdi-file-excel-outline"></i> 건강정보 다운로드</button>
|
|
|
</c:if>
|
|
|
</div>
|
|
|
</div>
|