import React, { useEffect, useMemo } from "react"; import { Button, Form, Input, message, Modal, Select } from "antd"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { NS_QUAL_EXPERT, NS_QUAL_REVIEW } from "~/enumerate/namespace"; import { REVIEW_RESULT_OPTIONS } from "~/enumerate/constant"; const { TextArea } = Input; /** * 审核操作弹窗 * @param {boolean} open * @param {string|number} filingId - 备案申请ID * @param {function} onCancel * @param {function} onSuccess - 审核成功后回调(刷新列表等) */ const statStyle = { background: "#fff", border: "1px solid #d9d9d9", borderRadius: 6, padding: "0.4rem", textAlign: "center" }; const statLabelStyle = { fontSize: "0.7rem", color: "rgba(0,0,0,0.45)" }; const ReviewModal = (props) => { const { open, filingId, isChange = false, legalPassCount = 0, legalFailCount = 0, onCancel, onSuccess } = props; const { qualExpert, qualReview, queryExpertPage, reviewSubmit, changeReviewSubmit } = props; const { qualExpertList } = qualExpert || {}; const { qualReviewSubmitLoading } = qualReview || {}; const [form] = Form.useForm(); useEffect(() => { if (open) { form.resetFields(); queryExpertPage({ current: 1, size: 100 }); } }, [open]); const expertOptions = useMemo( () => (qualExpertList || []).map((item) => ({ label: `${item.userName}${item.certificate ? `(${item.certificate})` : ""}`, value: item.id, expert: item, })), [qualExpertList], ); const handleOk = async () => { const values = await form.validateFields(); const selected = expertOptions.find((o) => o.value === values.filingExpertId); const submitAction = isChange ? changeReviewSubmit : reviewSubmit; const params = { filingId, reviewResult: values.reviewResult, reviewResultRemark: REVIEW_RESULT_OPTIONS.find((r) => r.value === values.reviewResult)?.label, filingExpertId: values.filingExpertId, filingExpertName: selected?.expert?.userName, reviewOpinion: values.reviewOpinion, }; const res = await submitAction(params); if (res?.success !== false) { message.success("审核提交成功"); onCancel(); onSuccess?.(); } }; return ( } >
评价分析
已核验材料
{legalPassCount + legalFailCount}
符合
{legalPassCount}
不符合
{legalFailCount}