list.jsp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  2. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
  3. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
  4. <%@ page language="java" contentType="text/html; charset=UTF-8"
  5. pageEncoding="UTF-8"%>
  6. <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
  7. <script>
  8. var startDate = "<c:out value='${startDate}'/>";
  9. var endDate = "<c:out value='${endDate}'/>";
  10. $(function() {
  11. $("input[name=\"startDate\"]").daterangepicker({
  12. singleDatePicker : true,
  13. showDropdowns : true,
  14. // startDate : "<c:out value='${startDate}'/>",
  15. locale : {
  16. //format : "M/DD hh:mm A"
  17. format : "YYYY-MM-DD"
  18. }
  19. });
  20. $("input[name=\"endDate\"]").daterangepicker({
  21. singleDatePicker : true,
  22. showDropdowns : true,
  23. // startDate : "<c:out value='${endDate}'/>",
  24. locale : {
  25. //format : "M/DD hh:mm A"
  26. format : "YYYY-MM-DD"
  27. }
  28. });
  29. $("input[name=\"startDate\"]").val( startDate );
  30. $("input[name=\"endDate\"]").val( endDate );
  31. });
  32. function getExcel(){
  33. if( $.trim( $( "#downMemo" ).val() ) == "" ){
  34. alertBox({ txt : "사유를 입력해주세요" });
  35. $( ".modal-header>.modal-title h3" ).remove();
  36. return false;
  37. }
  38. var newForm = $( "#searchForm" ).clone();
  39. newForm.attr( "id", "excelForm" );
  40. newForm.attr( "method", "post" );
  41. newForm.attr( "action", "./excel" );
  42. newForm.attr( "target", "_blank" );
  43. newForm.hide();
  44. $( document.body ).append( newForm );
  45. newForm.submit();
  46. $( "button.close" ).click();
  47. $( "#downMemo" ).val( "" );
  48. $( "#excelForm" ).remove();
  49. }
  50. </script>
  51. </head>
  52. <body>
  53. <div class="modal fade" id="excelDownMemo" tabindex="-1" role="dialog" aria-hidden="true" data-memoid="">
  54. <div class="modal-dialog" role="document">
  55. <div class="modal-content">
  56. <div class="modal-header">
  57. <h5 class="modal-title">생활치료센터 리스트 Excel 다운로드</h5>
  58. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
  59. aria-hidden="true">&times;</span> </button>
  60. </div>
  61. <div class="modal-body m-3">
  62. <table class="table mobile-table">
  63. <colgroup>
  64. <col style="width: 20%">
  65. <col style="width: 80%">
  66. </colgroup>
  67. <tr>
  68. <th><span class="fix">*</span>다운로드 사유</th>
  69. <td>
  70. <div class="form-row">
  71. <textarea id="downMemo" name="downMemo" class="form-control" cols="" rows="6" placeholder="" maxlength="200"></textarea>
  72. </div>
  73. </td>
  74. </tr>
  75. </table>
  76. </div>
  77. <div class="addMemoTools modal-footer">
  78. <button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
  79. <button type="button" class="btn btn-primary" onclick="getExcel();">제출 후 다운로드</button>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="wrapper">
  85. <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
  86. <div class="main">
  87. <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
  88. <main class="content">
  89. <div class="container-fluid p-0">
  90. <!-- 환지관리 START -->
  91. <div class="row">
  92. <div class="col-12 col-lg-6">
  93. <h1 class="h3 mb-3">생활치료센터 관리</h1>
  94. </div>
  95. <div class="col-12 col-lg-6 text-right">
  96. <nav aria-label="breadcrumb">
  97. <ol class="breadcrumb">
  98. <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
  99. <li class="breadcrumb-item active">생활치료센터 관리</li>
  100. </ol>
  101. </nav>
  102. </div>
  103. </div>
  104. <div class="row">
  105. <div class="col-12">
  106. <div class="card">
  107. <form action="?" method="get" id="searchForm">
  108. <div class="card-body">
  109. <table class="table mobile-table">
  110. <colgroup>
  111. <col style="width:10%">
  112. <col style="width:40%">
  113. <col style="width:10%">
  114. <col style="width:40%">
  115. </colgroup>
  116. <tr>
  117. <th>지역</th>
  118. <td>
  119. <select class="custom-select form-control" name="locationCode">
  120. <option value="">전체</option>
  121. <c:forEach var="i" items="${locationList}">
  122. <option value="${i.locationCode}" <c:if test="${i.locationCode eq locationCode}"> selected="selected"</c:if>><c:out value="${i.locationName}"/></option>
  123. </c:forEach>
  124. <!-- <option value="info">서울특별시</option> -->
  125. <!-- <option value="warning">경기도</option> -->
  126. </select>
  127. </td>
  128. <th>생활치료센터명</th>
  129. <td>
  130. <input type="text" class="form-control" name="centerName" placeholder="생활치료센터명" value="<c:out value="${centerName}" />">
  131. </td>
  132. </tr>
  133. <tr>
  134. <th>등록일</th>
  135. <td colspan="3">
  136. <div class="row">
  137. <div class="col-lg-4 col-sm-5">
  138. <div class="form-group calendar-bar mb-xl-0">
  139. <input class="form-control" type="text" name="startDate" placeholder="검색 시작일자" autocomplete="off">
  140. <i class="align-middle mr-2 fas fa-fw fa-calendar-alt"></i>
  141. </div>
  142. </div>
  143. <div class="col-lg-2 col-sm-2 text-center">
  144. ~
  145. </div>
  146. <div class="col-lg-4 col-sm-5">
  147. <div class="form-group calendar-bar mb-xl-0">
  148. <input class="form-control" type="text" name="endDate" placeholder="검색 종료일자" autocomplete="off">
  149. <i class="align-middle mr-2 fas fa-fw fa-calendar-alt"></i>
  150. </div>
  151. </div>
  152. <div class="col-sm-12 col-lg-2">
  153. <button class="btn btn-primary">검색</button>
  154. </div>
  155. </div>
  156. </td>
  157. </tr>
  158. </table>
  159. </div>
  160. </form>
  161. </div>
  162. </div>
  163. </div>
  164. <div class="row">
  165. <div class="col-12">
  166. <div class="card">
  167. <div class="card-body">
  168. <div class="row mb-3">
  169. <div class="col-6">전체 :
  170. <fmt:formatNumber value="${total}" pattern="#,###" />
  171. </div>
  172. <div class="col-6 text-right">
  173. <button class="btn btn-success" data-toggle="modal" data-target="#excelDownMemo">Excel 다운로드</button>
  174. <button class="btn btn-primary" onclick="location.href='./new';">생활치료센터 신규 등록</button>
  175. </div>
  176. </div>
  177. <div class="table-responsive">
  178. <table class="table table-striped text-center">
  179. <colgroup>
  180. <col style=" width: 5%; ">
  181. <col style=" width: 14%; ">
  182. <col style=" width: 6%; ">
  183. <col style=" width: 12%; ">
  184. <col style=" width: 8%; ">
  185. <col style=" width: 8%; ">
  186. <col style=" width: 5%; ">
  187. <col style=" width: 6%; ">
  188. <col style=" width: 5%; ">
  189. <col style=" width: 5%; ">
  190. <col style=" width: 6%; ">
  191. <col style=" width: 8%; ">
  192. </colgroup>
  193. <thead>
  194. <tr>
  195. <th rowspan="2">번호</th>
  196. <th rowspan="2">생활치료센터명</th>
  197. <th rowspan="2">지역</th>
  198. <th rowspan="2">협력병원</th>
  199. <th rowspan="2">담당자(ID)</th>
  200. <th rowspan="2">전화번호</th>
  201. <th colspan="5">인원 수 (단위 : 명)</th>
  202. <th rowspan="2">등록일시</th>
  203. </tr>
  204. <tr>
  205. <th>의료진</th>
  206. <th>총 수용인원</th>
  207. <th>입소</th>
  208. <th>퇴소</th>
  209. <th>지정병원이송</th>
  210. </tr>
  211. </thead>
  212. <tbody>
  213. <c:choose>
  214. <c:when test="${total > 0}">
  215. <c:forEach var="l" items="${item}" varStatus="lStatus">
  216. <c:set var="viewLink" value="./info?centerCode=${l.centerCode}" />
  217. <c:set var="pageNum" value="${ ( total - lStatus.index ) - ( (page - 1) * pageSize ) }" />
  218. <tr>
  219. <td><fmt:formatNumber value="${pageNum}" pattern="#,###" /></td>
  220. <td>
  221. <a href="${viewLink}"><c:out value="${l.centerName}" /></a>
  222. </td>
  223. <td><c:out value="${l.locationName}" /></td>
  224. <td><c:out value="${l.cooperativeName}" /></td>
  225. <td><c:out value="${l.staffName}"/><br/><c:out value="(${l.staffId})" /></td>
  226. <td><c:out value="${l.staffPhoneNumber}"/></td>
  227. <td><c:out value="${l.totalStaff}" /></td>
  228. <td><c:out value="${l.totalCapacity}" /></td>
  229. <td><c:out value="${l.totalPatientH}" /></td>
  230. <td><c:out value="${l.totalPatientD}" /></td>
  231. <td><c:out value="${l.totalPatientT}" /></td>
  232. <td><c:out value="${l.createDate}" /></td>
  233. </tr>
  234. </c:forEach>
  235. </c:when>
  236. <c:otherwise>
  237. <tr>
  238. <td colspan="9">등록된 생활치료센터가 없습니다.</td>
  239. </tr>
  240. </c:otherwise>
  241. </c:choose>
  242. </tbody>
  243. </table>
  244. </div>
  245. <div class="row mt-5">
  246. <div class="col-12 col-lg-6 mb-2">
  247. </div>
  248. <div class="col-12 col-lg-6 mb-2">
  249. <jsp:include page="${data._INCLUDE}/paging.jsp" flush="true">
  250. <jsp:param name="firstPageNo" value="${paging.firstPageNo}" />
  251. <jsp:param name="prevPageNo" value="${paging.prevPageNo}" />
  252. <jsp:param name="startPageNo" value="${paging.startPageNo}" />
  253. <jsp:param name="pageNo" value="${paging.pageNo}" />
  254. <jsp:param name="endPageNo" value="${paging.endPageNo}" />
  255. <jsp:param name="nextPageNo" value="${paging.nextPageNo}" />
  256. <jsp:param name="finalPageNo" value="${paging.finalPageNo}" />
  257. <jsp:param name="preFix" value="${paging.preFix}" />
  258. <jsp:param name="url" value="${paging.url}" />
  259. <jsp:param name="total" value="${paging.totalCount}" />
  260. </jsp:include>
  261. </div>
  262. </div>
  263. </div>
  264. </div>
  265. </div>
  266. </div>
  267. <!-- 환자관리 END -->
  268. </div>
  269. </main>
  270. <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
  271. </div>
  272. </div>
  273. </body>
  274. </html>