{
  template: '${tmpl}',
  data: function () {
    return {
      cs: [],
      online: {
        month: ""
      },
      offline: {
        month: ""
      },

      onlineStat: {},
      offlineStat: {},
    }
  },
  mounted: function () {
    var self = this;
    self.statOnline();
    self.statOffline();
  },
  created: function () {

  },
  methods: {
    getAccount() {
      if (!this.eaccount_id) {
        return;
      }
      var self = this;
      this.$root.postReq("/web/usereaccountCtl/findOne", {
        id: this.eaccount_id
      }).then(function (d) {
        if (d.status == 0) {
          self.eaccount = d.data;
        }
      });
    },
    pickOnline() {
      this.statOnline();
    },
    pickOffline() {
      this.statOffline()
    },
    statOnline() {
      var self = this;
      this.$root.postReq("/web/esettleCtl/statOnlineSettle", {
        search: this.online
      }).then(function (d) {
        if (d.status == 0) {
          self.onlineStat = d.data;
        }
      });
    },
    statOffline() {
      var self = this;
      this.$root.postReq("/web/esettleofflineCtl/statOfflineSettle", {
        search: this.offline
      }).then(function (d) {
        if (d.status == 0) {
          self.offlineStat = d.data;
        }
      });
    },

    toOnlineBanlance() {
      this.$router.push({
        path: "/bpostat/bpoonlinebalance"
      });
    }
    
    /*
    getLoginUser : function (){
      var self =this;
      this.$root.postReq("/web/userCtl/loginUser",{}).then(function(d){
        if(d.status==0){
          self.loginUser = d.data;
        }
      });
    }
    */
  },
  vname: "gsb-bpostatindex"
}