Merge remote-tracking branch 'origin/dev' into dev

dev
huwei 2026-08-06 18:04:01 +08:00
commit 08ca6413b5
9 changed files with 62 additions and 15 deletions

View File

@ -148,10 +148,12 @@ export const EDUCATION_TYPE_OPTIONS = [
/** 学历层次 */ /** 学历层次 */
export const EDUCATION_LEVEL_OPTIONS = [ export const EDUCATION_LEVEL_OPTIONS = [
{ label: "专科", value: "专科" }, { label: "博士研究生", value: "博士研究生" },
{ label: "本科", value: "本科" }, { label: "硕士研究生", value: "硕士研究生" },
{ label: "硕士", value: "硕士" }, { label: "大学本科", value: "大学本科" },
{ label: "博士", value: "博士" }, { label: "大学专科", value: "大学专科" },
{ label: "中专", value: "中专" },
{ label: "高中及以下", value: "高中及以下" },
]; ];
/** 是否注册安全工程师 */ /** 是否注册安全工程师 */

View File

@ -539,7 +539,17 @@ function StaffFormModal({
loading={detailLoading} loading={detailLoading}
confirmLoading={submitting} confirmLoading={submitting}
onCancel={handleCancel} onCancel={handleCancel}
onOk={form.submit} onOk={() => {
const titleArr = form.getFieldValue("titleCodeArr") || [];
const hasTitleInfo = titleArr.some(
(item) => item?.industryCode && item?.titleCode,
);
if (!hasTitleInfo) {
message.warning("请添加职称信息");
return;
}
form.submit();
}}
> >
<Form <Form
form={form} form={form}
@ -576,7 +586,7 @@ function StaffFormModal({
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="birthDate" label="出生日期"> <Form.Item name="birthDate" label="出生日期" rules={[{ required: true, message: "请选择出生日期" }]}>
<DatePicker style={{ width: "100%" }} /> <DatePicker style={{ width: "100%" }} />
</Form.Item> </Form.Item>
</Col> </Col>

View File

@ -407,7 +407,7 @@ const EvalProjectMonitorDetail = (props) => {
useEffect(() => { useEffect(() => {
if (projectId) { if (projectId) {
evalProjectDetail({ id: projectId }); evalProjectDetail({ id: projectId });
queryMyOrCreateDoc({ docxUrl: "", projectId });
} }
fetchContract(); fetchContract();
fetchTeam(); fetchTeam();

View File

@ -8,6 +8,7 @@ function OrgEquipmentSelectModalInner(props) {
const { open, onCancel, onConfirm, existingIds = [] } = props; const { open, onCancel, onConfirm, existingIds = [] } = props;
const [searchForm] = Form.useForm(); const [searchForm] = Form.useForm();
const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const [selectedRows, setSelectedRows] = useState([]);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [dataSource, setDataSource] = useState([]); const [dataSource, setDataSource] = useState([]);
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 }); const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
@ -37,6 +38,7 @@ function OrgEquipmentSelectModalInner(props) {
useEffect(() => { useEffect(() => {
if (open) { if (open) {
setSelectedRowKeys([]); setSelectedRowKeys([]);
setSelectedRows([]);
searchForm.resetFields(); searchForm.resetFields();
getData(); getData();
} }
@ -52,7 +54,7 @@ function OrgEquipmentSelectModalInner(props) {
Modal.warning({ title: "提示", content: "请选择至少一项未添加的装备" }); Modal.warning({ title: "提示", content: "请选择至少一项未添加的装备" });
return; return;
} }
const rows = dataSource.filter((row) => ids.includes(row.id)); const rows = selectedRows.filter((row) => ids.includes(row.id));
onConfirm?.(ids, rows); onConfirm?.(ids, rows);
}; };
@ -82,7 +84,11 @@ function OrgEquipmentSelectModalInner(props) {
scroll={ { y: 400 }} scroll={ { y: 400 }}
rowSelection={{ rowSelection={{
selectedRowKeys, selectedRowKeys,
onChange: setSelectedRowKeys, preserveSelectedRowKeys: true,
onChange: (keys, rows) => {
setSelectedRowKeys(keys);
setSelectedRows(rows);
},
getCheckboxProps: (record) => ({ getCheckboxProps: (record) => ({
disabled: existingIds.includes(String(record.id)), disabled: existingIds.includes(String(record.id)),
}), }),

View File

@ -19,6 +19,7 @@ export default function OrgPersonnelSelectModal(props) {
const { open, onCancel, onConfirm, existingIds = [] } = props; const { open, onCancel, onConfirm, existingIds = [] } = props;
const [searchForm] = Form.useForm(); const [searchForm] = Form.useForm();
const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const [selectedRows, setSelectedRows] = useState([]);
const [viewId, setViewId] = useState(""); const [viewId, setViewId] = useState("");
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [dataSource, setDataSource] = useState([]); const [dataSource, setDataSource] = useState([]);
@ -47,6 +48,7 @@ export default function OrgPersonnelSelectModal(props) {
useEffect(() => { useEffect(() => {
if (open) { if (open) {
setSelectedRowKeys([]); setSelectedRowKeys([]);
setSelectedRows([]);
searchForm.resetFields(); searchForm.resetFields();
getData(); getData();
} }
@ -62,7 +64,7 @@ export default function OrgPersonnelSelectModal(props) {
Modal.warning({ title: "提示", content: "请选择至少一名未添加的人员" }); Modal.warning({ title: "提示", content: "请选择至少一名未添加的人员" });
return; return;
} }
const rows = dataSource.filter((row) => ids.includes(row.id)); const rows = selectedRows.filter((row) => ids.includes(row.id));
onConfirm?.(ids, rows); onConfirm?.(ids, rows);
}; };
@ -92,7 +94,11 @@ export default function OrgPersonnelSelectModal(props) {
dataSource={dataSource} dataSource={dataSource}
rowSelection={{ rowSelection={{
selectedRowKeys, selectedRowKeys,
onChange: setSelectedRowKeys, preserveSelectedRowKeys: true,
onChange: (keys, rows) => {
setSelectedRowKeys(keys);
setSelectedRows(rows);
},
getCheckboxProps: (record) => ({ getCheckboxProps: (record) => ({
disabled: existingIds.includes(String(record.id)), disabled: existingIds.includes(String(record.id)),
}), }),

View File

@ -416,6 +416,7 @@ function FilingFormPage(props) {
!readOnly && mode !== FILING_FORM_MODE.CHANGE ? ( !readOnly && mode !== FILING_FORM_MODE.CHANGE ? (
<Button <Button
loading={submitting} loading={submitting}
type="primary"
onClick={() => handleVerifyConfirm({ isSaveDraft: true })} onClick={() => handleVerifyConfirm({ isSaveDraft: true })}
> >
暂存 暂存

View File

@ -175,12 +175,12 @@ const ArchiveContent = ({ readOnly, ...props }) => {
</Col> </Col>
<Col span={6}> <Col span={6}>
<Form.Item label="移交人" name="archiveTransferorName" rules={[{ required: true, message: "请输入移交人" }]}> <Form.Item label="移交人" name="archiveTransferorName" rules={[{ required: true, message: "请输入移交人" }]}>
<Input placeholder="请输入移交人" allowClear maxLength={10} /> <Input placeholder="请输入移交人" allowClear maxLength={10} disabled={archiveFlag} />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={6}> <Col span={6}>
<Form.Item label="档案管理员" name="archiveArchivistName" rules={[{ required: true, message: "请输入档案管理员" }]}> <Form.Item label="档案管理员" name="archiveArchivistName" rules={[{ required: true, message: "请输入档案管理员" }]}>
<Input placeholder="请输入档案管理员" allowClear maxLength={10} /> <Input placeholder="请输入档案管理员" allowClear maxLength={10} disabled={archiveFlag} />
</Form.Item> </Form.Item>
</Col> </Col>
{processControlDetail?.archiveDate && ( {processControlDetail?.archiveDate && (

View File

@ -89,8 +89,9 @@ const TeamContent = ({ readOnly, ...props }) => {
message.warning("该角色为单人唯一角色只能选择1名人员"); message.warning("该角色为单人唯一角色只能选择1名人员");
return; return;
} }
// 唯一角色校验:检查是否已有人担任该角色 // 唯一角色校验
if (role?.unique) { if (role?.unique) {
// 检查是否已有人担任该角色
const existing = teamMembers.some((m) => const existing = teamMembers.some((m) =>
m.roles.some((r) => r.role === selectedRole), m.roles.some((r) => r.role === selectedRole),
); );
@ -98,6 +99,27 @@ const TeamContent = ({ readOnly, ...props }) => {
message.warning(`"${role.name}"已配置,不可重复添加`); message.warning(`"${role.name}"已配置,不可重复添加`);
return; return;
} }
// 一人只能担任一个单人唯一角色
const uniqueRoleValues = ROLE_DEFINITIONS.filter(
(r) => r.unique,
).map((r) => r.value);
const conflict = selectedPersons.find((personId) => {
const member = teamMembers.find((m) => m.personnelId === personId);
return (
member &&
member.roles.some(
(r) =>
uniqueRoleValues.includes(r.role) && r.role !== selectedRole,
)
);
});
if (conflict) {
const person = participants.find((p) => p.id === conflict);
message.warning(
`"${person?.name}"已担任其他唯一角色,一人只能担任一个单人唯一角色`,
);
return;
}
} }
const newEntries = selectedPersons.map((personId) => { const newEntries = selectedPersons.map((personId) => {

View File

@ -218,7 +218,7 @@ const ProjectFlow = (props) => {
previous previous
title={ title={
<div> <div>
<span>项目法定流程工作台</span> <span>项目工作台</span>
<div className="pageLayout-extra"> <div className="pageLayout-extra">
{evalProjectDetailData?.evalTypeName} |{" "} {evalProjectDetailData?.evalTypeName} |{" "}
{evalProjectDetailData?.projectNo} {evalProjectDetailData?.projectNo}