Merge remote-tracking branch 'origin/dev' into bo_daily
This commit is contained in:
@@ -131,22 +131,16 @@
|
||||
<th>지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="regionSubCode" required>
|
||||
<select class="select-list" name="regionSubCode" id="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>
|
||||
<select class="select-list" name="regionDetailCode" id="regionDetailCode" required>
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${regionDetailList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
@@ -165,22 +159,16 @@
|
||||
<th>업종 대분류</th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="industryLargeCode">
|
||||
<select class="select-list" name="industryLargeCode" id="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 class="select-list" name="industryMiddleCode" id="industryMiddleCode">
|
||||
<option value="">전체</option>>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
@@ -269,6 +257,27 @@
|
||||
</section>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:inline="javascript">
|
||||
const regionList = [[${regionSubList}]];
|
||||
const industryLargeList = [[${industryLargeList}]];
|
||||
|
||||
$(document).ready(function () {
|
||||
// 지역, 세부지역 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
codeList: regionList,
|
||||
parentSelector: '#regionSubCode',
|
||||
childSelector: '#regionDetailCode'
|
||||
});
|
||||
|
||||
// 업종 대분류, 중분류 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
codeList: industryLargeList,
|
||||
parentSelector: '#industryLargeCode',
|
||||
childSelector: '#industryMiddleCode',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script th:inline="javascript">
|
||||
// 임가번호 중복확인 변수
|
||||
let checkDuplicate = false;
|
||||
|
||||
@@ -78,11 +78,8 @@
|
||||
지역
|
||||
</p>
|
||||
</div>
|
||||
<select class="select-list" name="regionSubCode" th:field="*{regionSubCode}">
|
||||
<select class="select-list" name="regionSubCode" id="regionSubCode" th:field="*{regionSubCode}">
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${regionSubList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
<div class="component-select">
|
||||
@@ -91,11 +88,8 @@
|
||||
세부지역
|
||||
</p>
|
||||
</div>
|
||||
<select class="select-list" name="regionDetailCode" th:field="*{regionDetailCode}">
|
||||
<select class="select-list" name="regionDetailCode" id="regionDetailCode" th:field="*{regionDetailCode}">
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${regionDetailList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -109,11 +103,8 @@
|
||||
업종 대분류
|
||||
</p>
|
||||
</div>
|
||||
<select class="select-list" name="industryLargeCode" th:field="*{industryLargeCode}">
|
||||
<select class="select-list" name="industryLargeCode" id="industryLargeCode" th:field="*{industryLargeCode}">
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${industryLargeList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
<div class="component-select">
|
||||
@@ -122,11 +113,8 @@
|
||||
업종 중분류
|
||||
</p>
|
||||
</div>
|
||||
<select class="select-list" name="industryMiddleCode" th:field="*{industryMiddleCode}">
|
||||
<select class="select-list" name="industryMiddleCode" id="industryMiddleCode" th:field="*{industryMiddleCode}">
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${industryMiddleList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -284,6 +272,9 @@
|
||||
|
||||
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn" onclick="showExcelHouseholdModal();">
|
||||
<span class="btn-txt">엑셀 업로드 <i class="ico-download ico-small" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
<button type="button" class="btn">
|
||||
<span class="btn-txt">엑셀 다운로드 <i class="ico-download ico-small" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
@@ -302,9 +293,40 @@
|
||||
</form>
|
||||
|
||||
<div th:replace="common/modal-researcher-mapping :: modalFragment"></div>
|
||||
<div th:replace="households/modal/modal-excel-household :: modalFragment"></div>
|
||||
</section>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:inline="javascript">
|
||||
const regionList = [[${regionSubList}]];
|
||||
const selectedRegionSubCode = /*[[${reqVO.regionSubCode}]]*/ '';
|
||||
const selectedRegionDetailCode = /*[[${reqVO.regionDetailCode}]]*/ '';
|
||||
|
||||
const industryLargeList = [[${industryLargeList}]];
|
||||
const selectedIndustryLargeCode = /*[[${reqVO.industryLargeCode}]]*/ '';
|
||||
const selectedIndustryMiddleCode= /*[[${reqVO.industryMiddleCode}]]*/ '';
|
||||
|
||||
$(document).ready(function () {
|
||||
// 지역, 세부지역 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
codeList: regionList,
|
||||
parentSelector: '#regionSubCode',
|
||||
childSelector: '#regionDetailCode',
|
||||
selectedParentCode: selectedRegionSubCode,
|
||||
selectedChildCode: selectedRegionDetailCode
|
||||
});
|
||||
|
||||
// 업종 대분류, 중분류 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
codeList: industryLargeList,
|
||||
parentSelector: '#industryLargeCode',
|
||||
childSelector: '#industryMiddleCode',
|
||||
selectedParentCode: selectedIndustryLargeCode,
|
||||
selectedChildCode: selectedIndustryMiddleCode
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script th:inline="javascript">
|
||||
// 임가 목록 조회
|
||||
const getHouseholds = (pageNo) => {
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<!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="reqHouseholdExcelForm">
|
||||
|
||||
<div class="component-modal mypage-wrap modal01 modal-excel-household" 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">
|
||||
<label for="householdFile" class="input-file-btn">
|
||||
<input type="file" name="file" id="householdFile" accept=".xlsx, .xls">
|
||||
</label>
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn btn-primary" onclick="ExcelUploadHousehold();">
|
||||
<span class="btn-txt">등록</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" class="modal-close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script th:inline="javascript">
|
||||
// 임가방문정보 모달창 띄우기
|
||||
const showExcelHouseholdModal = () => {
|
||||
document.querySelector(".modal-excel-household").ui.open();
|
||||
}
|
||||
|
||||
// 임가방문정보 등록
|
||||
const ExcelUploadHousehold = () => {
|
||||
event.preventDefault();
|
||||
|
||||
const fileInput = document.getElementById('householdFile');
|
||||
if (fileInput.files.length === 0) {
|
||||
alert('업로드할 엑셀 파일을 선택해주세요.');
|
||||
return;
|
||||
}
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append('file', fileInput.files[0]);
|
||||
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '/api/household/excelUpload',
|
||||
data: formData,
|
||||
contentType: false, // * 중요 *
|
||||
processData: false, // * 중요 *
|
||||
enctype: 'multipart/form-data', // * 중요 *
|
||||
beforeSend: function (xhr) {
|
||||
xhr.setRequestHeader(
|
||||
$("meta[name='_csrf_header']").attr("content"),
|
||||
$("meta[name='_csrf']").attr("content"));
|
||||
},
|
||||
success(res) {
|
||||
alert("총 "+res.total+"건 중에 "+res.success+"건 등록되었습니다.");
|
||||
},
|
||||
statusCode: {
|
||||
422: (res) => {
|
||||
const resJson = res.responseJSON;
|
||||
$(input).parent().find('.invalid-feedback').text(resJson.message);
|
||||
$(input).addClass('is-invalid');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</html>
|
||||
@@ -141,24 +141,16 @@
|
||||
<th>지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="regionSubCode" required>
|
||||
<select class="select-list" name="regionSubCode" id="regionSubCode" required>
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${regionSubList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}"
|
||||
th:selected="${item.id == householdInfo.regionSubCode}">
|
||||
</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>
|
||||
<select class="select-list" name="regionDetailCode" id="regionDetailCode" required>
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${regionDetailList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}"
|
||||
th:selected="${item.id == householdInfo.regionDetailCode}">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
@@ -178,24 +170,16 @@
|
||||
<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}"
|
||||
th:selected="${item.id == householdInfo.industryLargeCode}">
|
||||
<select class="select-list" name="industryLargeCode" id="industryLargeCode">
|
||||
<option value="">전체</option>>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<th>업종 중분류1</th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="industryMiddleCode">
|
||||
<select class="select-list" name="industryMiddleCode" id="industryMiddleCode">
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${industryMiddleList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}"
|
||||
th:selected="${item.id == householdInfo.industryMiddleCode}">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
@@ -296,6 +280,36 @@
|
||||
</section>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:inline="javascript">
|
||||
const regionList = [[${regionSubList}]];
|
||||
const selectedRegionSubCode = /*[[${householdInfo.regionSubCode}]]*/ '';
|
||||
const selectedRegionDetailCode = /*[[${householdInfo.regionDetailCode}]]*/ '';
|
||||
|
||||
const industryLargeList = [[${industryLargeList}]];
|
||||
const selectedIndustryLargeCode = /*[[${householdInfo.industryLargeCode}]]*/ '';
|
||||
const selectedIndustryMiddleCode= /*[[${householdInfo.industryMiddleCode}]]*/ '';
|
||||
|
||||
$(document).ready(function () {
|
||||
// 지역, 세부지역 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
codeList: regionList,
|
||||
parentSelector: '#regionSubCode',
|
||||
childSelector: '#regionDetailCode',
|
||||
selectedParentCode: selectedRegionSubCode,
|
||||
selectedChildCode: selectedRegionDetailCode
|
||||
});
|
||||
|
||||
// 업종 대분류, 중분류 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
codeList: industryLargeList,
|
||||
parentSelector: '#industryLargeCode',
|
||||
childSelector: '#industryMiddleCode',
|
||||
selectedParentCode: selectedIndustryLargeCode,
|
||||
selectedChildCode: selectedIndustryMiddleCode
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script th:inline="javascript">
|
||||
// 임가 수정
|
||||
const updateHousehold= () => {
|
||||
|
||||
Reference in New Issue
Block a user