電站資訊-維運作業紀錄: 新增檔案刪除功能
This commit is contained in:
parent
589dd8e2e4
commit
2781530487
@ -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 改變日期(異常)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user