|
@@ -1098,6 +1098,13 @@ $(document).ready(function() {
|
|
|
const row = selection[0].row;
|
|
|
const select = ledgerTree.nodes[row];
|
|
|
return select;
|
|
|
+ },
|
|
|
+ disabled: function (key, opt) {
|
|
|
+ const sheet = ledgerSpread.getActiveSheet();
|
|
|
+ const selection = sheet.getSelections();
|
|
|
+ const row = selection[0].row;
|
|
|
+ const select = ledgerTree.nodes[row];
|
|
|
+ return select && select.level <= 1;
|
|
|
}
|
|
|
};
|
|
|
if (!readOnly) {
|
|
@@ -1343,7 +1350,7 @@ $(document).ready(function() {
|
|
|
loadExprToInput: function () {
|
|
|
const sheet = posSpread.getActiveSheet();
|
|
|
const sel = sheet.getSelections()[0];
|
|
|
- if (!sel) return;
|
|
|
+ if (!sel || !sheet.zh_setting) return;
|
|
|
|
|
|
const col = sheet.zh_setting.cols[sel.col], cell = sheet.getCell(sel.row, sel.col);
|
|
|
if (col && col.type === 'Number') {
|