<template>
  <div v-loading="loading">
    <div class="heior_box">
      <div class="search-box">
        <el-date-picker
          v-model="sell_detail_month"
          size="small"
          type="month"
          style="margin-right:5px;width:110px;float:left;"
          @change="sell_detail_info"
          placeholder="选择月">
        </el-date-picker>
        <el-button slot="append" icon="el-icon-search" @click="search" size="small">搜索</el-button>
      </div>
    </div>
    <el-table :data="retData.List"  border size="medium" :height="$getHeight(100)">
      <el-table-column prop="name" label="客户经理" width="180"></el-table-column>
       <el-table-column prop="sell_percent" label="营业额/总营业额" width="180"></el-table-column>
      <el-table-column prop="cost_percent" label="消费客户数/所有客户" ></el-table-column>
      <el-table-column prop="cost_register" label="注册且购买过的客户/当月新注册客户总数"></el-table-column>
      <el-table-column prop="cost_old_user" label="老客户在本月再次购买/所有老客户"></el-table-column>
      <el-table-column prop="com_cost" label="同比增加金额"></el-table-column>
      <el-table-column prop="com_percent" label="同比增加百分比"></el-table-column>
      <el-table-column prop="today_new_user" label="今日新赠客户"></el-table-column>
      <el-table-column prop="refund" label="总退款金额"></el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  name: 'treeTable',
  components: {
  },
  data () {
    return {
      loading: false,
      options: [],
      retData: { OrderAmount: 0, UserTotal: 0, List: [] },
      dateRange: [],
      sell_detail_month: null
    }
  },
  created () {
    this.$store.commit('setCurrentNav', '订单管理>>销售统计')
    this.get()
  },
  methods: {
    search () {
      this.get()
    },
    get () {
      this.loading = true
      this.$api.get(this.$api.phpURL + 'manager/SellInfo/getAll', {sell_month: this.sell_detail_month}).then(res => {
        this.retData.List = res.data
        this.loading = false
      })
    },
    dataExport () {
      this.$api.getDownloadFile('/baseinfo/v1/chargeorder/ExportOrder', this.searchModel)
    }
  }
}
</script>
<style scoped>
</style>
