[FO] 일계부 등록 wip

This commit is contained in:
김현주
2025-06-09 18:31:07 +09:00
parent a8f10ed8d2
commit 96626c6cb7
34 changed files with 1412 additions and 9 deletions

View File

@@ -25,10 +25,12 @@
<meta property="og:keywords" th:content="${currentURI.ogKeywords}"/>
<meta property="og:image" th:content="${currentURI.ogImage}"/>
<script th:src="@{/static/library/jquery/jquery-3.6.0.min.js}"></script>
<script th:src="@{/static/library/jquery/jquery-3.7.1.min.js}"></script>
<script th:src="@{/static/library/jsUri/Uri.js}"></script>
<script th:src="@{/static/library/jsRender/jsrender.min.js}"></script>
<script th:src="@{/static/ui/uiUtil.js}"></script>
<script th:src="@{/static/ui/ajaxUtil.js}"></script>
<script th:src="@{/static/ui/commonUtil.js}"></script>
<script th:src="@{/static/library/jquery/jquery-serializeObject.min.js}"></script>
<link rel="stylesheet" th:href="@{/static/library/flatpickr/flatpickr.min.css}">

View File

@@ -16,6 +16,8 @@
</section>
</div>
<hr/>
<div th:replace="~{common/components :: footer}"></div>
<section layout:fragment="script"></section>

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
<div>
<div>
reqVO: [[${reqVO}]]
</div>
<div>
<th:block th:if="${not #strings.isEmpty(detail)}">
[[${#temporals.format(detail.startDate, 'yyyy년 MM월 dd일')}]] ~ [[${#temporals.format(detail.endDate, 'yyyy년 MM월 dd일')}]]<br/>
수입 : [[${detail.incomeStatus}]], [[${detail.incomeCount}]]
<span th:onclick="formControl.incomeDetail([[${reqVO.searchDay}]])">수정</span>
<br/>
<br/><br/>
detail: [[${detail}]]
</th:block>
<th:block th:if="${#strings.isEmpty(detail)}">
<th:block th:with="searchDate=${#temporals.createDate(reqVO.searchDay, 'yyyyMMdd')}">
[[${#temporals.format(searchDate, 'yyyy년 MM월 dd일')}]]
</th:block>
<br/>
<input type="button" value="등록" th:onclick="formControl.recordCreate([[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])">
</th:block>
</div>
</div>
</html>

View File

@@ -0,0 +1,74 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
<section layout:fragment="content">
<h2>calendar</h2>
<div>
reqVO: [[${reqVO}]]
</div>
<div>
<th:block th:each="calendar, calendarStatus : ${calendarList}">
<th:block th:if="${not #strings.isEmpty(calendar.dailyId)}">
<span th:onclick="formControl.getDetail([[${reqVO.searchMonth}]], [[${calendar.groupNo}]])">
No=[[${calendar.groupNo}]], Start=[[${calendar.startDay}]], End=[[${calendar.endDay}]], StartDate=[[${calendar.startDate}]], Id=[[${calendar.dailyId}]]<br/>
</span>
</th:block>
<th:block th:if="${#strings.isEmpty(calendar.dailyId)}">
<span th:onclick="formControl.getDetail([[${reqVO.searchMonth}]], [[${calendar.groupNo}]])">
No=[[${calendar.groupNo}]], Start=[[${calendar.startDay}]], End=[[${calendar.endDay}]], StartDate=[[${calendar.startDate}]]<br/>
</span>
</th:block>
</th:block>
</div>
<hr/>
<div id="selectedDay">
</div>
</section>
<section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: '',
list: '/record/calendar/{searchMonth}/{groupNo}',
create: '/record/daily/{searchMonth}/{groupNo}',
},
submitted: false,
};
let formControl = {
getDetail(searchMonth, groupNo) {
console.log('searchMonth=', searchMonth, 'groupNo=', groupNo);
ajaxUtil._ajaxAsync(
ENV.httpUrl.list.replace('{searchMonth}', searchMonth).replace('{groupNo}', groupNo),
null,
function(rstHtml, status) {
$('#selectedDay').html(rstHtml);
},
function(code, rstData) {
research.logger.error('Do nothing. code: '+ code, rstData);
},
'html'
);
},
incomeDetail(selectedDay) {
// TODO
alert('TODO : ' + selectedDay);
},
recordCreate(searchMonth, groupNo) {
location.href = ENV.httpUrl.create.replace('{searchMonth}', searchMonth).replace('{groupNo}', groupNo);
},
};
</script>
</section>
</html>

View File

@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
<section layout:fragment="content">
<h2>daily Form</h2>
<div>
reqVO: [[${reqVO}]]
</div>
<div>
[[${#temporals.format(detail.startDate, 'yyyy년 MM월 dd일')}]] ~ [[${#temporals.format(detail.endDate, 'yyyy년 MM월 dd일')}]]<br/>
<form name="reqForm">
<input type="hidden1" name="todayNone" value="" />
<br/>
<div>
<input type="checkbox" name="incomeStatus" value="WAITING" data-target="income" /> 수입 내역
<div class="invalid-feedback">
에러 메세지
</div>
</div>
<br/>
<div>
<input type="checkbox" name="workStatus" value="WAITING" data-target="work" /> 노동 내역
<div class="invalid-feedback">
에러 메세지
</div>
</div>
</form>
<th:block th:if="${detail.updated}">
수정
</th:block>
<th:block th:if="${!detail.updated}">
<input type="button" value="등록" th:onclick="formControl.create([[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])" />
</th:block>
<br/><br/>
detail: [[${detail}]]
</div>
<hr/>
</section>
<section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: '',
create: '',
},
submitted: false,
};
let formControl = {
create(searchMonth, groupNo) {
const f = document.reqForm;
if ($(f).find('input:checked').length == 0) {
if (confirm('등록할 내용이 없음?')) {
f.todayNone.value = 'Y';
}
}
const obj = $(f).serializeObject();
ajaxUtil._ajaxAsync(
ENV.httpUrl.create.replace('{searchMonth}', searchMonth).replace('{groupNo}', groupNo),
obj,
function(rstData, status) {
console.log(rstData);
if (f.todayNone.value == 'Y') {
page.daily.goToMain();
} else {
page.daily.goToNext($('input:checked').eq(0).data('target'), searchMonth, groupNo);
}
},
);
},
};
</script>
</section>
</html>

View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
<section layout:fragment="content">
<h2>daily Form</h2>
<div>
reqVO: [[${reqVO}]]
</div>
<div>
<br/><br/>
detail: [[${detail}]]
</div>
<hr/>
</section>
<section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: '',
create: '/record/daily/{searchMonth}/{groupNo}',
},
submitted: false,
};
let formControl = {
};
</script>
</section>
</html>