Browse Source

台账完全没有数据时,允许导入Excel

MaiXinRong 5 years ago
parent
commit
a79db65018
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/public/js/ledger.js

+ 2 - 2
app/public/js/ledger.js

@@ -1223,7 +1223,7 @@ $(document).ready(function() {
                         return !(parent && ledgerTree.isLeafXmj(parent));
                     }
                 } else {
-                    return false;
+                    return true;
                 }
             },
             callback: function (key, opt) {
@@ -1286,7 +1286,7 @@ $(document).ready(function() {
             icon: 'fa-file-excel-o',
             disabled: function (key, opt) {
                 const node = SpreadJsObj.getSelectObject(ledgerSpread.getActiveSheet());
-                return readOnly
+                return readOnly || !node
                     || (node.children && node.children.length > 0)
                     || (!_.isNil(node.b_code) && node.b_code !== '');
             },