[BO] 임가현황 페이지 분리, [FO] 개인정보변경 타이틀 수정

This commit is contained in:
kangsunlee
2025-06-24 15:01:33 +09:00
parent 308833007e
commit 9966d222ca
7 changed files with 2348 additions and 1009 deletions

View File

@@ -0,0 +1,175 @@
<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
layout:decorate="~{layout/layout}">
<div class="layer-wrap" th:fragment="tabFragment">
<div class="tab-content bank-auto-transfer" data-tab-value="tab3">
<div class="content-inner">
<div class="content-inner">
<!-- 수입 -->
<section class="table-group">
<div class="table-tit-group">
<h3>수입 <strong>(<span id="bankIncomeCount">0</span>건)</strong></h3>
<div class="component-btns bottom-btn-group">
<div class="btns-row align-right">
<button type="button" class="btn small btn-secondary">
<span class=" btn-txt">삭제</span>
</button>
<button type="button" class="btn small btn-primary">
<span class="btn-txt">추가</span>
</button>
</div>
</div>
</div>
<table id="table-bank-income">
<thead>
<tr>
<th>선택</th>
<th>재배형태</th>
<th>수입의 종류</th>
<th>대상</th>
<th>수입원</th>
<th>수량</th>
<th>단위</th>
<th>현금(원)</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</section>
<!-- 지출 -->
<section class="table-group">
<div class="table-tit-group">
<h3>지출 <strong>(<span id="bankExpenseCount">0</span>건)</strong></h3>
<div class="component-btns bottom-btn-group">
<div class="btns-row align-right">
<button type="button" class="btn small btn-secondary">
<span class=" btn-txt">삭제</span>
</button>
<button type="button" class="btn small btn-primary">
<span class="btn-txt">추가</span>
</button>
</div>
</div>
</div>
<table id="table-bank-expense">
<thead>
<tr>
<th>선택</th>
<th>지출의 종류</th>
<th>용도</th>
<th>수량</th>
<th>단위</th>
<th>현금(원)</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</section>
</div>
</div>
</div>
<script th:inline="javascript">
// 은행자동이체내역 조회
const getBankAutoTransfer = () => {
const f = document.reqForm;
ajaxUtil._ajaxMethod(
'/api/household/bankAutoTransfer',
{
householdSeq: f.householdSeq.value,
recordMonth: f.recordMonth.value
},
(response) => { // 성공
console.log("은행자동이체내역 조회 : ", response);
gridBankIncomeTable(response.incomes);
gridBankExpenseTable(response.expenses);
},
function (code, rstData) { // 실패
console.log("error : ", code);
},
'get',
'json'
);
}
// 은행자동이체내역 수입 테이블 그리기
const gridBankIncomeTable = (data) => {
const tbody = $('#table-bank-income tbody');
tbody.empty();
$('#bankIncomeCount').text(data.length);
if(data.length === 0) {
tbody.append(`<tr><td colspan="8" style="text-align: center;">등록된 내용이 없습니다.</td></tr>`);
return;
}
let tmpl = '';
$(data).each((idx, item) => {
tmpl +=
`
<tr>
<td>
<div class="component-input">
<label class="checkbox-inner">
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}">
</label>
</div>
</td>
<td>${ifNullHyphen(item.cropText)}</td> <!-- 재배형태 -->
<td class="underline">${ifNullHyphen(item.categoryText)}</td> <!-- 수입의 종류 -->
<td>${ifNullHyphen(item.target)}</td><!-- 대상 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
<td class="align-right">${ifNullHyphen(item.count)}</td><!-- 수량 -->
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
</tr>
`;
});
tbody.append(tmpl);
}
// 은행자동이체내역 수출 테이블 그리기
const gridBankExpenseTable = (data) => {
const tbody = $('#table-bank-expense tbody');
tbody.empty();
$('#bankExpenseCount').text(data.length);
if(data.length === 0) {
tbody.append(`<tr><td colspan="6" style="text-align: center;">등록된 내용이 없습니다.</td></tr>`);
return;
}
let tmpl = '';
$(data).each((idx, item) => {
tmpl +=
`
<tr>
<td>
<div class="component-input">
<label class="checkbox-inner">
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}">
</label>
</div>
</td>
<td class="underline">${ifNullHyphen(item.categoryText)}</td> <!-- 지출의 종류 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 용도 -->
<td class="align-right">${ifNullHyphen(item.count)}</td><!-- 수량 -->
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
</tr>
`;
});
tbody.append(tmpl);
}
</script>
</div>
</html>