[FO] 일계부 수입, 지출의 단위 직접입력 추가

This commit is contained in:
김현주
2025-06-17 14:43:56 +09:00
parent 8bd7d758ec
commit 8d91f176ae
11 changed files with 74 additions and 16 deletions

View File

@@ -92,7 +92,7 @@
</p>
</div>
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
<input type="hidden1" name="unitCode" th:value="${detail.unitCode}">
<input type="hidden" name="unitCode" th:value="${detail.unitCode}">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
@@ -114,6 +114,11 @@
</div>
</div>
</div>
<div class="component-input" data-option="직접 입력">
<div class="input-field">
<input type="text" name="unitSelf" th:value="${detail.unitSelf}" maxlength="30" placeholder="단위를 입력해 주세요">
</div>
</div>
</div>
</section>

View File

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

View File

@@ -144,6 +144,11 @@
</div>
</div>
</div>
<div class="component-input" data-option="직접 입력">
<div class="input-field">
<input type="text" name="unitSelf" th:value="${detail.unitSelf}" maxlength="30" placeholder="단위를 입력해 주세요">
</div>
</div>
</div>
</section>

View File

@@ -177,6 +177,11 @@
selectItemCallback({selectValue, dataValue}){
console.log('selectItemCallback', selectValue, dataValue)
$('input[name="unitCode"]').val(dataValue)
// TODO : ui js 에서 show 적용유무 파악하기
if (dataValue === 'code.record.unit.self') {
$('#unitCode').parent().find('.component-input').addClass('show');
}
}
});
@@ -201,7 +206,11 @@
// data set
selectboxInstance1.setValue($formWrap.find('input[name="cropCode"]').val());
//selectboxInstance1.update();
selectboxInstance2.setValue($formWrap.find('input[name="unitCode"]').val());
//selectboxInstance2.update();
if ($price.val() === '' && $estimatedValue.val() !== '') {
modalControl._priceDisabled($price);
} else if ($price.val() !== '' && $estimatedValue.val() === '') {