import { useState, useEffect } from "react"; import { Modal, Button, Descriptions, Table, Tag } from "antd"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace"; import { ENTERPRISE_STATUS_OPTIONS, ENTERPRISE_SCALE_OPTIONS, EVAL_TYPE_MAP, } from "~/enumerate/constant"; import { QUALIFICATION_INDUSTRY_OPTIONS_MAP } from "~/enumerate/enterpriseOptions"; const CustomerDetailModal = ({ open, customerId, onCancel, ...props }) => { const [detail, setDetail] = useState(null); const { customerDetailLoading } = props.safetyEvalBusiness || {}; useEffect(() => { if (!open || !customerId) { setDetail(null); return; } props.customerDetail({ id: customerId }).then((res) => { if (res?.success !== false) { setDetail(res?.data || null); } }); }, [open, customerId]); return ( 关闭} width={700} destroyOnHidden > {detail && ( <> {detail.customerName} {detail.creditCode} {(() => { const statusOption = ENTERPRISE_STATUS_OPTIONS.find( (opt) => opt.value === detail.enterpriseStatusCode, ); return statusOption?.label || detail.enterpriseStatusName; })()} {(() => { const scaleOption = ENTERPRISE_SCALE_OPTIONS.find( (opt) => opt.value === detail.enterpriseScaleCode, ); return scaleOption?.label || detail.enterpriseScaleName; })()} {detail.industryCode ?.split(",") .map( (code) => QUALIFICATION_INDUSTRY_OPTIONS_MAP[code.trim()] || code.trim(), ) .join("、")} {detail.districtName} {detail.principalName} {detail.principalPhone} {detail.principalName} {detail.principalPhone} {detail.legalRepresentative} {detail.legalRepresentativePhone} {detail.businessAddress} {detail.longitude} {detail.latitude}

安全评价项目列表

EVAL_TYPE_MAP[s] || s || "", }, { title: "报告完成日期", dataIndex: "planEndDate", width: 130 }, { title: "项目状态", dataIndex: "status", width: 100, fixed: "right", render: (phase, record) => { if (record.archiveFlag === 1) { return 已归档; } if (record.projectPhaseCode === "NORMAL") { return 正常; } if (record.projectPhaseCode === "DELAY") { return 已延期; } return record.projectPhaseName; }, }, ]} pagination={false} size="small" /> )} ); }; export default Connect( [NS_SAFETY_EVAL_BUSINESS], true, )(CustomerDetailModal);