Просмотр исходного кода

计量台账,只显示截止本期

MaiXinRong 2 лет назад
Родитель
Сommit
2d7760dcd4
2 измененных файлов с 12 добавлено и 0 удалено
  1. 11 0
      app/public/js/stage.js
  2. 1 0
      app/view/stage/index.ejs

+ 11 - 0
app/public/js/stage.js

@@ -4515,6 +4515,17 @@ $(document).ready(() => {
                         });
                         SpreadJsObj.refreshTreeRowVisible(sheet);
                         break;
+                    case "endMeasure":
+                        tree.expandByCustom(function (node) {
+                            for (const field of ['end_contract_tp', 'end_qc_tp', 'end_gather_tp']) {
+                                if (node[field]) {
+                                    return true;
+                                }
+                            }
+                            return false;
+                        });
+                        SpreadJsObj.refreshTreeRowVisible(sheet);
+                        break;
                 }
                 closeWaitingView();
             }, 100);

+ 1 - 0
app/view/stage/index.ejs

@@ -18,6 +18,7 @@
                             <a class="dropdown-item" name="showLevel" tag="last" href="javascript: void(0);">最底层</a>
                             <a class="dropdown-item" name="showLevel" tag="leafXmj" href="javascript: void(0);">只显示项目节</a>
                             <a class="dropdown-item" name="showLevel" tag="curMeasure" href="javascript: void(0);">只显示本期计量</a>
+                            <a class="dropdown-item" name="showLevel" tag="endMeasure" href="javascript: void(0);">只显示截止本期计量</a>
                         </div>
                     </div>
                 </div>