Merge remote-tracking branch 'origin/dev-tmp1' into dev-tmp1
commit
1b69c4938a
|
|
@ -5,6 +5,7 @@ import {
|
|||
REGISTER_ENGINEER_CATEGORY_MAP,
|
||||
ABILITY_SOURCE_MAP,
|
||||
TITLE_LEVEL_MAP,
|
||||
QUALIFICATION_INDUSTRY_OPTIONS_MAP,
|
||||
} from "~/enumerate/enterpriseOptions";
|
||||
import {
|
||||
CERT_LEVEL_LABEL_BY_TYPE,
|
||||
|
|
@ -88,6 +89,7 @@ export default function StaffViewModal({
|
|||
|
||||
const capabilityList = Array.isArray(info.capabilityAssessment)
|
||||
? info.capabilityAssessment.map((item) => ({
|
||||
industryCode: item.industryCode,
|
||||
capabilityName:
|
||||
CAPABILITY_MAP[item.professionalCapabilityCode] ||
|
||||
item.professionalCapabilityCode ||
|
||||
|
|
@ -264,7 +266,20 @@ export default function StaffViewModal({
|
|||
dataSource={capabilityList}
|
||||
locale={{ emptyText: "暂无专业能力信息" }}
|
||||
columns={[
|
||||
{ title: "专业能力", dataIndex: "capabilityName" },
|
||||
{
|
||||
title: "行业",
|
||||
dataIndex: "industryCode",
|
||||
width: 220,
|
||||
ellipsis: true,
|
||||
render: (code) =>
|
||||
QUALIFICATION_INDUSTRY_OPTIONS_MAP[code] || code || "-",
|
||||
},
|
||||
{
|
||||
title: "专业能力",
|
||||
dataIndex: "capabilityName",
|
||||
width: 80,
|
||||
ellipsis: true,
|
||||
},
|
||||
{ title: "来源", dataIndex: "sourceName", width: 280 },
|
||||
]}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ import {
|
|||
ABILITY_SOURCE_OPTIONS,
|
||||
EVALUATOR_OPTIONS,
|
||||
TITLE_LEVEL_OPTIONS,
|
||||
TITLE_LEVEL_MAP
|
||||
TITLE_LEVEL_MAP,
|
||||
QUALIFICATION_INDUSTRY_OPTIONS,
|
||||
} from "~/enumerate/enterpriseOptions";
|
||||
import {
|
||||
CERT_LEVEL_OPTIONS_BY_TYPE,
|
||||
|
|
@ -322,6 +323,8 @@ function PersonnelInfoPage(props) {
|
|||
{
|
||||
title: "专业能力",
|
||||
dataIndex: "capabilityAssessment",
|
||||
|
||||
ellipsis: true,
|
||||
render: renderCapabilityList,
|
||||
},
|
||||
{
|
||||
|
|
@ -501,6 +504,28 @@ function StaffFormModal({
|
|||
const watchedEvaluatorFlag = Form.useWatch("evaluatorFlag", form);
|
||||
const wasOpenRef = useRef(false);
|
||||
const inflightDeptRef = useRef(null);
|
||||
const [capOptionsCache, setCapOptionsCache] = useState({});
|
||||
const watchedCapList = Form.useWatch("capabilityAssessment", form);
|
||||
|
||||
const loadCapOptions = async (code) => {
|
||||
if (!code || capOptionsCache[code]) return;
|
||||
try {
|
||||
const res = await Get("/safetyEval/industry-professional-standards", {
|
||||
industryCode: code,
|
||||
pageSize: 999,
|
||||
});
|
||||
const list = res?.data || [];
|
||||
setCapOptionsCache((prev) => ({
|
||||
...prev,
|
||||
[code]: list.map((item) => ({
|
||||
label: item.professionalCapabilityName,
|
||||
value: item.professionalCapabilityCode,
|
||||
})),
|
||||
}));
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
};
|
||||
|
||||
const loadPositionsByDept = async (deptId) => {
|
||||
const id = deptId;
|
||||
|
|
@ -543,6 +568,7 @@ function StaffFormModal({
|
|||
if (!currentId) {
|
||||
form.resetFields();
|
||||
setDeptPositionOptions([]);
|
||||
setCapOptionsCache({});
|
||||
form.setFieldsValue({
|
||||
registerEngineerFlag: 2,
|
||||
});
|
||||
|
|
@ -550,6 +576,7 @@ function StaffFormModal({
|
|||
}
|
||||
if (!open) {
|
||||
setDeptPositionOptions([]);
|
||||
setCapOptionsCache({});
|
||||
}
|
||||
wasOpenRef.current = open;
|
||||
}, [open, currentId, form]);
|
||||
|
|
@ -610,6 +637,18 @@ function StaffFormModal({
|
|||
}
|
||||
|
||||
form.setFieldsValue(setFields);
|
||||
|
||||
// 从已有的专业能力数据中恢复各行的行业选项
|
||||
if (Array.isArray(setFields.capabilityAssessment)) {
|
||||
const codes = [
|
||||
...new Set(
|
||||
setFields.capabilityAssessment
|
||||
.map((item) => item.industryCode)
|
||||
.filter(Boolean),
|
||||
),
|
||||
];
|
||||
codes.forEach((code) => loadCapOptions(code));
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
if (!cancelled) setDetailLoading(false);
|
||||
|
|
@ -1159,8 +1198,39 @@ function StaffFormModal({
|
|||
bordered
|
||||
columns={[
|
||||
{
|
||||
title: "专业能力",
|
||||
title: "行业",
|
||||
width: 200,
|
||||
render: (_, field) => (
|
||||
<Form.Item
|
||||
name={[field.name, "industryCode"]}
|
||||
style={{ marginBottom: 0 }}
|
||||
>
|
||||
<Select
|
||||
placeholder="请选择行业"
|
||||
allowClear
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
options={QUALIFICATION_INDUSTRY_OPTIONS}
|
||||
onChange={(code) => {
|
||||
if (code) loadCapOptions(code);
|
||||
form.setFieldValue(
|
||||
["capabilityAssessment", field.name, "professionalCapabilityCode"],
|
||||
undefined,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "专业能力",
|
||||
render: (_, field) => {
|
||||
const rowIndustryCode =
|
||||
watchedCapList?.[field.name]?.industryCode;
|
||||
const rowOptions = rowIndustryCode
|
||||
? capOptionsCache[rowIndustryCode] || []
|
||||
: [];
|
||||
return (
|
||||
<Form.Item
|
||||
name={[field.name, "professionalCapabilityCode"]}
|
||||
style={{ marginBottom: 0 }}
|
||||
|
|
@ -1170,10 +1240,11 @@ function StaffFormModal({
|
|||
showSearch
|
||||
optionFilterProp="label"
|
||||
allowClear
|
||||
options={CAPABILITY_OPTIONS}
|
||||
options={rowOptions}
|
||||
/>
|
||||
</Form.Item>
|
||||
),
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "来源",
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { Button, Form, Input, Modal, Table, Tag, Space } from "antd";
|
|||
import { useEffect, useState } from "react";
|
||||
import { apiGet } from "~/utils/enterpriseInfo/http";
|
||||
import { CAPABILITY_MAP, CERT_TYPE_MAP } from "~/enumerate/constant";
|
||||
import { QUALIFICATION_INDUSTRY_OPTIONS_MAP } from "~/enumerate/enterpriseOptions";
|
||||
import StaffViewModal from "~/components/StaffViewModal";
|
||||
|
||||
export default function OrgPersonnelSelectModal(props) {
|
||||
|
|
@ -121,7 +122,7 @@ export default function OrgPersonnelSelectModal(props) {
|
|||
showTotal: (t) => `共 ${t} 条`,
|
||||
onChange: (page, pageSize) => getData(page, pageSize),
|
||||
}}
|
||||
scroll={{ x: 800, y: 400 }}
|
||||
scroll={{ x: 1000, y: 400 }}
|
||||
columns={[
|
||||
{
|
||||
title: "姓名",
|
||||
|
|
@ -145,15 +146,28 @@ export default function OrgPersonnelSelectModal(props) {
|
|||
{
|
||||
title: "专业能力",
|
||||
dataIndex: "capabilityAssessment",
|
||||
ellipsis: true,
|
||||
width: 260,
|
||||
render: (list) => {
|
||||
if (!Array.isArray(list) || !list.length) return "-";
|
||||
return list.map((item) => CAPABILITY_MAP[item.professionalCapabilityCode] ).join("、");
|
||||
return list
|
||||
.map((item) => {
|
||||
const cap =
|
||||
CAPABILITY_MAP[item.professionalCapabilityCode];
|
||||
if (!cap) return null;
|
||||
const industry = item.industryCode
|
||||
? QUALIFICATION_INDUSTRY_OPTIONS_MAP[item.industryCode]
|
||||
: null;
|
||||
return industry ? `${industry}【${cap}】` : cap;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("、");
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "证照名称",
|
||||
dataIndex: "personnelCertFilingPageCOList",
|
||||
width: 200,
|
||||
|
||||
render: (list) => {
|
||||
if (!Array.isArray(list) || !list.length) return "-";
|
||||
const colorMap = {
|
||||
|
|
@ -161,7 +175,7 @@ export default function OrgPersonnelSelectModal(props) {
|
|||
evaluator: "green",
|
||||
};
|
||||
return (
|
||||
<Space size={4}>
|
||||
<Space size={4} wrap>
|
||||
{list.map((item) => (
|
||||
<Tag key={item.id} color={colorMap[item.certTypeCode]}>
|
||||
{CERT_TYPE_MAP[item.certTypeCode] || item.certTypeCode}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { useState } from "react";
|
|||
import { CAPABILITY_MAP, CERT_LEVEL_LABEL_BY_TYPE } from "~/enumerate/constant";
|
||||
import {
|
||||
TITLE_LEVEL_MAP,
|
||||
QUALIFICATION_INDUSTRY_OPTIONS_MAP,
|
||||
} from "~/enumerate/enterpriseOptions";
|
||||
import StaffViewModal from "~/components/StaffViewModal";
|
||||
import OrgPersonnelSelectModal from "./OrgPersonnelSelectModal";
|
||||
|
|
@ -113,11 +114,17 @@ const PersonnelStep = ({ personnelList = [], disabled, onAdd, onRemove, manageme
|
|||
render: (list) => {
|
||||
if (!Array.isArray(list) || !list.length) return "-";
|
||||
return list
|
||||
.map(
|
||||
(item) =>
|
||||
.map((item) => {
|
||||
const cap =
|
||||
CAPABILITY_MAP[item.professionalCapabilityCode] ||
|
||||
item.professionalCapabilityCode,
|
||||
)
|
||||
item.professionalCapabilityCode;
|
||||
if (!cap) return null;
|
||||
const industry = item.industryCode
|
||||
? QUALIFICATION_INDUSTRY_OPTIONS_MAP[item.industryCode]
|
||||
: null;
|
||||
return industry ? `${industry}【${cap}】` : cap;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("、");
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ function FilingFormPage(props) {
|
|||
const readOnly = query.readOnly;
|
||||
|
||||
const saveActionHint =
|
||||
mode === FILING_FORM_MODE.FILED
|
||||
mode === FILING_FORM_MODE.CHANGE
|
||||
? "请点击提交后保存"
|
||||
: "请点击暂存或提交后保存";
|
||||
|
||||
|
|
|
|||
|
|
@ -165,12 +165,12 @@ const SiteReviewNotice = (props) => {
|
|||
allowClear
|
||||
/>
|
||||
</Form.Item>,
|
||||
<Form.Item key="bizType" name="bizType">
|
||||
<ControlWrapper.Select label="申请事项" placeholder="全部" allowClear style={{ width: "100%" }}>
|
||||
<Select.Option value="add">新申请资质</Select.Option>
|
||||
<Select.Option value="change">资质变更</Select.Option>
|
||||
</ControlWrapper.Select>
|
||||
</Form.Item>,
|
||||
// <Form.Item key="bizType" name="bizType">
|
||||
// <ControlWrapper.Select label="申请事项" placeholder="全部" allowClear style={{ width: "100%" }}>
|
||||
// <Select.Option value="add">新申请资质</Select.Option>
|
||||
// <Select.Option value="change">资质变更</Select.Option>
|
||||
// </ControlWrapper.Select>
|
||||
// </Form.Item>,
|
||||
<Form.Item key="reviewDateRange" name="reviewDateRange">
|
||||
<ControlWrapper.DatePicker.RangePicker label="审查日期" placeholder={["开始日期", "结束日期"]} />
|
||||
</Form.Item>,
|
||||
|
|
|
|||
|
|
@ -126,16 +126,10 @@ const FilingTabs = ({
|
|||
[detail.personnelList],
|
||||
);
|
||||
|
||||
/**
|
||||
* 管理人员判定:technicalDirectorFlag(技术负责人) 或 processControlLeaderFlag(过程控制负责人) 为 true;
|
||||
* 法定代表人/负责人按岗位名兜底归入管理人员。
|
||||
* 备案变更详情人员 CO(QualFilingPersonnelChangeInfoCO)暂未返回 flag 字段,靠岗位名兜底判断(待后端补充 flag)。
|
||||
* 变更时间:2026-08-10(按后端人员标识字段拆分)
|
||||
*/
|
||||
|
||||
const isManager = (item) =>
|
||||
item.technicalDirectorFlag === true ||
|
||||
item.processControlLeaderFlag === true ||
|
||||
/法定代表人|负责人/.test(item.positionName || "");
|
||||
item.processControlLeaderFlag === true ;
|
||||
|
||||
const managerRows = useMemo(() => {
|
||||
return personnelRows.filter(isManager);
|
||||
|
|
@ -203,12 +197,24 @@ const FilingTabs = ({
|
|||
capList = [];
|
||||
}
|
||||
}
|
||||
const codes =
|
||||
r.professionalCapabilityCodeList ||
|
||||
(Array.isArray(capList)
|
||||
? capList.map((c) => (typeof c === "string" ? c : c?.professionalCapabilityCode)).filter(Boolean)
|
||||
: []) ||
|
||||
[];
|
||||
// 优先使用 capabilityAssessment 对象(含行业信息)
|
||||
if (Array.isArray(capList) && capList.length) {
|
||||
const labels = capList
|
||||
.map((c) => {
|
||||
if (typeof c === "string") {
|
||||
return CAPABILITY_MAP[c] || c;
|
||||
}
|
||||
const cap = CAPABILITY_MAP[c?.professionalCapabilityCode] || c?.professionalCapabilityCode;
|
||||
if (!cap) return null;
|
||||
const industry = c?.industryCode
|
||||
? QUALIFICATION_INDUSTRY_OPTIONS_MAP[c.industryCode]
|
||||
: null;
|
||||
return industry ? `${industry}【${cap}】` : cap;
|
||||
})
|
||||
.filter(Boolean);
|
||||
if (labels.length) return labels.join("、");
|
||||
}
|
||||
const codes = r.professionalCapabilityCodeList || [];
|
||||
return codes.length
|
||||
? codes.map((code) => CAPABILITY_MAP[code] || code).join("、")
|
||||
: "-";
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ const SiteReviewNotice = (props) => {
|
|||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Form.Item name="reviewLocation" label="审查地点" rules={[{ required: true, message: "请输入" }]}>
|
||||
<Input placeholder="机构办公场所、档案室及设备存放场所" maxLength={200} />
|
||||
<Input placeholder="机构办公场所、档案室及设备存放场所" maxLength={200} allowClear />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
{/* <Col span={12}>
|
||||
|
|
@ -350,7 +350,7 @@ const SiteReviewNotice = (props) => {
|
|||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="contactPhone" label="联系电话" rules={[{ pattern: /^(\d{3,4}-?\d{7,8}|\d{11})$/, message: "请输入正确的联系电话" }]}>
|
||||
<Form.Item name="contactPhone" label="联系电话" rules={[{ pattern: /^(1[3-9]\d{9}|0\d{2,3}-?\d{7,8})$/, message: "请输入正确的联系电话(手机11位或座机号)" }]}>
|
||||
<Input placeholder="请输入联系电话" maxLength={20} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
|
@ -397,7 +397,7 @@ const SiteReviewNotice = (props) => {
|
|||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="reviewLeader" label="审查组长">
|
||||
<Input placeholder="请输入" />
|
||||
<Input placeholder="请输入" allowClear maxLength={50} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
@ -409,7 +409,7 @@ const SiteReviewNotice = (props) => {
|
|||
extra="支持上传审查记录、审查意见或现场审查结果文件,限定pdf和图片,最多10个。"
|
||||
/>
|
||||
<Form.Item name="reviewOpinion" label="审查意见">
|
||||
<Input.TextArea rows={4} placeholder="填写现场审查发现、整改要求和结论依据" />
|
||||
<Input.TextArea rows={4} maxLength={200} allowClear placeholder="填写现场审查发现、整改要求和结论依据" />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
|
|
|
|||
|
|
@ -1103,7 +1103,6 @@ const EvalReportLibrary = (props) => {
|
|||
<span>报告编号不得重复</span>
|
||||
<span>报告须完成签字盖章</span>
|
||||
<span>分类信息用于监管抽查检索</span>
|
||||
<span>涉密内容须先完成脱密处理</span>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,23 @@
|
|||
import { useEffect, useRef, useState } from "react";
|
||||
import { CAPABILITY_MAP } from "~/enumerate/constant";
|
||||
import { QUALIFICATION_INDUSTRY_OPTIONS_MAP } from "~/enumerate/enterpriseOptions";
|
||||
|
||||
/** 渲染专业能力列表,供表格 column render 使用 */
|
||||
export function renderCapabilityList(list) {
|
||||
if (!Array.isArray(list) || !list.length) return "-";
|
||||
return list
|
||||
.map((item) => CAPABILITY_MAP[item.professionalCapabilityCode])
|
||||
return (
|
||||
list
|
||||
.map((item) => {
|
||||
const cap = CAPABILITY_MAP[item.professionalCapabilityCode];
|
||||
if (!cap) return null;
|
||||
const industry = item.industryCode
|
||||
? QUALIFICATION_INDUSTRY_OPTIONS_MAP[item.industryCode]
|
||||
: null;
|
||||
return industry ? `${industry}【${cap}】` : cap;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("、") || "-";
|
||||
.join("、") || "-"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue