import api from "@/api" import MyTable from "@/components/MyTable" import { getTime } from "@/utils" import { EditOutlined } from "@ant-design/icons" import { Button, Form, Input, Modal, Switch, notification } from "antd" import React, { useRef, useState } from "react" const WithdrawReview = () => { const [visible, setVisible] = useState(false) const [currentItem, setCurrentItem] = useState({} as any) const tableRef = useRef(null) const currentType = useRef(1) const [form] = Form.useForm() const columns = [ { title: '操作', width: 100, render: (row) => { return row.status_code === 0 ? (
{ setCurrentItem(() => row) setVisible(true) }} />
) : <> } }, { "dataIndex": "Withdraw_method", "title": "取款方式" }, { "dataIndex": "withdraw_source", "title": "取款来自" }, { "dataIndex": "account", "title": "MT账户" }, { "dataIndex": "address", "title": "钱包地址" }, { "dataIndex": "amount", "title": "取款金额" }, { "dataIndex": "time", "title": "时间", render: (time) => (
{getTime(time * 1000)}
) }, { "dataIndex": "name", "title": "姓名" }, { "dataIndex": "email", "title": "用户" }, { "dataIndex": "fee", "title": "取款手续费" }, { "dataIndex": "order", "title": "订单号" }, { "dataIndex": "status", "title": "状态" }, { "dataIndex": "status_code", "title": "状态码" }, { "dataIndex": "symbol", "title": "币种" }, { "dataIndex": "type", "title": "钱包类型" }, ] const onFinish = async (values) => { setVisible(false) const res: any = await api.review_withdrawReview({ ...values, id: currentItem.id, status_code: currentType.current }) if (res.code === 0) { tableRef.current.update() form.resetFields() notification.success({ message: currentType.current === 1 ? '已拒绝' : '已同意' }) } } return (
setVisible(false)} footer={() => null} title={`取款审核:${currentItem.email}`} >
{currentItem.email}
{currentItem.address}
{currentItem.Withdraw_method}
{currentItem.withdraw_source}
{currentItem.amount}
{currentItem.fee}
{currentItem.symbol}
{getTime(currentItem.time * 1000)}
) } export default WithdrawReview