<template>
  <a-card :bordered="false" class="content-card">
    <template #title>物流管理</template>
    <a-table :columns="logisticsColumns" :data="logistics" :pagination="{ pageSize: 8 }" :bordered="false" />
  </a-card>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { api } from '../../api'

const logistics = ref([])

const logisticsColumns = [
  { title: '订单号', dataIndex: 'orderNo' },
  { title: '状态', dataIndex: 'status' },
  { title: '备注', dataIndex: 'note' },
  { title: '时间', dataIndex: 'createdAt', width: 160 }
]

const loadLogistics = async () => { logistics.value = await api.merchantLogistics() }

onMounted(() => {
  loadLogistics()
})
</script>

<style scoped>
.content-card {
  border-radius: 12px;
}

:deep(.arco-card-header) {
  border-bottom: 1px solid #f0f0f0;
}
</style>
