MaiXinRong пре 5 година
родитељ
комит
b7fbe333a5
1 измењених фајлова са 2 додато и 6 уклоњено
  1. 2 6
      app/public/js/ledger.js

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

@@ -23,7 +23,7 @@ const invalidFields = {
     posCalc: ['sgfh_qty', 'sgfh_tp', 'sjcl_qty', 'sjcl_tp', 'qtcl_qty', 'qtcl_tp'],
 };
 function transExpr(expr) {
-    return $.trim(expr).replace('\t', '').replace('=', '').replace('%', '/100');
+    return expr.replace('=', '').replace('%', '/100');
 }
 
 $(document).ready(function() {
@@ -835,8 +835,6 @@ $(document).ready(function() {
         });
 
         $('#bills-expr').bind('change mouseleave', function () {
-            if (this.readOnly) return;
-
             const expr = $(this);
             const sheet = ledgerSpread.getActiveSheet();
             const select = SpreadJsObj.getSelectObject(sheet);
@@ -1330,8 +1328,6 @@ $(document).ready(function() {
     posSpread.bind(spreadNS.Events.SelectionChanged, posOperationObj.selectionChanged)
     if (!posSpreadSetting.readOnly) {
         $('#pos-expr').bind('change mouseleave', function () {
-            if (this.readOnly) return;
-
             const expr = $(this);
             const posSheet = posSpread.getActiveSheet();
             const select = SpreadJsObj.getSelectObject(posSheet);
@@ -1870,7 +1866,7 @@ $(document).ready(function() {
                         const result = ledgerTree.loadPostData(data.ledger);
                         treeOperationObj.refreshTree(sheet, result);
                         sheet.setSelection(result.create[0].index, sel.col, sel.rowCount, sel.colCount);
-                        treeOperationObj.refreshOperationValid(sheet, selection);
+                        treeOperationObj.refreshOperationValid(sheet);
                         self.obj.modal('hide');
                     }, null, true);
                 }