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

@ -0,0 +1,53 @@
import React from 'react';
import { Button, Modal } from 'antd';
import { history } from 'umi';
interface RiskModalProps {
modalVisible: boolean;
onCancel: () => void;
onSubmit?: () => Promise<any>;//确认后调用接口
isResult: boolean;
role: string;
}
/**
* 供应商股权关系,风险弹窗
* @param props
* @returns
*/
const RiskModal: React.FC<RiskModalProps> = (props) => {
const { modalVisible, onCancel, isResult, role, onSubmit = () => Promise<any> } = props;
const onOk = async () => {
if (role == "ebtp-agency-project-manager" || role == "ebtp-purchase") {//代理或采购经理
if (!isResult) {
history.push('/EvaRoom/Evaluation/BidControl/BidControlManager?n=1');
}
} else if (role == "ebtp-expert") {//专家
history.push('/EvaRoom/Evaluation/BidControl/Jury?n=1');
}
if (!isResult) {
const result = await onSubmit();
if (result) onCancel();
} else {
onCancel();
}
}
return (
<Modal
destroyOnClose
visible={modalVisible}
onCancel={() => onCancel()}
bodyStyle={{ padding: '40px 40px 30px' }}
centered
maskClosable={false}
footer={null}
>
<div style={{ textAlign: 'center' }}>
<h3 style={{ fontWeight: 'bold', marginBottom: '20px' }}>{((role == "ebtp-agency-project-manager") && isResult) ? "供应商关联关系存在疑似违规行为,请确保专家组长已确认风险!" : "供应商关联关系存在疑似违规行为,请前往【风险点展示】界面查看风险!"}</h3>
<Button key='ok' type='primary' onClick={() => onOk()}></Button>
</div>
</Modal>
);
};
export default RiskModal;