Commit 170a69df authored by 卢均锐's avatar 卢均锐

feat:采购竞价&在线竞价,增加静态页面,部分逻辑

parent 5a5d1f3a
......@@ -3,15 +3,18 @@ import { history } from 'umi';
import { Row, Col, Tooltip, Button } from 'antd';
import { ArrowLeftOutlined } from '@ant-design/icons';
import HistoryItem from './history';
import StatusBox from '../../../purchaseBid/readyBid/management/components/statusBox';
import QuotationDeskLayout from '../../../components/detail/components/quotationDeskLayout';
import BidDetailLayout from '../../../components/detail/components/bidDetailLayout';
import IMBtn from '../../../components/detail/components/iMBtn';
import HistoryItem from './history';
import styles from './index.less';
const Detail = () => {
return (
<div className={styles.warp}>
<div className={styles.header}>
......@@ -26,8 +29,8 @@ const Detail = () => {
<Col span={12}>
<QuotationDeskLayout />
</Col>
<Col>
<StatusBox />
<Col span={6}>
<StatusBox hasBidBtn={true} />
</Col>
</Row>
<Row>
......
.drawer {
:global {
.ant-drawer-content-wrapper {
left: 16px;
right: 16px;
bottom: 16px;
width: auto;
border-radius: 8px;
overflow: hidden;
.ant-drawer-header {
border-bottom: 0;
.ant-drawer-close {
padding: 11px;
div {
border: 1px solid #E4E6EB;
padding: 10px 16px;
}
}
}
}
}
}
import React from 'react';
import { Row, Col, Button, Drawer, Table } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import BtnItem from '../../../../../../components/detail/components/bidDetailLayout/btnItem';
import styles from './index.less';
import { div } from '@/pages/editor/configs/componentConfigs/HTML';
interface DetailBottomDrawerProps {
visible: boolean,
onClose?: Function
}
const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
const { visible, onClose } = props;
const columns: ColumnType<any>[] = [
{ title: '物料编号/名称', dataIndex: 'materielNo', align: 'center', },
{ title: '规格型号', dataIndex: 'type', align: 'center', },
{ title: '品类', dataIndex: 'category', align: 'center', },
{ title: '品牌', dataIndex: 'brand', align: 'center', },
{ title: '采购数量/单位', dataIndex: 'unit', align: 'center', },
{ title: '含税/税率', dataIndex: 'isHasTaxName', align: 'center', },
{ title: '单价(含税)', dataIndex: 'price', align: 'center', },
{ title: '金额(含税)', dataIndex: 'price', align: 'center', },
]
const dataSource = []
return (
<Drawer
title="竞价详情"
placement={'bottom'}
closable={true}
onClose={onClose}
visible={visible}
key={'bottom'}
height={450}
className={styles.drawer}
closeIcon={<div>取消报价</div>}
>
<Row gutter={[8, 8]} style={{ marginBottom: '10px' }}>
<Col span={7}>
<BtnItem />
</Col>
</Row>
<Table dataSource={dataSource} columns={columns} />;
</Drawer>
)
}
export default DetailBottomDrawer;
\ No newline at end of file
import React from 'react';
import React, { useState } from 'react';
import { Row, Col, Button, Divider } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import useCountDown from '@/hooks/useCountDown';
import DetailBottomDrawer from './detailBottomDrawer'
import styles from './index.less'
interface StatuBoxProps {
......@@ -12,48 +14,55 @@ interface StatuBoxProps {
const StatuBox: React.FC<StatuBoxProps> = (props: any) => {
const { hasBidBtn } = props;
const [hour, minute, second, stillRun] = useCountDown(1619514793947/1000);
const [hour, minute, second, stillRun] = useCountDown(1619514793947 / 1000);
const [visible, setVisible] = useState<boolean>(false);
return (
<div className='ant-card ant-card-bordered'>
<div className='ant-card-body'>
<div className={styles.statusBox}>
<div className={styles.statusBoxStatus}>当前状态:<span>竞价中</span></div>
<p className={styles.statusBoxTips}>距离竞价结束还剩</p>
<div className={styles.statusBoxTime}>
<div className={styles.statusBoxTimeChild}>
<div className={styles.statusBoxTimeChild_top}>{hour}</div>
<p className={styles.statusBoxTimeChild_bottom}>小时</p>
</div>
<span>:</span>
<div className={styles.statusBoxTimeChild}>
<div className={styles.statusBoxTimeChild_top}>{minute}</div>
<p className={styles.statusBoxTimeChild_bottom}>分钟</p>
</div>
<span>:</span>
<div className={styles.statusBoxTimeChild}>
<div className={styles.statusBoxTimeChild_top}>{second}</div>
<p className={styles.statusBoxTimeChild_bottom}></p>
<>
<div className='ant-card ant-card-bordered'>
<div className='ant-card-body'>
<div className={styles.statusBox}>
<div className={styles.statusBoxStatus}>当前状态:<span>竞价中</span></div>
<p className={styles.statusBoxTips}>距离竞价结束还剩</p>
<div className={styles.statusBoxTime}>
<div className={styles.statusBoxTimeChild}>
<div className={styles.statusBoxTimeChild_top}>{hour}</div>
<p className={styles.statusBoxTimeChild_bottom}>小时</p>
</div>
<span>:</span>
<div className={styles.statusBoxTimeChild}>
<div className={styles.statusBoxTimeChild_top}>{minute}</div>
<p className={styles.statusBoxTimeChild_bottom}>分钟</p>
</div>
<span>:</span>
<div className={styles.statusBoxTimeChild}>
<div className={styles.statusBoxTimeChild_top}>{second}</div>
<p className={styles.statusBoxTimeChild_bottom}></p>
</div>
</div>
<Divider dashed style={{ color: '#EBECF0', margin: '6px 0' }} />
<h4>竞价规则</h4>
<div className={styles.statusBoxText}><div>报价规则:</div>项目总价(含税)</div>
<div className={styles.statusBoxText}><div>起拍价:</div>¥ 1,500.00</div>
{!hasBidBtn && <div className={styles.statusBoxText}><div>目标价:</div>¥ 900.00</div>}
<div className={styles.statusBoxText}><div>最小价差:</div>¥ 100.00</div>
<div className={styles.statusBoxText}><div>允许报价次数:</div>3</div>
<div className={styles.statusBoxText}><div>报价排名:</div>按项目总价排名</div>
{hasBidBtn ? (
<Button type="primary" icon={<PlusOutlined />} block onClick={() => {setVisible(true)}} size={'large'} style={{ margin: '15px 0' }}>我要报价</Button>
) : (
<>
<div className={styles.statusBoxText}><div>公开最低报价:</div></div>
<div className={styles.statusBoxText}><div>公开报价排名:</div></div>
</>
)}
</div>
<Divider dashed style={{ color: '#EBECF0', margin: '6px 0' }} />
<h4>竞价规则</h4>
<div className={styles.statusBoxText}><div>报价规则:</div>项目总价(含税)</div>
<div className={styles.statusBoxText}><div>起拍价:</div>¥ 1,500.00</div>
{!hasBidBtn && <div className={styles.statusBoxText}><div>目标价:</div>¥ 900.00</div>}
<div className={styles.statusBoxText}><div>最小价差:</div>¥ 100.00</div>
<div className={styles.statusBoxText}><div>允许报价次数:</div>3</div>
<div className={styles.statusBoxText}><div>报价排名:</div>按项目总价排名</div>
{hasBidBtn ? (
<Button type="primary" icon={<PlusOutlined />} block >我要报价</Button>
) : (
<>
<div className={styles.statusBoxText}><div>公开最低报价:</div></div>
<div className={styles.statusBoxText}><div>公开报价排名:</div></div>
</>
)}
</div>
</div>
</div>
<DetailBottomDrawer
visible={visible}
onClose={() => { setVisible(false) }}
/>
</>
)
}
......
......@@ -91,7 +91,7 @@ const ReadyConfirm = () => {
reload={ref}
schemaType="PURCHASEBIDOSIGNUP_SCHEMA"
columns={columns}
effects="purchaseInquiryNo"
effects="biddingNo"
fetch={PublicApi.getPurchaseQuotedPriceAddList}
/>
<ConfirmBidResultModal
......
......@@ -102,7 +102,7 @@ const ReadyExamineResultTwo = () => {
fetchRowkeys={(e) => setRowKeys(e)}
schemaType="PURCHASEBIDREADYADD_SCHEMA"
columns={columns}
effects="purchaseInquiryNo"
effects="biddingNo"
fetch={PublicApi.getPurchaseQuotedPriceAddList}
controllerBtns={
<Row>
......
......@@ -104,7 +104,7 @@ const ReadySubmitExamineResult = () => {
fetchRowkeys={(e) => setRowKeys(e)}
schemaType="PURCHASEBIDREADYADD_SCHEMA"
columns={columns}
effects="purchaseInquiryNo"
effects="biddingNo"
fetch={PublicApi.getPurchaseQuotedPriceAddList}
controllerBtns={
<Row>
......
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