riku
2022-08-23 8fbd6b8d09e70494d920cc0b77812e9643be3196
pages/module_ledger/ledgerhome/ledgerhome.js
@@ -85,8 +85,8 @@
    this.getLedgerType(now.add(-1, 'M').format('YYYY-MM-DD'), r => {
      this.setData({
        lastMonthInfo: r[2]
      }, true)
    }) //上月
      })
    }, true) //上月
  },
  /**
@@ -181,6 +181,9 @@
    monthInfo.overtime = moment().date() - this.DEADLINEDAY
    monthInfo.percent = Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100)
    console.log(lastMonth);
    console.log(monthInfo);
    //选项卡
    var t = []
    var p = []
@@ -207,7 +210,7 @@
    var i = e.currentTarget.dataset.index.split(',')
    var indexGroup = [parseInt(i[0]), parseInt(i[1])]
    var ledger = this.data.pageList[indexGroup[0]][indexGroup[1]]
    console.log(indexGroup);
    console.log(ledger);
    var that = this
    wx.navigateTo({
@@ -252,14 +255,14 @@
    let that = this;
    let query = wx.createSelectorQuery(); //必须要先创建一个查询
    query.select(element).boundingClientRect(function (rect) {
      // let pageheight = that.data.pageheight.split('px')[0]
      // pageheight = parseInt(pageheight)
      // if (rect > pa) {
      // }
      console.log(rect.height);
      let pageheight = that.data.pageheight.split('px')[0]
      pageheight = parseInt(pageheight)
      if (rect.height > pageheight) {
      that.setData({
        pageheight: rect.height + 'px'
      });
      }
    }).exec();
  },
  swichNav: function (e) {
@@ -271,7 +274,7 @@
        currentTab: e.target.dataset.current,
        navScrollLeft: e.target.dataset.current >= 3 ? ((e.target.dataset.current) * 60) : 0 //判断当前选中的个数是否是第5个
      })
      that.tabsHeight('.page' + e.target.dataset.current); //查询哪一个元素
      // that.tabsHeight('.page' + e.target.dataset.current); //查询哪一个元素
    }
  },
  bindChange: function (e) {
@@ -280,7 +283,7 @@
      currentTab: e.detail.current,
      navScrollLeft: e.detail.current >= 3 ? ((e.detail.current) * 60) : 0 //判断当前选中的个数是否是第5个
    });
    // that.tabsHeight('.page'+e.target.dataset.current);   //查询哪一个元素
    that.tabsHeight('.page' + e.detail.current);   //查询哪一个元素
  },
  changeMonth(){