Commit 538a6c3d authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理招投标修正总分显示异常问题

parent 12dd1791
......@@ -254,7 +254,8 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
components={components}
dataSource={childTableData[index]}
columns={columns}
pagination={{size: "small"}}
pagination={false}
scroll={{ x: true }}
/>
}
})
......
......@@ -254,7 +254,8 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
components={components}
dataSource={childTableData[index]}
columns={columns}
pagination={{size: "small"}}
pagination={false}
scroll={{ x: true }}
/>
}
})
......
......@@ -163,4 +163,7 @@
}
}
}
.remarkBidMember {
margin-top: 20px;
}
// }
......@@ -42,6 +42,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.id = item.id
tempObject.memberId = item.memberId
tempObject.memberName = item.memberName
tempObject.correctScore = item.correctScore
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
......@@ -65,9 +66,9 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
total: total.toFixed(2),
average: (total/expertNumber).toFixed(2) || null,
expertNumber,
correctScore: computedData[item][0]['correctScore']
}
})
const dataBySort = groupBy(dataSource, 'sort')
setEvaluationRecord(dataBySort)
// 根据评标sort分类后的数据 遍历 分子表格
......@@ -81,8 +82,8 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
},
{
title: '修正总分',
dataIndex: 'total',
key: 'total',
dataIndex: 'correctScore',
key: 'correctScore',
// editable: true,
},
{
......@@ -100,6 +101,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
total: computedMemberScoreItem['total'],
average: computedMemberScoreItem['average'] ? Number(computedMemberScoreItem['average']).toFixed(2) : null,
expertNumber: computedMemberScoreItem['expertNumber'],
correctScore: childDataSource[_item][0]['correctScore']
}
let columns: any = []
childDataSource[_item].forEach((__item, __index) => {
......@@ -247,11 +249,12 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
if(transferRadio === index) {
return <Table
scroll={{ x: true }}
key={index}
components={components}
dataSource={childTableData[index]}
columns={columns}
pagination={{size: "small"}}
pagination={false}
/>
}
})
......
......@@ -92,7 +92,8 @@ const OnlineRemark: React.FC<RemarkBidReportProps> = ({cardTitle, addSchemaActio
rowKey: 'id',
columns: "{{remarkColumns}}",
components: "{{remarkComponents}}",
pagination: { size: 'small' }
pagination: false,
scroll: { x: true }
},
},
memberList: {
......
......@@ -163,4 +163,8 @@
}
}
}
.remarkBidMember {
margin-top: 20px;
}
// }
......@@ -42,6 +42,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.id = item.id
tempObject.memberId = item.memberId
tempObject.memberName = item.memberName
tempObject.correctScore = item.correctScore
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
......@@ -65,6 +66,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
total: total.toFixed(2),
average: (total/expertNumber).toFixed(2) || null,
expertNumber,
correctScore: computedData[item][0]['correctScore']
}
})
......@@ -81,8 +83,8 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
},
{
title: '修正总分',
dataIndex: 'total',
key: 'total',
dataIndex: 'correctScore',
key: 'correctScore',
// editable: true,
},
{
......@@ -100,6 +102,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
total: computedMemberScoreItem['total'],
average: computedMemberScoreItem['average'] ? Number(computedMemberScoreItem['average']).toFixed(2) : null,
expertNumber: computedMemberScoreItem['expertNumber'],
correctScore: childDataSource[_item][0]['correctScore']
}
let columns: any = []
childDataSource[_item].forEach((__item, __index) => {
......@@ -251,7 +254,8 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
components={components}
dataSource={childTableData[index]}
columns={columns}
pagination={{size: "small"}}
pagination={false}
scroll={{ x: true }}
/>
}
})
......
import React, { useEffect } from 'react'
import React from 'react'
import CustomTag from '@/pages/procurement/components/customTag'
import { BidInOpeartTexts, BidInStateTexts, BidOutOpeartTexts, BidOutStateTexts } from "@/constants/procurement"
import { formatTimeString } from "@/utils"
import { ISchema } from '@formily/antd'
......
......@@ -133,7 +133,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({editable}) => {
render: (t, r, i) => renderRanking(t, r, ++i)
},
{
title: '修正总分', dataIndex: 'total', key: 'total', editable: true,
title: '修正总分', dataIndex: 'modifyTotal', key: 'modifyTotal', editable: true,
},
{
title: '平均分', dataIndex: 'average', key: 'average', className: 'commonHide'
......@@ -148,6 +148,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({editable}) => {
memberId: childDataSource[_item][0]['memberId'],
memberName: _item,
total: computedMemberScoreItem['total'],
modifyTotal: computedMemberScoreItem['total'], //在线模式 默认修正总分是总分
average: computedMemberScoreItem['average'] ? Number(computedMemberScoreItem['average']).toFixed(2) : null,
expertNumber: computedMemberScoreItem['expertNumber'],
editable,
......@@ -333,6 +334,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({editable}) => {
}
const handleSave = (row) => {
console.log(row, childTableData)
// 双重遍历childTableData数据 改变total和average
setChildrenTableData(() => {
return childTableData.map(element => {
......@@ -340,6 +342,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({editable}) => {
if(_e.memberName === row.memberName) {
return {
..._e,
modifyTotal: Number(row.modifyTotal)
// @reason:修正总分和总分不需要联动
// total: Number(row.total),
// average: (Number(row.total) / row.expertNumber).toFixed(2),
......@@ -444,11 +447,12 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({editable}) => {
if(transferRadio === index) {
return <Table
scroll={{ x: true }}
key={index}
components={components}
dataSource={childTableData[index]}
columns={columns}
pagination={{size: "small"}}
pagination={false}
/>
}
})
......@@ -458,6 +462,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({editable}) => {
<h3 className="commonPanelTitle">评标记录</h3>
</div>
<Table
scroll={{ x: true }}
key="memberId"
components={components}
dataSource={offlineData}
......@@ -476,7 +481,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({editable}) => {
}),
};
})}
pagination={{size: "small"}}
pagination={false}
/>
</div>
}
......
......@@ -57,16 +57,16 @@ export const EditableCell: React.FC<EditableCellProps> = ({
style={{ margin: 0 }}
name={dataIndex}
initialValue={record[dataIndex]}
rules={[
{
required: true,
message: `${title}必须填写`,
},
{
pattern: /^\d+(\.\d{1,2})?$/,
message: `${title}仅限两位小数`,
},
]}
// rules={[
// {
// required: true,
// message: `${title}必须填写`,
// },
// {
// pattern: /^\d+(\.\d{1,2})?$/,
// message: `${title}仅限两位小数`,
// },
// ]}
>
<Input
style={{width: 140}}
......
......@@ -52,7 +52,7 @@ const readySubmitReportDetail: React.FC = () => {
params.evaluationTenderFile = fileList
// 在线
if(data.isOnlineEvaluation) {
params.evaluationTenderReportMemberList = childTableData?.length ? childTableData[0].map(item => ({ memberId: item.memberId, correctScore: item.total })) : []
params.evaluationTenderReportMemberList = childTableData?.length ? childTableData[0].map(item => ({ memberId: item.memberId, correctScore: item.modifyTotal })) : []
} else {
// 非在线
params.evaluationTenderReportMemberList = offlineData?.length
......@@ -65,6 +65,7 @@ const readySubmitReportDetail: React.FC = () => {
:
[]
}
console.log(params)
PublicApi.postPurchaseExpertExtractReportSubmitEvaluationTenderReport(params).then(res => {
setLoading(true)
if(res.code === 1000) {
......
......@@ -163,4 +163,7 @@
}
}
}
.remarkBidMember {
margin-top: 20px;
}
// }
......@@ -99,10 +99,11 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
// 动态子表格列 // 合并同会员下的专家评标
// 相同同会员名下的分数数据 只需要取一个
const computedMemberScoreItem = computedScore.filter(_v => _v.memberName === _item)[0]
console.log(computedMemberScoreItem)
let objectItem: any = {
memberId: childDataSource[_item][0]['memberId'],
memberName: _item,
total: computedMemberScoreItem['total'].toFixed(2),
total: computedMemberScoreItem['total'] ? Number(computedMemberScoreItem['total']).toFixed(2) : null,
average: computedMemberScoreItem['average'] ? Number(computedMemberScoreItem['average']).toFixed(2) : null,
expertNumber: computedMemberScoreItem['expertNumber'],
correctScore: childDataSource[_item][0]['correctScore']
......@@ -257,7 +258,8 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
components={components}
dataSource={childTableData[index]}
columns={columns}
pagination={{size: "small"}}
pagination={false}
scroll={{ x: true }}
/>
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment