new.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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 src="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script>
  8. <script>
  9. $( function(){
  10. $( "#newForm" ).validate({
  11. rules: {
  12. centerName : {
  13. minlength : 2,
  14. maxlength : 100
  15. },
  16. staffId: {
  17. minlength : 4,
  18. maxlength : 20,
  19. idValid : true,
  20. remote : {
  21. type : "POST",
  22. url : "/staff/duplicateIdCheck",
  23. data : {
  24. staffId : function(){
  25. return $( "input[name='staffId']" ).val();
  26. }
  27. }
  28. }
  29. },
  30. centerNumber : {
  31. phoneValid : true
  32. },
  33. staffPhoneNumber : {
  34. phoneValid : true
  35. },
  36. staffPw : {
  37. // minlength : 8,
  38. // maxlength : 15,
  39. passwordCheck : true
  40. },
  41. staffPwConfirm : {
  42. equalTo: "#staffPw",
  43. },
  44. totalCapacity :{
  45. number:true,
  46. digits:true
  47. },
  48. totalStaff :{
  49. number:true,
  50. digits:true
  51. }
  52. },
  53. messages : {
  54. staffId : {
  55. remote : "이미 존재하는 아이디입니다"
  56. },
  57. staffPw : {
  58. // minlength : "비밀번호를 확인하세요 (영문, 숫자, 특수문자를 혼합하여 8 ~ 15자 이내)",
  59. // maxlength : "비밀번호를 확인하세요 (영문, 숫자, 특수문자를 혼합하여 8 ~ 15자 이내)"
  60. },
  61. staffPwConfirm : {
  62. equalTo: "비밀번호가 일치하지 않습니다.",
  63. }
  64. },
  65. onkeyup: function( element, event ) {
  66. $( element ).valid();
  67. },
  68. onfocusout: function (element) {
  69. $( element ).val( $.trim( $( element ).val() ) );
  70. $( element ).valid();
  71. },
  72. submitHandler: function(form) {
  73. $("#mainAddr").removeAttr("disabled");
  74. form.submit();
  75. }
  76. });
  77. })
  78. </script>
  79. </head>
  80. <body>
  81. <div class="wrapper">
  82. <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
  83. <div class="main">
  84. <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
  85. <main class="content">
  86. <div class="container-fluid p-0">
  87. <!-- 환자관리 : 신규환자 등록 START -->
  88. <div class="row">
  89. <div class="col-12 col-lg-6">
  90. <h1 class="h3 mb-3">
  91. 생활치료센터 신규등록
  92. </h1>
  93. </div>
  94. <div class="col-12 col-lg-6 text-right">
  95. <nav aria-label="breadcrumb">
  96. <ol class="breadcrumb">
  97. <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
  98. <li class="breadcrumb-item">생활치료센터 관리</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="./new/regist" method="post" id="newForm">
  108. <div class="card-body">
  109. <table class="table mobile-table">
  110. <colgroup>
  111. <col style="width:15%">
  112. <col style="width:35%">
  113. <col style="width:15%">
  114. <col style="width:35%">
  115. </colgroup>
  116. <tr>
  117. <th><span class="fix">*</span>생활치료센터명</th>
  118. <td>
  119. <input type="text" class="form-control" name="centerName" required>
  120. </td>
  121. <th><span class="fix">*</span>지역</th>
  122. <td>
  123. <select class="custom-select" name="locationCode">
  124. <c:forEach var="i" items="${locationList}">
  125. <option value="${i.locationCode}"><c:out value="${i.locationName}"/></option>
  126. </c:forEach>
  127. <!-- <option>1</option>
  128. <option>2</option>
  129. <option>3</option>
  130. <option>4</option>
  131. <option>5</option>
  132. <option>6</option>
  133. <option>7</option> -->
  134. </select>
  135. </td>
  136. </tr>
  137. <tr>
  138. <th><span class="fix">*</span>주소</th>
  139. <td colspan="3">
  140. <div class="form-row">
  141. <div class="col-lg-10"><input type="text" class="form-control" disabled id="mainAddr" name="centerAddress" required></div>
  142. <div class="col-lg-2"><span class="btn btn-primary w100" onclick="juso();">주소찾기</span></div>
  143. <div class="col-lg-10"><input type="text" class="form-control mt8" id="detailAddr" name="detailAddr" placeholder="상세주소" required></div>
  144. </div>
  145. </td>
  146. </tr>
  147. <tr>
  148. <th><span class="fix">*</span>소관</th>
  149. <td>
  150. <select class="custom-select" name="jurisdiction">
  151. <c:forEach var="k" items="${jurisdiction}">
  152. <option value="${k.locationCode}"><c:out value="${k.locationName}"/></option>
  153. </c:forEach>
  154. </select>
  155. </td>
  156. <th><span class="fix">*</span>협력병원</th>
  157. <td>
  158. <select class="custom-select" name="cooperativeCode">
  159. <c:forEach var="j" items="${cooperativeList}">
  160. <option value="${j.locationCode}"><c:out value="${j.locationName}"/></option>
  161. </c:forEach>
  162. </select>
  163. </td>
  164. </tr>
  165. <tr>
  166. <th><span class="fix">*</span>전화번호</th>
  167. <td colspan="3">
  168. <input type="text" class="form-control" name="centerNumber" required onkeypress="onlyNumber()">
  169. </td>
  170. </tr>
  171. <tr style="display:none;">
  172. <th><span class="fix">*</span>수용인원(명)</th>
  173. <td>
  174. <input type="text" class="form-control" name="totalCapacity" value="0">
  175. </td>
  176. <th><span class="fix">*</span>의료진수 (명)</th>
  177. <td>
  178. <input type="text" class="form-control" name="totalStaff" value="0">
  179. </td>
  180. </tr>
  181. <tr>
  182. <th><span class="fix">*</span>담당자 아이디</th>
  183. <td>
  184. <input type="text" class="form-control" name="staffId" autocomplete="off" maxlength="20" required>
  185. </td>
  186. <th><span class="fix">*</span>담당자 이름</th>
  187. <td>
  188. <input type="text" class="form-control" name="staffName" required>
  189. </td>
  190. </tr>
  191. <tr>
  192. <th><span class="fix">*</span>담당자 전화번호</th>
  193. <td colspan="3">
  194. <!-- placeholder="'-'를 제외한 숫자만 입력하세요" -->
  195. <input type="text" class="form-control" name="staffPhoneNumber" required onkeypress="onlyNumber();" autocomplete="off">
  196. </td>
  197. </tr>
  198. <tr>
  199. <th><span class="fix">*</span>비밀번호</th>
  200. <td colspan="3">
  201. <!-- placeholder="숫자, 영문, 특수문자 조합 8~15자 이내" -->
  202. <input type="text" autocomplete="off" style="opacity:0;display: block; width:0px; height:0px; border: 0;">
  203. <input type="password" autocomplete="off" style="opacity:0;display: block; width:0px; height:0px; border: 0;">
  204. <input type="password" class="form-control" name="staffPw" id="staffPw" maxlength="15" placeholder="최소 8자리 이상의 (대문자, 소문자, 숫자, 특수문자) 2가지 종류 이상의 조합 or 10자리 이상의 비밀번호" required autocomplete="off">
  205. </td>
  206. </tr>
  207. <tr>
  208. <th><span class="fix">*</span>비밀번호 확인</th>
  209. <td colspan="3">
  210. <!-- placeholder="비밀번호 확인을 위해 비밀번호를 한번 더 입력하세요." -->
  211. <input type="password" class="form-control" name="staffPwConfirm" maxlength="15" required>
  212. </td>
  213. </tr>
  214. </table>
  215. <div class="row mt-3">
  216. <div class="col-12">
  217. <div class="text-right">
  218. <button type="button" class="btn btn-outline-primary w100" onclick="history.back();">취소</button>
  219. <button type="submit" class="btn btn-primary w100">등록</button>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. </form>
  225. </div>
  226. </div>
  227. </div>
  228. <!-- 환자관리 : 신규환자 등록 END -->
  229. </div>
  230. </main>
  231. <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
  232. </div>
  233. </div>
  234. </body>
  235. </html>