8.30 预约评标室
This commit is contained in:
@ -1,16 +1,19 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Col, DatePicker, Form, Input, message, Modal, Row } from 'antd';
|
||||
import { Col, DatePicker, Descriptions, Form, Input, message, Modal, Row } from 'antd';
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import { getBidEvalRoom } from './service';
|
||||
import { getBidEvalRoom, saveAppointmentEdit } from './service';
|
||||
import { dateFormat, disabledDate, disabledDateTime, validateMessages } from './MeetingReservation';
|
||||
import moment from 'moment';
|
||||
import { dateTimeFormatter } from '@/utils/DateUtils';
|
||||
import { getProId } from '@/utils/session';
|
||||
|
||||
interface BidEvalAppointmentProps {
|
||||
modalVisible: boolean;
|
||||
onCancel: () => void;
|
||||
onSubmit: (value: any) => void;
|
||||
reload: () => void;
|
||||
values: any;
|
||||
type: string; //0-选择评标室 1-修改预约
|
||||
}
|
||||
|
||||
export const proviceEnum = {
|
||||
@ -51,9 +54,11 @@ export const proviceEnum = {
|
||||
const modalHeight = window.innerHeight * 96 / 100;
|
||||
|
||||
const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
const { modalVisible, onCancel, onSubmit, values } = props;
|
||||
const { modalVisible, onCancel, onSubmit, reload, values, type } = props;
|
||||
const actionRef = useRef<ActionType>();
|
||||
const [form] = Form.useForm();
|
||||
//项目id
|
||||
const proId = getProId();
|
||||
//当前选择行areaId
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||
//当前选择行数据
|
||||
@ -106,51 +111,78 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
return;
|
||||
}
|
||||
form.validateFields().then(value => {
|
||||
if (value.reserveStartDate < moment().format(dateTimeFormatter)) {
|
||||
message.info("开始时间不可早于当前时间");
|
||||
if (moment(value.reserveStartDate).format(dateTimeFormatter) < moment().format(dateTimeFormatter)) {
|
||||
message.info("开始时间需晚于当前时间");
|
||||
return;
|
||||
}
|
||||
value["areaId"] = selectedRecord.id;
|
||||
value["placeId"] = selectedRecord.placeId;
|
||||
value["evalLocation"] = selectedRecord.areaName;
|
||||
onSubmit(value);
|
||||
if (moment(value.reserveEndDate).format(dateTimeFormatter) <= moment(value.reserveStartDate).format(dateTimeFormatter)) {
|
||||
message.info("结束时间需晚于开始时间");
|
||||
return;
|
||||
}
|
||||
if (type == "0") {//选择评标室
|
||||
value["areaId"] = selectedRecord.id;
|
||||
value["placeId"] = selectedRecord.placeId;
|
||||
value["areaAddress"] = selectedRecord.areaAddress;
|
||||
value["areaName"] = selectedRecord.areaName;
|
||||
value["contactName"] = selectedRecord.contactName;
|
||||
value["contactTel"] = selectedRecord.contactTel;
|
||||
value["areaNumber"] = selectedRecord.areaNumber;
|
||||
onSubmit(value);
|
||||
} else {//修改预约
|
||||
const params = {
|
||||
...values,
|
||||
areaId: selectedRecord.id,
|
||||
placeId: selectedRecord.placeId,
|
||||
reserveStartDate: moment(value.reserveStartDate).format(dateTimeFormatter),
|
||||
reserveEndDate: moment(value.reserveEndDate).format(dateTimeFormatter),
|
||||
reserveBy: value.reserveBy,
|
||||
reserveContactNumber: value.reserveContactNumber,
|
||||
}
|
||||
saveAppointmentEdit(params).then(res => {
|
||||
if (res?.code == 200) {
|
||||
message.success("预约成功");
|
||||
onCancel();
|
||||
reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (values) {
|
||||
if (values?.areaId) {
|
||||
setSelectedRowKeys([values.areaId])
|
||||
setSelectedRecord({
|
||||
...values,
|
||||
id: values.areaId,
|
||||
})
|
||||
}
|
||||
form.setFieldsValue({
|
||||
...values,
|
||||
})
|
||||
}
|
||||
return () => {
|
||||
setSelectedRowKeys([]);
|
||||
setSelectedRecord(void 0);
|
||||
}
|
||||
setSelectedRowKeys([]);
|
||||
setSelectedRecord(void 0);
|
||||
}, [values])
|
||||
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
title="选择评标室"
|
||||
title={type == "0" ? "选择评标室" : "修改预约"}
|
||||
visible={modalVisible}
|
||||
maskClosable={false}
|
||||
onCancel={() => onCancel()}
|
||||
onOk={() => onOk()}
|
||||
okText="确认"
|
||||
okText={type == "0" ? "确认" : "保存"}
|
||||
width={"70%"}
|
||||
style={{ maxHeight: modalHeight }}
|
||||
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto', }}
|
||||
className="confirm table-no-alert"
|
||||
centered
|
||||
>
|
||||
{values?.areaId && (
|
||||
<>
|
||||
<h3 className='first-title'>{type == "0" ? "已选择评标室" : "已预约评标室"}</h3>
|
||||
<Descriptions size="middle">
|
||||
<Descriptions.Item label="评标室名称">{values?.areaName}</Descriptions.Item>
|
||||
<Descriptions.Item label="联系人">{values?.contactName}</Descriptions.Item>
|
||||
<Descriptions.Item label="联系电话">{values?.contactTel}</Descriptions.Item>
|
||||
<Descriptions.Item label="可容纳人数">{values?.areaNumber ? values?.areaNumber : values?.numberInMeeting}</Descriptions.Item>
|
||||
<Descriptions.Item label="预计评标开始时间">{moment(values?.reserveStartDate).format(dateTimeFormatter)}</Descriptions.Item>
|
||||
<Descriptions.Item label="预计评标结束时间">{moment(values?.reserveEndDate).format(dateTimeFormatter)}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
<h3 className='first-title'>选择评标室</h3>
|
||||
</>
|
||||
)}
|
||||
<ProTable<any>
|
||||
columns={columns}
|
||||
actionRef={actionRef}
|
||||
@ -201,6 +233,22 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
preserve={false}
|
||||
validateMessages={validateMessages}
|
||||
>
|
||||
<Form.Item
|
||||
label="是否预约评标室"
|
||||
name="reserveStatus"
|
||||
initialValue={"1"}
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="项目id"
|
||||
name="projectId"
|
||||
initialValue={proId}
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
{selectedRowKeys.length > 0 && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
@ -208,6 +256,7 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
label="预计评标开始时间"
|
||||
name="reserveStartDate"
|
||||
rules={[{ required: true, message: '请选择' }]}
|
||||
extra={<span style={{ color: "#b30000" }}>预约时间范围 7:00 ~ 18:00</span>}
|
||||
>
|
||||
<DatePicker showTime={{ defaultValue: moment().hour(7) }} showNow={false} disabledDate={disabledDate} disabledTime={disabledDateTime} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} />
|
||||
</Form.Item>
|
||||
|
@ -41,3 +41,14 @@ export async function getBidEvalRoom(data: any) {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 评标室预约-预约修改保存
|
||||
* @params data
|
||||
*/
|
||||
export async function saveAppointmentEdit(data: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/reserve/updateSubmit', {
|
||||
method: 'POST',
|
||||
data: { ...data, },
|
||||
});
|
||||
}
|
@ -1,10 +1,11 @@
|
||||
import { echoDateTimeFormatter, saveDateTimeFormatter } from '@/utils/DateUtils';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
import { getProMethod } from '@/utils/session';
|
||||
import { DatePicker, Form, Input, message, Modal, Radio, Spin } from 'antd';
|
||||
import { Button, DatePicker, Form, Input, message, Modal, Radio, Spin } from 'antd';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import moment from 'moment';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment';
|
||||
interface AddEvaluationItemsProps {
|
||||
title?: string;
|
||||
modalVisible?: boolean;
|
||||
@ -46,6 +47,12 @@ const AddEvaluationItems: React.FC<AddEvaluationItemsProps> = (props) => {
|
||||
const [sectionType, setSectionType] = useState<any>('评审');
|
||||
//loading
|
||||
const [saveLoading, setSaveLoading] = useState<boolean>(false);
|
||||
//电子评标室-评标室预约选择 2022.8.26 zhoujianlong
|
||||
const [selectEvalVisible, setSelectEvalVisible] = useState<boolean>(false);
|
||||
//电子评标室-评标室预约选择不可选状态控制 true-不可填写 false-可填写 2022.8.26 zhoujianlong
|
||||
const [selectEvalDisabled, setSelectEvalDisabled] = useState<boolean>(true);
|
||||
//电子评标室-评标室预约选择-数据 2022.8.26 zhoujianlong
|
||||
const [selectEvalData, setSelectEvalData] = useState<any>();
|
||||
useEffect(() => {
|
||||
//名称确定
|
||||
if (MethodDict == 'procurement_mode_1' || MethodDict == 'procurement_mode_2') {
|
||||
@ -101,99 +108,144 @@ const AddEvaluationItems: React.FC<AddEvaluationItemsProps> = (props) => {
|
||||
form.submit();
|
||||
};
|
||||
|
||||
//评标室预约回调
|
||||
const returnEvalData = (value: any) => {
|
||||
console.log('value', value)
|
||||
setSelectEvalVisible(false);
|
||||
setSelectEvalDisabled(false);
|
||||
setSelectEvalData(value);
|
||||
form.setFieldsValue({
|
||||
evaluationStartTime: value.reserveStartDate,
|
||||
evaluationEndTime: value.reserveEndDate,
|
||||
evaluationPlace: value.areaAddress,
|
||||
reserveBy: value.reserveBy,
|
||||
reserveContactNumber: value.reserveContactNumber,
|
||||
})
|
||||
}
|
||||
|
||||
//评标室预约-选择评标室
|
||||
const selectEvalClick = () => {
|
||||
setSelectEvalVisible(true);
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
title={title}
|
||||
visible={modalVisible}
|
||||
onOk={() => onSubmit()}
|
||||
onCancel={() => {
|
||||
// setFileListData([]);
|
||||
onCancel();
|
||||
}}
|
||||
width={'60%'}
|
||||
style={{ maxHeight: modalHeight }}
|
||||
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
|
||||
centered
|
||||
okText="保存"
|
||||
cancelText="返回"
|
||||
confirmLoading={saveLoading}
|
||||
>
|
||||
<Spin spinning={saveLoading} delay={300}>
|
||||
<Form
|
||||
{...layout}
|
||||
name="basic"
|
||||
form={form}
|
||||
initialValues={{ remember: true }}
|
||||
validateMessages={validateMessages}
|
||||
onFinish={onFinish}
|
||||
preserve={false}
|
||||
>
|
||||
<Form.Item label={`${sectionName}名称`} name="bidSectName">
|
||||
<Input bordered={false} readOnly />
|
||||
</Form.Item>
|
||||
<Form.Item label={`重新${sectionType}原因`} name="reason" rules={[{ required: true }, { max: 500, message: "最大不能超过500字" }]}>
|
||||
<TextArea rows={4} maxLength={1000} placeholder={`请填写重新${sectionType}原因`} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={`预计重新${sectionType}开始时间`}
|
||||
name="evaluationStartTime"
|
||||
rules={[{ required: true }]}
|
||||
<>
|
||||
<Modal
|
||||
destroyOnClose
|
||||
title={title}
|
||||
visible={modalVisible}
|
||||
onOk={() => onSubmit()}
|
||||
onCancel={() => {
|
||||
// setFileListData([]);
|
||||
onCancel();
|
||||
}}
|
||||
width={'60%'}
|
||||
style={{ maxHeight: modalHeight }}
|
||||
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
|
||||
centered
|
||||
okText="保存"
|
||||
cancelText="返回"
|
||||
confirmLoading={saveLoading}
|
||||
>
|
||||
<Spin spinning={saveLoading} delay={300}>
|
||||
<Form
|
||||
{...layout}
|
||||
name="basic"
|
||||
form={form}
|
||||
initialValues={{ remember: true }}
|
||||
validateMessages={validateMessages}
|
||||
onFinish={onFinish}
|
||||
preserve={false}
|
||||
>
|
||||
<DatePicker
|
||||
placeholder="请填写开始时间"
|
||||
disabledDate={(current) => current && current < moment().startOf('day')}
|
||||
format={'yyyy-MM-DD HH:mm'}
|
||||
style={{ width: '100%' }}
|
||||
showNow={false}
|
||||
showTime={{ defaultValue: moment().startOf('minute') }}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={`预计重新${sectionType}结束时间`}
|
||||
name="evaluationEndTime"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<DatePicker
|
||||
placeholder="请填写结束时间"
|
||||
format={'yyyy-MM-DD HH:mm'}
|
||||
style={{ width: '100%' }}
|
||||
showNow={false}
|
||||
showTime={{ defaultValue: moment().startOf('minute') }}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={`重新${sectionType}地点`}
|
||||
name="evaluationPlace"
|
||||
rules={[{ required: true }, { max: 100, message: "最大不能超过100字" }]}
|
||||
>
|
||||
<Input placeholder={`请填写重新${sectionType}地点`} maxLength={200} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={`${sectionType}专家是否与上次一致`}
|
||||
name="isAgreement"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Radio.Group options={options} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="说明文件"
|
||||
name="uploadFileId"
|
||||
rules={[{ required: true, message: '请上传说明文件' }]}
|
||||
extra="最多上传一个文件,每个最大30MB"
|
||||
>
|
||||
<ExtendUpload bid={uploadId} maxCount={1} maxSize={30}>
|
||||
</ExtendUpload>
|
||||
</Form.Item>
|
||||
<Form.Item label="id" name="id" hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label="sectionId" name="sectionId" hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Spin>
|
||||
</Modal>
|
||||
<Form.Item label={`${sectionName}名称`} name="bidSectName">
|
||||
<Input bordered={false} readOnly />
|
||||
</Form.Item>
|
||||
<Form.Item label={`重新${sectionType}原因`} name="reason" rules={[{ required: true }, { max: 500, message: "最大不能超过500字" }]}>
|
||||
<TextArea rows={4} maxLength={1000} placeholder={`请填写重新${sectionType}原因`} />
|
||||
</Form.Item>
|
||||
<Form.Item label={`重新${sectionType}地点`} style={{ marginBottom: 0 }} required>
|
||||
<Form.Item
|
||||
name="evaluationPlace"
|
||||
rules={[{ required: true }, { max: 100, message: "最大不能超过100字" }]}
|
||||
style={{ display: 'inline-block', width: 'calc(60% - 8px)' }}
|
||||
>
|
||||
<Input placeholder={`请填写重新${sectionType}地点`} maxLength={200} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
style={{ display: 'inline-block', width: 'calc(40% - 8px)', margin: '0 8px' }}
|
||||
>
|
||||
<Button type='primary' onClick={() => selectEvalClick()}>选择评标室</Button>
|
||||
</Form.Item>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={`预计重新${sectionType}开始时间`}
|
||||
name="evaluationStartTime"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<DatePicker
|
||||
placeholder="请填写开始时间"
|
||||
disabledDate={(current) => current && current < moment().startOf('day')}
|
||||
format={'yyyy-MM-DD HH:mm'}
|
||||
style={{ width: '100%' }}
|
||||
showNow={false}
|
||||
showTime={{ defaultValue: moment().startOf('minute') }}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={`预计重新${sectionType}结束时间`}
|
||||
name="evaluationEndTime"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<DatePicker
|
||||
placeholder="请填写结束时间"
|
||||
format={'yyyy-MM-DD HH:mm'}
|
||||
style={{ width: '100%' }}
|
||||
showNow={false}
|
||||
showTime={{ defaultValue: moment().startOf('minute') }}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="reserveBy"
|
||||
label="预约人"
|
||||
rules={[{ required: !selectEvalDisabled, message: `请录入预约人` }, { max: 100, message: '内容超长' }]}
|
||||
>
|
||||
<Input disabled={selectEvalDisabled} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="reserveContactNumber"
|
||||
label="预约人联系方式"
|
||||
rules={[{ required: !selectEvalDisabled, message: `请录入预约人联系方式` }, { max: 100, message: '内容超长' }]}
|
||||
>
|
||||
<Input type="number" disabled={selectEvalDisabled} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={`${sectionType}专家是否与上次一致`}
|
||||
name="isAgreement"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Radio.Group options={options} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="说明文件"
|
||||
name="uploadFileId"
|
||||
rules={[{ required: true, message: '请上传说明文件' }]}
|
||||
extra="最多上传一个文件,每个最大30MB"
|
||||
>
|
||||
<ExtendUpload bid={uploadId} maxCount={1} maxSize={30}>
|
||||
</ExtendUpload>
|
||||
</Form.Item>
|
||||
<Form.Item label="id" name="id" hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label="sectionId" name="sectionId" hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Spin>
|
||||
</Modal>
|
||||
{/**电子评标室-评标室预约选择 */}
|
||||
<BidEvalAppointment modalVisible={selectEvalVisible} onCancel={() => setSelectEvalVisible(false)} onSubmit={(value: any) => returnEvalData(value)} values={selectEvalData} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
export default AddEvaluationItems;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Tabs, Upload } from 'antd'
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import { getList, getSecs, saveGroup, delOne, saveMember, changeEx, queryVoList, changeMember, applyFor, roomStatus, juryTem, rePassWord } from './service';
|
||||
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 { getURLInformation } from '@/utils/CommonUtils';
|
||||
@ -12,6 +12,8 @@ import { UploadOutlined } from '@ant-design/icons';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import RiskPrevention from '@/utils/RiskPrevention';
|
||||
import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment';
|
||||
import { downloadFile, downloadFileObjectId, getFileListByBid } from '@/utils/DownloadUtils';
|
||||
import ExtendUpload from "@/utils/ExtendUpload";
|
||||
|
||||
const JudgingPanel: React.FC<{}> = () => {
|
||||
const modalHeight = window.innerHeight * 96 / 100;
|
||||
@ -47,6 +49,9 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
const [selectEvalVisible, setSelectEvalVisible] = useState<boolean>(false);//电子评标室-评标室预约选择 2022.8.26 zhoujianlong
|
||||
const [selectEvalDisabled, setSelectEvalDisabled] = useState<boolean>(true);//电子评标室-评标室预约选择不可选状态控制 true-不可填写 false-可填写 2022.8.26 zhoujianlong
|
||||
const [selectEvalData, setSelectEvalData] = useState<any>();//电子评标室-评标室预约选择-数据 2022.8.26 zhoujianlong
|
||||
const [userPhotoId, setUserPhotoId] = useState<string>("");//电子评标室-录入外部专家-相片id 2022.8.29 zhoujianlong
|
||||
const [appoType, setAppoType] = useState<string>("0");//电子评标室-预约框状态 2022.8.29 zhoujianlong
|
||||
|
||||
function getShouName() {
|
||||
const method = getProMethod();
|
||||
let showNameT: any = { zbr: '', bb: '', pb: '', }//相关标段 标书费 保证金 服务费
|
||||
@ -155,6 +160,11 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
memberCountSet(memberCount + 1);
|
||||
setMemberVis(true);
|
||||
}}>成员管理</Button>
|
||||
{record.elecEvalRoomReserve && (record.elecEvalRoomReserve.status == -1 || record.elecEvalRoomReserve.status == 0) && <Button type='text' onClick={() => {
|
||||
setSelectEvalData(record.elecEvalRoomReserve)
|
||||
setAppoType("1");
|
||||
setSelectEvalVisible(true);
|
||||
}}>修改预约</Button>}
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
@ -294,10 +304,12 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
juryType: updateData != undefined ? updateData.juryType : null,
|
||||
representativeNumber: updateData != undefined ? updateData.representativeNumber : null,
|
||||
expertNumber: updateData != undefined ? updateData.expertNumber : null,
|
||||
startTime: updateData != undefined ? moment(updateData.startTime, 'yyyy-MM-DD HH:mm:ss') : null,
|
||||
endTime: updateData != undefined ? moment(updateData.endTime, 'yyyy-MM-DD HH:mm:ss') : null,
|
||||
startTime: updateData != undefined ? updateData.reserveStatus == 1 ? moment(updateData.elecEvalRoomReserve.reserveStartDate, 'yyyy-MM-DD HH:mm:ss') : moment(updateData.startTime, 'yyyy-MM-DD HH:mm:ss') : null,
|
||||
endTime: updateData != undefined ? updateData.reserveStatus == 1 ? moment(updateData.elecEvalRoomReserve.reserveEndDate, 'yyyy-MM-DD HH:mm:ss') : moment(updateData.endTime, 'yyyy-MM-DD HH:mm:ss') : null,
|
||||
evalLocation: updateData != undefined ? updateData.evalLocation : null,
|
||||
description: updateData != undefined ? updateData.description : null,
|
||||
reserveBy: updateData?.reserveStatus == 1 ? updateData.elecEvalRoomReserve.reserveBy : null,
|
||||
reserveContactNumber: updateData?.reserveStatus == 1 ? updateData.elecEvalRoomReserve.reserveContactNumber : null,
|
||||
})
|
||||
}, [updateData]);
|
||||
|
||||
@ -677,20 +689,6 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
}}>{display ? '自行输入' : '选择分类'}</Button>
|
||||
</Row>
|
||||
} */}
|
||||
<FormItem
|
||||
name="placeId"
|
||||
label="场所id"
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</FormItem>
|
||||
<FormItem
|
||||
name="areaId"
|
||||
label="区域Id"
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</FormItem>
|
||||
<Row>
|
||||
<Col span={12}><FormItem
|
||||
name="representativeNumber"
|
||||
@ -913,7 +911,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
// const formValsCq = formCq.getFieldsValue();
|
||||
formVals.startTime != undefined ? formVals.startTime = formVals.startTime.format('yyyy-MM-DD HH:mm:ss') : null;
|
||||
formVals.endTime != undefined ? formVals.endTime = formVals.endTime.format('yyyy-MM-DD HH:mm:ss') : null;
|
||||
let params = { ...formVals, juryRoomList: juryRoomList, projectId: proId, juryCategoryVOList: cqData };
|
||||
let params = { ...formVals, juryRoomList: juryRoomList, projectId: proId, juryCategoryVOList: cqData, reserveStatus: 0 };
|
||||
if (updateData != undefined) {
|
||||
params['id'] = updateData.id;
|
||||
}
|
||||
@ -925,6 +923,16 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
pass = false;
|
||||
message.error(`抽取数量不等于设置的专家数量(${count})`);
|
||||
}
|
||||
if (selectEvalData?.reserveStatus == "1") {//预约了评标室
|
||||
params.reserveStatus = 1;
|
||||
const evalRoomReserveVO = {
|
||||
...selectEvalData,
|
||||
reserveStartDate: moment(selectEvalData.reserveStartDate).format('yyyy-MM-DD HH:mm:ss'),
|
||||
reserveEndDate: moment(selectEvalData.reserveEndDate).format('yyyy-MM-DD HH:mm:ss'),
|
||||
reserveSectionList: juryRoomList.map((item: any) => ({ sectionId: item.sectionId, assessRoomId: item.roomId })),
|
||||
}
|
||||
params["evalRoomReserveVO"] = evalRoomReserveVO;
|
||||
}
|
||||
if (pass) {
|
||||
const success = await saveG(params);
|
||||
if (success) {
|
||||
@ -987,6 +995,16 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
{ title: '工作单位', dataIndex: 'workunit', },
|
||||
{ title: '通知状态', dataIndex: 'status', },
|
||||
{ title: '通知结果备注', dataIndex: 'remark', },
|
||||
{
|
||||
title: '照片',
|
||||
dataIndex: 'facePicName',
|
||||
render: (_, record) => {
|
||||
if (_) {
|
||||
return <a onClick={() => downloadFileObjectId(record.facePicName)}>{record.name}</a>
|
||||
};
|
||||
return '-';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作', dataIndex: 'option', width: 180,
|
||||
valueType: 'option',
|
||||
@ -999,6 +1017,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
updateKeyMemSet(record.key);
|
||||
changeBtnSet(true);
|
||||
formMem.setFieldsValue({ ...record });
|
||||
setUserPhotoId(record.facePicName);
|
||||
}}>修改</Button>
|
||||
<Popconfirm
|
||||
placement="topRight"
|
||||
@ -1016,6 +1035,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
changeMemberIdSet(record.id);
|
||||
changeBtnSet(false);
|
||||
formMem.setFieldsValue({ ...record });
|
||||
setUserPhotoId(record.facePicName);
|
||||
}}>更换</Button>
|
||||
<Button type='text' hidden={!open || allEnd || btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} onClick={async () => {
|
||||
await rePassWord(record.id);
|
||||
@ -1375,6 +1395,20 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
>
|
||||
<Input style={{ width: "60%" }} />
|
||||
</FormItem></Col></Row>
|
||||
<Form.Item label="照片" style={{ marginBottom: 0 }}>
|
||||
<Form.Item
|
||||
name="facePicName"
|
||||
style={{ display: 'inline-block', width: '60%' }}
|
||||
>
|
||||
<ExtendUpload bid={userPhotoId} btnName="上传照片" maxCount={1} maxSize={30} uploadProps={{ name: "file", disabled: false, accept: ".jpeg,.jpg,.png", listType: 'picture', onPreview(file) { window.open(file.url) }, }}>
|
||||
</ExtendUpload>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
style={{ display: 'inline-block', width: '40%', position: "relative", right: '24%' }}
|
||||
>
|
||||
<Button type='primary' onClick={() => getExpertPhoto()}>获取照片</Button>
|
||||
</Form.Item>
|
||||
</Form.Item>
|
||||
{/* <Row><Col span={24}><FormItem
|
||||
name="type"
|
||||
label="通知方式"
|
||||
@ -1700,25 +1734,36 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
const returnEvalData = (value: any) => {
|
||||
setSelectEvalVisible(false);
|
||||
setSelectEvalDisabled(false);
|
||||
setSelectEvalData(value);
|
||||
form.setFieldsValue({
|
||||
startTime: value.reserveStartDate,
|
||||
endTime: value.reserveEndDate,
|
||||
evalLocation: value.evalLocation,
|
||||
evalLocation: value.areaAddress,
|
||||
reserveBy: value.reserveBy,
|
||||
reserveContactNumber: value.reserveContactNumber,
|
||||
areaId: value.areaId,
|
||||
placeId: value.placeId,
|
||||
})
|
||||
}
|
||||
//评标室预约-选择评标室
|
||||
const selectEvalClick = () => {
|
||||
const data = form.getFieldsValue();
|
||||
data["reserveStartDate"] = data.startTime;
|
||||
data["reserveEndDate"] = data.endTime;
|
||||
console.log("data", data)
|
||||
setSelectEvalData(data);
|
||||
setAppoType("0");
|
||||
setSelectEvalVisible(true);
|
||||
}
|
||||
//录入外部专家-获取照片
|
||||
const getExpertPhoto = () => {
|
||||
formMem.validateFields(["certificate"]).then(value => {
|
||||
getUserPhoto(value.certificate).then(res => {//获取照片
|
||||
if (res?.code == 200) {
|
||||
const data = res?.data;
|
||||
if (data) {
|
||||
setUserPhotoId(data);
|
||||
message.info("获取专家照片成功");
|
||||
} else {
|
||||
message.info("当前专家无照片,请上传");
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
return (
|
||||
<div className='bgCWhite' style={{ padding: '0px 24px 24px' }}>
|
||||
<Spin spinning={spin}>
|
||||
@ -1750,6 +1795,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
setModalVis(true);
|
||||
// form.resetFields();
|
||||
reset();
|
||||
setSelectEvalData(void 0);
|
||||
sectionCountSet(sectionCount + 1);
|
||||
disabledSet(false); readOnlySet(false);
|
||||
}}>
|
||||
@ -1785,7 +1831,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
data={riskData}
|
||||
/>}
|
||||
{/**电子评标室-评标室预约选择 */}
|
||||
<BidEvalAppointment modalVisible={selectEvalVisible} onCancel={() => setSelectEvalVisible(false)} onSubmit={(value: any) => returnEvalData(value)} values={selectEvalData} />
|
||||
<BidEvalAppointment modalVisible={selectEvalVisible} onCancel={() => setSelectEvalVisible(false)} onSubmit={(value: any) => returnEvalData(value)} values={selectEvalData} type={appoType} reload={() => actionRef.current?.reload()} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
import { getDownloadSecretKey, getFilelist, getFilelistBySecond } from "@/services/download_";
|
||||
import { message } from "antd";
|
||||
import { isEmpty, isNotEmpty } from "./CommonUtils";
|
||||
|
||||
/**
|
||||
@ -117,6 +118,8 @@ export const downloadFileObjectId = (objectId: string) => {
|
||||
getFilelist([objectId]).then(res => {
|
||||
if (res?.success && res?.data?.length > 0) {
|
||||
downloadFile({ uid: res?.data[res?.data?.length - 1].fileId });
|
||||
} else {
|
||||
message.info("文档中心错误或文件不存在");
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@ -159,12 +162,12 @@ export async function getFileListByBid(objectId: string) {
|
||||
if (checkObjectId(objectId)) {//判断3.0 objectId
|
||||
return getFilelist([objectId]).then(res => {
|
||||
if (res?.success && res?.data?.length > 0) {
|
||||
res?.data?.forEach(({ fileId, originalName }: any) => {
|
||||
res?.data?.forEach(({ fileId, originalName, filePath }: any) => {
|
||||
result.push({
|
||||
uid: fileId,
|
||||
name: originalName,
|
||||
status: 'done',
|
||||
url: 'javascript:void(0);',
|
||||
url: originalName.endsWith(".png") || originalName.endsWith(".jpg") || originalName.endsWith(".jpeg") ? pictureDisplayPath + '?filePath=' + filePath : 'javascript:void(0);',
|
||||
})
|
||||
});
|
||||
return result;
|
||||
|
@ -137,6 +137,7 @@ const ExtendUpload: React.FC<ExtendUploadProps> = (props) => {
|
||||
<>
|
||||
<Spin spinning={spin}>
|
||||
<Upload
|
||||
onPreview={downloadFile}
|
||||
{...uploadProps}
|
||||
key={"file" + returnValue}
|
||||
action={uploadAttachmentPath}
|
||||
@ -155,7 +156,6 @@ const ExtendUpload: React.FC<ExtendUploadProps> = (props) => {
|
||||
showUploadList={{
|
||||
removeIcon: <CloseSquareOutlined />,
|
||||
}}
|
||||
onPreview={downloadFile}
|
||||
fileList={fileList}
|
||||
>
|
||||
{!uploadProps?.disabled ?
|
||||
|
Reference in New Issue
Block a user