<template>
  <a-card :bordered="false">

    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline">
        <a-row :gutter="24">

          <a-col :md="6" :sm="8">
            <a-form-item label="日期">
              <a-input placeholder="请输入日期" v-model="queryParam.date"></a-input>
            </a-form-item>
          </a-col>

          <a-col :md="6" :sm="8" >
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>

        </a-row>
      </a-form>
    </div>

    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('代理商日汇总表')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
      </a-upload>
    </div>

    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange">

      </a-table>
    </div>
    <!-- table区域-end -->

    <!-- 表单区域 -->
    <kuaishouReportDailyAgentSum-modal ref="modalForm" @ok="modalFormOk"></kuaishouReportDailyAgentSum-modal>
  </a-card>
</template>

<script>
  import KuaishouReportDailyAgentSumModal from './modules/KuaishouReportDailyAgentSumModal'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'

  export default {
    name: "KuaishouReportDailyAgentSumList",
    mixins:[JeecgListMixin],
    components: {
      KuaishouReportDailyAgentSumModal
    },
    data () {
      return {
        description: '代理商日汇总表管理页面',
        // 表头
        columns: [
		   {
            title: '日期',
            align:"center",
            dataIndex: 'date'
           },
		   {
            title: '有消费计划数',
            align:"center",
            dataIndex: 'costCampaignCount'
           },
		   {
            title: '总消耗',
            align:"center",
            dataIndex: 'cost'
           },
		   {
            title: '现金消耗',
            align:"center",
            dataIndex: 'xianjinCost'
           },
		   {
            title: '后返消耗',
            align:"center",
            dataIndex: 'fandianCost'
           },
		   {
            title: '框返消耗',
            align:"center",
            dataIndex: 'kuangfanCost'
           },
		   {
            title: '激励账户消耗',
            align:"center",
            dataIndex: 'jiliCost'
           },
		   {
            title: '信用账户消耗',
            align:"center",
            dataIndex: 'xinyongCost'
           },
		   {
            title: '封面曝光数',
            align:"center",
            dataIndex: 'fengmianShowCount'
           },
		   {
            title: '封面点击数',
            align:"center",
            dataIndex: 'fengmianClickCount'
           },
		   {
            title: '素材曝光数',
            align:"center",
            dataIndex: 'sucaiShowCount'
           },
		   {
            title: '行为数',
            align:"center",
            dataIndex: 'convertCount'
           },
		   {
            title: '封面点击率',
            align:"center",
            dataIndex: 'fengmianClickRate'
           },
		   {
            title: '转化点击率',
            align:"center",
            dataIndex: 'convertClickRate'
           }
        ],
		url: {
          list: "/report/kuaishouReportDailyAgentSum/list",
          delete: "/report/kuaishouReportDailyAgentSum/delete",
          deleteBatch: "/report/kuaishouReportDailyAgentSum/deleteBatch",
          exportXlsUrl: "report/kuaishouReportDailyAgentSum/exportXls",
          importExcelUrl: "report/kuaishouReportDailyAgentSum/importExcel",
       },
    }
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
    methods: {
     
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>