Kaynağa Gözat

报表切换类型时,重新初始化界面

Tony Kang 1 yıl önce
ebeveyn
işleme
018d0eed30
2 değiştirilmiş dosya ile 8 ekleme ve 0 silme
  1. 6 0
      app/public/report/js/rpt_main.js
  2. 2 0
      app/view/report/index.ejs

+ 6 - 0
app/public/report/js/rpt_main.js

@@ -63,6 +63,12 @@ let zTreeOprObj = {
     maxPages: 0,
     canvas: null,
     selectedPrjIDs: [],
+    reIniReport: function() {
+        const me = zTreeOprObj;
+        JpcCanvasOutput.cleanCanvas(me.canvas);
+        me.currentRptPageRst = null;
+        me.currentNode = null;
+    },
     countChkedRptTpl: function () {
         let me = zTreeOprObj;
         if (me.treeObj) {

+ 2 - 0
app/view/report/index.ejs

@@ -399,6 +399,7 @@
         CURRENT_SELECTED_BIZ_TYPE = type;
         // CHANGE_ID = -1;
         // BUSINESS_ID = -1;
+        zTreeOprObj.reIniReport();
         if (type === 'stage') {
             // 计量期
             $('#divSelectableStages').show();
@@ -840,6 +841,7 @@
     }
 
     function buildAdvancePaySelection(adList) {
+        zTreeOprObj.reIniReport();
         $("#optionSelectableAdvancePays").empty();
         $("#btnCurrentAdvancePay")[0].innerText = '';
         let hasMatch = false;