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

fix:

parent 86655bf0
import React, { useContext, useState } from 'react'
import React, { useContext, useState, useEffect } from 'react'
import { Row, Col } from 'antd'
import MellowCard from '@/components/MellowCard'
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import { ReadyConfirmBidContext } from '@/pages/procurement/_public/bid/context';
import style from './index.less'
import level1 from '@/assets/imgs/rank1.png'
import level2 from '@/assets/imgs/rank2.png'
......@@ -18,8 +18,37 @@ export interface BidConfirmProps {
}
const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
const bidDetailContext = useContext(BidDetailContext)
const { data, ctl } = bidDetailContext
const { data, ctl } = useContext(ReadyConfirmBidContext)
const [tableColumns, setTableColumns] = useState<any>([])
const [tableDataSource, setTableDataSource] = useState<any>([])
useEffect(() => {
// 组合模拟table数据
if(data?.memberList.length) {
}
}, [data])
const renderRanking = (t, r, i) => {
if(i === 1) {
return (<>
<img src={level1} alt="排名一"/>广州白马皮具交易中心
</>)
} else if(i === 2){
return (<>
<img src={level2} alt="排名二"/>广州白马皮具交易中心
</>)
} else if(i === 3) {
return (<>
<img src={level3} alt="排名三"/>广州白马皮具交易中心
</>)
} else {
return (<>
<span className={style.levelCircle}>4</span>广州万福皮具有限公司
</>)
}
}
return (
<div id="bidConfirm">
......@@ -32,6 +61,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
<div className={style.bidConfirmWrapper}>
<Row gutter={[0, 4]}>
<Col span={24}>
{/* header */}
<Row>
<Col span={4}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4}><p className={style.bidTableHead}>采购数量</p></Col>
......@@ -40,6 +70,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
<Col span={4}><p className={style.bidTableHead}><img src={level3} alt="排名三"/>江门华飞皮具有限公司</p></Col>
<Col span={4}><p className={style.bidTableHead}><span className={style.levelCircle}>4</span>广州万福皮具有限公司</p></Col>
</Row>
{/* body */}
<Row gutter={[0, 4]} style={{margin: '0 4px'}}>
<Col span={4}>
<div className={style.materialInfo}>
......@@ -152,6 +183,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
<GivenBidItem />
</Col>
</Row>
{/* statistics */}
<Row gutter={[0, 4]} style={{margin: '0 4px'}}>
<Col span={24}>
<TotalAmount />
......
import React, { useContext, useState } from 'react'
import { Table, Button, Radio, Tooltip, Row, Col } from 'antd'
import MellowCard from '@/components/MellowCard'
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import { ReadyConfirmBidContext } from '@/pages/procurement/_public/bid/context';
import { QuestionCircleOutlined, UserOutlined } from '@ant-design/icons';
import style from './index.less'
import CustomTag from '@/pages/procurement/components/CustomTag';
import { formatTimeString } from '@/utils';
/**
* 会员参标信息 待定标专用
......@@ -15,68 +16,21 @@ export interface ParticipateInfoProps {
}
const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
const bidDetailContext = useContext(BidDetailContext)
const { data, ctl } = bidDetailContext
const { data, ctl } = useContext(ReadyConfirmBidContext)
const mockData = [
{
company: '广州第三个官方工地公司',
amount: 13516,
isTax: true,
status: 1,
createTime: '2012-12-14 23:35:43',
no: 'HEGF05495',
},
{
company: '广州第三个官方工地公司',
amount: 13516,
isTax: false,
status: 1,
createTime: '2012-12-14 23:35:43',
no: 'HEGF05495',
},
{
company: '广州第三个官方工地公司',
amount: 13516,
isTax: false,
status: 2,
createTime: '2012-12-14 23:35:43',
no: 'HEGF05495',
},
{
company: '广州第三个官方工地公司',
amount: 13516,
isTax: true,
status: 1,
createTime: '2012-12-14 23:35:43',
no: 'HEGF05495',
},
console.log(data)
{
company: '广州第三个官方工地公司',
amount: 13516,
isTax: true,
status: 0,
createTime: '2012-12-14 23:35:43',
no: 'HEGF05495',
},
{
company: '广州第三个官方工地公司',
amount: 13516,
isTax: true,
status: 1,
createTime: '2012-12-14 23:35:43',
no: 'HEGF05495',
},
{
company: '广州第三个官方工地公司',
amount: 13516,
const [participateList, setParticipateList] = useState<any>(() => {
return data.memberList.map(item => ({
company: item.memberName,
amount: item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0),
// @todo 多物料下有问题,一个含税一个不含税,如何显示? 先写死
isTax: true,
status: 2,
createTime: '2012-12-14 23:35:43',
no: 'HEGF05495',
},
]
status: item.tenderOutStatus,
createTime: formatTimeString(item.submitTenderTime),
no: item.code,
}))
})
return (
<div id="participateInfo">
......@@ -89,7 +43,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<div className={style.participateWrapper}>
<Row gutter={[16, 0]}>
{
mockData.map((item, index) => (<Col span={4} key={index}>
participateList.map((item, index) => (<Col span={4} key={index}>
<div className={style.participateContent}>
<div className={style.topWrapper}>
<h3>{item.company}</h3>
......
......@@ -156,6 +156,7 @@
}
}
.remarkFile {
margin-top: 20px;
.card-list {
margin-top: 12px;
border: none;
......
......@@ -33,28 +33,28 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
const [childTableColumns, setChildrenTableColumns] = useState<any>([])
useEffect(() => {
// if(data?.evaluationTenderRecommendList.length) {
// setRecommandList(data.evaluationTenderRecommendList)
// }
if(data?.memberList.length) {
if(data?.evaluationTenderRecommendList.length) {
setRecommandList(data.evaluationTenderRecommendList)
}
if(data?.evaluationInviteMemberList.length) {
// 转换数据 生成评分项radio和所有分块表格
let dataSource: any = [], tempObject: any = {}
const { memberList } = data
for(let i = 0; i < memberList.length; i++) {
let item = memberList[i]
const { evaluationInviteMemberList } = data
for(let i = 0; i < evaluationInviteMemberList.length; i++) {
let item = evaluationInviteMemberList[i]
tempObject.id = item.id
tempObject.memberId = item.memberId
tempObject.memberName = item.memberName
// for(let j = 0; j < item.evaluationTenderList.length; j++) {
// let _item = item['evaluationTenderList'][j]
// tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
// tempObject.score = _item['score']
// tempObject.sort = _item['sort']
// tempObject.standard = _item['standard']
// tempObject.standardScore = _item['standardScore']
// tempObject.term = _item['term']
// dataSource.push({...tempObject})
// }
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
tempObject.standardScore = _item['standardScore']
tempObject.term = _item['term']
dataSource.push({...tempObject})
}
}
// 计算总分 计算平均分
......@@ -83,7 +83,10 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
render: (t, r, i) => renderRanking(t, r, ++i)
},
{
title: '修正总分', dataIndex: 'total', key: 'total', editable: true,
title: '修正总分',
dataIndex: 'total',
key: 'total',
// editable: true,
},
{
title: '平均分', dataIndex: 'average', key: 'average', className: 'commonHide'
......@@ -288,7 +291,11 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
<div className={style['card-list']}>
<Row>
<Col span={4}><p className={style['card-list_title']}>附件:</p></Col>
<Col><p>2513561516</p></Col>
<Col>
{
data?.evaluationTenderFile.length ? data.evaluationTenderFile.map(item => (<p key={item.id}><a href={item.url}></a>{item.name}</p>)) : null
}
</Col>
</Row>
</div>
</div>
......
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