<template>
  <section class="dm-wrap" v-loading="loading">
    <div class="pb20 clearfix">
      <el-input v-model="pageParams.phone" class="w300" placeholder="请输入会员姓名/手机号" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
      <el-date-picker class="w250" v-model="pageParams.time" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh"></el-date-picker>
      <div style="display:inline-block;">
        <vue-gic-store-new :options="options" :isAdd="isAdd" :uuid.sync="uuid" ref="storeNew" @store-change="storeChange"></vue-gic-store-new>
      </div>
    </div>
    <el-table tooltipEffect="light" :data="tableList" style="width: 100%">
      <el-table-column :show-overflow-tooltip="true" align="left" prop="createTime" label="签到时间">
        <template slot-scope="scope">
          <p class="cell-time">
            {{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd-HH-mm', true).y }}<br />
            <span>{{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd-HH-mm', true).h }}</span>
          </p>
        </template>
      </el-table-column>
      <el-table-column :show-overflow-tooltip="true" align="left" prop="createTime" label="签到用户"></el-table-column>
      <el-table-column :show-overflow-tooltip="true" align="left" prop="createTime" label="福利类型"></el-table-column>
      <el-table-column :show-overflow-tooltip="true" align="left" prop="createTime" label="签到福利"></el-table-column>
      <el-table-column :show-overflow-tooltip="true" align="left" prop="createTime" label="签到门店"></el-table-column>
    </el-table>
  </section>
</template>

<script>
export default {
  name: 'sign-record',
  data() {
    return {
      loading: false,
      pageParams: {
        pageNum: 1,
        pageSize: 10
      },
      tableList: [],
      // 门店筛选器
      uuid: '', // 新增传空，编辑必传,
      // 需要的下拉 默认为全部[0,1,2,3,4,5]
      // 0 全部 1 门店类型 2门店标签 3 门店区域 4 门店分组 5 部分门店
      options: [0, 1, 2, 3, 4, 5],
      isAdd: true,
      storeConfig: null
    };
  },
  created() {
    this.$store.commit('mutations_breadcrumb', [{ name: '门店签到' }, { name: '门店签到记录', path: '' }]);
  },
  methods: {
    fetch() {
      console.log();
    },
    refresh() {
      console.log();
    },
    storeChange() {
      // console.log(this.uuid);
      this.$refs['storeNew'].getStoreConfig().then(data => {
        // console.log('data----', data);
        this.storeConfig = data;
      });
    }
  }
};
</script>
<style lang="scss" scoped></style>
