Browse Source

台账修订,检查错误相关

MaiXinRong 4 years ago
parent
commit
83edc68619
2 changed files with 13 additions and 1 deletions
  1. 12 0
      app/public/js/spreadjs_rela/spreadjs_zh.js
  2. 1 1
      app/view/revise/info.ejs

+ 12 - 0
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -981,6 +981,18 @@ const SpreadJsObj = {
             }
         }
     },
+    refreshSheetReadOnly: function (sheet) {
+        this.beginMassOperation(sheet);
+        if (sheet.zh_setting) {
+            sheet.zh_setting.cols.forEach(function (col, i) {
+                for (let iRow = 0; iRow < sheet.getRowCount(); iRow++) {
+                    sheet.getCell(iRow, i).locked(col.readOnly || sheet.zh_setting.readOnly || false);
+                }
+                //sheet.getRange(-1, i, -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(col.readOnly || sheet.zh_setting.readOnly || false);
+            });
+        }
+        this.endMassOperation(sheet);
+    },
     /**
      * 刷新列是否只读
      * @param sheet

+ 1 - 1
app/view/revise/info.ejs

@@ -225,7 +225,7 @@
     const billsSpreadSetting = JSON.parse('<%- JSON.stringify(ledgerSpread) %>');
     const posSpreadSetting = JSON.parse('<%- JSON.stringify(posSpread) %>');
     const thousandth = <%- ctx.tender.info.display.thousandth %>;
-    const decimal = <%- ctx.tender.info.decimal %>;
+    const decimal = JSON.parse('<%- JSON.stringify(ctx.tender.info.decimal) %>');
     $('.sp-list-btn').click(function () {
         const type = $(this).data('type')
         if (type === 'hide') {