3.9 供应商关联关系疑似违规行为
This commit is contained in:
53
src/components/RiskModal/index.tsx
Normal file
53
src/components/RiskModal/index.tsx
Normal 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;
|
Reference in New Issue
Block a user