4.20 供应商股权穿透

This commit is contained in:
jl-zhoujl2
2023-04-20 09:14:56 +08:00
parent 0fb2e66c24
commit fed8c612ec
9 changed files with 279 additions and 16 deletions

View File

@ -3,9 +3,9 @@ import EquityRelation from "@/components/EquityRelation";
import { getURLInformation } from "@/utils/CommonUtils";
import { getRoomId, getSessionProjectData, getSessionRoleData } from "@/utils/session";
import { ExclamationCircleOutlined } from "@ant-design/icons";
import ProTable, { EditableProTable, ProColumns } from "@ant-design/pro-table";
import { Button, Collapse, message, Modal, Spin, Typography } from "antd";
import React, { Fragment, useEffect, useState } from "react";
import ProTable, { ActionType, EditableProTable, ProColumns } from "@ant-design/pro-table";
import { Button, Collapse, Form, message, Modal, Radio, RadioChangeEvent, Spin, Typography } from "antd";
import React, { Fragment, useEffect, useRef, useState } from "react";
import { getSuspectedViolation, leaderConfirm } from "../service";
/**
@ -15,10 +15,10 @@ import { getSuspectedViolation, leaderConfirm } from "../service";
*/
const ZhiQiCha: React.FC<{}> = (props) => {
const title_style = { color: "#b30000", fontWeight: 700 };
// const options = [
// { label: '确认无风险', value: 0 },
// { label: '确认有风险', value: 1 },
// ];
const options = [
{ label: '全部否', value: "0" },
{ label: '全部是', value: "1" },
];
//是否展开智企查疑似关联关系
const defaultZQCKey = getURLInformation('n') == '1' ? ['zhiqicha'] : []
const { Paragraph, Text } = Typography;
@ -43,11 +43,16 @@ const ZhiQiCha: React.FC<{}> = (props) => {
// const [radioValue, setRadioValue] = useState<string>("");
//loading
const [loading, setLoading] = useState<boolean>(true);
//多选用
const [value1, setValue1] = useState(null);
const [value2, setValue2] = useState(null);
const [form] = Form.useForm();
const columns: ProColumns<any>[] = [
{
title: <Text strong>A</Text>,
editable: false,
width: "20%",
render: (_: any, record: any) => (
<span>{record.supplierA.name}</span>
),
@ -55,6 +60,7 @@ const ZhiQiCha: React.FC<{}> = (props) => {
{
title: <Text strong>B</Text>,
editable: false,
width: "20%",
render: (_: any, record: any) => (
<span>{record.supplierB.name}</span>
),
@ -62,6 +68,7 @@ const ZhiQiCha: React.FC<{}> = (props) => {
{
title: <Text strong></Text>,
editable: false,
width: "10%",
render: (_: any, record: any) => (
<span>{record.typeDesc}</span>
),
@ -70,26 +77,35 @@ const ZhiQiCha: React.FC<{}> = (props) => {
title: <Text strong></Text>,
dataIndex: 'relationFlag',
key: 'relationFlag',
width: "15%",
valueType: 'radio',
valueEnum: {
"0": { text: '否' },
"1": { text: '是' },
},
fieldProps: {
onChange: () => { setValue1(null) }
}
},
{
title: <Text strong></Text>,
dataIndex: 'riskFlag',
key: 'riskFlag',
width: "15%",
valueType: 'radio',
valueEnum: {
"0": { text: '否' },
"1": { text: '是' },
},
fieldProps: {
onChange: () => { setValue2(null) }
}
},
{
title: <Text strong></Text>,
dataIndex: 'memo',
key: 'memo',
width: "20%",
tooltip: "一行中存在至少一项选择【否】,当前行的说明必须填写",
fieldProps: {
maxLength: 100,
@ -150,8 +166,8 @@ const ZhiQiCha: React.FC<{}> = (props) => {
setIsLeader(resp?.data == "ReviewLeader");
}
setWarningsData(res?.data);
setSupplierTableData(res?.data?.riskSupplier != null ? res?.data?.riskSupplier?.map((item: any) => { item.riskFlag = String(item.riskFlag); item.relationFlag = String(item.relationFlag); return item }) : []);
setIsRisk(res?.data?.riskSupplier != null);
setSupplierTableData(res?.data?.riskSupplier != null && res?.data?.riskSupplier.length > 0 ? res?.data?.riskSupplier?.map((item: any) => { item.riskFlag = String(item.riskFlag); item.relationFlag = String(item.relationFlag); return item }) : []);
setIsRisk(res?.data?.riskSupplier != null && res?.data?.riskSupplier.length > 0);
// form.setFieldsValue(res?.data);
}
}).finally(() => {
@ -229,6 +245,29 @@ const ZhiQiCha: React.FC<{}> = (props) => {
onCancel() { },
});
}
const onChange1 = ({ target: { value } }: RadioChangeEvent) => {
setValue1(value);
const data = JSON.parse(JSON.stringify(supplierTableData));//深拷贝
const obj = {};
for (let i = 0, l = data.length; i < l; i++) {
data[i].relationFlag = value;
obj[data[i].id] = { relationFlag: value };
}
form.setFieldsValue(obj);
setSupplierTableData(data);
};
const onChange2 = ({ target: { value } }: RadioChangeEvent) => {
setValue2(value);
const data = JSON.parse(JSON.stringify(supplierTableData));//深拷贝
const obj = {};
for (let i = 0, l = data.length; i < l; i++) {
data[i].riskFlag = value;
obj[data[i].id] = { riskFlag: value };
}
form.setFieldsValue(obj);
setSupplierTableData(data);
};
useEffect(() => {
getZQCData();
}, [])
@ -273,7 +312,13 @@ const ZhiQiCha: React.FC<{}> = (props) => {
{isRisk && <>
{isLeader && <Fragment>
<div style={{ margin: "10px 0 20px" }}>
<h3 className="first-title" style={title_style}></h3>
<h3 className="first-title" style={{ ...title_style, display: "flex", justifyContent: "space-between" }}>
<span></span>
{warningsData?.headmanConfirmStatus != "1" && <div style={{ marginRight: "20%" }}>
<span style={{ color: "#000", marginRight: "8px" }}></span><Radio.Group options={options} onChange={onChange1} value={value1} />
<span style={{ color: "#000", marginRight: "8px", marginLeft: "20px" }}></span><Radio.Group options={options} onChange={onChange2} value={value2} />
</div>}
</h3>
<EditableProTable
rowKey="id"
// 关闭默认的新建按钮
@ -282,6 +327,7 @@ const ZhiQiCha: React.FC<{}> = (props) => {
value={supplierTableData}
editable={{
type: 'multiple',
form: form,
editableKeys: warningsData?.headmanConfirmStatus == "1" ? [] : supplierTableData.map(item => item.id),
// onChange: setEditableRowKeys,
onValuesChange: (record, recordList) => {

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import ViewRishFormModal from './components/ViewRishFormModal';
import ViewQuoteWarningFormModal from './components/ViewQuoteWarningFormModal';
import ViewBlacklistFormModal from './components/ViewBlacklistFormModal';
@ -9,7 +9,8 @@ import ViewRiskSupplierModal from './components/ViewRiskSupplierModal';
import BidDocSmartCheckFormModal from './components/BidDocSmartCheckFormModal';
import ViewEvalFormModal from './components/ViewEvalFormModal';
import ZhiQiCha from './components/ZhiQiCha';
import { getDefId } from '@/utils/session';
import { getDefId, getRoomId, getSessionProjectData } from '@/utils/session';
import { getSuspectedViolation } from './service';
const Sing: React.FC<{}> = () => {
//ip mac
@ -57,10 +58,28 @@ const Sing: React.FC<{}> = () => {
const [ViewEvalCheckValues, setViewEvalCheckValues] = useState<any>({});
//获取流程id
const defId = getDefId();
//是否显示智企查
const [isShowZQC, setIsShowZQC] = useState<boolean>(false);
useEffect(() => {
const tpId = getSessionProjectData()?.id;
const sectionId = sessionStorage.getItem("sectionId");
const assessRoomId = getRoomId();
const openTime = sessionStorage.getItem("openTime");//获取评审开始时间
getSuspectedViolation({ tpId, sectionId, assessRoomId }).then(res => {//查询是否有风险2023年3月31日之前的无风险项目屏蔽掉此功能
if (res?.success) {
if (!(res?.data?.riskSupplier != null && res?.data?.riskSupplier.length > 0) && openTime && (openTime < "2023-03-31 23:59:59")) {
setIsShowZQC(false);
} else {
setIsShowZQC(true);
}
}
});
}, [])
return (
<>
{/**智企查-供应商关联关系疑似违规行为 */}
{((defId != "negotiation_single") && (defId != "recruit_multi") && (defId != "inquiry")) && <ZhiQiCha />}
{((defId != "negotiation_single") && (defId != "recruit_multi") && (defId != "inquiry") && isShowZQC) && <ZhiQiCha />}
{
ViewRishFormModal ? (
<ViewRishFormModal

View File

@ -7,7 +7,8 @@ import ViewReviewResultFormModal from '../BidControlManager/components/ViewRevie
import ViewJuryScoringAnalysisFormModal from '../BidControlManager/components/ViewJuryScoringAnalysisFormModal';
import ViewJuryScoringRemindFormModal from '../BidControlManager/components/ViewJuryScoringRemindFormModal';
import ZhiQiCha from '../BidControlManager/components/ZhiQiCha';
import { getDefId } from '@/utils/session';
import { getDefId, getRoomId, getSessionProjectData } from '@/utils/session';
import { getSuspectedViolation } from '../BidControlManager/service';
function callback(key) {
//getSessionUserData.roleIds;
@ -41,6 +42,24 @@ const Sing: React.FC<{}> = () => {
const [ViewJuryScoringAnalysisValues, setViewJuryScoringAnalysisValues] = useState<any>({});
//获取流程id
const defId = getDefId();
//是否显示智企查
const [isShowZQC, setIsShowZQC] = useState<boolean>(false);
useEffect(() => {
const tpId = getSessionProjectData()?.id;
const sectionId = sessionStorage.getItem("sectionId");
const assessRoomId = getRoomId();
const openTime = sessionStorage.getItem("openTime");//获取评审开始时间
getSuspectedViolation({ tpId, sectionId, assessRoomId }).then(res => {//查询是否有风险2023年3月31日之前的无风险项目屏蔽掉此功能
if (res?.success) {
if (!(res?.data?.riskSupplier != null && res?.data?.riskSupplier.length > 0) && openTime && (openTime < "2023-03-31 23:59:59")) {
setIsShowZQC(false);
} else {
setIsShowZQC(true);
}
}
});
}, [])
const getWarningList = async () => {
@ -48,7 +67,7 @@ const Sing: React.FC<{}> = () => {
return (
<>
{/**智企查-供应商关联关系疑似违规行为 */}
{((defId != "negotiation_single") && (defId != "recruit_multi")) && <ZhiQiCha />}
{((defId != "negotiation_single") && (defId != "recruit_multi") && (defId != "inquiry") && isShowZQC) && <ZhiQiCha />}
{//投标文件制作地址日志信息查看
ViewRishFormModal ? (
<ViewRishFormModal