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