[FO] 일계수 수입/지출의 부호 변경, UICODE INIT, 달력 JS 변경 대응

This commit is contained in:
김현주
2025-06-17 18:13:07 +09:00
parent a193facaf8
commit 9a215b1221
11 changed files with 100 additions and 41 deletions

View File

@@ -26,8 +26,8 @@
<meta name="_csrf" th:content="${_csrf.token}"/>
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
<link rel="icon" type="image/x-icon" href="pathImages/" />
<link rel="shortcut icon" type="image/x-icon" href="pathImages/" />
<link rel="icon" type="image/x-icon" /><!-- TODO : href="pathImages/" -->
<link rel="shortcut icon" type="image/x-icon" /><!-- TODO : href="pathImages/" -->
<link th:href="@{/static/assets/styles/style.css}" type="text/css" rel="stylesheet" />
<script th:src="@{/static/assets/scripts/common.ui.plugin.js}"></script>
<script th:src="@{/static/assets/scripts/common.ui.js}" data-init></script>

View File

@@ -410,10 +410,10 @@
}
}
new DatepickerComponent(function(list, currentDate, viewDate){
console.log('changeDateCallback', list, currentDate, viewDate);
new DatepickerComponent(function(rowdata, currentDate, viewDate){
console.log('changeDateCallback', rowdata, currentDate, viewDate);
formControl.setDetail(list, currentDate, viewDate);
formControl.setDetail(this.currentMonth, rowdata, currentDate, viewDate);
}, function(monthKey, currentDate){
console.log('changeMonthCallback', monthKey, currentDate);
@@ -445,9 +445,14 @@
};
let formControl = {
setDetail(list, currentDate, viewDate) {
const todoList = list.filter(f => !(f.code === 'MONTHLY' || f.code === 'BANK'));
const etcList = list.filter(f => f.code === 'MONTHLY' || f.code === 'BANK');
setDetail(searchMonth, rowdata, currentDate, viewDate) {
console.log(typeof rowdata, searchMonth, rowdata.no, rowdata.children)
let todoList = [];
let etcList = [];
if (typeof rowdata === 'object' && rowdata.children !== undefined) {
todoList = rowdata.children.filter(f => !(f.code === 'MONTHLY' || f.code === 'BANK'));
etcList = rowdata.children.filter(f => f.code === 'MONTHLY' || f.code === 'BANK');
}
console.log(todoList)
console.log(etcList)
@@ -455,23 +460,26 @@
let html = '';
if (todoList === undefined || todoList.length === 0) {
html = tmpl.render({
month: searchMonth,
no: rowdata.no,
date: currentDate,
etcList: etcList,
});
} else {
tmpl = $.templates('#dailyListTmpl');
html = tmpl.render({
month: searchMonth,
no: rowdata.no,
date: currentDate,
list: todoList,
etcList: etcList,
});
}
console.log(html)
$('#selectedDay').html(html);
},
recordCreate(searchMonth, groupNo) {
location.href = ENV.httpUrl.create.replace('{searchMonth}', searchMonth).replace('{groupNo}', groupNo);
location.href = ENV.httpUrl.create.replace('{searchMonth}', searchMonth.replace('-', '')).replace('{groupNo}', groupNo);
},
};
</script>
@@ -479,7 +487,7 @@
{{include tmpl="#titleTmpl" /}}
<div class="component-btns btn-add">
<button type="button" onclick="alert('TODO');">
<button type="button" onclick="formControl.recordCreate('{{:month}}', {{:no}});">
<p class="txt">일계부 등록하기</p>
</button>
</div>

View File

@@ -40,7 +40,7 @@
</span>
</label>
</div>
<div class="component-input">
<!--/*<div class="component-input">
<label class="switch-inner type-txt">
<span class="switch-label">임업노동 투입 내역</span>
<input type="checkbox" name="workStatus" value="TARGET" data-target="work"
@@ -49,7 +49,7 @@
<span class="switch-handle"></span>
</span>
</label>
</div>
</div>*/-->
<div class="component-input">
<label class="switch-inner type-txt">
<span class="switch-label">지출</span>
@@ -60,7 +60,7 @@
</span>
</label>
</div>
<div class="component-input">
<!--/*<div class="component-input">
<label class="switch-inner type-txt">
<span class="switch-label">동력 사용시간</span>
<input type="checkbox" name="powerStatus" value="TARGET" data-target="power"
@@ -79,9 +79,9 @@
<span class="switch-handle"></span>
</span>
</label>
</div>
</div>*/-->
<!--/* [정책] 자가농업 생산물 중 자가소비량은 7일차 등록일에만 노출 및 선택, 21일 이후는 마지막 날 */-->
<div class="component-input"
<!--/*<div class="component-input"
th:if="${reqVO.groupNo eq 4 or reqVO.groupNo eq 8 or reqVO.groupNo eq 12
or reqVO.groupNo eq 16 or reqVO.groupNo eq 17}">
<label class="switch-inner type-txt">
@@ -92,7 +92,7 @@
<span class="switch-handle"></span>
</span>
</label>
</div>
</div>*/-->
</section>
</form>
</div>

View File

@@ -179,9 +179,11 @@
$('input[name="unitCode"]').val(dataValue)
// TODO : ui js 에서 show 적용유무 파악하기
/*
if (dataValue === 'code.record.unit.self') {
$('#unitCode').parent().find('.component-input').addClass('show');
}
*/
}
});