<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: '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'
  }
]);

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> 