修改评价打分列表按钮显示状态:年审审查列表按钮显示状态
This commit is contained in:
@ -217,6 +217,12 @@ const SupplierAnnualReview: React.FC = () => {
|
||||
key: 'statusName',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: "提交状态",
|
||||
dataIndex: 'reviewStatusName',
|
||||
key: 'reviewStatusName',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'supplierAnnualReview.common.operation' }),
|
||||
key: 'action',
|
||||
@ -232,7 +238,7 @@ const SupplierAnnualReview: React.FC = () => {
|
||||
{intl.formatMessage({ id: 'supplierAnnualReview.common.view' })}
|
||||
</Button>
|
||||
{/* 只有待审核状态的可以打分 */}
|
||||
{record.reviewStatus === AnnualReviewStatus.WAITING && (
|
||||
{record.status !== "0" && record.reviewStatus === "0" && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => handleScore(record)}
|
||||
|
@ -33,7 +33,7 @@ const { TextArea } = Input;
|
||||
// 评分项接口定义
|
||||
interface ScoreFormItem {
|
||||
id: string;
|
||||
name: string;
|
||||
itemName: string;
|
||||
description: string;
|
||||
examineResult: string;
|
||||
remark: string;
|
||||
@ -59,12 +59,12 @@ const SupplierAnnualReviewScore: React.FC = () => {
|
||||
setReviewDetail(res.data);
|
||||
|
||||
// 使用接口返回的评分项数据
|
||||
if (res.data.scoreItems && res.data.scoreItems.length > 0) {
|
||||
setScoreItems(res.data.scoreItems);
|
||||
if (res.data.taskIndicatorVo && res.data.taskIndicatorVo.length > 0) {
|
||||
setScoreItems(res.data.taskIndicatorVo);
|
||||
|
||||
// 初始化表单
|
||||
const initialValues: any = {};
|
||||
res.data.scoreItems.forEach((item: ScoreFormItem) => {
|
||||
res.data.taskIndicatorVo.forEach((item: ScoreFormItem) => {
|
||||
initialValues[`examineResult_${item.id}`] = item.examineResult || '';
|
||||
initialValues[`remark_${item.id}`] = item.remark || '';
|
||||
});
|
||||
@ -109,7 +109,7 @@ const SupplierAnnualReviewScore: React.FC = () => {
|
||||
const formValues = form.getFieldsValue();
|
||||
const scoreVoList = scoreItems.map((item) => ({
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
name: item.itemName,
|
||||
description: item.description,
|
||||
examineResult: formValues[`examineResult_${item.id}`],
|
||||
remark: formValues[`remark_${item.id}`] || '',
|
||||
@ -191,12 +191,12 @@ const SupplierAnnualReviewScore: React.FC = () => {
|
||||
{reviewDetail.deptName || '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={intl.formatMessage({ id: 'supplierAnnualReview.list.reviewer' })}>
|
||||
{reviewDetail.userName || '-'}
|
||||
{reviewDetail.reviewerName || '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={intl.formatMessage({ id: 'supplierAnnualReview.list.startTime' })}>{reviewDetail.startTime}</Descriptions.Item>
|
||||
<Descriptions.Item label={intl.formatMessage({ id: 'supplierAnnualReview.list.endTime' })}>{reviewDetail.endTime}</Descriptions.Item>
|
||||
<Descriptions.Item label={intl.formatMessage({ id: 'supplierAnnualReview.list.status' })}>
|
||||
{getStatusTag(reviewDetail.reviewStatus, reviewDetail.reviewStatusName)}
|
||||
{reviewDetail.reviewStatusName || '-'}
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</Card>
|
||||
@ -215,14 +215,14 @@ const SupplierAnnualReviewScore: React.FC = () => {
|
||||
columns={[
|
||||
{
|
||||
title: intl.formatMessage({ id: 'supplierAnnualReview.score.scoreItem' }),
|
||||
dataIndex: 'name',
|
||||
dataIndex: 'itemName',
|
||||
width: '15%',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'supplierAnnualReview.score.scoreItemDesc' }),
|
||||
dataIndex: 'description',
|
||||
width: '25%',
|
||||
},
|
||||
// {
|
||||
// title: intl.formatMessage({ id: 'supplierAnnualReview.score.scoreItemDesc' }),
|
||||
// dataIndex: 'description',
|
||||
// width: '25%',
|
||||
// },
|
||||
{
|
||||
title: intl.formatMessage({ id: 'supplierAnnualReview.detail.examineResult' }),
|
||||
dataIndex: 'examineResult',
|
||||
|
@ -273,8 +273,8 @@ status:状态
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'supplierEvaluateScore.column.tenantName' }),
|
||||
dataIndex: 'tenantName',
|
||||
key: 'tenantName',
|
||||
dataIndex: 'deptName',
|
||||
key: 'deptName',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'supplierEvaluateScore.column.startTime' }),
|
||||
@ -293,13 +293,13 @@ status:状态
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'supplierEvaluateScore.column.submissionStatus' }),
|
||||
dataIndex: 'submissionStatus',
|
||||
key: 'submissionStatus',
|
||||
dataIndex: 'reviewStatusName',
|
||||
key: 'reviewStatusName',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'supplierEvaluateScore.column.submissionTime' }),
|
||||
dataIndex: 'submissionTime',
|
||||
key: 'submissionTime',
|
||||
dataIndex: 'reviewTime',
|
||||
key: 'reviewTime',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'supplierEvaluateScore.column.action' }),
|
||||
@ -309,7 +309,7 @@ status:状态
|
||||
<Button type="link" onClick={() => goToScoring(record, 'supplier', 'view')}>
|
||||
{intl.formatMessage({ id: 'supplierEvaluateScore.button.view' })}
|
||||
</Button>
|
||||
{record.status === '1' && ( // 只有待评分状态才显示打分按钮
|
||||
{record.status === '1' && record.reviewStatus !== '1' && ( // 只有待评分状态才显示打分按钮
|
||||
<Button type="link" onClick={() => goToScoring(record, 'supplier', 'score')}>
|
||||
{intl.formatMessage({ id: 'supplierEvaluateScore.button.score' })}
|
||||
</Button>
|
||||
|
Reference in New Issue
Block a user