[BO] 임가현황 > 은행자동이체 내역 탭 작업
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
<!-- 직접입력 항목 -->
|
||||
<div class="component-input self-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="transferCategorySelf" name="transferCategory" disabled>
|
||||
<input type="text" class="transfer-category-self" name="transferCategory" disabled>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -76,7 +76,7 @@
|
||||
<td>
|
||||
<div class="component-input target-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="transferCategoryTarget" name="transferCategory" maxlength="30" disabled>
|
||||
<input type="text" class="transfer-category-target" name="transferCategory" maxlength="30" disabled>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -210,8 +210,8 @@
|
||||
form.transferCategoryCode.value = data.transferCategoryCode ?? '';
|
||||
|
||||
// transferCategory 분기 처리
|
||||
setTransferCategory(data.transferCategoryCode, data.transferCategory);
|
||||
toggleSelfInput(form.unitCode.value, '#unit');
|
||||
setTransferCategory(form, data.transferCategoryCode, data.transferCategory);
|
||||
toggleSelfInput(form.unitCode.value, form.unit);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -222,7 +222,6 @@
|
||||
if (!form) return;
|
||||
|
||||
const skipInputs = [
|
||||
'bankAutoTransferId',
|
||||
'householdSeq',
|
||||
'recordMonth'
|
||||
];
|
||||
@@ -325,11 +324,11 @@
|
||||
}
|
||||
|
||||
// 분기 처리 유틸
|
||||
const setTransferCategory = (code, value) => {
|
||||
const selfInput = document.querySelector('#transferCategorySelf');
|
||||
const targetInput = document.querySelector('#transferCategoryTarget');
|
||||
const setTransferCategory = (form, code, value) => {
|
||||
const selfInput = form.querySelector('.transfer-category-self');
|
||||
const targetInput = form.querySelector('.transfer-category-target');
|
||||
|
||||
const isSelf = code === 'code.bank.input.self';
|
||||
const isSelf = code.endsWith('.self');
|
||||
|
||||
if (isSelf) {
|
||||
selfInput.value = value ?? '';
|
||||
@@ -339,12 +338,11 @@
|
||||
targetInput.value = value ?? '';
|
||||
}
|
||||
|
||||
toggleSelfInput(code, '#transferCategorySelf');
|
||||
toggleTargetInput(code, '#transferCategoryTarget');
|
||||
toggleSelfInput(code, selfInput);
|
||||
toggleTargetInput(code, targetInput);
|
||||
};
|
||||
|
||||
const toggleSelfInput = (code, inputSelector) => {
|
||||
const el = document.querySelector(inputSelector);
|
||||
const toggleSelfInput = (code, el) => {
|
||||
const wrapper = el.closest('.self-input');
|
||||
const isSelf = code.endsWith('.self');
|
||||
|
||||
@@ -353,8 +351,7 @@
|
||||
if (!isSelf) el.value = '';
|
||||
};
|
||||
|
||||
const toggleTargetInput = (code, inputSelector) => {
|
||||
const el = document.querySelector(inputSelector);
|
||||
const toggleTargetInput = (code, el) => {
|
||||
const wrapper = el.closest('.target-input');
|
||||
|
||||
const needTarget = !['code.bank.input.10', 'code.bank.input.12', 'code.bank.input.13', 'code.bank.input.self', ''].includes(code);
|
||||
|
||||
Reference in New Issue
Block a user