From c2cb089d61cdcea5bcfc1103d11416625d02d079 Mon Sep 17 00:00:00 2001 From: "jay.chang" Date: Mon, 23 Sep 2024 16:36:02 +0800 Subject: [PATCH] =?UTF-8?q?[Backend]=E5=BE=8C=E8=87=BA=E8=A8=AD=E5=82=99?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=87=88=E8=99=9F=E8=A8=AD=E5=AE=9A=E9=82=8F?= =?UTF-8?q?=E8=BC=AF=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Views/DeviceManage/Index.cshtml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Backend/Views/DeviceManage/Index.cshtml b/Backend/Views/DeviceManage/Index.cshtml index 20b8c0a..0901119 100644 --- a/Backend/Views/DeviceManage/Index.cshtml +++ b/Backend/Views/DeviceManage/Index.cshtml @@ -2951,9 +2951,14 @@ return; } - if ($("#device_normal_point_value_modal").val() == $("#device_close_point_value_modal").val()) { - toast_warning("點位值設定重複,請修改"); - return; + var normalValue = $("#device_normal_point_value_modal").val(); + var closeValue = $("#device_close_point_value_modal").val(); + + if (normalValue != "" && closeValue != "" && normalValue != null && closeValue != null) { + if (normalValue == closeValue) { + toast_warning("點位值設定重複,請修改"); + return; + } } if ($("#device-kind-form").valid()) {