[2차][FO] 입력현황 WIP

This commit is contained in:
김현주
2025-07-07 17:27:16 +09:00
parent f85c96ea62
commit 48cbe00b2e
26 changed files with 854 additions and 23 deletions

View File

@@ -0,0 +1,168 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org" lang="ko">
<div layout:fragment="content" th:classappend="regi-wrap">
<main id="content" role="main">
<section class="month-filter">
<div class="inner">
<div id="searchMonth" class="component-select bottom-sheet" data-props-type="bottomSheet">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
<div class="select-options">
<div class="select-header">
<p>월 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option"
th:each="item, itemStatus : ${reqVO.monthList}"
th:classappend="${#strings.equals(reqVO.searchMonth, #temporals.format(item, 'yyyyMM'))} ? 'current'"
th:data-value="${#temporals.format(item, 'yyyyMM')}"
th:text="${#temporals.format(item, 'yyyy년 M월')}"></li>
</ul>
</div>
</div>
</div>
<ul class="summary">
<li>
<span>작성일</span>
<p><strong>[[${detail.doneCount}]]</strong>일</p>
</li>
<li>
<span>미작성일</span>
<p><strong>[[${detail.dayCount - detail.doneCount}]]</strong>일</p>
</li>
<li>
<span>총 등록</span>
<p><strong>[[${#numbers.formatInteger(detail.totalInput, 1, 'COMMA')}]]</strong>건</p>
</li>
</ul>
</div>
</section>
<section class="month-detail bg-gray bg-lround"
th:unless="${#lists.isEmpty(detail.itemList)}">
<div class="inner">
<p class="tit">항목별 월간 현황</p>
<ul class="btn-column-list">
<th:block th:each="item, itemStatus : ${detail.itemList}">
<li th:classappend="${item.inputCount != 0} ? 'view'">
<th:block th:if="${item.inputCount != 0}">
<a href="javascript:void(0);" th:onclick="formControl.detailModal([[${#strings.toLowerCase(item.step.name)}]], [[${#strings.toLowerCase(item.step.desc2)}]])">
</th:block>
<p class="label">[[${item.step.desc2}]]</p>
<ul class="value">
<li>
<span>작성일</span>
<span>[[${item.doneCount}]]일</span>
</li>
<li>
<span>등록 건수</span>
<span>[[${item.inputCount}]]건</span>
</li>
<li class="total"
th:if="${#strings.equals(item.step, T(app.module.core.config.application.enums.DailySort).WORK)}">
<span>총 투입 시간</span>
<span><strong>[[${@dailyUtil.getStringComma(item.totalValue)}]]</strong>시간</span>
</li>
<li class="total"
th:if="${#strings.equals(item.step, T(app.module.core.config.application.enums.DailySort).POWER)}">
<span>총 사용 시간</span>
<span><strong>[[${@dailyUtil.getStringComma(item.totalValue)}]]</strong>시간</span>
</li>
<li class="total"
th:unless="${#strings.equals(item.step, T(app.module.core.config.application.enums.DailySort).WORK)
or #strings.equals(item.step, T(app.module.core.config.application.enums.DailySort).POWER)}">
<span>총 금액</span>
<span><strong>[[${#numbers.formatInteger(item.totalValue, 1, 'COMMA')}]]</strong>원</span>
</li>
</ul>
<th:block th:if="${item.inputCount != 0}">
</a >
</th:block>
</li>
</th:block>
</ul>
</div>
</section>
</main>
<!-- 모달 팝업 -->
<div class="layer-wrap">
<div class="component-modal regi-wrap detailModal" 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"></h3>
</div>
<div class="modal-content">
<!--/* detail */-->
</div>
<button type="button" class="modal-close"></button>
</div>
</div>
</div>
</div>
<!-- //모달 팝업 -->
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[${currentURI?.uri}]]*/'',
detail: /*[[|${currentURI?.uri}/{step}/{month}|]]*/'',
},
modal: {
// 등록 영역
selector: '.detailModal',
},
month: /*[[${reqVO.searchMonth}]]*/'month',
submitted: false,
};
let formControl = {
init() {
this._bindUI();
},
_bindUI() {
console.log('_bindUI()')
const $select1 = document.querySelector('#searchMonth');
const selectboxInstance1 = $select1.ui;
selectboxInstance1.core.init($select1, {
selectItemCallback({selectValue, dataValue}){
location.href = ENV.httpUrl.root + '?searchMonth=' + dataValue;
}
});
},
detailModal(step, desc) {
ajaxUtil._ajaxAsyncMethod(
ENV.httpUrl.detail.replace('{step}', step).replace('{month}', ENV.month),
{},
function(rstHtml, status) {
$(ENV.modal.selector).find('.modal-tit').html(desc + ' 내역');
$(ENV.modal.selector).find('.modal-content').html(rstHtml);
const modal01 = document.querySelector(ENV.modal.selector).ui;
modal01.open();
},
function(code, rstData) {
kri.logger.error('Do nothing. code: '+ code, rstData);
},
'get',
'html'
);
},
};
</script>
</section>
</html>

View File

@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org" lang="ko">
<div layout:fragment="content" th:classappend="regi-wrap">
<div class="modal-content-inner">
<hgroup class="tit-group">
<h3>
[[${#temporals.format(#temporals.createDate(searchMonth+'01', 'yyyyMMdd'), 'yyyy년 M월')}]]의 [[${step.desc2}]] 내역이 <br>
<strong>[[${#lists.size(list)}]]건 등록</strong> 되었습니다.
</h3>
</hgroup>
<section class="regist-item-area"
th:unless="${#lists.isEmpty(list)}">
<th:block th:each="recordItem, recordItemStatus : ${list}">
<p class="month-tit">
<th:block th:if="${recordItem.startDate eq recordItem.endDate}">
[[${#temporals.format(recordItem.startDate, 'M월 d일')}]]
</th:block>
<th:block th:if="not ${recordItem.startDate eq recordItem.endDate}">
[[${#temporals.format(recordItem.startDate, 'M월 d일')}]]~[[${#temporals.format(recordItem.endDate, 'd일')}]]
</th:block>
</p>
<!--/* [INFO] templates/record/xxxx/index.html 의 item-list 와 동일한 HTML */-->
<div class="item-list">
<div class="list-item"
th:each="item, itemStatus : ${recordItem.children}">
<div class="item-tit-group">
<p class="item-name">[[${item.incomeKind}]]</p>
</div>
<ul class="detail-list">
<li th:if="${item.credit != null}">
<p>외상판매</p>
<span th:text="${item.credit ? '예' : '아니오'}">아니오</span>
</li>
<li th:if="${not #strings.isEmpty(item.cropLabel)}">
<p>재배형태</p>
<span th:text="${item.cropLabel}">재배형태</span>
</li>
<li th:if="${not #strings.isEmpty(item.sourcePurpose)}">
<p>수입원</p>
<span th:text="${item.sourcePurpose}">소비자</span>
</li>
<li th:if="${not #strings.isEmpty(item.quantity)}">
<p>수량</p>
<span th:text="|${@dailyUtil.getStringComma(item.quantity)}${#strings.defaultString(item.unitLabel,'')}|">500g</span>
</li>
<li th:if="${not #strings.isEmpty(item.price)}">
<p>현금 </p>
<span th:text="|${#numbers.formatInteger(item.price, 1, 'COMMA')}원|">302,000원</span>
</li>
<li th:if="${not #strings.isEmpty(item.estimatedValue)}">
<p>현물평가액</p>
<span th:text="|${#numbers.formatInteger(item.estimatedValue, 1, 'COMMA')}원|">302,000원</span>
</li>
</ul>
</div>
</div>
</th:block>
</section>
</div>
</div>
</html>