评价打分和年审审核时候需要根据模板的星号项来验证

This commit is contained in:
linxd
2025-08-08 14:51:02 +08:00
parent 8d8d5eb638
commit a524a91494
7 changed files with 156 additions and 66 deletions

View File

@ -84,10 +84,10 @@ const SupplierEvaluateScoreDetail: React.FC = () => {
id: subItem.id,
subIndicator: subItem.subIndicator,
subScore: subItem.subScore, // 二级指标标准分值
isStar: subItem.starIndicator,
scoreNum: subItem.score || '', // 实际评分值使用API返回的score字段
score: subItem.score || '', // 组件内部显示用
remark: subItem.remark || '',
isStar: subItem.isStar, // 是否必填
};
})
.filter(Boolean) || [],
@ -151,12 +151,12 @@ const SupplierEvaluateScoreDetail: React.FC = () => {
const hasEmptyScore = scoreData.some((item) =>
item.indicatorNdList.some((subItem: any) => {
// 使用scoreNum字段检查是否已评分
return !subItem.scoreNum && subItem.scoreNum !== 0;
return !subItem.scoreNum && subItem.scoreNum !== 0 && subItem.isStar === '1'; // 只检查必填项
}),
);
if (hasEmptyScore) {
message.warning(intl.formatMessage({ id: 'supplierEvaluateScore.message.emptyScore' }));
message.warning("请填写所有必填项的评分!");
return;
}

View File

@ -316,7 +316,7 @@ const handleDisableTemplate = (id: string) => {
name="tenantName"
label={intl.formatMessage({ id: 'supplierTemplateManage.column.tenantName' })}
>
<AccessDepartmentSelect placeholder={'请选择准入单位'} />
<AccessDepartmentSelect placeholder={'请选择创建单位'} />
</Form.Item>
<Form.Item
name="categoryId"