<template>
  <div class="app-container">
    <!--搜索区-->
    <div class="float">
      <el-input
        v-model="page.data.yyyyy"
        placeholder="请输入姓名"
        clearable
        class="margin-left input"
      ></el-input>
      <el-select
        filterable
        clearable
        v-model="page.data.qqqqq"
        placeholder="请选择单位"
        class="margin-left input m-b-10"
      >
        <el-option
          v-for="item in unit_list"
          :key="item.code"
          :label="item.desc"
          :value="item.code"
        >
        </el-option>
      </el-select>
      <el-select
        filterable
        clearable
        v-model="page.data.wwwww"
        placeholder="请选择部门"
        class="margin-left input m-b-10"
      >
        <el-option
          v-for="item in department_list"
          :key="item.code"
          :label="item.desc"
          :value="item.code"
        >
        </el-option>
      </el-select>
      <el-select
        filterable
        clearable
        v-model="page.data.eeeee"
        placeholder="请选择缴费项目"
        class="margin-left input m-b-10"
      >
        <el-option
          v-for="item in project_list"
          :key="item.code"
          :label="item.desc"
          :value="item.code"
        >
        </el-option>
      </el-select>
      <el-button
        type="primary"
        icon="el-icon-search"
        @click="fetchData"
        class="margin-left"
        >搜索</el-button
      >
    </div>
    <!--主表格-->
    <el-table
      class="table"
      ref="table_form"
      v-loading="listLoading"
      :data="list"
      element-loading-text="Loading"
      border
      fit
      highlight-current-row
    >
      <el-table-column label="序号" align="center" width="80px">
        <template slot-scope="scope">
          {{ indexMethod(scope.$index) }}
        </template>
      </el-table-column>
      <el-table-column label="姓名" align="center">
        <template slot-scope="scope">
          {{ scope.row.content }}
        </template>
      </el-table-column>
      <el-table-column label="单位" align="center">
        <template slot-scope="scope">
          {{ scope.row.content }}
        </template>
      </el-table-column>
      <el-table-column label="部门 " align="center">
        <template slot-scope="scope">
          {{ scope.row.content }}
        </template>
      </el-table-column>

      <el-table-column label="缴费项目" align="center">
        <template slot-scope="scope">
          {{ scope.row.createTime }}
        </template>
      </el-table-column>
      <el-table-column label="应缴费金额" align="center">
        <template slot-scope="scope">
          {{ scope.row.createTime }}
        </template>
      </el-table-column>
      <el-table-column label="实缴费金额" align="center">
        <template slot-scope="scope">
          {{ scope.row.createTime }}
        </template>
      </el-table-column>
      <el-table-column label="缴费时间" align="center">
        <template slot-scope="scope">
          {{ scope.row.createTime }}
        </template>
      </el-table-column>
    </el-table>

    <!--分页栏-->
    <pagination
      :total="total"
      :page.sync="page.pageNum"
      :limit.sync="page.pageSize"
      @pagination="fetchData"
    />
  </div>
</template>

<script>
import Pagination from "@/components/Pagination";
export default {
  components: { Pagination },
  filters: {},
  computed: {},
  data() {
    return {
      // 主表格&主表格加载状态
      list: [],
      listLoading: true,
      // 分页参数
      page: {
        data: {
          yyyyy: null,
          qqqqq: null,
          wwwww: null,
          eeeee: null,
        },
        pageNum: 1,
        pageSize: 10,
      },
      total: 0,
      unit_list: [],
      department_list: [],
      project_list: [],
    };
  },
  created() {
    this.fetchData();
  },
  watch: {},
  methods: {
    // 获取列表数据
    fetchData() {
      // this.listLoading = true;
      // birthdayQuotesList(this.page).then((res) => {
      //   this.list = res.data.records;
      //   this.total = res.data.total;
      this.listLoading = false;
      // });
    },

    // 返回列表序号
    indexMethod(index) {
      return (this.page.pageNum - 1) * this.page.pageSize + index + 1;
    },
  },
};
</script>
<style scoped lang="scss">
</style>
