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