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

fix: 招投标补全详情缺块内容

parent 3b1dddb3
......@@ -2227,10 +2227,6 @@ export enum TenderInsideWorkState {
Not_Submitted_Submit_Tender,
/** 已提交投标 */
Submitted_Submit_Tender,
/** 已评标 */
Finish_Evaluation_Submit_Tender,
/** 已废标 */
Discard_Tender,
}
/** 投标 内部状态 */
......@@ -2245,8 +2241,6 @@ export const TenderInStateTexts = {
8: "投标审核不通过",
9: "待提交投标",
10: "已提交投标",
11: "已评标",
12: "已废标",
}
/** 投标 外部状态工作流状态 */
......
......@@ -40,6 +40,8 @@ const AddRemarkBidTemplate:React.FC<AddRemarkBidTemplateProps> = (props) => {
if(!value?.templateContentList?.length) {
setBtnLoading(false)
return message.error('请填写评标内容')
} else {
value.templateContentList = value.templateContentList.filter(item => Object.keys(item).length > 0)
}
PublicApi.postPurchaseTemplateSaveOrUpdateTemplate(value).then(res => {
if(res.code === 1000) {
......
......@@ -5,6 +5,7 @@ import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import { useBidDetail } from '@/pages/procurement/_public/bid/effects/useBidDetail';
import BidDetailHeader from '@/pages/procurement/components/bidDetailHeader';
import BidDetailSection from '@/pages/procurement/components/bidDetailSection';
import { BidOuterWorkState } from '@/constants';
const CallForBidsSearchDetail: React.FC = () => {
const { formContext, id } = useBidDetail({ type: 'callForBid' })
......@@ -18,18 +19,39 @@ const CallForBidsSearchDetail: React.FC = () => {
{ title: '招标物料', id: 'bidMaterial', componentName: "BidMaterial" },
{ title: '招标要求', id: 'bidNeed', type: "bidNeed" },
{ title: '报名要求', id: 'registerNeed', type: "registerNeed" },
// // 多条 @需后台返回对应字段才可显示确实模块信息
// { title: '报名信息', id: 'registerInfo', type: "registerInfo" },
{ title: '报名信息', id: 'registerInfoList', componentName: "RegisterInfoList", type: "registerList" },
{ title: '资格预审要求', id: 'checkNeed', type: "checkNeed" },
// { title: '资格预审信息', id: 'registerInfo', type: "registerInfo" },
{ title: '资格预审信息', id: 'preCheckInfoList', componentName: "RegisterInfoList", type: "preCheckList" },
{ title: '评标要求', id: 'remarkNeed', type: "remarkNeed" },
{ title: '评标报告', id: 'remarkBidReport', componentName: "RemarkBidReport" },
{ title: '其他要求', id: 'otherNeed', type: "otherNeed" },
{ title: '招标方式', id: 'bidWay', componentName: "BidMethod" },
// { title: '招标结果', id: 'bidConfirm', componentName: "BidConfirm" },
{ title: '招标结果', id: 'bidConfirm', componentName: "BidConfirm" },
{ title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" },
]
// 已经报名 才有报名信息
if(data?.inviteTenderOutStatus < BidOuterWorkState.Not_Submitted_Qualifications_Check) {
anchorTitleList.splice(5, 1)
}
// 已经资格预审 才有资格预审信息
if(data?.inviteTenderOutStatus < BidOuterWorkState.Not_Submit_Tender && !data?.isQualificationCheck) {
// anchorTitleList.splice(7, 1)
anchorTitleList.forEach((ele, index) => ele['title'] === '资格预审信息' && anchorTitleList.splice(index, 1))
}
// 已经评标 才有评标报告
if(data?.inviteTenderOutStatus < BidOuterWorkState.Not_Finish_Notice) {
// anchorTitleList.splice(9, 1)
anchorTitleList.forEach((ele, index) => ele['title'] === '评标报告' && anchorTitleList.splice(index, 1))
}
// 已经完成招标 才有招标结果
if(data?.inviteTenderOutStatus < BidOuterWorkState.Finish_Invite_Tender) {
anchorTitleList.splice(-2, 1)
}
return (
<div>
<BidDetailContext.Provider value={formContext}>
......
......@@ -23,7 +23,7 @@ export interface ReadyAddBidProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.postPurchaseInviteTenderGetInviteTenderList({
...params,
inviteTenderOutStatusList: [BidOuterWorkState.Submitted_Invite_Tender],
inviteTenderOutStatusList: [BidOuterWorkState.Submitted_Invite_Tender, BidOuterWorkState.Platform_Not_Check_Invite_Tender],
inviteTenderInStatusList: [BidInsideWorkState.Not_Submitted_Check_Invite_Tender, BidInsideWorkState.Tender_Check_Not_Pass]
}, { ctlType: "none" })
return data
......
......@@ -87,7 +87,7 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>税率:</p></Col>
<Col><p>{currentData[currentColumn.dataIndex]['taxRate']}</p></Col>
<Col><p>{`${currentData[currentColumn.dataIndex]['taxRate']}%`}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
......
......@@ -49,13 +49,13 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
<Col><p>{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? 1 : 0, 0)}</p></Col>
<Col><p>{datas.reduce((a, b) => a + (b[item.dataIndex]['isAwardTender'] ? 1 : 0), 0)}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标总额:</p></Col>
<Col><p>¥{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100).toFixed(2) : 0, 0)}(含税)</p></Col>
<Col><p>¥{(datas.reduce((a, b) => a + (b[item.dataIndex]['isAwardTender'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100) : 0), 0)).toFixed(2)}(含税)</p></Col>
</Row>
</div>
</Col>) : null)
......
......@@ -29,10 +29,15 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
useEffect(() => {
if(data?.memberList.length) {
const { memberList } = data
const _memberList = memberList.map(item => ({
...item,
totalAmount: item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
})).sort((a, b) => b.totalAmount - a.totalAmount)
const _memberList = memberList.map(item => {
// 投过标的才显示
if(item.submitTender) {
return {
...item,
totalAmount: item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
}
}
}).filter(Boolean).sort((a, b) => b.totalAmount - a.totalAmount)
/** 组合table列 */
let columns: any[] = [
......
import React, { useContext, useState } from 'react'
import { Table, Button, Radio, Tooltip, Row, Col } from 'antd'
import { Row, Col } from 'antd'
import MellowCard from '@/components/MellowCard'
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';
......@@ -18,12 +17,10 @@ export interface ParticipateInfoProps {
const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
const { data, ctl } = useContext(ReadyConfirmBidContext)
console.log(data)
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),
amount: item.submitTender ? item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0) : 0,
// @todo 多物料下有问题,一个含税一个不含税,如何显示? 先写死
isTax: true,
status: item.submitTenderOutStatus,
......@@ -53,7 +50,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<Row className={style['card-list']}>
<Col span={8} className={style['card-list_title']}>环节状态:</Col>
<Col>
<CustomTag type="out" status={item.status} />
<CustomTag type="tenderOut" status={item.status} />
</Col>
</Row>
<Row className={style['card-list']}>
......
......@@ -87,7 +87,7 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>税率:</p></Col>
<Col><p>{currentData[currentColumn.dataIndex]['taxRate']}</p></Col>
<Col><p>{`${currentData[currentColumn.dataIndex]['taxRate']}%`}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
......
......@@ -49,13 +49,13 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
<Col><p>{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? 1 : 0, 0)}</p></Col>
<Col><p>{datas.reduce((a, b) => a + (b[item.dataIndex]['isAwardTender'] ? 1 : 0), 0)}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标总额:</p></Col>
<Col><p>¥{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100).toFixed(2) : 0, 0)}(含税)</p></Col>
<Col><p>¥{(datas.reduce((a, b) => a + (b[item.dataIndex]['isAwardTender'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100) : 0), 0)).toFixed(2)}(含税)</p></Col>
</Row>
</div>
</Col>) : null)
......
......@@ -29,10 +29,15 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
useEffect(() => {
if(data?.memberList.length) {
const { memberList } = data
const _memberList = memberList.map(item => ({
...item,
totalAmount: item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
})).sort((a, b) => b.totalAmount - a.totalAmount)
const _memberList = memberList.map(item => {
// 投过标的才显示
if(item.submitTender) {
return {
...item,
totalAmount: item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
}
}
}).filter(Boolean).sort((a, b) => b.totalAmount - a.totalAmount)
/** 组合table列 */
let columns: any[] = [
......
......@@ -23,7 +23,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
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),
amount: item.submitTender ? item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0) : 0,
// @todo 多物料下有问题,一个含税一个不含税,如何显示? 先写死
isTax: true,
status: item.submitTenderOutStatus,
......@@ -53,7 +53,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<Row className={style['card-list']}>
<Col span={8} className={style['card-list_title']}>环节状态:</Col>
<Col>
<CustomTag type="out" status={item.status} />
<CustomTag type="tenderOut" status={item.status} />
</Col>
</Row>
<Row className={style['card-list']}>
......
......@@ -86,7 +86,7 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>税率:</p></Col>
<Col><p>{currentData[currentColumn.dataIndex]['taxRate']}</p></Col>
<Col><p>{`${currentData[currentColumn.dataIndex]['taxRate']}%`}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
......
import React from 'react'
import React, { useEffect } from 'react'
import { Divider, Row, Col } from 'antd';
import style from '../../index.less'
......@@ -17,6 +17,17 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
columns,
}) => {
// useEffect(() => {
// columns.forEach((item, i) => {
// if(i > 1) {
// let a = datas.reduce((a, b) => {
// return a + (b[item.dataIndex]['isAward'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100) : 0)
// }, 0)
// console.log(a)
// }
// })
// }, [datas])
return <div className={style.totalWrapper}>
<Row>
<Col span={4}></Col>
......@@ -49,13 +60,13 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
<Col><p>{datas.reduce((a, b) => a + b[item.dataIndex]['isAward'] ? 1 : 0, 0)}</p></Col>
<Col><p>{datas.reduce((a, b) => a + (b[item.dataIndex]['isAward'] ? 1 : 0), 0)}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标总额:</p></Col>
<Col><p>¥{datas.reduce((a, b) => a + b[item.dataIndex]['isAward'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100).toFixed(2) : 0, 0)}(含税)</p></Col>
<Col><p>¥{(datas.reduce((a, b) => a + (b[item.dataIndex]['isAward'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100) : 0), 0)).toFixed(2)}(含税)</p></Col>
</Row>
</div>
</Col>) : null)
......
......@@ -54,7 +54,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<Row className={style['card-list']}>
<Col span={8} className={style['card-list_title']}>环节状态:</Col>
<Col>
<CustomTag type="out" status={item.status} />
<CustomTag type="tenderOut" status={item.status} />
</Col>
</Row>
<Row className={style['card-list']}>
......
......@@ -86,7 +86,7 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>税率:</p></Col>
<Col><p>{currentItemData['taxRate']}</p></Col>
<Col><p>{`${currentItemData['taxRate']}%`}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
......
......@@ -49,13 +49,13 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
<Col><p>{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? 1 : 0, 0)}</p></Col>
<Col><p>{datas.reduce((a, b) => a + (b[item.dataIndex]['isAwardTender'] ? 1 : 0), 0)}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标总额:</p></Col>
<Col><p>¥{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardTenderRatio'] / 100).toFixed(2) : 0, 0)}(含税)</p></Col>
<Col><p>¥{(datas.reduce((a, b) => a + (b[item.dataIndex]['isAwardTender'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardTenderRatio'] / 100) : 0), 0)).toFixed(2)}(含税)</p></Col>
</Row>
</div>
</Col>) : null)
......
......@@ -29,10 +29,15 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
useEffect(() => {
if(data?.memberList.length) {
const { memberList } = data
const _memberList = memberList.map(item => ({
...item,
totalAmount: (item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)).toFixed(2)
})).sort((a, b) => b.totalAmount - a.totalAmount)
const _memberList = memberList.map(item => {
// 投过标的才显示
if(item.submitTender) {
return {
...item,
totalAmount: item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
}
}
}).filter(Boolean).sort((a, b) => b.totalAmount - a.totalAmount)
/** 组合table列 */
let columns: any[] = [
......
......@@ -23,7 +23,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
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),
amount: item.submitTender ? item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0) : 0,
// @todo 多物料下有问题,一个含税一个不含税,如何显示? 先写死
isTax: true,
status: item.submitTenderOutStatus,
......@@ -53,7 +53,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<Row className={style['card-list']}>
<Col span={8} className={style['card-list_title']}>环节状态:</Col>
<Col>
<CustomTag type="out" status={item.status} />
<CustomTag type="tenderOut" status={item.status} />
</Col>
</Row>
<Row className={style['card-list']}>
......
......@@ -23,7 +23,7 @@ export const useSelfTable = () => {
dataIndex: 'id',
key: 'id',
render: (text, record) => <>
<EyePreview url={`/memberCenter/procurementAbility/callForBids/callForBidsSearch/detail?id=${record.id}`}>
<EyePreview url={`/memberCenter/procurementAbility/callForBids/callForBidsSearch/detail?id=${record.inviteTender.id}`}>
{record.inviteTender.code}
</EyePreview>
<div>{record.inviteTender.projectName}</div>
......@@ -49,7 +49,7 @@ export const useSelfTable = () => {
dataIndex: 'inviteTender',
key: 'inviteTender',
render: (text, record) => <>
<div>{record.inviteTender.memberName}</div>
<div>{record.memberName}</div>
<div>{formatTimeString(record.submitQualificationsCheckTime)}</div>
</>,
width: 180
......
......@@ -55,13 +55,13 @@ export const tableListSchema: ISchema = {
placeholder: '请输入投标会员',
}
},
submiteTenderOutStatusList: {
submitTenderOutStatusList: {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
},
enum: Object.keys(TenderOutStateTexts).filter(_item => Number(_item) >= 7).map(item => ({
label: BidOutStateTexts[item],
label: TenderOutStateTexts[item],
value: item,
}))
},
......
import React, { useState, useRef, useContext, useEffect } from 'react'
import { Form, Input, Checkbox, Row, Col, InputNumber } from 'antd';
import style from '../../index.less'
import { ReadyConfirmBidContext } from '@/pages/procurement/_public/bid/context';
import { BidDetailContext, ReadyConfirmBidContext } from '@/pages/procurement/_public/bid/context';
import checkmark from '@/assets/imgs/checkmark_circle.png'
/**
......@@ -29,9 +29,9 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
currentIndex
}) => {
const { submitData, submitCtl } = useContext(ReadyConfirmBidContext)
// const { paramsTableData: tableDataSource, simulateColumn: tableColumns } = submitData
const { setParamsTableData: setTableDataSource, setSimulateColumn: setTableColumns } = submitCtl
const { data, ctl } = useContext(BidDetailContext)
const [tableDataSource, setTableDataSource] = useState<any>([])
const [tableColumns, setTableColumns] = useState<any>([])
const onChangeInput = (v) => {
setTableDataSource(() => {
......@@ -43,8 +43,6 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
})
}
console.log(currentData, 'current')
const chanegChecked = (e) => {
setTableDataSource(() => {
const newData = [...datas]
......@@ -87,7 +85,7 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>税率:</p></Col>
<Col><p>{currentData[currentColumn.dataIndex]['taxRate']}</p></Col>
<Col><p>{`${currentData[currentColumn.dataIndex]['taxRate']}%`}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
......
......@@ -49,13 +49,13 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
<Col><p>{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? 1 : 0, 0)}</p></Col>
<Col><p>{datas.reduce((a, b) => a + (b[item.dataIndex]['isAwardTender'] ? 1 : 0), 0)}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标总额:</p></Col>
<Col><p>¥{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100).toFixed(2) : 0, 0)}(含税)</p></Col>
<Col><p>¥{(datas.reduce((a, b) => a + (b[item.dataIndex]['isAwardTender'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100) : 0), 0)).toFixed(2)}(含税)</p></Col>
</Row>
</div>
</Col>) : null)
......
......@@ -75,3 +75,31 @@
padding-right: 6px;
}
}
.winContainer {
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 16px;
border: 1px solid #F4F5F7;
padding: 12px;
background-color: #FAFBFC;
position: relative;
img {
display: block;
position: absolute;
top: 0;
right: 8px;
}
}
.card-list_title {
font-size: 12px;
color: #909399;
}
.amount {
font-size: 16px;
font-weight: 500;
color: #303133;
}
}
......@@ -8,6 +8,7 @@ import level2 from '@/assets/imgs/rank2.png'
import level3 from '@/assets/imgs/rank3.png'
import TotalAmount from './components/totalAmount';
import GivenBidItem from './components/givenBidItem';
import winBid from '@/assets/imgs/winBid.png';
/**
* 招标结果/招标定标
......@@ -26,10 +27,15 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
useEffect(() => {
if(data?.memberList.length) {
const { memberList } = data
const _memberList = memberList.map(item => ({
...item,
totalAmount: item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
})).sort((a, b) => b.totalAmount - a.totalAmount)
const _memberList = memberList.map(item => {
// 投过标的才显示
if(item.submitTender) {
return {
...item,
totalAmount: item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
}
}
}).filter(Boolean).sort((a, b) => b.totalAmount - a.totalAmount)
/** 组合table列 */
let columns: any[] = [
......@@ -56,7 +62,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
/** 组合table所需data */
let tempData: any = []
// 只需取一个投标会员的物料项 决定table的行数
_memberList[0].submitTender.submitTenderMateriel.forEach((item, index) => {
_memberList[0]?.submitTender && _memberList[0].submitTender.submitTenderMateriel.forEach((item, index) => {
tempData.push({
inviteTenderMateriel: item.inviteTenderMateriel,
count: item.inviteTenderMateriel.count,
......@@ -114,6 +120,26 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
bordered={false}
fullHeight
>
<div className={style['winContainer']}>
<h3 className="commonPanelTitle">中标会员</h3>
<Row gutter={[16, 0]}>
{
data.memberList.filter(m => m.isWin).map(item => (<Col key={item.id} span={6}>
<div className={style['card-list']}>
<h4>{item.memberName}</h4>
<Row>
<Col span={8}><p className={style['card-list_title']}>中标总金额(含税):</p></Col>
<Col><p className={style.amount}>¥{
item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
}</p></Col>
</Row>
<img src={winBid} alt="已中标"/>
</div>
</Col>))
}
</Row>
</div>
<Divider />
<div>
<h3 className="commonPanelTitle">中标理由</h3>
<div className={style['card-list']}>
......
......@@ -11,6 +11,7 @@ import RemarkBidReport from '../remarkBidReport'
import ParticipateInfo from '../participateInfo'
import BidConfirm from '../bidConfirm'
import MemberWinInfo from '../memberWinInfo'
import RegisterInfoList from '../registerInfoList'
export interface BidDetailSectionProps {
formContext: any,
......@@ -58,6 +59,8 @@ const BidDetailSection:React.FC<BidDetailSectionProps> = ({
"BidConfirm": BidConfirm,
// 会员中标信息
"MemberWinInfo": MemberWinInfo,
// 报名信息列表
"RegisterInfoList": RegisterInfoList,
}
const RenderDetailSection = ({ componentList }) => {
......@@ -123,6 +126,9 @@ const BidDetailSection:React.FC<BidDetailSectionProps> = ({
case "MemberWinInfo":
RcDom = (<MemberWinInfo cardTitle={title} />)
break;
case "RegisterInfoList":
RcDom = (<RegisterInfoList cardTitle={title} type={type} />)
break;
default:
RcDom = (<DescriptionsInfo cardTitle={title} type={type} />)
}
......
......@@ -364,7 +364,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
</Col>
</Row>,
},
{ title: '中标理由:', name: 'reason' },
{ title: '中标理由:', name: 'winTenderReason' },
]
},
{
......@@ -440,7 +440,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
/** 类型数据映射 */
const Type_Data_Map = {
// 当详情模式为投标详情并且投标外部状态投完标才有对应的投标基本信息显示
'basicInfo': apiType[apiType.length-1] === 'r' && _data['inviteTenderOutStatus'] >= BidOuterWorkState.Not_Open_Tender ? basicTenderColumnList : basicColumnList,
'basicInfo': apiType[apiType.length-1] === 'r' ? basicTenderColumnList : basicColumnList,
'bidNeed': callForNeedList,
'registerNeed': registerNeedList,
'checkNeed': checkNeedList,
......
......@@ -98,7 +98,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<Row className={style['card-list']}>
<Col span={8} className={style['card-list_title']}>环节状态:</Col>
<Col>
<CustomTag type="out" status={item.status} />
<CustomTag type="tenderOut" status={item.status} />
</Col>
</Row>
<Row className={style['card-list']}>
......
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 16px;
border: 1px solid #F4F5F7;
padding: 12px;
background-color: #FAFBFC;
position: relative;
img {
display: block;
position: absolute;
top: 0;
right: 8px;
}
}
.card-list_title {
font-size: 12px;
color: #909399;
}
.badge {
display: inline-block;
width: 16px;
height: 16px;
line-height: 16px;
text-align: center;
background: #EBEDF0;
border-radius: 50%;
margin-right: 4px;
color: #909399;
}
import React, { useContext, useState } from 'react'
import { Row, Col } from 'antd'
import MellowCard from '@/components/MellowCard'
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import style from './index.less'
/**
* 招标详情 报名信息列表/资格预审信息列表
*/
export interface RegisterInfoListProps {
cardTitle?: string;
/** registerList 报名信息列表 preCheckList 资格预审列表 */
type?: string;
}
const RegisterInfoList: React.FC<RegisterInfoListProps> = ({cardTitle, type="registerList"}) => {
const bidDetailContext = useContext(BidDetailContext)
const { data, ctl } = bidDetailContext
return (
<MellowCard
title={cardTitle}
style={{marginTop: 24}}
bordered={false}
fullHeight
>
<div className={style.remarkBidReportWrapper}>
{
type === 'registerList' ? <div className={style.bidMemberContainer}>
<Row gutter={[16, 0]}>
{
data && data.memberList.length ? data.memberList.map((item, index) => (item?.submitTenderRegister && <Col key={item.id} span={6}>
<div className={style['card-list']}>
<h4><span className={style['badge']}>{++index}</span>{item.memberName}</h4>
<Row>
<Col span={8}><p className={style['card-list_title']}>联系人姓名:</p></Col>
<Col><p>{item.submitTenderRegister.name}</p></Col>
</Row>
<Row>
<Col span={8}><p className={style['card-list_title']}>联系人手机:</p></Col>
<Col><p>{item.submitTenderRegister.phone}</p></Col>
</Row>
<Row>
<Col span={8}><p className={style['card-list_title']}>联系人邮箱:</p></Col>
<Col><p>{item.submitTenderRegister.email}</p></Col>
</Row>
<Row>
<Col span={8}><p className={style['card-list_title']}>地址:</p></Col>
<Col><p>{`${item.submitTenderRegister.provinceName}${item.submitTenderRegister.cityName}${item.submitTenderRegister.regionName}${item.submitTenderRegister.address}`}</p></Col>
</Row>
<Row>
<Col span={8}><p className={style['card-list_title']}>报名文件:</p></Col>
<Col>
<p>
{
item?.registerFile?.length ? item.registerFile.map(_item => (<a key={_item.id} href={_item.url}>{_item.name}</a>)) : null
}
</p>
</Col>
</Row>
</div>
</Col>)) : null
}
</Row>
</div>
:
<div className={style.bidMemberContainer}>
<Row gutter={[16, 0]}>
{
data && data.memberList.length ? data.memberList.map((item, index) => (<Col span={6}>
<div className={style['card-list']}>
<h4><span className={style['badge']}>{++index}</span>{item.memberName}</h4>
<Row>
<Col span={8}><p className={style['card-list_title']}>资格预审文件:</p></Col>
<Col>
<p>
{
item?.qualificationsFile?.length ? item.qualificationsFile.map(_item => (<a key={_item.id} href={_item.url}>{_item.name}</a>)) : null
}
</p>
</Col>
</Row>
</div>
</Col>)) : null
}
</Row>
</div>
}
</div>
</MellowCard>)
}
RegisterInfoList.defaultProps = {}
export default RegisterInfoList
......@@ -55,7 +55,7 @@ export const useSelfTable = () => {
align: 'left',
dataIndex: 'openTenderTime',
key: 'openTenderTime',
render: (text, record) => formatTimeString(record.createTime),
render: (text, record) => formatTimeString(record.openTenderTime),
},
{
title: '发布时间',
......
......@@ -25,7 +25,7 @@ export const useSelfTable = () => {
render: (text, record, index) => index + 1
},
{
title: '投标编号/会员',
title: '投标编号/项目',
align: 'left',
dataIndex: 'code',
key: 'code',
......@@ -33,11 +33,11 @@ export const useSelfTable = () => {
{ text ? <EyePreview url={`/memberCenter/procurementAbility/tender/tenderSearch/detail?id=${record.id}`}>
{text}
</EyePreview> : null }
<div>{record.memberName}</div>
<div>{record.inviteTender.projectName}</div>
</>
},
{
title: '招标编号/项目',
title: '招标编号/会员',
align: 'left',
dataIndex: 'inviteTender',
key: 'inviteTender',
......@@ -45,7 +45,7 @@ export const useSelfTable = () => {
<EyePreview url={`/memberCenter/procurementAbility/tender/callForBidsSearch/detail?id=${record.inviteTender.id}`}>
{record.inviteTender.code}
</EyePreview>
<div>{record.inviteTender.projectName}</div>
<div>{record.inviteTender.memberName}</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