fix
parent
c58326bac8
commit
f5fd7c8c57
|
|
@ -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();
|
||||||
|
|
|
||||||
|
|
@ -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 && (
|
||||||
|
|
|
||||||
|
|
@ -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) => {
|
||||||
|
|
|
||||||
|
|
@ -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}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue