{
  template: '${tmpl}',
    data: function() {
      return {
        selected: "1",
        radioShow: "",
        lists: "",
        obj: {
          invoiceApplyStatus: '',
          inputValue: '',
        },
        showLoading: false,
      }
    },
  mounted: function() {
    this.showLoading = true;
    this.$root.getReq("/web/invoiceapplyCtl/findAllOrderInvoice", { invoiceApplyStatus: "1" }).then((res) => {
      if (res && res.code == '1') {
        this.showLoading = false;
        this.lists = res;
      }
      console.log(res);
    });
  },
  created: function() {

  },
  watch: {
    selected(n){
      switch (n) {
        case "1":
          this.obj.invoiceApplyStatus = "1";
          this.findOrderInvoice(this.obj);
          break;
        case "2":
          this.obj.invoiceApplyStatus = "2";
          this.findOrderInvoice(this.obj);
          break;
        case "3":
          this.obj.invoiceApplyStatus = "3";
          this.findOrderInvoice(this.obj);
          break;
      };
    },
  },
  methods: {
    findOrderInvoice(obj){
      this.$root.getReq("/web/invoiceapplyCtl/findAllOrderInvoice", obj).then((res) => {
        this.showLoading = false;
        this.lists = res;
      });
    },
    goInvoiceDetail(){
      this.$router.push({ path: '/mobileinvoicedetail' });
    },
    goInvoiceText(index){
      console.log('1232');
      this.$router.push({ path: '/mobileinvoicetext' });
    },
    goInvoiceSubmit(){
      this.$router.push({ path: '/mobileinvoicesubmit' });
    }
    /*
    getLoginUser : function (){
      var self =this;
      this.$root.postReq("/web/userCtl/loginUser",{}).then(function(d){
        if(d.status==0){
          self.loginUser = d.data;
        }
      });
    }
    */
  },
  vname: "gsb-mobileinvoice"
}
