import { useAjax } from "@/Hook/useAjax" import { PayStatus, PayType, gameClassifyEnum } from "@/components/QueryForm/const" import Tables from "@/components/Tables" import WidthEllipsis from "@/components/widthEllipsis" import { CpLogListProps, getOrderCpNoticeApi } from "@/services/gameData/order" import { Badge, Descriptions, Divider, Drawer, Statistic } from "antd" import React, { useEffect, useState } from "react" import columns from "./tableConfigRole" interface Props { visible?: boolean onClose?: () => void initialValues?: any } const Details: React.FC = ({ visible, onClose, initialValues = {} }) => { /********************************/ const [queryFrom, setQueryForm] = useState({ pageNum: 1, pageSize: 20, orderId: initialValues?.orderId }) const [logList, setLogList] = useState() const getOrderCpNotice = useAjax((params) => getOrderCpNoticeApi(params)) /********************************/ useEffect(() => { if (initialValues?.orderStatus && initialValues?.orderStatus > 0) { getList() } }, [queryFrom]) const getList = () => { getOrderCpNotice.run(queryFrom).then(res => { setLogList(res?.data) }) } /** 分页 */ let pageChange = (page: number, pageSize?: number) => { setQueryForm({ ...queryFrom, pageNum: page, pageSize: pageSize || queryFrom.pageSize }) } return 订单详情 {initialValues?.orderId || '<空>'} {'}/>} {'} />} {initialValues?.cpName || '<空>'} {initialValues?.gameName || '<空>'} {gameClassifyEnum[initialValues?.classify] || '<空>'} {initialValues?.productId || '<空>'} {initialValues?.productName || '<空>'} {initialValues?.agentName || '<空>'} {PayType[initialValues?.payway] || '<空>'} {initialValues?.payScene || '<空>'} {initialValues?.merchantName || '<空>'} {PayStatus[initialValues?.orderStatus]} {initialValues?.orderCreateTime || '<空>'} {initialValues?.payTime || '<空>'} {initialValues?.lastCpNotifyTime || '<空>'} {{ '1': , '2': , '-1': }[initialValues?.cpStatus]} {initialValues?.os || '<空>'} {{ '1': '是', '0': '否' }[initialValues?.isFirstRecharge]} 玩家信息 {initialValues?.gameUserId || '<空>'} '}/> {initialValues?.regTime || '<空>'} {initialValues?.cpName || '<空>'} {initialValues?.zxPitcherName || '<空>'} {initialValues?.serverName || '<空>'} {initialValues?.roleName || '<空>'} {initialValues?.roleLevel || '<空>'} {initialValues?.roleVip} CP通知记录 } export default React.memo(Details)