Merge branch 'susu' into dev
This commit is contained in:
@@ -37,7 +37,7 @@ uri.admin.household.households.view.{{pathVar}}=\uC784\uAC00 \uC0C1\uC138
|
||||
uri.admin.researcher=\uC870\uC0AC\uC6D0 \uD604\uD669
|
||||
uri.admin.researcher.researchers=\uC870\uC0AC\uC6D0 \uD604\uD669
|
||||
uri.admin.researcher.researchers.create=\uC870\uC0AC\uC6D0 \uB4F1\uB85D
|
||||
uri.admin.researcher.researchers.view.{{pathVar}}=\uC870\uC0AC\uC6D0 \uC0C1\uC138
|
||||
uri.admin.researcher.{{pathVar}}=\uC870\uC0AC\uC6D0 \uC0C1\uC138
|
||||
|
||||
uri.admin.dashboard=\uB300\uC2DC\uBCF4\uB4DC
|
||||
uri.admin.dashboard.overview=\uB300\uC2DC\uBCF4\uB4DC
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.75" y="3.75" width="14.5" height="12.5" rx="1.25" stroke="#212529" stroke-width="1.5"/>
|
||||
<path d="M3 7H17" stroke="#212529" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6 2.4668V4.89148" stroke="#212529" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14 2.4668V4.89148" stroke="#212529" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 532 B |
@@ -4704,6 +4704,9 @@ button.swiper-pagination-bullet {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
gap: 0.8rem;
|
||||
}
|
||||
|
||||
@@ -4827,7 +4830,7 @@ input[type=number] {
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
height: 16rem;
|
||||
height: 32rem;
|
||||
border: 1px solid gainsboro;
|
||||
background-color: #ffffff;
|
||||
overflow: hidden;
|
||||
@@ -4984,6 +4987,96 @@ input[type=number] {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.input-file-group input {
|
||||
display: none;
|
||||
}
|
||||
.input-file-group .file-txt {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
width: 8rem;
|
||||
height: 3.6rem;
|
||||
background-color: #495057;
|
||||
color: #FFFFFF;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
.input-file-group .desc {
|
||||
margin-top: 0.8rem;
|
||||
display: block;
|
||||
text-align: left;
|
||||
font-size: 1.4rem;
|
||||
color: #868E96;
|
||||
}
|
||||
.input-file-group .file-list {
|
||||
margin-top: 1.6rem;
|
||||
text-align: left;
|
||||
}
|
||||
.input-file-group .file-list li {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
.input-file-group .file-list li .btn-delete {
|
||||
margin-left: 0.4rem;
|
||||
padding: 0;
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
background-image: url("../images/common/ico_close_white.svg");
|
||||
background-color: #CED4DA;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 10px 10px;
|
||||
background-position: center;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
.input-file-group .file-list li + li {
|
||||
margin-top: 0.8rem;
|
||||
}
|
||||
|
||||
input[type=datetime-local] {
|
||||
position: relative;
|
||||
background: url("../images/common/ico_calendar.svg") no-repeat right 16px center/20px auto;
|
||||
}
|
||||
|
||||
input[type=datetime-local]::-webkit-calendar-picker-indicator {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.date-range-group {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
.date-range-group .component-input {
|
||||
width: -webkit-fit-content !important;
|
||||
width: -moz-fit-content !important;
|
||||
width: fit-content !important;
|
||||
}
|
||||
.date-range-group .component-input .input-field {
|
||||
width: 23rem;
|
||||
}
|
||||
|
||||
/* component checkbox */
|
||||
.component-input {
|
||||
/* component checkbox switch */
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
<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">
|
||||
<form autocomplete="off" method="get" name="reqHouseholdForm" id="reqHouseholdForm">
|
||||
<form autocomplete="off" method="get" name="reqHouseholdForm" id="reqHouseholdForm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-content-inner">
|
||||
<section class="filter-wrap">
|
||||
<div class="form-area">
|
||||
<input type="hidden" name="page" th:field="*{reqVO.page}"/>
|
||||
<input type="hidden" name="researcherSeq" id="researcherSeq" th:value="${researcherSeq}">
|
||||
<input type="hidden" name="regionMainCode" th:value="${regionMainCode}">
|
||||
@@ -89,54 +89,55 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="component-btns">
|
||||
<div class="btns-row">
|
||||
<button type="button" class="btn" onclick="resetSearchForm()">
|
||||
<span class="btn-txt">초기화</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" th:onclick="|searchHouseholdList(0,${regionMainCode})|">
|
||||
<span class="btn-txt">검색</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p class="input-label" style="font-size: 16px;">
|
||||
총 <span id="mappingHouseholdTotalElements"></span>건
|
||||
</p>
|
||||
<table id="householdTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>임가번호</th>
|
||||
<th>경영주명</th>
|
||||
<th>휴대폰번호</th>
|
||||
<th>실사</th>
|
||||
<th>지역</th>
|
||||
<th>세부지역</th>
|
||||
<th>조사원</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="mappingHousehold-list"></tbody>
|
||||
</table>
|
||||
<!-- 페이지네이션 -->
|
||||
<div class="row paging"></div>
|
||||
|
||||
<!-- 등록 버튼 -->
|
||||
<div class="component-btns bottom-btn-group" th:fragment="modalButtons">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn btn-primary" onclick="registerHouseholds()">
|
||||
<span class="btn-txt">등록</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="component-btns">
|
||||
<div class="btns-row">
|
||||
<button type="button" class="btn" onclick="resetSearchForm()">
|
||||
<span class="btn-txt">초기화</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" th:onclick="|searchHouseholdList(0,${regionMainCode})|">
|
||||
<span class="btn-txt">검색</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p class="input-label" style="font-size: 16px;">
|
||||
총 <span id="mappingHouseholdTotalElements"></span>건
|
||||
</p>
|
||||
<table id="householdTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택</th>
|
||||
<th>임가번호</th>
|
||||
<th>경영주명</th>
|
||||
<th>휴대폰번호</th>
|
||||
<th>실사</th>
|
||||
<th>지역</th>
|
||||
<th>세부지역</th>
|
||||
<th>조사원</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="mappingHousehold-list"></tbody>
|
||||
</table>
|
||||
<!-- 페이지네이션 -->
|
||||
<div class="row paging"></div>
|
||||
|
||||
<!-- 등록 버튼 -->
|
||||
<div class="component-btns bottom-btn-group" th:fragment="modalButtons">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn btn-primary" onclick="registerHouseholds()">
|
||||
<span class="btn-txt">등록</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<button class="modal-close"></button>
|
||||
</div>
|
||||
<button class="modal-close"></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
tbody.append(
|
||||
`
|
||||
<tr data-id="${ct.seq}">
|
||||
<td class="underline"><a href="">${ct.householdNum}</a></td>
|
||||
<td><a href="#">${ct.householdNum}</a></td>
|
||||
<td>${ct.ownerName || '-'}</td>
|
||||
<td>${ct.phone || '-'}</td>
|
||||
<td>${ct.regionMainCodeName || '-'}</td>
|
||||
@@ -271,7 +271,7 @@
|
||||
<input class="form-check-input" name="selectIds" type="checkbox" value="${ct.id}"/>
|
||||
</label>
|
||||
</td>
|
||||
<td class="underline"><a href="#" onclick="showHouseholdModal2(${ct.id});">${ct.householdNum}</a></td>
|
||||
<td><a href="#" onclick="showHouseholdModal2(${ct.id});">${ct.householdNum}</a></td>
|
||||
<td>${ct.ownerName}</td>
|
||||
<td>${ct.visitDate}</td>
|
||||
<td>${ct.managementType}</td>
|
||||
|
||||
@@ -15,71 +15,75 @@
|
||||
<section>
|
||||
<form autocomplete="off" method="get" name="householdVisitReqForm" >
|
||||
<input type="hidden" name="id" id="id" />
|
||||
<table class="type-form confirm" >
|
||||
<tbody id="household-visit-detail">
|
||||
<tr>
|
||||
<th>방문일</th>
|
||||
<td>
|
||||
<div class="component-datepicker">
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" class="datepicker-btn-trigger" name="visitDate" id="visitDate" aria-label="방문일"
|
||||
placeholder="방문일을 입력해주세요" />
|
||||
<span class="input-field-btn datepicker-state">
|
||||
<table class="type-form confirm" >
|
||||
<tbody id="household-visit-detail">
|
||||
<tr>
|
||||
<th>방문일</th>
|
||||
<td>
|
||||
<div class="component-datepicker">
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" class="datepicker-btn-trigger" name="visitDate" id="visitDate" aria-label="시작일"
|
||||
placeholder="방문일을 입력해주세요" />
|
||||
<span class="input-field-btn datepicker-state">
|
||||
<span class="hide-txt">달력</span>
|
||||
<i class="ico-calendar ico-normal" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>관리분야</th>
|
||||
<td>
|
||||
<select id="managementType" name="managementType">
|
||||
<option value="">선택하세요</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>내용</th>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<div class="input-textarea-field">
|
||||
<textarea id="content" name="content" class="textarea" placeholder=""></textarea>
|
||||
</td>
|
||||
<th>관리분야</th>
|
||||
<td>
|
||||
<div class="d-flex">
|
||||
<div class="component-select">
|
||||
<select id="managementType" name="managementType" class="select-list" required>
|
||||
<option value="">선택하세요</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>답례품 전달</th>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="is_gift_sent_y" name="isGiftSent">
|
||||
<span class="radio-item">
|
||||
<span class="radio-txt">전달</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="is_gift_sent_n" name="isGiftSent">
|
||||
<span class="radio-item">
|
||||
<span class="radio-txt">미전달</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="component-btns bottom-btn-group" th:fragment="modalButtons">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn btn-primary" onclick="updateHouseholdVisit()">
|
||||
<span class="btn-txt">수정</span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>내용</th>
|
||||
<td colspan="5">
|
||||
<div class="component-input">
|
||||
<div class="input-textarea-field">
|
||||
<textarea id="textarea_note" class="textarea" name="content" placeholder=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>답례품 전달</th>
|
||||
<td class="radio-group">
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="is_gift_sent_y" name="isGiftSent">
|
||||
<span class="radio-item">
|
||||
<span class="radio-txt">전달</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="is_gift_sent_n" name="isGiftSent">
|
||||
<span class="radio-item">
|
||||
<span class="radio-txt">미전달</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="component-btns bottom-btn-group" th:fragment="modalButtons">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn btn-primary" onclick="updateHouseholdVisit()">
|
||||
<span class="btn-txt">수정</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
@@ -97,8 +101,22 @@
|
||||
});
|
||||
|
||||
const showHouseholdModal2 = (seq) => {
|
||||
document.querySelector(".modal02").ui.open();
|
||||
//initFlatpickr();
|
||||
const modal = document.querySelector(".modal02");
|
||||
modal.ui.open();
|
||||
const $el = document.querySelector('.component-datepicker');
|
||||
const datepicker = etUI.components.DatepickerComp();
|
||||
datepicker.core.init($el, {
|
||||
dateSelectCallback: function (selectedDate) {
|
||||
console.log('선택된 날짜:', selectedDate);
|
||||
}
|
||||
});
|
||||
|
||||
datepickerInstance = datepicker.getDatepickerInstance();
|
||||
|
||||
// 초기 상태 오늘 날짜로
|
||||
if (datepickerInstance) {
|
||||
datepickerInstance.setDate(new Date(), { render: true });
|
||||
}
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/researcher/visitHousehold/'+seq,
|
||||
@@ -123,13 +141,15 @@
|
||||
const setFormData = (data) => {
|
||||
// 폼 필드에 데이터 세팅
|
||||
const f = document.householdVisitReqForm;
|
||||
if (data.visitDate) {
|
||||
const visitDate = data.visitDate.substring(0, 10); // 'YYYY-MM-DD' 형식
|
||||
if (visitDatePicker) {
|
||||
f.visitDate.value = visitDate; // 입력 필드 먼저 설정
|
||||
visitDatePicker.setDate(visitDate); // Flatpickr 동기화
|
||||
}
|
||||
|
||||
if (datepickerInstance && data.visitDate) {
|
||||
|
||||
console.log(data.visitDate);
|
||||
console.log(new Date(data.visitDate));
|
||||
|
||||
datepickerInstance.setDate(new Date(data.visitDate), { render: true });
|
||||
}
|
||||
|
||||
if (data.managementType) {
|
||||
f.managementType.value= data.managementType;
|
||||
}
|
||||
@@ -161,27 +181,48 @@
|
||||
visitDatePicker = null;
|
||||
}
|
||||
|
||||
// 1. input 요소가 실제로 존재하는지 확인
|
||||
// 입력 요소 확인
|
||||
const input = document.getElementById('visitDate');
|
||||
if (!input) {
|
||||
console.warn('#visitDate input not found!');
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. input에 값이 있으면 flatpickr와 동기화
|
||||
// 현재 값 가져오기
|
||||
const currentVal = input.value;
|
||||
|
||||
// 3. flatpickr 초기화
|
||||
visitDatePicker = flatpickr(input, {
|
||||
dateFormat: 'Y-m-d',
|
||||
defaultDate: currentVal || null, // 현재 값으로 초기 선택 날짜 설정
|
||||
enableTime: false,
|
||||
clickOpens: true,
|
||||
onChange: function (selectedDates, dateStr, instance) {
|
||||
console.log('날짜 선택됨:', dateStr);
|
||||
input.value = dateStr; // 수동으로 input 값 동기화
|
||||
},
|
||||
});
|
||||
// Flatpickr 초기화
|
||||
try {
|
||||
visitDatePicker = flatpickr(input, {
|
||||
dateFormat: 'Y-m-d',
|
||||
defaultDate: currentVal || null,
|
||||
enableTime: false,
|
||||
clickOpens: true,
|
||||
onReady: function () {
|
||||
console.log('Flatpickr 초기화 완료');
|
||||
},
|
||||
onChange: function (selectedDates, dateStr, instance) {
|
||||
console.log('날짜 선택됨:', dateStr);
|
||||
input.value = dateStr; // 입력 필드 동기화
|
||||
},
|
||||
onOpen: function () {
|
||||
console.log('Flatpickr 캘린더 열림');
|
||||
},
|
||||
onClose: function () {
|
||||
console.log('Flatpickr 캘린더 닫힘');
|
||||
}
|
||||
});
|
||||
|
||||
// 입력 필드 클릭 이벤트 추가 (보조)
|
||||
input.addEventListener('click', () => {
|
||||
console.log('visitDate 입력 필드 클릭됨');
|
||||
if (visitDatePicker) {
|
||||
visitDatePicker.open(); // 수동으로 캘린더 열기
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Flatpickr 초기화 실패:', error);
|
||||
}
|
||||
};
|
||||
|
||||
const updateHouseholdVisit = () => {
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
tbody.append(
|
||||
`
|
||||
<tr data-id="${ct.id}">
|
||||
<td class="underline"><a href="javascript:goDetail(${ct.seq})">${ct.name || '-'}</a></td>
|
||||
<td><a href="javascript:goDetail(${ct.seq})">${ct.name || '-'}</a></td>
|
||||
<td>${ct.phone || '-'}</td>
|
||||
<td>${ct.regionMainCodeName || '-'}</td>
|
||||
<td>${ct.householdCount || '-'}</td>
|
||||
|
||||
Reference in New Issue
Block a user