增加开关

This commit is contained in:
zhangyx
2022-06-17 15:28:43 +08:00
parent aebd034175
commit d9606092cf

View File

@ -14,11 +14,16 @@ const BidDocSmartCheckFormModal: React.FC<BidDocSmartCheckFormModalProps> = (pro
const [bidDocSmartCheckList, setBidDocSmartCheckList] = useState([]);
//查看详情窗口record
const [juryTableShow, setJuryTableShow] = useState<boolean>(true);//
const [juryTableShow, setJuryTableShow] = useState<boolean>(true);
//是否显示法人及投标人名称对比结果;false-不显示结果true-显示结果
const [checkLegalAndNameResult, setCheckLegalAndNameResult] = useState<boolean>(true);
var roleId = getSessionRoleData().roleCode;
useEffect(() => {
setJuryTableShow(false);
getWarningList();
if (roleId === "ebtp-expert") {
setJuryTableShow(false);
@ -29,13 +34,24 @@ const BidDocSmartCheckFormModal: React.FC<BidDocSmartCheckFormModalProps> = (pro
//getSessionUserData.roleIds;
}
function visibleValue(key: any) {
//1 是 0 否
if (key) {
return <span style={{ color: 'green' }}></span>;
} else {
return <span style={{ color: 'red' }}>×</span>;
}
}
function visibleLegalAndNameValue(key: any) {
//false-不显示结果true-显示结果
if (checkLegalAndNameResult) {
if (key) {
return <span style={{ color: 'green' }}></span>;
} else {
return <span style={{ color: 'red' }}>×</span>;
}
} else {
return <span></span>;
}
}
const BidDocSmartCheckColumns = [
{ title: '序号', dataIndex: 'num', width: 60, render: (text: any, record: any, index: any) => `${index + 1}` },
@ -55,10 +71,10 @@ const BidDocSmartCheckFormModal: React.FC<BidDocSmartCheckFormModalProps> = (pro
return visibleValue(record.ensureStatus);
}},
{ title: '不同投标人间法定代表人、法定代表授权委托人对比', dataIndex: 'supplierLegalCheck', render: (_: any, record: any) => {
return visibleValue(record.supplierLegalCheck);
return visibleLegalAndNameValue(record.supplierLegalCheck);
}},
{ title: '投标人名称与系统操作投标人名称', dataIndex: 'supplierNameCheck', render: (_: any, record: any) => {
return visibleValue(record.supplierNameCheck);
return visibleLegalAndNameValue(record.supplierNameCheck);
}},
];
@ -70,7 +86,11 @@ const BidDocSmartCheckFormModal: React.FC<BidDocSmartCheckFormModalProps> = (pro
//投标文件智能审查
await getBidDocSmartCheckList(roomId).then((res) => {
if (res.success == true) {
setBidDocSmartCheckList(res.data)
setCheckLegalAndNameResult(res?.data?.isCheckLegalAndName);
if(res?.data?.isCheckOpen){
setJuryTableShow(true);
setBidDocSmartCheckList(res.data?.checkResults)
}
} else {
setBidDocSmartCheckList(ret.data);
}