[FO] 일계수 수입/지출의 부호 변경, UICODE INIT, 달력 JS 변경 대응
This commit is contained in:
@@ -29,13 +29,14 @@
|
||||
|
||||
<insert id="createDailyExpense" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into daily_expense (
|
||||
daily_record_seq, input_type, is_credit, income_mark_code, category_self, source_purpose
|
||||
daily_record_seq, income_mark, expense_mark
|
||||
, input_type, is_credit, category_self, source_purpose
|
||||
, quantity, unit_code, unit_self, price, estimated_value
|
||||
, is_deleted
|
||||
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||
) values (
|
||||
#{dailyRecordSeq}
|
||||
, #{inputType}, #{credit}, #{incomeMarkCode}, #{categorySelf}, #{sourcePurpose}
|
||||
#{dailyRecordSeq}, #{incomeMark}, #{expenseMark}
|
||||
, #{inputType}, #{credit}, #{categorySelf}, #{sourcePurpose}
|
||||
, #{quantity}, #{unitCode}, #{unitSelf}, #{price}, #{estimatedValue}
|
||||
, false
|
||||
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
||||
@@ -45,7 +46,8 @@
|
||||
<update id="updateDailyExpense">
|
||||
update daily_expense set <include refid="common.fields.UpdateBaseSet"/>
|
||||
, is_credit = #{credit}
|
||||
, income_mark_code = #{incomeMarkCode}
|
||||
, income_mark = #{incomeMark}
|
||||
, expense_mark = #{expenseMark}
|
||||
, category_self = #{categorySelf}
|
||||
, source_purpose = #{sourcePurpose}
|
||||
, quantity = #{quantity}
|
||||
|
||||
@@ -29,13 +29,14 @@
|
||||
|
||||
<insert id="createDailyIncome" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into daily_income (
|
||||
daily_record_seq, input_type, is_credit, expense_mark_code, crop_code, category_self, source_purpose
|
||||
daily_record_seq, income_mark, expense_mark
|
||||
, input_type, is_credit, crop_code, category_self, source_purpose
|
||||
, quantity, unit_code, unit_self, price, estimated_value
|
||||
, is_deleted
|
||||
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||
) values (
|
||||
#{dailyRecordSeq}
|
||||
, #{inputType}, #{credit}, #{expenseMarkCode}, #{cropCode}, #{categorySelf}, #{sourcePurpose}
|
||||
#{dailyRecordSeq}, #{incomeMark}, #{expenseMark}
|
||||
, #{inputType}, #{credit}, #{cropCode}, #{categorySelf}, #{sourcePurpose}
|
||||
, #{quantity}, #{unitCode}, #{unitSelf}, #{price}, #{estimatedValue}
|
||||
, false
|
||||
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
||||
@@ -45,7 +46,8 @@
|
||||
<update id="updateDailyIncome">
|
||||
update daily_income set <include refid="common.fields.UpdateBaseSet"/>
|
||||
, is_credit = #{credit}
|
||||
, expense_mark_code = #{expenseMarkCode}
|
||||
, income_mark = #{incomeMark}
|
||||
, expense_mark = #{expenseMark}
|
||||
, crop_code = #{cropCode}
|
||||
, category_self = #{categorySelf}
|
||||
, source_purpose = #{sourcePurpose}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
*/
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user