From 2e0d53f0e21c3ac06787b843b8893d7f6a3141db Mon Sep 17 00:00:00 2001 From: jlzhangyx5 Date: Fri, 11 Jul 2025 17:03:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8B=E8=AF=84=E5=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagerOffline/components/Manager.tsx | 140 +++++++++++++----- .../components/OtherFileUpload.tsx | 59 ++++++++ .../components/ReviewFileUpload.tsx | 59 ++++++++ .../projectManager/ReviewResults/service.ts | 11 ++ 4 files changed, 231 insertions(+), 38 deletions(-) create mode 100644 src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/OtherFileUpload.tsx create mode 100644 src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/ReviewFileUpload.tsx diff --git a/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/Manager.tsx b/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/Manager.tsx index a639fff..c064ae6 100644 --- a/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/Manager.tsx +++ b/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/Manager.tsx @@ -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(false); + //专家打分表附件modal visible + const [reviewUploadVisible, setReviewUploadVisible] = useState(false); + //其他文件附件modal visible + const [otherUploadVisible, setOtherUploadVisible] = useState(false); //评审报告附件id const [reportUploadId, setReportUploadId] = useState(''); //评审报告附件列表 const [reportFileList, setReportFileList] = useState([]); //专家打分表附件列表 - const [offlineReviewFile, setOfflineReviewFile] = useState(''); + const [offlineReviewFileId, setOfflineReviewFileId] = useState(''); //其他文件附件列表 - const [offlineOtherFile, setOfflineOtherFile] = useState(''); + const [offlineOtherFileId, setOfflineOtherFileId] = useState(''); //评审结果编辑综合得分展开关闭 const [expandTotalScore, setExpandTotalScore] = useState(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(false); //上传文件 @@ -670,11 +703,6 @@ const Manager: React.FC = () => { } }, }; -const [form] = Form.useForm(); -const layout = { - labelCol: { span: 4 }, - wrapperCol: { span: 20 }, -}; return ( <> @@ -712,11 +740,11 @@ const layout = { - { evaluationRoom.status == '3' && !evaluationRoom.offlineReviewFile ? null : } + { evaluationRoom.status == '3' && !evaluationRoom.offlineReviewFile ? '无' : } - { evaluationRoom.status == '3' && !evaluationRoom.offlineOtherFile ? null : } + { evaluationRoom.status == '3' && !evaluationRoom.offlineOtherFile ? '无' : } @@ -742,6 +770,42 @@ const layout = { fileId={reportUploadId} readOnly={!reviewReport} />} + {reviewUploadVisible && { + 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 && { + 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); + } + } } + />} { setRiskVisible(false) }} isResult={true} role={role} /> ); diff --git a/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/OtherFileUpload.tsx b/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/OtherFileUpload.tsx new file mode 100644 index 0000000..d13ee3b --- /dev/null +++ b/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/OtherFileUpload.tsx @@ -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 = (props) => { + const { modalVisible, onCancel, onOk, fileId, readOnly } = props; + console.log("readOnly",readOnly); + + const [form] = Form.useForm(); + + return ( + onCancel(form.getFieldValue('annexId'))} + onOk={() => onOk(form.getFieldValue('annexId'))} + // okButtonProps={{ hidden: true }} + cancelText="返回" + style={{ maxHeight: modalHeight }} + bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }} + centered + > +
+ + + + +
+
+ ); +}; + +export default OtherFileUpload; diff --git a/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/ReviewFileUpload.tsx b/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/ReviewFileUpload.tsx new file mode 100644 index 0000000..93044ac --- /dev/null +++ b/src/pages/Evaluation/projectManager/ReviewResults/ManagerOffline/components/ReviewFileUpload.tsx @@ -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 = (props) => { + const { modalVisible, onCancel, onOk, fileId, readOnly } = props; + console.log("readOnly",readOnly); + + const [form] = Form.useForm(); + + return ( + onCancel(form.getFieldValue('annexId'))} + onOk={() => onOk(form.getFieldValue('annexId'))} + // okButtonProps={{ hidden: true }} + cancelText="返回" + style={{ maxHeight: modalHeight }} + bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }} + centered + > +
+ + + + +
+
+ ); +}; + +export default ReviewFileUpload; diff --git a/src/pages/Evaluation/projectManager/ReviewResults/service.ts b/src/pages/Evaluation/projectManager/ReviewResults/service.ts index bbce483..1a22745 100644 --- a/src/pages/Evaluation/projectManager/ReviewResults/service.ts +++ b/src/pages/Evaluation/projectManager/ReviewResults/service.ts @@ -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