Commit 96d0bddd authored by 卢均锐's avatar 卢均锐

feat: 采购竞价&在线竞价 ,对接接口,业务逻辑

parent 961df397
......@@ -36,11 +36,11 @@ const BidCommonLayout: React.FC<BidCommonLayoutProps> = (props: any) => {
const _returnItem = (data) => {
switch (data.type) {
case 'text':
return data.extra
return data.extra || '-'
case 'area':
return <AreaItem data={data.extra} />
return data.extra ? (<AreaItem data={data.extra} />) : '-'
case 'files':
return <FilesItem files={data.extra} />
return data.extra ? (<FilesItem files={data.extra} />) : '-'
}
}
const _returnChild = (child, key) => {
......
......@@ -28,7 +28,7 @@ const MsgItem: React.FC<MsgItemPrpos> = (props: any) => {
<div className={styles.msgItemRow}>
<div className={styles.label}>报名文件:</div>
<div className={styles.files}>
{data.enclosureUrls && data.enclosureUrls.map((item, index) => {
{data.enclosureUrls ? data.enclosureUrls.map((item, index) => {
return (
<Typography.Link
style={{ display: 'block', paddingBottom: '8px' }}
......@@ -39,7 +39,7 @@ const MsgItem: React.FC<MsgItemPrpos> = (props: any) => {
<LinkOutlined />{item.name}
</Typography.Link>
)
})}
}) : '-'}
</div>
</div>
</div>
......
import React, { useRef, useImperativeHandle, useState } from 'react';
import { StandardTable } from 'god';
import React, { useEffect, useState } from 'react';
import { ColumnType } from 'antd/lib/table/interface';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { Row, Col, Space, Button, Typography, Popconfirm, Badge, Tag, Menu, Drawer } from 'antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { searchSelectGetSelectCategoryOptionEffect } from '@/pages/transaction/effect/index';
import { PublicApi } from '@/services/api';
import { Row, Col, Space, Button, Typography, Popconfirm, Badge, Tag, Table, Drawer } from 'antd';
import BtnItem from '../bidDetailBtnItem';
interface BidProgressDrawerProps {
visible?: boolean,
onClose?: Function,
awardProcess?: any
}
const { Text } = Typography;
const formActions = createFormActions();
const BidProgressDrawer = (props: any) => {
const { visible, onClose, schemaType, effects, reload, fetch, quotationDetailsId, number } = props;
const tableRef = useRef<any>({});
const [activeItem, setActiveItem] = useState<any>({});
const BidProgressDrawer: React.FC<BidProgressDrawerProps> = (props: any) => {
const { visible, onClose, awardProcess = [] } = props;
const [activeItem, setActiveItem] = useState<any>(awardProcess ? awardProcess[0] : {});
useEffect(() => {
awardProcess && setActiveItem(awardProcess[0])
}, [awardProcess])
const columns: ColumnType<any>[] = [{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
render: (t, r, i) => ++i
}, {
title: '物料编号/摘要',
key: 'quotedPriceNo',
dataIndex: 'quotedPriceNo',
key: 'number',
dataIndex: 'number',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{record.quotedPriceNo}</Text>
<Text type='secondary'>{text}</Text>
<Text type='secondary'>{record.details}</Text>
</Space>
)
}, {
title: '规格型号',
key: 'createTime',
dataIndex: 'createTime',
key: 'model',
dataIndex: 'model',
render: (text: any, record: any) => text,
}, {
title: '品类',
key: 'createTime',
dataIndex: 'createTime',
key: 'category',
dataIndex: 'category',
render: (text: any, record: any) => text,
}, {
title: '品牌',
key: 'createTime',
dataIndex: 'createTime',
key: 'brand',
dataIndex: 'brand',
render: (text: any, record: any) => text,
}, {
title: '采购数量/单位',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => text,
key: 'purchaseCount',
dataIndex: 'purchaseCount',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{text}</Text>
<Text type='secondary'>{record.unit}</Text>
</Space>
),
}, {
title: '含税/税率',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => text,
key: 'isTax',
dataIndex: 'isTax',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{text === 1 ? '是' : '否'}</Text>
<Text type='secondary'>{record.taxRate}%</Text>
</Space>
),
}, {
title: '单价(含税)',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => text,
key: 'unitPrice',
dataIndex: 'unitPrice',
render: (text: any, record: any) => ${text}`,
}, {
title: '金额(含税)',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => text,
key: 'price',
dataIndex: 'price',
render: (text: any, record: any) => ${text}`,
}];
/** 列表数据 */
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
fetch && fetch({ id: quotationDetailsId, number: number, ...params }).then(res => {
resolve(res.data)
})
})
}
useImperativeHandle(reload, () => ({
reload: () => {
tableRef.current.reload();
}
}));
const chooseItem = (item: any) => {
if (item.id !== activeItem.id) {
setActiveItem(item);
}
}
// 搜索
const search = (values: any) => {
tableRef.current.reload(values)
}
return (
<Drawer
title="竞价过程"
......@@ -110,36 +102,22 @@ const BidProgressDrawer = (props: any) => {
}
>
<Row gutter={[8, 8]} style={{ marginBottom: '10px' }}>
{[]?.map((item, index) => {
{awardProcess?.length > 0 && awardProcess?.map((item, index) => {
return (
<Col span={7} key={item.id} onClick={() => { chooseItem(item) }}>
<BtnItem detail={item} active={item.id === activeItem.id} />
<BtnItem detail={item} active={item?.id === activeItem?.id} />
</Col>
)
})}
</Row>
<StandardTable
currentRef={tableRef}
<Table
columns={columns}
tableProps={{ rowKew: 'id' }}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, effects, FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions, 'category')
})
}}
// schema={
// schemaType && SchemaRender()
// }
>
</NiceForm>
}
dataSource={activeItem?.detailss ?? []}
rowKey={(record) => record.id}
pagination={{
hideOnSinglePage: true
}}
/>
</Drawer>
)
......
import React, { useState, useEffect } from 'react';
import React, { useMemo, useEffect } from 'react';
import { Chart, Tooltip, Axis } from 'bizcharts';
import { Radio, Row } from 'antd';
import Point from 'bizcharts/lib/geometry/Point';
......@@ -11,104 +11,29 @@ import selfStyles from './index.less';
interface QuotationDeskProps {
title?: string,
extra?: React.ReactNode
chartsList?: any
}
const data = [
{
year: "10:12:21",
value: 3,
type: 'min'
},
{
year: "10:32:13",
value: 4,
type: 'min'
},
{
year: "10:39:53",
value: 3.5,
type: 'min'
},
{
year: "10:40:21",
value: 5,
type: 'min'
},
{
year: "10:43:22",
value: 4.9,
type: 'min'
},
{
year: "10:45:26",
value: 6,
type: 'min'
},
{
year: "10:52:12",
value: 7,
type: 'min'
},
{
year: "10:12:21",
value: 4,
type: 'offer'
},
{
year: "10:32:13",
value: 5,
type: 'offer'
},
{
year: "10:39:53",
value: 4.5,
type: 'offer'
},
{
year: "10:40:21",
value: 6,
type: 'offer'
},
{
year: "10:43:22",
value: 5.9,
type: 'offer'
},
{
year: "10:45:26",
value: 7,
type: 'offer'
},
{
year: "10:52:12",
value: 8,
type: 'offer'
},
];
const scale = {
value: { min: 0, alias: '', type: 'linear-strict' },
ear: { range: [0, 1] },
type: {
formatter: v => {
return {
offer: '报价金额',
min: '最低价'
}[v]
const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
const { title, chartsList } = props;
const data = chartsList.reduce((total, cur) => total.concat(cur.list), []);
const scaleObj = useMemo(() => {
let _obj = {};
chartsList.forEach(item => {
_obj[`${item.type}`] = item.title;
});
return _obj;
}, [chartsList])
const scale = {
value: { min: 0, alias: '', type: 'linear-strict' },
ear: { range: [0, 1] },
type: {
formatter: v => {
return scaleObj[v]
}
}
}
}
const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
const { title, extra } = props;
// const [data] = useState({
// year: "1991",
// value: 3,
// })
return (
<div className={styles.wrap}>
<div className={styles.layout} style={{ margin: 0 }}>
......@@ -117,9 +42,13 @@ const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
title={title}
extra={
<Row>
{chartsList[1] && <div className={selfStyles.colorLabel}>
<div style={{ backgroundColor: '#00B37A' }}></div>
{chartsList[1]?.title}
</div>}
<div className={selfStyles.colorLabel}>
<div style={{ backgroundColor: '#5B8FF9' }}></div>
最低价
{chartsList[0]?.title}
</div>
<Radio.Group
defaultValue={1}
......@@ -145,8 +74,8 @@ const QuotationDesk: React.FC<QuotationDeskProps> = (props: any) => {
// line={{ style: { stroke: "#ff0000" } }}
tickLine={{ style: { lineWidth: 1 }, length: 5 }}
/>
<Line position="year*value" color={['type', ['#5B8FF9', '#00B37A']]} />
<Point position="year*value" color={['type', ['#5B8FF9', '#00B37A']]} shape='circle' />
<Line position="time*value" color={['type', ['#5B8FF9', '#00B37A']]} />
<Point position="time*value" color={['type', ['#5B8FF9', '#00B37A']]} shape='circle' />
<Tooltip shared showCrosshairs />
</Chart>
</Card>
......
......@@ -26,66 +26,70 @@ const QuotationDetailsDrawer = (props: any) => {
render: (t, r, i) => ++i
}, {
title: '物料编号/摘要',
key: 'quotedPriceNo',
dataIndex: 'quotedPriceNo',
key: 'number',
dataIndex: 'number',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{record.quotedPriceNo}</Text>
<Text type='secondary'>{text}</Text>
<Text type='secondary'>{record.details}</Text>
</Space>
)
}, {
title: '规格型号',
key: 'createTime',
dataIndex: 'createTime',
key: 'model',
dataIndex: 'model',
render: (text: any, record: any) => text,
}, {
title: '品类',
key: 'createTime',
dataIndex: 'createTime',
key: 'category',
dataIndex: 'category',
render: (text: any, record: any) => text,
}, {
title: '品牌',
key: 'createTime',
dataIndex: 'createTime',
key: 'brand',
dataIndex: 'brand',
render: (text: any, record: any) => text,
}, {
title: '采购数量/单位',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => text,
key: 'purchaseCount',
dataIndex: 'purchaseCount',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{text}</Text>
<Text type='secondary'>{record.unit}</Text>
</Space>
),
}, {
title: '含税/税率',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => text,
key: 'isTax',
dataIndex: 'isTax',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'>{text === 1 ? '是' : '否'}</Text>
<Text type='secondary'>{record.taxRate}%</Text>
</Space>
),
}, {
title: '单价(含税)',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => text,
key: 'unitPrice',
dataIndex: 'unitPrice',
render: (text: any, record: any) => ${text}`,
}, {
title: '金额(含税)',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => text,
key: 'price',
dataIndex: 'price',
render: (text: any, record: any) => ${text}`,
}];
/** 列表数据 */
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
fetch({ id: quotationDetailsId, number: number, ...params }).then(res => {
visible && fetch({ id: quotationDetailsId, number: number, ...params }).then(res => {
resolve(res.data)
})
})
}
useImperativeHandle(reload, () => ({
reload: () => {
tableRef.current.reload();
}
}));
// 搜索
const search = (values: any) => {
tableRef.current.reload(values)
......
......@@ -3,11 +3,16 @@ import { CaretDownOutlined } from '@ant-design/icons'
import styles from './index.less';
const TrendTag = () => {
interface TrendTagProps {
ratio?: any
}
const TrendTag: React.FC<TrendTagProps> = (props: any) => {
const { ratio } = props;
return (
<div className={styles.trendTag}>
<CaretDownOutlined style={{ color: '#E63F3B', fontSize: '10px', marginRight: '2px' }} />
24.5%
{ratio}%
</div>
)
}
......
......@@ -54,16 +54,12 @@ const SearchDetail = () => {
} = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]);
const [visible, setVisible] = useState<boolean>(false);
// 确认竞价结果
const [confirmBidResultVisible, setConfirmBidResultVisible] = useState<boolean>(false);
// 提交竞价结果
const [uploadBidResultVisible, setUploadBidResultVisible] = useState<boolean>(false);
// 报价明细
const [quotationDetailsVisible, setQuotationDetailsVisible] = useState<boolean>(false);
const [quotationDetailsId, setQuotationDetailsId] = useState<number>();
// 竞价过程
const [progressVisible, setProgressVisible] = useState<boolean>(false);
const [progressData, setProgressData] = useState<any>([]);
const [dataSource, setDataSource] = useState<any>({});
// 流转数据数据
const [progressEffect, setProgressEffect] = useState<any>([]);
......@@ -210,7 +206,7 @@ const SearchDetail = () => {
current: '1',
pageSize: '1'
}
await PublicApi.getPurchaseOnlineBiddingDetails({ ...params }).then(res => {
PublicApi.getPurchaseOnlineBiddingDetails({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
......@@ -224,6 +220,13 @@ const SearchDetail = () => {
handleConditionEffect(data);
handleAwardResult(data)
})
PublicApi.getPurchaseOnlineBiddingProcess({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
}
setProgressData(res.data);
})
}
useEffect(() => {
......@@ -349,8 +352,7 @@ const SearchDetail = () => {
}
/>
<BidProgressDrawer
effects='id'
title="竞价过程"
awardProcess={progressData}
visible={progressVisible}
onClose={() => { setProgressVisible(false) }}
/>
......
......@@ -8,29 +8,35 @@ import TrendTag from '../../../../components/detail/components/trendTag';
import styles from './index.less';
import OfferItem from '../offer';
const HistoryItem = () => {
interface HistoryItemProps {
detail?: any
}
const HistoryItem: React.FC<HistoryItemProps> = (props: any) => {
const { detail } = props;
const mapData = detail.offerLogs ? [...detail.offerLogs].splice(0, 3): [];
return (
<div className={styles.history}>
<div className={styles.historyHeader}>
<h5>报价历史</h5>
<div className={styles.box}>
<img src={level1} alt="第一名" className={styles.icon}/>
<img src={level1} alt="第一名" className={styles.icon} />
<div className={styles.rightPosition}>
<TrendTag />
{detail?.offerRatio ? <TrendTag ratio={detail?.offerRatio} /> : ''}
</div>
<p>本次报价金额</p>
<p className={styles.currentPrice}><span>¥</span>900.00</p>
<p className={styles.currentPrice}><span>¥</span>{detail?.offerPrice}</p>
<div className={styles.row}>
<div className={styles.col} style={{borderRight: '1px solid #EBECF0'}}>当前最低价:<span>¥ 900.00</span></div>
<div className={styles.col}>报价次数:<span>5</span></div>
<div className={styles.col} style={{ borderRight: '1px solid #EBECF0' }}>当前最低价:<span>{detail?.minPrice && detail.isOpenPurchase ? `¥ ${detail?.minPrice}` : '-'}</span></div>
<div className={styles.col}>报价次数:<span>{detail?.offerCount ? detail?.offerCount : '-'}</span></div>
</div>
</div>
</div>
<div className={styles.historyFootter}>
<h5>最近报价</h5>
<OfferItem />
<OfferItem />
<OfferItem />
{mapData && mapData.map((item) => {
return (<OfferItem key={item.offerTime} detail={item} />)
})}
</div>
</div>
)
......
......@@ -4,6 +4,7 @@ import { Row, Col, Tooltip, Button } from 'antd';
import { ArrowLeftOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils'
import StatusBox from '../../../purchaseBid/readyBid/management/components/statusBox';
import QuotationDeskLayout from '../../../components/detail/components/quotationDeskLayout';
......@@ -26,6 +27,7 @@ const Detail = () => {
} = history.location;
const [dataSource, setDataSource] = useState<any>({});
const [chartsList, setChartsList] = useState<any>([]);
const fetchDataSource = async () => {
const params = {
......@@ -42,6 +44,12 @@ const Detail = () => {
const { data } = res;
data.onlineId = Number(onlineId);
setDataSource(data);
let _list = [];
if(data.isOpenPurchase){
_list.push({title: '最低价',type: 'min',list: data.quotationDesks.map((item) => {return {type: 'min',time: formatTimeString(item.offerTime, 'HH:mm:ss'),value: item.price}})})
}
_list.push({title: '报价金额',type: 'offer',list: data.quotationDesks.map((item) => {return {type: 'offer',time: formatTimeString(item.offerTime, 'HH:mm:ss'),value: item.price}})})
setChartsList(_list)
})
}
......@@ -58,10 +66,10 @@ const Detail = () => {
<div className={styles.layout}>
<Row gutter={[8, 8]}>
<Col span={6}>
<HistoryItem />
<HistoryItem detail={dataSource} />
</Col>
<Col span={12}>
<QuotationDeskLayout />
<QuotationDeskLayout chartsList={chartsList} />
</Col>
<Col span={6}>
<StatusBox detail={dataSource} hasBidBtn={true} />
......
......@@ -4,23 +4,31 @@ import TrendTag from '../../../../components/detail/components/trendTag';
import styles from './index.less';
const OfferItem = () => {
import { formatTimeString } from '@/utils'
interface OfferItemProps {
detail?: any
}
const OfferItem: React.FC<OfferItemProps> = (props: any) => {
const { detail } = props;
return (
<div className={styles.offerItem}>
<div className={styles.left}>2</div>
<div className={styles.left}>{detail.ranking}</div>
<div className={styles.right}>
<div className={styles.row}>
<div className={styles.rowPrice}>
<span>¥ 900.00</span>
当前最低价:¥1,000.00
<span>¥ {detail.offerPrice}</span>
当前最低价:¥{detail.minPrice}
</div>
2
{detail.offerCount}
</div>
<div className={styles.row}>
<div className={styles.rowTime}>
10:43:56
{formatTimeString(detail.offerTime, 'HH:mm:ss')}
</div>
<TrendTag />
{detail.offerRatio ? <TrendTag ratio={detail.offerRatio} /> : ''}
</div>
</div>
</div>
......
......@@ -35,19 +35,32 @@ const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any)
const handleOk = () => {
form.validateFields().then(res => {
console.log(res);
onOk && onOk();
const _params = {
id: record.id,
state: -1,
prizeNotice: Number(res.prizeNotice),
thank: Number(res.thank),
notice: Number(res.notice),
awardResults: res.awardResults,
content: res.content
}
fetch && fetch(_params).then(res => {
console.log(res)
if (res.code === 1000) {
onOk && onOk();
}
})
})
}
const _returnDefaultAwardResults = useMemo(() => {
return record ? `${record.createMemberName}${record.details}》竞价工作已经结束,中标人已经确定。现将中标结果公布如下:
中标供应商:${record.createMemberName}(中标总金额(含税):${record.sumAwardPrice})。
return record ? `${record.MemberName}${record.details}》竞价工作已经结束,中标人已经确定。现将中标结果公布如下:
中标供应商:${record.MemberName}(中标总金额(含税):${record.sumAwardPrice})。
中标理由:价格最低` : '';
}, [record])
const _returnDefaultContent = useMemo(() => {
return record ? `贵公司参与了我公司《${record.detail}》竞价。在我公司综合各竞价单位的报价情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。` : '';
return record ? `贵公司参与了我公司《${record.details}》竞价。在我公司综合各竞价单位的报价情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。` : '';
}, [record])
const onCheckboxChange = (e: { target: { checked: boolean } }, func: Function, name: string) => {
......@@ -61,7 +74,6 @@ const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any)
prizeNotice: record && record.prizeNotice ? isForType[record.prizeNotice] : true,
thank: record && record.thank ? isForType[record.thank] : true,
awardResults: _returnDefaultAwardResults,
offer: '',
content: _returnDefaultContent
})
setNotice(record && record.notice ? isForType[record.notice] : true),
......@@ -101,7 +113,7 @@ const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any)
<Form.Item name="prizeNotice">
<Checkbox checked={prizeNotice} onChange={(e) => { onCheckboxChange(e, setPrizeNotice, 'prizeNotice') }}>发送中标通知</Checkbox>
</Form.Item>
<Form.Item name="offer">
<Form.Item name="awardResults">
<TextArea
rows={6}
placeholder="请输入中标通知"
......
......@@ -109,6 +109,8 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
}
const bidOk = () => {
// const _price = dataSource2.reduce((total: any, cur: any) => total + Number(cur.price), 0);
// console.log(_price)
const _params = {
biddingId: detail.id,
onlineId: detail.onlineId,
......
......@@ -61,7 +61,7 @@ const StatuBox: React.FC<StatuBoxProps> = (props: any) => {
{!hasBidBtn && <div className={styles.statusBoxText}><div>目标价:</div>{detail.isTargetPrice ? `¥ ${detail?.targetPrice}`: '无' }</div>}
<div className={styles.statusBoxText}><div>最小价差:</div>{detail.isMinPrice ? `¥ ${detail?.minPrice}`: '无' }</div>
<div className={styles.statusBoxText}><div>允许报价次数:</div>{detail?.allowPurchaseCount}</div>
<div className={styles.statusBoxText}><div>报价排名:</div>按项目总价排名</div>
<div className={styles.statusBoxText}><div>报价排名:</div>{detail.isOpenPurchase ? '按项目总价排名' : '无'}</div>
{hasBidBtn ? (
<Button type="primary" icon={<PlusOutlined />} block onClick={_handleBid} size={'large'} style={{ margin: '15px 0' }}>我要报价</Button>
) : (
......
......@@ -4,6 +4,8 @@ import { Row, Col, Tooltip, Button } from 'antd';
import { ArrowLeftOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils'
import QuotationDeskLayout from '../../../components/detail/components/quotationDeskLayout';
import BidDetailLayout from '../../../components/detail/components/bidDetailLayout';
......@@ -28,6 +30,7 @@ const Management = () => {
const [queryPriceDynamics, setQueryPriceDynamics] = useState<any>([]);
const [signupMembers, setSignupMembers] = useState<any>([]);
const [awardProcess, setAwardProcess] = useState<any>([]);
const [lowestList, setLowestList] = useState<any>({});
const fetchDataSource = async () => {
const params = {
......@@ -83,6 +86,11 @@ const Management = () => {
}
const { data } = res;
setAwardProcess(data);
setLowestList({
type: 'min',
title: '最低价',
list: data.map((item) => { return { type: 'min', time: formatTimeString(item.peportTime, 'HH:mm:ss'), value: item.sumPice } })
})
})
}
......@@ -104,14 +112,14 @@ const Management = () => {
<Col span={18}>
<Row gutter={[8, 8]} style={{ marginBottom: '8px' }}>
<Col span={16}>
<QuotationDeskLayout />
<QuotationDeskLayout chartsList={[lowestList]} />
</Col>
<Col span={8}>
<StatusBox detail={dataSource} />
</Col>
</Row>
<Row>
<BidDetailLayout detail={{awardProcess : awardProcess}} />
<BidDetailLayout detail={{ awardProcess: awardProcess }} />
</Row>
</Col>
</Row>
......
......@@ -85,6 +85,11 @@ const ReadyConfirm = () => {
setConfirmBidResultVisible(true);
}
const handleOnOk = () => {
setConfirmBidResultVisible(false);
ref.current.reload();
}
return (
<>
<Table
......@@ -100,7 +105,7 @@ const ReadyConfirm = () => {
visible={confirmBidResultVisible}
fetch={PublicApi.postPurchaseBiddingStayConfirmBidding}
onCancel={() => setConfirmBidResultVisible(false)}
onOk={() => {ref.current.reload()}}
onOk={handleOnOk}
/>
</>
)
......
......@@ -140,12 +140,12 @@ const SearchDetail = () => {
setResultEffect([
{
col: [
{ label: '中标公示', extra: '', type: 'text' }
{ label: '中标公示', extra: data.awardResults, type: 'text' }
]
},
{
col: [
{ label: '中标通知', extra: '', type: 'text' }
{ label: '中标通知', extra: data.awardResults, type: 'text' }
]
}
])
......@@ -156,13 +156,13 @@ const SearchDetail = () => {
{
col: [
{ label: '竞价时间', extra: `${formatTimeString(data.biddingStartTime)}${formatTimeString(data.biddingEndTime)}`, type: 'text' },
{ label: '起拍价', extra: data.startingPrice ? ${data.startingPrice}` : '', type: 'text', tips: '初始起拍价,首次报价要低于或等于起拍价' },
{ label: '目标价', extra: data.targetPrice ? ${data.targetPrice}` : '', type: 'text', tips: '期望成交价格' },
{ label: '起拍价', extra: data.startingPrice ? ${data.startingPrice}` : '', type: 'text', tips: '初始起拍价,首次报价要低于或等于起拍价' },
{ label: '目标价', extra: data.targetPrice ? ${data.targetPrice}` : '', type: 'text', tips: '期望成交价格' },
]
},
{
col: [
{ label: '最小价差', extra: data.minPrice ? ${data.minPrice}` : '', type: 'text', tips: '每次报价降价幅度须大于或等于最小价差' },
{ label: '最小价差', extra: data.minPrice ? ${data.minPrice}` : '', type: 'text', tips: '每次报价降价幅度须大于或等于最小价差' },
{ label: '允许报价次数', extra: data.allowPurchaseCount, type: 'text', tips: '允许每个供应商最多可以报价的次数' },
]
},
......@@ -251,6 +251,7 @@ const SearchDetail = () => {
}
setDataSource(data);
handleProgressEffect(data);
handleResultEffect(data);
handleBasicEffect(data);
handleRulesEffect(data);
handleSignUpEffect(data);
......@@ -341,20 +342,7 @@ const SearchDetail = () => {
case 'readyAdd':
case 'readyBid':
return (
<BidCommonLayout layoutId="bidResultLayout" title="竞价结果" effect={
[
{
col: [
{ label: '中标公示', extra: '温州龙昌手袋有限公司《进口头层黄牛皮荔枝纹采购》评标工作已经结束,中标人已经确定。现将中标结果公布如下:中标供应商:广州万富皮具有限中心(中标含税总金额¥114000.00),江门华飞皮具有限公司(中标含税总金额:¥38000.00)。中标理由:综合评分。', type: 'text' },
]
},
{
col: [
{ label: '中标公示', extra: '温州龙昌手袋有限公司《进口头层黄牛皮荔枝纹采购》评标工作已经结束,中标人已经确定。现将中标结果公布如下:中标供应商:广州万富皮具有限中心(中标含税总金额¥114000.00),江门华飞皮具有限公司(中标含税总金额:¥38000.00)。中标理由:综合评分。', type: 'text' },
]
}
]
} />
<BidCommonLayout layoutId="bidResultLayout" title="竞价结果" effect={resultEffect} />
)
default:
return null
......@@ -575,7 +563,7 @@ const SearchDetail = () => {
}
console.log(_params)
PublicApi.postPurchaseBiddingSubmitExamineBiddingReturn(_params).then(res => {
if(res.code === 1000){
if (res.code === 1000) {
history.goBack()
}
})
......@@ -619,7 +607,7 @@ const SearchDetail = () => {
visible={confirmBidResultVisible}
onCancel={() => setConfirmBidResultVisible(false)}
fetch={PublicApi.postPurchaseBiddingStayConfirmBidding}
onOk={() => history.goBack()}
onOk={() => { history.goBack() }}
/>
<SubmitResultModal
title="提交竞价结果"
......@@ -637,8 +625,7 @@ const SearchDetail = () => {
onClose={() => setQuotationDetailsVisible(false)}
/>
<BidProgressDrawer
effects='id'
title="竞价过程"
awardProcess={dataSource?.awardProcess ?? []}
visible={progressVisible}
onClose={() => setProgressVisible(false)}
/>
......
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