import { approvalSignNUsingPost, approvalSignYUsingGet, getRecordByBusinessIdAdminUsingGet, } from '@/services/pop-b2b2c/pbcBusinessApprovalController'; import { ModalForm, ProCard, ProFormTextArea } from '@ant-design/pro-components'; import { PageContainer } from '@ant-design/pro-layout'; import { Access, useAccess, useParams } from '@umijs/max'; import { Button, Descriptions, Image, message } from 'antd'; import React, { useEffect, useState } from 'react'; const Detail: React.FC = () => { const params = useParams(); const access: any = useAccess(); const [info, setInfo] = useState({}); const [isModalOpen, setIsModalOpen] = useState(false); const getInfo = () => { if (params.id) { getRecordByBusinessIdAdminUsingGet({ businessId: parseInt(params.id) }).then((res) => { if (res.retcode && res.data) { setInfo(res.data); } }); } }; useEffect(() => { getInfo(); }, []); return ( { history.back(); }} > 返回 , , , ] : [ , ] } > {info.pbcBusinessName} {info.pbcBusinessType} {info.pbcBusinessContact} {info.pbcBusinessContactMobile} {info.pbcBusinessHead} {info.pbcBusinessHeadUserNo} {info.pbcBusinessHead} {info.pbcBusinessHeadUserNo} {info.pbcBusinessStartDate} {info.pbcBusinessBank} {info.pbcBusinessAccount} {info.pbcBusinessMainCategory} setIsModalOpen(false), }} width={500} onFinish={async (value: any) => { console.log(value); if (params.id) { await approvalSignNUsingPost({ pbcId: parseInt(params.id), pbcBusinessApprovalRefusedReason: value.pbcBusinessApprovalRefusedReason, }).then((res) => { if (res.retcode) { message.success('成功驳回'); getInfo(); setIsModalOpen(false); } else { message.error(res.retmsg); } }); } }} > ); }; export default Detail;