@@ -19,6 +19,14 @@
|
||||
#gbox_grid .ui-jqgrid-ftable tr.footrow td {
|
||||
height: 26px;
|
||||
}
|
||||
.cssbtn.small {
|
||||
height: 24px;
|
||||
border-radius: 2px;
|
||||
min-width: 24px;
|
||||
box-shadow: none;
|
||||
border-color: #ebebec;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
<script language="javascript">
|
||||
var url = '<c:url value="/onl/kjb/statistics/apiUseStatsMan.json"/>';
|
||||
@@ -90,6 +98,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 조회기간을 시작일 기준 이전/다음 달의 1일~말일로 변경 후 조회 (direction: -1 이전달, 1 다음달)
|
||||
function shiftMonthRange(direction) {
|
||||
var v = $("input[name=searchStartDate]").val().replace(/-/g, "");
|
||||
if (!v || v.length < 6) return;
|
||||
|
||||
var year = parseInt(v.substring(0, 4));
|
||||
var month = parseInt(v.substring(4, 6)) - 1; // 0-based
|
||||
|
||||
var first = new Date(year, month + direction, 1);
|
||||
var last = new Date(year, month + direction + 1, 0); // 해당 달의 말일
|
||||
|
||||
function pad(n) { return String(n).padStart(2, '0'); }
|
||||
function fmt(d) {
|
||||
return d.getFullYear() + '' + pad(d.getMonth() + 1) + pad(d.getDate());
|
||||
}
|
||||
|
||||
$("input[name=searchStartDate]").val(fmt(first));
|
||||
$("input[name=searchEndDate]").val(fmt(last));
|
||||
|
||||
search();
|
||||
}
|
||||
|
||||
function exportToExcel() {
|
||||
|
||||
var postData = getPostData("cmd", "EXCEL_EXPORT");
|
||||
@@ -278,6 +308,14 @@
|
||||
search();
|
||||
});
|
||||
|
||||
$("#btnPrevMonth").click(function() {
|
||||
shiftMonthRange(-1);
|
||||
});
|
||||
|
||||
$("#btnNextMonth").click(function() {
|
||||
shiftMonthRange(1);
|
||||
});
|
||||
|
||||
$("input[name=searchType]").click(function() {
|
||||
search();
|
||||
});
|
||||
@@ -320,6 +358,8 @@
|
||||
<input type="text" name="searchStartDate" id="searchStartDate" value="${param.searchStartDate}" style="width:100px;">
|
||||
~
|
||||
<input type="text" name="searchEndDate" id="searchEndDate" value="${param.searchEndDate}" style="width:100px;">
|
||||
<button type="button" id="btnPrevMonth" class="cssbtn small"><</button>
|
||||
<button type="button" id="btnNextMonth" class="cssbtn small">></button>
|
||||
<span style="color:#888; font-size:12px; margin-left:10px;">(최대 31일)</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user