대출 목록, 취소, 예약페이지

This commit is contained in:
JSYOO 2021-07-23 16:09:56 +09:00
parent 844fa12cb7
commit 28a7b0ecbb
7 changed files with 671 additions and 18 deletions

View File

@ -8,9 +8,32 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import nlib.col.service.RentService; import nlib.col.service.RentService;
/**
* <pre>
* @Class Name : RentController.java
*
* @Description : 대출 Controller
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 21. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 7. 21.
* @version 1.0
*
*/
@Controller @Controller
public class RentController public class RentController
{ {
@ -19,11 +42,25 @@ public class RentController
@Resource(name = "rentService") @Resource(name = "rentService")
private RentService rentService; private RentService rentService;
/** 대출 목록 화면을 호출한다.
public ModelMap listRentItems(HttpServletRequest req) { * @param req
return null; * @return
*/
@RequestMapping("/rent/listRentItems.do")
public String listRentItems(HttpServletRequest req) {
return "nlib/rent/listRentItems";
} }
/** 대출 취소 목록화면을 호출한다.
* @param req
* @return
*/
@RequestMapping("/rent/listCancelRentItems.do")
public String listCancelRentItems(HttpServletRequest req) {
return "nlib/rent/listCancelRentItems";
}
public ModelMap postponeReturnDate(HttpServletRequest req) { public ModelMap postponeReturnDate(HttpServletRequest req) {
return null; return null;
} }
@ -32,8 +69,13 @@ public class RentController
return null; return null;
} }
public ModelMap listReservations(HttpServletRequest req) { /** 대출 예약 목록화면을 호출한다.
return null; * @param req
* @return
*/
@RequestMapping("/rent/listReservations.do")
public String listReservations(HttpServletRequest req) {
return "nlib/rent/listReservations";
} }
public ModelMap cancelReservations(HttpServletRequest req) { public ModelMap cancelReservations(HttpServletRequest req) {

View File

@ -53,6 +53,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/temp/**") .antMatchers("/temp/**")
.antMatchers("/favicon/**") .antMatchers("/favicon/**")
.antMatchers("/*/*Ajax.do") .antMatchers("/*/*Ajax.do")
.antMatchers("/board/**")
; ;
} }

View File

@ -54,6 +54,12 @@ function signUp(){
return false; return false;
} }
if($("#zipNo").val()=="" || $("#roadAddrPart").val()=="" || $("#addrDetail").val()=="")
{
alert("주소를 입력해주세요.");
return false;
}
if(confirm("회원가입하시겠습니까?")){ if(confirm("회원가입하시겠습니까?")){
alert("회원가입 되었습니다."); alert("회원가입 되었습니다.");
return true; return true;
@ -312,7 +318,7 @@ label.error {
<tr> <tr>
<td id="title">아이디</td> <td id="title">아이디</td>
<td> <td>
<input type="email" id="id" name="id" maxlength="30" value=<c:out value="${loginVO.id}"/> required > <input type="email" id="id" name="id" maxlength="30" value=<c:out value="${loginVO.id}"/> required readonly >
</td> </td>
</tr> </tr>
@ -321,14 +327,15 @@ label.error {
<td> <td>
<input type="password" id="password" name="password" minlength="8" maxlength="16" <input type="password" id="password" name="password" minlength="8" maxlength="16"
oninvalid="this.setCustomValidity('8~16자 영문 대 소문자, 숫자, 특수문자를 사용하세요.')" oninvalid="this.setCustomValidity('8~16자 영문 대 소문자, 숫자, 특수문자를 사용하세요.')"
pattern="^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,16}$"> oninput="this.setCustomValidity('')"
pattern="^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,16}$" required>
</td> </td>
</tr> </tr>
<tr> <tr>
<td id="title">비밀번호 확인</td> <td id="title">비밀번호 확인</td>
<td> <td>
<input type="password" id="passwordConfirm" name="passwordConfirm" minlength="8" maxlength="16" pattern="\d*" required> <input type="password" id="passwordConfirm" name="passwordConfirm" minlength="8" maxlength="16" required>
</td> </td>
</tr> </tr>
@ -370,8 +377,8 @@ label.error {
<tr> <tr>
<td id="title">주소</td> <td id="title">주소</td>
<td> <td>
<input type="text" id="zipNo" name="zipNo" readonly required><button type="button" style="text-align:left;" class="btn-warning" onclick="goPopup()">주소검색</button><br> <input type="text" id="zipNo" name="zipNo" readonly ><button type="button" style="text-align:left;" class="btn-warning" onclick="goPopup()">주소검색</button><br>
<input type="text" id="roadAddrPart" name="roadAddrPart" readonly required><input type="text" id="addrDetail" name="addrDetail" readonly required> <input type="text" id="roadAddrPart" name="roadAddrPart" readonly ><input type="text" id="addrDetail" name="addrDetail" readonly >
</td> </td>
</tr> </tr>

View File

@ -0,0 +1,181 @@
<%
/**
* <pre>
* @Class Name : listCancelRentItems.jsp
*
* @Description : 대출 취소목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 21. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 7. 21.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">대출 취소</c:set>
<!DOCTYPE html>
<html>
<head>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
</head>
<body onload="fn_init()">
<h1>대출 취소</h1>
<form name="articleForm"
action="${pageContext.request.contextPath}/board/listQnAs.do"
method="post"
onSubmit="fn_search_article(); return false;">
<!-- 검색조건 -->
<select name="pageRows" id="pageRows" title="목록에 보여줄 글 개수">
<option value="10">10개씩 보기</option>
<option value="50">50개씩 보기</option>
<option value="100">100개씩 보기</option>
</select>
<input type="text" name="pageNo" id="pageNo" title="페이지번호" value="1" size="5" maxlength="5" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="" size="35" maxlength="50" />
<input type="submit" name="btnSearch" id="btnSearch" value="검색" />
<input type="button" name="btnNew" id="btnNew" value="글쓰기"
onclick="javascript:location.href='${pageContext.request.contextPath}/board/insertQnAForm.do';" />
<div id="jsGrid" name="jsGrid" ></div>
</form>
<script type="text/javaScript" language="javascript">
// 그리드 데이터
var clients = [
{ "noticeNo": 1, "noticeType": "01", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 2, "noticeType": "02", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 3, "noticeType": "03", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 4, "noticeType": "04", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 5, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 6, "noticeType": "06", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 7, "noticeType": "06", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 9, "noticeType": "01", "title": "대출 취소 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }
];
// 그리드내 콤보박스 값
var noticeTypes = [
{ Name: "공지" , Id: "01" },
{ Name: "자료" , Id: "02" },
{ Name: "모집" , Id: "03" },
{ Name: "입찰" , Id: "04" },
{ Name: "발표" , Id: "05" },
{ Name: "이벤트", Id: "06" }
];
// 그리드 생성
$("#jsGrid").jsGrid({
width: "100%",
height: "100%",
inserting: false,
editing: false,
sorting: true,
paging: true,
pageSize: 10,
pageButtonCount: 10,
pageIndex: 1,
pageFirstText: " << ",
pagePrevText: " < ",
pageLastText: " >> ",
pageNextText: " > ",
pagerFormat: "{first} {prev} {pages} {next} {last}",
/* 이하만 설정 */
data: clients,
fields: [
{ title:"번호", name: "noticeNo" , type: "number" , width: 50, align: "center"},
{ title:"유형", name: "noticeType", type: "select", width: 80, align: "center", items: noticeTypes, valueField: "Id", textField: "Name" },
{ title:"제목", name: "title", type: "text" , width: 200, align: "left" },
{ title:"조회수", name: "readCount", type: "number", width: 50, align: "center" },
{ title:"등록일", name: "regDate", type: "text", width: 100, align: "center"}
]
});
function fn_search_article() {
var searchKeyword = document.articleForm.searchKeyword.value;
var pageNo = document.articleForm.pageNo.value;
var pageRows = document.articleForm.pageRows.value;
var inputData = {
"searchKeyword" : searchKeyword /*encodeURIComponent(searchKeyword)*/
, "pageNo" : pageNo
, "pageRows": pageRows};
//lert(JSON.stringify(inputData));
}
function fn_init() {
}
</script>
</body>
</html>

