Tony Kang 3 лет назад
Родитель
Сommit
0350c9ced9
2 измененных файлов с 5 добавлено и 1 удалено
  1. 4 0
      app/public/report/js/rpt_archive.js
  2. 1 1
      app/view/report/index_archive.ejs

+ 4 - 0
app/public/report/js/rpt_archive.js

@@ -301,6 +301,7 @@ let rptArchiveObj = {
 
     _countChkedRptTpl: function () {
         let me = rptArchiveObj;
+        $('#delete_archive_btn').attr('disabled', '');
         if (me.treeObj) {
             me.checkedRptTplNodes = [];
             let chkNodes = me.treeObj.getCheckedNodes(true), cnt = 0, hasCurrentNode = false;
@@ -322,6 +323,9 @@ let rptArchiveObj = {
             $("#export_div").find("span").each(function(cIdx,elementSpan){
                 elementSpan.innerText = cnt;
             });
+            if (cnt) {
+                $('#delete_archive_btn').removeAttr('disabled');
+            }
         }
     },
 

+ 1 - 1
app/view/report/index_archive.ejs

@@ -80,7 +80,7 @@
                                 <div class="panel">
                                     <div class="panel-body" id="delete_div">
                                         <div class="btn-group mr-1" role="group">
-                                            <button class="btn btn-outline-danger btn-sm" type="button" data-toggle="modal" data-target="#del-archive">
+                                            <button class="btn btn-outline-danger btn-sm" type="button" data-toggle="modal" data-target="#del-archive" id="delete_archive_btn">
                                                 <i class="fa fa-remove"></i><br>
                                                 删除归档
                                             </button>