3.22 供应商关联关系3.15版
This commit is contained in:
@ -4,7 +4,7 @@ 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, Col, Collapse, Form, Input, message, Modal, Radio, RadioChangeEvent, Row, Spin, Typography } from "antd";
|
||||
import { Button, Collapse, message, Modal, Spin, Typography } from "antd";
|
||||
import React, { Fragment, useEffect, useState } from "react";
|
||||
import { getSuspectedViolation, leaderConfirm } from "../service";
|
||||
|
||||
@ -15,16 +15,16 @@ 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;
|
||||
const { TextArea } = Input;
|
||||
// const { TextArea } = Input;
|
||||
const { confirm } = Modal;
|
||||
const [form] = Form.useForm();
|
||||
// const [form] = Form.useForm();
|
||||
//项目id 标段id 评审室id
|
||||
const projectId = getSessionProjectData()?.id;
|
||||
const sessionId = sessionStorage.getItem("sectionId");
|
||||
@ -40,21 +40,46 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
//是否有风险
|
||||
const [isRisk, setIsRisk] = useState<boolean>(false);//true-有风险 false-无风险
|
||||
//radio选择
|
||||
const [radioValue, setRadioValue] = useState<string>("");
|
||||
// const [radioValue, setRadioValue] = useState<string>("");
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
|
||||
const columns: ProColumns<any>[] = [
|
||||
{
|
||||
title: <Text strong>供应商</Text>,
|
||||
dataIndex: 'companyName',
|
||||
key: 'companyName',
|
||||
title: <Text strong>供应商A</Text>,
|
||||
editable: false,
|
||||
render: (_: any, record: any) => (
|
||||
<span>{record.supplierA.name}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Text strong>是否有风险</Text>,
|
||||
dataIndex: 'isRisk',
|
||||
key: 'isRisk',
|
||||
title: <Text strong>供应商B</Text>,
|
||||
editable: false,
|
||||
render: (_: any, record: any) => (
|
||||
<span>{record.supplierB.name}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Text strong>关系类型</Text>,
|
||||
editable: false,
|
||||
render: (_: any, record: any) => (
|
||||
<span>{record.typeDesc}关系</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Text strong>关联信息是否准确</Text>,
|
||||
dataIndex: 'relationFlag',
|
||||
key: 'relationFlag',
|
||||
valueType: 'radio',
|
||||
valueEnum: {
|
||||
"0": { text: '否' },
|
||||
"1": { text: '是' },
|
||||
},
|
||||
},
|
||||
{
|
||||
title: <Text strong>是否被认定为风险</Text>,
|
||||
dataIndex: 'riskFlag',
|
||||
key: 'riskFlag',
|
||||
valueType: 'radio',
|
||||
valueEnum: {
|
||||
"0": { text: '否' },
|
||||
@ -65,7 +90,7 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
title: <Text strong>说明</Text>,
|
||||
dataIndex: 'memo',
|
||||
key: 'memo',
|
||||
tooltip: "此项为选填",
|
||||
tooltip: "一行中存在至少一项选择【否】,当前行的说明必须填写",
|
||||
fieldProps: {
|
||||
maxLength: 100,
|
||||
}
|
||||
@ -73,16 +98,38 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
];
|
||||
const readOnlyColumns: ProColumns<any>[] = [
|
||||
{
|
||||
title: <Text strong>供应商</Text>,
|
||||
dataIndex: 'companyName',
|
||||
key: 'companyName',
|
||||
title: <Text strong>供应商A</Text>,
|
||||
render: (_: any, record: any) => (
|
||||
<span>{record?.supplierA.name}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Text strong>是否有风险</Text>,
|
||||
dataIndex: 'isRisk',
|
||||
key: 'isRisk',
|
||||
title: <Text strong>供应商B</Text>,
|
||||
render: (_: any, record: any) => (
|
||||
<span style={{ color: record.isRisk == 1 ? "red" : "" }}>{record.isRisk == 1 ? "是" : record.isRisk == 0 ? "否" : "-"}</span>
|
||||
<span>{record?.supplierB.name}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Text strong>关系类型</Text>,
|
||||
editable: false,
|
||||
render: (_: any, record: any) => (
|
||||
<span>{record.typeDesc}关系</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Text strong>关联信息是否准确</Text>,
|
||||
dataIndex: 'relationFlag',
|
||||
key: 'relationFlag',
|
||||
render: (_: any, record: any) => (
|
||||
<span style={{ color: record.relationFlag == 1 ? "" : "red" }}>{record.relationFlag == 1 ? "是" : record.relationFlag == 0 ? "否" : "-"}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Text strong>是否被认定为风险</Text>,
|
||||
dataIndex: 'riskFlag',
|
||||
key: 'riskFlag',
|
||||
render: (_: any, record: any) => (
|
||||
<span style={{ color: record.riskFlag == 1 ? "" : "red" }}>{record.riskFlag == 1 ? "是" : record.riskFlag == 0 ? "否" : "-"}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
@ -106,9 +153,9 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
setIsLeader(resp?.data == "ReviewLeader");
|
||||
}
|
||||
setWarningsData(res?.data);
|
||||
setSupplierTableData(res?.data?.riskSupplier != null ? res?.data?.riskSupplier.supplist?.map((item: any) => { item.isRisk = String(item.isRisk); return item }) : []);
|
||||
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);
|
||||
form.setFieldsValue(res?.data);
|
||||
// form.setFieldsValue(res?.data);
|
||||
}
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
@ -116,8 +163,9 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
}
|
||||
//专家组长保存
|
||||
const handleSave = () => {
|
||||
let values = form.getFieldsValue();
|
||||
values["riskSupplier"] = { supplist: supplierTableData };
|
||||
let values = {};
|
||||
values["id"] = warningsData?.id;
|
||||
values["riskSupplier"] = [...supplierTableData];
|
||||
values["headmanConfirmStatus"] = "0";//保存参数
|
||||
setLoading(true);
|
||||
leaderConfirm(values).then(res => {//专家组长保存
|
||||
@ -131,54 +179,59 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
}
|
||||
//专家组长提交
|
||||
const handleSubmit = () => {
|
||||
form.validateFields().then(values => {
|
||||
let emptyItem = -1;
|
||||
let yesLength = 0;
|
||||
for (let i = 0, length = supplierTableData.length; i < length; i++) {
|
||||
const item = supplierTableData[i];
|
||||
if (item.isRisk == null) {
|
||||
emptyItem = i;
|
||||
break;
|
||||
}
|
||||
if (item.isRisk == "1") {
|
||||
yesLength += 1;
|
||||
}
|
||||
let values = {};
|
||||
let relationEmptyItem = -1;
|
||||
let riskEmptyItem = -1;
|
||||
let memoEmptyItem = -1;
|
||||
for (let i = 0, length = supplierTableData.length; i < length; i++) {
|
||||
const item = supplierTableData[i];
|
||||
if (item.relationFlag == null) {
|
||||
relationEmptyItem = i;
|
||||
break;
|
||||
} else if (item.riskFlag == null) {
|
||||
riskEmptyItem = i;
|
||||
break;
|
||||
} else if ((item.relationFlag == "0" || item.riskFlag == "0") && (item.memo == null || item.memo == "")) {
|
||||
memoEmptyItem = i;
|
||||
break;
|
||||
}
|
||||
if (emptyItem != -1) {
|
||||
message.warning(`供应商【${supplierTableData[emptyItem].companyName}】的【是否有风险】项未填写`);
|
||||
return;
|
||||
}
|
||||
if ((values.headmanConfirm == 1) && (yesLength == 0)) {
|
||||
message.warning("【确认有风险】情况下,需至少一家供应商的【是否有风险】项选择【是】");
|
||||
return;
|
||||
}
|
||||
values["riskSupplier"] = { supplist: supplierTableData };
|
||||
values["headmanConfirmStatus"] = "1";//确认参数
|
||||
confirm({
|
||||
title: '提交后不可修改,确认是否提交?',
|
||||
icon: <ExclamationCircleOutlined />,
|
||||
content: <></>,
|
||||
centered: true,
|
||||
okText: "是",
|
||||
cancelText: "否",
|
||||
onOk() {
|
||||
setLoading(true);
|
||||
return leaderConfirm(values).then(res => {//专家组长提交
|
||||
if (res?.success) {
|
||||
message.success("提交成功!");
|
||||
getZQCData();
|
||||
}
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
},
|
||||
onCancel() { },
|
||||
});
|
||||
}
|
||||
if (relationEmptyItem != -1) {
|
||||
message.warning(`供应商A【${supplierTableData[relationEmptyItem].supplierA.name}】与供应商B【${supplierTableData[relationEmptyItem].supplierB.name}】关联情况的【关联信息是否准确】项未填写`);
|
||||
return;
|
||||
}
|
||||
if (riskEmptyItem != -1) {
|
||||
message.warning(`供应商A【${supplierTableData[riskEmptyItem].supplierA.name}】与供应商B【${supplierTableData[riskEmptyItem].supplierB.name}】关联情况的【是否被认定为风险】项未填写`);
|
||||
return;
|
||||
}
|
||||
if (memoEmptyItem != -1) {
|
||||
message.warning(`供应商A【${supplierTableData[memoEmptyItem].supplierA.name}】与供应商B【${supplierTableData[memoEmptyItem].supplierB.name}】关联情况的【说明】项未填写`);
|
||||
return;
|
||||
}
|
||||
values["id"] = warningsData?.id;
|
||||
values["riskSupplier"] = [...supplierTableData];
|
||||
values["headmanConfirmStatus"] = "1";//确认参数
|
||||
confirm({
|
||||
title: '提交后不可修改,确认是否提交?',
|
||||
icon: <ExclamationCircleOutlined />,
|
||||
content: <></>,
|
||||
centered: true,
|
||||
okText: "是",
|
||||
cancelText: "否",
|
||||
onOk() {
|
||||
setLoading(true);
|
||||
return leaderConfirm(values).then(res => {//专家组长提交
|
||||
if (res?.success) {
|
||||
message.success("提交成功!");
|
||||
getZQCData();
|
||||
}
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
},
|
||||
onCancel() { },
|
||||
});
|
||||
}
|
||||
const onRadioChange = (e: RadioChangeEvent) => {
|
||||
setRadioValue(e.target.value);
|
||||
}
|
||||
useEffect(() => {
|
||||
getZQCData();
|
||||
}, [])
|
||||
@ -187,10 +240,10 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
<Collapse.Panel header="供应商关联关系疑似违规行为" key="zhiqicha">
|
||||
<Spin spinning={loading}>
|
||||
<Fragment>
|
||||
<h3 className="first-title" style={title_style}>供应商关联关系疑似违规行为</h3>
|
||||
<h3 className="first-title" style={title_style}>供应商疑似关联关系图</h3>
|
||||
<div style={{ display: "flex", justifyContent: "flex-start", alignItems: "flex-start" }}>
|
||||
<div style={{ width: "50vw" }}>
|
||||
<EquityRelation result={warningsData?.riskData} suppCodeList={isRisk ? warningsData?.riskSupplier?.supplist : []} />
|
||||
<EquityRelation result={warningsData?.riskData} suppCodeList={isRisk ? warningsData?.riskSupplier : []} />
|
||||
</div>
|
||||
<div style={{ width: "calc(50vw - 60px)", paddingLeft: "40px", paddingTop: "42px" }}>
|
||||
<Paragraph>
|
||||
@ -202,10 +255,10 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
<Paragraph>
|
||||
<Text strong>控股超过51%或股权关系分散的占股最大的股东都属于控股,请项目经理与评委给予注意!</Text>
|
||||
</Paragraph>
|
||||
{isRisk && (<Paragraph>
|
||||
{/* {isRisk && (<Paragraph>
|
||||
<Text strong>经智企查分析,{warningsData?.riskSupplier?.riskSuppInfoList?.map((item: any, index: any) => <Text strong>{index != 0 && <span>和</span>}<span style={{ color: "#f39800" }}>{item}</span></Text>)}存在疑似关联关系,具体见左图。</Text>
|
||||
</Paragraph>)}
|
||||
{isRisk && isLeader && (
|
||||
</Paragraph>)} */}
|
||||
{/* {isRisk && isLeader && (
|
||||
<Form layout="vertical" form={form} name="control-hooks">
|
||||
<Form.Item name="id" hidden>
|
||||
<Input />
|
||||
@ -216,22 +269,23 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
<Form.Item name="headmanConfirmDesc" label="说明" rules={[{ required: radioValue == "0", message: "请填写说明" }, { max: 200, message: "说明需少于200个字" }]} tooltip="确认风险的具体说明,选择【确认无风险】必须填写此项">
|
||||
<TextArea rows={6} readOnly={warningsData?.headmanConfirmStatus == "1"} />
|
||||
</Form.Item>
|
||||
</Form>)}
|
||||
</Form>)} */}
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
{isRisk && <>
|
||||
{isLeader && <Fragment>
|
||||
<div style={{ margin: "20px 0" }}>
|
||||
<div style={{ margin: "10px 0 20px" }}>
|
||||
<h3 className="first-title" style={title_style}>相关供应商关联情况汇总(参考)</h3>
|
||||
<EditableProTable
|
||||
rowKey="companyId"
|
||||
rowKey="id"
|
||||
// 关闭默认的新建按钮
|
||||
recordCreatorProps={false}
|
||||
columns={columns}
|
||||
value={supplierTableData}
|
||||
editable={{
|
||||
type: 'multiple',
|
||||
editableKeys: warningsData?.headmanConfirmStatus == "1" ? [] : supplierTableData.map(item => item.companyId),
|
||||
editableKeys: warningsData?.headmanConfirmStatus == "1" ? [] : supplierTableData.map(item => item.id),
|
||||
// onChange: setEditableRowKeys,
|
||||
onValuesChange: (record, recordList) => {
|
||||
setSupplierTableData(recordList);
|
||||
@ -239,13 +293,13 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ marginBottom: "20px", textAlign: "center" }}>
|
||||
<div style={{ marginBottom: "10px", textAlign: "center" }}>
|
||||
<Button key="save" onClick={handleSave} disabled={loading || warningsData?.headmanConfirmStatus == "1"} style={{ marginRight: 8 }}>保存</Button>
|
||||
<Button key="submit" type="primary" onClick={handleSubmit} disabled={loading || warningsData?.headmanConfirmStatus == "1"}>提交</Button>
|
||||
</div>
|
||||
</Fragment>}
|
||||
{(warningsData?.headmanConfirmStatus == "1") && !isLeader && <Fragment>
|
||||
<h3 className="first-title" style={title_style}>供应商关联关系确认情况</h3>
|
||||
{(warningsData?.headmanConfirmStatus == "1") && !isLeader && <div style={{ margin: "10px 0" }}>
|
||||
{/* <h3 className="first-title" style={title_style}>供应商关联关系确认情况</h3>
|
||||
<Form labelCol={{ flex: "42px" }} form={form} name="control-hooks">
|
||||
<Form.Item name="headmanConfirm">
|
||||
<Radio.Group options={options} disabled />
|
||||
@ -253,17 +307,17 @@ const ZhiQiCha: React.FC<{}> = (props) => {
|
||||
<Form.Item name="headmanConfirmDesc" label="说明">
|
||||
<TextArea autoSize readOnly bordered={false} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<h3 className="first-title" style={title_style}>专家确认股权关联关系疑似违规情况汇总表</h3>
|
||||
</Form> */}
|
||||
<h3 className="first-title" style={title_style}>相关供应商关联情况汇总(参考)</h3>
|
||||
<ProTable
|
||||
rowKey="companyId"
|
||||
rowKey="id"
|
||||
pagination={false}
|
||||
search={false}
|
||||
options={false}
|
||||
columns={readOnlyColumns}
|
||||
dataSource={supplierTableData}
|
||||
/>
|
||||
</Fragment>}
|
||||
</div>}
|
||||
</>}
|
||||
</Spin>
|
||||
</Collapse.Panel>
|
||||
|
@ -60,7 +60,7 @@ const Sing: React.FC<{}> = () => {
|
||||
return (
|
||||
<>
|
||||
{/**智企查-供应商关联关系疑似违规行为 */}
|
||||
{((defId != "negotiation_single") && (defId != "recruit_multi")) && <ZhiQiCha />}
|
||||
{((defId != "negotiation_single") && (defId != "recruit_multi") && (defId != "inquiry")) && <ZhiQiCha />}
|
||||
{
|
||||
ViewRishFormModal ? (
|
||||
<ViewRishFormModal
|
||||
|
@ -542,12 +542,16 @@ const GroupLeader: React.FC = () => {
|
||||
}
|
||||
/**
|
||||
* 2022.5.9 zhoujianlong 增加MAC地址重复供应商不能将中标候选人选为‘是’的校验
|
||||
* 2023.3.22 zhoujianlong 增加供应商股权关系不能将中标候选人,拟中标人选为‘是’的校验
|
||||
*/
|
||||
if (!confirmSubmitStatus && record.problemInfoList != null) {
|
||||
let count = 0;
|
||||
let riskCount = 0;
|
||||
record.problemInfoList.forEach((ele: any) => {
|
||||
if (ele.problemType == 1) {//MAC地址重复
|
||||
count += 1;
|
||||
} else if (ele.problemType == 3) {//供应商股权关系风险
|
||||
riskCount += 1;
|
||||
}
|
||||
});
|
||||
if (count > 0) {
|
||||
@ -559,6 +563,15 @@ const GroupLeader: React.FC = () => {
|
||||
message.info(`${record.companyName}与其他供应商MAC地址相同,不可选为拟入围人`);
|
||||
record.winnerBidder = '0'
|
||||
}
|
||||
} else if (riskCount > 0) {
|
||||
if (record.winnerCandidate == 'yes') {
|
||||
message.info(`供应商【${record.companyName}】股权关联关系认定有风险,不可选为入围候选人`);
|
||||
record.winnerCandidate = 'no'
|
||||
}
|
||||
if (record.winnerBidder == '1') {
|
||||
message.info(`供应商【${record.companyName}】股权关联关系认定有风险,不可选为拟入围人`);
|
||||
record.winnerBidder = '0'
|
||||
}
|
||||
}
|
||||
}
|
||||
record.answerValid = valid
|
||||
@ -752,12 +765,16 @@ const GroupLeader: React.FC = () => {
|
||||
}
|
||||
/**
|
||||
* 2022.5.9 zhoujianlong 增加MAC地址重复供应商不能将中标候选人选为‘是’的校验
|
||||
* 2023.3.22 zhoujianlong 增加供应商股权关系不能将中标候选人,拟中标人选为‘是’的校验
|
||||
*/
|
||||
if (!confirmSubmitStatus && record.problemInfoList != null) {
|
||||
let count = 0;
|
||||
let riskCount = 0;
|
||||
record.problemInfoList.forEach((ele: any) => {
|
||||
if (ele.problemType == 1) {//MAC地址重复
|
||||
count += 1;
|
||||
} else if (ele.problemType == 3) {//供应商股权关系风险
|
||||
riskCount += 1;
|
||||
}
|
||||
});
|
||||
if (count > 0) {
|
||||
@ -769,6 +786,15 @@ const GroupLeader: React.FC = () => {
|
||||
message.info(`${record.companyName}与其他供应商MAC地址相同,不可选为拟${candidateType}人`);
|
||||
record.winnerBidder = '0'
|
||||
}
|
||||
} else if (riskCount > 0) {
|
||||
if (record.winnerCandidate == 'yes') {
|
||||
message.info(`供应商【${record.companyName}】股权关联关系认定有风险,不可选为${candidateType}候选人`);
|
||||
record.winnerCandidate = 'no'
|
||||
}
|
||||
if (record.winnerBidder == '1') {
|
||||
message.info(`供应商【${record.companyName}】股权关联关系认定有风险,不可选为拟${candidateType}人`);
|
||||
record.winnerBidder = '0'
|
||||
}
|
||||
}
|
||||
}
|
||||
record.answerValid = valid
|
||||
@ -975,12 +1001,16 @@ const GroupLeader: React.FC = () => {
|
||||
}
|
||||
/**
|
||||
* 2022.5.9 zhoujianlong 增加MAC地址重复供应商不能将中标候选人选为‘是’的校验
|
||||
* 2023.3.22 zhoujianlong 增加供应商股权关系不能将中标候选人,拟中标人选为‘是’的校验
|
||||
*/
|
||||
if (!confirmSubmitStatus && record.problemInfoList != null) {
|
||||
let count = 0;
|
||||
let riskCount = 0;
|
||||
record.problemInfoList.forEach((ele: any) => {
|
||||
if (ele.problemType == 1) {//MAC地址重复
|
||||
count += 1;
|
||||
} else if (ele.problemType == 3) {//供应商股权关系风险
|
||||
riskCount += 1;
|
||||
}
|
||||
});
|
||||
if (count > 0) {
|
||||
@ -988,6 +1018,11 @@ const GroupLeader: React.FC = () => {
|
||||
message.info(`${record.companyName}与其他供应商MAC地址相同,不可通过审核结果`);
|
||||
record.winnerCandidate = 'no'
|
||||
}
|
||||
} else if (riskCount > 0) {
|
||||
if (record.winnerCandidate == 'yes') {
|
||||
message.info(`供应商【${record.companyName}】股权关联关系认定有风险,不可通过审核结果`);
|
||||
record.winnerCandidate = 'no'
|
||||
}
|
||||
}
|
||||
}
|
||||
record.answerValid = valid
|
||||
|
Reference in New Issue
Block a user