增加录入专家来源和附件
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Upload, Image, InputNumber } from 'antd'
|
||||
import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Upload, Radio, InputNumber } from 'antd'
|
||||
import ProTable, { ActionType, EditableProTable, ProColumns } from '@ant-design/pro-table';
|
||||
import tableProps from '@/utils/tableProps';
|
||||
import { getList, saveGroup, delOne, saveMember, changeEx, queryVoList, changeMember, applyFor, roomStatus, juryTem, rePassWord, getUserPhoto, unlockAccount, getCrotchListUsingGET, getSecs } from './service';
|
||||
@ -12,9 +12,10 @@ import FileDown from '@/utils/Download';
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import RiskPrevention from '@/utils/RiskPrevention';
|
||||
import { downloadPath } from '@/utils/DownloadUtils';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
// import { downloadPath } from '@/utils/DownloadUtils';
|
||||
import { sortBy } from 'lodash';
|
||||
import ExpertSchemeProfessionalInfo from './ExpertSchemeProfessionalInfo';
|
||||
// import ExpertSchemeProfessionalInfo from './ExpertSchemeProfessionalInfo';
|
||||
|
||||
const JudgingPanel: React.FC<{}> = () => {
|
||||
const modalHeight = window.innerHeight * 96 / 100;
|
||||
@ -46,7 +47,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
// const [manNum, manNumSet] = useState<number>(5);//人数
|
||||
const [riskVisible, setRiskVisible] = useState<boolean>(false);//风控弹窗 2021.9.7 zhoujianlong
|
||||
const [riskData, setRiskData] = useState<any[]>([]);//风控数据 2021.9.7 zhoujianlong
|
||||
// const [userPhotoId, setUserPhotoId] = useState<string>("");//电子评标室-录入外部专家-相片id 2022.8.29 zhoujianlong
|
||||
// const [userPhotoId, setUserPhotoId] = useState<string>("");//电子评标室-录入专家-相片id 2022.8.29 zhoujianlong
|
||||
const userData = getSessionUserData();//当前登录人用户信息
|
||||
|
||||
const [professionalMap, setProfessionalMap] = useState<any>();
|
||||
@ -890,7 +891,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
};
|
||||
|
||||
//成员管理
|
||||
const [add, setAdd] = useState<boolean>(false);//录入外部专家Drawer显隐
|
||||
const [add, setAdd] = useState<boolean>(false);//录入专家Drawer显隐
|
||||
const [changeMan, changeManSet] = useState<boolean>(false);//更换Drawer显隐
|
||||
const [juryId, juryIdSet] = useState<any>('');//更换专家所需评委会id
|
||||
const [reason, reasonSet] = useState<any>('');//更换专家原因
|
||||
@ -908,6 +909,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
const [changeMemberId, changeMemberIdSet] = useState<any>('');//更换专家id
|
||||
const [changeBtn, changeBtnSet] = useState<any>(true);//更换按钮显隐
|
||||
const [formMem] = Form.useForm();
|
||||
const formMemSourceType = Form.useWatch('sourceType', formMem);
|
||||
function reset() {//重置
|
||||
categorySet([]);
|
||||
luruSet(0);
|
||||
@ -1099,7 +1101,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
message.error('录入人数已满')
|
||||
}
|
||||
}}
|
||||
> 录入外部专家</Button>
|
||||
> 录入专家</Button>
|
||||
]}
|
||||
/>
|
||||
</Panel>
|
||||
@ -1123,7 +1125,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
} else {
|
||||
message.error('录入人数已满')
|
||||
}
|
||||
}}> 录入外部专家</Button>
|
||||
}}> 录入专家</Button>
|
||||
]}
|
||||
/>
|
||||
</Panel>
|
||||
@ -1147,7 +1149,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
} else {
|
||||
message.error('录入人数已满')
|
||||
}
|
||||
}}> 录入外部专家</Button>
|
||||
}}> 录入专家</Button>
|
||||
]}
|
||||
/>
|
||||
</Panel>
|
||||
@ -1171,7 +1173,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
} else {
|
||||
message.error('录入人数已满')
|
||||
}
|
||||
}}> 录入外部专家</Button>
|
||||
}}> 录入专家</Button>
|
||||
]}
|
||||
/>
|
||||
</Panel>
|
||||
@ -1195,7 +1197,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
// } else {
|
||||
// message.error('录入人数已满')
|
||||
// }
|
||||
// }}> 录入外部专家</Button>
|
||||
// }}> 录入专家</Button>
|
||||
]}
|
||||
/>
|
||||
</Panel>
|
||||
@ -1253,7 +1255,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
return (
|
||||
<>
|
||||
<Drawer
|
||||
title="录入外部专家"
|
||||
title="录入专家"
|
||||
placement="right"
|
||||
width={'50%'}
|
||||
onClose={() => {
|
||||
@ -1261,11 +1263,21 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
changeBtnSet(true);
|
||||
// formMem.resetFields();
|
||||
}}
|
||||
visible={add}
|
||||
open={add}
|
||||
getContainer={false}
|
||||
style={{ position: 'absolute' }}
|
||||
>
|
||||
<Form {...formLayoutDrawer} form={formMem}>
|
||||
<Row><Col span={24}><FormItem
|
||||
name="sourceType"
|
||||
label="专家来源"
|
||||
rules={rule('专家来源')}
|
||||
>
|
||||
<Radio.Group>
|
||||
<Radio value="0">集团内部专家</Radio>
|
||||
<Radio value="1">集团外部专家</Radio>
|
||||
</Radio.Group>
|
||||
</FormItem></Col></Row>
|
||||
<Row><Col span={24}><FormItem
|
||||
name="mobile"
|
||||
label="手机号"
|
||||
@ -1326,6 +1338,12 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
>
|
||||
<Input style={{ width: "60%" }} onChange={onCertificateChange} />
|
||||
</FormItem></Col></Row>
|
||||
{formMemSourceType === '1' ? (<Row><Col span={24}><FormItem
|
||||
name="fileId"
|
||||
label="上传证明文件"
|
||||
>
|
||||
<ExtendUpload bid={formMem.getFieldValue('fileId')} btnName='选择文件' maxCount={1} uploadProps={{ name: 'fileId', accept: '.jpg,.png,.pdf' }} />
|
||||
</FormItem></Col></Row>) : null}
|
||||
<Row><Col span={24}><FormItem {...tailLayoutDrawer}>
|
||||
<Button type="primary" loading={loading} hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase']) || !changeBtn} onClick={async () => {
|
||||
loadingSet(true);
|
||||
@ -1670,7 +1688,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
dataSet(dataTem, type);
|
||||
memberCountSet(memberCount + 1);
|
||||
}
|
||||
//录入外部专家-获取照片
|
||||
//录入专家-获取照片
|
||||
const getExpertPhoto = () => {
|
||||
formMem.validateFields(["certificate"]).then(value => {
|
||||
getUserPhoto(value.certificate).then(res => {//获取照片
|
||||
@ -1710,7 +1728,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
form.setFieldsValue({ startTime, endTime });
|
||||
}
|
||||
return (
|
||||
<div className='bgCWhite' style={{ padding: '0px 24px 24px' }}>
|
||||
<div className='bgCWhite' style={{ padding: '0px 0 24px' }}>
|
||||
<Spin spinning={spin}>
|
||||
<ProTable
|
||||
key='proTable6'
|
||||
|
Reference in New Issue
Block a user