{
    template:'${tmpl}',
    data:function(){
        return {
          id : "",
          pageSize :500,
          currentPage : 1,
          giveupId : 0,
          dialogFormVisible: false,
          form:{
            reason:""
          },
          datalist:[],
        };
    },
    mounted:function(){
      this.getList();

    },
    created:function(){

    },
    methods:{
      getList() {
        var self = this;
        var params = {
          search : {user_id : this.$root.currentUser.id}
        };
        params.pageInfo={pageSize:this.pageSize,pageNo:this.currentPage};
        params.pageType = 1;
        this.$root.postReq("/web/businessallotCtl/findAndCountAll", params).then(d=>{
          if(d.status == 0) {
            self.datalist = self.datalist.concat(d.data.rows);
          }
        });
      },
      receive(id) {
        this.$root.postReq("/web/businessallotCtl/receipt", {id : id}).then(d=>{
          if (d.status == 0) {
            this.$root.$refs.bottommenu.trigger("dealing");
          }
        });
      },
      giveupop(id) {
        this.giveupId = id;
        this.dialogFormVisible = true;
      },
      giveup(id){
        var self = this;
        if(!this.form.reason) {
          this.$alert('请填写拒接原因', '提示', {
             confirmButtonText: '确定',
             callback: action => {
             }
           });
          return;
        }
        this.$root.postReq("/web/businessallotCtl/giveup", {id : this.giveupId, reason: this.form.reason}).then(d=>{
          if (d.status == 0) {
            this.$root.$refs.bottommenu.trigger("dealed");
          }
        });
      },

  },
    vname:"gsb-waitdeal"
}
