浏览代码

中间计量,附件,删除前确认

MaiXinRong 2 年之前
父节点
当前提交
da5cb09d08
共有 2 个文件被更改,包括 11 次插入6 次删除
  1. 9 5
      app/public/js/stage.js
  2. 2 1
      app/view/stage/modal.ejs

+ 9 - 5
app/public/js/stage.js

@@ -2916,12 +2916,16 @@ $(document).ready(() => {
 
                 const uuid = $(this).attr('data-imid');
                 const file_id = $(this).attr('data-attid');
-
-                postData(window.location.pathname + '/im-file/del', { uuid, file_id }, function (result) {
-                    stageIm.loadUpdateDetailAtt(result);
-                    SpreadJsObj.reLoadRowData(self.sheet, sels[0].row);
-                    self.makeAttTable(select);
+                const att = select.attachment.find(x => {
+                    return x.file_id === file_id;
                 });
+                deleteAfterHint(function () {
+                    postData(window.location.pathname + '/im-file/del', { uuid, file_id }, function (result) {
+                        stageIm.loadUpdateDetailAtt(result);
+                        SpreadJsObj.reLoadRowData(self.sheet, sels[0].row);
+                        self.makeAttTable(select);
+                    });
+                }, `确认删除附件「${att.filename}」?`);
             });
             // 预览附件
             $('body').on('click', '.preview-att', function () {

+ 2 - 1
app/view/stage/modal.ejs

@@ -627,4 +627,5 @@
 <% include ../shares/new_tag_modal.ejs %>
 <% include ../shares/tender_select_modal.ejs %>
 <% include ../shares/import_excel_modal.ejs%>
-<% include ../shares/stage_stash_modal.ejs%>
+<% include ../shares/stage_stash_modal.ejs%>
+<% include ../shares/delete_hint_modal.ejs%>