Merge branch '20220523-公开比选一阶段二次项目,资格审查合格供应商为一家时可增加自定义流程' of http://gitlab.tianti.tg.unicom.local/eshop/fe_service_ebtp_frontend into 20220309-供应商关联关系疑似违规行为

This commit is contained in:
jl-zhoujl2
2023-03-09 14:16:14 +08:00
12 changed files with 228 additions and 150 deletions

View File

@ -4,7 +4,7 @@ import '@/assets/ld_style.less';
import { checkShowData, getSupplierScoreData } from '../service';
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
import { getProMethod, getRoomId } from '@/utils/session';
import { getURLInformation } from '@/utils/CommonUtils';
import { getURLInformation, isNotEmpty } from '@/utils/CommonUtils';
import ExtendUpload from '@/utils/ExtendUpload';
import MACAddressPrompt from '@/pages/Evaluation/BidControl/BidControlManager/components/MACAddressPrompt';
@ -32,6 +32,10 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
const [isShowFoot, setIsShowFoot] = useState<boolean>(false);
//说明文件fileId
const [fileId, setFileId] = useState<string>('');
//比选一阶段二次项目自定义评审流程单选数值存储
const [processValue, setProcessValue] = useState<number>();
//是否公开比选一阶段二次项目
const [isBxOneSecond, setIsBxOneSecond] = useState<boolean>(false);
//每页显示数量常量
const pageSize = 3;
const { TextArea } = Input;
@ -55,6 +59,10 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
const radioOnChange = (e: any) => {
setRadioValue(e.target.value);
};
//流程单选onChange方法
const processOnChange = (e: any) => {
setProcessValue(e.target.value);
};
//截取字符串方法
const getCaption = (obj: any) => {
var index = obj.lastIndexOf("\-");
@ -226,13 +234,15 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
};
const getFooterData = () => {
checkShowData(getRoomId()).then(response => {
checkShowData(getRoomId(), getURLInformation('nodeId')).then(response => {
if (response?.code == 200) {
if (response?.data == undefined) { } else {
setIsShowFoot(true)
setRadioValue(response.data?.continueStatus)
if (response.data?.continueStatus == 1) {
setFileId(response.data?.fileId)
setProcessValue(response?.data?.customizeFlowStatus);
setIsBxOneSecond(response?.data?.bxOneSecondProjectStatus);
form.setFieldsValue({
remarks: response.data?.remarks
})
@ -283,15 +293,22 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
{isShowFoot ? (
<div>
<div style={{ margin: '8px 0px' }}>
<span style={{ color: '#b30000' }}></span>
<span style={{ color: '#b30000' }}>{(isBxOneSecond && isNotEmpty(processValue)) ? '合格供应商仅一家,是否继续进行' : '合格供应商不足三家,是否继续进行详审'}</span>
<Radio.Group onChange={radioOnChange} value={radioValue} disabled>
<Radio value={1}></Radio>
<Radio value={0}></Radio>
</Radio.Group>
</div>
{isBxOneSecond && isNotEmpty(processValue) && <div style={{ margin: '8px 70px' }}>
<span style={{ color: '#b30000' }}></span>
<Radio.Group onChange={processOnChange} value={processValue} disabled>
<Radio value={1}></Radio>
<Radio value={0}></Radio>
</Radio.Group>
</div>}
<Form {...layout} form={form} name="control-hooks" validateMessages={validateMessages}>
<Form.Item name="remarks" label="说明" hidden={radioValue == 0}>
<TextArea maxLength={500} readOnly bordered={false} style={{ resize: 'none' }} />
<TextArea maxLength={500} readOnly bordered={false} autoSize />
</Form.Item>
<Form.Item name="fileId" label="说明文件" hidden={radioValue == 0}>
<ExtendUpload bid={fileId} uploadProps={{ disabled: true }} />

View File

@ -81,8 +81,8 @@ export function getAbstractVO(params: any) {
* 初审汇总表-提交汇总后回显少于三家判断数据
* @param params
*/
export async function checkShowData(params: any) {
return request(`/api/biz-service-ebtp-rsms/v1/bid/early/warn/room/${params}`, {
export async function checkShowData(params: any, nodeId: any) {
return request(`/api/biz-service-ebtp-rsms/v1/bid/early/warn/room/${params}?nodeId=${nodeId}`, {
method: 'GET'
})
}

View File

@ -13,10 +13,12 @@ interface BidPreliminarySummaryProps {
reload: any;
readOnly: boolean;
summaryRef: React.MutableRefObject<Array<{}> | undefined>
isBxOneSecond: boolean;
isNodeEnd: boolean;
}
const BidPreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
const { totalSupplier, onSubmit, reload, readOnly, summaryRef } = props;
const { totalSupplier, onSubmit, reload, readOnly, summaryRef, isBxOneSecond, isNodeEnd } = props;
//存储表
// const [scheduleTable, setScheduleTable] = useState<any>();
const [scheduleTable, setScheduleTable] = useState<boolean>(false);
@ -90,11 +92,7 @@ const BidPreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
count = count + 1;
}
});
if (count < 3 && res.data == true) {
onSubmit(true)
} else {
onSubmit(false)
}
onSubmit(count);
}
});
//调用数据处理方法并初始化表格
@ -298,16 +296,14 @@ const BidPreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
tableDataRef.current[tableDataRef.current.length - 1][ele.supplierRegisterId].judgesResult = !!e;
setTableDataSource([...tableDataRef.current])
if (isShowRef.current) {
let count = 0;
totalSupplier.forEach((ele: any) => {
if (tableDataRef.current[tableDataRef.current.length - 1][ele.supplierRegisterId].judgesResult) {
count = count + 1;
}
});
if (count < 3) {
onSubmit(true)
} else {
onSubmit(false)
if (isBxOneSecond && isNodeEnd) { } else {//公开比选一阶段二次项目 节点结束
let count = 0;
totalSupplier.forEach((ele: any) => {
if (tableDataRef.current[tableDataRef.current.length - 1][ele.supplierRegisterId].judgesResult) {
count = count + 1;
}
});
onSubmit(count);
}
}
}}

View File

@ -75,8 +75,14 @@ const Index: React.FC<{}> = () => {
const [uploadId, setUploadId] = useState<any>();
//单选数值存储
const [radioValue, setRadioValue] = useState<number>();
//是否显示合格供应商不足三家
const [isShowFoot, setIsShowFoot] = useState<boolean>(false);
//比选一阶段二次项目自定义评审流程单选数值存储
const [processValue, setProcessValue] = useState<number>();
//合格供应商数量
const [qualifyNumber, setQualifyNumber] = useState<number>(3);
//是否公开比选一阶段二次项目
const [isBxOneSecond, setIsBxOneSecond] = useState<boolean>(false);
//二次项目是否可编辑两个单选
const [isNodeEnd, setIsNodeEnd] = useState<boolean>(false);
//动态获取表单
const [form] = Form.useForm();
//当前页 初审详情
@ -91,6 +97,7 @@ const Index: React.FC<{}> = () => {
showNameT = { tbr: '投标人', pb: '评标', tb: '投标' };
} else {
showNameT = { tbr: '供应商', pb: '评审', tb: '应答' }
}
const columns: any[] = [ // 列表数据
@ -717,7 +724,7 @@ const Index: React.FC<{}> = () => {
}
const finalSubmit = async () => {
if (isShowFoot == true) {
if (qualifyNumber < 3) {
form.submit();
} else {
const remarkList = getRemarkList(ref.current)
@ -815,6 +822,10 @@ const Index: React.FC<{}> = () => {
const radioOnChange = (e: any) => {
setRadioValue(e.target.value);
};
//流程单选onChange方法
const processOnChange = (e: any) => {
setProcessValue(e.target.value);
};
//表单提交
const onFinish = async (values: any) => {
let data = {
@ -823,6 +834,12 @@ const Index: React.FC<{}> = () => {
if (radioValue == 1) {
data["remarks"] = values.remarks
data["fileId"] = values.fileId
if (isBxOneSecond && qualifyNumber == 1) {//比选一阶段二次项目 只有一家供应商合格
data["operationType"] = 1
data["customizeFlowStatus"] = processValue
} else {
data["operationType"] = 0
}
}
const remarkList = getRemarkList(ref.current)
if (remarkList) {
@ -869,10 +886,13 @@ const Index: React.FC<{}> = () => {
if (res?.code == 200) {
setTableDisplay(res.data)
//初始化三家供应商判断数据
await checkShowData(assessRoomId).then(response => {
await checkShowData(assessRoomId, getURLInformation('nodeId')).then(response => {
if (response?.code == 200) {
setUploadId(response?.data?.fileId)
setRadioValue(response?.data?.continueStatus == undefined ? 1 : response?.data?.continueStatus)
setProcessValue(response?.data?.customizeFlowStatus == undefined ? 1 : response?.data?.customizeFlowStatus);
setIsBxOneSecond(response?.data?.bxOneSecondProjectStatus);
setIsNodeEnd(response?.data?.nodeEndStatus);
form.setFieldsValue({
remarks: response.data?.remarks
})
@ -944,17 +964,24 @@ const Index: React.FC<{}> = () => {
<>
<p className="red mb0"></p>
<BidPreliminarySummary readOnly={reviewStatus == 2 || reviewStatus == 3} summaryRef={ref} reload={count} totalSupplier={totalSupplierColumns} onSubmit={(value) => {
setIsShowFoot(value)
}} />
{isShowFoot ? (
setQualifyNumber(value);
}} isBxOneSecond={isBxOneSecond} isNodeEnd={isNodeEnd} />
{qualifyNumber < 3 ? (
<div>
<div style={{ margin: '8px 0px' }}>
<span style={{ color: '#b30000' }}></span>
<Radio.Group onChange={radioOnChange} value={radioValue} disabled={reviewStatus == 2 || reviewStatus == 3}>
<span style={{ color: '#b30000' }}>{qualifyNumber == 1 && isBxOneSecond ? '合格供应商仅一家,是否继续进行' : '合格供应商不足三家,是否继续进行详审'}</span>
<Radio.Group onChange={radioOnChange} value={radioValue} disabled={reviewStatus == 2 || reviewStatus == 3 || (qualifyNumber == 1 && isBxOneSecond && isNodeEnd)}>
<Radio value={1}></Radio>
<Radio value={0}></Radio>
</Radio.Group>
</div>
{qualifyNumber == 1 && isBxOneSecond && radioValue == 1 && <div style={{ margin: '8px 70px' }}>
<span style={{ color: '#b30000' }}></span>
<Radio.Group onChange={processOnChange} value={processValue} disabled={reviewStatus == 2 || reviewStatus == 3 || (qualifyNumber == 1 && isBxOneSecond && isNodeEnd)}>
<Radio value={1}></Radio>
<Radio value={0}></Radio>
</Radio.Group>
</div>}
<Form
{...layout}
form={form}
@ -965,12 +992,12 @@ const Index: React.FC<{}> = () => {
<Form.Item
name="remarks"
label="说明"
rules={[{ required: !(reviewStatus == 2 || reviewStatus == 3) && radioValue == 1 }]}
rules={[{ required: !(reviewStatus == 2 || reviewStatus == 3 || (qualifyNumber == 1 && isBxOneSecond && isNodeEnd)) && radioValue == 1 }]}
hidden={radioValue == 0}
>
<TextArea maxLength={500} disabled={reviewStatus == 2 || reviewStatus == 3} placeholder="请填写说明" style={{ resize: reviewStatus == 2 || reviewStatus == 3 ? 'none' : 'vertical' }} />
<TextArea maxLength={500} disabled={reviewStatus == 2 || reviewStatus == 3 || (qualifyNumber == 1 && isBxOneSecond && isNodeEnd)} bordered={!(reviewStatus == 2 || reviewStatus == 3 || (qualifyNumber == 1 && isBxOneSecond && isNodeEnd))} placeholder="请填写说明" rows={3} autoSize={reviewStatus == 2 || reviewStatus == 3 || (qualifyNumber == 1 && isBxOneSecond && isNodeEnd)} />
</Form.Item>
{reviewStatus == 2 || reviewStatus == 3 ? (
{reviewStatus == 2 || reviewStatus == 3 || (qualifyNumber == 1 && isBxOneSecond && isNodeEnd) ? (
<Form.Item
name="fileId"
label="说明文件"

View File

@ -178,8 +178,8 @@ export async function isCheckShow(params: any) {
* 初审汇总表-提交汇总后回显少于三家判断数据
* @param params
*/
export async function checkShowData(params: any) {
return request(`/api/biz-service-ebtp-rsms/v1/bid/early/warn/room/${params}`, {
export async function checkShowData(params: any, nodeId: any) {
return request(`/api/biz-service-ebtp-rsms/v1/bid/early/warn/room/${params}?nodeId=${nodeId}`, {
method: 'GET'
})
}
@ -194,7 +194,7 @@ export async function getFile(id: any) { // 查找是否有应答文件
* 提交前风险防控校验接口
* @param data
*/
export function beforeRiskControl(data: any) {
export function beforeRiskControl(data: any) {
return request("/api/biz-service-ebtp-rsms/v1/riskcenter/getRemindEarlySummary", {
method: 'post',
data: data,

View File

@ -14,6 +14,7 @@ const layout = {
const Index: React.FC<{}> = () => {
const [packageList, setPackageList] = useState([]);
const method = getProMethod()
const roomId = getRoomId()
const actionRef = useRef<ActionType>();
const [count, countSet] = useState<any>(0);//触发useEffect
const [maxturndata, maxturn] = useState<any>([]); //最大轮次
@ -45,6 +46,9 @@ const Index: React.FC<{}> = () => {
title: '操作',
width: '25%',
render: (text: any, record: any, index: any) => {
if (record.skipStatus == 1) {//跳过节点
return null
}
if (record.instTurnType == 2) {
if (record.nowTurnStatus == 1) {
// 只要轮次处于进行中时,改模块不可‘删除’
@ -182,13 +186,13 @@ const Index: React.FC<{}> = () => {
}
// 删除轮次
const delTurn = async (turnId: any) => {
countSet(count + 1);
const hide = message.loading('正在删除');
try {
const success = await deleteTurn(turnId).then((res) => res?.code == 200);
hide();
if (success) {
message.success('删除成功');
countSet(count + 1);
return true;
} else {
return false;
@ -203,13 +207,13 @@ const Index: React.FC<{}> = () => {
//删除模块
const delNode = async (nodeId: any) => {
countSet(count + 1);
const hide = message.loading('正在删除');
try {
const success = await deleteNode(nodeId).then((res) => res?.code == 200);
hide();
if (success) {
message.success('删除成功');
countSet(count + 1);
return true;
} else {
return false;
@ -222,7 +226,6 @@ const Index: React.FC<{}> = () => {
}
};
useEffect(() => {
let roomId = getRoomId()
getConfigList(roomId).then((res) => {
if (res?.code == 200) {
setPackageList(res.data)
@ -234,21 +237,24 @@ const Index: React.FC<{}> = () => {
maxturn(res.data)
}
})
getNodeList("TP").then((res) => {
if (res?.code == 200) {
allNodeList(res.data)
}
})
getAssessRoom(roomId).then((res) => {
if (res?.code == 200) {
setAssessRoom(res.data)
}
})
setTimeout(() => {
countSet(count + 1);
}, 4000)
}, [count]);
useEffect(() => {
getAssessRoom(roomId).then((res) => {
if (res?.code == 200) {
setAssessRoom(res.data)
getNodeList(res?.data?.bxOneSecondProjectStatus ? "BX2nd" : "TP").then((res) => {
if (res?.code == 200) {
allNodeList(res.data)
}
})
}
})
}, [])
function methodStatus() {
let procurementMethod;
switch (method) {