[BO] 임가현황, 조사원현황 엑셀 다운로드 작업 중 (1)
This commit is contained in:
@@ -275,7 +275,7 @@
|
||||
<button type="button" class="btn" onclick="showExcelHouseholdModal();">
|
||||
<span class="btn-txt">엑셀 업로드 <i class="ico-download ico-small" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
<button type="button" class="btn">
|
||||
<button type="button" class="btn" onclick="goExcel();">
|
||||
<span class="btn-txt">엑셀 다운로드 <i class="ico-download ico-small" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
<!-- 관리자만 노출 -->
|
||||
@@ -484,6 +484,24 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// 엑셀 다운로드
|
||||
const goExcel = () => {
|
||||
const url = '/api/households/excel';
|
||||
const f = document.reqForm;
|
||||
const data = $(f).serializeObject();
|
||||
|
||||
// size 를 제거하면 전체 목록을 가져온다.
|
||||
delete data.size;
|
||||
|
||||
if (url !== '') {
|
||||
location.href = url + '?' + new URLSearchParams(data).toString();
|
||||
} else {
|
||||
console.warn('엑셀 다운르도 경로 없음.')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// 체크박스 전체 선택
|
||||
document.getElementById('checkedAll').addEventListener('change', function () {
|
||||
|
||||
@@ -436,11 +436,11 @@
|
||||
if (el.dataset.tabValue === 'tab1') {
|
||||
url = $('.tab-content .daily-record-list').is(':hidden') ? '/api/household/dailyRecordStatus/excel' : '/api/household/dailyRecordsStatus/excel';
|
||||
} else if (el.dataset.tabValue === 'tab2') {
|
||||
url = '';
|
||||
url = $('.tab-content .forest-product').is(':hidden') ? '' : '/api/household/forestProduct/excel';
|
||||
} else if (el.dataset.tabValue === 'tab3') {
|
||||
url = '';
|
||||
url = $('.tab-content .bank-auto-transfer').is(':hidden') ? '' : '/api/household/bankAutoTransfer/excel';
|
||||
} else if (el.dataset.tabValue === 'tab4') {
|
||||
url = '';
|
||||
url = $('.tab-content .household-visit').is(':hidden') ? '' : '/api/household/visitInfos/excel';
|
||||
}
|
||||
|
||||
console.log('goExcel', el.dataset.tabValue, url);
|
||||
|
||||
Reference in New Issue
Block a user