5.9 上传投标文件、应答情况查看页、评审打分页,评审汇总表,评审结果MAC强控
This commit is contained in:
@ -0,0 +1,98 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Modal, Typography } from 'antd';
|
||||
import { createMACInfo, getMACInfo } from '../service';
|
||||
|
||||
interface SupplierCommitmentProps {
|
||||
projectId: string;
|
||||
callback: () => void;
|
||||
}
|
||||
/**
|
||||
* 上传应答文件-供应商承诺书同意
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
const SupplierCommitment: React.FC<SupplierCommitmentProps> = (props) => {
|
||||
const { projectId, callback } = props;
|
||||
const { warning } = Modal;
|
||||
const { Text } = Typography;
|
||||
const [time, setTime] = useState<number>(10);
|
||||
const [btnLoading, setBtnLoading] = useState<boolean>(false);
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
useEffect(() => {
|
||||
//查询供应商承诺书状态
|
||||
getMACInfo({ tpId: projectId }).then(res => {
|
||||
if (res?.code == 200) {
|
||||
const data = res?.data;
|
||||
if (data) {//已同意
|
||||
callback();
|
||||
} else {
|
||||
setVisible(true);//未同意
|
||||
}
|
||||
}
|
||||
})
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
let timeInteval: any
|
||||
if (visible) {
|
||||
timeInteval = setInterval(() => { // 倒计时
|
||||
setTime(n => {
|
||||
if (n == 1) {
|
||||
clearInterval(timeInteval)
|
||||
}
|
||||
return n - 1;
|
||||
})
|
||||
}, 1000);
|
||||
} else {
|
||||
clearInterval(timeInteval);
|
||||
}
|
||||
return () => {
|
||||
clearInterval(timeInteval);
|
||||
}
|
||||
}, [visible]);
|
||||
|
||||
const onCancel = () => {
|
||||
warning({
|
||||
title: '请先同意承诺书内容',
|
||||
content: null,
|
||||
centered: true,
|
||||
});
|
||||
}
|
||||
|
||||
const onOk = () => {
|
||||
setBtnLoading(true);
|
||||
//同意承诺书
|
||||
createMACInfo({ projectId: projectId }).then(res => {
|
||||
if (res?.code == 200) {
|
||||
setVisible(false);
|
||||
callback();
|
||||
}
|
||||
}).finally(() => {
|
||||
setBtnLoading(false);
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
visible={visible}
|
||||
maskClosable={false}
|
||||
keyboard={false}
|
||||
closable={false}
|
||||
centered
|
||||
width={600}
|
||||
onOk={onOk}
|
||||
okText={time !== 0 ? "同意(" + time + "s)" : "同意"}
|
||||
okButtonProps={{
|
||||
disabled: time !== 0,
|
||||
loading: btnLoading,
|
||||
}}
|
||||
bodyStyle={{ padding: 40 }}
|
||||
onCancel={onCancel}
|
||||
>
|
||||
<Text strong style={{ fontSize: 16 }}>已阅读并承诺在采购招标过程中,不存在围标、串标行为。同意中国联通公司对参与供应商进行IP、MAC地址校验,如不同供应商的MAC地址相同,评标/评审委员会(或采购人)将按围标、串标处理。</Text>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default SupplierCommitment;
|
@ -11,6 +11,7 @@ import { btnAuthority } from '@/utils/authority';
|
||||
import { verificationSupplier } from '@/utils/IpassVerification'
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
||||
import { getStatusByProId } from '@/services/downLoad';
|
||||
import SupplierCommitment from './components/SupplierCommitment';
|
||||
|
||||
const { confirm } = Modal;
|
||||
|
||||
@ -51,6 +52,7 @@ const Index: React.FC<{}> = () => {
|
||||
const [isModalVisible, setIsModalVisible] = useState<boolean>(false);
|
||||
const [timeDateList, setTimeDateList] = useState([]);
|
||||
const [currentDateList, setCurrentDateList] = useState<any>();
|
||||
const [isInit, setIsInit] = useState<boolean>(false);//是否初始化列表-供应商承诺书用
|
||||
|
||||
const columns: any[] = [ // 列表数据
|
||||
{
|
||||
@ -289,7 +291,7 @@ const Index: React.FC<{}> = () => {
|
||||
idArr.push(id)
|
||||
getCodeInfo(idArr).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if(res?.data[0]){
|
||||
if (res?.data[0]) {
|
||||
setIpassCode(res.data[0].organizationCode)
|
||||
}
|
||||
}
|
||||
@ -404,7 +406,7 @@ const Index: React.FC<{}> = () => {
|
||||
const onUploadError = (resumable: any) => {
|
||||
if (resumable == '超过截止时间') {
|
||||
message.error('已超过截止时间')
|
||||
} else if(resumable == '撤销后再上传'){
|
||||
} else if (resumable == '撤销后再上传') {
|
||||
message.error('您已上传应答文件,需撤销后再上传!')
|
||||
setUploadVisible(false)
|
||||
getList()
|
||||
@ -427,7 +429,7 @@ const Index: React.FC<{}> = () => {
|
||||
const getCurrent = () => {
|
||||
getCurrentTime().then((res) => {
|
||||
if (res.code == 200) {
|
||||
let currentTiem = new Date(res.data.replace(/-/g,'/')).getTime()
|
||||
let currentTiem = new Date(res.data.replace(/-/g, '/')).getTime()
|
||||
setTimestamp(currentTiem)
|
||||
}
|
||||
})
|
||||
@ -447,12 +449,12 @@ const Index: React.FC<{}> = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const handleTimeInterval= ()=>{ // 倒计时
|
||||
if(dateList.length>0 && timestamp>0){
|
||||
setTimestamp(timestamp+1000);
|
||||
const handleTimeInterval = () => { // 倒计时
|
||||
if (dateList.length > 0 && timestamp > 0) {
|
||||
setTimestamp(timestamp + 1000);
|
||||
let newTimeDateList: any = [];
|
||||
dateList.map((item:any,index:any)=>{
|
||||
if(item?.endDate && item?.endDate!=""&&item?.endDate!=null){
|
||||
dateList.map((item: any, index: any) => {
|
||||
if (item?.endDate && item?.endDate != "" && item?.endDate != null) {
|
||||
newTimeDateList.push(showTimeDetail(item?.endDate));
|
||||
}
|
||||
})
|
||||
@ -466,22 +468,24 @@ const Index: React.FC<{}> = () => {
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
getList();
|
||||
getCurrent();
|
||||
timeInteval = setInterval(()=>{ // 倒计时
|
||||
savedCallback.current();
|
||||
},1000);
|
||||
if (isInit) {
|
||||
getList();
|
||||
getCurrent();
|
||||
timeInteval = setInterval(() => { // 倒计时
|
||||
savedCallback.current();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
return ()=>{
|
||||
return () => {
|
||||
clearInterval(timeInteval);
|
||||
if(task){
|
||||
if (task) {
|
||||
clearInterval(task)
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
}, [isInit]);
|
||||
|
||||
const showTimeDetail = (endDate: any) => {
|
||||
let endtime = new Date(endDate.replace(/-/g,'/')); //定义结束时间
|
||||
let endtime = new Date(endDate.replace(/-/g, '/')); //定义结束时间
|
||||
let lefttime = endtime.getTime() - timestamp; //距离结束时间的毫秒数
|
||||
let returnResult = "";
|
||||
if (lefttime > 0) {
|
||||
@ -522,9 +526,9 @@ const Index: React.FC<{}> = () => {
|
||||
<Panel header={item.sectionName} key={index}>
|
||||
<div className="table-mess">
|
||||
<span className="f12 mess">应答截止时间:{item.endDate}</span>
|
||||
<span className="f12 mess">国家授时中心标准时间:{ currentDateList }</span>
|
||||
<span className="f12 mess">国家授时中心标准时间:{currentDateList}</span>
|
||||
<span className="tr f12 mess">
|
||||
<span className="red">{timeDateList.length>0 ? timeDateList[index]:null}</span>
|
||||
<span className="red">{timeDateList.length > 0 ? timeDateList[index] : null}</span>
|
||||
{
|
||||
item.state == '0' && timestamp > 0 && new Date(item.startDate.replaceAll("-", "/")).getTime() < timestamp && new Date(item.endDate.replaceAll("-", "/")).getTime() > timestamp ?
|
||||
<Button
|
||||
@ -564,32 +568,32 @@ const Index: React.FC<{}> = () => {
|
||||
}
|
||||
</div>
|
||||
{
|
||||
uploadVisible?
|
||||
<Modal // 批量上传
|
||||
title="文件上传"
|
||||
visible={uploadVisible}
|
||||
onCancel={closeModal}
|
||||
width={800}
|
||||
centered
|
||||
style={{ maxHeight: modalHeight }}
|
||||
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
|
||||
footer={[<Button onClick={() => closeModal()}>关闭</Button>]}
|
||||
>
|
||||
<ReactResumableJs
|
||||
query={{ 'relativePath': filePath, 'Tfile': Tfile, 'Tuid': uuid }}
|
||||
maxFiles={1}
|
||||
fileAccept={fileT}
|
||||
endTime={endTime}
|
||||
currentDate={currentDate}
|
||||
onUploadSuccess={onUploadSuccess.bind(this)}
|
||||
onUploadError={onUploadError.bind(this)}
|
||||
onFileAdded={(file: any, resumable: any) => { onFileAdded(file, resumable) }}
|
||||
onPauseUpload={(file: any, resumable: any) => { onPauseUpload(file, resumable) }}
|
||||
onResumeUpload={(file: any, resumable: any) => { onResumeUpload(file, resumable) }}
|
||||
onCancelUpload={(file: any, resumable: any) => { onCancelUpload(file, resumable) }}
|
||||
service="/api/core-service-ebtp-updownload/v1/hulk/upload"
|
||||
/>
|
||||
</Modal>:null
|
||||
uploadVisible ?
|
||||
<Modal // 批量上传
|
||||
title="文件上传"
|
||||
visible={uploadVisible}
|
||||
onCancel={closeModal}
|
||||
width={800}
|
||||
centered
|
||||
style={{ maxHeight: modalHeight }}
|
||||
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
|
||||
footer={[<Button onClick={() => closeModal()}>关闭</Button>]}
|
||||
>
|
||||
<ReactResumableJs
|
||||
query={{ 'relativePath': filePath, 'Tfile': Tfile, 'Tuid': uuid }}
|
||||
maxFiles={1}
|
||||
fileAccept={fileT}
|
||||
endTime={endTime}
|
||||
currentDate={currentDate}
|
||||
onUploadSuccess={onUploadSuccess.bind(this)}
|
||||
onUploadError={onUploadError.bind(this)}
|
||||
onFileAdded={(file: any, resumable: any) => { onFileAdded(file, resumable) }}
|
||||
onPauseUpload={(file: any, resumable: any) => { onPauseUpload(file, resumable) }}
|
||||
onResumeUpload={(file: any, resumable: any) => { onResumeUpload(file, resumable) }}
|
||||
onCancelUpload={(file: any, resumable: any) => { onCancelUpload(file, resumable) }}
|
||||
service="/api/core-service-ebtp-updownload/v1/hulk/upload"
|
||||
/>
|
||||
</Modal> : null
|
||||
}
|
||||
<Modal // 撤回
|
||||
width={300}
|
||||
@ -626,6 +630,7 @@ const Index: React.FC<{}> = () => {
|
||||
>
|
||||
<p>友情提示:您已被列入联通供应商黑名单,黑名单期间您可能被拒绝中标,请您谨慎操作。</p>
|
||||
</Modal>
|
||||
<SupplierCommitment projectId={projectId} callback={() => { setIsInit(true) }} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -45,22 +45,35 @@ export async function saveUploadLog(data: any) { // 开始上传给后台做记
|
||||
* @param data
|
||||
* @returns
|
||||
*/
|
||||
export async function getSupplierBlack(data: any) {
|
||||
export async function getSupplierBlack(data: any) {
|
||||
return request('/api/biz-service-ebtp-bid/v1/supplier/info/getSupplierBlack', {
|
||||
method: 'post',
|
||||
data: data
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export async function getCurrentTime() { // 获取当前时间戳
|
||||
return request('/api/biz-service-ebtp-extend/v1/timeService/getServiceTime', {
|
||||
method: 'get',
|
||||
});
|
||||
export async function getCurrentTime() { // 获取当前时间戳
|
||||
return request('/api/biz-service-ebtp-extend/v1/timeService/getServiceTime', {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export async function getTendererFileStatus(data: any) { // 查看是否已经上传投标文件
|
||||
return request('/api/biz-service-ebtp-resps/v1/tfile/getTendererFileStatus', {
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
|
||||
export async function getTendererFileStatus(data: any) { // 查看是否已经上传投标文件
|
||||
return request('/api/biz-service-ebtp-resps/v1/tfile/getTendererFileStatus', {
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export async function getMACInfo(params: any) { //查询供应商承诺书同意状态
|
||||
return request('/api/biz-service-ebtp-tender/v1/confirmMacInfo/queryCheck', {
|
||||
method: 'post',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
export async function createMACInfo(data: any) { //供应商承诺书同意
|
||||
return request('/api/biz-service-ebtp-tender/v1/confirmMacInfo/create', {
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user