Merge branch 'dev' into deploy-dev-front
This commit is contained in:
@@ -43,8 +43,10 @@ class UpdateNoticeController {
|
|||||||
updateFilePortIn.operate(
|
updateFilePortIn.operate(
|
||||||
new UpdateFileCmd(
|
new UpdateFileCmd(
|
||||||
reqVO.getId(),
|
reqVO.getId(),
|
||||||
reqVO.getFileMappingId().stream().map(Long::parseLong).toList(),
|
reqVO.getFileMappingId() != null
|
||||||
FileUploadType.NOTICE)
|
? reqVO.getFileMappingId().stream().map(Long::parseLong).toList()
|
||||||
|
: List.of(),
|
||||||
|
FileUploadType.NOTICE)
|
||||||
);
|
);
|
||||||
|
|
||||||
updateNoticePortIn.operate(
|
updateNoticePortIn.operate(
|
||||||
|
|||||||
@@ -10,19 +10,24 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Repository
|
@Repository
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
class SaveHouseholdVisitInfoDao implements SaveHouseholdVisitInfoPortOut {
|
class SaveHouseholdVisitInfoDao implements SaveHouseholdVisitInfoPortOut {
|
||||||
private final SaveHouseholdVisitInfoMapper mapper;
|
private final SaveHouseholdVisitInfoMapper mapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void operate(SaveHouseholdVisitInfoCmd cmd) {
|
public void operate(SaveHouseholdVisitInfoCmd cmd) {
|
||||||
if (cmd.getVisitInfoId() != null) {
|
// 답례품 전달 완료일 경우 기존 방문들 중 true → false로 변경
|
||||||
mapper.findById(cmd.getHouseholdSeq())
|
if (Boolean.TRUE.equals(cmd.getIsGiftSent())) {
|
||||||
.ifPresentOrElse(
|
mapper.updateGiftSentToFalse(AuditUtil.update(cmd));
|
||||||
v -> mapper.updateHouseholdVisitInfo(AuditUtil.update(cmd)),
|
}
|
||||||
() -> { throw new IllegalArgumentException("방문정보가 없습니다."); }
|
|
||||||
);
|
if (cmd.getVisitInfoId() != null) {
|
||||||
} else {
|
mapper.findById(cmd.getHouseholdSeq())
|
||||||
mapper.createHouseholdVisitInfo(AuditUtil.create(cmd));
|
.ifPresentOrElse(v -> mapper.updateHouseholdVisitInfo(AuditUtil.update(cmd)),
|
||||||
|
() -> {
|
||||||
|
throw new IllegalArgumentException("방문정보가 없습니다.");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
mapper.createHouseholdVisitInfo(AuditUtil.create(cmd));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -9,4 +9,6 @@ public interface SaveHouseholdVisitInfoMapper {
|
|||||||
Optional<Long> findById(Long id);
|
Optional<Long> findById(Long id);
|
||||||
void createHouseholdVisitInfo(SaveHouseholdVisitInfoCmd cmd);
|
void createHouseholdVisitInfo(SaveHouseholdVisitInfoCmd cmd);
|
||||||
void updateHouseholdVisitInfo(SaveHouseholdVisitInfoCmd cmd);
|
void updateHouseholdVisitInfo(SaveHouseholdVisitInfoCmd cmd);
|
||||||
|
void updateGiftSentToFalse(SaveHouseholdVisitInfoCmd cmd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ public class ResearcherDao implements ResearcherPortOut {
|
|||||||
@Override
|
@Override
|
||||||
@UpdateCommand
|
@UpdateCommand
|
||||||
public Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO) {
|
public Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO) {
|
||||||
|
if(Boolean.TRUE.equals(reqVO.getIsGiftSent())) {
|
||||||
|
researcherMapper.updateGiftSentToFalse(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
return researcherMapper.updateVisitHousehold(reqVO);
|
return researcherMapper.updateVisitHousehold(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public interface ResearcherMapper {
|
|||||||
List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
||||||
ResearchersHouseholdVisitDto visitHouseholdDetail(Integer id);
|
ResearchersHouseholdVisitDto visitHouseholdDetail(Integer id);
|
||||||
Long visitHouseholdListCountAll(ResearchersDetailReqVO reqVO);
|
Long visitHouseholdListCountAll(ResearchersDetailReqVO reqVO);
|
||||||
|
void updateGiftSentToFalse(ResearchersVisitDetailReqVO reqVO);
|
||||||
Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO);
|
Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO);
|
||||||
VisitHouseholdPercentageDto selectVisitHouseholdPercentage(ResearchersDetailReqVO reqVO);
|
VisitHouseholdPercentageDto selectVisitHouseholdPercentage(ResearchersDetailReqVO reqVO);
|
||||||
Integer visitHouseholdDelete(@Param("selectIds") List<Integer> selectIds,@Param("deletedBy") String deletedBy);
|
Integer visitHouseholdDelete(@Param("selectIds") List<Integer> selectIds,@Param("deletedBy") String deletedBy);
|
||||||
|
|||||||
@@ -12,8 +12,9 @@ import java.time.LocalDateTime;
|
|||||||
@Setter
|
@Setter
|
||||||
public class ResearchersVisitDetailReqVO extends AuditCommand {
|
public class ResearchersVisitDetailReqVO extends AuditCommand {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
private Long householdSeq;
|
||||||
private LocalDate visitDate;
|
private LocalDate visitDate;
|
||||||
private ManagementType managementType;
|
private ManagementType managementType;
|
||||||
private String content;
|
private String content;
|
||||||
private String isGiftSent;
|
private Boolean isGiftSent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<foreach collection="householdSeqs" item="householdSeq" separator=",">
|
<foreach collection="householdSeqs" item="householdSeq" separator=",">
|
||||||
(
|
(
|
||||||
nextval('researcher_has_household_seq'),
|
nextval('researcher_has_household_seq'),
|
||||||
#{researcherSeq},
|
#{adminSeq},
|
||||||
#{householdSeq},
|
#{householdSeq},
|
||||||
<include refid="common.fields.CreateUpdateBaseValues"/>
|
<include refid="common.fields.CreateUpdateBaseValues"/>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -17,6 +17,6 @@
|
|||||||
WHERE household_seq = #{householdSeq}
|
WHERE household_seq = #{householdSeq}
|
||||||
AND TO_CHAR(visit_date, 'YYYYMM') = #{recordMonth}
|
AND TO_CHAR(visit_date, 'YYYYMM') = #{recordMonth}
|
||||||
AND hv.is_deleted = false
|
AND hv.is_deleted = false
|
||||||
ORDER BY hv.created_at
|
ORDER BY hv.visit_date
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -44,6 +44,7 @@
|
|||||||
JOIN researcher_has_household rhh ON v.household_seq = rhh.household_seq
|
JOIN researcher_has_household rhh ON v.household_seq = rhh.household_seq
|
||||||
WHERE TO_CHAR(v.visit_date, 'YYYYMM') = #{cmd.recordMonth}
|
WHERE TO_CHAR(v.visit_date, 'YYYYMM') = #{cmd.recordMonth}
|
||||||
AND rhh.is_deleted = false
|
AND rhh.is_deleted = false
|
||||||
|
AND v.is_deleted = false
|
||||||
) sub
|
) sub
|
||||||
WHERE rn <= 2
|
WHERE rn <= 2
|
||||||
GROUP BY household_seq
|
GROUP BY household_seq
|
||||||
|
|||||||
@@ -37,6 +37,17 @@
|
|||||||
WHERE id = #{visitInfoId}
|
WHERE id = #{visitInfoId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateGiftSentToFalse">
|
||||||
|
/* updateGiftSentToFalse : 동일 household_seq 의 다른 방문 중 전달여부 true → false */
|
||||||
|
UPDATE household_visit
|
||||||
|
SET is_gift_sent = false
|
||||||
|
WHERE household_seq = #{householdSeq}
|
||||||
|
AND TO_CHAR(visit_date, 'YYYYMM') = TO_CHAR(TO_DATE(#{visitDate}, 'YYYY-MM-DD'), 'YYYYMM')
|
||||||
|
AND is_gift_sent = true
|
||||||
|
AND (#{visitInfoId} IS NULL OR id != #{visitInfoId})
|
||||||
|
AND is_deleted = false
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="findById" resultType="java.lang.Long">
|
<select id="findById" resultType="java.lang.Long">
|
||||||
/* findById : 임가방문정보 조회 */
|
/* findById : 임가방문정보 조회 */
|
||||||
SELECT id
|
SELECT id
|
||||||
|
|||||||
@@ -106,11 +106,11 @@
|
|||||||
from household h
|
from household h
|
||||||
join researcher_has_household rhh ON h.seq = rhh.household_seq and rhh.is_deleted = false
|
join researcher_has_household rhh ON h.seq = rhh.household_seq and rhh.is_deleted = false
|
||||||
join admin a ON a.seq = rhh.admin_seq and a.is_deleted = false
|
join admin a ON a.seq = rhh.admin_seq and a.is_deleted = false
|
||||||
left join uicode rm ON rm.parent_id = 'code.region.main' AND rm.id = h.region_main_code
|
left join uicode rm ON rm.id = h.region_main_code
|
||||||
left join uicode rs ON rs.parent_id = 'code.region.sub' AND rs.id = h.region_sub_code
|
left join uicode rs ON rs.id = h.region_sub_code
|
||||||
left join uicode rd ON rd.id = h.region_detail_code
|
left join uicode rd ON rd.id = h.region_detail_code
|
||||||
left join uicode il ON il.parent_id = 'code.industry.large' AND il.id = h.industry_large_code
|
left join uicode il ON il.id = h.industry_large_code
|
||||||
left join uicode im ON im.parent_id = 'code.industry.middle' AND im.id = h.industry_middle_code
|
left join uicode im ON im.id = h.industry_middle_code
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="seq > 0">
|
<if test="seq > 0">
|
||||||
and rhh.admin_seq = #{seq}
|
and rhh.admin_seq = #{seq}
|
||||||
@@ -156,6 +156,7 @@
|
|||||||
<if test="searchMonth != null and searchMonth != ''">
|
<if test="searchMonth != null and searchMonth != ''">
|
||||||
and TO_CHAR(rhv.visit_date ,'YYYYMM')= #{searchMonth}
|
and TO_CHAR(rhv.visit_date ,'YYYYMM')= #{searchMonth}
|
||||||
</if>
|
</if>
|
||||||
|
order by rhv.visit_date
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectVisitHouseholdPercentage">
|
<select id="selectVisitHouseholdPercentage">
|
||||||
@@ -245,6 +246,17 @@
|
|||||||
where rhv.is_deleted = false and rhv.id = #{id}
|
where rhv.is_deleted = false and rhv.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateGiftSentToFalse">
|
||||||
|
/* updateGiftSentToFalse : 동일 household_seq 의 다른 방문 중 전달여부 true → false */
|
||||||
|
UPDATE household_visit
|
||||||
|
SET is_gift_sent = false
|
||||||
|
WHERE household_seq = #{householdSeq}
|
||||||
|
AND TO_CHAR(visit_date, 'YYYYMM') = TO_CHAR(#{visitDate}, 'YYYYMM')
|
||||||
|
AND is_gift_sent = true
|
||||||
|
AND (#{id} IS NULL OR id != #{id})
|
||||||
|
AND is_deleted = false
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="updateVisitHousehold">
|
<update id="updateVisitHousehold">
|
||||||
update household_visit
|
update household_visit
|
||||||
set visit_date = #{visitDate},
|
set visit_date = #{visitDate},
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
<tbody id="mappingHousehold-list"></tbody>
|
<tbody id="mappingHousehold-list"></tbody>
|
||||||
</table>
|
</table>
|
||||||
<!-- 페이지네이션 -->
|
<!-- 페이지네이션 -->
|
||||||
<div class="row paging"></div>
|
<div class="row mapping-paging"></div>
|
||||||
|
|
||||||
<!-- 등록 버튼 -->
|
<!-- 등록 버튼 -->
|
||||||
<div class="component-btns bottom-btn-group" th:fragment="modalButtons">
|
<div class="component-btns bottom-btn-group" th:fragment="modalButtons">
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<button class="modal-close"></button>
|
<button type="button" class="modal-close"></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
// Pagination 구성하기
|
// Pagination 구성하기
|
||||||
const paging = $('.paging');
|
const paging = $('.mapping-paging');
|
||||||
paging.empty();
|
paging.empty();
|
||||||
paging.append(
|
paging.append(
|
||||||
uiUtil.getPagingUI(pageNo, response.size, response.totalPages,
|
uiUtil.getPagingUI(pageNo, response.size, response.totalPages,
|
||||||
@@ -257,6 +257,7 @@
|
|||||||
function (response) {
|
function (response) {
|
||||||
if (response === selectedIds.length) {
|
if (response === selectedIds.length) {
|
||||||
alert('맵핑 완료되었습니다.');
|
alert('맵핑 완료되었습니다.');
|
||||||
|
getHouseholdList(0);
|
||||||
}
|
}
|
||||||
document.querySelector(".modal01").ui.close();
|
document.querySelector(".modal01").ui.close();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,27 +20,21 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
<p class="label-txt">
|
<p class="label-txt">
|
||||||
검색필드
|
공지사항
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-select">
|
<div class="d-flex">
|
||||||
<select class="select-list" th:field="*{searchField}" id="searchField">
|
<div class="component-select">
|
||||||
<option value="all" selected>전체</option>
|
<select class="select-list" required th:field="*{searchField}">
|
||||||
<option value="title">제목</option>
|
<option value="all" selected>전체</option>
|
||||||
<option value="updatedBy">작성자</option>
|
<option value="title">제목</option>
|
||||||
</select>
|
<option value="content">내용</option>
|
||||||
</div>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="component-input">
|
||||||
<div class="input-group">
|
<div class="input-field">
|
||||||
<div class="input-label">
|
<input type="text" id="searchValue" th:field="*{searchValue}" placeholder="검색어를 입력하세요." onkeypress="if(event.key === 'Enter') goSearch();">
|
||||||
<p class="label-txt">
|
</div>
|
||||||
검색필드
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="component-input">
|
|
||||||
<div class="input-field">
|
|
||||||
<input type="text" id="searchValue" th:field="*{searchValue}" placeholder="검색어를 입력하세요.">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,18 +42,17 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
<p class="label-txt">
|
<p class="label-txt">
|
||||||
검색필드
|
노출여부
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" th:field="*{searchOpen}" id="searchOpen">
|
<select class="select-list" th:field="*{searchOpen}" id="searchOpen">
|
||||||
<option value="" selected>전체</option>
|
<option value="" selected>전체</option>
|
||||||
<option value="true">Y</option>
|
<option value="true">Y</option>
|
||||||
<option value="false">N</option>
|
<option value="false">N</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 버튼 그룹 -->
|
<!-- 버튼 그룹 -->
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<p class="input-label" style="font-size: 16px; font-weight: bold;">내용</p>
|
<p class="input-label" style="font-size: 16px; font-weight: bold;">내용</p>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-textarea-field">
|
<div class="input-textarea-field">
|
||||||
<textarea id="memo" name="memo" class="textarea" placeholder="" th:text="${item.content}"></textarea>
|
<textarea id="memo" name="memo" class="textarea" placeholder="" th:text="${item.content}" readonly></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="text" class="datepicker-btn-trigger" name="visitDate" id="visitDate" aria-label="시작일"
|
<input type="text" class="datepicker-btn-trigger" name="visitDate" id="visitDate" aria-label="시작일"
|
||||||
placeholder="시작일을 입력해주세요" />
|
placeholder="방문일을 입력해주세요" />
|
||||||
<span class="input-field-btn datepicker-state">
|
<span class="input-field-btn datepicker-state">
|
||||||
<span class="hide-txt">달력</span>
|
<span class="hide-txt">달력</span>
|
||||||
<i class="ico-calendar ico-normal" aria-hidden="true"></i>
|
<i class="ico-calendar ico-normal" aria-hidden="true"></i>
|
||||||
|
|||||||
@@ -218,22 +218,21 @@
|
|||||||
document.querySelectorAll('input[name="forestRemoveIds"]:checked')
|
document.querySelectorAll('input[name="forestRemoveIds"]:checked')
|
||||||
).map(el => Number(el.value));
|
).map(el => Number(el.value));
|
||||||
|
|
||||||
const totalRows = document.querySelectorAll('input[name="forestRemoveIds"]').length;
|
|
||||||
|
|
||||||
if(checkedIds.length <= 0) {
|
if(checkedIds.length <= 0) {
|
||||||
alert("임산물을 선택해주세요.");
|
alert("임산물을 선택해주세요.");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkedIds.length === totalRows) {
|
|
||||||
alert("등록내용은 최소 1건이 남아있어야 합니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
etUI.dialog.confirm({
|
etUI.dialog.confirm({
|
||||||
title: '삭제 안내',
|
title: '삭제 안내',
|
||||||
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
|
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
|
||||||
positiveCallback: function () {
|
positiveCallback: function () {
|
||||||
|
const totalRows = document.querySelectorAll('.row-class').length;
|
||||||
|
|
||||||
|
if (totalRows - checkedIds.length <= 0) {
|
||||||
|
alert("등록내용은 최소 1건이 남아 있어야 합니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
removeForestProduct(checkedIds);
|
removeForestProduct(checkedIds);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<button type="button" class="btn small btn-secondary" onclick="showDeleteVisitInfoConfirm();">
|
<button type="button" class="btn small btn-secondary" onclick="showDeleteVisitInfoConfirm();">
|
||||||
<span class=" btn-txt">삭제</span>
|
<span class=" btn-txt">삭제</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn small btn-primary" onclick="showVisitInfoModal();">
|
<button type="button" class="btn small btn-primary" id="visitAddBtn" onclick="showVisitInfoModal();">
|
||||||
<span class="btn-txt">추가</span>
|
<span class="btn-txt">추가</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
const tbody = $('.tab-content.household-visit tbody');
|
const tbody = $('.tab-content.household-visit tbody');
|
||||||
|
|
||||||
tbody.empty();
|
tbody.empty();
|
||||||
|
$('#visitAddBtn').toggle(response.length < 2);
|
||||||
|
|
||||||
if(response.length === 0) {
|
if(response.length === 0) {
|
||||||
tbody.append(`<tr><td colspan="6" style="text-align: center;">등록이 필요합니다.</td></tr>`);
|
tbody.append(`<tr><td colspan="6" style="text-align: center;">등록이 필요합니다.</td></tr>`);
|
||||||
|
|||||||
@@ -177,6 +177,12 @@
|
|||||||
</section>
|
</section>
|
||||||
<th:block layout:fragment="script">
|
<th:block layout:fragment="script">
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
|
const managementType = {
|
||||||
|
VISIT: "방문조사",
|
||||||
|
CALL: "전화상담",
|
||||||
|
ETC: "기타"
|
||||||
|
};
|
||||||
|
|
||||||
// 탭 클릭 시 함수 호출
|
// 탭 클릭 시 함수 호출
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
const tabButtons = document.querySelectorAll('.tab-label');
|
const tabButtons = document.querySelectorAll('.tab-label');
|
||||||
@@ -325,9 +331,12 @@
|
|||||||
<td><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.ownerName}</td>
|
||||||
<td>${ct.visitDate}</td>
|
<td>${ct.visitDate}</td>
|
||||||
<td>${ct.managementType}</td>
|
<td>${managementType[ct.managementType]}</td>
|
||||||
<td><a href="javascript:void(0);" class="ellipsis" style="text-decoration: none;">${ct.content}</a></td>
|
<td><a href="javascript:void(0);" class="ellipsis" style="text-decoration: none;">${ct.content}</a></td>
|
||||||
<td>${ct.updatedAt}</td>
|
<td>
|
||||||
|
${ct.updatedBy}<br>
|
||||||
|
(${ct.updatedAt})
|
||||||
|
</td>
|
||||||
<td>${ct.isGiftSentFlag}</td>
|
<td>${ct.isGiftSentFlag}</td>
|
||||||
</tr>
|
</tr>
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<section>
|
<section>
|
||||||
<form autocomplete="off" method="get" name="householdVisitReqForm" >
|
<form autocomplete="off" method="get" name="householdVisitReqForm" >
|
||||||
<input type="hidden" name="id" id="id" />
|
<input type="hidden" name="id" id="id" />
|
||||||
|
<input type="hidden" name="householdSeq" id="householdSeq" />
|
||||||
<table class="type-form confirm" >
|
<table class="type-form confirm" >
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="8%" />
|
<col width="8%" />
|
||||||
@@ -67,7 +68,7 @@
|
|||||||
<td class="radio-group">
|
<td class="radio-group">
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<label class="radio-inner">
|
<label class="radio-inner">
|
||||||
<input type="radio" id="is_gift_sent_y" name="isGiftSent">
|
<input type="radio" id="is_gift_sent_y" name="isGiftSent" value="true">
|
||||||
<span class="radio-item">
|
<span class="radio-item">
|
||||||
<span class="radio-txt">전달</span>
|
<span class="radio-txt">전달</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<label class="radio-inner">
|
<label class="radio-inner">
|
||||||
<input type="radio" id="is_gift_sent_n" name="isGiftSent">
|
<input type="radio" id="is_gift_sent_n" name="isGiftSent" value="false">
|
||||||
<span class="radio-item">
|
<span class="radio-item">
|
||||||
<span class="radio-txt">미전달</span>
|
<span class="radio-txt">미전달</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -111,20 +112,6 @@
|
|||||||
const showHouseholdModal2 = (seq) => {
|
const showHouseholdModal2 = (seq) => {
|
||||||
const modal = document.querySelector(".modal02");
|
const modal = document.querySelector(".modal02");
|
||||||
modal.ui.open();
|
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(
|
ajaxUtil._ajaxMethod(
|
||||||
'/api/researcher/visitHousehold/'+seq,
|
'/api/researcher/visitHousehold/'+seq,
|
||||||
@@ -149,12 +136,8 @@
|
|||||||
const setFormData = (data) => {
|
const setFormData = (data) => {
|
||||||
// 폼 필드에 데이터 세팅
|
// 폼 필드에 데이터 세팅
|
||||||
const f = document.householdVisitReqForm;
|
const f = document.householdVisitReqForm;
|
||||||
|
// 날짜 세팅
|
||||||
if (datepickerInstance && data.visitDate) {
|
if (datepickerInstance && data.visitDate) {
|
||||||
|
|
||||||
console.log(data.visitDate);
|
|
||||||
console.log(new Date(data.visitDate));
|
|
||||||
|
|
||||||
datepickerInstance.setDate(new Date(data.visitDate), { render: true });
|
datepickerInstance.setDate(new Date(data.visitDate), { render: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,6 +146,7 @@
|
|||||||
}
|
}
|
||||||
f.content.value = data.content;
|
f.content.value = data.content;
|
||||||
f.id.value = data.id;
|
f.id.value = data.id;
|
||||||
|
f.householdSeq.value = data.householdSeq;
|
||||||
const isGift = data.isGiftSentFlag;
|
const isGift = data.isGiftSentFlag;
|
||||||
if (isGift === "t") {
|
if (isGift === "t") {
|
||||||
document.getElementById('is_gift_sent_y').checked = true;
|
document.getElementById('is_gift_sent_y').checked = true;
|
||||||
@@ -244,6 +228,7 @@
|
|||||||
function (response) {
|
function (response) {
|
||||||
alert('수정 완료되었습니다.');
|
alert('수정 완료되었습니다.');
|
||||||
closeModal();
|
closeModal();
|
||||||
|
getHouseholdVisitList();
|
||||||
},
|
},
|
||||||
function (code, rstData) {
|
function (code, rstData) {
|
||||||
console.error('Error updating data:', code, rstData);
|
console.error('Error updating data:', code, rstData);
|
||||||
@@ -262,6 +247,28 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let datepickerInstance = null;
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
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 });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</html>
|
</html>
|
||||||
@@ -35,10 +35,15 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
if (detail.getStartDate().getMonth() != detail.getEndDate().getMonth()) {
|
if (detail.getStartDate().getMonth() != detail.getEndDate().getMonth()) {
|
||||||
// 종료일의 달이 변경되면 시작일=종료일 처리
|
// 종료일의 달이 변경되면 시작일=종료일 처리
|
||||||
detail.setEndDate(detail.getStartDate());
|
detail.setEndDate(detail.getStartDate());
|
||||||
|
detail.setEndDay(dailyUtil.getLastDay(detail.getStartDate()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
detail.setLastDay(dailyUtil.isLastDay(detail.getEndDate()));
|
detail.setLastDay(dailyUtil.isLastDay(detail.getEndDate()));
|
||||||
|
if (detail.isLastDay()) {
|
||||||
|
detail.setEndDay(dailyUtil.getLastDay(detail.getStartDate()));
|
||||||
|
}
|
||||||
|
|
||||||
detail.setFarmingOpen(dailyUtil.isFarmingOpen(detail.getGroupNo(), detail.getEndDate()));
|
detail.setFarmingOpen(dailyUtil.isFarmingOpen(detail.getGroupNo(), detail.getEndDate()));
|
||||||
detail.setRegistrable(dailyUtil.isRegisterPossible(detail.getStartDate(), detail.getEndDate()));
|
detail.setRegistrable(dailyUtil.isRegisterPossible(detail.getStartDate(), detail.getEndDate()));
|
||||||
detail.setModifiable(dailyUtil.isModifiable(detail.getStartDate(), detail.getEndDate()));
|
detail.setModifiable(dailyUtil.isModifiable(detail.getStartDate(), detail.getEndDate()));
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ DELETE FROM uri WHERE id = 'uri.admin.communication.sms';
|
|||||||
-- 문자발송 메뉴 숨기기
|
-- 문자발송 메뉴 숨기기
|
||||||
-- update uri set show_on_navi = false, updated_at = now(), updated_by = 'INIT_DATA' where id ='uri.admin.communication.sms' ;
|
-- update uri set show_on_navi = false, updated_at = now(), updated_by = 'INIT_DATA' where id ='uri.admin.communication.sms' ;
|
||||||
|
|
||||||
|
-- 은행자동이체 내역 칼럼 타입 크기 변경
|
||||||
|
ALTER TABLE public.bank_auto_transfer ALTER COLUMN source_purpose TYPE varchar(100) USING source_purpose::varchar(100);
|
||||||
|
|
||||||
-- ====================================================================================================================
|
-- ====================================================================================================================
|
||||||
-- 문자 발송
|
-- 문자 발송
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||||
|
|||||||
@@ -204,40 +204,41 @@
|
|||||||
const clearAllItems = document.getElementById('clearAllItems');
|
const clearAllItems = document.getElementById('clearAllItems');
|
||||||
|
|
||||||
if (ENV.data.editable) {
|
if (ENV.data.editable) {
|
||||||
if(ENV.data.preEditable && ENV.data.pastBankList.length === 0 && ENV.data.currentMonth >= "202508"){
|
if( ENV.data.pastBankList.length === 0) {
|
||||||
callPastInfoBtn.disabled = true;
|
callPastInfoBtn.disabled = true;
|
||||||
|
|
||||||
const handlePageShow = function(event) {
|
if (ENV.data.preEditable && ENV.data.pastBankList.length === 0 && ENV.data.currentMonth >= "202508") {
|
||||||
if ('sessionStorage' in window && window['sessionStorage'] !== null) {
|
const handlePageShow = function (event) {
|
||||||
// history.back으로 돌아온 경우 (navigation.type == 2)
|
if ('sessionStorage' in window && window['sessionStorage'] !== null) {
|
||||||
if (event.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
// history.back으로 돌아온 경우 (navigation.type == 2)
|
||||||
sessionStorage.removeItem('pastInputAlertShown'); // 플래그 제거
|
if (event.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||||
return; // 알림창 표시하지 않음
|
sessionStorage.removeItem('pastInputAlertShown'); // 플래그 제거
|
||||||
}
|
return; // 알림창 표시하지 않음
|
||||||
|
}
|
||||||
|
|
||||||
// 페이지가 처음 로드되었거나 새로고침된 경우 (navigation.type == 0 또는 1)
|
// 페이지가 처음 로드되었거나 새로고침된 경우 (navigation.type == 0 또는 1)
|
||||||
if (event.persisted || (window.performance && window.performance.navigation.type <= 1)) {
|
if (event.persisted || (window.performance && window.performance.navigation.type <= 1)) {
|
||||||
kri.isReturn = true;
|
kri.isReturn = true;
|
||||||
const hasShownAlert = sessionStorage.getItem('pastInputAlertShown');
|
const hasShownAlert = sessionStorage.getItem('pastInputAlertShown');
|
||||||
if (!hasShownAlert && ENV.data.pastBankList.length === 0) {
|
if (!hasShownAlert && ENV.data.pastBankList.length === 0) {
|
||||||
callPastInfoBtn.disabled = true;
|
etUI.dialog.alert({
|
||||||
etUI.dialog.alert({
|
title: '지난달 정보 등록하기',
|
||||||
title: '지난달 정보 등록하기',
|
message: '지난달 정보를 아직 입력하지 않으셨네요.\n정확한 조사를 위해 지난달 정보를 입력해주세요.\n\n확인 버튼을 누르시면 지난달 은행자동이체 내역등록으로 이동합니다.',
|
||||||
message: '지난달 정보를 아직 입력하지 않으셨네요.\n정확한 조사를 위해 지난달 정보를 입력해주세요.\n\n확인 버튼을 누르시면 지난달 은행자동이체 내역등록으로 이동합니다.',
|
type: 'alert',
|
||||||
type: 'alert',
|
callback: function () {
|
||||||
callback: function() {
|
sessionStorage.setItem('pastInputAlertShown', 'true');
|
||||||
sessionStorage.setItem('pastInputAlertShown', 'true');
|
location.href = ENV.httpUrl.preMonth + "/" + ENV.data.pastBankId;
|
||||||
location.href = ENV.httpUrl.preMonth + "/" + ENV.data.pastBankId;
|
},
|
||||||
},
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
|
|
||||||
// 초기 로드 시 실행
|
// 초기 로드 시 실행
|
||||||
handlePageShow({ persisted: false, performance: window.performance });
|
handlePageShow({persisted: false, performance: window.performance});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ENV.data.currentStatus == "NONE") {
|
if (ENV.data.currentStatus == "NONE") {
|
||||||
if (ENV.data.pastStatus && ENV.data.pastStatus == "REGISTERED" && ENV.data.pastBankList.length > 0) {
|
if (ENV.data.pastStatus && ENV.data.pastStatus == "REGISTERED" && ENV.data.pastBankList.length > 0) {
|
||||||
@@ -474,15 +475,30 @@
|
|||||||
const field = form.elements.namedItem(key);
|
const field = form.elements.namedItem(key);
|
||||||
if (field) {
|
if (field) {
|
||||||
field.value = val;
|
field.value = val;
|
||||||
if(key == 'transferCategoryCode' && val == "code.bank.input.self"){
|
if(key === 'transferCategoryCode' && (val === "code.bank.input.self" || val === "code.bank.input.1" || val === "code.bank.input.4")){
|
||||||
document.getElementById(val+"_value").value = product["transferCategory"];
|
document.getElementById(val+"_value").value = product["transferCategory"];
|
||||||
}
|
}
|
||||||
if(key == 'unitCode' && val == "code.count.unit.self"){
|
if(key === 'unitCode' && val === "code.count.unit.self"){
|
||||||
document.getElementById("unitDiv").style.display = "";
|
document.getElementById("unitDiv").style.display = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (product.transferCategoryCode === "code.bank.input.self") {
|
||||||
|
const transferCategoryInput = document.getElementById(product.transferCategoryCode + "_value");
|
||||||
|
if (transferCategoryInput) {
|
||||||
|
transferCategoryInput.value = product.transferCategory || "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 단위 입력 필드 표시 여부 처리
|
||||||
|
if (product.unitCode === "code.count.unit.self") {
|
||||||
|
const unitDiv = document.getElementById("unitDiv");
|
||||||
|
if (unitDiv) {
|
||||||
|
unitDiv.style.display = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ENV.elementRefs.select.cropCodeSelect.setValue(product.cropCode);
|
ENV.elementRefs.select.cropCodeSelect.setValue(product.cropCode);
|
||||||
ENV.elementRefs.select.transferCategoryCodeSelect.setValue(product.transferCategoryCode);
|
ENV.elementRefs.select.transferCategoryCodeSelect.setValue(product.transferCategoryCode);
|
||||||
ENV.elementRefs.select.unitCodeSelect.setValue(product.unitCode);
|
ENV.elementRefs.select.unitCodeSelect.setValue(product.unitCode);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
|
||||||
@@ -41,20 +41,18 @@
|
|||||||
최근등록 : <span th:text="${dailyLatest}"></span></dd>
|
최근등록 : <span th:text="${dailyLatest}"></span></dd>
|
||||||
<dd class="date" th:if="${#strings.isEmpty(dailyLatest)}">등록된 일계부가 없습니다.</dd>
|
<dd class="date" th:if="${#strings.isEmpty(dailyLatest)}">등록된 일계부가 없습니다.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<!--/* TODO : 2차 오픈 */-->
|
|
||||||
<th:block th:if="${@systemProperties['spring.profiles.active'] eq 'local'}">
|
|
||||||
<th:block th:if="${notice != null}">
|
<th:block th:if="${notice != null}">
|
||||||
<a th:href="@{'/info/notice/' + ${notice.id}}" class="notice-box">
|
<a th:href="@{'/info/notice/' + ${notice.id}}" class="notice-box">
|
||||||
<p class="tit">공지사항</p>
|
<p class="tit">공지사항</p>
|
||||||
<p class="txt" th:text="${notice.title}"></p>
|
<p class="txt" th:text="${notice.title}"></p>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="notice-box nodata"
|
||||||
|
th:unless="${notice != null}">
|
||||||
|
<a href="/info/notice" class="tit">공지사항</a>
|
||||||
|
<a href="javascript:void(0)" class="txt">등록된 공지사항이 없습니다</a>
|
||||||
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
<div class="notice-box nodata"
|
|
||||||
th:unless="${notice != null}">
|
|
||||||
<a href="/info/notice" class="tit">공지사항</a>
|
|
||||||
<a href="javascript:void(0)" class="txt">등록된 공지사항이 없습니다</a>
|
|
||||||
</div>
|
|
||||||
</th:block>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="select-scroll">
|
<div class="select-scroll">
|
||||||
<ul class="">
|
<ul class="">
|
||||||
|
<li class="option" data-value="" th:classappend="${userInfo.tel1 == ''?' current':'' }">선택</li>
|
||||||
<li class="option" data-value="02" th:classappend="${userInfo.tel1 == '02'?' current':'' }">02</li>
|
<li class="option" data-value="02" th:classappend="${userInfo.tel1 == '02'?' current':'' }">02</li>
|
||||||
<li class="option" data-value="031" th:classappend="${userInfo.tel1 == '031'?' current':'' }">31</li>
|
<li class="option" data-value="031" th:classappend="${userInfo.tel1 == '031'?' current':'' }">31</li>
|
||||||
<li class="option" data-value="033" th:classappend="${userInfo.tel1 == '033'?' current':'' }">033</li>
|
<li class="option" data-value="033" th:classappend="${userInfo.tel1 == '033'?' current':'' }">033</li>
|
||||||
@@ -135,7 +136,6 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="regionSubCodeId" class="component-select bottom-sheet" data-props-default="지역 선택"
|
<div id="regionSubCodeId" class="component-select bottom-sheet" data-props-default="지역 선택"
|
||||||
data-props-type="bottomSheet">
|
data-props-type="bottomSheet">
|
||||||
<input type="hidden" name="regionSubCode" data-type="select" th:value="${userInfo.regionSubCode}">
|
<input type="hidden" name="regionSubCode" data-type="select" th:value="${userInfo.regionSubCode}">
|
||||||
@@ -150,7 +150,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="select-scroll">
|
<div class="select-scroll">
|
||||||
|
|
||||||
<ul class="">
|
<ul class="">
|
||||||
<!-- <th:block th:each="item : ${regionMainList}">-->
|
<!-- <th:block th:each="item : ${regionMainList}">-->
|
||||||
<!-- <li class="option" th:data-value="${item.id}"-->
|
<!-- <li class="option" th:data-value="${item.id}"-->
|
||||||
@@ -197,7 +196,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="text" id="temp_input_00023" placeholder="세부 주소를 입력해 주세요"
|
<input type="text" id="temp_input_00023" placeholder="전체 주소를 입력해 주세요"
|
||||||
th:field="*{address}" maxlength="50"/>
|
th:field="*{address}" maxlength="50"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -363,66 +362,73 @@
|
|||||||
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
|
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
|
||||||
},
|
},
|
||||||
confirmPopup() {
|
confirmPopup() {
|
||||||
|
//유효성 검사
|
||||||
|
const form = document.getElementById('reqForm');
|
||||||
|
kri.form.errorInit(form);
|
||||||
|
const selects = ['tel1', 'phone1', 'regionSubCode', 'regionDetailCode'];
|
||||||
|
selects.forEach(id => {
|
||||||
|
const sel = document.getElementById(id);
|
||||||
|
if (sel && sel.value) form[id].value = sel.value;
|
||||||
|
});
|
||||||
|
|
||||||
|
const errors = [];
|
||||||
|
if (!form.ownerName.value) errors.push({field: 'ownerName', message: '이름을 입력해 주세요.'});
|
||||||
|
if (!form.ownerAge.value) errors.push({field: 'ownerAge', message: '연령을 입력해 주세요.'});
|
||||||
|
if (form.ownerAge.value < 0 || form.ownerAge.value > 120) errors.push({field: 'ownerAge', message: '연령은 0세이상 120세 이하이어야 합니다.'});
|
||||||
|
if (form.tel1.value || form.tel2.value || form.tel3.value) {
|
||||||
|
if (!form.tel1.value || !form.tel2.value || !form.tel3.value) {
|
||||||
|
errors.push({ field: 'tel1', message: '가구 연락처를 모두 입력해 주세요.' });
|
||||||
|
} else {
|
||||||
|
const telRegex = /^(0[2-7][0-9]?)$/; // 지역번호 (예: 02, 031, 032 등)
|
||||||
|
if (!telRegex.test(form.tel1.value)) errors.push({ field: 'tel1', message: '가구 연락처를 입력해주세요' }); // 유효한 지역번호를 선택해 주세요.
|
||||||
|
if (form.tel2.value.length < 3 || form.tel2.value.length > 4) errors.push({ field: 'tel2', message: '가구 연락처를 입력해주세요.' });// 가구 연락처 중간 자리수는 3~4자리여야 합니다.
|
||||||
|
if (form.tel3.value.length !== 4) errors.push({ field: 'tel3', message: '가구 연락처를 입력해주세요.' }); // 가구 연락처 마지막 자리수는 4자리여야 합니다.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (form.phone1.value || form.phone2.value || form.phone3.value) {
|
||||||
|
if (form.tel2.value.length === 3) errors.push({ field: 'tel1', message: '핸드폰 번호를 입력해 주세요.' });
|
||||||
|
if (form.tel2.value.length < 3 || form.tel2.value.length > 4) errors.push({ field: 'tel2', message: '핸드폰 번호를 입력해 주세요.' });
|
||||||
|
if (form.tel3.value.length !== 4) errors.push({ field: 'tel3', message: '핸드폰 번호를 입력해 주세요.' });
|
||||||
|
}
|
||||||
|
if (!form.phone1.value ||!form.phone2.value || !form.phone3.value) errors.push({field: 'phone1', message: '휴대폰 번호를 입력해 주세요.'});
|
||||||
|
if (form.phone1.value.length < 2 || form.phone2.value.length < 3 || form.phone2.value.length > 4 || form.phone3.value.length < 3 || form.phone3.value.length > 4) errors.push({field: 'phone1', message: '휴대폰 번호를 입력해 주세요.'});
|
||||||
|
if (!form.regionSubCode.value) errors.push({field: 'regionSubCode', message: '지역을 선택해 주세요.'});
|
||||||
|
if (!form.regionDetailCode.value) errors.push({field: 'regionDetailCode', message: '세부 지역를 선택해 주세요.'});
|
||||||
|
if (!form.address.value) errors.push({field: 'address', message: '전체 주소를 입력해 주세요.'});
|
||||||
|
|
||||||
|
kri.form.error(errors);
|
||||||
|
if (errors.length > 0) return;
|
||||||
|
|
||||||
// 이름 변경 여부 처리
|
// 이름 변경 여부 처리
|
||||||
const currentName = document.querySelector('input[name="ownerName"]').value.trim();
|
const currentName = document.querySelector('input[name="ownerName"]').value.trim();
|
||||||
const isNameChanged = currentName !== ENV.initialOwnerName;
|
const isNameChanged = currentName !== ENV.initialOwnerName;
|
||||||
|
if(isNameChanged){
|
||||||
formControl.updateUserInfo(isNameChanged);
|
ENV.module.confirmPopup.open();
|
||||||
|
}else {
|
||||||
|
formControl.updateUserInfo();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
confirmPopupOk() {
|
confirmPopupOk() {
|
||||||
ENV.module.confirmPopup.close();
|
ENV.module.confirmPopup.close();
|
||||||
|
formControl.updateUserInfo();
|
||||||
setTimeout(() => {
|
|
||||||
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, () => {
|
|
||||||
location.href = '/info';
|
|
||||||
});
|
|
||||||
}, 500);
|
|
||||||
},
|
},
|
||||||
updateUserInfo(showPopupIfValidNameChanged = false) {
|
updateUserInfo() {
|
||||||
|
|
||||||
const f = document.reqForm;
|
const f = document.reqForm;
|
||||||
// // TODO 어쩔수 없이 이렇게 하는데..... 콤포넌트값 핸들링 방법 UX에서 지정하면 수정해야함.
|
|
||||||
// const tel1Element = document.getElementById('tel1Id');
|
|
||||||
// const phone1IdElement = document.getElementById('phone1Id');
|
|
||||||
// const regionMainCodeIdElement = document.getElementById('regionMainCodeId');
|
|
||||||
// const regionSubCodeIdElement = document.getElementById('regionSubCodeId');
|
|
||||||
// if (tel1Element && tel1Element.value) {
|
|
||||||
// f.tel1.value = tel1Element.value;
|
|
||||||
// }
|
|
||||||
// if (phone1IdElement && phone1IdElement.value) {
|
|
||||||
// f.phone1.value = phone1IdElement.value;
|
|
||||||
// }
|
|
||||||
// if (regionMainCodeIdElement && regionMainCodeIdElement.value) {
|
|
||||||
// f.regionMainCode.value = regionMainCodeIdElement.value;
|
|
||||||
// }
|
|
||||||
// if (regionSubCodeIdElement && regionSubCodeIdElement.value) {
|
|
||||||
// f.regionSubCode.value = regionSubCodeIdElement.value;
|
|
||||||
// }
|
|
||||||
|
|
||||||
f.regionSubCode.value = ENV.select.regionSelect.getParentValue();
|
f.regionSubCode.value = ENV.select.regionSelect.getParentValue();
|
||||||
f.regionDetailCode.value = ENV.select.regionSelect.getChildValue();
|
f.regionDetailCode.value = ENV.select.regionSelect.getChildValue();
|
||||||
f.tel1.value = ENV.select.selectTel.getValue();
|
f.tel1.value = ENV.select.selectTel.getValue();
|
||||||
f.phone1.value = ENV.select.selectPhone.getValue();
|
f.phone1.value = ENV.select.selectPhone.getValue();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const obj = $(f).serializeObject();
|
const obj = $(f).serializeObject();
|
||||||
console.log(obj)
|
|
||||||
ajaxUtil._ajaxAsync(
|
ajaxUtil._ajaxAsync(
|
||||||
ENV.httpUrl.user,
|
ENV.httpUrl.user,
|
||||||
obj,
|
$(f).serializeObject(),
|
||||||
function (rstData, status) {
|
function (rstData, status) {
|
||||||
if (rstData.code === 'SUCCESS') {
|
if (rstData.code === 'SUCCESS') {
|
||||||
// 유효성 검사를 모두 통과한 후
|
// 유효성 검사를 모두 통과한 후
|
||||||
if (showPopupIfValidNameChanged) {
|
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, () => {
|
||||||
// 이름이 바뀐 경우만 팝업
|
location.href = '/info';
|
||||||
ENV.module.confirmPopup.open();
|
});
|
||||||
} else {
|
|
||||||
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, () => {
|
|
||||||
location.href = '/info';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (rstData.code === 'ERROR') {
|
} else if (rstData.code === 'ERROR') {
|
||||||
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
body, html {height: 100%; font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;}
|
body, html {height: 100%; font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;}
|
||||||
#wrap {height: 100%;}
|
#wrap {height: 100%;}
|
||||||
.error-wrap {padding-top: 120px;}
|
.error-wrap {padding-top: 120px;}
|
||||||
.error-wrap main {display: flex; flex-direction: column; width: 310px; margin: 0 auto; padding-top: 88px; background:url('../../assets/images/common/ico_nodata.svg') center top / 64px no-repeat;}
|
.error-wrap main {display: flex; flex-direction: column; width: 310px; margin: 0 auto; padding-top: 88px; background:url('/static/assets/images/common/ico_nodata.svg') center top / 64px no-repeat;}
|
||||||
.info-msg {display: flex; flex-direction: column; align-items: center;}
|
.info-msg {display: flex; flex-direction: column; align-items: center;}
|
||||||
.info-msg strong {display: block; font-size: 24px; font-weight: 700; color: #212529; line-height: 140%; text-align: center;}
|
.info-msg strong {display: block; font-size: 24px; font-weight: 700; color: #212529; line-height: 140%; text-align: center;}
|
||||||
.info-msg span {display: block; margin-top: 8px; font-size: 15px; font-weight: 400; color: #495057; line-height: 140%; text-align: center;}
|
.info-msg span {display: block; margin-top: 8px; font-size: 15px; font-weight: 400; color: #495057; line-height: 140%; text-align: center;}
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org" lang="ko">
|
|
||||||
|
|
||||||
<head th:replace="~{common/components :: head}"></head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="wrap">
|
|
||||||
<div class="loading dimmed" id="loadingBar" style="display: none"><i class="ico-spinner" aria-hidden="true"></i></div>
|
|
||||||
<section th:replace="~{common/components :: header(true)}"></section>
|
|
||||||
|
|
||||||
<div id="container" layout:fragment="content">
|
|
||||||
page content
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section th:replace="~{common/components :: footer}"></section>
|
|
||||||
<section th:replace="~{common/components :: floating-totop}"></section>
|
|
||||||
|
|
||||||
<div id="bindWrap"><!--/* 공통으로 사용하는 영역 */--></div>
|
|
||||||
<!--/* 공통으로 사용하는 모달 팝업 */-->
|
|
||||||
<div class="layer-wrap">
|
|
||||||
<div class="component-modal commModal" data-props-dimm-click="true">
|
|
||||||
<div class="modal-dimm"></div>
|
|
||||||
<div class="modal-frame">
|
|
||||||
<div class="modal-container">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h3 class="modal-tit">
|
|
||||||
<!--/* bind title */-->
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="modal-content">
|
|
||||||
<!--/* bind wrap */-->
|
|
||||||
</div>
|
|
||||||
<button type="button" class="modal-close"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!--/* //공통으로 사용하는 모달 팝업 */-->
|
|
||||||
<!--/* 전체 메뉴 모달 팝업 */-->
|
|
||||||
<th:block th:replace="~{common/menu-modal}"></th:block>
|
|
||||||
<!--/* //전체 메뉴 모달 팝업 */-->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section layout:fragment="script"></section>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
Reference in New Issue
Block a user