diff --git a/WebContent/WEB-INF/view/contractMgmt/estimateAndOrderRegistFormPopup.jsp b/WebContent/WEB-INF/view/contractMgmt/estimateAndOrderRegistFormPopup.jsp index 4956b59..c927c8d 100644 --- a/WebContent/WEB-INF/view/contractMgmt/estimateAndOrderRegistFormPopup.jsp +++ b/WebContent/WEB-INF/view/contractMgmt/estimateAndOrderRegistFormPopup.jsp @@ -68,16 +68,16 @@ // 숫자만 입력 처리 $("input:text[numberOnly]").on("keyup", function() { - if($(this).attr("id") === "facility_qty") { + if($(this).hasClass("item-order-quantity") || $(this).attr("id") === "facility_qty") { $(this).val(formatInteger($(this).val().replace(/[^0-9]/g, ""))); } else { $(this).val(fnc_addComma($(this).val().replace(/[^0-9.]/g, ""))); } }); - $("input:text[numberOnly]").on("blur", function() { + $(document).on("blur", "input:text[numberOnly]", function() { var val = $(this).val(); if(val && val !== '') { - if($(this).attr("id") === "facility_qty") { + if($(this).hasClass("item-order-quantity") || $(this).attr("id") === "facility_qty") { $(this).val(formatInteger(removeComma(val))); } else { $(this).val(formatMoney(removeComma(val))); @@ -450,7 +450,7 @@ } // 수주 정보 설정 - if(existingData.orderQuantity) $("#" + itemId + " .item-order-quantity").val(addComma(existingData.orderQuantity)); + if(existingData.orderQuantity) $("#" + itemId + " .item-order-quantity").val(formatInteger(existingData.orderQuantity)); if(existingData.orderUnitPrice) $("#" + itemId + " .item-order-unit-price").val(addComma(existingData.orderUnitPrice)); if(existingData.orderSupplyPrice) $("#" + itemId + " .item-order-supply-price").val(addComma(existingData.orderSupplyPrice)); if(existingData.orderVat) $("#" + itemId + " .item-order-vat").val(addComma(existingData.orderVat)); @@ -551,9 +551,9 @@ // 수주 정보 (Machine이고 프로젝트가 있으면 수량 readonly) html += ''; if(isMachine && hasProject) { - html += ''; + html += ''; } else { - html += ''; + html += ''; } html += ''; html += ''; @@ -703,7 +703,7 @@ totalVat += parseFloat(removeComma($(this).find(".item-order-vat").val())) || 0; totalAmount += parseFloat(removeComma($(this).find(".item-order-total-amount").val())) || 0; }); - $("#totalOrderQuantity").text(addComma(totalQty)); + $("#totalOrderQuantity").text(addCommaInt(totalQty)); $("#totalOrderSupplyPrice").text(addComma(totalSupply)); $("#totalOrderVat").text(addComma(totalVat)); $("#totalOrderTotalAmount").text(addComma(totalAmount));