2021-01-16 11:29:42 +08:00
|
|
|
import React, { useEffect, useState } from 'react';
|
|
|
|
import { Tabs } from 'antd';
|
2020-12-23 11:14:35 +08:00
|
|
|
import First from './components/first';
|
2022-03-10 14:24:13 +08:00
|
|
|
import FirstMain from './components/firstMain';
|
2020-12-23 11:14:35 +08:00
|
|
|
import Detailed from './components/detailed';
|
2022-03-10 14:24:13 +08:00
|
|
|
import DetailedMain from './components/detailedMain';
|
2021-01-16 11:29:42 +08:00
|
|
|
import { getURLInformation } from '@/utils/CommonUtils'
|
|
|
|
import { getBizInfo } from './service'
|
2022-03-10 14:24:13 +08:00
|
|
|
import './style.less';
|
2020-12-23 11:14:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
const Config: React.FC<{}> = () => {
|
|
|
|
const { TabPane } = Tabs;
|
|
|
|
//控制展示页
|
2022-03-10 14:24:13 +08:00
|
|
|
const callback = (key: string) => {
|
|
|
|
showSet(key)
|
2020-12-23 11:14:35 +08:00
|
|
|
}
|
2022-03-10 14:24:13 +08:00
|
|
|
const [method, methodSet] = useState<any>(false)// true false 不显示
|
|
|
|
const [show, showSet] = useState<any>('1')//
|
2021-01-16 11:29:42 +08:00
|
|
|
useEffect(() => {
|
|
|
|
let bizId = ''
|
|
|
|
let commonId: any = "";
|
|
|
|
if (getURLInformation("id") != null) {
|
|
|
|
commonId = getURLInformation("id")
|
|
|
|
}
|
2022-03-10 14:24:13 +08:00
|
|
|
let secId: any = '';
|
|
|
|
if (getURLInformation("secId") != null) {
|
|
|
|
secId = getURLInformation("secId");
|
|
|
|
bizId = secId;
|
|
|
|
}
|
|
|
|
let roomType: any = '';
|
|
|
|
if (getURLInformation("roomType") != null) {
|
|
|
|
roomType = getURLInformation("roomType");
|
2021-01-16 11:29:42 +08:00
|
|
|
}
|
|
|
|
//查评分办法和采购方式
|
2025-07-30 15:07:09 +08:00
|
|
|
getBizInfo(bizId).then((res) => {
|
|
|
|
let methodT = false;
|
|
|
|
if (res.code == 200) {
|
|
|
|
const data = res.data;
|
|
|
|
console.log("data",data)
|
|
|
|
if (roomType == '2') {
|
|
|
|
data.evalMethodDict === 'eval_method_2' ? methodT = true : null;//评分办法 1最低价 2综合评估
|
|
|
|
}
|
|
|
|
data.ptcpMode === 'ptcp_mode_2' ? methodT = true : null;//采购方式 1合格制 2有限数量制
|
|
|
|
}
|
|
|
|
methodSet(methodT);
|
|
|
|
});
|
2021-01-16 11:29:42 +08:00
|
|
|
|
|
|
|
}, [])
|
|
|
|
return (
|
2022-03-10 14:24:13 +08:00
|
|
|
<div key='confogDiv1'>
|
|
|
|
<Tabs defaultActiveKey="1" onChange={callback} size={"large"} className='configDiv'>
|
|
|
|
<TabPane tab="初审设置" key="1" >
|
|
|
|
{show == '1' && <FirstMain show={show} />}
|
2021-01-16 11:29:42 +08:00
|
|
|
</TabPane>
|
2022-03-10 14:24:13 +08:00
|
|
|
{
|
|
|
|
method &&
|
2020-12-23 11:14:35 +08:00
|
|
|
<TabPane tab="详审设置" key="2">
|
2022-03-10 14:24:13 +08:00
|
|
|
{show == '2' && <DetailedMain show={show} />}
|
2020-12-23 11:14:35 +08:00
|
|
|
</TabPane>
|
2021-01-16 11:29:42 +08:00
|
|
|
}
|
|
|
|
</Tabs>
|
|
|
|
</div>
|
2020-12-23 11:14:35 +08:00
|
|
|
)
|
|
|
|
}
|
|
|
|
export default Config;
|