From 8e23c61ea2cc193f7f24d96fe0aad144daaca8f6 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Wed, 28 Sep 2022 14:51:23 +0800 Subject: [PATCH] =?UTF-8?q?9.28=201=E3=80=81=E5=BC=82=E5=B8=B8=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E4=BC=98=E5=8C=96=202=E3=80=81=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=EF=BC=8C=E8=AF=84=E5=AE=A1=E4=B8=AD=E9=A1=B9=E7=9B=AE=EF=BC=8C?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=90=8D=E7=A7=B0=E5=8A=A0=E5=AF=86?= =?UTF-8?q?=203=E3=80=81=E8=AF=84=E5=A7=94=E4=BC=9A=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E8=AF=84=E6=A0=87=E5=AE=A4=E9=A2=84=E7=BA=A6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ElecBidEvaluation/BidEvalAppointment.tsx | 11 +- .../ElecBidEvaluation/MeetingReservation.tsx | 4 +- src/pages/BidEvaluation/manager.js | 3 +- .../MonitorScreen/Home/index.tsx | 4 + .../MonitorScreen/Home/style.less | 20 +- .../MonitorScreen/MonitorRoom/index.tsx | 24 +- .../MonitorScreen/MonitorRoom/style.less | 9 + .../ProjectMonitorRoom/index.tsx | 63 +- .../ProjectMonitorRoom/service.ts | 14 +- .../ProjectMonitorRoom/style.less | 33 +- .../JudgingPanel/List/index.tsx | 1138 ++++++++++------- src/pages/ZZhaoMu/JudgingPanel/index.tsx | 941 ++++++++------ 12 files changed, 1312 insertions(+), 952 deletions(-) diff --git a/src/components/ElecBidEvaluation/BidEvalAppointment.tsx b/src/components/ElecBidEvaluation/BidEvalAppointment.tsx index f55b424..3fc5e3f 100644 --- a/src/components/ElecBidEvaluation/BidEvalAppointment.tsx +++ b/src/components/ElecBidEvaluation/BidEvalAppointment.tsx @@ -13,6 +13,7 @@ interface BidEvalAppointmentProps { onSubmit: (value: any) => void; reload: () => void; values: any; + initValue: any;//预约时间初始值 type: string; //0-选择评标室 1-修改预约 2-重评预约评标室 } @@ -54,7 +55,7 @@ export const proviceEnum = { const modalHeight = window.innerHeight * 96 / 100; const BidEvalAppointment: React.FC = (props) => { - const { modalVisible, onCancel, onSubmit, reload, values, type } = props; + const { modalVisible, onCancel, onSubmit, reload, values, initValue, type } = props; const actionRef = useRef(); const [form] = Form.useForm(); //项目id @@ -190,6 +191,10 @@ const BidEvalAppointment: React.FC = (props) => { setDisabledMap({}); }, [values]) + useEffect(() => { + initValue && form.setFieldsValue({ ...initValue, reserveStartDate: initValue.startTime, reserveEndDate: initValue.endTime }); + }, [initValue, modalVisible]) + useEffect(() => { selectedRowKeys.length > 0 && getDisabledTime(selectedRowKeys); }, [selectedRowKeys]) @@ -301,7 +306,7 @@ const BidEvalAppointment: React.FC = (props) => { rules={[{ required: true, message: '请选择' }]} extra={预约时间范围 7:00 ~ 18:00} > - otherDisabledDateTime(current, disabledMap)} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => "注:若时间被占用,则置灰不可选"} /> + otherDisabledDateTime(current, disabledMap, "startTime")} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => 注:若时间被占用,则置灰不可选} /> @@ -310,7 +315,7 @@ const BidEvalAppointment: React.FC = (props) => { name="reserveEndDate" rules={[{ required: true, message: '请选择' }]} > - otherDisabledDateTime(current, disabledMap)} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => "注:若时间被占用,则置灰不可选"} /> + otherDisabledDateTime(current, disabledMap, "endTime")} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => 注:若时间被占用,则置灰不可选} /> diff --git a/src/components/ElecBidEvaluation/MeetingReservation.tsx b/src/components/ElecBidEvaluation/MeetingReservation.tsx index 2c9803b..4511b3a 100644 --- a/src/components/ElecBidEvaluation/MeetingReservation.tsx +++ b/src/components/ElecBidEvaluation/MeetingReservation.tsx @@ -37,13 +37,13 @@ export const disabledDateTime = () => ({ disabledHours: () => [...range(0, 7), ...range(19, 24)], }); //不可选小时(额外不可选) -export const otherDisabledDateTime = (current: any, disabledMap: any) => { +export const otherDisabledDateTime = (current: any, disabledMap: any, type: string) => { let otherHour: any[] = range(0, 24); if (current) { otherHour = []; if (Object.keys(disabledMap).length != 0) { const time = moment(current).format("yyyy-MM-DD"); - disabledMap[time] && (otherHour = [...disabledMap[time]]); + disabledMap[time] && (otherHour = [...disabledMap[time][type]]); } } return ({ diff --git a/src/pages/BidEvaluation/manager.js b/src/pages/BidEvaluation/manager.js index 7ca015d..214650f 100644 --- a/src/pages/BidEvaluation/manager.js +++ b/src/pages/BidEvaluation/manager.js @@ -128,7 +128,8 @@ class manager extends PureComponent { //评委会设置 onJurySet = (record) => { this.savePageAndParams(); - this.props.dispatch(routerRedux.push(`/ProjectLayout/JudgingPanel?roomId=${record.id}&secId=${record.sectionId}`)) + history.push({ pathname: '/ProjectLayout/JudgingPanel', state: { roomId: record.id, secId: record.sectionId, openTime: record.openTime } }); + // this.props.dispatch(routerRedux.push(`/ProjectLayout/JudgingPanel?roomId=${record.id}&secId=${record.sectionId}&openTime=${record.openTime}`)); } //创建评审室 onCreateClick = async () => { diff --git a/src/pages/ElecEvaluation/MonitorScreen/Home/index.tsx b/src/pages/ElecEvaluation/MonitorScreen/Home/index.tsx index 2779b8a..d587b47 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/Home/index.tsx +++ b/src/pages/ElecEvaluation/MonitorScreen/Home/index.tsx @@ -826,6 +826,10 @@ export default () => { className="screen-table" rowKey="id" size="small" + scroll={{ + y: 200, + scrollToFirstRowOnChange: true, + }} dataSource={bidProjectData} columns={evalColumn} onRow={record => { diff --git a/src/pages/ElecEvaluation/MonitorScreen/Home/style.less b/src/pages/ElecEvaluation/MonitorScreen/Home/style.less index 9584890..bd45d0d 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/Home/style.less +++ b/src/pages/ElecEvaluation/MonitorScreen/Home/style.less @@ -87,14 +87,6 @@ .screen-warn-list { height: 67.4%; margin-top: 0; - - ::-webkit-scrollbar { - display: none; - } - - .ant-table-cell-scrollbar { - display: none; - } } .screen-graph-top { @@ -372,8 +364,8 @@ } .screen-table { - margin-top: 0.5rem; - height: calc(100% - 40px - 0.5rem); + margin-top: 0.25rem; + height: calc(100% - 40px - 0.25rem); overflow: hidden; .ant-table-container table>thead>tr:first-child th:first-child { @@ -409,4 +401,12 @@ .ant-table-small .ant-table-thead>tr>th { background-color: #045da8; } + + ::-webkit-scrollbar { + display: none; + } + + .ant-table-cell-scrollbar { + display: none; + } } \ No newline at end of file diff --git a/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/index.tsx b/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/index.tsx index 9c9cdce..6353c3f 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/index.tsx +++ b/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/index.tsx @@ -1,10 +1,8 @@ -import { Button, Col, Input, List, message, PaginationProps, Row, Tag, Tooltip } from "antd" -import moment from "moment"; +import { Button, Col, Input, List, message, Row, Tag, Tooltip } from "antd" import '../Home/style.less' import './style.less'; import content_title from '@/assets/screen/content_title.png' import React, { useEffect, useRef, useState } from "react" -import { LeftCircleOutlined, RightCircleOutlined } from "@ant-design/icons"; import { getMonitorList } from "./service"; import { isNotEmpty } from "@/utils/CommonUtils"; import { history } from "umi"; @@ -139,15 +137,15 @@ const provinceList = [{ "provincesRemark": "新疆", },]; -const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) => { - if (type === 'prev') { - return ; - } - if (type === 'next') { - return ; - } - return originalElement; -}; +// const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) => { +// if (type === 'prev') { +// return ; +// } +// if (type === 'next') { +// return ; +// } +// return originalElement; +// }; export const homeClick = () => { history.push("/ElecMonitorScreen/Home"); } @@ -332,7 +330,9 @@ export default () => { grid={{ gutter: 16, column: 3 }} pagination={{ defaultPageSize: 6, + showSizeChanger: false, onChange: onPageChange, + current: pageNo.current, total: totalItem, showTotal: (total, range) => `当前第 ${range[0]}-${range[1]} 条,共计 ${total} 条`, // itemRender diff --git a/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/style.less b/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/style.less index 0b143c0..30961fc 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/style.less +++ b/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/style.less @@ -476,6 +476,15 @@ .ant-pagination-prev { margin-right: 0.5rem; } + + .ant-pagination-item-ellipsis { + color: #8de3f3; + } + + .ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon, + .ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon { + color: #8de3f3; + } } } \ No newline at end of file diff --git a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/index.tsx b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/index.tsx index d546cad..ea9c436 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/index.tsx +++ b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/index.tsx @@ -1,4 +1,4 @@ -import { Col, Radio, Row, Table, Tag, Tooltip, Image, Drawer } from "antd" +import { Col, Radio, Row, Table, Tooltip, Image, Drawer } from "antd" import React, { useEffect, useRef, useState } from "react" import { EarlyWarn, LocalTime, onCell, onHeaderCell } from "../Home"; import '../Home/style.less' @@ -6,13 +6,13 @@ import '../MonitorRoom/style.less' import './style.less'; import warn_icon_01 from '@/assets/screen/warn_icon_01.png' import warn_icon_02 from '@/assets/screen/warn_icon_02.png' -import { getBidRoomData, getCameraList, getExpertReports, getLookBackList } from "./service"; +import { getAllStranger, getBidRoomData, getCameraList, getExpertReports, getLookBackList } from "./service"; import { bidStatusMap, homeClick, previousClick } from "../MonitorRoom"; import { getWarnData } from "../Home/service"; import ScreenVideoPlay from "@/components/ElecBidEvaluation/ScreenVideoPlay"; import { pictureDisplayPath } from "@/utils/DownloadUtils"; import { getURLInformation } from "@/utils/CommonUtils"; -import { getDicData } from "@/utils/session"; +import { getDicData, getSessionRoleData } from "@/utils/session"; const statusMap = ["未报道", "已报道"]; @@ -126,6 +126,8 @@ export default (props: any) => { const [caremaList, setCaremaList] = useState([]); //报道列表 const [expertList, setExpertList] = useState([]); + //陌生人预警-进行中 + const [strangerList, setStrangerList] = useState([]); //陌生人预警-回看 const [backStrangerList, setBackStrangerList] = useState([]); //人数预警-回看 @@ -142,6 +144,8 @@ export default (props: any) => { const zoomImg = useRef(null); //定时刷新间隔 const _time = 10000; + //当前登录人角色 + const roleCode = getSessionRoleData()?.roleCode; const onChange = (e: any) => { setBtnSelect(e.target.value); @@ -182,7 +186,7 @@ export default (props: any) => { getCaremaData(data);//获取监控点列表 if (data.status == "2") {//评标结束-回看 getBackList("2");//数量预警 - getBackList("3");//陌生人预警 + roleCode == "ebtp-watcher" && getBackList("3");//陌生人预警 } } }) @@ -193,6 +197,7 @@ export default (props: any) => { if (res?.code == 200) { const data = res?.data; setEarlyWarnData(data); + (roleCode == "ebtp-watcher" && data?.strangerDetails) && setStrangerList(data.strangerDetails.slice(0, 5)); } }) } @@ -203,10 +208,6 @@ export default (props: any) => { const data = res?.data; setCaremaList(data); if (data?.length > 0) { - //获取回看时间 - // getCaremaBackList(monitorId).then(response => { - // if (response?.code == 200) { - // const backData = response?.data; setCameraSelect(data[0].id); setCameraParams(data[0].platform); setTimeout(() => { @@ -216,8 +217,6 @@ export default (props: any) => { videoRef.current?.play(data[0].deviceCode); } }, 4000); - // } - // }) } } }) @@ -233,12 +232,24 @@ export default (props: any) => { } //获取告警-回看数据 const getBackList = (type: string) => { - getLookBackList({ reserveId: monitorId, type }).then(res => { + getLookBackList({ reserveId: monitorId, type, pageNo: 1, pageSize: type == "3" ? 1 : 5 }).then(res => { if (res?.code == 200) { const data = res?.data.records; if (type == "2") {//2-人数预警 setBackNumberList(data); } else if (type == "3") {//3-陌生人预警 + data.length > 0 && setBackStrangerList(data[0].details.slice(0, 5)); + } + } + }) + } + //获取陌生人告警-全部告警 + const getAllStrangerList = () => { + getAllStranger({ reserveId: monitorId }).then(res => { + if (res?.code == 200) { + const data = res?.data; + if (data && data.length > 0) { + setStrangerList(data); setBackStrangerList(data); } } @@ -293,6 +304,7 @@ export default (props: any) => { getRoomData(); getWarnInfo(); getExpertList(); + if (roleCode == "ebtp-site-supervision" || roleCode == "ebtp-after-supervision") { getAllStrangerList(); } }, []) //定时器 useEffect(() => { @@ -301,6 +313,7 @@ export default (props: any) => { interval = setInterval(function () { getWarnInfo(); getExpertList(); + if (roleCode == "ebtp-site-supervision" || roleCode == "ebtp-after-supervision") { getAllStrangerList(); } }, _time); } return () => { @@ -350,7 +363,7 @@ export default (props: any) => {
{basicInfo?.areaName}
-
{bidStatusMap[basicInfo?.status]}
+
{basicInfo?.status &&
{bidStatusMap[basicInfo?.status]}
}
@@ -365,12 +378,16 @@ export default (props: any) => { -
- 供应商名称({basicInfo?.supplierLength}): - {basicInfo?.sectionPayerList?.map((item: any) =>

{item.sectionName}({item.payerNumber}):{item.payerNames.join("、")}

)}} visible={visible} color="rgba(4,20,47,0.85)" overlayInnerStyle={{ width: '250%' }} overlayClassName="screen-tag"> - {basicInfo?.sectionPayerList?.[0]?.payerNames.slice(0, 5).join("、")} setVisible(true)} onMouseLeave={() => setVisible(false)}>全部 -
-
+ {basicInfo?.status == "2" ? ( +
+ 供应商数量({basicInfo?.supplierLength}): + {basicInfo?.sectionPayerList?.map((item: any, index: any) =>

{item.sectionName}({item.payerNumber}):{item.payerNames.join("、")}

)}} visible={visible} color="rgba(4,20,47,0.85)" overlayInnerStyle={{ width: '250%' }} overlayClassName="screen-tag"> + {basicInfo?.sectionPayerList?.[0]?.sectionName}({basicInfo?.sectionPayerList?.[0]?.payerNumber}) setVisible(true)} onMouseLeave={() => setVisible(false)}>全部 +
+
+ ) : ( +
+ )} {/* */}
@@ -381,7 +398,7 @@ export default (props: any) => {
- {caremaList.map(item =>
onCaremaPlay(item)} key={item.id}>{item.deviceName}
)} + {caremaList.map((item, index) =>
onCaremaPlay(item)} key={index}>{item.deviceName}
)}
@@ -400,17 +417,17 @@ export default (props: any) => { {btnSelect == "0" ? (
{basicInfo?.status == "2" - ? backStrangerList.slice(0, 5).map((item: any, index: any) => ( + ? backStrangerList.map((item: any, index: any) => (
-

时间:{item.createDate}

+

时间:{item.eventTime}

- drawerClick(item.details[0].filePath)} /> + drawerClick(item.filePath)} />
)) - : earlyWarnData?.strangerDetails?.map((item: any, index: any) => ( + : strangerList.map((item: any, index: any) => (

时间:{item.eventTime}

diff --git a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/service.ts b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/service.ts index 2b1cd8f..3a0521c 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/service.ts +++ b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/service.ts @@ -56,4 +56,16 @@ export async function getLookBackList(params: any) { // return request('/api/biz-service-ebtp-evaluation/v1/eval/room/reserve/' + id, { // method: 'GET', // }); -// } \ No newline at end of file +// } + +/** + * 陌生人预警-查询全部 + * @param params + * @returns + */ +export async function getAllStranger(params: any) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/room/alarm/screamOfAlarm/strangerImg', { + method: 'GET', + params: params + }); +} \ No newline at end of file diff --git a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/style.less b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/style.less index cc47a1b..480fb85 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/style.less +++ b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/style.less @@ -259,23 +259,52 @@ text-align: center; .stranger-list { - height: calc(100% - 76px); + // height: calc(100% - 76px); + height: calc(100% - 36px); + overflow-y: auto; + overflow-x: hidden; + margin-top: 4px; .stranger-list-card { // border: 1px solid #2B5093; // background-color: #051666; border-bottom: 1px solid #5c6aa2; height: 20%; - margin-top: 8px; + // margin-top: 8px; padding: 8px; color: #99f6ff; display: flex; justify-content: space-between; + text-align: left; &>div>p>span { color: #fff; } } + + /*设置宽度,轨道颜色*/ + &::-webkit-scrollbar { + width: 6px; + height: 6px; + // padding-right: 3px; + } + + /*滚动条*/ + &::-webkit-scrollbar-thumb { + background: #b9bfd7; + border-radius: 10px; + } + + /*增加悬停样式*/ + &::-webkit-scrollbar-thumb:hover { + background: #dcdfeb; + } + + /*滚动轨道样式*/ + &::-webkit-scrollbar-track-piece { + background: #505e9a; + border-radius: 3px; + } } .ant-drawer-close { diff --git a/src/pages/Tender/ProjectManager/JudgingPanel/List/index.tsx b/src/pages/Tender/ProjectManager/JudgingPanel/List/index.tsx index f484d27..7a830e1 100644 --- a/src/pages/Tender/ProjectManager/JudgingPanel/List/index.tsx +++ b/src/pages/Tender/ProjectManager/JudgingPanel/List/index.tsx @@ -1,9 +1,9 @@ import React, { useEffect, useRef, useState } from 'react'; -import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Tabs, Upload, Image } from 'antd' +import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Upload, Image, Radio, RadioChangeEvent } from 'antd' import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; import { getList, getSecs, saveGroup, delOne, saveMember, changeEx, queryVoList, changeMember, applyFor, roomStatus, juryTem, rePassWord, getUserPhoto } from './service'; import moment from 'moment'; -import { getDefId, getProId, getProMethod, getSessionProjectData } from '@/utils/session'; +import { getDefId, getProId, getProMethod, getSessionProjectData, getSessionUserData } from '@/utils/session'; import { getURLInformation } from '@/utils/CommonUtils'; import './judgList.less'; import '@/assets/xsy_style.less'; @@ -12,8 +12,9 @@ import { UploadOutlined } from '@ant-design/icons'; import { btnAuthority } from '@/utils/authority'; import RiskPrevention from '@/utils/RiskPrevention'; import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment'; -import { downloadFile, downloadPath } from '@/utils/DownloadUtils'; +import { downloadPath } from '@/utils/DownloadUtils'; import ExpertPhotoUpload from '@/components/ElecBidEvaluation/ExpertPhotoUpload'; +import { sortBy } from 'lodash'; const JudgingPanel: React.FC<{}> = () => { const modalHeight = window.innerHeight * 96 / 100; @@ -27,7 +28,7 @@ const JudgingPanel: React.FC<{}> = () => { const { Panel } = Collapse; const { TextArea } = Input; const CheckboxGroup = Checkbox.Group; - const { TabPane } = Tabs; + // const { TabPane } = Tabs; const actionRef = useRef(); const [spin, spinSet] = useState(false); const [loading, loadingSet] = useState(false); @@ -39,32 +40,34 @@ const JudgingPanel: React.FC<{}> = () => { const [open, openSet] = useState(true);//评委会里是否有开启评标的评审室 true有开启的 false无 const [allEnd, allEndSet] = useState(true);//评委会关联标段的评审室是否都关闭了 // const [yushen, yushenSet] = useState(false);//是否预审 - const [readOnly, readOnlySet] = useState(true);//只读 + // const [readOnly, readOnlySet] = useState(true);//只读 const [disabled, disabledSet] = useState(true);//禁用 const [checkSectionName, checkSectionNameSet] = useState('');//查看 关联标包显示 const [showName, showNameSet] = useState({ zbr: '', bb: '', pb: '', });//字段名 - const [manNum, manNumSet] = useState(5);//人数 + // const [manNum, manNumSet] = useState(5);//人数 const [riskVisible, setRiskVisible] = useState(false);//风控弹窗 2021.9.7 zhoujianlong const [riskData, setRiskData] = useState([]);//风控数据 2021.9.7 zhoujianlong const [selectEvalVisible, setSelectEvalVisible] = useState(false);//电子评标室-评标室预约选择 2022.8.26 zhoujianlong - const [selectEvalDisabled, setSelectEvalDisabled] = useState(true);//电子评标室-评标室预约选择不可选状态控制 true-不可填写 false-可填写 2022.8.26 zhoujianlong const [selectEvalData, setSelectEvalData] = useState();//电子评标室-评标室预约选择-数据 2022.8.26 zhoujianlong + const [initEvalTime, setInitEvalTime] = useState();//电子评标室-时间输入框默认时间(跟随标段) 2022.9.27 zhoujianlong // const [userPhotoId, setUserPhotoId] = useState("");//电子评标室-录入外部专家-相片id 2022.8.29 zhoujianlong const [appoType, setAppoType] = useState("0");//电子评标室-预约框状态 2022.8.29 zhoujianlong + const [isReserve, setIsReserve] = useState("0");//电子评标室-是否预约评标室 2022.9.23 zhoujianlong 0-不预约 1-预约 + const userData = getSessionUserData();//当前登录人用户信息 function getShouName() { const method = getProMethod(); let showNameT: any = { zbr: '', bb: '', pb: '', }//相关标段 标书费 保证金 服务费 - let num = 3; + // let num = 3; if (method === 'procurement_mode_1' || method === 'procurement_mode_2') {//招标 showNameT = { zbr: '招标人', bb: '标段', pb: '评标', }; - num = 5; + // num = 5; } else if (method === 'procurement_mode_4') {//招募类 showNameT = { zbr: '采购人', bb: '包件', pb: '评审', } } else {//谈判类 showNameT = { zbr: '采购人', bb: '采购包', pb: '评审', } } - manNumSet(num); + // manNumSet(num); showNameSet(showNameT); } @@ -74,7 +77,7 @@ const JudgingPanel: React.FC<{}> = () => { const [checkedList, setCheckedList] = useState(); const [sectionCount, sectionCountSet] = useState(0);//控制获取标包 //创建控制 - const [activeKey, activeKeySet] = useState('1'); + // const [activeKey, activeKeySet] = useState('1'); //创建评委会小组 const saveG = async (fields: any) => { @@ -189,7 +192,9 @@ const JudgingPanel: React.FC<{}> = () => { cqDataSet(list); setModalVis(true); sectionCountSet(sectionCount + 1); - disabledSet(check); readOnlySet(check); + disabledSet(check); + // readOnlySet(check); + setSelectEvalData(record.elecEvalRoomReserve) checkSectionNameSet(record.sectionName); }}>{check ? '查看' : '修改'} ) @@ -241,13 +246,15 @@ const JudgingPanel: React.FC<{}> = () => { }; //创建修改 标包方法 - const onChangeCheckBox = (checkedList: string | any[]) => { + const onChangeCheckBox = (checkedList: any[]) => { setCheckedList(checkedList); + getEarliestTime(sections, checkedList, isReserve); setIndeterminate(!!checkedList.length && checkedList.length < sectionsVal.length); setCheckAll(checkedList.length === sectionsVal.length); }; const onCheckAllChange = (e: { target: { checked: any; }; }) => { setCheckedList(e.target.checked ? sectionsVal : []); + getEarliestTime(sections, e.target.checked ? sectionsVal : [], isReserve); setIndeterminate(false); setCheckAll(e.target.checked); }; @@ -294,15 +301,14 @@ const JudgingPanel: React.FC<{}> = () => { setSectionsVal(secVals); setIndeterminate(!!checked.length && checked.length < secVals.length); setCheckAll(checked.length === secVals.length); + updateData && String(updateData?.reserveStatus) == "1" && getEarliestTime(data, checked, String(updateData?.reserveStatus));//初始化赋值数据 }) : null; // roomType == 1 ? yushenSet(true) : null; }, [sectionCount]); useEffect(() => {//给表单赋值 - if (updateData?.reserveStatus == 1) { - setSelectEvalDisabled(false); - } + updateData && setIsReserve(String(updateData?.reserveStatus));//赋值给是否预约评标室 form.setFieldsValue({ juryType: updateData != undefined ? updateData.juryType : null, representativeNumber: updateData != undefined ? updateData.representativeNumber : null, @@ -322,7 +328,7 @@ const JudgingPanel: React.FC<{}> = () => { = () => { onCancel={() => { setModalVis(false); updateDataSet({}); - cqDataSet([]); - updateKeySet(-1); - activeKeySet('1'); + // cqDataSet([]); + // updateKeySet(-1); + // activeKeySet('1'); }} > - + {/* {tab1()} @@ -344,18 +350,19 @@ const JudgingPanel: React.FC<{}> = () => { {tab2()} - {cqDrawer()} + {cqDrawer()} */} + {tab1()} ) } - function changeTabs(key: any) { - if (key == 1) { - activeKeySet(key); - } else { - nextStep() - } - } + // function changeTabs(key: any) { + // if (key == 1) { + // activeKeySet(key); + // } else { + // nextStep() + // } + // } //人数校验 function checkMan(count: number, expCon: any) { let res = true; @@ -406,383 +413,263 @@ const JudgingPanel: React.FC<{}> = () => { } return res } - async function nextStep() {//下一步 - const formVals = form.getFieldsValue(); - let verify = false; - await form.validateFields().then(() => { - let juryRoomListTem: any = []; - verify = true; - checkedList != undefined ? checkedList.map((item: any) => { - const sectionId = item; - sections.map((item: any) => { - if (item.sectionId == sectionId) { - juryRoomListTem.push({ roomId: item.id, sectionId: sectionId, roomType: roomType }); - } - }); - juryRoomListSet(juryRoomListTem); - }) : verify = false; - //招标人数需要大于5 需要取项目类型 - const count = parseInt(formVals.representativeNumber) + parseInt(formVals.expertNumber); - if (verify) { - verify = checkMan(count, parseInt(formVals.expertNumber)); - } - const st = moment(formVals.startTime).format('yyyy-MM-DD HH:mm:ss'); - const et = moment(formVals.endTime).format('yyyy-MM-DD HH:mm:ss'); - if (st > et || st == et) {//校验时间 - verify = false; - message.error("预计开始时间应早于预计结束时间") - } - if (selectEvalData?.reserveStatus == "1") {//预约了评标室 - const selectStartTime = moment(selectEvalData.reserveStartDate).format('yyyy-MM-DD HH:mm:ss'); - const selectEndTime = moment(selectEvalData.reserveEndDate).format('yyyy-MM-DD HH:mm:ss'); - if (selectStartTime != st || selectEndTime != et) { - verify = false; - message.error("预约时间需与选择评标室中的预约时间相等"); - } - } - if (verify) { - activeKeySet('2'); - } - }); - } + // async function nextStep() {//下一步 + // const formVals = form.getFieldsValue(); + // let verify = false; + // await form.validateFields().then(() => { + // let juryRoomListTem: any = []; + // verify = true; + // checkedList != undefined ? checkedList.map((item: any) => { + // const sectionId = item; + // sections.map((item: any) => { + // if (item.sectionId == sectionId) { + // juryRoomListTem.push({ roomId: item.id, sectionId: sectionId, roomType: roomType }); + // } + // }); + // juryRoomListSet(juryRoomListTem); + // }) : verify = false; + // //招标人数需要大于5 需要取项目类型 + // const count = parseInt(formVals.representativeNumber) + parseInt(formVals.expertNumber); + // if (verify) { + // verify = checkMan(count, parseInt(formVals.expertNumber)); + // } + // const st = moment(formVals.startTime).format('yyyy-MM-DD HH:mm:ss'); + // const et = moment(formVals.endTime).format('yyyy-MM-DD HH:mm:ss'); + // if (st > et || st == et) {//校验时间 + // verify = false; + // message.error("预计开始时间应早于预计结束时间") + // } + // if (isReserve == "1") {//预约了评标室 + // const selectStartTime = moment(selectEvalData.reserveStartDate).format('yyyy-MM-DD HH:mm:ss'); + // const selectEndTime = moment(selectEvalData.reserveEndDate).format('yyyy-MM-DD HH:mm:ss'); + // if (selectStartTime != st || selectEndTime != et) { + // verify = false; + // message.error("预约时间需与选择评标室中的预约时间相等"); + // } + // } + // if (verify) { + // activeKeySet('2'); + // } + // }); + // } //添加抽取drawer const formLayoutDrawer = { labelCol: { span: 8 }, wrapperCol: { span: 16 }, }; const tailLayoutDrawer = { wrapperCol: { offset: 8, span: 20 }, }; - const [juryRoomList, juryRoomListSet] = useState([]); - const [cqData, cqDataSet] = useState([]);//抽取表格,提交时需要 - const [addCq, addCqSet] = useState(false);//添加抽取抽屉显示控制 - const [updateKey, updateKeySet] = useState(-1);//触发修改存key - const [formCq] = Form.useForm(); - const [display, displaySet] = useState(true); - const columnsCq: ProColumns[] = [//抽取表格 - { title: '序号', valueType: 'index', width: 50, }, - { - title: '专家分类', dataIndex: 'subCategory', - valueEnum: { - '1': { text: '技术', }, - '2': { text: '商务', }, - '3': { text: '法律', }, - '4': { text: '其它', }, - } - }, - { title: '需抽数量', dataIndex: 'extractNumber', }, - { - title: '抽取方式', dataIndex: 'extractMethod', - valueEnum: { - '1': { text: '外部录入', }, - '2': { text: '随机抽取', }, - } - }, - { title: '抽取规则要求', dataIndex: 'cqRude', }, - { - title: '操作', dataIndex: 'option', width: 100, - valueType: 'option', - render: (_, record) => { - return ( - <> - { - !disabled ? - <> - - { - let dataTem = [...cqData]; - dataTem.map((item: any, index: any) => { - if (item.key == record.key) { - dataTem.splice(index, 1) - } - }); - cqDataSet(dataTem); - }} - okText="确定" - cancelText="取消" - > - - - - : <> - } + // const [juryRoomList, juryRoomListSet] = useState([]); + const [cqData, cqDataSet] = useState([]);//抽取表格,提交时需要 + // const [addCq, addCqSet] = useState(false);//添加抽取抽屉显示控制 + // const [updateKey, updateKeySet] = useState(-1);//触发修改存key + // const [formCq] = Form.useForm(); + // const [display, displaySet] = useState(true); + // const columnsCq: ProColumns[] = [//抽取表格 + // { title: '序号', valueType: 'index', width: 50, }, + // { + // title: '专家分类', dataIndex: 'subCategory', + // valueEnum: { + // '1': { text: '技术', }, + // '2': { text: '商务', }, + // '3': { text: '法律', }, + // '4': { text: '其它', }, + // } + // }, + // { title: '需抽数量', dataIndex: 'extractNumber', }, + // { + // title: '抽取方式', dataIndex: 'extractMethod', + // valueEnum: { + // '1': { text: '外部录入', }, + // '2': { text: '随机抽取', }, + // } + // }, + // { title: '抽取规则要求', dataIndex: 'cqRude', }, + // { + // title: '操作', dataIndex: 'option', width: 100, + // valueType: 'option', + // render: (_, record) => { + // return ( + // <> + // { + // !disabled ? + // <> + // + // { + // let dataTem = [...cqData]; + // dataTem.map((item: any, index: any) => { + // if (item.key == record.key) { + // dataTem.splice(index, 1) + // } + // }); + // cqDataSet(dataTem); + // }} + // okText="确定" + // cancelText="取消" + // > + // + // + // + // : <> + // } - - ); - } - }, - ]; - const cqDrawer = () => {//添加抽取条件、修改 - return ( - <> - { addCqSet(false); updateKeySet(-1); formCq.resetFields(); }} - visible={addCq} - getContainer={false} - style={{ position: 'absolute' }} - > -
- - - - - - - - - - - - - - - - - - - - - -
- {/* - - - - - - - - - - - - - - - - - - - - 中国联通 - - - - - - - 中国联通 - - - - - - - 中国联通 - - - */} -
- - - -
-
- - ) - } + // + // ); + // } + // }, + // ]; + // const cqDrawer = () => {//添加抽取条件、修改 + // return ( + // <> + // { addCqSet(false); updateKeySet(-1); formCq.resetFields(); }} + // visible={addCq} + // getContainer={false} + // style={{ position: 'absolute' }} + // > + //
+ // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + //
+ // {/* + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // 中国联通 + // + // + // + // + // + // + // 中国联通 + // + // + // + // + // + // + // 中国联通 + // + // + // */} + //
+ // + // + // + //
+ //
+ // + // ) + // } const tab1 = () => {//cqtab1 return ( <> -

专家申请基本信息

+

关联{showName.bb}

- {/* { - display ? - - - - - - - - - : - - - - - - - - } */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

关联{showName.bb}

- = () => { { sections.map((item: any, index: any) => { return ( - + {item.sectionName} ) @@ -847,94 +734,339 @@ const JudgingPanel: React.FC<{}> = () => {
+

预约评标室

+
+ + + + + + + + +
+

专家申请基本信息

+
+ {/* { + display ? + + + + + + + + + : + + + + + + + + } */} + + + + + + + + {isReserve == "1" ? (//预约评标室 + + + + + + + + + + + ) : ( + + + + + + )} + + + + {isReserve == "1" && (//预约评标室 + + + + )} + + + + + + + {isReserve == "1" && (//预约评标室 + <> + + + + + + + + )} + +
) } - const tab2 = () => {//cqtab2 + // const tab2 = () => {//cqtab2 + // return ( + // <> + //
+ //

抽取条件

+ //
+ // + //
+ //
+ // + //
+ //

回避单位信息

+ //
+ // + //
+ //
+ //
+ //

回避专家信息

+ //
+ // + //
+ //
+ // + // ) + // } + const renderFooter = () => {//评审小组footer + // if (activeKey === '1') { + // return ( + // <> + // + // + // + // ); + // } + // if (activeKey === '2') { + // return ( + // <> + // + // + // + // + // ); + // } else { + // return (<>) + // } return ( <> -
-

抽取条件

-
- -
-
- -
-

回避单位信息

-
- -
-
-
-

回避专家信息

-
- -
-
- - ) - } - const renderFooter = () => {//评审小组footer - if (activeKey === '1') { - return ( - <> - - - - ); - } - if (activeKey === '2') { - return ( - <> - - - + - - ); - } else { - return (<>) - } + }) + + }}> + 完成 + + + ) }; //成员管理 @@ -1104,7 +1235,7 @@ const JudgingPanel: React.FC<{}> = () => { {type != undefined ? type.map((item: any) => { return ( - { + { let data = [...checkBoxs]; let status = { ...checkBoxsStatus }; if (e.target.checked) { @@ -1742,7 +1873,6 @@ const JudgingPanel: React.FC<{}> = () => { //评标室预约回调 const returnEvalData = (value: any) => { setSelectEvalVisible(false); - setSelectEvalDisabled(false); setSelectEvalData(value); form.setFieldsValue({ startTime: value.reserveStartDate, @@ -1779,18 +1909,29 @@ const JudgingPanel: React.FC<{}> = () => { getExpertPhoto(); } } + //是否预约评标室 + const onRadioChange = (e: RadioChangeEvent) => { + setIsReserve(e.target.value); + setSelectEvalData(null); + form.resetFields(["evalLocation", "startTime", "endTime", "reserveBy", "reserveContactNumber"]); + getEarliestTime(sections, checkedList, e.target.value); + }; + //获取选中包中最靠前的开标时间(评审开始时间) + const getEarliestTime = (packageData: any[], selectData: any[], reserve: string) => { + let selectPackageData = packageData.filter(item => selectData.includes(item.sectionId)); + let sortable = sortBy(selectPackageData, item => item.openTime);//按照开标时间排序 + let startTime = sortable?.[0]?.openTime ? moment(sortable[0].openTime).startOf("hour").add(1, 'h') : null; + let endTime = sortable?.[0]?.openTime ? moment(sortable[0].openTime).startOf("hour").add(3, 'h') : null; + if (reserve == "1") {//预约了评标室 + setInitEvalTime({ startTime, endTime, reserveBy: userData?.fullName, reserveContactNumber: userData?.mobilePhone, }); + } else { + setInitEvalTime(null); + form.setFieldsValue({ startTime, endTime }); + } + } return (
- {/* */} - } @@ -1811,8 +1952,11 @@ const JudgingPanel: React.FC<{}> = () => { // form.resetFields(); reset(); setSelectEvalData(null); + setInitEvalTime(null); sectionCountSet(sectionCount + 1); - disabledSet(false); readOnlySet(false); + disabledSet(false); + setIsReserve("0"); + // readOnlySet(false); }}> 创建评审小组 @@ -1846,7 +1990,7 @@ const JudgingPanel: React.FC<{}> = () => { data={riskData} />} {/**电子评标室-评标室预约选择 */} - setSelectEvalVisible(false)} onSubmit={(value: any) => returnEvalData(value)} values={selectEvalData} type={appoType} reload={() => actionRef.current?.reload()} /> + setSelectEvalVisible(false)} onSubmit={(value: any) => returnEvalData(value)} values={selectEvalData} initValue={initEvalTime} type={appoType} reload={() => actionRef.current?.reload()} />
) } diff --git a/src/pages/ZZhaoMu/JudgingPanel/index.tsx b/src/pages/ZZhaoMu/JudgingPanel/index.tsx index e1bd925..61f7a22 100644 --- a/src/pages/ZZhaoMu/JudgingPanel/index.tsx +++ b/src/pages/ZZhaoMu/JudgingPanel/index.tsx @@ -1,10 +1,9 @@ import React, { useEffect, useRef, useState } from 'react'; -import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Tabs, Upload, Image } from 'antd' +import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Upload, Image, RadioChangeEvent, Radio } from 'antd' import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; import { getList, saveGroup, delOne, saveMember, changeEx, queryVoList, changeMember, applyFor, roomStatus, juryTem, rePassWord } from './service'; import moment from 'moment'; -import { getProId, getProMethod, getDefId, getSessionProjectData, getRoomReturnURL } from '@/utils/session'; -import { getURLInformation } from '@/utils/CommonUtils'; +import { getProId, getProMethod, getDefId, getSessionProjectData, getRoomReturnURL, getSessionUserData } from '@/utils/session'; import './judgList.less'; import '@/assets/xsy_style.less'; import FileDown from '@/utils/Download'; @@ -12,24 +11,25 @@ import { UploadOutlined } from '@ant-design/icons'; import { btnAuthority } from '@/utils/authority'; import RiskPrevention from '@/utils/RiskPrevention'; import { history } from 'umi'; -import { downloadFile, downloadPath } from '@/utils/DownloadUtils'; +import { downloadPath } from '@/utils/DownloadUtils'; import ExpertPhotoUpload from '@/components/ElecBidEvaluation/ExpertPhotoUpload'; import { getUserPhoto } from '@/pages/Tender/ProjectManager/JudgingPanel/List/service'; import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment'; -const JudgingPanel: React.FC<{}> = () => { +const JudgingPanel: React.FC<{}> = (props: any) => { const modalHeight = window.innerHeight * 96 / 100; const proId = getProId(); - const roomType = getURLInformation('roomType'); - const roomId = getURLInformation('roomId'); - const sectionId = getURLInformation('secId'); + const roomType = "2"; + const roomId = props.location?.state?.roomId; + const sectionId = props.location?.state?.secId; + const openTime = props.location?.state?.openTime;//开始评审时间 const formLayout = { labelCol: { span: 8 }, wrapperCol: { span: 16 }, }; const FormItem = Form.Item; const [form] = Form.useForm(); const { Option } = Select; const { Panel } = Collapse; const { TextArea } = Input; - const { TabPane } = Tabs; + // const { TabPane } = Tabs; const actionRef = useRef(); const [spin, spinSet] = useState(false); const [loading, loadingSet] = useState(false); @@ -39,26 +39,28 @@ const JudgingPanel: React.FC<{}> = () => { const [open, openSet] = useState(false);//评委会里是否有开启评审的评审室 true有开启的 false无 const [allEnd, allEndSet] = useState(true);//评委会关联标段的评审室是否都关闭了 // const [yushen, yushenSet] = useState(false);//是否预审 - const [readOnly, readOnlySet] = useState(true);//只读 + // const [readOnly, readOnlySet] = useState(true);//只读 const [disabled, disabledSet] = useState(true);//禁用 - const [manNum, manNumSet] = useState(5);//人数 + // const [manNum, manNumSet] = useState(5);//人数 const [riskVisible, setRiskVisible] = useState(false);//风控弹窗 2021.9.7 zhoujianlong const [riskData, setRiskData] = useState([]);//风控数据 2021.9.7 zhoujianlong const [selectEvalVisible, setSelectEvalVisible] = useState(false);//电子评标室-评标室预约选择 2022.8.26 zhoujianlong - const [selectEvalDisabled, setSelectEvalDisabled] = useState(true);//电子评标室-评标室预约选择不可选状态控制 true-不可填写 false-可填写 2022.8.26 zhoujianlong const [selectEvalData, setSelectEvalData] = useState();//电子评标室-评标室预约选择-数据 2022.8.26 zhoujianlong + const [initEvalTime, setInitEvalTime] = useState();//电子评标室-时间输入框默认时间(跟随标段) 2022.9.27 zhoujianlong // const [userPhotoId, setUserPhotoId] = useState("");//电子评标室-录入外部专家-相片id 2022.8.29 zhoujianlong const [appoType, setAppoType] = useState("0");//电子评标室-预约框状态 2022.8.29 zhoujianlong - function getShouName() { - const method = getDefId(); - let num = 3; - if (method === 'procurement_mode_1' || method === 'procurement_mode_2' || method === 'procurement_mode_3') {//招标 - num = 5; - } - manNumSet(num); - } + const [isReserve, setIsReserve] = useState("0");//电子评标室-是否预约评标室 2022.9.23 zhoujianlong 0-不预约 1-预约 + const userData = getSessionUserData();//当前登录人用户信息 + // function getShouName() { + // const method = getDefId(); + // let num = 3; + // if (method === 'procurement_mode_1' || method === 'procurement_mode_2' || method === 'procurement_mode_3') {//招标 + // num = 5; + // } + // manNumSet(num); + // } //创建控制 - const [activeKey, activeKeySet] = useState('1'); + // const [activeKey, activeKeySet] = useState('1'); //创建评委会小组 const saveG = async (fields: any) => { @@ -161,7 +163,7 @@ const JudgingPanel: React.FC<{}> = () => { ]; useEffect(() => { getPage(); - getShouName();//人数判断 + // getShouName();//人数判断 }, []) async function getPage() { spinSet(true); @@ -192,7 +194,8 @@ const JudgingPanel: React.FC<{}> = () => { cqDataSet(list); setModalVis(true); disabledSet(check); - readOnlySet(check); + // readOnlySet(check); + setSelectEvalData(record.elecEvalRoomReserve); }}>{check ? '查看' : '修改'} ) } @@ -258,9 +261,8 @@ const JudgingPanel: React.FC<{}> = () => { } useEffect(() => {//给表单赋值 - if (updateData?.reserveStatus == 1) { - setSelectEvalDisabled(false); - } + updateData && setIsReserve(String(updateData?.reserveStatus));//赋值给是否预约评标室 + updateData && String(updateData?.reserveStatus) == "1" && getEarliestTime(openTime, String(updateData?.reserveStatus));//初始化赋值数据 form.setFieldsValue({ juryType: updateData != undefined ? updateData.juryType : null, representativeNumber: updateData != undefined ? updateData.representativeNumber : null, @@ -289,12 +291,12 @@ const JudgingPanel: React.FC<{}> = () => { onCancel={() => { setModalVis(false); updateDataSet({}); - cqDataSet([]); - updateKeySet(-1); - activeKeySet('1'); + // cqDataSet([]); + // updateKeySet(-1); + // activeKeySet('1'); }} > - + {/* {tab1()} @@ -302,18 +304,19 @@ const JudgingPanel: React.FC<{}> = () => { {tab2()} - {cqDrawer()} + {cqDrawer()} */} + {tab1()} ) } - function changeTabs(key: any) { - if (key == 1) { - activeKeySet(key); - } else { - nextStep() - } - } + // function changeTabs(key: any) { + // if (key == 1) { + // activeKeySet(key); + // } else { + // nextStep() + // } + // } //人数校验 function checkMan(count: number, expCon: any) { let res = true; @@ -323,7 +326,7 @@ const JudgingPanel: React.FC<{}> = () => { let manNumT = 5; if (method === 'procurement_mode_1' || method === 'procurement_mode_2') { - if (roomType == '1' && yushenType == 'open_tender_form_2') {//资格预审 自愿招标为3 + if (false && yushenType == 'open_tender_form_2') {//资格预审 自愿招标为3 manNumT = 3; } if (expCon < count * 2 / 3) { @@ -364,254 +367,268 @@ const JudgingPanel: React.FC<{}> = () => { } return res } - async function nextStep() {//下一步 - const formVals = form.getFieldsValue(); - let verify = false; - await form.validateFields().then(() => { - let juryRoomListTem: any = []; - juryRoomListTem.push({ roomId: roomId, sectionId: sectionId, roomType: roomType }); - verify = true; - juryRoomListSet(juryRoomListTem); - //采购人数需要大于5 需要取项目类型 - const count = parseInt(formVals.representativeNumber) + parseInt(formVals.expertNumber); + // async function nextStep() {//下一步 + // const formVals = form.getFieldsValue(); + // let verify = false; + // await form.validateFields().then(() => { + // let juryRoomListTem: any = []; + // juryRoomListTem.push({ roomId: roomId, sectionId: sectionId, roomType: roomType }); + // verify = true; + // juryRoomListSet(juryRoomListTem); + // //采购人数需要大于5 需要取项目类型 + // const count = parseInt(formVals.representativeNumber) + parseInt(formVals.expertNumber); - if (verify) { - verify = checkMan(count, parseInt(formVals.expertNumber)); - } - const st = moment(formVals.startTime).format('yyyy-MM-DD HH:mm:ss'); - const et = moment(formVals.endTime).format('yyyy-MM-DD HH:mm:ss'); - if (st > et || st == et) {//校验时间 - verify = false; - message.error("预计开始时间应早于预计结束时间") - } - if (selectEvalData?.reserveStatus == "1") {//预约了评标室 - const selectStartTime = moment(selectEvalData.reserveStartDate).format('yyyy-MM-DD HH:mm:ss'); - const selectEndTime = moment(selectEvalData.reserveEndDate).format('yyyy-MM-DD HH:mm:ss'); - if (selectStartTime != st || selectEndTime != et) { - verify = false; - message.error("预约时间需与选择评标室中的预约时间相等"); - } - } - if (verify) { - activeKeySet('2'); - } - }) - } + // if (verify) { + // verify = checkMan(count, parseInt(formVals.expertNumber)); + // } + // const st = moment(formVals.startTime).format('yyyy-MM-DD HH:mm:ss'); + // const et = moment(formVals.endTime).format('yyyy-MM-DD HH:mm:ss'); + // if (st > et || st == et) {//校验时间 + // verify = false; + // message.error("预计开始时间应早于预计结束时间") + // } + // if (selectEvalData?.reserveStatus == "1") {//预约了评标室 + // const selectStartTime = moment(selectEvalData.reserveStartDate).format('yyyy-MM-DD HH:mm:ss'); + // const selectEndTime = moment(selectEvalData.reserveEndDate).format('yyyy-MM-DD HH:mm:ss'); + // if (selectStartTime != st || selectEndTime != et) { + // verify = false; + // message.error("预约时间需与选择评标室中的预约时间相等"); + // } + // } + // if (verify) { + // activeKeySet('2'); + // } + // }) + // } //添加抽取drawer const formLayoutDrawer = { labelCol: { span: 8 }, wrapperCol: { span: 16 }, }; const tailLayoutDrawer = { wrapperCol: { offset: 8, span: 20 }, }; - const [juryRoomList, juryRoomListSet] = useState([]); + // const [juryRoomList, juryRoomListSet] = useState([]); const [cqData, cqDataSet] = useState([]);//抽取表格,提交时需要 - const [addCq, addCqSet] = useState(false);//添加抽取抽屉显示控制 - const [updateKey, updateKeySet] = useState(-1);//触发修改存key - const [formCq] = Form.useForm(); - const [display, displaySet] = useState(true); - const columnsCq: ProColumns[] = [//抽取表格 - { title: '序号', valueType: 'index', width: 50, }, - { - title: '专家分类', dataIndex: 'subCategory', - valueEnum: { - '1': { text: '技术', }, - '2': { text: '商务', }, - '3': { text: '法律', }, - '4': { text: '其它', }, - } - }, - { title: '需抽数量', dataIndex: 'extractNumber', }, - { - title: '抽取方式', dataIndex: 'extractMethod', - valueEnum: { - '1': { text: '外部录入', }, - '2': { text: '随机抽取', }, - } - }, - { title: '抽取规则要求', dataIndex: 'cqRude', }, - { - title: '操作', dataIndex: 'option', width: 100, - valueType: 'option', - render: (_, record) => { - return ( - <> - { - !disabled ? - <> - - { - let dataTem = [...cqData]; - dataTem.map((item: any, index: any) => { - if (item.key == record.key) { - dataTem.splice(index, 1) - } - }); - cqDataSet(dataTem); - }} - okText="确定" - cancelText="取消" - > - - - - : <> - } + // const [addCq, addCqSet] = useState(false);//添加抽取抽屉显示控制 + // const [updateKey, updateKeySet] = useState(-1);//触发修改存key + // const [formCq] = Form.useForm(); + // const [display, displaySet] = useState(true); + // const columnsCq: ProColumns[] = [//抽取表格 + // { title: '序号', valueType: 'index', width: 50, }, + // { + // title: '专家分类', dataIndex: 'subCategory', + // valueEnum: { + // '1': { text: '技术', }, + // '2': { text: '商务', }, + // '3': { text: '法律', }, + // '4': { text: '其它', }, + // } + // }, + // { title: '需抽数量', dataIndex: 'extractNumber', }, + // { + // title: '抽取方式', dataIndex: 'extractMethod', + // valueEnum: { + // '1': { text: '外部录入', }, + // '2': { text: '随机抽取', }, + // } + // }, + // { title: '抽取规则要求', dataIndex: 'cqRude', }, + // { + // title: '操作', dataIndex: 'option', width: 100, + // valueType: 'option', + // render: (_, record) => { + // return ( + // <> + // { + // !disabled ? + // <> + // + // { + // let dataTem = [...cqData]; + // dataTem.map((item: any, index: any) => { + // if (item.key == record.key) { + // dataTem.splice(index, 1) + // } + // }); + // cqDataSet(dataTem); + // }} + // okText="确定" + // cancelText="取消" + // > + // + // + // + // : <> + // } - - ); - } - }, - ]; - const cqDrawer = () => {//添加抽取条件、修改 - return ( - <> - { addCqSet(false); updateKeySet(-1); formCq.resetFields(); }} - visible={addCq} - getContainer={false} - style={{ position: 'absolute' }} - > -
- - - - - - - - - - - - - - - - - - - - - -
- {/* - - - - - - - - - - - - - - - - - - - - 中国联通 - - - - - - - 中国联通 - - - - - - - 中国联通 - - - */} -
- - - -
-
- - ) - } + // + // ); + // } + // }, + // ]; + // const cqDrawer = () => {//添加抽取条件、修改 + // return ( + // <> + // { addCqSet(false); updateKeySet(-1); formCq.resetFields(); }} + // visible={addCq} + // getContainer={false} + // style={{ position: 'absolute' }} + // > + //
+ // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + //
+ // {/* + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // 中国联通 + // + // + // + // + // + // + // 中国联通 + // + // + // + // + // + // + // 中国联通 + // + // + // */} + //
+ // + // + // + //
+ //
+ // + // ) + // } const tab1 = () => {//cqtab1 return ( <> +

预约评标室

+
+ + + + + + + + +

专家申请基本信息

{/* { @@ -652,31 +669,43 @@ const JudgingPanel: React.FC<{}> = () => { label="采购人代表数量" rules={[...rule('采购人代表数量'), { pattern: /^([1-9]?\d|100)$/, message: '请输入正确数值' }]} > - + - + - - + {isReserve == "1" ? (//预约评标室 + + + + + + + + + + + ) : ( + - + - - - - - + + )} = () => { > + {isReserve == "1" && (//预约评标室 + + + + )} = () => { format="YYYY-MM-DD HH:mm:ss" disabledDate={disabledDate} showTime={{ defaultValue: moment('00:00:00', 'HH:mm:ss') }} - disabled={disabled} + disabled={disabled || (isReserve == "1")} showNow={false} style={{ width: "90%" }} /> @@ -707,115 +745,196 @@ const JudgingPanel: React.FC<{}> = () => { format="YYYY-MM-DD HH:mm:ss" disabledDate={disabledDate} showTime={{ defaultValue: moment('00:00:00', 'HH:mm:ss') }} - disabled={disabled} + disabled={disabled || (isReserve == "1")} showNow={false} style={{ width: "90%" }} /> - - - - - - + {isReserve == "1" && (//预约评标室 + <> + + + + + + + + )}
) } - const tab2 = () => {//cqtab2 + // const tab2 = () => {//cqtab2 + // return ( + // <> + //
+ //

抽取条件

+ //
+ // + //
+ //
+ // + //
+ //

回避单位信息

+ //
+ // + //
+ //
+ //
+ //

回避专家信息

+ //
+ // + //
+ //
+ // + // ) + // } + const renderFooter = () => {//评审小组footer + // if (activeKey === '1') { + // return ( + // <> + // + // + // + // ); + // } + // if (activeKey === '2') { + // return ( + // <> + // + // + // + // + // ); + // } else { + // return (<>) + // } return ( <> -
-

抽取条件

-
- -
-
- -
-

回避单位信息

-
- -
-
-
-

回避专家信息

-
- -
-
- - ) - } - const renderFooter = () => {//评审小组footer - if (activeKey === '1') { - return ( - <> - - - - ); - } - if (activeKey === '2') { - return ( - <> - - - + - - ); - } else { - return (<>) - } + }) + + }}> + 完成 + + + ) }; //成员管理 @@ -984,7 +1103,7 @@ const JudgingPanel: React.FC<{}> = () => { {type != undefined ? type.map((item: any) => { return ( - { + { let data = [...checkBoxs]; let status = { ...checkBoxsStatus }; if (e.target.checked) { @@ -1506,7 +1625,7 @@ const JudgingPanel: React.FC<{}> = () => { ) } //上传文件 - const props = { + const uploadProps = { name: 'file', action: '/api/biz-service-ebtp-rsms/v1/jury/template/import', // headers: { @@ -1575,7 +1694,7 @@ const JudgingPanel: React.FC<{}> = () => { changeManSet(true) }}>更换专家 - +
@@ -1622,7 +1741,6 @@ const JudgingPanel: React.FC<{}> = () => { //评标室预约回调 const returnEvalData = (value: any) => { setSelectEvalVisible(false); - setSelectEvalDisabled(false); setSelectEvalData(value); form.setFieldsValue({ startTime: value.reserveStartDate, @@ -1645,9 +1763,8 @@ const JudgingPanel: React.FC<{}> = () => { const data = res?.data; if (data) { formMem.setFieldsValue({ faceId: data }); - message.info("获取专家照片成功"); } else { - message.info("当前专家无照片,请上传"); + formMem.setFieldsValue({ faceId: null }); } } }) @@ -1660,6 +1777,24 @@ const JudgingPanel: React.FC<{}> = () => { getExpertPhoto(); } } + //是否预约评标室 + const onRadioChange = (e: RadioChangeEvent) => { + setIsReserve(e.target.value); + setSelectEvalData(null); + form.resetFields(["evalLocation", "startTime", "endTime", "reserveBy", "reserveContactNumber"]); + getEarliestTime(openTime, e.target.value); + }; + //评审开始时间处理 + const getEarliestTime = (openTime: string | null | undefined, reserve: string) => { + let startTime = openTime ? moment(openTime).startOf("hour").add(1, 'h') : null; + let endTime = openTime ? moment(openTime).startOf("hour").add(3, 'h') : null; + if (reserve == "1") {//预约了评标室 + setInitEvalTime({ startTime, endTime, reserveBy: userData?.fullName, reserveContactNumber: userData?.mobilePhone, }); + } else { + setInitEvalTime(null); + form.setFieldsValue({ startTime, endTime }); + } + } return (
@@ -1672,7 +1807,11 @@ const JudgingPanel: React.FC<{}> = () => { // form.resetFields(); reset(); setSelectEvalData(null); - disabledSet(false); readOnlySet(false); + setInitEvalTime(null); + disabledSet(false); + setIsReserve("0"); + getEarliestTime(openTime, "0"); + // readOnlySet(false); }}>创建评审小组
@@ -1734,7 +1873,7 @@ const JudgingPanel: React.FC<{}> = () => { data={riskData} />} {/**电子评标室-评标室预约选择 */} - setSelectEvalVisible(false)} onSubmit={(value: any) => returnEvalData(value)} values={selectEvalData} type={appoType} reload={() => actionRef.current?.reload()} /> + setSelectEvalVisible(false)} onSubmit={(value: any) => returnEvalData(value)} values={selectEvalData} initValue={initEvalTime} type={appoType} reload={() => getPage()} />
) }