5.9 上传投标文件、应答情况查看页、评审打分页,评审汇总表,评审结果MAC强控

This commit is contained in:
jl-zhoujl2
2022-05-09 15:03:18 +08:00
parent 216d65fe55
commit c929279c3c
15 changed files with 729 additions and 129 deletions

View File

@ -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) }} />
</>
)
}