View File

@ -0,0 +1,181 @@
<%
/**
* <pre>
* @Class Name : listRentItems.jsp
*
* @Description : 대출 목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 21. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 7. 21.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">대출 목록</c:set>
<!DOCTYPE html>
<html>
<head>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
</head>
<body onload="fn_init()">
<h1>대출 목록</h1>
<form name="articleForm"
action="${pageContext.request.contextPath}/board/listQnAs.do"
method="post"
onSubmit="fn_search_article(); return false;">
<!-- 검색조건 -->
<select name="pageRows" id="pageRows" title="목록에 보여줄 글 개수">
<option value="10">10개씩 보기</option>
<option value="50">50개씩 보기</option>
<option value="100">100개씩 보기</option>
</select>
<input type="text" name="pageNo" id="pageNo" title="페이지번호" value="1" size="5" maxlength="5" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="" size="35" maxlength="50" />
<input type="submit" name="btnSearch" id="btnSearch" value="검색" />
<input type="button" name="btnNew" id="btnNew" value="글쓰기"
onclick="javascript:location.href='${pageContext.request.contextPath}/board/insertQnAForm.do';" />
<div id="jsGrid" name="jsGrid" ></div>
</form>
<input type="button" value="대출 취소목록" onClick="location.href='http://www.example.com/nlib/rent/listCancelRentItems.do'">
<script type="text/javaScript" language="javascript">
// 그리드 데이터
var clients = [
{ "noticeNo": 1, "noticeType": "01", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 2, "noticeType": "02", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 3, "noticeType": "03", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 4, "noticeType": "04", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 5, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 6, "noticeType": "06", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 7, "noticeType": "06", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 9, "noticeType": "01", "title": "대출 목록 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }
];
// 그리드내 콤보박스 값
var noticeTypes = [
{ Name: "공지" , Id: "01" },
{ Name: "자료" , Id: "02" },
{ Name: "모집" , Id: "03" },
{ Name: "입찰" , Id: "04" },
{ Name: "발표" , Id: "05" },
{ Name: "이벤트", Id: "06" }
];
// 그리드 생성
$("#jsGrid").jsGrid({
width: "100%",
height: "100%",
inserting: false,
editing: false,
sorting: true,
paging: true,
pageSize: 10,
pageButtonCount: 10,
pageIndex: 1,
pageFirstText: " << ",
pagePrevText: " < ",
pageLastText: " >> ",
pageNextText: " > ",
pagerFormat: "{first} {prev} {pages} {next} {last}",
/* 이하만 설정 */
data: clients,
fields: [
{ title:"번호", name: "noticeNo" , type: "number" , width: 50, align: "center"},
{ title:"유형", name: "noticeType", type: "select", width: 80, align: "center", items: noticeTypes, valueField: "Id", textField: "Name" },
{ title:"제목", name: "title", type: "text" , width: 200, align: "left" },
{ title:"조회수", name: "readCount", type: "number", width: 50, align: "center" },
{ title:"등록일", name: "regDate", type: "text", width: 100, align: "center"}
]
});
function fn_search_article() {
var searchKeyword = document.articleForm.searchKeyword.value;
var pageNo = document.articleForm.pageNo.value;
var pageRows = document.articleForm.pageRows.value;
var inputData = {
"searchKeyword" : searchKeyword /*encodeURIComponent(searchKeyword)*/
, "pageNo" : pageNo
, "pageRows": pageRows};
//lert(JSON.stringify(inputData));
}
function fn_init() {
}
</script>
</body>
</html>

