수수료 조회 UX 변경
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
</span>
|
||||
</span>
|
||||
<span class="btnBox">
|
||||
<span id="searchedPeriod" class="searched-period" style="display:none; margin-right:10px; font-weight:bold; color:#28a745;"></span>
|
||||
<button type="button" class="btn btn-primary" onclick="loadData()">
|
||||
<span class="fa fa-search"></span><span>조회</span>
|
||||
</button>
|
||||
@@ -186,9 +187,11 @@
|
||||
|
||||
<th:block layout:fragment="contentScript">
|
||||
<script th:inline="javascript">
|
||||
// 페이지 로드 시 초기화
|
||||
// 페이지 로드 시 초기화 및 자동 조회
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
initializeDateSelects();
|
||||
// 페이지 로딩 후 자동 조회
|
||||
loadData();
|
||||
});
|
||||
|
||||
function initializeDateSelects() {
|
||||
@@ -221,6 +224,17 @@
|
||||
monthSelect.value = lastMonth.toString();
|
||||
}
|
||||
|
||||
function showSearchedPeriod(year, month) {
|
||||
const searchedPeriodEl = document.getElementById('searchedPeriod');
|
||||
searchedPeriodEl.textContent = year + '년 ' + month + '월 조회완료';
|
||||
searchedPeriodEl.style.display = 'inline';
|
||||
}
|
||||
|
||||
function hideSearchedPeriod() {
|
||||
const searchedPeriodEl = document.getElementById('searchedPeriod');
|
||||
searchedPeriodEl.style.display = 'none';
|
||||
}
|
||||
|
||||
function formatNumber(num) {
|
||||
return new Intl.NumberFormat('ko-KR').format(num);
|
||||
}
|
||||
@@ -259,6 +273,7 @@
|
||||
.then(data => renderCommissionData(data, year, month))
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
hideSearchedPeriod();
|
||||
customPopups.showAlert(error.message || '데이터 조회 중 오류가 발생했습니다.');
|
||||
});
|
||||
|
||||
@@ -420,6 +435,9 @@
|
||||
|
||||
// 출력 버튼 표시
|
||||
document.getElementById('printBtn').style.display = 'inline-block';
|
||||
|
||||
// 조회 기간 표시
|
||||
showSearchedPeriod(year, month);
|
||||
}
|
||||
|
||||
function printCommission() {
|
||||
|
||||
Reference in New Issue
Block a user