[BO] 임가 현황 - 임가 등록 작업 중 (5)
This commit is contained in:
@@ -0,0 +1,244 @@
|
||||
<!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="modalFragment">
|
||||
<form autocomplete="off" method="get" name="reqResearcherForm">
|
||||
<input name="page" value="0" type="hidden"/>
|
||||
|
||||
<div class="component-modal mypage-wrap modal01" data-props-dimm-click="true" data-state="close">
|
||||
<div class="modal-dimm"></div>
|
||||
<div class="modal-frame">
|
||||
<div class="modal-container">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-tit">
|
||||
조사원 매핑
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<div class="modal-content-inner">
|
||||
<section class="filter-wrap">
|
||||
<div class="form-area">
|
||||
<!-- 조사원 -->
|
||||
<div class="input-group">
|
||||
<div class="input-label">
|
||||
<p class="label-txt">
|
||||
조사원
|
||||
</p>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="searchField" required>
|
||||
<option value="" disabled hidden>선택해주세요.</option>
|
||||
<option value="" selected>전체</option>
|
||||
<option value="name">이름</option>
|
||||
<option value="phone">전화번호</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="searchField" name="searchValue" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<div class="d-flex">
|
||||
<div class="component-select">
|
||||
<div class="input-label">
|
||||
<p class="label-txt">
|
||||
실사
|
||||
</p>
|
||||
</div>
|
||||
<select class="select-list" name="searchArea" id="regionMainCodeSelect" required>
|
||||
<option value="" disabled hidden>선택해주세요.</option>
|
||||
<option value="" selected>전체</option>
|
||||
<!-- ajax 호출 -->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 버튼 그룹 -->
|
||||
<div class="component-btns">
|
||||
<div class="btns-row">
|
||||
<button type="button" class="btn">
|
||||
<span class="btn-txt">초기화</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary">
|
||||
<span class="btn-txt">검색</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<!-- 테이블 영역 -->
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
<th>조사원명</th>
|
||||
<th>전화번호</th>
|
||||
<th>실사</th>
|
||||
<th>담당임가 수</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="listTBody">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="temp_radio_0001" name="temp_radio_0001">
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>홍길동</td>
|
||||
<td>010-0000-0000</td>
|
||||
<td>서울</td>
|
||||
<td>40</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="temp_radio_0002" name="temp_radio_0002">
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>홍길동</td>
|
||||
<td>010-0000-0000</td>
|
||||
<td>서울</td>
|
||||
<td>40</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="temp_radio_0003" name="temp_radio_0003">
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>홍길동</td>
|
||||
<td>010-0000-0000</td>
|
||||
<td>서울</td>
|
||||
<td>40</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 페이지네이션 -->
|
||||
<div class="row paging"></div>
|
||||
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn btn-primary">
|
||||
<span class="btn-txt">등록</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<button class="modal-close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script th:inline="javascript">
|
||||
const showResearcherModal = () => {
|
||||
document.querySelector(".modal01").ui.open();
|
||||
|
||||
// 실사 공통코드 가져오기
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/regionMainCodes',
|
||||
{},
|
||||
(response) => {
|
||||
const select = document.getElementById('regionMainCodeSelect');
|
||||
|
||||
response.forEach(item => {
|
||||
const option = document.createElement('option');
|
||||
option.value = item.id;
|
||||
option.textContent = item.codeText;
|
||||
select.appendChild(option);
|
||||
});
|
||||
},
|
||||
function (code, rstData) {
|
||||
console.log("error : ", code);
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
const getResearchers = (pageNo) => {
|
||||
const f = document.reqResearcherForm;
|
||||
f.page.value = pageNo;
|
||||
|
||||
let dataOj = $(f).serializeObject();
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/mapping/researchers',
|
||||
dataOj,
|
||||
function (response) {
|
||||
$('#totalElements').text(response.totalElements);
|
||||
|
||||
// List 구성하기
|
||||
const tbody = $('#listTBody');
|
||||
tbody.empty();
|
||||
|
||||
$(response.content).each((idx, ct) => {
|
||||
tbody.append(
|
||||
`
|
||||
<!-- <tr>-->
|
||||
<!-- <td>-->
|
||||
<!-- <div class="component-input">-->
|
||||
<!-- <label class="radio-inner">-->
|
||||
<!-- <input type="radio" id="temp_radio_0003" name="temp_radio_0003">-->
|
||||
<!-- </label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </td>-->
|
||||
<!-- <td>홍길동</td>-->
|
||||
<!-- <td>010-0000-0000</td>-->
|
||||
<!-- <td>서울</td>-->
|
||||
<!-- <td>40</td>-->
|
||||
<!-- </tr>-->
|
||||
`
|
||||
);
|
||||
});
|
||||
|
||||
if (!$(response.content).length) {
|
||||
tbody.append(`
|
||||
<tr>
|
||||
<td colspan="5" class="text-center text-muted">조사원이 존재하지 않습니다.</td>
|
||||
</tr>
|
||||
`);
|
||||
}
|
||||
|
||||
// Pagination 구성하기
|
||||
const paging = $('.paging');
|
||||
paging.empty();
|
||||
paging.append(
|
||||
uiUtil.getPagingUI(pageNo, f.size.value, response.totalPages,
|
||||
(movePageNo) => {
|
||||
f.page.value = movePageNo;
|
||||
goSearch();
|
||||
}));
|
||||
|
||||
},
|
||||
function (code, rstData) {
|
||||
|
||||
},
|
||||
'get',
|
||||
'json',
|
||||
null
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -223,7 +223,7 @@
|
||||
<select class="select-list" name="isPanel" th:field="*{isPanel}">
|
||||
<option value="">전체</option>
|
||||
<option value="true">유지</option>
|
||||
<option value="false">비유지</option>
|
||||
<option value="false">탈락</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -286,10 +286,13 @@
|
||||
<button type="button" class="btn">
|
||||
<span class="btn-txt">엑셀 다운로드 <i class="ico-download ico-small" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
<button type="button" class="btn">
|
||||
<!-- 관리자만 노출 -->
|
||||
<button type="button" class="btn" th:if="${userRole == 'ROLE_ADMIN'}"
|
||||
onclick="location.href='/household/households/create'">
|
||||
<span class="btn-txt">임가 등록</span>
|
||||
</button>
|
||||
<button type="button" class="btn">
|
||||
<!-- 관리자, 지방실사만 노출 -->
|
||||
<button type="button" class="btn" th:if="${userRole != 'ROLE_RESEARCHER'}">
|
||||
<span class="btn-txt">조사원 매핑</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -297,32 +300,26 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<!-- <button>엑셀 다운로드</button>-->
|
||||
<!-- <button>임가 등록</button>-->
|
||||
<!-- <button>조사원 매핑</button>-->
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:inline="javascript">
|
||||
// TODO : ajax 공통화 작업 후 수정해야
|
||||
// 임가 목록 조회
|
||||
const getHouseholds = (pageNo) => {
|
||||
const f = document.reqForm;
|
||||
f.page.value = pageNo;
|
||||
|
||||
let dataOj = $(f).serializeObject();
|
||||
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: '/api/household/households',
|
||||
data: dataOj,
|
||||
success(response) {
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/households',
|
||||
dataOj,
|
||||
function(response) { // 성공
|
||||
console.log("response", response);
|
||||
|
||||
$('#totalElements').text(response.totalElements);
|
||||
|
||||
// List 구성하기
|
||||
const tbody = $('#listTBody');
|
||||
tbody.empty();
|
||||
|
||||
@@ -356,21 +353,22 @@
|
||||
);
|
||||
});
|
||||
|
||||
// 현재 로그인한 유저의 역할
|
||||
const isResearcher = f.userRole.value === 'ROLE_RESEARCHER';
|
||||
const colspanLength = isResearcher ? 13 : 15;
|
||||
|
||||
// 조사원일 경우 조사원이름, 번호 칼럼 hide
|
||||
$('.hide-role-researcher').toggle(!isResearcher);
|
||||
|
||||
// nodata 처리
|
||||
if (!$(response.content).length) {
|
||||
tbody.append(`
|
||||
<tr>
|
||||
<td colspan="15" class="text-center text-muted">게시물이 존재하지 않습니다.</td>
|
||||
<td colspan="${colspanLength}" class="text-center text-muted">임가정보가 존재하지 않습니다.</td>
|
||||
</tr>
|
||||
`);
|
||||
}
|
||||
|
||||
// 조사원일 경우 조사원이름, 번호 hide
|
||||
if (f.userRole.value === 'ROLE_RESEARCHER') {
|
||||
$('.hide-role-researcher').hide();
|
||||
} else {
|
||||
$('.hide-role-researcher').show();
|
||||
}
|
||||
|
||||
// Pagination 구성하기
|
||||
const paging = $('.paging');
|
||||
paging.empty();
|
||||
@@ -380,9 +378,13 @@
|
||||
f.page.value = movePageNo;
|
||||
goSearch();
|
||||
}));
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
function (code, rstData) { // 실패
|
||||
console.log("error : ", code);
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
// 최초 리스트 로드
|
||||
|
||||
@@ -0,0 +1,330 @@
|
||||
<!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="researcherSeq" id="researcherSeq" 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">
|
||||
// 임가번호 중복확인 변수
|
||||
let checkDuplicate = false;
|
||||
|
||||
// 임가번호 중복확인
|
||||
const checkHouseholdNum = () => {
|
||||
const f = document.reqForm;
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/households/check',
|
||||
{ householdNum : f.householdNum.value },
|
||||
function(response) { // 성공
|
||||
const message = response.isDuplicated
|
||||
? "입력하신 번호는 중복입니다. 다른 임가번호를 입력해주세요."
|
||||
: "사용 가능합니다.";
|
||||
alert(message);
|
||||
|
||||
// 중복이 아니어야 (false여야) 사용 가능
|
||||
checkDuplicate = !response.isDuplicated;
|
||||
},
|
||||
function (code, rstData) { // 실패
|
||||
console.log("error : ", code);
|
||||
if(code == 400) alert("임가번호를 입력해주세요.");
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// 임가등록
|
||||
const createHousehold = () => {
|
||||
if(!checkDuplicate) {
|
||||
alert("임가번호 중복확인을 해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
const f = document.reqForm;
|
||||
let dataOj = $(f).serializeObject();
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/households/create',
|
||||
JSON.stringify(dataOj),
|
||||
function(response) { // 성공
|
||||
console.log("임가저장 결과 : ", response);
|
||||
},
|
||||
function (code, rstData) {
|
||||
if(code == 422) alert(rstData.responseText);
|
||||
if(code == 400) alert(rstData.responseJSON.message); //임가번호 중복체크
|
||||
},
|
||||
'post',
|
||||
'json',
|
||||
{ handle422Type: 'alert' }
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// 휴대폰번호 길이 체크
|
||||
const numberMaxLengthChk = (el, number) => {
|
||||
el.value = el.value.slice(0, number);
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
|
||||
</html>
|
||||
@@ -27,7 +27,7 @@
|
||||
<tr>
|
||||
<th>가구 연락처</th>
|
||||
<td>
|
||||
<span th:text="${householdInfo.householdTel}">031-0000-0000</span>
|
||||
<span th:text="${householdInfo.householdTel != null ? householdInfo.householdTel : '-'}">031-0000-0000</span>
|
||||
</td>
|
||||
<th>휴대폰 번호</th>
|
||||
<td>
|
||||
@@ -57,11 +57,11 @@
|
||||
<tr>
|
||||
<th>업종 대분류</th>
|
||||
<td>
|
||||
<span th:text="${householdInfo.industryLargeName}">40. 수실류재배업</span>
|
||||
<span th:text="${householdInfo.industryLargeName != null ? householdInfo.industryLargeName : '-'}">40. 수실류재배업</span>
|
||||
</td>
|
||||
<th>업종 중분류1</th>
|
||||
<td>
|
||||
<span th:text="${householdInfo.industryMiddleName}">42. 대추재배업</span>
|
||||
<span th:text="${householdInfo.industryMiddleName != null ? householdInfo.industryMiddleName : '-'}">42. 대추재배업</span>
|
||||
</td>
|
||||
<th>업종 중분류2</th>
|
||||
<td>
|
||||
@@ -91,7 +91,7 @@
|
||||
<tr>
|
||||
<th>비고</th>
|
||||
<td class="radio-group">
|
||||
<span th:text="${householdInfo.memo != null ? householdInfo.memo : '-'}">-</span>
|
||||
<span th:text="${householdInfo.memo != null && householdInfo.memo != '' ? householdInfo.memo : '-'}">-</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -375,14 +375,13 @@
|
||||
const getDailyRecords = () => {
|
||||
const f = document.reqForm;
|
||||
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: '/api/household/dailyRecordsStatus',
|
||||
data: {
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/dailyRecordsStatus',
|
||||
{
|
||||
householdSeq: f.householdSeq.value,
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
success(response) {
|
||||
function(response) { // 성공
|
||||
console.log("일계부 현황 리스트 조회 : ", response);
|
||||
const listArea = $('.tab-content .daily-record-list');
|
||||
const detailArea = $('.tab-content .daily-record-detail');
|
||||
@@ -420,8 +419,13 @@
|
||||
});
|
||||
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
});
|
||||
},
|
||||
function (code, rstData) { // 실패
|
||||
console.log("error : ", code);
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
// 임산물 등록 현황 상세
|
||||
@@ -438,22 +442,26 @@
|
||||
listArea.hide();
|
||||
detailArea.show();
|
||||
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: '/api/household/dailyRecordStatus',
|
||||
data: {
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/dailyRecordStatus',
|
||||
{
|
||||
householdSeq: f.householdSeq.value,
|
||||
recordSeq: id,
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
success(response) {
|
||||
function(response) { // 성공
|
||||
console.log("일계부 등록 상세 데이터~ : ", response);
|
||||
gridIncomeTable(response.incomes);
|
||||
gridExpenseTable(response.expenses);
|
||||
gridPowerTable(response.powers);
|
||||
gridForestryTable(response.forestries);
|
||||
}
|
||||
});
|
||||
},
|
||||
function (code, rstData) { // 실패
|
||||
console.log("error : ", code);
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
// 수입 테이블 그리기
|
||||
|
||||
Reference in New Issue
Block a user