[BO] 임가현황 작업 중 (11)

This commit is contained in:
kangsunlee
2025-06-19 18:32:48 +09:00
parent a0d8e74fbb
commit 37ad6c9d61
116 changed files with 1063 additions and 669 deletions

View File

@@ -94,7 +94,7 @@
</table>
<!-- 페이지네이션 -->
<div class="row paging"></div>
<div class="row modal-paging"></div>
<div class="component-btns bottom-btn-group">
<div class="btns-row align-right">
@@ -190,7 +190,7 @@
}
// Pagination 구성하기
const paging = $('.paging');
const paging = $('.modal-paging');
paging.empty();
paging.append(
uiUtil.getPagingUI(pageNo, f.size.value, response.totalPages,

View File

@@ -334,8 +334,8 @@
</label>
</div>
</td>
<td class="underline"><a href="/household/households/${ct.householdSeq}">${ct.householdNum}</a></td><!-- 임가번호 -->
<td class="underline"><a href="/household/households/${ct.householdSeq}">${ct.householdName}</a></td><!-- 경영주 이름 -->
<td class="underline"><a href="/household/households/${ct.householdSeq}?recordMonth=${f.recordMonth.value}">${ct.householdNum}</a></td><!-- 임가번호 -->
<td class="underline"><a href="/household/households/${ct.householdSeq}?recordMonth=${f.recordMonth.value}">${ct.householdName}</a></td><!-- 경영주 이름 -->
<td>${ct.householdPhone}</td><!-- 경영주 번호 -->
<td>${ct.regionMainName}</td><!-- 실사 -->
<td>${ct.regionSubName}</td><!-- 지역 -->

View File

@@ -0,0 +1,269 @@
<!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">
<div class="content-inner">
<!-- 테이블 영역 -->
<table class="type-form">
<tbody>
<tr>
<th>임가번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
<td>
<div class="d-flex">
<div class="component-input">
<div class="d-flex">
<div class="input-field">
<input type="number" name="householdNum" id="householdNum"
placeholder=""
oninput="numberMaxLengthChk(this, 5);">
</div>
<button type="button" class="btn" onclick="checkHouseholdNum();">
<span class="btn-txt">중복확인</span>
</button>
</div>
</div>
</div>
</td>
<th>경영주명<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
<td>
<div class="component-input">
<div class="input-field">
<input type="text" id="ownerName" name="ownerName" placeholder="" maxlength="10">
</div>
</div>
</td>
<th>연령(만 나이)<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
<td>
<div class="component-input">
<div class="input-field">
<input type="number" id="ownerAge" name="ownerAge" placeholder=""
oninput="numberMaxLengthChk(this, 3);">
</div>
</div>
</td>
</tr>
<tr>
<th>가구 연락처</th>
<td>
<div class="d-flex">
<div class="component-select">
<select class="select-list" name="tel1">
<option value="" disabled hidden>선택해주세요.</option>
<option value="02">02</option>
<option value="031" selected>031</option>
<option value="032">032</option>
<option value="033">033</option>
<option value="041">041</option>
<option value="042">042</option>
<option value="043">043</option>
<option value="044">044</option>
<option value="051">051</option>
<option value="052">052</option>
<option value="053">053</option>
<option value="054">054</option>
<option value="055">055</option>
<option value="061">061</option>
<option value="062">062</option>
<option value="063">063</option>
<option value="064">064</option>
</select>
</div>
<div class="component-input">
<div class="input-field">
<input type="number" id="tel2" name="tel2" placeholder=""
oninput="numberMaxLengthChk(this, 4);">
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="number" id="tel3" name="tel3" placeholder=""
oninput="numberMaxLengthChk(this, 4);">
</div>
</div>
</div>
</td>
<th>휴대폰 번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
<td>
<div class="d-flex">
<div class="component-select">
<select class="select-list" name="phone1" required>
<option value="" disabled hidden>선택해주세요.</option>
<option value="010" selected>010</option>
</select>
</div>
<div class="component-input">
<div class="input-field">
<input type="number" name="phone2" id="phone2" placeholder=""
oninput="numberMaxLengthChk(this, 4);">
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="number" name="phone3" id="phone3" placeholder=""
oninput="numberMaxLengthChk(this, 4);">
</div>
</div>
</div>
</td>
</tr>
<tr>
<th>실사<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
<td>
<div class="component-select">
<select class="select-list" name="regionMainCode" required>
<option value="">전체</option>
<option th:each="item : ${regionMainList}"
th:value="${item.id}"
th:text="${item.codeText}">
</select>
</div>
</td>
<th>지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
<td>
<div class="component-select">
<select class="select-list" name="regionSubCode" required>
<option value="">전체</option>
<option th:each="item : ${regionSubList}"
th:value="${item.id}"
th:text="${item.codeValue + '. ' + item.codeText}">
</select>
</div>
</td>
<th>세부 지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
<td>
<div class="component-select">
<select class="select-list" name="regionDetailCode" required>
<option value="">전체</option>
<option th:each="item : ${regionDetailList}"
th:value="${item.id}"
th:text="${item.codeValue + '. ' + item.codeText}">
</select>
</div>
</td>
</tr>
<tr>
<th>전체 주소<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
<td>
<div class="component-input">
<div class="input-field">
<input type="text" name="address" id="address" placeholder="">
</div>
</div>
</td>
</tr>
<tr>
<th>업종 대분류</th>
<td>
<div class="component-select">
<select class="select-list" name="industryLargeCode">
<option value="">전체</option>
<option th:each="item : ${industryLargeList}"
th:value="${item.id}"
th:text="${item.codeValue + '. ' + item.codeText}">
</select>
</div>
</td>
<th>업종 중분류1</th>
<td>
<div class="component-select">
<select class="select-list" name="industryMiddleCode">
<option value="">전체</option>
<option th:each="item : ${industryMiddleList}"
th:value="${item.id}"
th:text="${item.codeValue + '. ' + item.codeText}">
</select>
</div>
</td>
<th>업종 중분류2</th>
<td>
<div class="component-input">
<div class="input-field">
<input type="text" id="industrySubMiddle" name="industrySubMiddle" placeholder="" maxlength="20">
</div>
</div>
</td>
</tr>
<tr>
<th>세부품목</th>
<td>
<div class="component-input">
<div class="input-field">
<input type="text" id="industryDetail" name="industryDetail" placeholder="" maxlength="20">
</div>
</div>
</td>
</tr>
<tr>
<th>담당 조사원</th>
<td>
<div class="d-flex">
<div class="component-input">
<div class="input-field">
<input type="text" name="researcherName" id="researcherName" placeholder="">
</div>
</div>
<button type="button" class="btn" onclick="showResearcherModal();">
<span class="btn-txt">검색</span>
</button>
</div>
</td>
</tr>
<tr>
<th>유지 여부</th>
<td class="radio-group">
<div class="component-input">
<label class="radio-inner">
<input type="radio" id="isPanel_Y" name="isPanel" value="true" checked>
<span class="radio-item">
<span class="radio-txt">유지</span>
</span>
</label>
</div>
<div class="component-input">
<label class="radio-inner">
<input type="radio" id="isPanel_N" name="isPanel" value="false">
<span class="radio-item">
<span class="radio-txt">탈락</span>
</span>
</label>
</div>
</td>
</tr>
<tr>
<th>비고</th>
<td colspan="5">
<div class="component-input">
<div class="input-textarea-field">
<textarea id="memo" name="memo" class="textarea" placeholder=""></textarea>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="component-btns bottom-btn-group">
<div class="btns-row align-right">
<button type="button" class="btn btn-secondary" onclick="location.href='/household/households'">
<span class="btn-txt">취소</span>
</button>
<button type="button" class="btn btn-primary" onclick="createHousehold();">
<span class="btn-txt">등록</span>
</button>
</div>
</div>
</div>
</form>
<div th:replace="common/modal-researcher-mapping :: modalFragment"></div>
</section>
<section layout:fragment="script">
<script th:inline="javascript">
</script>
</section>
</html>

View File

@@ -99,10 +99,10 @@
<div class="component-btns bottom-btn-group">
<div class="btns-row align-right">
<button type="button" class="btn">
<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">
<button type="button" class="btn btn-primary" onclick="goUpdateForm();">
<span class="btn-txt">수정</span>
</button>
</div>
@@ -121,7 +121,8 @@
<select class="select-list" name="recordMonth" required onchange="onRecordMonthChange();">
<option th:each="m : ${monthList}"
th:value="${m.value}"
th:text="${m.label}">2025년 5월</option>
th:text="${m.label}"
th:selected="${m.value == recordMonth}">2025년 5월</option>
</select>
</div>
</div>
@@ -604,6 +605,8 @@
</section>
</div>
</form>
<div th:replace="common/modal-researcher-mapping :: modalFragment"></div>
</section>
<section layout:fragment="script">
@@ -792,7 +795,7 @@
</td>
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상판매 -->
<td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 -->
<td class="underline">${ifNullHyphen(item.categorySelf)}</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><!-- 단위 -->
@@ -832,11 +835,12 @@
</label>
</div>
</td>
<td class="underline">${ifNullHyphen(item.itemCode)}</td><!-- 품목명 -->
<td>${ifNullHyphen(item.workCode)}</td><!-- 작업명 -->
<td class="align-right">${ifNullHyphen(item.workLandArea)}</td><!-- 작업 면적 -->
<td>${ifNullHyphen(item.harvestQuantity)}</td><!-- 수확량 -->
<td>${ifNullHyphen(item.cropText)}</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><!-- 가족노동(남) -->
@@ -882,9 +886,9 @@
</div>
</td>
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상 또는 카드구입 -->
<td class="underline">${ifNullHyphen(item.categorySelf)}</td><!-- 지출의 종류 -->
<td class="underline">${ifNullHyphen(item.expenseKind)}</td><!-- 지출의 종류 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 용도 -->
<td>${ifNullHyphen(item.quantity)}</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><!-- 현물평가액 -->
@@ -1159,6 +1163,7 @@
);
}
// 은행자동이체내역 수입 테이블 그리기
const gridBankIncomeTable = (data) => {
const tbody = $('#table-bank-income tbody');
tbody.empty();
@@ -1185,7 +1190,7 @@
<td class="underline">${ifNullHyphen(item.categoryText)}</td> <!-- 수입의 종류 -->
<td>${ifNullHyphen(item.target)}</td><!-- 대상 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
<td>${ifNullHyphen(item.count)}</td><!-- 수량 -->
<td class="align-right">${ifNullHyphen(item.count)}</td><!-- 수량 -->
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
</tr>
@@ -1195,6 +1200,7 @@
tbody.append(tmpl);
}
// 은행자동이체내역 수출 테이블 그리기
const gridBankExpenseTable = (data) => {
const tbody = $('#table-bank-expense tbody');
tbody.empty();
@@ -1219,7 +1225,7 @@
</td>
<td class="underline">${ifNullHyphen(item.categoryText)}</td> <!-- 지출의 종류 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 용도 -->
<td>${ifNullHyphen(item.count)}</td><!-- 수량 -->
<td class="align-right">${ifNullHyphen(item.count)}</td><!-- 수량 -->
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
</tr>
@@ -1230,6 +1236,46 @@
}
</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 = '/household/households/update/' + f.householdSeq.value;
}
</script>
<script>
// 일계부 등록 현황 nodata 처리
const noDataDaily = (target, status, length) => {