Przeglądaj źródła

sjs定位行,焦点问题

MaiXinRong 2 tygodni temu
rodzic
commit
3eceacae42

+ 1 - 7
app/public/js/cost_stage_analysis.js

@@ -1,9 +1,3 @@
-function getTenderId() {
-    return window.location.pathname.split('/')[2];
-}
-const invalidFields = {
-    parent: ['cur_qty', 'cur_tp', 'unit_price'],
-};
 function transExpr(expr) {
     return $.trim(expr).replace('\t', '').replace('=', '').replace('%', '/100');
 }
@@ -524,7 +518,7 @@ $(document).ready(function() {
             }
             SpreadJsObj.initSheet(this.sheet, spreadSetting);
             this.reloadDetailData();
-            SpreadJsObj.locateRow(this.sheet, 0);
+            SpreadJsObj.locateRow(this.sheet, 0, false);
         }
         // 事件
         editEnded(e, info) {

+ 1 - 7
app/public/js/cost_stage_book.js

@@ -1,9 +1,3 @@
-function getTenderId() {
-    return window.location.pathname.split('/')[2];
-}
-const invalidFields = {
-    parent: ['cur_qty', 'cur_tp', 'unit_price'],
-};
 function transExpr(expr) {
     return $.trim(expr).replace('\t', '').replace('=', '').replace('%', '/100');
 }
@@ -469,7 +463,7 @@ $(document).ready(function() {
             }
             SpreadJsObj.initSheet(this.sheet, spreadSetting);
             this.reloadDetailData();
-            SpreadJsObj.locateRow(this.sheet, 0);
+            SpreadJsObj.locateRow(this.sheet, 0, false);
         }
         loadRelaData() {
             const select = SpreadJsObj.getSelectObject(this.sheet);

+ 2 - 8
app/public/js/cost_stage_ledger.js

@@ -1,9 +1,3 @@
-function getTenderId() {
-    return window.location.pathname.split('/')[2];
-}
-const invalidFields = {
-    parent: ['cur_qty', 'cur_tp', 'unit_price'],
-};
 function transExpr(expr) {
     return $.trim(expr).replace('\t', '').replace('=', '').replace('%', '/100');
 }
@@ -22,7 +16,7 @@ $(document).ready(function() {
                 isLeaf: 'tree_is_leaf',
                 fullPath: 'tree_full_path',
                 rootId: -1,
-                calcFields: ['yf_tp', 'sf_tp', 'pay_tp', 'cut_tp'],
+                calcFields: ['yf_tp', 'sf_tp', 'pay_tp', 'cut_tp', 'yf_excl_tax_tp', 'sf_excl_tax_tp'],
                 keys: ['id', 'stage_id', 'tree_id'],
             };
             this.tree = createNewPathTree('ledger', this.treeSetting);
@@ -671,7 +665,7 @@ $(document).ready(function() {
             }
             SpreadJsObj.initSheet(this.sheet, spreadSetting);
             this.reloadDetailData();
-            SpreadJsObj.locateRow(this.sheet, 0);
+            SpreadJsObj.locateRow(this.sheet, 0, false);
         }
         loadRelaData() {
             const select = SpreadJsObj.getSelectObject(this.sheet);

+ 2 - 2
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -1260,11 +1260,11 @@ const SpreadJsObj = {
         sheet.getParent().focus();
         sheet.showRow(index, spreadNS.VerticalPosition.center);
     },
-    locateRow: function (sheet, row) {
+    locateRow: function (sheet, row, focus = true) {
         const sels = sheet.getSelections();
         sheet.setSelection(row, sels[0].col, 1, 1);
         SpreadJsObj.reloadRowsBackColor(sheet, [row, sels[0].row]);
-        sheet.getParent().focus();
+        if (focus) sheet.getParent().focus();
         sheet.showRow(row, spreadNS.VerticalPosition.center);
     },
     locateDataBy: function(sheet, fun) {