线下评审
This commit is contained in:
@ -1,22 +1,21 @@
|
||||
import { getReviewResult, unlockReportIF, unlockResult } from '@/pages/Evaluation/expert/ReviewResults/GroupLeader/service';
|
||||
import { getDictName, getURLInformation, isEmpty, isNotEmpty } from '@/utils/CommonUtils';
|
||||
import { getReviewResult } from '@/pages/Evaluation/expert/ReviewResults/GroupLeader/service';
|
||||
import { getDictName, isEmpty, isNotEmpty } from '@/utils/CommonUtils';
|
||||
import ProTable from '@ant-design/pro-table';
|
||||
import { Button, Card, Col, Collapse, message, Modal, Popover, Row, Space, Spin, Typography, Checkbox, Upload, Form } from 'antd';
|
||||
import { Button, Col, Collapse, message, Popover, Row, Spin, Typography, Upload, Form } from 'antd';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import Weboffice from "@/pages/webOffice/weboffice";
|
||||
import { finishFlow, getAssessRoomStatus, queryReviewReport, reviewReportSave, reviewReportSend, saveSignPdfReport } from '../../service';
|
||||
import { finishFlow, getAssessRoomStatus, queryReviewReport, saveAssessRoomInfo } from '../../service';
|
||||
import { commonMessage } from '@/utils/MessageUtils';
|
||||
import { getDefId, getDicData, getProMethod, getRoomId, getSessionRoleData, getSessionUserData, getUserToken } from '@/utils/session';
|
||||
import { getDefId, getDicData, getProMethod, getRoomId, getSessionRoleData } from '@/utils/session';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import WebOffice0609, { WebOfficeRefProps } from '@/pages/webOffice/weboffice0609';
|
||||
import { WebOfficeRefProps } from '@/pages/webOffice/weboffice0609';
|
||||
import PdfModal from '@/utils/PdfModal/PdfModal';
|
||||
import ReviewReportUpload from '@/utils/ReviewReportUpload';
|
||||
import { getFileListByBid } from '@/utils/DownloadUtils';
|
||||
import MACAddressPrompt from '@/pages/Evaluation/BidControl/BidControlManager/components/MACAddressPrompt';
|
||||
import RiskModal from '@/components/RiskModal';
|
||||
import { isLeaderConfirm } from '@/components/BiddingRoom/service';
|
||||
import FileDown from '@/utils/Download';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
import ReviewFileUpload from './ReviewFileUpload';
|
||||
import OtherFileUpload from './OtherFileUpload';
|
||||
|
||||
const { Panel } = Collapse;
|
||||
const { Paragraph, Text } = Typography;
|
||||
@ -68,14 +67,18 @@ const Manager: React.FC = () => {
|
||||
const candidateType = bidMethodDict == 'procurement_mode_1' || bidMethodDict == 'procurement_mode_2' ? '中标' : '中选';//初始化中标中选字段
|
||||
//评审报告附件modal visible
|
||||
const [reportUploadVisible, setReportUploadVisible] = useState<boolean>(false);
|
||||
//专家打分表附件modal visible
|
||||
const [reviewUploadVisible, setReviewUploadVisible] = useState<boolean>(false);
|
||||
//其他文件附件modal visible
|
||||
const [otherUploadVisible, setOtherUploadVisible] = useState<boolean>(false);
|
||||
//评审报告附件id
|
||||
const [reportUploadId, setReportUploadId] = useState<string>('');
|
||||
//评审报告附件列表
|
||||
const [reportFileList, setReportFileList] = useState<any[]>([]);
|
||||
//专家打分表附件列表
|
||||
const [offlineReviewFile, setOfflineReviewFile] = useState<string>('');
|
||||
const [offlineReviewFileId, setOfflineReviewFileId] = useState<string>('');
|
||||
//其他文件附件列表
|
||||
const [offlineOtherFile, setOfflineOtherFile] = useState<string>('');
|
||||
const [offlineOtherFileId, setOfflineOtherFileId] = useState<string>('');
|
||||
//评审结果编辑综合得分展开关闭
|
||||
const [expandTotalScore, setExpandTotalScore] = useState<boolean>(true);
|
||||
//评审结果数据
|
||||
@ -212,26 +215,26 @@ const Manager: React.FC = () => {
|
||||
dataIndex: 'winnerCandidate',
|
||||
render: (_: any, record: any) => winnerCandidate[_]
|
||||
},
|
||||
{
|
||||
title: `是否拟${candidateType}人`,
|
||||
dataIndex: 'winnerBidder',
|
||||
valueType: 'text',
|
||||
width: 120,
|
||||
valueEnum: {
|
||||
0: { text: '否' },
|
||||
1: { text: '是' },
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '拟签约金额(不含增值税)(元)',
|
||||
width: 130,
|
||||
dataIndex: 'contractedMoney',
|
||||
},
|
||||
{
|
||||
title: '增值税金额(元)',
|
||||
width: 130,
|
||||
dataIndex: 'taxRatePrice',
|
||||
},
|
||||
// {
|
||||
// title: `是否拟${candidateType}人`,
|
||||
// dataIndex: 'winnerBidder',
|
||||
// valueType: 'text',
|
||||
// width: 120,
|
||||
// valueEnum: {
|
||||
// 0: { text: '否' },
|
||||
// 1: { text: '是' },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: '拟签约金额(不含增值税)(元)',
|
||||
// width: 130,
|
||||
// dataIndex: 'contractedMoney',
|
||||
// },
|
||||
// {
|
||||
// title: '增值税金额(元)',
|
||||
// width: 130,
|
||||
// dataIndex: 'taxRatePrice',
|
||||
// },
|
||||
];
|
||||
//预审
|
||||
const columns2: any[] = [
|
||||
@ -633,6 +636,36 @@ const Manager: React.FC = () => {
|
||||
})
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 保存专家打分表文件
|
||||
*/
|
||||
const saveReviewFile = (fileId: string) => {
|
||||
if (isNotEmpty(fileId)) {
|
||||
let param = { assessRoomId: assessId, offlineReviewFile: fileId }
|
||||
saveAssessRoomInfo(param).then(res => {
|
||||
if (res?.success && !res?.data) {
|
||||
message.success('上传成功');
|
||||
} else {
|
||||
message.error(res?.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 保存其他文件
|
||||
*/
|
||||
const saveOtherFile = (fileId: string) => {
|
||||
if (isNotEmpty(fileId)) {
|
||||
let param = { assessRoomId: assessId, offlineOtherFile: fileId }
|
||||
saveAssessRoomInfo(param).then(res => {
|
||||
if (res?.success && !res?.data) {
|
||||
message.success('上传成功');
|
||||
} else {
|
||||
message.error(res?.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const [spin, spinSet] = useState<any>(false);
|
||||
//上传文件
|
||||
@ -670,11 +703,6 @@ const Manager: React.FC = () => {
|
||||
}
|
||||
},
|
||||
};
|
||||
const [form] = Form.useForm();
|
||||
const layout = {
|
||||
labelCol: { span: 4 },
|
||||
wrapperCol: { span: 20 },
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<Collapse defaultActiveKey={['1', '2', '3', '4']}>
|
||||
@ -712,11 +740,11 @@ const layout = {
|
||||
</Panel>
|
||||
|
||||
<Panel header="专家打分表上传" key="3">
|
||||
{ evaluationRoom.status == '3' && !evaluationRoom.offlineReviewFile ? null : <Button key="upload" onClick={() => setReportUploadVisible(true)}>{!evaluationRoom.offlineReviewFile ? '查看附件' : '上传附件'}</Button>}
|
||||
{ evaluationRoom.status == '3' && !evaluationRoom.offlineReviewFile ? '无' : <Button key="upload" onClick={() => setReviewUploadVisible(true)}>{evaluationRoom.status == '3' ? '查看附件' : '上传附件'}</Button>}
|
||||
</Panel>
|
||||
|
||||
<Panel header="其他文件上传" key="4">
|
||||
{ evaluationRoom.status == '3' && !evaluationRoom.offlineOtherFile ? null : <Button key="upload" onClick={() => setReportUploadVisible(true)}>{!reviewReport ? '查看附件' : '上传附件'}</Button>}
|
||||
{ evaluationRoom.status == '3' && !evaluationRoom.offlineOtherFile ? '无' : <Button key="upload" onClick={() => setOtherUploadVisible(true)}>{evaluationRoom.status == '3' ? '查看附件' : '上传附件'}</Button>}
|
||||
</Panel>
|
||||
</Collapse>
|
||||
|
||||
@ -742,6 +770,42 @@ const layout = {
|
||||
fileId={reportUploadId}
|
||||
readOnly={!reviewReport}
|
||||
/>}
|
||||
{reviewUploadVisible && <ReviewFileUpload
|
||||
modalVisible={reviewUploadVisible}
|
||||
onCancel={(value?: string) => {
|
||||
console.log("value", value);
|
||||
if (value) {
|
||||
setOfflineReviewFileId(value);
|
||||
}
|
||||
setReviewUploadVisible(false);
|
||||
} }
|
||||
fileId={offlineReviewFileId}
|
||||
readOnly={!evaluationRoom}
|
||||
onOk={function (value?: string): void {
|
||||
console.log("value", value);
|
||||
if (value) {
|
||||
saveReviewFile(value);
|
||||
}
|
||||
} }
|
||||
/>}
|
||||
{otherUploadVisible && <OtherFileUpload
|
||||
modalVisible={otherUploadVisible}
|
||||
onCancel={(value?: string) => {
|
||||
console.log("value", value);
|
||||
if (value) {
|
||||
setOfflineOtherFileId(value);
|
||||
}
|
||||
setOtherUploadVisible(false);
|
||||
} }
|
||||
fileId={offlineOtherFileId}
|
||||
readOnly={!evaluationRoom}
|
||||
onOk={function (value?: string): void {
|
||||
console.log("value", value);
|
||||
if (value) {
|
||||
saveOtherFile(value);
|
||||
}
|
||||
} }
|
||||
/>}
|
||||
<RiskModal modalVisible={riskVisible} onCancel={() => { setRiskVisible(false) }} isResult={true} role={role} />
|
||||
</>
|
||||
);
|
||||
|
@ -0,0 +1,59 @@
|
||||
import React from 'react';
|
||||
import { Form, Modal } from 'antd';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
|
||||
interface OtherFileUploadProps {
|
||||
modalVisible: boolean;//modal visible
|
||||
onCancel: (value?: string) => void//modal submit
|
||||
onOk: (value?: string) => void//modal submit
|
||||
fileId: string;//upload fileId
|
||||
readOnly: boolean;//readonly status true-readonly false-not readonly
|
||||
}
|
||||
|
||||
const layout = {
|
||||
labelCol: { span: 4 },
|
||||
wrapperCol: { span: 20 },
|
||||
};
|
||||
|
||||
const modalHeight = window.innerHeight * 96 / 100;
|
||||
|
||||
/**
|
||||
* 评审室-评审结果评审报告上传附件
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
|
||||
const OtherFileUpload: React.FC<OtherFileUploadProps> = (props) => {
|
||||
const { modalVisible, onCancel, onOk, fileId, readOnly } = props;
|
||||
console.log("readOnly",readOnly);
|
||||
|
||||
const [form] = Form.useForm();
|
||||
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
title={`${readOnly ? '下载' : '上传'}附件`}
|
||||
visible={modalVisible}
|
||||
onCancel={() => onCancel(form.getFieldValue('annexId'))}
|
||||
onOk={() => onOk(form.getFieldValue('annexId'))}
|
||||
// okButtonProps={{ hidden: true }}
|
||||
cancelText="返回"
|
||||
style={{ maxHeight: modalHeight }}
|
||||
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
|
||||
centered
|
||||
>
|
||||
<Form name="complex-form" {...layout} form={form}>
|
||||
<Form.Item
|
||||
name="annexId"
|
||||
label="附件"
|
||||
extra={readOnly ? null : '每个文件最大20MB,不限制数量'}
|
||||
>
|
||||
<ExtendUpload bid={fileId} btnName="上传" maxSize={20} uploadProps={{ name: "file", disabled: readOnly }}>
|
||||
</ExtendUpload>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default OtherFileUpload;
|
@ -0,0 +1,59 @@
|
||||
import React from 'react';
|
||||
import { Form, Modal } from 'antd';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
|
||||
interface ReviewFileUploadProps {
|
||||
modalVisible: boolean;//modal visible
|
||||
onCancel: (value?: string) => void//modal submit
|
||||
onOk: (value?: string) => void//modal submit
|
||||
fileId: string;//upload fileId
|
||||
readOnly: boolean;//readonly status true-readonly false-not readonly
|
||||
}
|
||||
|
||||
const layout = {
|
||||
labelCol: { span: 4 },
|
||||
wrapperCol: { span: 20 },
|
||||
};
|
||||
|
||||
const modalHeight = window.innerHeight * 96 / 100;
|
||||
|
||||
/**
|
||||
* 评审室-评审结果评审报告上传附件
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
|
||||
const ReviewFileUpload: React.FC<ReviewFileUploadProps> = (props) => {
|
||||
const { modalVisible, onCancel, onOk, fileId, readOnly } = props;
|
||||
console.log("readOnly",readOnly);
|
||||
|
||||
const [form] = Form.useForm();
|
||||
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
title={`${readOnly ? '下载' : '上传'}附件`}
|
||||
visible={modalVisible}
|
||||
onCancel={() => onCancel(form.getFieldValue('annexId'))}
|
||||
onOk={() => onOk(form.getFieldValue('annexId'))}
|
||||
// okButtonProps={{ hidden: true }}
|
||||
cancelText="返回"
|
||||
style={{ maxHeight: modalHeight }}
|
||||
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
|
||||
centered
|
||||
>
|
||||
<Form name="complex-form" {...layout} form={form}>
|
||||
<Form.Item
|
||||
name="annexId"
|
||||
label="附件"
|
||||
extra={readOnly ? null : '每个文件最大20MB,不限制数量'}
|
||||
>
|
||||
<ExtendUpload bid={fileId} btnName="上传" maxSize={20} uploadProps={{ name: "file", disabled: readOnly }}>
|
||||
</ExtendUpload>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default ReviewFileUpload;
|
@ -51,6 +51,17 @@ export function finishFlow(id: any) {
|
||||
export function getAssessRoomStatus(id: any) {
|
||||
return request('/api/biz-service-ebtp-process/v1/bizassessroom/info/' + id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存评审室信息
|
||||
* @param id
|
||||
*/
|
||||
export function saveAssessRoomInfo(data: any) {
|
||||
return request('/api/biz-service-ebtp-rsms/v1/bizassessroom', {
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 生成签名报告
|
||||
* @param id
|
||||
|
Reference in New Issue
Block a user