import type { ColumnDef } from "@tanstack/react-table" import { fetchMyRefundOrders } from "@/api/order" import AccountCell from "@/components/composites/accountCell" import OrderFilterBar from "@/components/composites/orderFilterBar" import DataTable from "@/components/data-table" import Page from "@/components/page" import { MY_ORDER_PAGE_SIZE, useMyOrderPage } from "@/lib/hooks/useMyOrderPage" import { useProducts } from "@/lib/hooks/useProducts" import { formatDate, formatMoney, type OrderItem, totalConnections, } from "@/lib/models/order" const columns: ColumnDef[] = [ { accessorKey: "CreateTime", header: "日期", cell: ({ row }) => formatDate(row.original.CreateTime), }, { accessorKey: "OrderNo", header: "订单编号", }, { accessorKey: "ProductName", header: "产品", }, { accessorKey: "PackageName", header: "套餐", }, { accessorKey: "Accounts", header: "账号", cell: ({ row }) => , }, { accessorKey: "ConnectCount", header: "连接数", cell: ({ row }) => totalConnections(row.original), }, { accessorKey: "DayCount", header: "退款时长", cell: ({ row }) => `${row.original.DayCount}天`, }, { accessorKey: "DayPrice", header: "退款单价", cell: ({ row }) => formatMoney(row.original.DayPrice), }, { accessorKey: "PaymentAmount", header: "实付金额", cell: ({ row }) => formatMoney(row.original.PaymentAmount), }, { accessorKey: "RefundAmount", header: "退款金额", cell: ({ row }) => formatMoney(row.original.RefundAmount), }, ] export default function RefundOrdersPage() { const products = useProducts() const { filters, patch, load, total, status, page, setPage, paged } = useMyOrderPage(fetchMyRefundOrders) return ( load()} />

退货订单管理

) }