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

fix:

parent aa412753
...@@ -47,16 +47,18 @@ const readySubmitReportDetail: React.FC = () => { ...@@ -47,16 +47,18 @@ const readySubmitReportDetail: React.FC = () => {
console.log(submitData) console.log(submitData)
const {fileList, recommandList, childTableData} = submitData const {fileList, recommandList, childTableData} = submitData
let params: any = { id } let params: any = { id }
params.evaluationTenderRecommendList = recommandList.filter(item => !item?.id) if(recommandList && recommandList.length) {
params.evaluationTenderRecommendList = recommandList.filter(item => !item?.id)
}
params.evaluationTenderFile = fileList params.evaluationTenderFile = fileList
params.evaluationTenderReportMemberList = childTableData[0].map(item => ({ memberId: item.memberId, correctScore: item.total })) params.evaluationTenderReportMemberList = childTableData[0].map(item => ({ memberId: item.memberId, correctScore: item.total }))
PublicApi.postPurchaseExpertExtractReportSubmitEvaluationTenderReport(params).then(res => { PublicApi.postPurchaseExpertExtractReportSubmitEvaluationTenderReport(params).then(res => {
setLoading(true) setLoading(true)
if(res.code === 1000) { if(res.code === 1000) {
history.goBack() history.goBack()
} else {
setLoading(false)
} }
}).finally(() => {
setLoading(false)
}) })
} }
......
...@@ -12,7 +12,6 @@ import { ...@@ -12,7 +12,6 @@ import {
View, View,
} from 'bizcharts'; } from 'bizcharts';
import Interval from 'bizcharts/lib/geometry/Interval' import Interval from 'bizcharts/lib/geometry/Interval'
import DataSet from "@antv/data-set";
import { BidInStateTexts, BidOuterWorkState, BidOutStateTexts, PURCHASE_TYPE, TenderInStateTexts, TenderOutStateTexts } from '@/constants'; import { BidInStateTexts, BidOuterWorkState, BidOutStateTexts, PURCHASE_TYPE, TenderInStateTexts, TenderOutStateTexts } from '@/constants';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import moment from 'moment'; import moment from 'moment';
...@@ -312,7 +311,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => { ...@@ -312,7 +311,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
span: 8, span: 8,
fieldList: [ fieldList: [
{ title: '是否在线评标:', name: 'isOnlineEvaluation', render: (text) => text ? '是' : '否' }, { title: '是否在线评标:', name: 'isOnlineEvaluation', render: (text) => text ? '是' : '否' },
{ title: '评标项模板:', name: 'templateId' }, { title: '评标项模板:', name: 'templateName' },
] ]
}, },
] ]
...@@ -346,6 +345,9 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => { ...@@ -346,6 +345,9 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
/** 投标区块 **/ /** 投标区块 **/
// @todo 中标结果 根据后端数据控制 // @todo 中标结果 根据后端数据控制
const result = _data.isWin const result = _data.isWin
const sumPrice = _data?.submitTender ? _data.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0) : 0
const alreadyPay = _data?.submitTender ? _data.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count * b.awardTenderRatio/100, 0) : 0
console.log(sumPrice, alreadyPay, 'aaa')
const bidResultList = [ const bidResultList = [
{ {
span: 8, span: 8,
...@@ -356,11 +358,11 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => { ...@@ -356,11 +358,11 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
name: 'createTime', name: 'createTime',
render: (text, record) => <Row justify='space-between'> render: (text, record) => <Row justify='space-between'>
<Col style={{margin: "0 16px"}}> <Col style={{margin: "0 16px"}}>
<CircleChart sumPrice={record.sumPrice} alreadyPay={record.alreadyPay} /> <CircleChart sumPrice={sumPrice} alreadyPay={alreadyPay} />
</Col> </Col>
<Col> <Col>
<div><span className={style['card-list_title']}>中标金额(含税):</span></div> <div><span className={style['card-list_title']}>中标金额(含税):</span></div>
<div><span>{record.alreadyPay || 0}</span></div> <div><span>{alreadyPay}</span></div>
</Col> </Col>
</Row>, </Row>,
}, },
...@@ -456,24 +458,17 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => { ...@@ -456,24 +458,17 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
// 圆形环状金额显示 // 圆形环状金额显示
const CircleChart = props => { const CircleChart = props => {
const { sumPrice = 100, alreadyPay = 10 } = props const { sumPrice = 100, alreadyPay = 10 } = props
const { DataView } = DataSet;
const userData = [ const userData = [
{ type: '总金额', value: (sumPrice - alreadyPay) || 100 }, { type: '总金额', value: sumPrice-alreadyPay, percent: Math.round((sumPrice-alreadyPay) / sumPrice)/ 100.00 },
{ type: '已支付', value: alreadyPay } { type: '已支付', value: alreadyPay, percent: Math.round(alreadyPay / sumPrice)/ 100.00 }
]; ];
const userDv = new DataView(); console.log(userData, 'ggg')
userDv.source(userData).transform({
type: 'percent',
field: 'value',
dimension: 'type',
as: 'percent',
});
return <Chart placeholder={false} height={64} width={64} style={{position: "relative"}} autoFit> return <Chart placeholder={false} height={64} width={64} style={{position: "relative"}} autoFit>
<Legend visible={false} /> <Legend visible={false} />
{/* 绘制图形 */} {/* 绘制图形 */}
<View data={userDv.rows}> <View data={userData}>
<Coordinate type="theta" innerRadius={0.75} /> <Coordinate type="theta" innerRadius={0.75} />
<Interval <Interval
position="percent" position="percent"
...@@ -481,7 +476,11 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => { ...@@ -481,7 +476,11 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
color={['type', ['#ffc400', '#6c9ceb']]} color={['type', ['#ffc400', '#6c9ceb']]}
tooltip={false} tooltip={false}
/> />
<p style={{position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)"}}>80%</p> <p style={{position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)"}}>
{
sumPrice <= 0 ? "0%" : (Math.round(alreadyPay / sumPrice * 10000) / 100.00)+"%"
}
</p>
</View> </View>
</Chart> </Chart>
} }
......
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