From 5d089b91cc4985d31a468869c2d77e551640b81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A3=BC=EC=88=98=ED=98=84?= Date: Mon, 14 Jul 2025 16:15:51 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=9E=85=EC=9D=98=20=EC=A2=85?= =?UTF-8?q?=EB=A5=98=20:=20=EB=B4=89=EA=B8=89=20=EC=9D=98=20=EB=8C=80?= =?UTF-8?q?=EC=83=81=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=ED=91=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/info/bank/input.html | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/front/src/main/resources/templates/info/bank/input.html b/front/src/main/resources/templates/info/bank/input.html index be9ef383..84e70d66 100644 --- a/front/src/main/resources/templates/info/bank/input.html +++ b/front/src/main/resources/templates/info/bank/input.html @@ -474,15 +474,30 @@ const field = form.elements.namedItem(key); if (field) { field.value = val; - if(key == 'transferCategoryCode' && val == "code.bank.input.self"){ + if(key === 'transferCategoryCode' && (val === "code.bank.input.self" || val === "code.bank.input.1" || val === "code.bank.input.4")){ document.getElementById(val+"_value").value = product["transferCategory"]; } - if(key == 'unitCode' && val == "code.count.unit.self"){ + if(key === 'unitCode' && val === "code.count.unit.self"){ document.getElementById("unitDiv").style.display = ""; } } }); + if (product.transferCategoryCode === "code.bank.input.self") { + const transferCategoryInput = document.getElementById(product.transferCategoryCode + "_value"); + if (transferCategoryInput) { + transferCategoryInput.value = product.transferCategory || ""; + } + } + + // 단위 입력 필드 표시 여부 처리 + if (product.unitCode === "code.count.unit.self") { + const unitDiv = document.getElementById("unitDiv"); + if (unitDiv) { + unitDiv.style.display = ""; + } + } + ENV.elementRefs.select.cropCodeSelect.setValue(product.cropCode); ENV.elementRefs.select.transferCategoryCodeSelect.setValue(product.transferCategoryCode); ENV.elementRefs.select.unitCodeSelect.setValue(product.unitCode);