{
    template:'${tmpl}',
    data:function(){
        return {
          multipleSelection: [],
          isSingleSelect:true,
          sfs:[
            {field:'recvAmount',label:'收款总额'},
            {field:'payAmount',label:'支出总额'}
          ],
          calcs:[],
        }
    },
    mounted:function(){

    },
    created:function(){
    },
    methods:{
      onlinkquery(row){
        var modelname=null;
        var bizCode=null;
        if(row.sourceType=="receiptvoucher"){
          modelname="receiptvoucher";
          bizCode="receiptvoucher";
        }
        if(row.sourceType=="expensevoucher"){
          modelname="expensevoucher";
          bizCode="expensevoucher";
        }
        this.$root.pushx({
          title:"联查",
          name:"/linkquery",
          params:{
              modelName:modelname,
              billCode:row.code,
              bizCode:bizCode,
          }
        });
     },
       onColFormater(row,column,cellvalue,index){
         if(column.property=="voucherDate"){
           var date = new Date(row["voucherDate"]);
           var time= date.toLocaleDateString();
           return time;
         }
         console.log("ccccccccccccccccccccccccccccc");
         return cellvalue;
       },
       oncalcfield(sum_fields,sumdata,avg_fields,avgdata){
        this.calcs.length=0;
          var ba= Number(sumdata["recvAmount"])-Number(sumdata["payAmount"]);
          var item={label:"余额",value:ba};
          this.calcs.push(item);
       },
       handleSelectionChange:function(val){
         this.multipleSelection = val;
         console.log(val);
       },
       onRowClick(row,key,e){
           if(key=="stopUser"){

           }
         },

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