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

fix: 添加招标详情招标方式组件

parent 6b38b124
......@@ -36,6 +36,7 @@ const CallForBidsSearchDetail: React.FC = () => {
detailList={detailList}
detailData={formContext.data}
anchorList={anchorTitleMapId}
backLink="/memberCenter/procurementAbility/callForBids/callForBidsSearch"
extraRight={
<>
<Button type='primary'>
......
......@@ -9,12 +9,13 @@ export interface BidDetailHeaderProps {
detailList?: { label: string, name: string, render?(text, record?), [key: string]: any }[],
detailData?: any,
anchorList?: any,
backLink?: string,
}
/**
* 招标详情头部
*/
const BidDetailHeader:React.FC<BidDetailHeaderProps> = ({ extraRight, detailList = [], detailData, anchorList = []}) => {
const BidDetailHeader:React.FC<BidDetailHeaderProps> = ({ extraRight, detailList = [], detailData, anchorList = [], backLink}) => {
const isLoading = !!detailData
const flagRef = useRef({
......@@ -40,28 +41,29 @@ const BidDetailHeader:React.FC<BidDetailHeaderProps> = ({ extraRight, detailList
setCurrent(index)
}
})
console.log('123456')
// 锚点导航距离顶端距离
let navDom: any = document.getElementById("anchorTitle")
let distance = navDom.offsetTop - document.documentElement.scrollTop
if(navDom) {
let distance = navDom.offsetTop - document.documentElement.scrollTop
if(!flagRef.current.flag) {
flagRef.current.distanceTop = navDom.offsetTop
flagRef.current.flag = true
}
if(!flagRef.current.flag) {
flagRef.current.distanceTop = navDom.offsetTop
flagRef.current.flag = true
}
if(distance <= 0) {
setIsFixed(true)
}
if(distance <= 0) {
setIsFixed(true)
}
if(document.documentElement.scrollTop <= flagRef.current.distanceTop) {
setIsFixed(false)
if(document.documentElement.scrollTop <= flagRef.current.distanceTop) {
setIsFixed(false)
}
}
}
const clickItem = (index: any) => {
setCurrent(index)
console.log(index, 'index')
}
return (
......@@ -73,7 +75,7 @@ const BidDetailHeader:React.FC<BidDetailHeaderProps> = ({ extraRight, detailList
<Col>
<Row align='middle'>
<Col>
<ArrowLeftOutlined onClick={() => history.goBack()}/>
<ArrowLeftOutlined onClick={() => backLink ? history.push(backLink) : history.goBack()}/>
</Col>
<Col>
<div className={style.titleAvatorText}>订单号: {detailData.orderNo}</div>
......
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 6px;
}
.card-list_title {
font-size: 12px;
color: #909399;
}
import React, { useContext, useState } from 'react'
import { Table } from 'antd'
import React, { useContext, useEffect, useState } from 'react'
import { Table, Drawer, Button, Tabs, Row, Col } from 'antd'
import MellowCard from '@/components/MellowCard'
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import EyePreview from '@/components/EyePreview';
import style from './index.less'
/**
* 招标物料表格
......@@ -15,6 +17,27 @@ const BidMaterial: React.FC<BidMaterialProps> = ({cardTitle}) => {
const bidDetailContext = useContext(BidDetailContext)
const { data, ctl } = bidDetailContext
const [visible, setVisible] = useState<boolean>(false)
// useEffect(() => {
// window.addEventListener("scroll", onScroll)
// return (()=>{
// window.removeEventListener('scroll', onScroll)
// })
// }, [])
useEffect(() => {
if(visible) {
let wrapper = document.getElementsByClassName("ant-drawer-content-wrapper")[0];
console.log(wrapper, 'wrapper')
wrapper.addEventListener("scroll", onScroll);
}
}, [visible])
const onScroll = () => {
console.log('滚动')
}
const dataSource = [
{
key: '1',
......@@ -47,6 +70,11 @@ const BidMaterial: React.FC<BidMaterialProps> = ({cardTitle}) => {
title: '姓名',
dataIndex: 'name',
key: 'name',
render: (text, record) => <>
<EyePreview type="button" handleClick={()=>clickPreview(record)}>
{text}
</EyePreview>
</>
},
{
title: '年龄',
......@@ -60,7 +88,11 @@ const BidMaterial: React.FC<BidMaterialProps> = ({cardTitle}) => {
},
];
return (
const clickPreview = (record) => {
setVisible(true)
}
return (<>
<MellowCard
title={cardTitle}
style={{marginTop: 24}}
......@@ -68,7 +100,256 @@ const BidMaterial: React.FC<BidMaterialProps> = ({cardTitle}) => {
fullHeight
>
<Table dataSource={dataSource} columns={columns} pagination={{size: "small"}} />
</MellowCard>)
</MellowCard>
<Drawer
title="物料详情"
width={800}
onClose={()=>setVisible(false)}
visible={visible}
bodyStyle={{ paddingBottom: 80 }}
footer={
<div
style={{
textAlign: 'right',
}}
>
<Button onClick={()=>setVisible(false)} style={{ marginRight: 8 }}>
取消
</Button>
<Button onClick={()=>setVisible(false)} type="primary">
确定
</Button>
</div>
}
>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
{/* <Tabs tabPosition="left">
<Tabs.TabPane tab="基本信息" key="1">
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
</Tabs.TabPane>
<Tabs.TabPane tab="产地" key="2">
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
</Tabs.TabPane>
<Tabs.TabPane tab="外观尺寸" key="3">
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
</Tabs.TabPane>
<Tabs.TabPane tab="工艺" key="4">
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
</Tabs.TabPane>
<Tabs.TabPane tab="特殊说明" key="5">
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
</Tabs.TabPane>
<Tabs.TabPane tab="附件" key="6">
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
</Tabs.TabPane>
<Tabs.TabPane tab="采购数量" key="7">
<Row className={style['card-list']}>
<Col span={4} className={style['card-list_title']}>基本信息</Col>
<Col>基本信息</Col>
</Row>
</Tabs.TabPane>
</Tabs> */}
</Drawer>
</>)
}
BidMaterial.defaultProps = {}
......
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 24px;
}
.card-list_title {
font-size: 12px;
color: #909399;
}
import React, { useContext, useState } from 'react'
import { Table, Button, Switch, Tooltip } from 'antd'
import { Table, Button, Switch, Tooltip, Row, Col } from 'antd'
import MellowCard from '@/components/MellowCard'
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import { QuestionCircleOutlined } from '@ant-design/icons';
import style from './index.less'
/**
* 招标方式
......@@ -82,6 +83,8 @@ const BidMethod: React.FC<BidMethodProps> = ({cardTitle}) => {
console.log(record)
}
const callForWay = 1 // 招标方式
return (
<MellowCard
title={cardTitle}
......@@ -89,7 +92,31 @@ const BidMethod: React.FC<BidMethodProps> = ({cardTitle}) => {
bordered={false}
fullHeight
>
<Table dataSource={dataSource} columns={columns} pagination={{size: "small"}} />
<div className={style['card-list']}>
<Row>
<Col span={2}><p className={style['card-list_title']}>招标方式</p></Col>
<Col><p>{callForWay === 1 ? '系统匹配' : '公开招标'}</p></Col>
</Row>
</div>
{
callForWay === 1 ?
<Table dataSource={dataSource} columns={columns} pagination={{size: "small"}} />
:
<div className={style['card-list']}>
<Row>
<Col span={6}><p className={style['card-list_title']}>招标方式</p></Col>
<Col><p>{callForWay === 1 ? '系统匹配' : '公开招标'}</p></Col>
</Row>
<Row>
<Col span={6}><p className={style['card-list_title']}>招标方式</p></Col>
<Col><p>{callForWay === 1 ? '系统匹配' : '公开招标'}</p></Col>
</Row>
<Row>
<Col span={6}><p className={style['card-list_title']}>招标方式</p></Col>
<Col><p>{callForWay === 1 ? '系统匹配' : '公开招标'}</p></Col>
</Row>
</div>
}
</MellowCard>)
}
......
......@@ -33,27 +33,27 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
{
span: 8,
fieldList: [
{ title: '招标编号', name: 'orderNo' },
{ title: '外部状态', name: 'orderModel' },
{ title: '内部状态', name: 'orderModel' },
{ title: '发布时间', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '招标编号:', name: 'orderNo' },
{ title: '外部状态:', name: 'orderModel' },
{ title: '内部状态:', name: 'orderModel' },
{ title: '发布时间:', name: 'createTime', render: (text) => formatTimeString(text) },
]
},
{
span: 8,
fieldList: [
{ title: '招标项目', name: 'createMemberName' },
{ title: '项目预算', name: 'createMemberName' },
{ title: '采购类型', name: 'createMemberName' },
{ title: '招标会员', name: 'createMemberName' },
{ title: '招标摘要', name: 'createMemberName' },
{ title: '招标项目:', name: 'createMemberName' },
{ title: '项目预算:', name: 'createMemberName' },
{ title: '采购类型:', name: 'createMemberName' },
{ title: '招标会员:', name: 'createMemberName' },
{ title: '招标摘要:', name: 'createMemberName' },
]
},
{
span: 8,
fieldList: [
{
title: '适用地址',
title: '适用地址:',
name: 'paymentInformationResponses',
render: (t, r) => {
const showDataSource = showMore ? data['paymentInformationResponses'] : [...data['paymentInformationResponses']].splice(0, 3)
......@@ -81,22 +81,22 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
{
span: 8,
fieldList: [
{ title: '投标截止时间', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '期望交付日期', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '投标截止时间:', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '期望交付日期:', name: 'createTime', render: (text) => formatTimeString(text) },
]
},
{
span: 8,
fieldList: [
{ title: '目标价', name: 'createMemberName' },
{ title: '招标要求', name: 'createMemberName' },
{ title: '目标价:', name: 'createMemberName' },
{ title: '招标要求:', name: 'createMemberName' },
]
},
{
span: 8,
fieldList: [
{
title: '招标文件',
title: '招标文件:',
name: 'paymentInformationResponses',
render: (t, r) => (<div>
{
......@@ -113,15 +113,15 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
{
span: 8,
fieldList: [
{ title: '报名要求时间', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '报名要求', name: 'createMemberName' },
{ title: '报名要求时间:', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '报名要求:', name: 'createMemberName' },
]
},
{
span: 8,
fieldList: [
{
title: '报名要求附件',
title: '报名要求附件:',
name: 'paymentInformationResponses',
render: (t, r) => (<div>
{
......@@ -138,15 +138,15 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
{
span: 8,
fieldList: [
{ title: '资格预审时间', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '资格预审要求', name: 'createMemberName' },
{ title: '资格预审时间:', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '资格预审要求:', name: 'createMemberName' },
]
},
{
span: 8,
fieldList: [
{
title: '资格预审要求附件',
title: '资格预审要求附件:',
name: 'paymentInformationResponses',
render: (t, r) => (<div>
{
......@@ -163,15 +163,15 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
{
span: 8,
fieldList: [
{ title: '评标要求时间', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '评标要求', name: 'createMemberName' },
{ title: '评标要求时间:', name: 'createTime', render: (text) => formatTimeString(text) },
{ title: '评标要求:', name: 'createMemberName' },
]
},
{
span: 8,
fieldList: [
{
title: '评标要求附件',
title: '评标要求附件:',
name: 'paymentInformationResponses',
render: (t, r) => (<div>
{
......@@ -184,8 +184,8 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
{
span: 8,
fieldList: [
{ title: '是否在线评标', name: 'createMemberName' },
{ title: '评标项模板', name: 'createMemberName' },
{ title: '是否在线评标:', name: 'createMemberName' },
{ title: '评标项模板:', name: 'createMemberName' },
]
},
]
......@@ -195,23 +195,23 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
{
span: 8,
fieldList: [
{ title: '付款方式', name: 'createTime' },
{ title: '交付地址', name: 'createMemberName' },
{ title: '税费要求', name: 'createMemberName' },
{ title: '付款方式:', name: 'createTime' },
{ title: '交付地址:', name: 'createMemberName' },
{ title: '税费要求:', name: 'createMemberName' },
]
},
{
span: 8,
fieldList: [
{ title: '交付要求', name: 'createMemberName' },
{ title: '物流要求', name: 'createMemberName' },
{ title: '交付要求:', name: 'createMemberName' },
{ title: '物流要求:', name: 'createMemberName' },
]
},
{
span: 8,
fieldList: [
{ title: '包装要求', name: 'createMemberName' },
{ title: '其他要求', name: 'createMemberName' },
{ title: '包装要求:', name: 'createMemberName' },
{ title: '其他要求:', name: 'createMemberName' },
]
},
]
......@@ -251,7 +251,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
{
type === 'remarkNeed' ?
<div className={style['card-list']}>
<p className={style['card-list_title']}>评标专家列表</p>
<p className={style['card-list_title']}>评标专家列表:</p>
<p style={{backgroundColor: '#fafbfc'}}>
<Row>
<Col span={1}>1</Col>
......
......@@ -11,9 +11,9 @@ import { PublicApi } from '@/services/api'
export interface OrderMergeInfoProps { }
const payInfo = [
{ title: '交付日期', name: 'deliveryTime', render: (text) => formatTimeString(text) },
{ title: '交付日期:', name: 'deliveryTime', render: (text) => formatTimeString(text) },
{
title: '交付地址', name: 'deliveryAddressInfo', render: (_, record) =>
title: '交付地址:', name: 'deliveryAddressInfo', render: (_, record) =>
<div>
<Row>
<Col>{record.receiverName}</Col>
......@@ -24,9 +24,9 @@ const payInfo = [
<div style={{ color: '#909399' }}>{record.fullAddress}</div>
</div>
},
{ title: '提货方式', name: 'deliveryType', render: (text) => DELIVERY_TYPE[text] },
{ title: '自提地址', name: 'pickUpAddress' },
{ title: '运费', name: 'freight' }
{ title: '提货方式:', name: 'deliveryType', render: (text) => DELIVERY_TYPE[text] },
{ title: '自提地址:', name: 'pickUpAddress' },
{ title: '运费:', name: 'freight' }
]
const electronInfo = [
......@@ -56,9 +56,9 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
const {theInvoiceInfo} = data
const otherInfo = [
{ title: '发票', name: 'theInvoiceInfo', render: item => <div className={style.invoice_list_item}>
{ title: '发票:', name: 'theInvoiceInfo', render: item => <div className={style.invoice_list_item}>
<div className={style.invoice_list_item_content}>
<div className={cx(style.invoice_list_item_content_tag, item.kind !== 1 ? style.special : '')}>{item.kind === 1 ? '增值税普通发票' : '增值税专用发票'}</div>
<div className={cx(style.invoice_list_item_content_tag, item.kind !== 1 ? style.special : '')}>{item.kind === 1 ? '增值税普通发票:' : '增值税专用发票:'}</div>
<div className={style.invoice_list_item_content_name}>
<div>{item.invoiceTitle}</div>
<div>{item.taxNo}</div>
......@@ -71,8 +71,8 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
</div>
}
</div>, resetCol: {flex: '1 1 100%'} },
{ title: '包装要求', name: 'pageRequire' },
{ title: '其他要求', name: 'restsRequire' },
{ title: '包装要求:', name: 'pageRequire' },
{ title: '其他要求:', name: 'restsRequire' },
]
return (
......
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