<template>
  <div>
    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="date"
        label="发货单号"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="状态"
        width="180">
      </el-table-column>
      <el-table-column
        prop="address"
        label="发货日期">
      </el-table-column>
      <el-table-column
        prop="address"
        label="备注">
      </el-table-column>
    </el-table>
    <div class="container normal-panel" style="text-align:right">
      <el-pagination
        background
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-sizes="[20, 50, 100, 200]"
        layout="total,sizes, prev, pager, next, jumper"
        :total="total">
      </el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      tableData:[],
      param:{
        "id": 20221205111302,
        "content": {
          "sa_orderid": 12,
          "pageNumber": 1,
          "pageSize": 17,
          "where": {
            "condition": ""
          }
        },
      }
    }
  },
  methods:{
    async listData() {
      const res = await this.$api.requested(this.param)
      this.tableData = res.data
      this.total = res.total
      this.currentPage = res.pageNumber
    },
    handleSizeChange(val) {
      this.param.pageSize = val
      this.listData()
    },
    handleCurrentChange(val) {
      this.param.pageNumber = val
      this.listData()
    },
  },
  mounted () {
    this.listData()
  }
}

</script>
<style>
</style>