133 lines
4.5 KiB
Plaintext
133 lines
4.5 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
|
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="ko">
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>모바일센터 관리시스템</title>
|
|
<script src="<c:out value="/js/jquery-3.5.1.min.js" />"></script>
|
|
<script src="<c:out value="/js/bootstrap.min.js" />"></script>
|
|
<link href="<c:out value="/css/normalize.css" />" rel="stylesheet">
|
|
<link href="<c:out value="/css/bootstrap.min.css" />" rel="stylesheet">
|
|
<link href="<c:out value="/css/style.css" />" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<%@ include file="../include/header.jsp"%>
|
|
<section class="section">
|
|
<div class="section_title">
|
|
<!-- <p>현장 지원 시스템</p> -->
|
|
</div>
|
|
|
|
<div class="section_content">
|
|
<form:form commandName="useRequestSearchVO" id="searchForm" name="searchForm" method="get" >
|
|
<input type="hidden" name="id" />
|
|
<table class="list-table">
|
|
<thead>
|
|
<tr><th colspan="4">지도 사용 요청 목록</th></tr>
|
|
<tr>
|
|
<th>번호</th>
|
|
<th>작업명</th>
|
|
<th>날짜</th>
|
|
<th>상태</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<c:if test="${count >= 1}">
|
|
<c:forEach var="item" items="${useRequestList}" varStatus="idx">
|
|
<tr>
|
|
<td>${idx.count}</td>
|
|
<td class="title-td" style="width:70%;"><a href="/map/request/<c:out value='${item.idx}' />">${item.title}</a></td>
|
|
<td class="td_date">${item.r_date}</td>
|
|
<td>
|
|
<c:choose>
|
|
<c:when test="${item.status eq '99'}"><span class="label label-warning"><c:out value='승인대기' /></span></c:when>
|
|
<c:when test="${item.status eq '0'}"><span class="label label-success"><c:out value='승인' /></span></c:when>
|
|
<c:when test="${item.status eq '-1'}"><span class="label label-default"><c:out value='반려' /></span></c:when>
|
|
</c:choose>
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:if>
|
|
<c:if test="${count == 0}">
|
|
<tr><td colspan="4">요청한 목록이 없습니다.</td></tr>
|
|
</c:if>
|
|
</tbody>
|
|
</table>
|
|
<div class="div_write"">
|
|
<p>
|
|
<input class="btn btn-primary" type="button" value="작성" onclick="location.href='/map/reqWrite'" />
|
|
</p>
|
|
</div>
|
|
<div id="paging" style="width: 100%;">
|
|
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_link_page" />
|
|
<form:hidden path="pageIndex" />
|
|
</div>
|
|
</form:form>
|
|
</div>
|
|
<div class="section_btn">
|
|
<!-- <p><input class="btn" type="button" value="관리" onclick="location.href='fieldDetail.html'" /></p> -->
|
|
</div>
|
|
</section>
|
|
</body>
|
|
<script type="text/javascript">
|
|
var start = "${b_start}";
|
|
var end = "${b_end}";
|
|
var now = "${current_page}";
|
|
|
|
$(function(){
|
|
viewPaging();
|
|
$(".r_date").each(function(){
|
|
var r_date = $(this).text();
|
|
var nowDate = new Date();
|
|
var r_date = new Date(r_date);
|
|
var getDay = getFormatDate(r_date);
|
|
var nowDay = getFormatDate(nowDate);
|
|
|
|
if(getDay === nowDay){
|
|
$(this).html(getFormatTime(r_date));
|
|
}else{
|
|
$(this).html(getDay);
|
|
}
|
|
});
|
|
});
|
|
|
|
/* 날짜포맷 yyyy-MM-dd 변환 */
|
|
function getFormatDate(date){
|
|
var year = date.getFullYear();
|
|
var month = (1 + date.getMonth());
|
|
month = month >= 10 ? month : '0' + month;
|
|
var day = date.getDate();
|
|
day = day >= 10 ? day : '0' + day;
|
|
return year + '-' + month + '-' + day;
|
|
}
|
|
|
|
function getFormatTime(date){
|
|
var hours = date.getHours();
|
|
var minutes = date.getMinutes();
|
|
return hours + ':' + minutes;
|
|
}
|
|
|
|
function viewPaging(){
|
|
for (step = start; step < end; step++) {
|
|
if(step == now){
|
|
$("#paging").append("<strong>"+step+"</strong>");
|
|
}else{
|
|
$("#paging").append("<a href='userPermissionList.do?&page="+ step +"'>"+step+"</a>");
|
|
}
|
|
}
|
|
}
|
|
|
|
function fn_link_page(pageNo) {
|
|
document.searchForm.pageIndex.value = pageNo;
|
|
document.searchForm.action = "<c:url value='/map/request' />";
|
|
document.searchForm.submit();
|
|
}
|
|
|
|
</script>
|
|
</html>
|