|
|
|
@ -1,9 +1,5 @@
|
|
|
|
|
import {
|
|
|
|
|
approvalSignNUsingPost,
|
|
|
|
|
approvalSignYUsingGet,
|
|
|
|
|
getRecordByBusinessIdAdminUsingGet,
|
|
|
|
|
} from '@/services/pop-b2b2c/pbcBusinessApprovalController';
|
|
|
|
|
import { ModalForm, ProCard, ProFormTextArea } from '@ant-design/pro-components';
|
|
|
|
|
import { approvalRequirementForAdminUsingGet, requirementDetailForAdminUsingGet } from '@/services/pop-b2b2c/pbcRequirementController';
|
|
|
|
|
import { ProCard } 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';
|
|
|
|
@ -13,12 +9,11 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
const params = useParams();
|
|
|
|
|
const access: any = useAccess();
|
|
|
|
|
|
|
|
|
|
const [info, setInfo] = useState<API.PbcBusinessApproval>({});
|
|
|
|
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
|
|
|
const [info, setInfo] = useState<API.PbcRequirement_>({});
|
|
|
|
|
|
|
|
|
|
const getInfo = () => {
|
|
|
|
|
if (params.id) {
|
|
|
|
|
getRecordByBusinessIdAdminUsingGet({ businessId: parseInt(params.id) }).then((res) => {
|
|
|
|
|
requirementDetailForAdminUsingGet({ pbcId: parseInt(params.id) }).then((res) => {
|
|
|
|
|
if (res.retcode && res.data) {
|
|
|
|
|
setInfo(res.data);
|
|
|
|
|
}
|
|
|
|
@ -36,7 +31,7 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
title: '',
|
|
|
|
|
}}
|
|
|
|
|
footer={
|
|
|
|
|
info.pbcBusinessApprovalResult === 0
|
|
|
|
|
info.pbcApprovalStatus === 0
|
|
|
|
|
? [
|
|
|
|
|
<Button
|
|
|
|
|
key="back"
|
|
|
|
@ -46,23 +41,32 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
>
|
|
|
|
|
返回
|
|
|
|
|
</Button>,
|
|
|
|
|
<Access key="no" accessible={access.approvalSign}>
|
|
|
|
|
<Access key="no" accessible={access.approvalRequirement}>
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
danger
|
|
|
|
|
onClick={() => {
|
|
|
|
|
setIsModalOpen(true);
|
|
|
|
|
if (params.id) {
|
|
|
|
|
approvalRequirementForAdminUsingGet({ id: parseInt(params.id), pbcApprovalStatus: 2 }).then((res) => {
|
|
|
|
|
if (res.retcode) {
|
|
|
|
|
message.success('审核驳回');
|
|
|
|
|
getInfo();
|
|
|
|
|
} else {
|
|
|
|
|
message.error(res.retmsg);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
审核驳回
|
|
|
|
|
</Button>
|
|
|
|
|
</Access>,
|
|
|
|
|
<Access key="pass" accessible={access.approvalSign}>
|
|
|
|
|
<Access key="pass" accessible={access.approvalRequirement}>
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
if (params.id) {
|
|
|
|
|
approvalSignYUsingGet({ pbcId: parseInt(params.id) }).then((res) => {
|
|
|
|
|
approvalRequirementForAdminUsingGet({ id: parseInt(params.id), pbcApprovalStatus: 1 }).then((res) => {
|
|
|
|
|
if (res.retcode) {
|
|
|
|
|
message.success('审核通过');
|
|
|
|
|
getInfo();
|
|
|
|
@ -90,78 +94,16 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
<ProCard style={{ marginBottom: 12 }}>
|
|
|
|
|
<Descriptions bordered title="基本信息" column={2}>
|
|
|
|
|
<Descriptions.Item label="商户名称">{info.pbcBusinessName}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="商户类别">{info.pbcBusinessType}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="联系人">{info.pbcBusinessContact}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="手机号">{info.pbcBusinessContactMobile}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="负责人">{info.pbcBusinessHead}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="负责人身份证号">{info.pbcBusinessHeadUserNo}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="身份证人像面">
|
|
|
|
|
<Image width={200} src={info.pbcBusinessHeadUserNoBackUrl} />
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="身份证国徽面">
|
|
|
|
|
<Image width={200} src={info.pbcBusinessHeadUserNoFrontUrl} />
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
</Descriptions>
|
|
|
|
|
</ProCard>
|
|
|
|
|
<ProCard style={{ marginBottom: 12 }}>
|
|
|
|
|
<Descriptions bordered title="工商信息">
|
|
|
|
|
<Descriptions.Item label="法人">{info.pbcBusinessHead}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="法人身份证号">{info.pbcBusinessHeadUserNo}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="公司成立时间">{info.pbcBusinessStartDate}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="开户行">{info.pbcBusinessBank}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="收款账号" span={2}>
|
|
|
|
|
{info.pbcBusinessAccount}
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="经营范围" span={3}>
|
|
|
|
|
{info.pbcBusinessMainCategory}
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="营业执照" span={3}>
|
|
|
|
|
<Image width={200} src={info.pbcBusinessLicenseUrl} />
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
<Descriptions bordered title="基本信息">
|
|
|
|
|
<Descriptions.Item label="需求标题" span={2}>{info.pbcTitle}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="需求预算" span={2}>{info.pbcBudget}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="需求描述" span={3}>{info.pbcDescription}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="需求图片" span={3}>{info.pbcImages?.split(',').map(e => <Image key={e} width={200} src={e} />)}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="发布时间" span={3}>{info.pbcCreateAt}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="联系人" span={3}>{info.pbcCreateByUserName}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="联系电话" span={3}>{info.pbcUsers?.pbcUserMobile}</Descriptions.Item>
|
|
|
|
|
</Descriptions>
|
|
|
|
|
</ProCard>
|
|
|
|
|
<ModalForm
|
|
|
|
|
title="填写驳回理由"
|
|
|
|
|
open={isModalOpen}
|
|
|
|
|
modalProps={{
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
onCancel: () => setIsModalOpen(false),
|
|
|
|
|
}}
|
|
|
|
|
requiredMark={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);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<ProFormTextArea
|
|
|
|
|
placeholder={'请输入驳回理由'}
|
|
|
|
|
label="驳回理由"
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '驳回理由为必填项',
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
width="lg"
|
|
|
|
|
name="pbcBusinessApprovalRefusedReason"
|
|
|
|
|
/>
|
|
|
|
|
</ModalForm>
|
|
|
|
|
</PageContainer>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|