From 5bac7bffb15d2b9ba20db11cf77f4e62aa639e19 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Mon, 10 Oct 2022 17:17:29 +0800 Subject: [PATCH] =?UTF-8?q?10.10=20=E5=A4=96=E5=8D=8F=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JudgingPanel/List/OutsourcingManage.tsx | 321 ++++++++++++++++++ .../JudgingPanel/List/index.tsx | 15 + .../ProjectManager/JudgingPanel/List/list.tsx | 8 - .../JudgingPanel/List/service.ts | 10 + src/pages/ZZhaoMu/JudgingPanel/index.tsx | 15 + 5 files changed, 361 insertions(+), 8 deletions(-) create mode 100644 src/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage.tsx delete mode 100644 src/pages/Tender/ProjectManager/JudgingPanel/List/list.tsx diff --git a/src/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage.tsx b/src/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage.tsx new file mode 100644 index 0000000..605bf3c --- /dev/null +++ b/src/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage.tsx @@ -0,0 +1,321 @@ +import ExpertPhotoUpload from "@/components/ElecBidEvaluation/ExpertPhotoUpload"; +import { btnAuthority } from "@/utils/authority"; +import { downloadPath } from "@/utils/DownloadUtils"; +import ProTable, { ProColumns } from "@ant-design/pro-table"; +import { Button, Collapse, Modal, Spin, Image, Popconfirm, Drawer, Form, Input, Row, Col, Select, message } from "antd"; +import React, { useEffect, useState } from "react"; +import './judgList.less'; +import '@/assets/xsy_style.less'; +import { saveAssistPeople } from "./service"; + +interface OutsourcingManageProps { + modalVisible: boolean, + onCancel: () => void, + onSubmit: () => void,//保存回调 + open: boolean,//评委会里是否有开启评标的评审室 true有开启的 false无 + assistData: any[],//协办人数据 + assistNumber: string,//协办人数量 + juryId: string,//评委会id +} +const formLayoutDrawer = { labelCol: { span: 8 }, wrapperCol: { span: 16 }, }; +const tailLayoutDrawer = { wrapperCol: { offset: 8, span: 20 }, }; + +/** + * 协办管理 + * @param props + * @returns + */ +const OutsourcingManage: React.FC = (props) => { + const modalHeight = window.innerHeight * 96 / 100; + const { Panel } = Collapse; + const { Option } = Select; + const [formMem] = Form.useForm(); + const { modalVisible, onCancel, onSubmit, open, assistData = [], assistNumber = "0", juryId } = props; + + //loading + const [loading, setLoading] = useState(false); + //录入协办人员 drawerVisible + const [add, setAdd] = useState(false); + //协办人员数据 + const [dataSource, setDataSource] = useState([]); + //协办人员-修改存key + const [updateKeyMem, updateKeyMemSet] = useState(-1); + //删除回调 + const confirmMem = async (record: any) => { + const dataTem = [...dataSource]; + dataTem.map((item: any, index: any) => { + if (item.key == record.key) { + dataTem.splice(index, 1); + } + }); + setDataSource(dataTem); + } + + const columnsMember: ProColumns[] = [//成员管理页面表格 + { title: '序号', valueType: 'index', width: 50, }, + { title: '姓名', dataIndex: 'name', }, + { title: '手机号码', dataIndex: 'mobile', }, + { title: '证件号码', dataIndex: 'certificate', }, + { title: '工作单位', dataIndex: 'workunit', }, + { + title: '照片', + dataIndex: 'faceId', + render: (_, record) => { + if (record.faceId) { + // return downloadFile({ uid: record.faceId })}>{record.name} + return { + return ( + <> + + { confirmMem(record); }} + okText="确定" + cancelText="取消" + > + + + + ); + } + }, + ]; + + useEffect(() => { + setDataSource(assistData); + return () => { + updateKeyMemSet(-1); + setDataSource([]); + setLoading(false); + setAdd(false); + } + }, [assistData]); + + return ( + <> + { + // setMemberVis(false); + // reset(); + // }} + onOk={() => { + if (Number(assistNumber) == dataSource.length) { + const params = { + juryId, + assistList: [...dataSource], + } + setLoading(true); + saveAssistPeople(params).then(res => { + if (res?.code == 200) { + message.success('保存成功!'); + onSubmit(); + } + }).finally(() => { + setLoading(false); + }) + } else { + message.error('协办人数不符合规定!'); + } + }} + onCancel={onCancel} + > + +
+

协办人员管理

+
+ + + + [ + + ]} + /> + + +
+ { setAdd(false) }} + visible={add} + getContainer={false} + style={{ position: 'absolute' }} + > +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + ) +} + +export default OutsourcingManage; \ No newline at end of file diff --git a/src/pages/Tender/ProjectManager/JudgingPanel/List/index.tsx b/src/pages/Tender/ProjectManager/JudgingPanel/List/index.tsx index 7a830e1..2e3ec9b 100644 --- a/src/pages/Tender/ProjectManager/JudgingPanel/List/index.tsx +++ b/src/pages/Tender/ProjectManager/JudgingPanel/List/index.tsx @@ -15,6 +15,7 @@ import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointmen import { downloadPath } from '@/utils/DownloadUtils'; import ExpertPhotoUpload from '@/components/ElecBidEvaluation/ExpertPhotoUpload'; import { sortBy } from 'lodash'; +import OutsourcingManage from './OutsourcingManage'; const JudgingPanel: React.FC<{}> = () => { const modalHeight = window.innerHeight * 96 / 100; @@ -54,6 +55,7 @@ const JudgingPanel: React.FC<{}> = () => { const [appoType, setAppoType] = useState("0");//电子评标室-预约框状态 2022.8.29 zhoujianlong const [isReserve, setIsReserve] = useState("0");//电子评标室-是否预约评标室 2022.9.23 zhoujianlong 0-不预约 1-预约 const userData = getSessionUserData();//当前登录人用户信息 + const [assistVisible, setAssistVisible] = useState(false);//协办管理visible 2022.10.10 zhoujianlong function getShouName() { const method = getProMethod(); @@ -163,6 +165,13 @@ const JudgingPanel: React.FC<{}> = () => { memberCountSet(memberCount + 1); setMemberVis(true); }}>成员管理 + {record.assistNumber != null && } {record.elecEvalRoomReserve && (record.elecEvalRoomReserve.status == -1 || record.elecEvalRoomReserve.status == 0) && + {record.assistNumber != null && } {record.elecEvalRoomReserve && (record.elecEvalRoomReserve.status == -1 || record.elecEvalRoomReserve.status == 0) &&