<template>
  <a-table
    bordered
    :pagination="pagination"
    :columns="columns"
    :dataSource="dataSource"
    :scroll="{ x: 'max-content' }"
    @change="handleTableChange"
  >
  </a-table>
</template>


<script setup>
import { ref, defineProps, reactive } from 'vue'
import config from '@/utils/config.js'

const props = defineProps({
  onCallBack: {
    type: Function,
    required: true
  },
});

// 表格行数据
const dataSource = ref([])

let pagination = reactive({
  total: dataSource.value.length,
  current: 10,
  pageSize: config.pageParam.pageSize,
  showSizeChanger: true,
  pageSizeOptions: config.pageParam.pageSizeOptions,
  showQuickJumper: true
})

const columns = ref([
  {
    title: '申请时间',
    dataIndex: 'cyclingOrderNumber',
    width: 200,
    key: 'cyclingOrderNumber',
    align: 'center'
  },
  {
    title: '所属区域',
    dataIndex: 'applyTime',
    width: 200,
    key: 'applyTime',
    align: 'center'
  },
  {
    title: '用户手机',
    dataIndex: 'operationArea',
    width: 200,
    key: 'operationArea',
    align: 'center'
  },
  {
    title: '订单编号',
    dataIndex: 'phone',
    width: 200,
    key: 'phone',
    align: 'center'
  },
  {
    title: '车辆编号',
    dataIndex: 'cyclingOrderNumber',
    width: 200,
    key: 'cyclingOrderNumber',
    align: 'center'
  },
  {
    title: '订单金额',
    dataIndex: 'applyTime',
    width: 200,
    key: 'applyTime',
    align: 'center'
  },
  {
    title: '支付方式',
    dataIndex: 'operationArea',
    width: 200,
    key: 'operationArea',
    align: 'center'
  },
  {
    title: '支付时间',
    dataIndex: 'phone',
    width: 200,
    key: 'phone',
    align: 'center'
  },
  {
    title: '申诉类型',
    dataIndex: 'cyclingOrderNumber',
    width: 200,
    key: 'cyclingOrderNumber',
    align: 'center'
  },
  {
    title: '退款原因',
    dataIndex: 'applyTime',
    width: 200,
    key: 'applyTime',
    align: 'center'
  },
  {
    title: '用户来源',
    dataIndex: 'operationArea',
    width: 200,
    key: 'operationArea',
    align: 'center'
  },
  {
    title: '审核状态',
    dataIndex: 'phone',
    width: 200,
    key: 'phone',
    align: 'center'
  },
  {
    title: '审核时间',
    dataIndex: 'phone',
    width: 200,
    key: 'phone',
    align: 'center'
  }
]);

let handleTableChange = (pagina) => {
  pagination.current = pagina.current
  pagination.pageSize = pagina.pageSize
  queryform.value.pageParam.pageNum = pagina.current
  queryform.value.pageParam.pageSize = pagina.pageSize
  getData()
}

const getData = () => {
}
</script> 