[BO] 임가현황 페이지 분리, [FO] 개인정보변경 타이틀 수정
This commit is contained in:
@@ -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>
|
||||
@@ -0,0 +1,642 @@
|
||||
<!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 daily-record" data-tab-value="tab1" >
|
||||
<!-- 일계부 등록 현황 리스트 -->
|
||||
<div class="daily-record-content daily-record-list">
|
||||
<div class="content-inner">
|
||||
<article class="summary-area">
|
||||
<ul>
|
||||
<li>
|
||||
<p>작성완료</p>
|
||||
<span><strong id="doneCount">6</strong>건</span>
|
||||
</li>
|
||||
<li>
|
||||
<p>미작성</p>
|
||||
<span><strong id="emptyCount">6</strong>건</span>
|
||||
</li>
|
||||
<li>
|
||||
<p>미완료</p>
|
||||
<span><strong id="incompleteCount">6</strong>건</span>
|
||||
</li>
|
||||
<li>
|
||||
<p>대기</p>
|
||||
<span><strong id="waitingCount">6</strong>건</span>
|
||||
</li>
|
||||
<li>
|
||||
<p>완료율</p>
|
||||
<span><strong id="progressPercent">56.12</strong>%</span>
|
||||
</li>
|
||||
</ul>
|
||||
</article>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>입력날짜</th>
|
||||
<th>완료상태</th>
|
||||
<th>수입</th>
|
||||
<th>노동투입</th>
|
||||
<th>지출</th>
|
||||
<th>동력사용시간</th>
|
||||
<th>임업 자가소비량</th>
|
||||
<th>농업 자가소비량</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 일계부 등록 현황 상세 -->
|
||||
<div class="daily-record-content daily-record-detail" style="display: none;">
|
||||
|
||||
<div class="content-inner">
|
||||
<!-- 수입 -->
|
||||
<section class="table-group">
|
||||
<div class="table-tit-group">
|
||||
<h3>수입 <strong>(<span id="incomeCount">0</span>건)</strong></h3>
|
||||
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">영수증 다운로드 <i class="ico-download" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">등록여부</span>
|
||||
</button>
|
||||
<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-income">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>외상판매</th>
|
||||
<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="workCount">0</span>건)</strong></h3>
|
||||
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">등록여부</span>
|
||||
</button>
|
||||
<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-work">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="7"></th>
|
||||
<th colspan="10">노동투입시간</th>
|
||||
<th colspan="1"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>품목명</th>
|
||||
<th>작업명</th>
|
||||
<th>작업 면적</th>
|
||||
<th>단위</th>
|
||||
<th>수확량</th>
|
||||
<th>단위</th>
|
||||
<th>경영주</th>
|
||||
<th>배우자</th>
|
||||
<th>가족노동(남)</th>
|
||||
<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="expenseCount">0</span>건)</strong></h3>
|
||||
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">영수증 다운로드 <i class="ico-download" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">등록여부</span>
|
||||
</button>
|
||||
<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-expense">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<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="powerCount">0</span>건)</strong></h3>
|
||||
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">등록여부</span>
|
||||
</button>
|
||||
<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-power">
|
||||
<thead>
|
||||
<tr>
|
||||
<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="forestryCount">0</span>건)</strong></h3>
|
||||
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">등록여부</span>
|
||||
</button>
|
||||
<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-forestry">
|
||||
<thead>
|
||||
<tr>
|
||||
<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="farmingCount">0</span>건)</strong></h3>
|
||||
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">등록여부</span>
|
||||
</button>
|
||||
<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-farming">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<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 getDailyRecords = () => {
|
||||
const f = document.reqForm;
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/dailyRecordsStatus',
|
||||
{
|
||||
householdSeq: f.householdSeq.value,
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
function(response) { // 성공
|
||||
console.log("일계부 현황 리스트 조회 : ", response);
|
||||
const listArea = $('.tab-content .daily-record-list');
|
||||
const detailArea = $('.tab-content .daily-record-detail');
|
||||
const tbody = listArea.find('tbody');
|
||||
|
||||
detailArea.hide();
|
||||
listArea.show();
|
||||
tbody.empty();
|
||||
|
||||
$('#doneCount').text(response.summary.doneCount);
|
||||
$('#emptyCount').text(response.summary.emptyCount);
|
||||
$('#incompleteCount').text(response.summary.incompleteCount);
|
||||
$('#waitingCount').text(response.summary.waitingCount);
|
||||
$('#progressPercent').text(response.summary.progressPercent);
|
||||
|
||||
let tmpl = '';
|
||||
$(response.dailyRecords).each((idx, item) => {
|
||||
tmpl +=
|
||||
`
|
||||
<tr>
|
||||
<td class="underline"><a href="javascript:void(0);" onclick="getDailyRecordsView(${item.id});">${item.dayGroup}</a></td>
|
||||
<td>
|
||||
<span class="tag ${statusInfoMap[item.allStatusType].className}">
|
||||
${statusInfoMap[item.allStatusType].label}
|
||||
</span>
|
||||
</td> <!-- 완료상태 -->
|
||||
<td>${item.incomeStatus}</td><!-- 수입 -->
|
||||
<td>${item.workStatus}</td><!-- 노동투입 -->
|
||||
<td>${item.expenseStatus}</td><!-- 지출 -->
|
||||
<td>${item.powerStatus}</td><!-- 동력사용시간 -->
|
||||
<td>${item.forestryStatus}</td><!-- 임업 자가소비량 -->
|
||||
<td>${item.farmingStatus}</td><!-- 농업 자가소비량 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
},
|
||||
function (code, rstData) { // 실패
|
||||
console.log("error : ", code);
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
// 임산물 등록 현황 상세
|
||||
const getDailyRecordsView = (id) => {
|
||||
if(id == null) {
|
||||
alert('등록 내역이 없습니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
const listArea = $('.tab-content .daily-record-list');
|
||||
const detailArea = $('.tab-content .daily-record-detail');
|
||||
|
||||
listArea.hide();
|
||||
detailArea.show();
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/dailyRecordStatus',
|
||||
{ recordSeq: id },
|
||||
function(response) { // 성공
|
||||
console.log("일계부 등록 상세 데이터 : ", response);
|
||||
gridIncomeTable(response.status.incomeStatus, response.incomes);
|
||||
gridWorkTable(response.status.workStatus, response.works);
|
||||
gridExpenseTable(response.status.expenseStatus, response.expenses);
|
||||
gridPowerTable(response.status.powerStatus, response.powers);
|
||||
gridForestryTable(response.status.forestryStatus, response.forestries);
|
||||
gridFarmingTable(response.status.farmingStatus, response.farmings);
|
||||
},
|
||||
function (code, rstData) { // 실패
|
||||
console.log("error : ", code);
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
// 수입 테이블 그리기
|
||||
const gridIncomeTable = (status, data) => {
|
||||
const tbody = $('#table-income tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#incomeCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noDataDaily(tbody, status, 10);
|
||||
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>${item.isCredit ? "Y" : "N"}</td> <!-- 외상판매 -->
|
||||
<td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 -->
|
||||
<td class="underline">${ifNullHyphen(item.incomeKind)}</td><!-- 수입의 종류 -->
|
||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
|
||||
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
|
||||
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
|
||||
// 임업노동 테이블 그리기
|
||||
const gridWorkTable = (status, data) => {
|
||||
const tbody = $('#table-work tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#workCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noDataDaily(tbody, status, 18);
|
||||
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.itemName)}</td><!-- 품목명 -->
|
||||
<td>${ifNullHyphen(item.workName)}</td><!-- 작업명 -->
|
||||
<td class="align-right">${ifNullHyphen(item.workLandArea)}</td><!-- 작업면적 -->
|
||||
<td>${ifNullHyphen(item.areaUnitText)}</td><!-- 작업면적 단위 -->
|
||||
<td class="align-right">${ifNullHyphen(item.harvestQuantity)}</td><!-- 수확량 -->
|
||||
<td>${ifNullHyphen(item.harvestUnitText)}</td><!-- 수확량 단위 -->
|
||||
<td>${ifNullHyphen(item.ownerTime)}</td><!-- 경영주 시간 -->
|
||||
<td>${ifNullHyphen(item.spouseTime)}</td><!-- 배우자 시간 -->
|
||||
<td>${ifNullHyphen(item.familyMHours)}</td><!-- 가족노동(남) -->
|
||||
<td>${ifNullHyphen(item.familyFHours)}</td><!-- 가족노동(여) -->
|
||||
<td>${ifNullHyphen(item.hiredMHours)}</td><!-- 고용노동(남) -->
|
||||
<td>${ifNullHyphen(item.hiredFHours)}</td><!-- 고용노동(여) -->
|
||||
<td>${ifNullHyphen(item.sharedMHours)}</td><!-- 품앗이(남) -->
|
||||
<td>${ifNullHyphen(item.sharedFHours)}</td><!-- 품앗이(여) -->
|
||||
<td>${ifNullHyphen(item.volunteerMHours)}</td><!-- 일손돕기(남) -->
|
||||
<td>${ifNullHyphen(item.volunteerFHours)}</td><!-- 일손돕기(여) -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
|
||||
// 지출 테이블 그리기
|
||||
const gridExpenseTable = (status, data) => {
|
||||
const tbody = $('#table-expense tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#expenseCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noDataDaily(tbody, status, 9);
|
||||
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>${item.isCredit ? "Y" : "N"}</td> <!-- 외상 또는 카드구입 -->
|
||||
<td class="underline">${ifNullHyphen(item.expenseKind)}</td><!-- 지출의 종류 -->
|
||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 용도 -->
|
||||
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
|
||||
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
|
||||
// 동력사용시간 테이블 그리기
|
||||
const gridPowerTable = (status, data) => {
|
||||
const tbody = $('#table-power tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#powerCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noDataDaily(tbody, status, 5);
|
||||
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.equipmentName)}</td> <!-- 명칭 -->
|
||||
<td>${ifNullHyphen(item.ownedHours)}</td><!-- 자가 사용시간 -->
|
||||
<td>${ifNullHyphen(item.leasedHours)}</td><!-- 임가 사용시간 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
|
||||
// 자가임업 테이블 그리기
|
||||
const gridForestryTable = (status, data) => {
|
||||
const tbody = $('#table-forestry tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#forestryCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noDataDaily(tbody, status, 7);
|
||||
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.productName)}</td> <!-- 생산물 -->
|
||||
<td>${ifNullHyphen(item.usage)}</td><!-- 용도 -->
|
||||
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
|
||||
// 자가농업 테이블 그리기
|
||||
const gridFarmingTable = (status, data) => {
|
||||
const tbody = $('#table-farming tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#farmingCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noDataDaily(tbody, status, 7);
|
||||
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.productName)}</td> <!-- 생산물 -->
|
||||
<td>${ifNullHyphen(item.usage)}</td><!-- 용도 -->
|
||||
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,121 @@
|
||||
<!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 forest-product" data-tab-value="tab2">
|
||||
<div class="content-inner">
|
||||
<section class="table-group">
|
||||
<div class="table-tit-group">
|
||||
<h3></h3>
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">등록여부</span>
|
||||
</button>
|
||||
<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="forest-product">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="7"></th>
|
||||
<th colspan="4">주생산물</th>
|
||||
<th colspan="4">부생산물</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>지번</th>
|
||||
<th>지목</th>
|
||||
<th>읍면동</th>
|
||||
<th>가능면적(평)</th>
|
||||
<th>재배작물명</th>
|
||||
<th>면적(평)</th>
|
||||
<th>수확량</th>
|
||||
<th>단위</th>
|
||||
<th>판매량</th>
|
||||
<th>단위</th>
|
||||
<th>수확량</th>
|
||||
<th>단위</th>
|
||||
<th>판매량</th>
|
||||
<th>단위</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script th:inline="javascript">
|
||||
// 임산물 현황 탭 조회
|
||||
const getForestProductsStatus = () => {
|
||||
const f = document.reqForm;
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/forestProducts',
|
||||
{
|
||||
householdSeq: f.householdSeq.value,
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
(response) => { // 성공
|
||||
console.log("임산물 현황 리스트 조회 : ", response);
|
||||
const tbody = $('.tab-content.forest-product tbody');
|
||||
|
||||
tbody.empty();
|
||||
|
||||
if(response.forestProducts.length === 0) {
|
||||
noDataMonthly(tbody, response.status, 15);
|
||||
return;
|
||||
}
|
||||
|
||||
let tmpl = '';
|
||||
$(response.forestProducts).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.streetNum)}</td> <!-- 지번 -->
|
||||
<td>${ifNullHyphen(item.landType)}</td><!-- 지목 -->
|
||||
<td>${ifNullHyphen(item.town)}</td><!-- 읍면동 -->
|
||||
<td>${ifNullHyphen(item.availableArea)}</td><!-- 가능면적(평) -->
|
||||
<td>${ifNullHyphen(item.cropName)}</td><!-- 재배작물명 -->
|
||||
<td>${ifNullHyphen(item.landArea)}</td><!-- 면적(평) -->
|
||||
<td class="align-right">${ifNullHyphen(item.mainYield)}</td><!-- 주생산물 수확량 -->
|
||||
<td>${ifNullHyphen(item.mainYieldUnitText)}</td><!-- 주생산물 수확량 단위 -->
|
||||
<td class="align-right">${ifNullHyphen(item.mainSaleAmount)}</td><!-- 주생산물 판매량 -->
|
||||
<td>${ifNullHyphen(item.mainSaleAmountUnitText)}</td><!-- 주생산물 판매량 단위 -->
|
||||
<td class="align-right">${ifNullHyphen(item.subYield)}</td><!-- 부생산물 수확량 -->
|
||||
<td>${ifNullHyphen(item.subYieldUnitText)}</td><!-- 부생산물 수확량 단위 -->
|
||||
<td class="align-right">${ifNullHyphen(item.subSaleAmount)}</td><!-- 부생산물 판매량 -->
|
||||
<td>${ifNullHyphen(item.subSaleAmountUnitText)}</td><!-- 부생산물 판매량 단위 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
},
|
||||
function (code, rstData) { // 실패
|
||||
console.log("error : ", code);
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,98 @@
|
||||
<!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 household-visit" data-tab-value="tab4">
|
||||
<div class="content-inner">
|
||||
<section class="table-group">
|
||||
<div class="table-tit-group">
|
||||
<h3></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" onclick="showVisitInfoModal();">
|
||||
<span class="btn-txt">추가</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="household-visit">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>방문일</th>
|
||||
<th>관리분야</th>
|
||||
<th>내용</th>
|
||||
<th>최종 수정자</th>
|
||||
<th>답례품 전달</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script th:inline="javascript">
|
||||
// 임가방문정보 조회
|
||||
const getVisitInfo = () => {
|
||||
const f = document.reqForm;
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/visitInfos',
|
||||
{
|
||||
householdSeq: f.householdSeq.value,
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
(response) => { // 성공
|
||||
console.log("임가 방문정보 조회 : ", response);
|
||||
const tbody = $('.tab-content.household-visit tbody');
|
||||
|
||||
tbody.empty();
|
||||
|
||||
if(response.length === 0) {
|
||||
tbody.append(`<tr><td colspan="6" style="text-align: center;">등록이 필요합니다.</td></tr>`);
|
||||
return;
|
||||
}
|
||||
|
||||
let tmpl = '';
|
||||
$(response).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.visitDate)}</td> <!-- 방문일 -->
|
||||
<td>${ifNullHyphen(managementType[item.managementType])}</td> <!-- 관리분야 -->
|
||||
<td class="underline"><a href="javascript:void(0);" onclick="showVisitInfoModal(${item.id});">${ifNullHyphen(item.content)}</a></td> <!-- 내용 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
<td>${item.isGiftSent ? "전달 완료" : "미전달"}</td> <!-- 답례품 전달 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
},
|
||||
function (code, rstData) { // 실패
|
||||
console.log("error : ", code);
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
1303
admin/src/main/resources/templates/households/{seq}-2.html
Normal file
1303
admin/src/main/resources/templates/households/{seq}-2.html
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user