Browse Source

列设置,编辑相关

MaiXinRong 5 months ago
parent
commit
0a3faf189f
1 changed files with 8 additions and 2 deletions
  1. 8 2
      app/public/js/project_spread.js

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

@@ -113,6 +113,12 @@ $(document).ready(() => {
                 return;
             }
             switch (col.field) {
+                case 'bills_valid':
+                    info.cancel = !node.bills;
+                    break;
+                case 'pos_valid':
+                    info.cancel = !node.pos;
+                    break;
                 case 'alias':
                     info.cancel = node.fixed.indexOf('alias') >= 0;
                     break;
@@ -173,10 +179,10 @@ $(document).ready(() => {
 
             const col = info.sheet.zh_setting.cols[info.col];
             if (col.field.indexOf('valid') < 0) return;
-            if (col.field === 'pos_valid' && !col.pos) return;
-            if (col.field === 'bills_valid' && !col.bills) return;
 
             const node = SpreadJsObj.getSelectObject(info.sheet);
+            if (col.field === 'pos_valid' && !node.pos) return;
+            if (col.field === 'bills_valid' && !node.bills) return;
             if (node.fixed.indexOf('valid') >= 0) return;
             if (col.field === 'valid') {
                 node.valid = !node.valid;