Commit 88ac91dd authored by 卢均锐's avatar 卢均锐

feat: 采购竞价&在线竞价对接接口&拆分优化组件

parent be2519b4
...@@ -30,6 +30,14 @@ export const onlineBidRoute = [ ...@@ -30,6 +30,14 @@ export const onlineBidRoute = [
name: '待竞价报名', name: '待竞价报名',
component: '@/pages/transaction/purchaseAbility/onlineBid/readySignUp' component: '@/pages/transaction/purchaseAbility/onlineBid/readySignUp'
}, },
// 待竞价报名详情
{
path: '/memberCenter/procurementAbility/onlineBid/readySignUp/detail',
name: '采购竞价单详情',
component: '@/pages/transaction/purchaseAbility/onlineBid/detail',
hideInMenu: true,
noMargin: true,
},
// 竞价报名 // 竞价报名
{ {
path: '/memberCenter/procurementAbility/onlineBid/readySignUp/signUp', path: '/memberCenter/procurementAbility/onlineBid/readySignUp/signUp',
...@@ -46,7 +54,15 @@ export const onlineBidRoute = [ ...@@ -46,7 +54,15 @@ export const onlineBidRoute = [
// 待竞价详情 // 待竞价详情
{ {
path: '/memberCenter/procurementAbility/onlineBid/readyBid/detail', path: '/memberCenter/procurementAbility/onlineBid/readyBid/detail',
name: '待竞价详情', name: '采购竞价单详情',
component: '@/pages/transaction/purchaseAbility/onlineBid/detail',
hideInMenu: true,
noMargin: true,
},
// 待竞价详情
{
path: '/memberCenter/procurementAbility/onlineBid/readyBid/bid',
name: '竞价',
component: '@/pages/transaction/purchaseAbility/onlineBid/readyBid/detail', component: '@/pages/transaction/purchaseAbility/onlineBid/readyBid/detail',
hideInMenu: true, hideInMenu: true,
noMargin: true, noMargin: true,
......
...@@ -12,6 +12,10 @@ const useCountDown = (timeStamp: number) => { ...@@ -12,6 +12,10 @@ const useCountDown = (timeStamp: number) => {
const [m, setMinutes] = useState<any>(''); const [m, setMinutes] = useState<any>('');
const [s, setSeconds] = useState<any>(''); const [s, setSeconds] = useState<any>('');
useEffect(() => {
setLeftTime(end - now)
}, [end, now])
useEffect(() => { useEffect(() => {
if (leftTime > 0) { if (leftTime > 0) {
...@@ -41,7 +45,7 @@ const useCountDown = (timeStamp: number) => { ...@@ -41,7 +45,7 @@ const useCountDown = (timeStamp: number) => {
clearInterval(intervalRef.current); clearInterval(intervalRef.current);
} }
return () => clearInterval(intervalRef.current); return () => clearInterval(intervalRef.current);
}, []); }, [leftTime]);
if (leftTime <= 0) { if (leftTime <= 0) {
return ['00', '00', '00', false] return ['00', '00', '00', false]
......
.msgItem { .msgItem {
height: 170px;
background: #FAFBFC; background: #FAFBFC;
padding: 12px 14px; padding: 12px 14px;
......
.btnItem { .btnItem {
border: 1px solid #F4F5F7; border: 1px solid #F4F5F7;
padding: 16px 12px; padding: 16px 12px;
font-size: 12px; font-size: 12px;
cursor: pointer; cursor: pointer;
.btnItemTitle { .btnItemTitle {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
color: #909399; color: #909399;
margin-bottom: 16px; margin-bottom: 16px;
div { div {
flex: 1; flex: 1;
color: #303133; color: #303133;
}
}
.btnItemPrice {
color: #303133;
display: flex;
flex-direction: row;
div {
flex: 1;
font-size: 16px;
span {
color: #909399;
} }
} }
}
} .btnItemPrice {
color: #303133;
.btnItem2 {
border: 1px solid #F4F5F7;
font-size: 12px;
cursor: pointer;
background-color: #FFFFFF;
color: #909399;
.info {
background-color: #F7F8FA;
padding: 6px 12px;
display: flex;
flex-direction: row;
span {
flex: 1;
text-align: right;
}
}
.box {
padding: 12px;
.price {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
margin-bottom: 4px;
div { div {
flex: 1; flex: 1;
color: #303133; font-size: 16px;
font-size: 12px;
span { span {
color: #909399; color: #909399;
font-size: 12px;
margin-left: 4px;
} }
} }
} }
}
.time {
.btnItem2 {
border: 1px solid #F4F5F7;
font-size: 12px;
cursor: pointer;
background-color: #FFFFFF;
color: #909399;
.info {
background-color: #F7F8FA;
padding: 6px 12px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
span { span {
flex: 1; flex: 1;
color: #303133; text-align: right;
}
}
.box {
padding: 12px;
.price {
display: flex;
flex-direction: row;
margin-bottom: 4px;
div {
flex: 1;
color: #303133;
font-size: 12px;
span {
color: #909399;
font-size: 12px;
margin-left: 4px;
}
}
}
.time {
display: flex;
flex-direction: row;
span {
flex: 1;
color: #303133;
}
} }
} }
} }
}
.btnItem3 {
.btnItem3 { border: 1px solid #F4F5F7;
border: 1px solid #F4F5F7; font-size: 12px;
font-size: 12px; cursor: pointer;
cursor: pointer;
.title {
.title { padding: 18.5px 12px;
padding: 18.5px 12px; display: flex;
display: flex; flex-direction: row;
flex-direction: row;
div {
div { flex: 1;
flex: 1; font-size: 16px;
font-size: 16px;
color: #303133;
color: #303133; span {
span { color: #909399;
color: #909399; font-size: 12px;
font-size: 12px; margin-left: 4px;
margin-left: 4px; }
} }
} }
} }
}
\ No newline at end of file
...@@ -4,17 +4,19 @@ import { CaretDownOutlined } from '@ant-design/icons' ...@@ -4,17 +4,19 @@ import { CaretDownOutlined } from '@ant-design/icons'
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import TrendTag from '../../trendTag'; import TrendTag from '../trendTag';
import styles from './index.less'; import styles from './index.less';
interface BtnItemProps { interface BtnItemProps {
btnType?: number, btnType?: number,
active?: boolean, active?: boolean,
detail?: any detail?: any,
onOk?: Function,
onCancle?: Function
} }
const BtnItem: React.FC<BtnItemProps> = (props: any) => { const BtnItem: React.FC<BtnItemProps> = (props: any) => {
const { btnType, active, detail } = props; const { btnType, active, detail, onOk, onCancle } = props;
const _returnBtn = () => { const _returnBtn = () => {
if (btnType === 1) { if (btnType === 1) {
return ( return (
...@@ -62,10 +64,10 @@ const BtnItem: React.FC<BtnItemProps> = (props: any) => { ...@@ -62,10 +64,10 @@ const BtnItem: React.FC<BtnItemProps> = (props: any) => {
</div> </div>
<Row> <Row>
<Col span={12}> <Col span={12}>
<Button block style={{ backgroundColor: '#F4F5F7', border: 0 }}>取消</Button> <Button block style={{ backgroundColor: '#F4F5F7', border: 0 }} onClick={onCancle}>取消</Button>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Button type="primary" block>提交报价</Button> <Button type="primary" block onClick={onOk}>提交报价</Button>
</Col> </Col>
</Row> </Row>
</div> </div>
......
...@@ -4,7 +4,7 @@ import { ColumnType } from 'antd/lib/table/interface'; ...@@ -4,7 +4,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import Card from '../../../card'; import Card from '../../../card';
import BtnItem from './btnItem'; import BtnItem from '../bidDetailBtnItem';
const { Text } = Typography; const { Text } = Typography;
...@@ -20,10 +20,10 @@ interface BidDetailLayoutProps { ...@@ -20,10 +20,10 @@ interface BidDetailLayoutProps {
const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => { const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
const { detail } = props; const { detail } = props;
const { awardProcess = [] } = detail; const { awardProcess = [], materiels = [] } = detail;
const [showMore, setShowMore] = useState<boolean>(false); const [showMore, setShowMore] = useState<boolean>(false);
const [activeItem, setActiveItem] = useState<any>({}); const [activeItem, setActiveItem] = useState<any>({});
const dataSource = showMore ? [...activeItem.detailss].splice(0, 4) : activeItem.detailss; const dataSource = showMore ? [...materiels].splice(0, 4) : materiels;
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
...@@ -44,7 +44,7 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => { ...@@ -44,7 +44,7 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
dataIndex: 'unit', dataIndex: 'unit',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical'>
<Text type='secondary'>{record.unit}</Text> <Text type='secondary'>{record.purchaseCount}</Text>
<Text type='secondary'>{text}</Text> <Text type='secondary'>{text}</Text>
</Space> </Space>
) )
...@@ -86,7 +86,7 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => { ...@@ -86,7 +86,7 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
title={'竞价详情'} title={'竞价详情'}
> >
<Row gutter={[8, 8]} style={{ marginBottom: '10px' }}> <Row gutter={[8, 8]} style={{ marginBottom: '10px' }}>
{awardProcess.map((item, index) => { {awardProcess?.map((item, index) => {
return ( return (
<Col span={7} key={item.id} onClick={() => { chooseItem(item) }}> <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} />
...@@ -95,7 +95,7 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => { ...@@ -95,7 +95,7 @@ const BidDetailLayout: React.FC<BidDetailLayoutProps> = (props: any) => {
})} })}
</Row> </Row>
<Table dataSource={dataSource} columns={columns} />; <Table dataSource={dataSource} columns={columns} pagination={false} />;
<Button type="link" block onClick={() => { setShowMore(true) }}>显示更多</Button> <Button type="link" block onClick={() => { setShowMore(true) }}>显示更多</Button>
</Card> </Card>
</div> </div>
......
.baseItem{
display: flex;
font-size: 12px;
margin-bottom: 16px;
.label{
width: 104px;
color: #909399;
margin: 0;
}
.content{
flex: 1;
margin: 0;
}
}
\ No newline at end of file
import React, { useRef, useState } from 'react';
import { StandardTable } from 'god';
import Card from '../../../card';
import EyePreview from '@/components/EyePreview';
import selfStyles from './index.less';
export interface TableCommonLayoutProps {
layoutId?: string,
layoutTitle?: string,
id?: number,
number?: number,
fetch?: () => Promise<unknown>,
extra?: React.ReactNode
}
const LowestQuotationRecord: React.FC<TableCommonLayoutProps> = (props: any) => {
const { layoutId, layoutTitle, id, number, fetch, extra } = props;
const currentRef = useRef({});
const columns = [
{
title: '物料编号/名称',
key: 'number',
dataIndex: 'number',
},
{
title: '规格型号',
key: 'model',
dataIndex: 'model',
},
{
title: '品类',
key: 'category',
dataIndex: 'category',
},
{
title: '品牌',
key: 'brand',
dataIndex: 'brand',
},
{
title: '采购数量/单位',
key: 'unit',
dataIndex: 'unit',
},
{
title: '含税/税率',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
},
{
title: '单价(含税)',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
},
{
title: '金额(含税)',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
},
];
const fetchData = (params: any) => {
return new Promise(resolve => {
fetch && fetch({ id, number, ...params }).then((res: any) => {
resolve(res.data)
})
})
}
return (
<Card
id={layoutId}
title={layoutTitle}
extra={extra}
>
<div className={selfStyles.baseItem}>
<h5 className={selfStyles.label}>竞价排名: </h5>
<h5 className={selfStyles.content}></h5>
</div>
<div className={selfStyles.baseItem}>
<h5 className={selfStyles.label}>报价总额(含税): </h5>
<h5 className={selfStyles.content}></h5>
</div>
<StandardTable
currentRef={currentRef}
columns={columns}
tableProps={{ rowKew: 'id' }}
fetchTableData={(params: any) => fetchData(params)}
/>
</Card>
)
}
export default LowestQuotationRecord;
import React, { useRef, useState } from 'react';
import { StandardTable } from 'god';
import Card from '../../../card';
import EyePreview from '@/components/EyePreview';
export interface TableCommonLayoutProps {
layoutId?: string,
layoutTitle?: string,
id?: number,
number?: number,
fetch?: () => Promise<unknown>,
}
const TableCommonLayout: React.FC<TableCommonLayoutProps> = (props: any) => {
const { layoutId, layoutTitle, id, number, fetch } = props;
const currentRef = useRef({});
const columns = [
{
title: '物料编号/名称',
key: 'number',
dataIndex: 'number',
},
{
title: '规格型号',
key: 'model',
dataIndex: 'model',
},
{
title: '品类',
key: 'category',
dataIndex: 'category',
},
{
title: '品牌',
key: 'brand',
dataIndex: 'brand',
},
{
title: '采购数量/单位',
key: 'unit',
dataIndex: 'unit',
},
{
title: '含税/税率',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
},
{
title: '单价(含税)',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
},
{
title: '金额(含税)',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
},
];
const fetchData = (params: any) => {
return new Promise(resolve => {
fetch && fetch({ id, number, ...params }).then((res: any) => {
resolve(res.data)
})
})
}
return (
<Card
id={layoutId}
title={layoutTitle}
>
<StandardTable
currentRef={currentRef}
columns={columns}
tableProps={{ rowKew: 'id' }}
fetchTableData={(params: any) => fetchData(params)}
/>
</Card>
)
}
export default TableCommonLayout;
/** 筛选竞价单外部状态 */
export const FILTEREXTERNALBIDSTATE = [
{
label: '待提交竞价单', value: 1
},
{
label: '待审核竞价单', value: 2
},
{
label: '待提交报价单', value: 3
},
{
label: '待确认授标结果', value: 4
},
{
label: '已完成', value: 99
},
{
label: '已作废', value: '-1'
},
]
/** 筛选竞价单内部状态 */
export const FILTERINTERNALBIDSTATE = [
{
label: '待提交审核', value: 1
},
{
label: '待审核(一级)', value: 2
},
{
label: '待审核(二级)', value: 3
},
{
label: '待提交报价单', value: 4
},
{
label: '待比价', value: 5
},
{
label: '审核通过(一级)', value: 6
},
{
label: '审核通过(二级)', value: 7
},
{
label: '.审核不通过(一级)', value: 8
},
{
label: '审核不通过(二级)', value: 9
},
{
label: '已完成', value: 99
},
{
label: '已作废', value: '-1'
},
]
\ No newline at end of file
/** 筛选竞价单外部状态 */
export const FILTEREXTERNALBIDSTATE = [
{
label: '待提交竞价单', value: 1
},
{
label: '待审核竞价单', value: 2
},
{
label: '待提交报价单', value: 3
},
{
label: '待确认授标结果', value: 4
},
{
label: '已完成', value: 99
},
{
label: '已作废', value: '-1'
},
]
/** 价单外部状态 */
export const BID_EXTERNALSTATE = {
'-1': '作废',
99: '已完成',
1: '待提交竞价单',
2: '待审核竞价单',
3: '待提交报价单',
4: '待确认授标结果'
}
/** 价单外部状态颜色 */ /** 价单外部状态颜色 */
export const BID_EXTERNALSTATE_COLOR = { export const BID_EXTERNALSTATE_COLOR = {
'-1': 'error', '-1': 'error',
...@@ -42,60 +11,8 @@ export const BID_EXTERNALSTATE_COLOR = { ...@@ -42,60 +11,8 @@ export const BID_EXTERNALSTATE_COLOR = {
7: 'error', 7: 'error',
8: 'error', 8: 'error',
} }
/** 报价内部状态颜色 */
/** 筛选竞价单内部状态 */ export const BID_INTERNALSTATE_COLOR = {
export const FILTERINTERNALBIDSTATE = [
{
label: '待提交审核', value: 1
},
{
label: '待审核(一级)', value: 2
},
{
label: '待审核(二级)', value: 3
},
{
label: '待提交报价单', value: 4
},
{
label: '待比价', value: 5
},
{
label: '审核通过(一级)', value: 6
},
{
label: '审核通过(二级)', value: 7
},
{
label: '.审核不通过(一级)', value: 8
},
{
label: '审核不通过(二级)', value: 9
},
{
label: '已完成', value: 99
},
{
label: '已作废', value: '-1'
},
]
/** 报价内部状态 */
export const BID_INTERNALSTATE = {
'-1': '作废',
99: '已完成',
1: '待提交审核',
2: '待审核(一级)',
3: '待审核(二级)',
4: '待提交报价单',
5: '待比价',
6: '审核通过(一级)',
7: '审核通过(二级)',
8: '审核不通过(一级)',
9: '审核不通过(二级)',
}
/** 报价内部状态颜色 */
export const BID_INTERNALSTATE_COLOR = {
'-1': 'error', '-1': 'error',
99: 'success', 99: 'success',
1: 'default', 1: 'default',
...@@ -106,4 +23,4 @@ export const BID_INTERNALSTATE = { ...@@ -106,4 +23,4 @@ export const BID_INTERNALSTATE = {
9: 'error', 9: 'error',
10: 'default', 10: 'default',
11: 'error', 11: 'error',
} }
\ No newline at end of file \ No newline at end of file
...@@ -13,6 +13,8 @@ import ProgressLayout from '../../components/detail/components/progressCommonLay ...@@ -13,6 +13,8 @@ import ProgressLayout from '../../components/detail/components/progressCommonLay
import RecordLyout from '../../components/detail/components/recordLyout'; import RecordLyout from '../../components/detail/components/recordLyout';
import MaterialLayout from '../../components/detail/components/materialLayout'; import MaterialLayout from '../../components/detail/components/materialLayout';
import BidCommonLayout from '../../components/detail/components/bidCommonLayout'; import BidCommonLayout from '../../components/detail/components/bidCommonLayout';
import TableCommonLayout from '../../components/detail/components/tableCommonLayout';
import LowestQuotationRecordLayout from '../../components/detail/components/lowestQuotationRecordLayout';
import { import {
BID_EXTERNALSTATE_COLOR, BID_EXTERNALSTATE_COLOR,
...@@ -229,12 +231,21 @@ const SearchDetail = () => { ...@@ -229,12 +231,21 @@ const SearchDetail = () => {
) )
} }
const _returnWinBidResultLayout = () => {
return (
<TableCommonLayout
layoutId='winBidResultLayout'
layoutTitle='中标结果'
/>
)
}
const _returnMaterialLayout = () => { const _returnMaterialLayout = () => {
return ( return (
<MaterialLayout <MaterialLayout
id={id} id={id}
number={number} number={number}
fetch={PublicApi.getPurchaseBiddingMaterielPage} fetch={PublicApi.getPurchaseOnlineBiddingMaterielPage}
/> />
) )
} }
...@@ -265,6 +276,17 @@ const SearchDetail = () => { ...@@ -265,6 +276,17 @@ const SearchDetail = () => {
) )
} }
const _returnLowestQuotationRecordLayout = () => {
return (
<LowestQuotationRecordLayout
layoutId='quotationRecordLayout'
layoutTitle='最低报价记录'
fetch={PublicApi.getPurchaseOnlineBiddingMinimumBidding}
extra={<Button type='link'>查看竞价过程</Button>}
/>
)
}
return ( return (
<Context.Provider value={dataSource}> <Context.Provider value={dataSource}>
<PeripheralLayout <PeripheralLayout
...@@ -275,11 +297,13 @@ const SearchDetail = () => { ...@@ -275,11 +297,13 @@ const SearchDetail = () => {
<ProgressLayout effect={progressEffect} /> <ProgressLayout effect={progressEffect} />
{_returnWinBidMsgLayout()} {_returnWinBidMsgLayout()}
<BidCommonLayout layoutId="basicLayout" title="基本信息" effect={basicEffect} /> <BidCommonLayout layoutId="basicLayout" title="基本信息" effect={basicEffect} />
{_returnWinBidResultLayout()}
{_returnMaterialLayout()} {_returnMaterialLayout()}
{_returnBidRulesLayout()} {_returnBidRulesLayout()}
{_returnSignUpLayout()} {_returnSignUpLayout()}
{_returnConditionLayout()} {_returnConditionLayout()}
{_returnFileLayout()} {_returnFileLayout()}
{_returnLowestQuotationRecordLayout()}
<RecordLyout /> <RecordLyout />
</Fragment> </Fragment>
} }
......
...@@ -3,6 +3,8 @@ import { history } from 'umi'; ...@@ -3,6 +3,8 @@ import { history } from 'umi';
import { Row, Col, Tooltip, Button } from 'antd'; import { Row, Col, Tooltip, Button } from 'antd';
import { ArrowLeftOutlined } from '@ant-design/icons'; import { ArrowLeftOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import StatusBox from '../../../purchaseBid/readyBid/management/components/statusBox'; import StatusBox from '../../../purchaseBid/readyBid/management/components/statusBox';
import QuotationDeskLayout from '../../../components/detail/components/quotationDeskLayout'; import QuotationDeskLayout from '../../../components/detail/components/quotationDeskLayout';
import BidDetailLayout from '../../../components/detail/components/bidDetailLayout'; import BidDetailLayout from '../../../components/detail/components/bidDetailLayout';
...@@ -14,12 +16,44 @@ import HistoryItem from './history'; ...@@ -14,12 +16,44 @@ import HistoryItem from './history';
import styles from './index.less'; import styles from './index.less';
const Detail = () => { const Detail = () => {
const {
query: {
id,
number,
onlineId
},
pathname,
} = history.location;
const [dataSource, setDataSource] = useState<any>({});
const fetchDataSource = async () => {
const params = {
id,
number,
current: '1',
pageSize: '1'
}
await PublicApi.getPurchaseOnlineBiddingDetails({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
}
const { data } = res;
data.onlineId = Number(onlineId);
setDataSource(data);
})
}
useEffect(() => {
fetchDataSource();
}, [])
return ( return (
<div className={styles.warp}> <div className={styles.warp}>
<div className={styles.header}> <div className={styles.header}>
<ArrowLeftOutlined className={styles.goBack} onClick={() => history.goBack()} /> <ArrowLeftOutlined className={styles.goBack} onClick={() => history.goBack()} />
<div className={styles.title}>进口头层黄牛皮荔枝纹竞价<span>温州龙昌手袋有限公司</span><IMBtn func={() => console.log('ok')} /></div> <div className={styles.title}>{dataSource?.details}<span>{dataSource?.createMemberName}</span><IMBtn func={() => console.log('ok')} /></div>
</div> </div>
<div className={styles.layout}> <div className={styles.layout}>
<Row gutter={[8, 8]}> <Row gutter={[8, 8]}>
...@@ -30,11 +64,11 @@ const Detail = () => { ...@@ -30,11 +64,11 @@ const Detail = () => {
<QuotationDeskLayout /> <QuotationDeskLayout />
</Col> </Col>
<Col span={6}> <Col span={6}>
<StatusBox hasBidBtn={true} /> <StatusBox detail={dataSource} hasBidBtn={true} />
</Col> </Col>
</Row> </Row>
<Row> <Row>
<BidDetailLayout detail={{}} /> <BidDetailLayout detail={dataSource} />
</Row> </Row>
</div> </div>
</div> </div>
......
...@@ -34,7 +34,7 @@ const ReadyBid = () => { ...@@ -34,7 +34,7 @@ const ReadyBid = () => {
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical'>
<EyePreview <EyePreview
url={`/memberCenter/procurementAbility/onlineBid/search/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview> url={`/memberCenter/procurementAbility/onlineBid/readyBid/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview>
<Text type="secondary">{record.details}</Text> <Text type="secondary">{record.details}</Text>
</Space> </Space>
) )
...@@ -79,7 +79,7 @@ const ReadyBid = () => { ...@@ -79,7 +79,7 @@ const ReadyBid = () => {
key: 'operate', key: 'operate',
dataIndex: 'operate', dataIndex: 'operate',
align: 'center', align: 'center',
render: (text: any, record: any) => <Link to={`/memberCenter/procurementAbility/onlineBid/readyBid/detail?id=${record.id}&number=${record.biddingNo}`}>开始竞价</Link> render: (text: any, record: any) => <Link to={`/memberCenter/procurementAbility/onlineBid/readyBid/bid?id=${record.id}&number=${record.biddingNo}&onlineId=${record.onlineId}`}>开始竞价</Link>
}]; }];
return ( return (
......
...@@ -34,7 +34,7 @@ const ReadySignUp = () => { ...@@ -34,7 +34,7 @@ const ReadySignUp = () => {
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical'>
<EyePreview <EyePreview
url={`/memberCenter/procurementAbility/onlineBid/search/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview> url={`/memberCenter/procurementAbility/onlineBid/readySignUp/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview>
<Text type="secondary">{record.details}</Text> <Text type="secondary">{record.details}</Text>
</Space> </Space>
) )
......
...@@ -11,7 +11,8 @@ interface ConfirmBidResultModalProps { ...@@ -11,7 +11,8 @@ interface ConfirmBidResultModalProps {
visible: boolean, visible: boolean,
onCancel?: Function, onCancel?: Function,
onOk?: Function, onOk?: Function,
record: any record: any,
fetch: Promise<any>
} }
const isForType = { const isForType = {
...@@ -21,7 +22,7 @@ const isForType = { ...@@ -21,7 +22,7 @@ const isForType = {
const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any) => { const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any) => {
const [form] = Form.useForm(); const [form] = Form.useForm();
const { title, visible, onCancel, onOk, record } = props; const { title, visible, onCancel, onOk, record, fetch } = props;
// 是否发送中标公示 // 是否发送中标公示
const [notice, setNotice] = useState<boolean>(record && record.notice ? isForType[record.notice] : true); const [notice, setNotice] = useState<boolean>(record && record.notice ? isForType[record.notice] : true);
...@@ -64,9 +65,9 @@ const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any) ...@@ -64,9 +65,9 @@ const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any)
content: _returnDefaultContent content: _returnDefaultContent
}) })
setNotice(record && record.notice ? isForType[record.notice] : true), setNotice(record && record.notice ? isForType[record.notice] : true),
setPrizeNotice(record && record.prizeNotice ? isForType[record.prizeNotice] : true), setPrizeNotice(record && record.prizeNotice ? isForType[record.prizeNotice] : true),
setThank(record && record.thank ? isForType[record.thank] : true), setThank(record && record.thank ? isForType[record.thank] : true),
setActiveKey('1') setActiveKey('1')
}, [visible]) }, [visible])
return ( return (
......
...@@ -14,10 +14,6 @@ import BidRequirement from './components/bidRequirement'; ...@@ -14,10 +14,6 @@ import BidRequirement from './components/bidRequirement';
import Condition from './components/condition'; import Condition from './components/condition';
import File from './components/file'; import File from './components/file';
import {
PostPurchasePurchaseInquiryAddRequest,
GetPurchasePurchaseInquiryDetailsResponse
} from '@/services/PurchaseApi/id4177';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
const { TabPane } = Tabs; const { TabPane } = Tabs;
...@@ -78,7 +74,7 @@ const AddForm = () => { ...@@ -78,7 +74,7 @@ const AddForm = () => {
const ruleRef = await currentRules.current.get(); const ruleRef = await currentRules.current.get();
const requirementRef = await currentRequirement.current.get(); const requirementRef = await currentRequirement.current.get();
if (basicRef.state && materialRef.state && conditionRef.state && demandRef.state && ruleRef.state && requirementRef.state) { if (basicRef.state && materialRef.state && conditionRef.state && demandRef.state && ruleRef.state && requirementRef.state) {
const params: PostPurchasePurchaseInquiryAddRequest = { const params = {
memberId, memberId,
memberRoleId, memberRoleId,
memberName: name, memberName: name,
...@@ -132,13 +128,13 @@ const AddForm = () => { ...@@ -132,13 +128,13 @@ const AddForm = () => {
} }
PublicApi.getPurchaseBiddingDetails(parmas).then((res: any) => { PublicApi.getPurchaseBiddingDetails(parmas).then((res: any) => {
if (res.code === 1000) { if (res.code === 1000) {
const params: GetPurchasePurchaseInquiryDetailsResponse = res.data; const params = res.data;
const basicInfo: GetPurchasePurchaseInquiryDetailsResponse = { ...basic }; const basicInfo = { ...basic };
const materialInfo: GetPurchasePurchaseInquiryDetailsResponse = { ...material }; const materialInfo = { ...material };
const rulesInfo: GetPurchasePurchaseInquiryDetailsResponse = { ...rules }; const rulesInfo = { ...rules };
const requirementInfo: GetPurchasePurchaseInquiryDetailsResponse = { ...requirement }; const requirementInfo = { ...requirement };
const conditionInfo: GetPurchasePurchaseInquiryDetailsResponse = { ...condition }; const conditionInfo = { ...condition };
const demandInfo: GetPurchasePurchaseInquiryDetailsResponse = { ...demand }; const demandInfo = { ...demand };
basicInfo.details = params.details; basicInfo.details = params.details;
basicInfo.purchaseType = params.purchaseType; basicInfo.purchaseType = params.purchaseType;
basicInfo.priceContrast = params.priceContrast; basicInfo.priceContrast = params.priceContrast;
......
...@@ -66,7 +66,7 @@ const ReadyBid = () => { ...@@ -66,7 +66,7 @@ const ReadyBid = () => {
key: 'operate', key: 'operate',
dataIndex: 'operate', dataIndex: 'operate',
align: 'center', align: 'center',
render: (text: any, record: any) => <Button disabled={isOpenManage(record.biddingStartTime)} onClick={() => history.push(`/memberCenter/procurementAbility/readyBid/management?id=${record.id}&number=${record.quotedPriceNo}`)} type='link'>竞价管理</Button> render: (text: any, record: any) => <Button onClick={() => history.push(`/memberCenter/procurementAbility/purchaseBid/readyBid/management?id=${record.id}&number=${record.biddingNo}`)} type='link'>竞价管理</Button>
}]; }];
const isOpenManage = (timeStamp) => { const isOpenManage = (timeStamp) => {
......
...@@ -18,7 +18,7 @@ interface RankItemProps { ...@@ -18,7 +18,7 @@ interface RankItemProps {
const RankItem: React.FC<RankItemProps> = (props: any) => { const RankItem: React.FC<RankItemProps> = (props: any) => {
const { detail } = props; const { detail } = props;
const { queryPriceDynamics = [], signupMembers = [] } = detail; const { queryPriceDynamics = [], signupMembers = [], dynamic = {} } = detail;
const [showMoreQuery, setShowMoreQuery] = useState<boolean>(false); const [showMoreQuery, setShowMoreQuery] = useState<boolean>(false);
const [showMoreSign, setShowMoreSign] = useState<boolean>(false); const [showMoreSign, setShowMoreSign] = useState<boolean>(false);
...@@ -33,24 +33,24 @@ const RankItem: React.FC<RankItemProps> = (props: any) => { ...@@ -33,24 +33,24 @@ const RankItem: React.FC<RankItemProps> = (props: any) => {
<img src={level1} alt={`排名1`} /> <img src={level1} alt={`排名1`} />
<h4> <h4>
<div style={{ display: 'inline-block', position: 'relative', left: '-3%', top: '-5%' }}> <div style={{ display: 'inline-block', position: 'relative', left: '-3%', top: '-5%' }}>
{queryPriceDynamics.length > 0 && <TriangleTag text='最低价' wrapStyle={{ backgroundColor: '#EA8000' }} bgcolor='#EA8000' direction='right' />} {dynamic?.memberName && <TriangleTag text='最低价' wrapStyle={{ backgroundColor: '#EA8000' }} bgcolor='#EA8000' direction='right' />}
</div> </div>
{queryPriceDynamics[0]?.memberName} {dynamic?.memberName}
</h4> </h4>
<div className={styles.rankHeaderBoxInfo}> <div className={styles.rankHeaderBoxInfo}>
<div className={styles.rankHeaderBoxInfoChild}>当前最低价:<span>¥ {queryPriceDynamics[0]?.sumPrice}</span></div> <div className={styles.rankHeaderBoxInfoChild}>当前最低价:<span>¥ {dynamic?.minPrice}</span></div>
<div className={styles.rankHeaderBoxInfoChild}>报价次数:<span>5</span></div> <div className={styles.rankHeaderBoxInfoChild}>报价次数:<span>{dynamic?.count}</span></div>
</div> </div>
</div> </div>
</div> </div>
<Tabs defaultActiveKey="1"> <Tabs defaultActiveKey="1">
<TabPane tab="报价排名" key="1"> <TabPane tab="报价排名" key="1">
{queryPriceDynamicsData.map((item, index) => <RankRow detail={item} key={item.id} />)} {queryPriceDynamicsData?.map((item, index) => <RankRow detail={item} key={item.id} />)}
<Button type="link" block onClick={() => {setShowMoreQuery(true)}}>显示更多</Button> <Button type="link" block onClick={() => { setShowMoreQuery(true) }}>显示更多</Button>
</TabPane> </TabPane>
<TabPane tab="报名会员" key="2"> <TabPane tab="报名会员" key="2">
{signupMembersData.map((item, index) => <RankRow detail={item} key={item.id} rowType={2} />)} {signupMembersData?.map((item, index) => <RankRow detail={item} key={item.id} rowType={2} />)}
<Button type="link" block onClick={() => {setShowMoreSign(true)}}>显示更多</Button> <Button type="link" block onClick={() => { setShowMoreSign(true) }}>显示更多</Button>
</TabPane> </TabPane>
</Tabs> </Tabs>
</div> </div>
......
...@@ -31,11 +31,11 @@ const RankRow: React.FC<RankRowProps> = (props: any) => { ...@@ -31,11 +31,11 @@ const RankRow: React.FC<RankRowProps> = (props: any) => {
<div className={styles.rankRowLeftTop}> <div className={styles.rankRowLeftTop}>
<img src={RankForLeve[detail.ranking]} alt={`第${detail.ranking}名`} /> <img src={RankForLeve[detail.ranking]} alt={`第${detail.ranking}名`} />
{detail.memberName} {detail.memberName}
<TriangleTag text='最低价' wrapStyle={{ backgroundColor: '#EA8000', marginLeft: '8px' }} bgcolor='#EA8000' direction='left' /> {detail.ranking === 1 && <TriangleTag text='最低价' wrapStyle={{ backgroundColor: '#EA8000', marginLeft: '8px' }} bgcolor='#EA8000' direction='left' />}
</div> </div>
<div className={styles.rankRowLeftBottom}> <div className={styles.rankRowLeftBottom}>
¥{detail.sumPrice} ¥{detail.sumPrice}
<div className={styles.rankRowLeftBottomTag}>{detail.sumNumber}</div> <div className={styles.rankRowLeftBottomTag}>{detail.count}</div>
</div> </div>
</div> </div>
<div className={styles.rankRowRight}> <div className={styles.rankRowRight}>
...@@ -49,10 +49,10 @@ const RankRow: React.FC<RankRowProps> = (props: any) => { ...@@ -49,10 +49,10 @@ const RankRow: React.FC<RankRowProps> = (props: any) => {
<div className={`${styles.rankRow}`}> <div className={`${styles.rankRow}`}>
<div className={styles.rankRowLeft}> <div className={styles.rankRowLeft}>
<div className={styles.rankRowLeftTop}>{detail.memberName}</div> <div className={styles.rankRowLeftTop}>{detail.memberName}</div>
<div className={styles.rankRowLeftBottomPhone}>185 2929 6758</div> <div className={styles.rankRowLeftBottomPhone}>{detail.tel}</div>
</div> </div>
<div className={styles.rankRowRight}> <div className={styles.rankRowRight}>
{detail.memberName} {detail.contacts}
<IMBtn func={() => console.log(1)} /> <IMBtn func={() => console.log(1)} />
</div> </div>
</div> </div>
......
import React, { useState } from 'react'; import React, { useState } from 'react';
import { history } from 'umi';
import { Row, Col, Input, Drawer, Table, Space, Typography } from 'antd'; import { Row, Col, Input, Drawer, Table, Space, Typography } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import BtnItem from '../../../../../../components/detail/components/bidDetailLayout/btnItem'; import BtnItem from '../../../../../../components/detail/components/bidDetailBtnItem';
import styles from './index.less'; import styles from './index.less';
import { PublicApi } from '@/services/api';
const { Text } = Typography; const { Text } = Typography;
...@@ -16,7 +18,7 @@ interface DetailBottomDrawerProps { ...@@ -16,7 +18,7 @@ interface DetailBottomDrawerProps {
const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => { const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
const { visible, onClose, detail } = props; const { visible, onClose, detail } = props;
const { awardProcess = [] } = detail; const { awardProcess = [], materiels = [] } = detail;
const [activeItem, setActiveItem] = useState<any>({}); const [activeItem, setActiveItem] = useState<any>({});
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
...@@ -37,7 +39,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => { ...@@ -37,7 +39,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
dataIndex: 'unit', dataIndex: 'unit',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical'>
<Text type='secondary'>{record.unit}</Text> <Text type='secondary'>{record.purchaseCount}</Text>
<Text type='secondary'>{text}</Text> <Text type='secondary'>{text}</Text>
</Space> </Space>
) )
...@@ -45,24 +47,45 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => { ...@@ -45,24 +47,45 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
{ {
title: '含税/税率', title: '含税/税率',
dataIndex: 'isHasTaxName', dataIndex: 'isHasTaxName',
render: (text: any, record: any) => <Input value={record.taxRate} addonAfter="%" /> render: (text: any, record: any) => <Input value={record.taxRate} onChange={(e) => record.taxRate = e.target.value} addonAfter="%" />
}, },
{ {
title: '单价(含税)', title: '单价(含税)',
dataIndex: 'price', dataIndex: 'unitPrice',
render: (text: any, record: any) => <Input value={record.price} addonBefore="¥" /> render: (text: any, record: any) => <Input value={record.unitPrice} onChange={(e) => { record.unitPrice = e.target.value; record.price = _calcTotal(e.target.value, record.purchaseCount) }} addonBefore="¥" />
}, },
{ {
title: '金额(含税)', title: '金额(含税)',
dataIndex: 'price', dataIndex: 'price',
render: (text: any, record: any) => <Text type='secondary'>¥{text}</Text> render: (text: any, record: any) => <Text type='secondary'>{text && `¥${text}`}</Text>
}, },
] ]
const _calcTotal = (price: any, purchaseCount: any) => {
return Number(price) * Number(purchaseCount);
}
const _calcCurrentTotal = () => {
return materiels?.reduce((total, cur) => total + cur.price, 0);
}
const chooseItem = (item: any) => { const chooseItem = (item: any) => {
setActiveItem(item); setActiveItem(item);
} }
const bidOk = () => {
const _params = {
biddingId: detail.id,
onlineId: detail.onlineId,
materiels: materiels,
}
PublicApi.postPurchaseOnlineBiddingSubmitReportPrice(_params).then(res => {
if (res.code === 1000) {
history.goBack();
}
})
}
return ( return (
<Drawer <Drawer
title="竞价详情" title="竞价详情"
...@@ -76,7 +99,10 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => { ...@@ -76,7 +99,10 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
closeIcon={<div>取消报价</div>} closeIcon={<div>取消报价</div>}
> >
<Row gutter={[8, 8]} style={{ marginBottom: '10px' }}> <Row gutter={[8, 8]} style={{ marginBottom: '10px' }}>
{awardProcess.map((item, index) => { <Col span={7}>
<BtnItem btnType={3} detail={{ sumPice: _calcCurrentTotal(), peportPriceSum: 1 }} active={true} onOk={bidOk} onCancle={onClose} />
</Col>
{awardProcess?.map((item, index) => {
return ( return (
<Col span={7} key={item.id} onClick={() => { chooseItem(item) }}> <Col span={7} key={item.id} onClick={() => { chooseItem(item) }}>
<BtnItem btnType={item.id === activeItem.id ? 3 : 2} detail={item} active={item.id === activeItem.id} /> <BtnItem btnType={item.id === activeItem.id ? 3 : 2} detail={item} active={item.id === activeItem.id} />
...@@ -84,7 +110,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => { ...@@ -84,7 +110,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
) )
})} })}
</Row> </Row>
<Table dataSource={activeItem?.detailss} columns={columns} />; <Table dataSource={materiels} columns={columns} pagination={false} />;
</Drawer> </Drawer>
) )
} }
......
...@@ -19,7 +19,7 @@ const transforType = { ...@@ -19,7 +19,7 @@ const transforType = {
} }
const StatuBox: React.FC<StatuBoxProps> = (props: any) => { const StatuBox: React.FC<StatuBoxProps> = (props: any) => {
const { hasBidBtn, detail = {} } = props; const { hasBidBtn, detail } = props;
const [hour, minute, second, stillRun] = useCountDown(detail?.biddingEndTime / 1000); const [hour, minute, second, stillRun] = useCountDown(detail?.biddingEndTime / 1000);
const [visible, setVisible] = useState<boolean>(false); const [visible, setVisible] = useState<boolean>(false);
return ( return (
...@@ -48,10 +48,10 @@ const StatuBox: React.FC<StatuBoxProps> = (props: any) => { ...@@ -48,10 +48,10 @@ const StatuBox: React.FC<StatuBoxProps> = (props: any) => {
<Divider dashed style={{ color: '#EBECF0', margin: '6px 0' }} /> <Divider dashed style={{ color: '#EBECF0', margin: '6px 0' }} />
<h4>竞价规则</h4> <h4>竞价规则</h4>
<div className={styles.statusBoxText}><div>报价规则:</div>项目总价(含税)</div> <div className={styles.statusBoxText}><div>报价规则:</div>项目总价(含税)</div>
<div className={styles.statusBoxText}><div>起拍价:</div>¥ {detail?.startingPrice}</div> <div className={styles.statusBoxText}><div>起拍价:</div>{detail.isStartingPrice ? `¥ ${detail?.startingPrice}`: '无' }</div>
{!hasBidBtn && <div className={styles.statusBoxText}><div>目标价:</div>¥ {detail?.targetPrice}</div>} {!hasBidBtn && <div className={styles.statusBoxText}><div>目标价:</div>{detail.isTargetPrice ? `¥ ${detail?.targetPrice}`: '无' }</div>}
<div className={styles.statusBoxText}><div>最小价差:</div>¥ {detail?.minPrice}</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>{detail?.allowPurchaseCount}</div>
<div className={styles.statusBoxText}><div>报价排名:</div>按项目总价排名</div> <div className={styles.statusBoxText}><div>报价排名:</div>按项目总价排名</div>
{hasBidBtn ? ( {hasBidBtn ? (
<Button type="primary" icon={<PlusOutlined />} block onClick={() => { setVisible(true) }} size={'large'} style={{ margin: '15px 0' }}>我要报价</Button> <Button type="primary" icon={<PlusOutlined />} block onClick={() => { setVisible(true) }} size={'large'} style={{ margin: '15px 0' }}>我要报价</Button>
......
...@@ -15,26 +15,82 @@ import StatusBox from './components/statusBox'; ...@@ -15,26 +15,82 @@ import StatusBox from './components/statusBox';
import styles from './index.less'; import styles from './index.less';
const Management = () => { const Management = () => {
const [detailData, setDetailData] = useState<any>({}); const {
query: {
id,
number
},
pathname,
} = history.location;
const getData = () => { const [dataSource, setDataSource] = useState<any>({});
PublicApi.postPurchaseBiddingManageBidding().then(res => { const [dynamic, setDynamic] = useState<any>({});
if(res.code === 1000){ const [queryPriceDynamics, setQueryPriceDynamics] = useState<any>([]);
setDetailData(res.data); const [signupMembers, setSignupMembers] = useState<any>([]);
const fetchDataSource = async () => {
const params = {
id,
number,
current: 1,
pageSize: 1
}
const _params = {
id,
number,
current: '1',
pageSize: '1'
}
PublicApi.postPurchaseBiddingManageBidding({ ...params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
}
const { data } = res;
setDataSource(data);
})
PublicApi.getPurchaseBiddingDynamicBidding({ ..._params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
} }
const { data } = res;
setDynamic(data);
})
PublicApi.getPurchaseBiddingRankingBidding({ ..._params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
}
const { data } = res;
setQueryPriceDynamics(data);
})
PublicApi.getPurchaseBiddingSignupMember({ ..._params }).then(res => {
if (res.code !== 1000) {
history.goBack();
return;
}
const { data } = res;
setSignupMembers(data);
}) })
} }
useEffect(() => {
fetchDataSource();
}, [])
return ( return (
<div className={styles.warp}> <div className={styles.warp}>
<div className={styles.header}> <div className={styles.header}>
<ArrowLeftOutlined className={styles.goBack} onClick={() => history.goBack()} /> <ArrowLeftOutlined className={styles.goBack} onClick={() => history.goBack()} />
<div className={styles.title}>进口头层黄牛皮荔枝纹竞价</div> <div className={styles.title}>{dataSource?.details}</div>
</div> </div>
<div className={styles.layout}> <div className={styles.layout}>
<Row gutter={[8, 8]}> <Row gutter={[8, 8]}>
<Col span={6}> <Col span={6}>
<RankItem detail={detailData} /> <RankItem detail={{ dynamic, queryPriceDynamics, signupMembers }} />
</Col> </Col>
<Col span={18}> <Col span={18}>
<Row gutter={[8, 8]} style={{ marginBottom: '8px' }}> <Row gutter={[8, 8]} style={{ marginBottom: '8px' }}>
...@@ -42,11 +98,11 @@ const Management = () => { ...@@ -42,11 +98,11 @@ const Management = () => {
<QuotationDeskLayout /> <QuotationDeskLayout />
</Col> </Col>
<Col span={8}> <Col span={8}>
<StatusBox detail={detailData} /> <StatusBox detail={dataSource} />
</Col> </Col>
</Row> </Row>
<Row> <Row>
<BidDetailLayout detail={detailData} /> <BidDetailLayout detail={dataSource} />
</Row> </Row>
</Col> </Col>
</Row> </Row>
......
...@@ -98,6 +98,7 @@ const ReadyConfirm = () => { ...@@ -98,6 +98,7 @@ const ReadyConfirm = () => {
record={confirmRecord} record={confirmRecord}
title="确认竞价结果" title="确认竞价结果"
visible={confirmBidResultVisible} visible={confirmBidResultVisible}
fetch={PublicApi.postPurchaseBiddingStayConfirmBidding}
onCancel={() => setConfirmBidResultVisible(false)} onCancel={() => setConfirmBidResultVisible(false)}
onOk={() => {ref.current.reload()}} onOk={() => {ref.current.reload()}}
/> />
......
...@@ -78,9 +78,9 @@ const ReadyExamineResultOne = () => { ...@@ -78,9 +78,9 @@ const ReadyExamineResultOne = () => {
const fetchSubmitBatch = async (id?: number) => { const fetchSubmitBatch = async (id?: number) => {
let res = null; let res = null;
if (id) { if (id) {
res = await PublicApi.postPurchaseQuotedPriceSubmit({ id }); res = await PublicApi.postPurchaseBiddingSubmitBidding1({ id, state: 1 });
} else { } else {
res = await PublicApi.postPurchaseQuotedPriceSubmitBatch({ ids: rowkeys }); res = await PublicApi.postPurchaseBiddingSubmitBidding1Batch({ ids: rowkeys });
} }
if (res.code === 1000) { if (res.code === 1000) {
ref.current.reload(); ref.current.reload();
...@@ -93,6 +93,11 @@ const ReadyExamineResultOne = () => { ...@@ -93,6 +93,11 @@ const ReadyExamineResultOne = () => {
setVisible(!visible); setVisible(!visible);
} }
const handleSubmit = () => {
setVisible(false);
ref.current.reload();
}
return ( return (
<> <>
<Table <Table
...@@ -123,7 +128,8 @@ const ReadyExamineResultOne = () => { ...@@ -123,7 +128,8 @@ const ReadyExamineResultOne = () => {
title="单据审核" title="单据审核"
modalType="audit" modalType="audit"
visible={visible} visible={visible}
fetch={PublicApi.postPurchaseBiddingExamine1} fetch={PublicApi.postPurchaseBiddingSubmitBidding1}
onOk={() => handleSubmit()}
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
/> />
</> </>
......
...@@ -79,9 +79,9 @@ const ReadyExamineResultTwo = () => { ...@@ -79,9 +79,9 @@ const ReadyExamineResultTwo = () => {
const fetchSubmitBatch = async (id?: number) => { const fetchSubmitBatch = async (id?: number) => {
let res = null; let res = null;
if (id) { if (id) {
res = await PublicApi.postPurchaseQuotedPriceSubmit({ id }); res = await PublicApi.postPurchaseBiddingSubmitBidding2({ id, state: 1 });
} else { } else {
res = await PublicApi.postPurchaseQuotedPriceSubmitBatch({ ids: rowkeys }); res = await PublicApi.postPurchaseBiddingSubmitBidding2Batch({ ids: rowkeys });
} }
if (res.code === 1000) { if (res.code === 1000) {
ref.current.reload(); ref.current.reload();
...@@ -94,6 +94,11 @@ const ReadyExamineResultTwo = () => { ...@@ -94,6 +94,11 @@ const ReadyExamineResultTwo = () => {
setVisible(!visible); setVisible(!visible);
} }
const handleSubmit = () => {
setVisible(false);
ref.current.reload();
}
return ( return (
<> <>
<Table <Table
...@@ -124,7 +129,8 @@ const ReadyExamineResultTwo = () => { ...@@ -124,7 +129,8 @@ const ReadyExamineResultTwo = () => {
title="单据审核" title="单据审核"
modalType="audit" modalType="audit"
visible={visible} visible={visible}
fetch={PublicApi.postPurchaseBiddingExamine1} fetch={PublicApi.postPurchaseBiddingSubmitBidding2}
onOk={() => handleSubmit()}
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
/> />
</> </>
......
...@@ -32,17 +32,17 @@ const transforType = { ...@@ -32,17 +32,17 @@ const transforType = {
const TABLINK = [ const TABLINK = [
{ id: 'progressLayout', title: '流转进度' }, { id: 'progressLayout', title: '流转进度' },
{ id: 'bidResultLayout', title: '竞价结果', include: ['search', 'readyAdd'] }, { id: 'bidResultLayout', title: '竞价结果', include: ['search', 'readyAdd','readyBid'] },
{ id: 'basicLayout', title: '基本信息' }, { id: 'basicLayout', title: '基本信息' },
{ id: 'materialLayout', title: '采购物料', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit'] }, { id: 'materialLayout', title: '采购物料', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit','readySubmitExamineResult','readyBid','readyExamineResultOne','readyExamineResultTwo','readyConfirm'] },
{ id: 'bidRulesLayout', title: '竞价规则', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit'] }, { id: 'bidRulesLayout', title: '竞价规则', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit','readySubmitExamineResult','readyBid','readyExamineResultOne','readyExamineResultTwo','readyConfirm'] },
{ id: 'signUpLayout', title: '报名要求', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit', 'readyExamineSignUp'] }, { id: 'signUpLayout', title: '报名要求', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit', 'readyExamineSignUp','readySubmitExamineResult','readyBid','readyExamineResultOne','readyExamineResultTwo','readyConfirm'] },
{ id: 'signUpMsgLayout', title: '报名信息', include: ['search', 'readyAdd', 'readyExamineSignUp'] }, { id: 'signUpMsgLayout', title: '报名信息', include: ['search', 'readyAdd', 'readyExamineSignUp','readySubmitExamineResult','readyBid','readyExamineResultOne','readyExamineResultTwo','readyConfirm'] },
{ id: 'signUpFileLayout', title: '报名文件', include: ['readyExamineSignUp'] }, { id: 'signUpFileLayout', title: '报名文件', include: ['readyBid','readyExamineSignUp'] },
{ id: 'conditionLayout', title: '交易条件', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit'] }, { id: 'conditionLayout', title: '交易条件', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit','readySubmitExamineResult','readyBid','readyExamineResultOne','readyExamineResultTwo','readyConfirm'] },
{ id: 'fileLayout', title: '附件', include: ['search', 'readyAdd'] }, { id: 'fileLayout', title: '附件', include: ['search', 'readyAdd','readySubmitExamineResult','readyBid','readyExamineResultOne','readyExamineResultTwo','readyConfirm'] },
{ id: 'demandLayout', title: '需求对接', include: ['search', 'readyAdd'] }, { id: 'demandLayout', title: '需求对接', include: ['search', 'readyAdd','readyBid'] },
{ id: 'resultLayout', title: '授标结果', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit'] }, { id: 'resultLayout', title: '授标结果', include: ['search', 'readyAdd', 'readyExamineOne', 'readyExamineTwo', 'readySubmit','readySubmitExamineResult','readyBid','readyExamineResultOne','readyExamineResultTwo','readyConfirm'] },
{ id: 'recordLyout', title: '流转记录' }, { id: 'recordLyout', title: '流转记录' },
] ]
...@@ -231,7 +231,10 @@ const SearchDetail = () => { ...@@ -231,7 +231,10 @@ const SearchDetail = () => {
current: '1', current: '1',
pageSize: '1' pageSize: '1'
} }
await PublicApi.getPurchaseBiddingDetails({ ...params }).then(res => {
const _fetch = pathPci === 'readySubmitExaminResult' ? PublicApi.getPurchaseBiddingStaySubmitDetails : PublicApi.getPurchaseBiddingDetails
await _fetch({ ...params }).then(res => {
if (res.code !== 1000) { if (res.code !== 1000) {
history.goBack(); history.goBack();
return; return;
...@@ -319,10 +322,10 @@ const SearchDetail = () => { ...@@ -319,10 +322,10 @@ const SearchDetail = () => {
fetchSoure = PublicApi.postPurchaseBiddingExaminBiddingSignup fetchSoure = PublicApi.postPurchaseBiddingExaminBiddingSignup
break; break;
case 'readyExamineResultOne': case 'readyExamineResultOne':
fetchSoure = PublicApi.postPurchasePurchaseInquiryCommit fetchSoure = PublicApi.postPurchaseBiddingSubmitBidding1
break; break;
case 'readyExamineResultTwo': case 'readyExamineResultTwo':
fetchSoure = PublicApi.postPurchasePurchaseInquiryCommit fetchSoure = PublicApi.postPurchaseBiddingSubmitBidding2
break; break;
} }
return fetchSoure return fetchSoure
...@@ -332,6 +335,7 @@ const SearchDetail = () => { ...@@ -332,6 +335,7 @@ const SearchDetail = () => {
switch (pathPci) { switch (pathPci) {
case 'search': case 'search':
case 'readyAdd': case 'readyAdd':
case 'readyBid':
return ( return (
<BidCommonLayout layoutId="bidResultLayout" title="竞价结果" effect={ <BidCommonLayout layoutId="bidResultLayout" title="竞价结果" effect={
[ [
...@@ -360,6 +364,11 @@ const SearchDetail = () => { ...@@ -360,6 +364,11 @@ const SearchDetail = () => {
case 'readyExamineOne': case 'readyExamineOne':
case 'readyExamineTwo': case 'readyExamineTwo':
case 'readySubmit': case 'readySubmit':
case 'readySubmitExamineResult':
case 'readyBid':
case 'readyExamineResultOne':
case 'readyExamineResultTwo':
case 'readyConfirm':
return ( return (
<MaterialLayout <MaterialLayout
id={id} id={id}
...@@ -379,6 +388,11 @@ const SearchDetail = () => { ...@@ -379,6 +388,11 @@ const SearchDetail = () => {
case 'readyExamineOne': case 'readyExamineOne':
case 'readyExamineTwo': case 'readyExamineTwo':
case 'readySubmit': case 'readySubmit':
case 'readySubmitExamineResult':
case 'readyBid':
case 'readyExamineResultOne':
case 'readyExamineResultTwo':
case 'readyConfirm':
return (<BidCommonLayout layoutId="bidRulesLayout" title="竞价规则" effect={rulesEffect} />) return (<BidCommonLayout layoutId="bidRulesLayout" title="竞价规则" effect={rulesEffect} />)
default: default:
return null; return null;
...@@ -393,6 +407,11 @@ const SearchDetail = () => { ...@@ -393,6 +407,11 @@ const SearchDetail = () => {
case 'readyExamineTwo': case 'readyExamineTwo':
case 'readySubmit': case 'readySubmit':
case 'readyExamineSignUp': case 'readyExamineSignUp':
case 'readySubmitExamineResult':
case 'readyBid':
case 'readyExamineResultOne':
case 'readyExamineResultTwo':
case 'readyConfirm':
return (<BidCommonLayout layoutId="signUpLayout" title="报名要求" effect={signUpEffect} />) return (<BidCommonLayout layoutId="signUpLayout" title="报名要求" effect={signUpEffect} />)
default: default:
return null; return null;
...@@ -403,6 +422,11 @@ const SearchDetail = () => { ...@@ -403,6 +422,11 @@ const SearchDetail = () => {
switch (pathPci) { switch (pathPci) {
case 'search': case 'search':
case 'readyAdd': case 'readyAdd':
case 'readySubmitExamineResult':
case 'readyBid':
case 'readyExamineResultOne':
case 'readyExamineResultTwo':
case 'readyConfirm':
return (<BidCommonLayout layoutId="signUpMsgLayout" title="报名信息" layoutType='msg' effect={dataSource.sginUpInfos || []} />) return (<BidCommonLayout layoutId="signUpMsgLayout" title="报名信息" layoutType='msg' effect={dataSource.sginUpInfos || []} />)
case 'readyExamineSignUp': case 'readyExamineSignUp':
let _data : any = {}; let _data : any = {};
...@@ -453,6 +477,11 @@ const SearchDetail = () => { ...@@ -453,6 +477,11 @@ const SearchDetail = () => {
case 'readyExamineOne': case 'readyExamineOne':
case 'readyExamineTwo': case 'readyExamineTwo':
case 'readySubmit': case 'readySubmit':
case 'readySubmitExamineResult':
case 'readyBid':
case 'readyExamineResultOne':
case 'readyExamineResultTwo':
case 'readyConfirm':
return (<BidCommonLayout layoutId="conditionLayout" title="交易条件" effect={conditionEffect} />) return (<BidCommonLayout layoutId="conditionLayout" title="交易条件" effect={conditionEffect} />)
default: default:
return null; return null;
...@@ -463,6 +492,11 @@ const SearchDetail = () => { ...@@ -463,6 +492,11 @@ const SearchDetail = () => {
switch (pathPci) { switch (pathPci) {
case 'search': case 'search':
case 'readyAdd': case 'readyAdd':
case 'readySubmitExamineResult':
case 'readyBid':
case 'readyExamineResultOne':
case 'readyExamineResultTwo':
case 'readyConfirm':
return ( return (
<BidCommonLayout layoutId="fileLayout" title="附件" effect={ <BidCommonLayout layoutId="fileLayout" title="附件" effect={
[ [
...@@ -483,6 +517,7 @@ const SearchDetail = () => { ...@@ -483,6 +517,7 @@ const SearchDetail = () => {
switch (pathPci) { switch (pathPci) {
case 'search': case 'search':
case 'readyAdd': case 'readyAdd':
case 'readyBid':
return ( return (
<DemandLayout <DemandLayout
bidId={id} bidId={id}
...@@ -508,6 +543,11 @@ const SearchDetail = () => { ...@@ -508,6 +543,11 @@ const SearchDetail = () => {
case 'readyExamineOne': case 'readyExamineOne':
case 'readyExamineTwo': case 'readyExamineTwo':
case 'readySubmit': case 'readySubmit':
case 'readySubmitExamineResult':
case 'readyBid':
case 'readyExamineResultOne':
case 'readyExamineResultTwo':
case 'readyConfirm':
return ( return (
<BidCommonLayout <BidCommonLayout
layoutId="resultLayout" layoutId="resultLayout"
...@@ -559,6 +599,8 @@ const SearchDetail = () => { ...@@ -559,6 +599,8 @@ const SearchDetail = () => {
record={dataSource} record={dataSource}
visible={confirmBidResultVisible} visible={confirmBidResultVisible}
onCancel={() => setConfirmBidResultVisible(false)} onCancel={() => setConfirmBidResultVisible(false)}
fetch={PublicApi.postPurchaseBiddingStayConfirmBidding}
onOk={() => history.goBack()}
/> />
<SubmitResultModal <SubmitResultModal
title="提交竞价结果" title="提交竞价结果"
......
import { ISchema } from '@formily/antd' import { ISchema } from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const' import { FORM_FILTER_PATH } from '@/formSchema/const'
import { PublicApi } from '@/services/api'
import { FILTEREXTERNALBIDSTATE, FILTERINTERNALBIDSTATE } from '../constants/onlineBid'
/** 在线竞价 - 采购竞价单查询 */ /** 在线竞价 - 采购竞价单查询 */
export const ONLINEBIDORDER_SCHEMA: ISchema = { export const ONLINEBIDORDER_SCHEMA: ISchema = {
...@@ -74,7 +72,7 @@ export const ONLINEBIDORDER_SCHEMA: ISchema = { ...@@ -74,7 +72,7 @@ export const ONLINEBIDORDER_SCHEMA: ISchema = {
width: 160 width: 160
} }
}, },
enum: FILTEREXTERNALBIDSTATE enum: []
}, },
interiorState: { interiorState: {
type: 'string', type: 'string',
...@@ -84,7 +82,7 @@ export const ONLINEBIDORDER_SCHEMA: ISchema = { ...@@ -84,7 +82,7 @@ export const ONLINEBIDORDER_SCHEMA: ISchema = {
width: 160 width: 160
} }
}, },
enum: FILTERINTERNALBIDSTATE enum: []
}, },
} }
}, },
......
import { ISchema} from '@formily/antd' import { ISchema} from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const' import { FORM_FILTER_PATH } from '@/formSchema/const'
import { PublicApi } from '@/services/api'
import { FILTEREXTERNALBIDSTATE, FILTERINTERNALBIDSTATE } from '../constants/purchaseBid'
/** 采购竞价 - 采购竞价单查询 */ /** 采购竞价 - 采购竞价单查询 */
export const PURCHASEBIDORDER_SCHEMA: ISchema = { export const PURCHASEBIDORDER_SCHEMA: ISchema = {
...@@ -68,7 +66,7 @@ export const PURCHASEBIDORDER_SCHEMA: ISchema = { ...@@ -68,7 +66,7 @@ export const PURCHASEBIDORDER_SCHEMA: ISchema = {
width: 160 width: 160
} }
}, },
enum: FILTEREXTERNALBIDSTATE enum: []
}, },
interiorState: { interiorState: {
type: 'string', type: 'string',
...@@ -78,7 +76,7 @@ export const PURCHASEBIDORDER_SCHEMA: ISchema = { ...@@ -78,7 +76,7 @@ export const PURCHASEBIDORDER_SCHEMA: ISchema = {
width: 160 width: 160
} }
}, },
enum: FILTERINTERNALBIDSTATE enum: []
}, },
} }
}, },
......
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