1304 lines
66 KiB
HTML
1304 lines
66 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
|
|
layout:decorate="~{layout/layout}">
|
|
|
|
<section layout:fragment="content">
|
|
<form autocomplete="off" method="get" name="reqForm">
|
|
<input type="hidden" name="householdSeq" th:value="${seq}">
|
|
|
|
<div class="content-inner">
|
|
<section>
|
|
<table class="type-form confirm">
|
|
<tbody>
|
|
<tr>
|
|
<th>임가번호</th>
|
|
<td>
|
|
<span th:text="${householdInfo.householdNum}">16750</span>
|
|
</td>
|
|
<th>경영주</th>
|
|
<td>
|
|
<span th:text="${householdInfo.householdName}">홍길동</span>
|
|
</td>
|
|
<th>연령</th>
|
|
<td>
|
|
<span th:text="${householdInfo.householdAge}">75</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>가구 연락처</th>
|
|
<td>
|
|
<span
|
|
th:text="${householdInfo.householdTel != null && householdInfo.householdTel != '' ? householdInfo.householdTel : '-'}">031-0000-0000</span>
|
|
</td>
|
|
<th>휴대폰 번호</th>
|
|
<td>
|
|
<span th:text="${householdInfo.householdPhone}">010-0000-0000</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>실사</th>
|
|
<td>
|
|
<span th:text="${householdInfo.regionMainName}">서울</span>
|
|
</td>
|
|
<th>지역</th>
|
|
<td>
|
|
<span th:text="${householdInfo.regionSubName}">31.경기도</span>
|
|
</td>
|
|
<th>세부 지역</th>
|
|
<td>
|
|
<span th:text="${householdInfo.regionDetailName}">9.경기</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>전체 주소</th>
|
|
<td>
|
|
<span th:text="${householdInfo.address}">경기도 성남시 분당구 산성대로 OOOO</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>업종 대분류</th>
|
|
<td>
|
|
<span
|
|
th:text="${householdInfo.industryLargeName != null && householdInfo.industryLargeName != '' ? householdInfo.industryLargeName : '-'}">40. 수실류재배업</span>
|
|
</td>
|
|
<th>업종 중분류1</th>
|
|
<td>
|
|
<span
|
|
th:text="${householdInfo.industryMiddleName != null && householdInfo.industryMiddleName != '' ? householdInfo.industryMiddleName : '-'}">42. 대추재배업</span>
|
|
</td>
|
|
<th>업종 중분류2</th>
|
|
<td>
|
|
<span
|
|
th:text="${householdInfo.industrySubMiddleName != null && householdInfo.industrySubMiddleName != '' ? householdInfo.industrySubMiddleName : '-'}">52_1. 조경수</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>규모/세부품목</th>
|
|
<td>
|
|
<span
|
|
th:text="${householdInfo.industryDetailName != null && householdInfo.industryDetailName != '' ? householdInfo.industryDetailName : '-'}">52_1_1. 조경수</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>담당 조사원</th>
|
|
<td>
|
|
<span
|
|
th:text="${householdInfo.researcherName != null && householdInfo.researcherName != '' ? householdInfo.researcherName : '-'}">김조사</span>
|
|
</td>
|
|
<th>담당조사원 연락처</th>
|
|
<td>
|
|
<span
|
|
th:text="${householdInfo.researcherPhone != null && householdInfo.researcherPhone != '' ? householdInfo.researcherPhone : '-'}">010-0000-0000</span>
|
|
</td>
|
|
<th>유지여부</th>
|
|
<td class="radio-group">
|
|
<span th:text="${householdInfo.isPanel ? '1. 유지' : '2. 탈락'}">1.유지</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>비고</th>
|
|
<td class="radio-group">
|
|
<span th:text="${householdInfo.memo != null && householdInfo.memo != '' ? householdInfo.memo : '-'}">-</span>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
|
<div class="btns-row align-right">
|
|
<button type="button" class="btn" th:if="${userRole == 'ROLE_ADMIN'}" onclick="showResearcherModal();">
|
|
<span class="btn-txt">조사원 매핑</span>
|
|
</button>
|
|
<button type="button" class="btn btn-primary" onclick="goUpdateForm();">
|
|
<span class="btn-txt">수정</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
<div class="component-tab" data-active="tab1">
|
|
<div class="tab-head">
|
|
<button type="button" class="tab-label select-tab" data-tab-type="daily-record" data-tab-value="tab1">일계부 등록 현황</button>
|
|
<button type="button" class="tab-label select-tab" data-tab-type="forest-product" data-tab-value="tab2" th:unless="${activeProfile != 'local'}">임산물 현황</button>
|
|
<button type="button" class="tab-label select-tab" data-tab-type="bank-auto-transfer" data-tab-value="tab3" th:unless="${activeProfile != 'local'}">은행자동이체 내역</button>
|
|
<button type="button" class="tab-label select-tab" data-tab-type="household-visit" data-tab-value="tab4" th:unless="${activeProfile != 'local'}">임가방문정보</button>
|
|
|
|
<div class="component-select select-date">
|
|
<select class="select-list" name="recordMonth" required onchange="onRecordMonthChange();">
|
|
<option th:each="m : ${monthList}"
|
|
th:value="${m.value}"
|
|
th:text="${m.label}"
|
|
th:selected="${m.value == recordMonth}">2025년 5월</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-body">
|
|
<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" th:unless="${activeProfile != 'local'}">
|
|
<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>
|
|
</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>
|
|
|
|
<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>
|
|
|
|
<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>
|
|
|
|
<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>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="component-btns bottom-btn-group">
|
|
<div class="btns-row two-col">
|
|
<div class="btns-col-1">
|
|
<button type="button" class="btn" onclick="location.href='/households'">
|
|
<span class="btn-txt">목록</span>
|
|
</button>
|
|
</div>
|
|
<div class="btns-col-2 align-right" th:unless="${activeProfile != 'local'}">
|
|
<button type="button" class="btn">
|
|
<span class="btn-txt">엑셀 다운로드 <i class="ico-download" aria-hidden="true"></i></span>
|
|
</button>
|
|
<button type="button" class="btn">
|
|
<span class="btn-txt">인쇄 <i class="ico-print" aria-hidden="true"></i></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</form>
|
|
|
|
<!-- 조사원 매핑 모달 -->
|
|
<div th:replace="common/modal-researcher-mapping :: modalFragment"></div>
|
|
|
|
<!-- 임가방문정보 모달 -->
|
|
<div th:replace="households/modal/modal-visit-info :: modalFragment"></div>
|
|
|
|
</section>
|
|
|
|
<section layout:fragment="script">
|
|
<script>
|
|
// 일계부 완료상태
|
|
const statusInfoMap = {
|
|
DONE: {
|
|
label: '작성완료',
|
|
className: 'green'
|
|
},
|
|
INCOMPLETE: {
|
|
label: '미완료',
|
|
className: 'light-green'
|
|
},
|
|
EMPTY: {
|
|
label: '미작성',
|
|
className: 'border'
|
|
},
|
|
WAITING: {
|
|
label: '대기',
|
|
className: 'gray'
|
|
}
|
|
};
|
|
|
|
const managementType = {
|
|
VISIT: "방문조사",
|
|
CALL: "전화상담",
|
|
ETC: "기타"
|
|
};
|
|
</script>
|
|
|
|
<script>
|
|
$(document).ready(() => {
|
|
getDailyRecords();
|
|
});
|
|
|
|
$('.select-tab').on('click', function () {
|
|
getTabData(this.dataset.tabType);
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
// 날짜선택
|
|
const onRecordMonthChange = () => {
|
|
const selectedTab = document.querySelector('.tab-label[aria-selected="true"]');
|
|
if (!selectedTab) return;
|
|
|
|
getTabData(selectedTab.dataset.tabType);
|
|
}
|
|
|
|
const getTabData = (tabType) => {
|
|
switch (tabType) {
|
|
case 'daily-record': // 일계부 등록 현황
|
|
getDailyRecords();
|
|
break;
|
|
case 'forest-product': // 임산물 현황
|
|
getForestProductsStatus();
|
|
break;
|
|
case 'bank-auto-transfer': // 은행자동이체내역
|
|
getBankAutoTransfer();
|
|
break;
|
|
case 'household-visit': // 임가방문정보
|
|
getVisitInfo();
|
|
break;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<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>${item.unitSelf != null && item.unitSelf !== '' ? item.unitSelf : 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.areaUnitSelf != null ? item.areaUnitSelf : item.areaUnitCodeText)}</td><!-- 작업면적 단위 -->
|
|
<td class="align-right">${ifNullHyphen(item.harvestQuantity)}</td><!-- 수확량 -->
|
|
<td>${ifNullHyphen(item.harvestUnitSelf != null ? item.harvestUnitSelf : item.harvestUnitCodeText)}</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>${item.unitSelf != null && item.unitSelf !== '' ? item.unitSelf : 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>
|
|
|
|
<script>
|
|
// 임산물 현황 탭 조회
|
|
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>
|
|
|
|
<script>
|
|
// 임가방문정보 조회
|
|
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>
|
|
|
|
<script>
|
|
// 은행자동이체내역 조회
|
|
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>
|
|
|
|
<script>
|
|
// 조사원 매핑 팝업의 선택된 조사원 가져오기.
|
|
const getSelectedResearcher = (data, closeModal) => {
|
|
const f = document.reqForm;
|
|
|
|
ajaxUtil._ajaxMethod(
|
|
'/api/household/researcherMapping/create',
|
|
JSON.stringify({
|
|
adminSeq: data.adminSeq,
|
|
householdSeqs: [Number(f.householdSeq.value)]
|
|
}),
|
|
() => { // 성공
|
|
alert("등록이 완료되었습니다.");
|
|
closeModal();
|
|
|
|
// 새로고침이 버벅거려서 일단 setTimeout 처리..
|
|
setTimeout(() => {
|
|
location.reload();
|
|
}, 200);
|
|
},
|
|
function (code, rstData) {
|
|
if(code == 422) alert(rstData.responseText);
|
|
if(code == 400) alert(rstData.responseJSON.message); //임가번호 중복체크
|
|
},
|
|
'post',
|
|
'json',
|
|
{ handle422Type: 'alert' }
|
|
);
|
|
}
|
|
</script>
|
|
|
|
<script>
|
|
// 수정 폼으로 가기
|
|
const goUpdateForm = () => {
|
|
const f = document.reqForm;
|
|
|
|
location.href = '/households/update/' + f.householdSeq.value;
|
|
}
|
|
</script>
|
|
|
|
<script>
|
|
// 일계부 등록 현황 nodata 처리
|
|
const noDataDaily = (target, status, length) => {
|
|
const noDataText = status === 'TARGET' ? '등록이 필요합니다.' : '등록없음';
|
|
|
|
$(target).append(`<tr><td colspan="${length}" style="text-align: center;">${noDataText}</td></tr>`);
|
|
}
|
|
|
|
// 임산물 현황 noData 처리
|
|
const noDataMonthly = (target, status, length) => {
|
|
const noDataText = status === 'NOTHING' ? '등록없음' : '등록이 필요합니다.';
|
|
|
|
$(target).append(`<tr><td colspan="${length}" style="text-align: center;">${noDataText}</td></tr>`);
|
|
}
|
|
</script>
|
|
</section>
|
|
|
|
</html> |