From 2781530487f9eed13d7cac871ac40f33c70e5e5b Mon Sep 17 00:00:00 2001 From: "wanling040@gmail.com" Date: Fri, 12 Aug 2022 18:46:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=BB=E7=AB=99=E8=B3=87=E8=A8=8A-=E7=B6=AD?= =?UTF-8?q?=E9=81=8B=E4=BD=9C=E6=A5=AD=E7=B4=80=E9=8C=84:=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=AA=94=E6=A1=88=E5=88=AA=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StationOverviewInfo.cshtml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml index 51ff2d4..7539c01 100644 --- a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml +++ b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml @@ -1323,6 +1323,45 @@ } //#endregion + //#region 刪除檔案 + $('#record_files_div').on("click", "a.del-operation-record-file-btn", function () { + + var selectedFileId = $(this).attr("data-id"); + + var div = $(this).parents(".col-auto"); + + Swal.fire({ + title: "刪除", + text: "你確定是否刪除此筆資料?", + type: "warning", + icon: 'warning', + showCancelButton: true, + confirmButtonText: "是", + cancelButtonText: "否" + }).then(function (result) { + if (result.value) { + + var url = "/Operation/DeleteOperationRecordFile"; + + var send_data = { + ReocdeId: selected_id, + SelectedId: selectedFileId + } + + $.post(url, send_data, function (rel) { + if (rel.code != "0000") { + toast_error(rel.msg); + return; + } + operationRecordTable.ajax.reload(); + toast_ok(rel.msg); + div.remove(); + }, 'json'); + } + }); + }); + //#endregion + //#region 異常 //#region 改變日期(異常)