<template>
  <div>
    <div>
      <head-todo
      @getList="getList"></head-todo>
      <list
      :tableData="tableData"
      :currentPage="currentPage"
      :pageSize="pageSize"
      :total="total"
      @getList="getList"></list>
    </div>
  </div>
</template>
<script>
import HeadTodo from './components/head-todo'
import List from './components/list'
export default {
  name: 'ReportInvList',
  components: {
    HeadTodo,
    List
  },
  data () {
    return {
      tableData: [],
      total: 0,
      query: {
        'page.currentPage': 1,
        'page.limitCount': 10
      },
      currentPage: 1,
      pageSize: 10
    }
  },
  created () {
    this.getList()
  },
  methods: {
    getList (query) {
      const url = this.$API.storageTasks.ReportInvList.getList
      const param = { ...this.query, ...query }
      this.$https.post(url, param).then(res => {
        this.tableData = res.rows
        this.total = res.total
        this.currentPage = res.currentPage
        this.pageSize = res.limit
      })
    }
  }
}
</script>
