From f7cc7cfb4cf02246dd66aec46c4ffe0cb936ed5b Mon Sep 17 00:00:00 2001 From: dev02 Date: Thu, 27 Apr 2023 17:58:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Views/SystemCategory/Index.cshtml | 61 ++++++++++++----------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/Backend/Views/SystemCategory/Index.cshtml b/Backend/Views/SystemCategory/Index.cshtml index 79814f0..85c5184 100644 --- a/Backend/Views/SystemCategory/Index.cshtml +++ b/Backend/Views/SystemCategory/Index.cshtml @@ -631,30 +631,7 @@ if ($("#device-item-sub-form").valid()) { $("#save-device-item-btn").html('').attr("disabled", true); - var uurl = "/SystemCategory/HaveSamePoints"; - var ssend_data = { - subId: selected_system_sub_guid, - id: selected_system_device_item_guid, - points: $('#device_sub_points_modal').val(), - } - $.post(uurl, ssend_data, function (rel) { - if (rel.code != "0000") { - $("#save-device-item-btn").html('確定').attr("disabled", false); - if (rel.code == "9999") { - toast_error(rel.msg); - } - else { - toast_warning(rel.msg); - } - return; - } - else { - if (rel.data) { - toast_warning("點位名稱已存在"); - $("#save-device-item-btn").html('確定').attr("disabled", false); - } - else { - var url = "/SystemCategory/Savedevice_item"; + var url = "/SystemCategory/Savedevice_item"; var send_data = { id: selected_system_device_item_guid, device_system_tag: selected_system_main_guid, @@ -690,12 +667,36 @@ .fail(function (xhr, status, error) { $("#save-device-item-btn").html('確定').attr("disabled", false); }); - } - } - }, 'json') - .fail(function (xhr, status, error) { - $("#save-device-item-btn").html('確定').attr("disabled", false); - }); + //var uurl = "/SystemCategory/HaveSamePoints"; + //var ssend_data = { + // subId: selected_system_sub_guid, + // id: selected_system_device_item_guid, + // points: $('#device_sub_points_modal').val(), + //} + //$.post(uurl, ssend_data, function (rel) { + // if (rel.code != "0000") { + // $("#save-device-item-btn").html('確定').attr("disabled", false); + // if (rel.code == "9999") { + // toast_error(rel.msg); + // } + // else { + // toast_warning(rel.msg); + // } + // return; + // } + // else { + // if (rel.data) { + // toast_warning("點位名稱已存在"); + // $("#save-device-item-btn").html('確定').attr("disabled", false); + // } + // else { + + // } + // } + //}, 'json') + //.fail(function (xhr, status, error) { + // $("#save-device-item-btn").html('確定').attr("disabled", false); + //}); } } //#endregion