{
    template:'${tmpl}',
    data:function(){
        return {
          multipleSelection: [],
          isSingleSelect:false,
          bizCode:"ptrades",
          account:"",
          balanceShow:false,
          balanceTotalShow:false,
          balanceFinShow:false,
        }
    },
    mounted:function(){

    },
    created:function(){
      this.balanceShow=false;
      this.balanceTotalShow=false;
      this.balanceFinShow=false;
      var reqParam={};
      if(this.codePath.indexOf("mytraderecord")>=0||this.codePath.indexOf("ucmytrades")>=0){
        reqParam.param=null;
        this.bizCode="mytrades";
        this.balanceShow=true;
      }else if( this.codePath.indexOf("fintraderecord")>=0 ){

        reqParam.param="p";
        this.balanceFinShow=true;
        this.bizCode="ptrades";
      }
      else {
        reqParam.param="p";
        this.balanceTotalShow=true;
        this.bizCode="ptrades";
      }
      this.$root.postReq("/web/accountCtl/findById",reqParam).then(d=>{
        if(d.status==0){
          this.account=d.data;
        }
      });
    },
    methods:{
      open(){
        this.$router.push("/platform/withdraw");
      },
      onColFormater(row,column,cellvalue,index){
        if(column.property=="tradeDate"){
           return new Date(cellvalue).toLocaleString();
        }
        if(row.tradeType=="fill" && this.codePath.indexOf("mytraderecord")<0){
          if(column.property=="renAmount"){
            return Number(cellvalue)*(-1);
          }
        }
        if(row.tradeType=="recommendFee" && this.codePath.indexOf("ptraderecord")>=0){
          if(column.property=="renAmount"){
            return Number(cellvalue)*(-1);
          }
        }
        return cellvalue;
      },
       handleSelectionChange:function(val){
         this.multipleSelection = val;
         console.log(val);
       },
       headerCellStyle:function(){
         return {"background-color":"red"};
       },
       fetchData:function(){

       }
    },
    computed: Vuex.mapState({
      count:state=>state.count,
      headStyle:function(){
        return {"background-color":"white"};
      }
    }),
    vname:"gsb-trades"
}
