3.9 供应商关联关系疑似违规行为

This commit is contained in:
jl-zhoujl2
2023-03-09 10:34:20 +08:00
parent 51fc9b5edf
commit 3f202700e5
15 changed files with 929 additions and 191 deletions

View File

@ -7,7 +7,7 @@ import { routerRedux } from 'dva/router';
import React, { useState, useEffect, useReducer } from 'react';
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 { getLeader, isShowResult, isShowCount, getErrorStatus, getRiskStatus, isShowRiskModal, saveConfirm, isLeaderConfirm } from './service';
import logo from '@/images/opening/logo.svg'
import InstantMessage from './components/InstantMessage'
import { DownOutlined, UserOutlined, UserSwitchOutlined, CarryOutOutlined, HomeOutlined } from '@ant-design/icons';
@ -17,6 +17,7 @@ import {
ExclamationCircleOutlined
} from '@ant-design/icons';
import { getRoomDataById } from '@/services/common';
import RiskModal from '../RiskModal';
const BiddingRoom = (props) => {
//获取采购方式
@ -34,6 +35,10 @@ const BiddingRoom = (props) => {
//获取评审室id
const roomId = getRoomId();
const [list, setList] = useState();
//风险提示文字弹窗控制
const [riskVisible, setRiskVisible] = useState(false);
//评审结果提示文字还是进入评审室提示文字
const [isResult, setIsResult] = useState(false);
const [selectedPath, setSelectedPath] = useState(window.location.pathname.replace('ReviewResults/Jury', 'ReviewResults').replace('ReviewResults/GroupLeader', 'ReviewResults'));
// const [risky, riskySet] = useState();
//字段类型(两种) 评标,评审
@ -56,7 +61,7 @@ const BiddingRoom = (props) => {
},
{
id: 2,
path: "/EvaRoom/Eva",
path: "/EvaRoom/Eva/",
text: `${sectionTypeThree}进展`
},
{
@ -97,7 +102,7 @@ const BiddingRoom = (props) => {
},
{
id: 2,
path: "/EvaRoom/Eva",
path: "/EvaRoom/Eva/",
text: sectionTypeTwo
},
{
@ -137,7 +142,7 @@ const BiddingRoom = (props) => {
},
{
id: 2,
path: "/EvaRoom/Eva",
path: "/EvaRoom/Eva/",
text: "项目评审"
},
{
@ -234,12 +239,19 @@ const BiddingRoom = (props) => {
//专家角色评审结果路由确定
const expertClickResult = async () => {
return await getLeader(roomId).then(res => {
return await getLeader(roomId).then(async res => {
if (res?.code == 200) {
if (res?.data == "Review") {
return "/EvaRoom/Evaluation/expert/ReviewResults/Jury"
} else {
return "/EvaRoom/Evaluation/expert/ReviewResults/GroupLeader"
const result = await isLeaderConfirm({ assessRoomId: roomId });//供应商股权关系-专家组长是否确认风险
if (result?.success && result?.data) {
return "/EvaRoom/Evaluation/expert/ReviewResults/GroupLeader"
} else {
setIsResult(true)
setRiskVisible(true)
return false;
}
}
} else {
return false
@ -283,6 +295,33 @@ const BiddingRoom = (props) => {
return true //默认显示算术错误调整
}
//判断当前登录人是否弹出供应商关联风险信息
const showRiskModal = async (resultClick) => {
if (role == "ebtp-agency-project-manager" || role == "ebtp-purchase" || role == "ebtp-expert") {
return await isShowRiskModal({ assessRoomId: roomId }).then(res => {
if (res?.code == 200 && res?.success) {
if (!res?.data) {
setIsResult(resultClick)
setRiskVisible(true)
}
return res?.data;
}
return true;
})
}
return true;
}
//确认风险
const confirmRisk = async () => {
return await saveConfirm({ assessRoomId: roomId }).then(res => {
if (res?.code == 200) {
return res?.data;
} else {
return false;
}
})
}
//初始化数据
const listRender = async () => {
// await isRisky();
@ -304,7 +343,8 @@ const BiddingRoom = (props) => {
JuryList.splice(5, 1)
}
}
//弹出供应商关联风险信息
await showRiskModal(false)
//代理&项目经理
if (role == "ebtp-agency-project-manager" || role == "ebtp-purchase") {//代理和采购经理
setList(managerList);
@ -343,8 +383,8 @@ const BiddingRoom = (props) => {
key={item.id}
style={{
width: '100000px',
color: selectedPath == item.path ? "#FFFFFF" : "#b30000",
background: selectedPath == item.path ? "#b30000" : "#FFFFFF"
color: selectedPath == item.path || (item.path === '/EvaRoom/Eva/' && selectedPath.includes('/EvaRoom/Eva/')) ? "#FFFFFF" : "#b30000",
background: selectedPath == item.path || (item.path === '/EvaRoom/Eva/' && selectedPath.includes('/EvaRoom/Eva/')) ? "#b30000" : "#FFFFFF"
}}
onClick={() => { onclick(item.path, item.id) }}
>
@ -358,6 +398,7 @@ const BiddingRoom = (props) => {
})}
</div>
</div>
{riskVisible && <RiskModal modalVisible={riskVisible} onCancel={() => { setRiskVisible(false); setSelectedPath(window.location.pathname) }} onSubmit={confirmRisk} isResult={isResult} role={role} />}
{(MethodDict != "procurement_mode_5" && MethodDict != "procurement_mode_6") && role == "ebtp-supplier" ? null : <InstantMessage />}
</div>
);