[BO] 임산물현황, 은행자동이체 내역 - 숫자값 0 입력에 대한 유효성 검사 추가

This commit is contained in:
kangsunlee
2025-07-28 11:38:13 +09:00
parent c7e3210093
commit 0e9e41bbfe
5 changed files with 141 additions and 19 deletions

View File

@@ -179,8 +179,9 @@
form.sourcePurpose.value = data.sourcePurpose ?? '';
form.transferCategoryCode.value = data.transferCategoryCode ?? '';
toggleSelfInput(form.expenseCode.value, form.transferCategory);
toggleSelfInput(form.unitCode.value, form.unit);
// 초기 상태 업데이트
toggleExpenseSelfInput(form.transferCategoryCode);
selectedSelf(form.unitCode);
}
</script>
@@ -255,11 +256,15 @@
f.expenseCode.value = codeValue;
const tr = el.closest('tr');
toggleExpenseSelfInput(el);
}
const toggleExpenseSelfInput = (selectElement) => {
const tr = selectElement.closest('tr');
const selfArea = tr.querySelector('.self-input');
const selfInput = tr.querySelector('.self-input input');
if (el.value?.endsWith('.self')) {
if (selectElement.value?.endsWith('.self')) {
selfInput.disabled = false;
selfArea.classList.remove('input-disabled');
} else {