safety-eval-service-frontend/src/pages/Container/QualApplication/FilingForm/components/PrerequisiteVerifyModal.jsx

52 lines
1.4 KiB
React
Raw Normal View History

2026-06-30 17:32:29 +08:00
import { CheckCircleFilled, ExclamationCircleFilled } from "@ant-design/icons";
import { Modal } from "antd";
export default function PrerequisiteVerifyModal({
open,
result,
loading,
onCancel,
onConfirm,
}) {
const allPassed = result?.passed;
return (
<Modal
open={open}
title="资质申请前置条件核验结果"
width={560}
2026-07-06 18:06:49 +08:00
destroyOnHidden
2026-06-30 17:32:29 +08:00
onCancel={onCancel}
onOk={allPassed ? onConfirm : undefined}
okText="确定"
cancelText={allPassed ? "取消" : "关闭"}
confirmLoading={loading}
okButtonProps={{ style: allPassed ? undefined : { display: "none" } }}
>
<div style={{ padding: "8px 0" }}>
{(result?.items || []).map((item) => (
<div
key={item.key}
style={{
display: "flex",
gap: 12,
alignItems: "flex-start",
marginBottom: 16,
}}
>
{item.passed ? (
<CheckCircleFilled style={{ color: "#52c41a", fontSize: 18, marginTop: 2 }} />
) : (
<ExclamationCircleFilled style={{ color: "#faad14", fontSize: 18, marginTop: 2 }} />
)}
<div>
<div style={{ fontWeight: 600, marginBottom: 4 }}>{item.label}</div>
<div style={{ color: "rgba(0,0,0,0.65)", lineHeight: 1.6 }}>{item.desc}</div>
</div>
</div>
))}
</div>
</Modal>
);
}