[BO] 임가 현황 - 임가 상세 작업 중 (6)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<input name="userRegionMainCode" th:value="${userRegionMainCode}" type="hidden"/>
|
||||
|
||||
<div class="content-inner">
|
||||
<!-- 필터 영역 -->
|
||||
<!-- 필터 영역 -->5241
|
||||
<section class="filter-wrap">
|
||||
<div class="form-area">
|
||||
<!-- 연/월 -->
|
||||
@@ -340,14 +340,14 @@
|
||||
<td>${ct.regionMainName}</td><!-- 실사 -->
|
||||
<td>${ct.regionSubName}</td><!-- 지역 -->
|
||||
<td>${ct.regionDetailName}</td><!-- 세부지역 -->
|
||||
<td>${isEmpty(ct.industryLargeName)}</td><!-- 업종 대분류 -->
|
||||
<td>${isEmpty(ct.industryMiddleName)}</td><!-- 업종 중분류1 -->
|
||||
<td>${ifNullDash(ct.industryLargeName)}</td><!-- 업종 대분류 -->
|
||||
<td>${ifNullDash(ct.industryMiddleName)}</td><!-- 업종 중분류1 -->
|
||||
<td>${ct.progressPercent}%</td><!-- 임가 진행 상황 -->
|
||||
<td>${isEmpty(ct.firstVisitDate)}</td><!-- 1차방문날짜 -->
|
||||
<td>${isEmpty(ct.secondVisitDate)}</td><!-- 2차방문날짜 -->
|
||||
<td>${ifNullDash(ct.firstVisitDate)}</td><!-- 1차방문날짜 -->
|
||||
<td>${ifNullDash(ct.secondVisitDate)}</td><!-- 2차방문날짜 -->
|
||||
<td>${ct.isGiftSent ? "전달" : "미전달"}</td> <!-- 답례품 -->
|
||||
<td class="hide-role-researcher">${isEmpty(ct.researcherName)}</td> <!-- 조사원이름 -->
|
||||
<td class="hide-role-researcher">${isEmpty(ct.researcherPhone)}</td> <!-- 조사원번호 -->
|
||||
<td class="hide-role-researcher">${ifNullDash(ct.researcherName)}</td> <!-- 조사원이름 -->
|
||||
<td class="hide-role-researcher">${ifNullDash(ct.researcherPhone)}</td> <!-- 조사원번호 -->
|
||||
</tr>
|
||||
`
|
||||
);
|
||||
@@ -398,13 +398,6 @@
|
||||
f.submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// TODO : 이거 공통으로 뺄지 ?
|
||||
function isEmpty(value, fallback = '-') {
|
||||
return value !== null && value !== undefined && value !== '' ? value : fallback;
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
|
||||
</html>
|
||||
@@ -130,14 +130,31 @@
|
||||
<div class="tab-content daily-record" data-tab-value="tab1">
|
||||
<!-- 일계부 등록 현황 리스트 -->
|
||||
<div class="daily-record-content daily-record-list">
|
||||
<div>
|
||||
<span>작성완료: <span id="doneCount">0</span></span>
|
||||
<span>미작성: <span id="emptyCount">0</span></span>
|
||||
<span>미완료: <span id="incompleteCount">0</span></span>
|
||||
<span>대기: <span id="waitingCount">0</span></span>
|
||||
<span> 현황: <span id="progressPercent">0</span>%</span>
|
||||
</div>
|
||||
<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>
|
||||
@@ -148,7 +165,7 @@
|
||||
<th>지출</th>
|
||||
<th>동력사용시간</th>
|
||||
<th>임업 자가소비량</th>
|
||||
<!-- <th>농업 자가소비량</th>-->
|
||||
<th>농업 자가소비량</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -160,109 +177,248 @@
|
||||
|
||||
<!-- 일계부 등록 현황 상세 -->
|
||||
<div class="daily-record-content daily-record-detail" style="display: none;">
|
||||
|
||||
<div class="content-inner">
|
||||
<table id="table-income">
|
||||
<thead>
|
||||
<!-- 수입 -->
|
||||
<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">
|
||||
<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 colspan="10">수입 (<span id="incomeCount">0</span>건)</th>
|
||||
<th>선택</th>
|
||||
<th>외상판매</th>
|
||||
<th>재배형태</th>
|
||||
<th>수입의 종류</th>
|
||||
<th>수입원</th>
|
||||
<th>수량</th>
|
||||
<th>단위</th>
|
||||
<th>현금(원)</th>
|
||||
<th>현물평가액</th>
|
||||
<th>최종 수정자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<!-- <tr>-->
|
||||
<!-- <th colspan="10">수입</th>-->
|
||||
<!-- </tr>-->
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>외상판매</th>
|
||||
<th>재배형태</th>
|
||||
<th>수입의 종류</th>
|
||||
<th>수입원</th>
|
||||
<th>수량</th>
|
||||
<th>단위</th>
|
||||
<th>현금(원)</th>
|
||||
<th>현물평가액</th>
|
||||
<th>최종 수정자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<!-- 지출 -->
|
||||
<div class="content-inner">
|
||||
<table id="table-expense">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="9">지출 (<span id="expenseCount">0</span>건)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>외상 또는 카드구입</th>
|
||||
<th>지출의 종류</th>
|
||||
<th>용도</th>
|
||||
<th>수량</th>
|
||||
<th>단위</th>
|
||||
<th>현금(원)</th>
|
||||
<th>현물평가액</th>
|
||||
<th>최종 수정자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 임업노동 투입 내역 -->
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<!-- 동력사용시간 -->
|
||||
<div class="content-inner">
|
||||
<table id="table-power">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5">동력사용시간 (<span id="powerCount">0</span>건)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>명칭</th>
|
||||
<th>자가 사용시간</th>
|
||||
<th>임가 사용시간</th>
|
||||
<th>최종 수정자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 지출 -->
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<!-- 자가임업 -->
|
||||
<div class="content-inner">
|
||||
<table id="table-forestry">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="7">자가임업 생산물 중 자가소비량 (<span id="forestryCount">0</span>건)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>생산물</th>
|
||||
<th>용도</th>
|
||||
<th>수량</th>
|
||||
<th>단위</th>
|
||||
<th>현물평가액</th>
|
||||
<th>최종 수정자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 동력사용시간 -->
|
||||
<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">
|
||||
<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>
|
||||
</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">
|
||||
<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">
|
||||
<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>
|
||||
@@ -413,7 +569,7 @@
|
||||
<td>${item.expenseStatus}</td><!-- 지출 -->
|
||||
<td>${item.powerStatus}</td><!-- 동력사용시간 -->
|
||||
<td>${item.forestryStatus}</td><!-- 임업 자가소비량 -->
|
||||
<!-- <td>${item.forestryStatus}</td><!– 농업 자가소비량 –>-->
|
||||
<td>${item.farmingStatus}</td><!-- 농업 자가소비량 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@@ -444,17 +600,15 @@
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/dailyRecordStatus',
|
||||
{
|
||||
householdSeq: f.householdSeq.value,
|
||||
recordSeq: id,
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
{ recordSeq: id },
|
||||
function(response) { // 성공
|
||||
console.log("일계부 등록 상세 데이터~ : ", response);
|
||||
gridIncomeTable(response.incomes);
|
||||
gridExpenseTable(response.expenses);
|
||||
gridPowerTable(response.powers);
|
||||
gridForestryTable(response.forestries);
|
||||
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);
|
||||
@@ -465,13 +619,13 @@
|
||||
}
|
||||
|
||||
// 수입 테이블 그리기
|
||||
const gridIncomeTable = (data) => {
|
||||
const gridIncomeTable = (status, data) => {
|
||||
const tbody = $('#table-income tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#incomeCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noData(tbody, 10);
|
||||
noData(tbody, status, 10);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -487,15 +641,68 @@
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>외상판매</td> <!-- 외상판매 -->
|
||||
<td>재배형태</td><!-- 재배형태 -->
|
||||
<td>수입의 종류</td><!-- 수입의 종류 -->
|
||||
<td>수입원</td><!-- 수입원 -->
|
||||
<td>수량</td><!-- 수량 -->
|
||||
<td>단위</td><!-- 단위 -->
|
||||
<td>현금(원)</td><!-- 현금(원) -->
|
||||
<td>현물평가액</td><!-- 현물평가액 -->
|
||||
<td>최종 수정자</td><!-- 최종 수정자 -->
|
||||
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상판매 -->
|
||||
<td>${ifNullDash(item.cropText)}</td><!-- 재배형태 -->
|
||||
<!-- TODO(ks) : 수입의 종류 코드형태로 들어오고 있음, 텍스트형태로 바뀌는 건지 체크!! -->
|
||||
<td class="underline">${ifNullDash(item.categorySelf)}</td><!-- 수입의 종류 -->
|
||||
<td>${ifNullDash(item.sourcePurpose)}</td><!-- 수입원 -->
|
||||
<td class="align-right">${ifNullDash(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullDash(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${ifNullDash(item.price)}</td><!-- 현금(원) -->
|
||||
<td class="align-right">${ifNullDash(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) {
|
||||
noData(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>${ifNullDash(item.itemCode)}</td><!-- 품목명 -->
|
||||
<td>${ifNullDash(item.workCode)}</td><!-- 작업명 -->
|
||||
<td>${ifNullDash(item.workLandArea)}</td><!-- 작업 면적 -->
|
||||
<td>${ifNullDash(item.harvestQuantity)}</td><!-- 수확량 -->
|
||||
<td>${ifNullDash(item.cropText)}</td><!-- 단위 -->
|
||||
<td>${ifNullDash(item.ownerTime)}</td><!-- 경영주 시간 -->
|
||||
<td>${ifNullDash(item.spouseTime)}</td><!-- 배우자 시간 -->
|
||||
<td>${ifNullDash(item.familyMHours)}</td><!-- 가족노동(남) -->
|
||||
<td>${ifNullDash(item.familyFHours)}</td><!-- 가족노동(여) -->
|
||||
<td>${ifNullDash(item.hiredMHours)}</td><!-- 고용노동(남) -->
|
||||
<td>${ifNullDash(item.hiredFHours)}</td><!-- 고용노동(여) -->
|
||||
<td>${ifNullDash(item.sharedMHours)}</td><!-- 품앗이(남) -->
|
||||
<td>${ifNullDash(item.sharedFHours)}</td><!-- 품앗이(여) -->
|
||||
<td>${ifNullDash(item.volunteerMHours)}</td><!-- 일손돕기(남) -->
|
||||
<td>${ifNullDash(item.volunteerFHours)}</td><!-- 일손돕기(여) -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@@ -504,13 +711,13 @@
|
||||
}
|
||||
|
||||
// 지출 테이블 그리기
|
||||
const gridExpenseTable = (data) => {
|
||||
const gridExpenseTable = (status, data) => {
|
||||
const tbody = $('#table-expense tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#expenseCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noData(tbody, 9);
|
||||
noData(tbody, status, 9);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -526,14 +733,18 @@
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>외상 또는 카드구입</td> <!-- 외상 또는 카드구입 -->
|
||||
<td>지출의 종류</td><!-- 지출의 종류 -->
|
||||
<td>용도</td><!-- 용도 -->
|
||||
<td>수량</td><!-- 수량 -->
|
||||
<td>단위</td><!-- 단위 -->
|
||||
<td>현금(원)</td><!-- 현금(원) -->
|
||||
<td>현물평가액</td><!-- 현물평가액 -->
|
||||
<td>최종 수정자</td><!-- 최종 수정자 -->
|
||||
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상 또는 카드구입 -->
|
||||
<!-- TODO(ks) : 지출의 종류 코드형태로 들어오고 있음, 텍스트형태로 바뀌는 건지 체크!! -->
|
||||
<td>${ifNullDash(item.categorySelf)}</td><!-- 지출의 종류 -->
|
||||
<td>${ifNullDash(item.sourcePurpose)}</td><!-- 용도 -->
|
||||
<td>${ifNullDash(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullDash(item.unitText)}</td><!-- 단위 -->
|
||||
<td>${ifNullDash(item.price)}</td><!-- 현금(원) -->
|
||||
<td>${ifNullDash(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@@ -542,13 +753,13 @@
|
||||
}
|
||||
|
||||
// 동력사용시간 테이블 그리기
|
||||
const gridPowerTable = (data) => {
|
||||
const gridPowerTable = (status, data) => {
|
||||
const tbody = $('#table-power tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#powerCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noData(tbody, 5);
|
||||
noData(tbody, status, 5);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -564,10 +775,13 @@
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>명칭</td> <!-- 명칭 -->
|
||||
<td>자가 사용시간</td><!-- 자가 사용시간 -->
|
||||
<td>임가 사용시간</td><!-- 임가 사용시간 -->
|
||||
<td>최종 수정자</td><!-- 최종 수정자 -->
|
||||
<td>${ifNullDash(item.equipmentName)}</td> <!-- 명칭 -->
|
||||
<td>${ifNullDash(item.ownedHours)}</td><!-- 자가 사용시간 -->
|
||||
<td>${ifNullDash(item.leasedHours)}</td><!-- 임가 사용시간 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@@ -576,13 +790,13 @@
|
||||
}
|
||||
|
||||
// 자가임업 테이블 그리기
|
||||
const gridForestryTable = (data) => {
|
||||
const gridForestryTable = (status, data) => {
|
||||
const tbody = $('#table-forestry tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#forestryCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noData(tbody, 7);
|
||||
noData(tbody, status, 7);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -598,12 +812,15 @@
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>생산물</td> <!-- 생산물 -->
|
||||
<td>용도</td><!-- 용도 -->
|
||||
<td>수량</td><!-- 수량 -->
|
||||
<td>단위</td><!-- 단위 -->
|
||||
<td>현물평가액</td><!-- 현물평가액 -->
|
||||
<td>최종 수정자</td><!-- 최종 수정자 -->
|
||||
<td>${ifNullDash(item.productName)}</td> <!-- 생산물 -->
|
||||
<td>${ifNullDash(item.usage)}</td><!-- 용도 -->
|
||||
<td>${ifNullDash(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullDash(item.unitText)}</td><!-- 단위 -->
|
||||
<td>${ifNullDash(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@@ -611,8 +828,50 @@
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
|
||||
const noData = (target, length) => {
|
||||
$(target).append(`<tr><td colspan="${length}" style="text-align: center;">등록없음</td></tr>`);
|
||||
// 자가농업 테이블 그리기
|
||||
const gridFarmingTable = (status, data) => {
|
||||
const tbody = $('#table-farming tbody');
|
||||
tbody.empty();
|
||||
|
||||
$('#farmingCount').text(data.length);
|
||||
if(data.length === 0) {
|
||||
noData(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>${ifNullDash(item.productName)}</td> <!-- 생산물 -->
|
||||
<td>${ifNullDash(item.usage)}</td><!-- 용도 -->
|
||||
<td>${ifNullDash(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullDash(item.unitText)}</td><!-- 단위 -->
|
||||
<td>${ifNullDash(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
(${item.updatedAt})
|
||||
</td><!-- 최종 수정자 -->
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
|
||||
// nodata 처리
|
||||
const noData = (target, status, length) => {
|
||||
const noDataText = status === 'TARGET' ? '등록이 필요합니다.' : '등록없음';
|
||||
|
||||
$(target).append(`<tr><td colspan="${length}" style="text-align: center;">${noDataText}</td></tr>`);
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user