View File

@ -0,0 +1,181 @@
<%
/**
* <pre>
* @Class Name : listReserVations.jsp
*
* @Description : 대출 예약 목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 21. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 7. 21.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">대출 예약</c:set>
<!DOCTYPE html>
<html>
<head>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
</head>
<body onload="fn_init()">
<h1>대출 예약</h1>
<form name="articleForm"
action="${pageContext.request.contextPath}/board/listQnAs.do"
method="post"
onSubmit="fn_search_article(); return false;">
<!-- 검색조건 -->
<select name="pageRows" id="pageRows" title="목록에 보여줄 글 개수">
<option value="10">10개씩 보기</option>
<option value="50">50개씩 보기</option>
<option value="100">100개씩 보기</option>
</select>
<input type="text" name="pageNo" id="pageNo" title="페이지번호" value="1" size="5" maxlength="5" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="" size="35" maxlength="50" />
<input type="submit" name="btnSearch" id="btnSearch" value="검색" />
<input type="button" name="btnNew" id="btnNew" value="글쓰기"
onclick="javascript:location.href='${pageContext.request.contextPath}/board/insertQnAForm.do';" />
<div id="jsGrid" name="jsGrid" ></div>
</form>
<script type="text/javaScript" language="javascript">
// 그리드 데이터
var clients = [
{ "noticeNo": 1, "noticeType": "01", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 2, "noticeType": "02", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 3, "noticeType": "03", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 4, "noticeType": "04", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 5, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 6, "noticeType": "06", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 7, "noticeType": "06", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 9, "noticeType": "01", "title": "대출예약 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }
];
// 그리드내 콤보박스 값
var noticeTypes = [
{ Name: "공지" , Id: "01" },
{ Name: "자료" , Id: "02" },
{ Name: "모집" , Id: "03" },
{ Name: "입찰" , Id: "04" },
{ Name: "발표" , Id: "05" },
{ Name: "이벤트", Id: "06" }
];
// 그리드 생성
$("#jsGrid").jsGrid({
width: "100%",
height: "100%",
inserting: false,
editing: false,
sorting: true,
paging: true,
pageSize: 10,
pageButtonCount: 10,
pageIndex: 1,
pageFirstText: " << ",
pagePrevText: " < ",
pageLastText: " >> ",
pageNextText: " > ",
pagerFormat: "{first} {prev} {pages} {next} {last}",
/* 이하만 설정 */
data: clients,
fields: [
{ title:"번호", name: "noticeNo" , type: "number" , width: 50, align: "center"},
{ title:"유형", name: "noticeType", type: "select", width: 80, align: "center", items: noticeTypes, valueField: "Id", textField: "Name" },
{ title:"제목", name: "title", type: "text" , width: 200, align: "left" },
{ title:"조회수", name: "readCount", type: "number", width: 50, align: "center" },
{ title:"등록일", name: "regDate", type: "text", width: 100, align: "center"}
]
});
function fn_search_article() {
var searchKeyword = document.articleForm.searchKeyword.value;
var pageNo = document.articleForm.pageNo.value;
var pageRows = document.articleForm.pageRows.value;
var inputData = {
"searchKeyword" : searchKeyword /*encodeURIComponent(searchKeyword)*/
, "pageNo" : pageNo
, "pageRows": pageRows};
//lert(JSON.stringify(inputData));
}
function fn_init() {
}
</script>
</body>
</html>

