[BO] 임가현황 리스트, 상세 작업 중 (2)

This commit is contained in:
kangsunlee
2025-06-13 19:15:58 +09:00
parent 4df2e17ab2
commit 1891ce5541
42 changed files with 644 additions and 86 deletions

View File

@@ -9,6 +9,9 @@
<input name="page" th:field="*{page}" type="hidden"/>
<input name="size" th:field="*{size}" type="hidden"/>
<input name="userRole" th:value="${userRole}" type="hidden"/>
<input name="userRegionMainCode" th:value="${userRegionMainCode}" type="hidden"/>
<div>
<label>입력월</label>
<select name="recordMonth" th:field="*{recordMonth}">
@@ -98,13 +101,15 @@
<option value="false">미전달</option>
</select>
<label>조사원</label>
<select name="researcherField" th:field="*{researcherField}">
<option value="">전체</option>
<option value="name">이름</option>
<option value="phone">전화번호</option>
</select>
<input type="text" name="researcherValue" placeholder="" th:field="*{researcherValue}">
<span class="hide-role-researcher">
<label>조사원</label>
<select name="researcherField" th:field="*{researcherField}">
<option value="">전체</option>
<option value="name">이름</option>
<option value="phone">전화번호</option>
</select>
<input type="text" name="researcherValue" placeholder="" th:field="*{researcherValue}">
</span>
<label>패널 유지 여부</label>
<select name="isPanel" th:field="*{isPanel}">
@@ -137,8 +142,8 @@
<th style="width: 100px;">1차 방문일</th>
<th style="width: 100px;">2차 방문일</th>
<th style="width: 100px;">답례품 전달</th>
<th style="width: 80px;">조사원</th>
<th style="width: 120px;">조사원 휴대전화</th>
<th style="width: 80px;" class="hide-role-researcher">조사원</th>
<th style="width: 120px;" class="hide-role-researcher">조사원 휴대전화</th>
</tr>
</thead>
<tbody id="listTBody">
@@ -195,8 +200,8 @@
<td>${isEmpty(ct.firstVisitDate)}</td> <!-- 1차방문날짜 -->
<td>${isEmpty(ct.secondVisitDate)}</td> <!-- 2차방문날짜 -->
<td>${ct.isGiftSent ? "전달" : "미전달"}</td> <!-- 답례품 -->
<td>${isEmpty(ct.researcherName)}</td> <!-- 조사원이름 -->
<td>${isEmpty(ct.researcherPhone)}</td> <!-- 조사원번호 -->
<td class="hide-role-researcher">${isEmpty(ct.researcherName)}</td> <!-- 조사원이름 -->
<td class="hide-role-researcher">${isEmpty(ct.researcherPhone)}</td> <!-- 조사원번호 -->
</tr>
`
);
@@ -210,6 +215,13 @@
`);
}
// 조사원일 경우 조사원이름, 번호 hide
if (f.userRole.value === 'ROLE_RESEARCHER') {
$('.hide-role-researcher').hide();
} else {
$('.hide-role-researcher').show();
}
// Pagination 구성하기
const paging = $('.paging');
paging.empty();
@@ -237,6 +249,7 @@
</script>
<script>
// TODO : 이거 공통으로 뺄지 ?
function isEmpty(value, fallback = '-') {
return value !== null && value !== undefined && value !== '' ? value : fallback;
}