|
@@ -4,6 +4,75 @@
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
|
pageEncoding="UTF-8"%>
|
|
|
<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
|
|
|
+<script src="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script>
|
|
|
+<script>
|
|
|
+
|
|
|
+function juso() {
|
|
|
+ new daum.Postcode({
|
|
|
+ oncomplete: function(data) {
|
|
|
+ // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
|
|
|
+
|
|
|
+ // 각 주소의 노출 규칙에 따라 주소를 조합한다.
|
|
|
+ // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
|
|
|
+ var addr = ''; // 주소 변수
|
|
|
+ var extraAddr = ''; // 참고항목 변수
|
|
|
+
|
|
|
+ //사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
|
|
|
+ if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
|
|
|
+ addr = data.roadAddress;
|
|
|
+ } else { // 사용자가 지번 주소를 선택했을 경우(J)
|
|
|
+ addr = data.jibunAddress;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 사용자가 선택한 주소가 도로명 타입일때 참고항목을 조합한다.
|
|
|
+ if(data.userSelectedType === 'R'){
|
|
|
+ // 법정동명이 있을 경우 추가한다. (법정리는 제외)
|
|
|
+ // 법정동의 경우 마지막 문자가 "동/로/가"로 끝난다.
|
|
|
+ if(data.bname !== '' && /[동|로|가]$/g.test(data.bname)){
|
|
|
+ extraAddr += data.bname;
|
|
|
+ }
|
|
|
+ // 건물명이 있고, 공동주택일 경우 추가한다.
|
|
|
+ if(data.buildingName !== '' && data.apartment === 'Y'){
|
|
|
+ extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName);
|
|
|
+ }
|
|
|
+ // 표시할 참고항목이 있을 경우, 괄호까지 추가한 최종 문자열을 만든다.
|
|
|
+ if(extraAddr !== ''){
|
|
|
+ extraAddr = ' (' + extraAddr + ')';
|
|
|
+ }
|
|
|
+ // 조합된 참고항목을 해당 필드에 넣는다.
|
|
|
+ //document.getElementById("detailAddr").value = extraAddr;
|
|
|
+
|
|
|
+ } else {
|
|
|
+ //document.getElementById("detailAddr").value = '';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 우편번호와 주소 정보를 해당 필드에 넣는다.
|
|
|
+ /* document.getElementById('sample6_postcode').value = data.zonecode; */
|
|
|
+
|
|
|
+ document.getElementById("mainAddr").value = addr + " " + extraAddr;
|
|
|
+ // 커서를 상세주소 필드로 이동한다.
|
|
|
+ document.getElementById("detailAddr").focus();
|
|
|
+
|
|
|
+ }
|
|
|
+ }).open();
|
|
|
+}
|
|
|
+
|
|
|
+function onlyNumber() {
|
|
|
+ if((event.keyCode<48) || (event.keyCode>57)) {
|
|
|
+ event.returnValue = false;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$( function(){
|
|
|
+ $( "#newForm" ).validate({
|
|
|
+ submitHandler: function(form) {
|
|
|
+ $("#mainAddr").removeAttr("disabled");
|
|
|
+ form.submit();
|
|
|
+ }
|
|
|
+ });
|
|
|
+})
|
|
|
+
|
|
|
+</script>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div class="wrapper">
|
|
@@ -56,78 +125,94 @@
|
|
|
<div class="row">
|
|
|
<div class="col-12">
|
|
|
<div class="card">
|
|
|
- <div class="card-body">
|
|
|
- <table class="table mobile-table">
|
|
|
- <colgroup>
|
|
|
- <col style="width:15%">
|
|
|
- <col style="width:35%">
|
|
|
- <col style="width:15%">
|
|
|
- <col style="width:35%">
|
|
|
- </colgroup>
|
|
|
- <tr>
|
|
|
- <th>생활치료센터명</th>
|
|
|
- <td>
|
|
|
- <input type="text" class="form-control">
|
|
|
- </td>
|
|
|
- <th>지역</th>
|
|
|
- <td>
|
|
|
- <select class="custom-select">
|
|
|
- <option selected="">지역</option>
|
|
|
- <option>1</option>
|
|
|
- <option>2</option>
|
|
|
- <option>3</option>
|
|
|
- <option>4</option>
|
|
|
- <option>5</option>
|
|
|
- <option>6</option>
|
|
|
- <option>7</option>
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <th>주소</th>
|
|
|
- <td colspan="3">
|
|
|
- <div class="form-row">
|
|
|
- <div class="col-lg-10"><input type="text" class="form-control"></div>
|
|
|
- <div class="col-lg-2"><button class="btn btn-primary w100">주소찾기</button></div>
|
|
|
+ <form action="./newProc" method="post" id="newForm">
|
|
|
+ <div class="card-body">
|
|
|
+ <table class="table mobile-table">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width:15%">
|
|
|
+ <col style="width:35%">
|
|
|
+ <col style="width:15%">
|
|
|
+ <col style="width:35%">
|
|
|
+ </colgroup>
|
|
|
+ <tr>
|
|
|
+ <th><span class="fix">*</span>생활치료센터명</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="form-control" name="centerName" required>
|
|
|
+ </td>
|
|
|
+ <th><span class="fix">*</span>지역</th>
|
|
|
+ <td>
|
|
|
+ <select class="custom-select" name="locationCode">
|
|
|
+ <option >지역</option>
|
|
|
+ <c:forEach var="i" items="${locationList}">
|
|
|
+ <option value="${i.locationCode}"><c:out value="${i.locationName}"/></option>
|
|
|
+ </c:forEach>
|
|
|
+ <!-- <option>1</option>
|
|
|
+ <option>2</option>
|
|
|
+ <option>3</option>
|
|
|
+ <option>4</option>
|
|
|
+ <option>5</option>
|
|
|
+ <option>6</option>
|
|
|
+ <option>7</option> -->
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th><span class="fix">*</span>주소</th>
|
|
|
+ <td colspan="3">
|
|
|
+ <div class="form-row">
|
|
|
+ <div class="col-lg-10"><input type="text" class="form-control" disabled id="mainAddr" name="centerAddress" required></div>
|
|
|
+ <div class="col-lg-2"><span class="btn btn-primary w100" onclick="juso();">주소찾기</span></div>
|
|
|
+ <div class="col-lg-10"><input type="text" class="form-control mt8" id="detailAddr" name="detailAddr" placeholder="상세주소" required></div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th><span class="fix">*</span>전화번호</th>
|
|
|
+ <td colspan="3">
|
|
|
+ <input type="text" class="form-control" name="centerNumber" placeholder="예)1234-1234-1234" required onkeypress="onlyNumber()">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th><span class="fix">*</span>수용인원(명)</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="form-control" name="totalCapacity" required onkeypress="onlyNumber();">
|
|
|
+ </td>
|
|
|
+ <th><span class="fix">*</span>의료진수 (명)</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="form-control" name="totalStaff" required onkeypress="onlyNumber();">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th><span class="fix">*</span>아이디</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="form-control" name="staffId" required>
|
|
|
+ </td>
|
|
|
+ <th><span class="fix">*</span>비밀번호</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="form-control" name="staffPw" required>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th><span class="fix">*</span>담당자 이름</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="form-control" name="staffName" required>
|
|
|
+ </td>
|
|
|
+ <th><span class="fix">*</span>담당자 휴대전화번호</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="form-control" name="staffPhoneNumber" required>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <div class="row mt-3">
|
|
|
+ <div class="col-12">
|
|
|
+ <div class="text-right">
|
|
|
+ <button type="button" class="btn btn-outline-primary w100" onclick="history.back();">취소</button>
|
|
|
+ <button type="submit" class="btn btn-primary w100">등록</button>
|
|
|
</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <th>전화번호</th>
|
|
|
- <td colspan="3">
|
|
|
- <input type="text" class="form-control" placeholder="예)1234-1234-1234">
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <th>수용인원(명)</th>
|
|
|
- <td>
|
|
|
- <input type="text" class="form-control">
|
|
|
- </td>
|
|
|
- <th>의료진수 (명)</th>
|
|
|
- <td>
|
|
|
- <input type="text" class="form-control">
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <th>담당자</th>
|
|
|
- <td>
|
|
|
- <input type="text" class="form-control">
|
|
|
- </td>
|
|
|
- <th>담당자 휴대전화번호</th>
|
|
|
- <td>
|
|
|
- <input type="text" class="form-control">
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- <div class="row mt-3">
|
|
|
- <div class="col-12">
|
|
|
- <div class="text-right">
|
|
|
- <button class="btn btn-outline-primary w100">취소</button>
|
|
|
- <button class="btn btn-primary w100">등록</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|