<template>
  <div>
    <div class="tableWrap">
      <el-table :data="tableList"
                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
        <el-table-column label=提现交易流水号
                         prop="id">
        </el-table-column>
        <el-table-column label=申请时间
                         prop="createTime">
        </el-table-column>
        <el-table-column label=提现金额
                         prop="amount">
        </el-table-column>
        <el-table-column label=账户余额
                         prop="balance">
        </el-table-column>
        <el-table-column label=账户号
                         prop="bankCardNo">
        </el-table-column>
        <el-table-column label=提现状态>
          <template slot-scope="scope">
            {{ scope.row.status | dealStatus }}
          </template>
        </el-table-column>
        <el-table-column label=支付账号
                         prop="platformAccountNo">
        </el-table-column>
        <el-table-column label=支付渠道
                         prop="channel">
        </el-table-column>
        <el-table-column label=交易流水号
                         prop="withdrawNo">
        </el-table-column>
      </el-table>
      <pagination :total="pageInfo.total"
                  :page.sync="pageInfo.page"
                  :limit.sync="pageInfo.limit"
                  :page-sizes="pageInfo.page_size"
                  @pagination="getList" />
    </div>
  </div>
</template>
<script>
import pagination from '@/components/Pagination/index'
import { studentWithdraw } from '@/api/studentManager'
export default {
  name: 'studentCashout',
  components: { pagination },
  data () {
    return {
      searceList: {},
      tableList: [],
      pageInfo: {
        // 分页规则
        limit: 10, // 限制显示条数
        page: 1, // 当前页
        total: 0, // 总条数
        page_size: [10, 20, 40, 50] // 选择限制显示条数
      },
    }
  },
  mounted () {
    this.getList()
  },
  activated() {
    this.getList()
  },
  methods: {
    getList () {
      studentWithdraw({
        userId: this.$route.query.userId,
        rows: this.pageInfo.limit,
        page: this.pageInfo.page
      }).then(res => {
        if (res.code == 200) {
          this.tableList = res.data.rows
        }
      })
    }
  }
}
</script>
<style lang="scss">
</style>