{
    template:'${tmpl}',
    data:function(){
        return {
          multipleSelection: [],
          isSingleSelect:true,
          sfs:[
            {field:'totalProfitSum',label:'毛利总额'},
          ],
        }
    },
    mounted:function(){

    },
    created:function(){
    },
    methods:{
      btnvisbleMethod(row, btn){
        if (btn.key == "mydetail") {
          if (row.sveItemCode == "zzsbzc" || row.sveItemCode == "dlrfzzc" || row.sveItemCode == "dbsbzc") {
            return true;
          } else {
            return false;
          }
        }
        return true;
      },
      onColFormater(row, column, cellvalue, index){
        if (column.property == "created_at") {
          var date = new Date(row["created_at"]);
          var time = date.toLocaleDateString();
          console.log(time);
          return time;
        }
        if (column.property == "customerinfo.name") {
          if (!row.customerinfo) {
            return "---";
          } else {
            return row.customerinfo.name;
          }
        }
        if (column.property == "name") {
          if (!row["name"]) {
            return "---";
          } else {
            return row.name;
          }
        }
        if (column.property == "nclOneCodesNum") {
          if (!row["nclOneCodesNum"]) {
            return "---";
          } else {
            return row.nclOneCodesNum;
          }
        }
        if (column.property == "pfSettleProfit") {
          if (row["pfSettleProfit"] == 0) {
            return "未结算";
          } else {
            return "已结算";
          }
  
        }
        return cellvalue;
      },
      onRowClick(row, key, e){
        if (key == "mydetail") {
          if (row.sveItemType == "ip") {
            this.$root.pushx({
              title: "订单详情",
              name: "/tmOrderDetail",
              params: {
                orderNum: row.code
              }
            });
          }
        }
      },      
      handleSelectionChange:function(val){
         this.multipleSelection = val;
         console.log(val);
       },
    },
    computed: Vuex.mapState({
      count:state=>state.count,
      headStyle:function(){
        return {"background-color":"white"};
      }
    }),
    vname:"gsb_profitrpt"
}
