Commit 0fe0ca2a authored by 卢均锐's avatar 卢均锐

chore: 采购竞价&在线竞价详情优化

parent b03f2d39
import React, { Fragment, useEffect, useState } from 'react';
import React, { Fragment, useEffect, useState, useMemo } from 'react';
import { Badge, Button } from 'antd';
import { history } from 'umi';
......@@ -225,13 +225,13 @@ const SearchDetail = () => {
fetchDataSource();
}, [])
const _returnWinBidMsgLayout = () => {
const _returnWinBidMsgLayout = useMemo(() => {
return (
<BidCommonLayout layoutId="winBidMsgLayout" title="中标通知" effect={resultEffect} />
)
}
}, [resultEffect])
const _returnWinBidResultLayout = () => {
const _returnWinBidResultLayout = useMemo(() => {
return (
<TableCommonLayout
layoutId='winBidResultLayout'
......@@ -241,9 +241,9 @@ const SearchDetail = () => {
fetch={PublicApi.getPurchaseOnlineBiddingAwardResultsBidding}
/>
)
}
}, [id, number])
const _returnMaterialLayout = () => {
const _returnMaterialLayout = useMemo(() => {
return (
<MaterialLayout
id={id}
......@@ -252,21 +252,21 @@ const SearchDetail = () => {
layoutTitle='采购物料'
/>
)
}
}, [id, number])
const _returnBidRulesLayout = () => {
const _returnBidRulesLayout = useMemo(() => {
return (<BidCommonLayout layoutId="bidRulesLayout" title="竞价规则" effect={rulesEffect} />)
}
}, [rulesEffect])
const _returnSignUpLayout = () => {
const _returnSignUpLayout = useMemo(() => {
return (<BidCommonLayout layoutId="signUpLayout" title="报名要求" effect={signUpEffect} />)
}
}, [signUpEffect])
const _returnConditionLayout = () => {
const _returnConditionLayout = useMemo(() => {
return (<BidCommonLayout layoutId="conditionLayout" title="交易条件" effect={conditionEffect} />)
}
}, [conditionEffect])
const _returnFileLayout = () => {
const _returnFileLayout = useMemo(() => {
return (
<BidCommonLayout layoutId="fileLayout" title="附件" effect={
[
......@@ -278,9 +278,9 @@ const SearchDetail = () => {
]
} />
)
}
}, [dataSource])
const _returnLowestQuotationRecordLayout = () => {
const _returnLowestQuotationRecordLayout = useMemo(() => {
return (
<LowestQuotationRecordLayout
id={id}
......@@ -292,7 +292,7 @@ const SearchDetail = () => {
extra={<Button type='link' onClick={() => { setProgressVisible(true) }}>查看竞价过程</Button>}
/>
)
}
}, [id, number, dataSource])
return (
......@@ -303,15 +303,15 @@ const SearchDetail = () => {
components={
<Fragment>
<ProgressLayout effect={progressEffect} />
{_returnWinBidMsgLayout()}
{_returnWinBidResultLayout()}
{_returnWinBidMsgLayout}
{_returnWinBidResultLayout}
<BidCommonLayout layoutId="basicLayout" title="基本信息" effect={basicEffect} />
{_returnMaterialLayout()}
{_returnBidRulesLayout()}
{_returnSignUpLayout()}
{_returnConditionLayout()}
{_returnFileLayout()}
{_returnLowestQuotationRecordLayout()}
{_returnMaterialLayout}
{_returnBidRulesLayout}
{_returnSignUpLayout}
{_returnConditionLayout}
{_returnFileLayout}
{_returnLowestQuotationRecordLayout}
<RecordCommonLayout externalColors={BID_EXTERNALSTATE_COLOR} internalColors={BID_INTERNALSTATE_COLOR} />
</Fragment>
}
......
......@@ -280,7 +280,7 @@ const SearchDetail = () => {
const _returnTopButton = () => {
switch (pathPci) {
case 'readyAdd':
if(button === 1){
if (button === 1) {
return (
<Popconfirm title="确定要提交审核吗?" okText="是" cancelText="否" onConfirm={fetchSubmitBatch}>
<Button type='primary'>
......@@ -288,7 +288,7 @@ const SearchDetail = () => {
</Button>
</Popconfirm>
)
}else{
} else {
return null
}
......@@ -345,7 +345,7 @@ const SearchDetail = () => {
return fetchSoure
}
const _returnBidResultLayout = () => {
const _returnBidResultLayout = useMemo(() => {
switch (pathPci) {
case 'search':
case 'readyAdd':
......@@ -356,9 +356,9 @@ const SearchDetail = () => {
default:
return null
}
}
}, [pathPci, resultEffect])
const _returnMaterialLayout = () => {
const _returnMaterialLayout = useMemo(() => {
switch (pathPci) {
case 'search':
case 'readyAdd':
......@@ -381,9 +381,9 @@ const SearchDetail = () => {
default:
return null;
}
}
}, [pathPci, id, number])
const _returnBidRulesLayout = () => {
const _returnBidRulesLayout = useMemo(() => {
switch (pathPci) {
case 'search':
case 'readyAdd':
......@@ -399,9 +399,9 @@ const SearchDetail = () => {
default:
return null;
}
}
}, [pathPci, rulesEffect])
const _returnSignUpLayout = () => {
const _returnSignUpLayout = useMemo(() => {
switch (pathPci) {
case 'search':
case 'readyAdd':
......@@ -418,9 +418,9 @@ const SearchDetail = () => {
default:
return null;
}
}
}, [pathPci, signUpEffect])
const _returnSignUpMsgLayout = () => {
const _returnSignUpMsgLayout = useMemo(() => {
switch (pathPci) {
case 'search':
case 'readyAdd':
......@@ -470,9 +470,9 @@ const SearchDetail = () => {
default:
return null;
}
}
}, [pathPci, dataSource])
const _returnConditionLayout = () => {
const _returnConditionLayout = useMemo(() => {
switch (pathPci) {
case 'search':
case 'readyAdd':
......@@ -488,9 +488,9 @@ const SearchDetail = () => {
default:
return null;
}
}
}, [pathPci, conditionEffect])
const _returnFileLayout = () => {
const _returnFileLayout = useMemo(() => {
switch (pathPci) {
case 'search':
case 'readyAdd':
......@@ -513,9 +513,9 @@ const SearchDetail = () => {
default:
return null;
}
}
}, [pathPci, dataSource])
const _returnDemandLayout = () => {
const _returnDemandLayout = useMemo(() => {
switch (pathPci) {
case 'search':
case 'readyAdd':
......@@ -531,14 +531,14 @@ const SearchDetail = () => {
default:
return null;
}
}
}, [pathPci, id, number, storeList])
const _openQuotationDetailsDrawer = (id: number) => {
setQuotationDetailsId(id);
setQuotationDetailsVisible(true);
}
const _returnResultLayout = () => {
const _returnResultLayout = useMemo(() => {
switch (pathPci) {
case 'search':
case 'readyAdd':
......@@ -562,7 +562,7 @@ const SearchDetail = () => {
default:
return null;
}
}
}, [pathPci, awardResult])
const _handleBiddingReturn = (signUpIdea: string, urls: any) => {
const _params = {
......@@ -587,16 +587,16 @@ const SearchDetail = () => {
components={
<Fragment>
<ProgressLayout effect={progressEffect} />
{_returnBidResultLayout()}
{_returnBidResultLayout}
<BidCommonLayout layoutId="basicLayout" title="基本信息" effect={basicEffect} />
{_returnMaterialLayout()}
{_returnBidRulesLayout()}
{_returnSignUpLayout()}
{_returnSignUpMsgLayout()}
{_returnConditionLayout()}
{_returnFileLayout()}
{_returnDemandLayout()}
{_returnResultLayout()}
{_returnMaterialLayout}
{_returnBidRulesLayout}
{_returnSignUpLayout}
{_returnSignUpMsgLayout}
{_returnConditionLayout}
{_returnFileLayout}
{_returnDemandLayout}
{_returnResultLayout}
<RecordCommonLayout externalColors={BID_EXTERNALSTATE_COLOR} internalColors={BID_INTERNALSTATE_COLOR} />
</Fragment>
}
......
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