View File

@ -57,8 +57,56 @@ $(document).ready(function() {
//핸드폰 인증번호 받기 //핸드폰 인증번호 받기
%> %>
function phoneCert(){ function phoneCert(){
$("#phone").val($("#phone").val().replace(/-/gi,"")); $("#phone").val($("#phone").val().replace(/-/gi,""));
var regExp = /^\d{3}\d{3,4}\d{4}$/;
if(!regExp.test($("#phone").val()) || $("#phone").val()==""){
alert("형식에 맞지 않는 번호입니다.");
return false;
}
$.ajax({
url : "/nlib/member/phoneCertNum.ajax",
type : "POST",
async: false,
data : {"phone" : $("#phone").val()},
success : function(result){
alert("인증번호가 발송됐습니다.");
//인증번호 확인창
$("#phoneCertForm").css("display","block")
},error : function(){
}
})
}
<%
//핸드폰 인증번호 확인
%>
function certNumCheck(){
<%
//ajax 사용자가 입력한 번호를 보내 RESTfull server에서 확인 success or fail 반환 (3분이내인지도)
%>
$.ajax({
url : "/nlib/member/phoneCertNumChk.ajax",
type : "POST",
data : {"phoneCertNum" : $("#phoneCertNum").val(),
"phone" : $("#phone").val()},
async: false,
success : function(result){
if(result=="true")
{
alert("인증되었습니다.");
$("#phoneCertYn").val("Y"); $("#phoneCertYn").val("Y");
}else{
alert("인증에 실패했습니다.");
}
},error : function(){
}
})
} }
function jusoCallBack(zipNo,roadAddrPart,addrDetail){ function jusoCallBack(zipNo,roadAddrPart,addrDetail){
@ -75,10 +123,21 @@ document.addEventListener('keydown', function(event) {
}, true); }, true);
function update(){ function update(){
if($("#phoneCertYn").val()!="Y")
{
alert("휴대전화 인증이 필요합니다.");
return false;
}
if($("#zipNo").val()=="" || $("#roadAddrPart").val()=="" || $("#addrDetail").val()=="")
{
alert("주소를 입력해주세요.");
return false;
}
if(confirm("수정하시겠습니까?")){ if(confirm("수정하시겠습니까?")){
alert("수정되었습니다."); alert("수정되었습니다.");
document.updateForm.action="/nlib/userInfo/getMyInfo.do"; return true;
document.updateForm.submit();
}else{ }else{
return false; return false;
} }
@ -155,24 +214,25 @@ label.error {
<b><font size="6" color="gray">정보수정</font></b> <b><font size="6" color="gray">정보수정</font></b>
<br><br><br> <br><br><br>
<form id="updateForm" name="updateForm" method="post"> <form id="updateForm" name="updateForm" method="post" onsubmit="return update()" action="/nlib/userInfo/getMyInfo.do">
<table> <table>
<tr> <tr>
<td id="title">아이디</td> <td id="title">아이디</td>
<td> <td>
<input type="text" id="id" name="id" maxlength="30" readonly value=<c:out value="${result.id}"/> > <input type="text" id="id" name="id" maxlength="30" value=<c:out value="${result.id}"/> required readonly >
</td> </td>
</tr> </tr>
<tr> <tr>
<td id="title">이름</td> <td id="title">이름</td>
<td> <td>
<input type="text" id="name" name="name" maxlength="40" value=<c:out value="${result.name}"/>> <input type="text" id="name" name="name" maxlength="20" value=<c:out value="${result.name}"/> required>
</td> </td>
</tr> </tr>
<tr> <tr>
<td id="title">휴대전화</td> <td id="title">휴대전화</td>
<td> <td>
<input type="text" id="phone" name="phone" value=<c:out value="${result.phone}"/> ><button type="button" style="text-align:left;" class="btn-warning" onclick="phoneCert()">인증번호 받기</button> <input type="text" id="phone" name="phone" required value=<c:out value="${result.phone}"/> ><button type="button" style="text-align:left;" class="btn-warning" onclick="phoneCert()">인증번호 받기</button>
<div id="phoneCertForm" style="display:none;"><br><input type='text' id='phoneCertNum' name='phoneCertNum'> <button type='button' style='text-align:left;' class='btn-warning' onclick='certNumCheck()' >인증번호 확인</button></div>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -186,7 +246,7 @@ label.error {
</table> </table>
<br> <br>
<input type="hidden" id="phoneCertYn" name="phoneCertYn" value=<c:out value="N"/>> <input type="hidden" id="phoneCertYn" name="phoneCertYn" value=<c:out value="N"/>>
<input type="button" onclick="update();" value="수정"/> <input type="button" onclick="javascript:location.href='${pageContext.request.contextPath}/userInfo/getMyInfo.do';" value="취소"> <input type="submit" value="수정"/> <input type="button" onclick="javascript:location.href='${pageContext.request.contextPath}/userInfo/getMyInfo.do';" value="취소">
</form> </form>
</div> </div>
</body> </body>