2022-03-10 14:24:13 +08:00
|
|
|
import { Divider, Button, Form, Card, Tabs, Table, Tooltip, Input, Select, Row, Col, message, Modal, Avatar, Tag, } from 'antd';
|
2021-01-16 11:29:42 +08:00
|
|
|
import { Link, history } from 'umi';
|
2020-12-23 11:14:35 +08:00
|
|
|
import './index.less';
|
2022-03-10 14:24:13 +08:00
|
|
|
import styles from './index.less';
|
2020-12-23 11:14:35 +08:00
|
|
|
import { connect } from "dva";
|
|
|
|
import { routerRedux } from 'dva/router';
|
|
|
|
import React, { useState, useEffect, useReducer } from 'react';
|
2022-03-10 14:24:13 +08:00
|
|
|
import { getSessionUserData, getRoomId, getProMethod, getSessionRoleData, getIPassDecode, getDefId, getProId } from '@/utils/session';
|
|
|
|
import { getURLInformation } from '@/utils/CommonUtils';
|
|
|
|
import { getLeader, isShowResult, isShowCount, getErrorStatus, getRiskStatus } from './service';
|
|
|
|
import logo from '@/images/opening/logo.svg'
|
|
|
|
import InstantMessage from './components/InstantMessage'
|
|
|
|
import { DownOutlined, UserOutlined, UserSwitchOutlined, CarryOutOutlined, HomeOutlined } from '@ant-design/icons';
|
|
|
|
import moment from 'moment'
|
|
|
|
import {
|
|
|
|
CheckCircleOutlined,
|
|
|
|
ExclamationCircleOutlined
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
import { getRoomDataById } from '@/services/common';
|
2021-01-16 11:29:42 +08:00
|
|
|
|
2022-03-10 14:24:13 +08:00
|
|
|
const BiddingRoom = (props) => {
|
|
|
|
//获取采购方式
|
|
|
|
const MethodDict = getProMethod();
|
|
|
|
//获取业务id
|
|
|
|
const defId = getDefId();
|
|
|
|
//获取项目id
|
|
|
|
const tpId = getProId();
|
|
|
|
//获取角色
|
|
|
|
const role = getSessionRoleData().roleCode;
|
|
|
|
//是否使用ipass解密
|
|
|
|
const IPassDecode = getIPassDecode();
|
|
|
|
//获取用户数据
|
|
|
|
let data = getSessionUserData();
|
|
|
|
//获取评审室id
|
2021-01-16 11:29:42 +08:00
|
|
|
const roomId = getRoomId();
|
2022-03-10 14:24:13 +08:00
|
|
|
const [list, setList] = useState();
|
|
|
|
const [selectedPath, setSelectedPath] = useState(window.location.pathname.replace('ReviewResults/Jury', 'ReviewResults').replace('ReviewResults/GroupLeader', 'ReviewResults'));
|
|
|
|
const [risky, riskySet] = useState();
|
|
|
|
//字段类型(两种) 评标,评审
|
|
|
|
let sectionTypeTwo = MethodDict == "procurement_mode_1" || MethodDict == "procurement_mode_2" ? "评标" : "评审"
|
|
|
|
//字段类型(三种) 评标,评审,谈判
|
|
|
|
let sectionTypeThree = MethodDict == "procurement_mode_1" || MethodDict == "procurement_mode_2" ? "评标" : MethodDict == "procurement_mode_5" || MethodDict == "procurement_mode_6" ? "谈判" : "评审"
|
|
|
|
//应答字段类型 评标,应答
|
|
|
|
let responseType = MethodDict == "procurement_mode_1" || MethodDict == "procurement_mode_2" ? "投标" : "应答"
|
|
|
|
//项目经理-澄清说明不显示的流程
|
|
|
|
const NoClarification = ['bid_prequalification', 'bid_qualification', 'bid_centralized_prequalification', 'bid_centralized_prequalification_bid', 'bid_invitation', 'comparison_one_prequalification', 'comparison_one', 'recruit', 'recruit_multi']
|
|
|
|
//项目经理-招标类流程 公开招标资格预审 公开招标资格后审 邀请招标 公开比选一阶段资格预审 公开比选一阶段资格后审
|
|
|
|
const isBidProcess = defId == 'bid_prequalification' || defId == 'bid_qualification' || defId == 'bid_invitation' || defId == 'comparison_one_prequalification' || defId == 'comparison_one'
|
|
|
|
let className = styles.right;
|
|
|
|
//项目经理角色
|
|
|
|
let managerList = [
|
2021-01-16 11:29:42 +08:00
|
|
|
{
|
|
|
|
id: 1,
|
2022-03-10 14:24:13 +08:00
|
|
|
path: "/EvaRoom",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "基本信息"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 2,
|
2022-03-10 14:24:13 +08:00
|
|
|
path: "/EvaRoom/Eva",
|
|
|
|
text: `${sectionTypeThree}进展`
|
2021-01-16 11:29:42 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 3,
|
2022-03-10 14:24:13 +08:00
|
|
|
path: "/EvaRoom/Evaluation/BidControl/BidControlManager",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "风险点展示"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 4,
|
2022-03-10 14:24:13 +08:00
|
|
|
path: "/EvaRoom/BiddingDocumentsDecrypt",
|
|
|
|
text: `${responseType}文件查看`
|
2021-01-16 11:29:42 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 5,
|
2022-03-10 14:24:13 +08:00
|
|
|
path: "/EvaRoom/BidAbnormal",
|
|
|
|
text: `${sectionTypeThree}异常`
|
2021-01-16 11:29:42 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 6,
|
2022-03-10 14:24:13 +08:00
|
|
|
path: "/EvaRoom/Clarify/Evaluation/projectManager/ClarificationOfTheBid",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "澄清说明"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 7,
|
2022-03-10 14:24:13 +08:00
|
|
|
path: "/EvaRoom/ReportPrint",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "报表打印"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 8,
|
2022-03-10 14:24:13 +08:00
|
|
|
path: "/EvaRoom/Evaluation/projectManager/ReviewResults/Manager",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "评审结果"
|
|
|
|
}]
|
|
|
|
let JuryList = [
|
|
|
|
{
|
2022-03-10 14:24:13 +08:00
|
|
|
id: 1,
|
|
|
|
path: "/EvaRoom",
|
|
|
|
text: "基本信息"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 2,
|
2021-01-16 11:29:42 +08:00
|
|
|
path: "/EvaRoom/Eva",
|
2022-03-10 14:24:13 +08:00
|
|
|
text: sectionTypeTwo
|
2021-01-16 11:29:42 +08:00
|
|
|
},
|
|
|
|
{
|
2022-03-10 14:24:13 +08:00
|
|
|
id: 3,
|
2021-01-16 11:29:42 +08:00
|
|
|
path: "/EvaRoom/BiddingDocumentsDecrypt",
|
2022-03-10 14:24:13 +08:00
|
|
|
text: `${responseType}文件查看`
|
2021-01-16 11:29:42 +08:00
|
|
|
},
|
|
|
|
{
|
2022-03-10 14:24:13 +08:00
|
|
|
id: 4,
|
|
|
|
path: "/EvaRoom/Evaluation/BidControl/Jury",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "风险点展示"
|
|
|
|
},
|
2022-03-10 14:24:13 +08:00
|
|
|
// {
|
|
|
|
// id: 5,
|
|
|
|
// path: "",
|
|
|
|
// text: `辅助${sectionTypeTwo}`
|
|
|
|
// },
|
2021-01-16 11:29:42 +08:00
|
|
|
{
|
2022-03-10 14:24:13 +08:00
|
|
|
id: 6,
|
|
|
|
path: "/EvaRoom/Clarify/Evaluation/expert/ClarificationOfTheBid",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "澄清说明"
|
|
|
|
},
|
|
|
|
{
|
2022-03-10 14:24:13 +08:00
|
|
|
id: 7,
|
|
|
|
path: "/EvaRoom/Evaluation/BidEnd/BidEndAdjust",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "算数错误调整"
|
|
|
|
},
|
|
|
|
{
|
2022-03-10 14:24:13 +08:00
|
|
|
id: 8,
|
|
|
|
path: '/EvaRoom/Evaluation/expert/ReviewResults',
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "评审结果",
|
|
|
|
}]
|
2022-03-10 14:24:13 +08:00
|
|
|
let supplierList = [{
|
|
|
|
id: 1,
|
|
|
|
path: "/EvaRoom",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "基本信息"
|
2020-12-23 11:14:35 +08:00
|
|
|
},
|
|
|
|
{
|
2022-03-10 14:24:13 +08:00
|
|
|
id: 2,
|
|
|
|
path: "/EvaRoom/Eva",
|
2021-01-16 11:29:42 +08:00
|
|
|
text: "项目评审"
|
2020-12-23 11:14:35 +08:00
|
|
|
},
|
|
|
|
{
|
2022-03-10 14:24:13 +08:00
|
|
|
id: 3,
|
|
|
|
path: "/EvaRoom/FileDecode",
|
|
|
|
text: `${responseType}文件解密`
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 4,
|
|
|
|
path: "/EvaRoom/Clarify/Evaluation/supplier/ChallengeListInTheIndex",
|
|
|
|
text: "澄清说明"
|
2020-12-23 11:14:35 +08:00
|
|
|
}]
|
2021-01-16 11:29:42 +08:00
|
|
|
|
2022-03-10 14:24:13 +08:00
|
|
|
useEffect(() => {
|
|
|
|
listRender();
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
//风险点展示获取是否有风险
|
|
|
|
async function isRisky() {
|
|
|
|
await getRiskStatus({ assessRoomId: roomId, tpId: tpId }).then((res) => {
|
|
|
|
if (res.code == 200) {
|
|
|
|
if (res?.data) {
|
|
|
|
riskySet(
|
|
|
|
<Tooltip title="当前存在风险项">
|
|
|
|
<ExclamationCircleOutlined style={{ color: 'rgb(250,173,20)', position: 'absolute', fontSize: 26, top: 12 }} />
|
|
|
|
</Tooltip>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
//评审结果页签点击事件
|
|
|
|
const onclick = async (path, id) => {
|
|
|
|
if ((role == 'ebtp-agency-project-manager' || role == 'ebtp-purchase') && id == 8) { //代理&采购经理进入评审结果
|
|
|
|
const success = await isClickResult();
|
|
|
|
if (success) {
|
|
|
|
history.push({ pathname: path });
|
|
|
|
setSelectedPath(path);
|
|
|
|
} else {
|
|
|
|
message.info("未到评审结果环节,无法进入评审结果")
|
|
|
|
}
|
|
|
|
} else if (role == 'ebtp-expert' && id == 8) {//专家进入评审结果
|
|
|
|
const success = await isClickResult();
|
|
|
|
if (success) {
|
|
|
|
const resultPath = await expertClickResult();
|
|
|
|
if (resultPath) {
|
|
|
|
history.push({ pathname: resultPath });
|
|
|
|
setSelectedPath(path);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
message.info("未到评审结果环节,无法进入评审结果")
|
|
|
|
}
|
|
|
|
} else if ((role == 'ebtp-agency-project-manager' || role == 'ebtp-purchase' || role == 'ebtp-expert') && id == 2) {//代理&采购经理进入评审进展 专家进入评审
|
|
|
|
const success = await isClickProgress();
|
|
|
|
if (success) {
|
|
|
|
history.push({ pathname: path });
|
|
|
|
setSelectedPath(path);
|
|
|
|
} else {
|
|
|
|
if (role == 'ebtp-expert') {
|
|
|
|
message.info(`未开始${sectionTypeTwo}`)
|
|
|
|
} else {
|
|
|
|
message.info(`请开始${sectionTypeTwo}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (role == 'ebtp-expert' && id == 7) {//专家进入算术错误调整
|
|
|
|
const process = await isClickProgress();
|
|
|
|
if (process) {
|
|
|
|
const success = await isClickCount();
|
|
|
|
if (success) {
|
|
|
|
history.push({ pathname: path });
|
|
|
|
setSelectedPath(path);
|
|
|
|
} else {
|
|
|
|
message.info("无操作权限")
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
message.info(`未开始${sectionTypeTwo}`)
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
history.push({ pathname: path });
|
|
|
|
setSelectedPath(path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//调用接口判断评审结果是否可以点击
|
|
|
|
const isClickResult = async () => {
|
|
|
|
return await isShowResult(roomId).then(res => {
|
|
|
|
if (res?.code == 200) {
|
|
|
|
const data = res?.data
|
|
|
|
return data?.flowFinish
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
//专家角色评审结果路由确定
|
|
|
|
const expertClickResult = async () => {
|
|
|
|
return await getLeader(roomId).then(res => {
|
|
|
|
if (res?.code == 200) {
|
|
|
|
if (res?.data == "Review") {
|
|
|
|
return "/EvaRoom/Evaluation/expert/ReviewResults/Jury"
|
|
|
|
} else {
|
|
|
|
return "/EvaRoom/Evaluation/expert/ReviewResults/GroupLeader"
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
})
|
2020-12-23 11:14:35 +08:00
|
|
|
}
|
2022-03-10 14:24:13 +08:00
|
|
|
|
|
|
|
//调用接口判断评审进展(代理&采购经理)是否可以进入
|
|
|
|
//true-可以进入 false-不可以
|
|
|
|
const isClickProgress = async () => {
|
|
|
|
return await getRoomDataById(roomId).then(res => {
|
|
|
|
if (res?.code == 200) {
|
|
|
|
const data = res?.data
|
|
|
|
return data?.juryConfigStatus == 1
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
//调用接口判断算术错误调整(专家&专家组长)是否可以进入
|
|
|
|
//true-可以进入 false-不可以
|
|
|
|
const isClickCount = async () => {
|
|
|
|
return await isShowCount(roomId).then(res => {
|
|
|
|
if (res?.code == 200) {
|
|
|
|
const data = res?.data
|
|
|
|
return res?.data
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
//判断是否显示算数错误调整
|
|
|
|
const isShowCountFC = async () => {
|
|
|
|
//公开招标资格预审 公开招标资格后审 邀请招标 公开比选一阶段资格预审 公开比选一阶段资格后审
|
|
|
|
if (isBidProcess) {
|
|
|
|
//根据评审配置的是否显示算数错误调整判定
|
|
|
|
return await getErrorStatus(roomId).then(res => {
|
|
|
|
if (res?.code == 200 && res?.success == true) {
|
|
|
|
return res?.data == 1 || res?.data == 2
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
return true //默认显示算术错误调整
|
|
|
|
}
|
|
|
|
|
|
|
|
//初始化数据
|
|
|
|
const listRender = async () => {
|
|
|
|
await isRisky();
|
|
|
|
//供应商是否用ipass解密判断
|
|
|
|
IPassDecode == 0 ? null : supplierList.splice(2, 1)
|
|
|
|
//供应商是否显示评审进展判断(招标类不显示)
|
|
|
|
isBidProcess ? supplierList.splice(1, 1) : null
|
|
|
|
//项目经理澄清说明判断
|
|
|
|
NoClarification.findIndex(item => item == defId) == -1 ? null : managerList.splice(5, 1)
|
|
|
|
//专家算数错误调整判断
|
|
|
|
let roomType = '2'
|
|
|
|
getURLInformation('roomType') == undefined ? roomType = '2' : roomType = getURLInformation('roomType')
|
|
|
|
sessionStorage.setItem("roomType", roomType)//roomType存入session
|
|
|
|
if (MethodDict == "procurement_mode_7" || MethodDict == "procurement_mode_4") {//询价,招募不显示算术错误调整
|
|
|
|
JuryList.splice(5, 1)
|
|
|
|
} else {
|
|
|
|
const success = await isShowCountFC()
|
|
|
|
if (success) { } else {
|
|
|
|
JuryList.splice(5, 1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//代理&项目经理
|
|
|
|
if (role == "ebtp-agency-project-manager" || role == "ebtp-purchase") {//代理和采购经理
|
|
|
|
setList(managerList);
|
|
|
|
} else if (role == "ebtp-expert") {//专家
|
|
|
|
setList(JuryList)
|
|
|
|
} else if (role == "ebtp-supplier") {//供应商
|
|
|
|
setList(supplierList);
|
|
|
|
} else { //其他未分配的角色
|
|
|
|
setList(managerList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-23 11:14:35 +08:00
|
|
|
return (
|
2022-03-10 14:24:13 +08:00
|
|
|
<div>
|
|
|
|
<div className={styles.header}>
|
|
|
|
<div className={styles.headerAlign} style={{ position: "absolute", left: "0", fontSize: "16px", fontWeight: "600" }}>
|
|
|
|
<img src={logo} style={{ height: "30px", marginRight: "10px", position: 'relative', top: '-2px' }} />招标采购中心 | 电子{sectionTypeThree}室
|
|
|
|
</div>
|
|
|
|
<ul className={styles.rightBtns}>
|
|
|
|
<li><CarryOutOutlined />{moment().format("YYYY-MM-DD")}</li>
|
|
|
|
{data?.organizationName == null ? null : (<li><UserSwitchOutlined />{data.organizationName}</li>)}
|
|
|
|
<li>
|
|
|
|
<Avatar size="small" src="https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png" style={{ width: '30px' }} />
|
|
|
|
<a className="antd-dropdown-link" style={{ color: "#fff", marginRight: "36px" }}>
|
|
|
|
{data.fullName}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div className="myselfBar">
|
|
|
|
<div className="tablist">
|
|
|
|
{list?.map(item => {
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className="tab"
|
|
|
|
key={item.id}
|
|
|
|
style={{
|
|
|
|
width: '100000px',
|
|
|
|
color: selectedPath == item.path ? "#FFFFFF" : "#b30000",
|
|
|
|
background: selectedPath == item.path ? "#b30000" : "#FFFFFF"
|
|
|
|
}}
|
|
|
|
onClick={() => { onclick(item.path, item.id) }}
|
|
|
|
>
|
|
|
|
{item.text}
|
|
|
|
{/* {
|
|
|
|
(item.path === '/EvaRoom/Evaluation/BidControl/Jury' || item.path === '/EvaRoom/Evaluation/BidControl/BidControlManager') && risky &&
|
|
|
|
<> {risky}</>
|
|
|
|
} */}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
})}
|
|
|
|
</div>
|
2021-01-16 11:29:42 +08:00
|
|
|
</div>
|
2022-03-10 14:24:13 +08:00
|
|
|
{(MethodDict != "procurement_mode_5" && MethodDict != "procurement_mode_6") && role == "ebtp-supplier" ? null : <InstantMessage />}
|
2020-12-23 11:14:35 +08:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2021-01-16 11:29:42 +08:00
|
|
|
export default BiddingRoom;
|