[FO] 일계부 항목 등록, 수입내역 등록 wip
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<div id="wrap">
|
||||
<section th:replace="~{common/components :: header}"></section>
|
||||
|
||||
<div class="acco-wrap" id="container" layout:fragment="content">
|
||||
<div id="container" layout:fragment="content">
|
||||
page content
|
||||
</div>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div id="wrap">
|
||||
<section th:replace="~{common/components :: header}"></section>
|
||||
|
||||
<div class="acco-wrap btm-footer" id="container" layout:fragment="content">
|
||||
<div class="btm-footer" id="container" layout:fragment="content">
|
||||
page content
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<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">
|
||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||
<main id="content" role="main">
|
||||
<h2>calendar</h2>
|
||||
<div>
|
||||
|
||||
@@ -2,85 +2,100 @@
|
||||
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<div layout:fragment="content">
|
||||
<main id="content" role="main">
|
||||
<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 layout:fragment="content" th:classappend="acco-wrap">
|
||||
<th:block th:if="${@systemProperties['spring.profiles.active'] eq 'local'}">
|
||||
<div>
|
||||
reqVO: [[${reqVO}]]
|
||||
</div>
|
||||
<div>
|
||||
detail: [[${dailyRecord}]]
|
||||
</div>
|
||||
</th:block>
|
||||
<main id="content" role="main">
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3 th:data-start="${#temporals.format(dailyRecord.startDate, 'M월 d일')}"
|
||||
th:data-end="${#temporals.format(dailyRecord.endDate, 'd일')}">
|
||||
<th:block th:if="${dailyRecord.startDay eq dailyRecord.endDay}">
|
||||
[[${#temporals.format(dailyRecord.startDate, 'M월 d일')}]], <br>
|
||||
</th:block>
|
||||
<th:block th:if="not ${dailyRecord.startDay eq dailyRecord.endDay}">
|
||||
[[${#temporals.format(dailyRecord.startDate, 'M월 d')}]]~[[${#temporals.format(dailyRecord.endDate, 'd일')}]], <br>
|
||||
</th:block>
|
||||
<strong>등록하실 내용</strong>이 있나요?
|
||||
</h3>
|
||||
<p>등록하실 항목을 선택해 주세요.</p>
|
||||
</hgroup>
|
||||
<form name="reqForm">
|
||||
<input type="hidden" name="todayNone" value="">
|
||||
<section class="switch-group">
|
||||
<div class="component-input">
|
||||
<label class="switch-inner type-txt">
|
||||
<span class="switch-label">수입</span>
|
||||
<input type="checkbox" name="incomeStatus" value="WAITING" data-target="income">
|
||||
<span class="switch-item">
|
||||
<span class="switch-handle"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
<input type="checkbox" name="workStatus" value="WAITING" data-target="work" /> 노동 내역
|
||||
<div class="invalid-feedback">
|
||||
에러 메세지
|
||||
<div class="component-input">
|
||||
<label class="switch-inner type-txt">
|
||||
<span class="switch-label">임업노동 투입 내역</span>
|
||||
<input type="checkbox" name="workStatus" value="WAITING" data-target="work">
|
||||
<span class="switch-item">
|
||||
<span class="switch-handle"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<label class="switch-inner type-txt">
|
||||
<span class="switch-label">지출</span>
|
||||
<input type="checkbox" name="expenseStatus" value="WAITING" data-target="expense">
|
||||
<span class="switch-item">
|
||||
<span class="switch-handle"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<label class="switch-inner type-txt">
|
||||
<span class="switch-label">동력 사용시간</span>
|
||||
<input type="checkbox" name="powerStatus" value="WAITING" data-target="power">
|
||||
<span class="switch-item">
|
||||
<span class="switch-handle"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<label class="switch-inner type-txt">
|
||||
<span class="switch-label">자가임업 생산물 중 자가소비량</span>
|
||||
<input type="checkbox" name="forestryStatus" value="WAITING" data-target="forestry">
|
||||
<span class="switch-item">
|
||||
<span class="switch-handle"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- TODO : 자가농업 생산물 중 자가소비량은 7일차 등록일에만 노출 및 선택 -->
|
||||
<div class="component-input">
|
||||
<label class="switch-inner type-txt">
|
||||
<span class="switch-label">자가농업 생산물 중 자가소비량</span>
|
||||
<input type="checkbox" name="farmingStatus" value="WAITING" data-target="farming">
|
||||
<span class="switch-item">
|
||||
<span class="switch-handle"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</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 class="component-btns fixed">
|
||||
<div class="btns-row" th:if="${!dailyRecord.updated}">
|
||||
<button type="button" class="btn btn-l btn-primary" th:onclick="formControl.createValid([[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])">
|
||||
<span class="btn-txt">다음 단계로 이동</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.content label {
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.content div {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.tox-tinymce {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.invalid-feedback {
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.is-invalid + .invalid-feedback {
|
||||
display: block;
|
||||
}
|
||||
|
||||
textarea.is-invalid ~ .invalid-feedback {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -89,35 +104,66 @@
|
||||
<script th:inline="javascript">
|
||||
let ENV = {
|
||||
httpUrl: {
|
||||
root: '',
|
||||
create: '',
|
||||
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||
},
|
||||
month: [[${reqVO.searchMonth}]],
|
||||
groupNo: [[${reqVO.groupNo}]],
|
||||
submitted: false,
|
||||
};
|
||||
|
||||
let formControl = {
|
||||
create(searchMonth, groupNo) {
|
||||
createValid() {
|
||||
const f = document.reqForm;
|
||||
|
||||
if ($(f).find('input:checked').length == 0) {
|
||||
if (confirm('등록할 내용이 없음?')) {
|
||||
f.todayNone.value = 'Y';
|
||||
}
|
||||
if ($(f).find('input:checked').length === 0) {
|
||||
this.createConfirm();
|
||||
} else {
|
||||
this.create();
|
||||
}
|
||||
},
|
||||
createConfirm() {
|
||||
etUI.locales.ko = {
|
||||
dialog: {
|
||||
positive: '예',
|
||||
negative: '아니오',
|
||||
},
|
||||
};
|
||||
|
||||
let message = ', 등록하실 항목이 없나요?';
|
||||
let $messageWrap = $('#content .tit-group h3');
|
||||
if ($messageWrap.data('start').indexOf($messageWrap.data('end')) !== -1) {
|
||||
message = $messageWrap.data('start') + '~' + $messageWrap.data('end') + message;
|
||||
} else {
|
||||
message = $messageWrap.data('start') + message;
|
||||
}
|
||||
|
||||
etUI.dialog.alert({
|
||||
title: "등록 항목 확인",
|
||||
message: message,
|
||||
type: "confirm",
|
||||
dialogType: "confirm",
|
||||
callback: function () {
|
||||
formControl.create();
|
||||
},
|
||||
});
|
||||
},
|
||||
create() {
|
||||
const f = document.reqForm;
|
||||
|
||||
if ($(f).find('input:checked').length === 0) {
|
||||
f.todayNone.value = 'Y';
|
||||
}
|
||||
|
||||
const obj = $(f).serializeObject();
|
||||
ajaxUtil._ajaxAsync(
|
||||
ENV.httpUrl.create.replace('{searchMonth}', searchMonth).replace('{groupNo}', groupNo),
|
||||
ENV.httpUrl.root,
|
||||
obj,
|
||||
function(rstData, status) {
|
||||
console.log(rstData);
|
||||
|
||||
if (f.todayNone.value == 'Y') {
|
||||
function (rstData, status) {
|
||||
if (f.todayNone.value === 'Y') {
|
||||
krip.daily.goToMain();
|
||||
} else {
|
||||
krip.daily.goToNext($('input:checked').eq(0).data('target'), searchMonth, groupNo);
|
||||
krip.daily.goToNext($('input:checked').eq(0).data('target'), ENV.month, ENV.groupNo);
|
||||
}
|
||||
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
34
front/src/main/resources/templates/record/work/index.html
Normal file
34
front/src/main/resources/templates/record/work/index.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||
<th:block th:if="${@systemProperties['spring.profiles.active'] eq 'local'}">
|
||||
<div>
|
||||
reqVO: [[${reqVO}]]
|
||||
</div>
|
||||
<div>
|
||||
detail: [[${detail}]]
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
</div>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
let ENV = {
|
||||
httpUrl: {
|
||||
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||
},
|
||||
month: [[${reqVO.searchMonth}]],
|
||||
groupNo: [[${reqVO.groupNo}]],
|
||||
submitted: false,
|
||||
};
|
||||
|
||||
let formControl = {
|
||||
};
|
||||
</script>
|
||||
</section>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user