{
    template:'${tmpl}',
    data:function(){
        return {
          multipleSelection: [],
          isSingleSelect:false,
          account:0,
        }
    },
    mounted:function(){

    },
    created:function(){
      this.$root.postReq("/web/accountCtl/petradesSum",null).then(d=>{
        if(d.status==0){
          this.account=d.data;
        }
      });
    },
    methods:{
      open:function(){
        var that=this;
        var obj={account:this.account};
        if( this.account <= 0 )
        {
          this.$message.warning("未发现需要缴纳的官费,请核对后再操作");
          return false;
        }
        else{
          this.$root.postReq("/web/accountCtl/subPublicExpense",obj).then(d=>{
            if(d.status<0){
              this.$message.warning(d.msg);
            }else {
              this.$message.success(d.msg);
              that.account=0;
              this.$refs.grid.fetchData();
            }
          })
        }
      },
       handleSelectionChange:function(val){
         this.multipleSelection = val;
         console.log(this.cc);
       },
       headerCellStyle:function(){
         return {"background-color":"red"};
       },
       onColFormater(row,column,cellvalue,index){
         if(column.property=="tradeDate"){
            return new Date(cellvalue).toLocaleString();
         }
         if(row.tradeType=="fill"){
           if(column.property=="renAmount"){
             return Number(cellvalue)*(-1);
           }
         }
         return cellvalue;
       },
    },
    computed:{
      headStyle:function(){
        return {"background-color":"white"};
      }
    },
    vname:"gsb-petrades"
}
