import React from 'react'; import { ModalBody, Flex, Box, Table, Thead, Tbody, Tr, Th, Td, TableContainer } from '@chakra-ui/react'; import { UserBillType } from '@/types/user'; import dayjs from 'dayjs'; import { BillSourceMap } from '@/constants/user'; import { formatPrice } from '@/utils/user'; import MyModal from '@/components/MyModal'; import { useTranslation } from 'react-i18next'; const BillDetail = ({ bill, onClose }: { bill: UserBillType; onClose: () => void }) => { const { t } = useTranslation(); return ( 订单号: {bill.id} 生成时间: {dayjs(bill.time).format('YYYY/MM/DD HH:mm:ss')} 应用名: {bill.appName} 来源: {BillSourceMap[bill.source]} 总金额: {bill.total}元 扣费模块 {bill.list.map((item, i) => ( ))}
模块名 AI模型 Token长度 费用
{item.moduleName} {item.model} {item.tokenLen} {formatPrice(item.amount)}
); }; export default BillDetail;