fix
parent
c58326bac8
commit
f5fd7c8c57
|
|
@ -407,7 +407,7 @@ const EvalProjectMonitorDetail = (props) => {
|
|||
useEffect(() => {
|
||||
if (projectId) {
|
||||
evalProjectDetail({ id: projectId });
|
||||
queryMyOrCreateDoc({ docxUrl: "", projectId });
|
||||
|
||||
}
|
||||
fetchContract();
|
||||
fetchTeam();
|
||||
|
|
|
|||
|
|
@ -175,12 +175,12 @@ const ArchiveContent = ({ readOnly, ...props }) => {
|
|||
</Col>
|
||||
<Col span={6}>
|
||||
<Form.Item label="移交人" name="archiveTransferorName" rules={[{ required: true, message: "请输入移交人" }]}>
|
||||
<Input placeholder="请输入移交人" allowClear maxLength={10} />
|
||||
<Input placeholder="请输入移交人" allowClear maxLength={10} disabled={archiveFlag} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Form.Item label="档案管理员" name="archiveArchivistName" rules={[{ required: true, message: "请输入档案管理员" }]}>
|
||||
<Input placeholder="请输入档案管理员" allowClear maxLength={10} />
|
||||
<Input placeholder="请输入档案管理员" allowClear maxLength={10} disabled={archiveFlag} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
{processControlDetail?.archiveDate && (
|
||||
|
|
|
|||
|
|
@ -89,8 +89,9 @@ const TeamContent = ({ readOnly, ...props }) => {
|
|||
message.warning("该角色为单人唯一角色,只能选择1名人员");
|
||||
return;
|
||||
}
|
||||
// 唯一角色校验:检查是否已有人担任该角色
|
||||
// 唯一角色校验
|
||||
if (role?.unique) {
|
||||
// 检查是否已有人担任该角色
|
||||
const existing = teamMembers.some((m) =>
|
||||
m.roles.some((r) => r.role === selectedRole),
|
||||
);
|
||||
|
|
@ -98,6 +99,27 @@ const TeamContent = ({ readOnly, ...props }) => {
|
|||
message.warning(`"${role.name}"已配置,不可重复添加`);
|
||||
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) => {
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ const ProjectFlow = (props) => {
|
|||
previous
|
||||
title={
|
||||
<div>
|
||||
<span>项目法定流程工作台</span>
|
||||
<span>项目工作台</span>
|
||||
<div className="pageLayout-extra">
|
||||
{evalProjectDetailData?.evalTypeName} |{" "}
|
||||
{evalProjectDetailData?.projectNo}
|
||||
|
|
|
|||
Loading…
Reference in New Issue