Commit 5543bf0a authored by 卢均锐's avatar 卢均锐

feat: 采购竞价 修改组件,接口啥时候才能好

parent 9a23825e
......@@ -16,6 +16,7 @@ import BidCommonLayout from '../../components/detail/components/bidCommonLayout'
import TableCommonLayout from '../../components/detail/components/tableCommonLayout';
import LowestQuotationRecordLayout from '../../components/detail/components/lowestQuotationRecordLayout';
import BidProgressDrawer from '../../components/detail/components/bidProgressDrawer';
import QuotationDetailsDrawer from '../../components/detail/components/quotationDetailsDrawer';
import {
......@@ -30,8 +31,8 @@ const transforType = {
const TABLINK = [
{ id: 'progressLayout', title: '流转进度' },
{ id: 'winBidMsgLayout', title: '中标通知' },
{ id: 'winBidResultLayout', title: '中标结果' },
// { id: 'winBidMsgLayout', title: '中标通知' },
// { id: 'winBidResultLayout', title: '中标结果' },
{ id: 'basicLayout', title: '基本信息' },
{ id: 'materialLayout', title: '采购物料' },
{ id: 'bidRulesLayout', title: '竞价规则' },
......@@ -39,6 +40,7 @@ const TABLINK = [
{ id: 'conditionLayout', title: '交易条件' },
{ id: 'fileLayout', title: '附件' },
{ id: 'quotationRecordLayout', title: '最低报价记录' },
{ id: 'resultLayout', title: '授标结果' },
{ id: 'recordLyout', title: '流转记录' },
]
......@@ -75,6 +77,8 @@ const SearchDetail = () => {
const [signUpEffect, setSignUpEffect] = useState<any>([]);
// 交易条件
const [conditionEffect, setConditionEffect] = useState<any>([]);
// 授标结果
const [awardResult, setAwardResult] = useState<any>({});
const handleProgressEffect = (data: any) => {
let _list = [
......@@ -190,6 +194,15 @@ const SearchDetail = () => {
])
}
const handleAwardResult = (data: any) => {
setAwardResult(
{
list: data.awardsFruits || [],
signUpIdea: data.signUpIdea
}
)
}
const fetchDataSource = async () => {
const params = {
id,
......@@ -209,6 +222,7 @@ const SearchDetail = () => {
handleRulesEffect(data);
handleSignUpEffect(data);
handleConditionEffect(data);
handleAwardResult(data)
})
}
......@@ -289,11 +303,29 @@ const SearchDetail = () => {
layoutId='quotationRecordLayout'
layoutTitle='最低报价记录'
fetch={PublicApi.getPurchaseOnlineBiddingMinimumBidding}
extra={<Button type='link' onClick={() => {setProgressVisible(true)}}>查看竞价过程</Button>}
extra={<Button type='link' onClick={() => { setProgressVisible(true) }}>查看竞价过程</Button>}
/>
)
}
const _openQuotationDetailsDrawer = (id: number) => {
setQuotationDetailsId(id);
setQuotationDetailsVisible(true);
}
const _returnResultLayout = () => {
return (
<BidCommonLayout
layoutId="resultLayout"
title="授标结果"
layoutType='result'
checkDetailFunc={_openQuotationDetailsDrawer}
effect={awardResult} />
)
}
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
......@@ -302,8 +334,8 @@ const SearchDetail = () => {
components={
<Fragment>
<ProgressLayout effect={progressEffect} />
{_returnWinBidMsgLayout()}
{_returnWinBidResultLayout()}
{/* {_returnWinBidMsgLayout()} */}
{/* {_returnWinBidResultLayout()} */}
<BidCommonLayout layoutId="basicLayout" title="基本信息" effect={basicEffect} />
{_returnMaterialLayout()}
{_returnBidRulesLayout()}
......@@ -311,6 +343,7 @@ const SearchDetail = () => {
{_returnConditionLayout()}
{_returnFileLayout()}
{_returnLowestQuotationRecordLayout()}
{_returnResultLayout()}
<RecordLyout />
</Fragment>
}
......@@ -319,7 +352,16 @@ const SearchDetail = () => {
effects='id'
title="竞价过程"
visible={progressVisible}
onClose={() => {setProgressVisible(false)}}
onClose={() => { setProgressVisible(false) }}
/>
<QuotationDetailsDrawer
fetch={PublicApi.getPurchaseBiddingQuotedPriceDetaild}
quotationDetailsId={quotationDetailsId}
number={number}
effects='id'
title="报价明细"
visible={quotationDetailsVisible}
onClose={() => setQuotationDetailsVisible(false)}
/>
</Context.Provider>
)
......
......@@ -63,7 +63,7 @@ const StatuBox: React.FC<StatuBoxProps> = (props: any) => {
<div className={styles.statusBoxText}><div>允许报价次数:</div>{detail?.allowPurchaseCount}</div>
<div className={styles.statusBoxText}><div>报价排名:</div>按项目总价排名</div>
{hasBidBtn ? (
<Button disabled={!stillRun} type="primary" icon={<PlusOutlined />} block onClick={_handleBid} size={'large'} style={{ margin: '15px 0' }}>我要报价</Button>
<Button type="primary" icon={<PlusOutlined />} block onClick={_handleBid} size={'large'} style={{ margin: '15px 0' }}>我要报价</Button>
) : (
<>
<div className={styles.statusBoxText}><div>公开最低报价:</div>{transforType[detail?.isOpenPurchase]}</div>
......
......@@ -16,6 +16,7 @@ import DemandLayout from '../../components/detail/components/purchaseBidDemandLa
import BidCommonLayout from '../../components/detail/components/bidCommonLayout';
import ModalOperate from '../../components/modalOperate';
import BidProgressDrawer from '../../components/detail/components/bidProgressDrawer';
import QuotationDetailsDrawer from '../../components/detail/components/quotationDetailsDrawer';
import {
......@@ -25,7 +26,6 @@ import {
import ConfirmBidResultModal from '../components/confirmBidResultModal';
import SubmitResultModal from '../components/submitResultModal';
import QuotationDetailsDrawer from '../components/quotationDetailsDrawer';
const transforType = {
1: '是',
......
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