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