更新版本库
This commit is contained in:
@ -1,32 +1,68 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import '@/utils/lq.style.less';
|
||||
import { Button, Input, Form, Upload, Modal, DatePicker, Checkbox } from 'antd';
|
||||
import { Button, Input, Form, Upload, Modal, DatePicker, Checkbox, message } from 'antd';
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
import ProTable from '@ant-design/pro-table';
|
||||
import { dateTimeFormatter } from '@/utils/DateUtils';
|
||||
import { dateTimeFormatter, echoDateTimeFormatter, saveDateTimeFormatter } from '@/utils/DateUtils';
|
||||
import { evaluationquestionIinsert, evaluationquestionSend, getAssessroomSuppliers } from '../service';
|
||||
import { commonMessage, saveMessage } from '@/utils/MessageUtils';
|
||||
import { queryingPagingData } from '@/utils/PageUtils';
|
||||
import InquiryBox from '@/utils/InquiryBox';
|
||||
import { downloadAttachmentPath, downloadAttachmentPathOId, getUploadContent } from '@/utils/DownloadUtils';
|
||||
import { Divider } from '@material-ui/core';
|
||||
import UploadModule from '@/utils/UploadModule';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { getRoomId, getSessionProjectData } from '@/utils/session';
|
||||
|
||||
|
||||
const layout = {
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 14 },
|
||||
};
|
||||
/**
|
||||
* 获取多选数据
|
||||
* @param data
|
||||
*/
|
||||
function getSectionCheckbox(data: any[]) {
|
||||
let value = [];
|
||||
for (const item of data) {
|
||||
value.push(
|
||||
<Checkbox key={item.companyId} value={item.companyId} >
|
||||
{item.companyName}
|
||||
</Checkbox>
|
||||
)
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
const listData = [
|
||||
{ key: 1, title: '标题', theInquiryDocuments: '文件', questionTime: '2020-01-01 12:12:12', requestResponseTime: '2020-01-01 12:12:12', state: '', recoveryTime: '2020-03-05 13:13:13' },
|
||||
{ key: 2, title: '标题1', theInquiryDocuments: '文件2', questionTime: '2020-01-02 12:12:12', requestResponseTime: '2020-01-01 12:12:12', state: '', recoveryTime: '2020-03-05 13:13:13' },
|
||||
{ key: 3, title: '标题2', theInquiryDocuments: '文件3', questionTime: '2020-01-03 12:12:12', requestResponseTime: '2020-01-01 12:12:12', state: '', recoveryTime: '2020-03-05 13:13:13' },
|
||||
{ key: 4, title: '标题3', theInquiryDocuments: '文件4', questionTime: '2020-01-04 12:12:12', requestResponseTime: '2020-01-01 12:12:12', state: '', recoveryTime: '2020-03-05 13:13:13' },
|
||||
|
||||
]
|
||||
|
||||
|
||||
const ClarificationOfTheBid: React.FC<{}> = () => {
|
||||
|
||||
const [tableData, setTableData] = useState(listData);
|
||||
const ClarificationOfTheBid: React.FC = () => {
|
||||
//评审室id
|
||||
const assessRoomId = getRoomId();
|
||||
//项目id
|
||||
const projectId = getSessionProjectData().id;
|
||||
//form弹窗
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
const [form] = Form.useForm();
|
||||
//禁用标识
|
||||
const [whetherReadonly, setWhetherReadonly] = useState<boolean>(false);
|
||||
//供应商数据
|
||||
const [suppliersData, setSuppliersData] = useState<any[]>([]);
|
||||
//供应商多选
|
||||
const [suppliersCheckbox, setSuppliersCheckbox] = useState<any>();
|
||||
//发送确认框
|
||||
const [visibleSend, setVisibleSend] = useState<boolean>(false);
|
||||
//发送id
|
||||
const [sendId, setSendId] = useState<string>();
|
||||
//控制表单
|
||||
const actionRef = useRef<any>();
|
||||
//保存遮罩
|
||||
const [submitLoading, setSubmitLoading] = useState<boolean>(false);
|
||||
//上传文件列表
|
||||
const [fileListData, setFileListData] = useState<any[]>([]);
|
||||
//查看文件
|
||||
const [viewFile, setViewFile] = useState<any>();
|
||||
//上传文件数量限制
|
||||
let num = 1;
|
||||
const columns: any = [
|
||||
{
|
||||
title: '序号',
|
||||
@ -34,57 +70,91 @@ const ClarificationOfTheBid: React.FC<{}> = () => {
|
||||
},
|
||||
{
|
||||
title: '标题',
|
||||
dataIndex: 'title',
|
||||
dataIndex: 'questionTitle',
|
||||
},
|
||||
{
|
||||
title: '质询文件',
|
||||
dataIndex: 'theInquiryDocuments',
|
||||
dataIndex: 'attName',
|
||||
render: (_: string, record: any) => {
|
||||
if (_ === '-') {
|
||||
return _;
|
||||
}
|
||||
return (
|
||||
<a href={`${downloadAttachmentPath}${record.attId}`}>{_}</a>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '提问时间',
|
||||
dataIndex: 'questionTime',
|
||||
dataIndex: 'sendTime',
|
||||
},
|
||||
{
|
||||
title: '要求回复时间',
|
||||
dataIndex: 'requestResponseTime',
|
||||
dataIndex: 'deadlineTime',
|
||||
},
|
||||
{
|
||||
title: '投标人',
|
||||
dataIndex: 'state',
|
||||
dataIndex: 'companyName',
|
||||
},
|
||||
{
|
||||
title: '回复时间',
|
||||
dataIndex: 'recoveryTime',
|
||||
dataIndex: 'replyTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 130,
|
||||
valueType: 'option',
|
||||
render: (_: any, record: any) => [
|
||||
<a key="view" onClick={() => view(record)}>查看</a>,
|
||||
<a key="send" onClick={() => send(record)}>发送</a>
|
||||
]
|
||||
|
||||
render: (_: any, record: any) =>
|
||||
String(record.editStatus) === '1' ?
|
||||
[
|
||||
<a key="send" onClick={() => send(record.id)}>发送</a>
|
||||
] :
|
||||
[
|
||||
<a key="view" onClick={() => view(record)}>查看</a>
|
||||
]
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
useEffect(() => {
|
||||
//获取供应商数据
|
||||
getAssessroomSuppliers(assessRoomId, projectId).then(res => {
|
||||
setSuppliersData(res.data);
|
||||
setSuppliersCheckbox(getSectionCheckbox(res.data));
|
||||
});
|
||||
}, []);
|
||||
/**
|
||||
* 查看
|
||||
* @param data 数据
|
||||
* @param e 数据
|
||||
*/
|
||||
const view = (data: any) => {
|
||||
const view = (e: any) => {
|
||||
let data = { ...e };
|
||||
setVisible(true);
|
||||
setWhetherReadonly(true);
|
||||
data.deadlineTime = echoDateTimeFormatter(data.deadlineTime);
|
||||
data.openTime = echoDateTimeFormatter(data.openTime);
|
||||
form.setFieldsValue(data);
|
||||
setViewFile(isEmpty(data.attId) ? '无' : <a href={`${downloadAttachmentPathOId}${data.attId}`}>{data.attName}</a>);
|
||||
}
|
||||
/**
|
||||
* 发送
|
||||
* @param data 数据
|
||||
* @param id 数据
|
||||
*/
|
||||
const send = (data: any) => {
|
||||
console.log(data);
|
||||
const send = (id: string) => {
|
||||
setVisibleSend(true);
|
||||
setSendId(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送
|
||||
* @param id
|
||||
*/
|
||||
const sendDataBasedOnId = (id: string) => {
|
||||
setVisibleSend(false);
|
||||
evaluationquestionSend(id).then(res => {
|
||||
commonMessage(res);
|
||||
actionRef.current.reload();
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出层关闭
|
||||
* @param data
|
||||
@ -94,20 +164,84 @@ const ClarificationOfTheBid: React.FC<{}> = () => {
|
||||
setWhetherReadonly(false);
|
||||
}
|
||||
|
||||
const save = () => {
|
||||
form.submit();
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
const onFinish = (data: any) => {
|
||||
let file = getUploadContent(data.attId);
|
||||
setSubmitLoading(true);
|
||||
data.attId = file.id;
|
||||
data.attName = file.name;
|
||||
data.assessRoomId = assessRoomId;
|
||||
data.deadlineTime = saveDateTimeFormatter(data.deadlineTime);
|
||||
data.openTime = saveDateTimeFormatter(data.openTime);
|
||||
evaluationquestionIinsert(data).then(res => {
|
||||
saveMessage(res);
|
||||
setSubmitLoading(false);
|
||||
setVisible(false);
|
||||
actionRef.current.reload();
|
||||
})
|
||||
}
|
||||
|
||||
const onFinish = (data: any) => {
|
||||
console.log(data);
|
||||
console.log('onFinish');
|
||||
//上传文件数量控制
|
||||
const handleChange = (info: any) => {
|
||||
if (whetherToUpload()) {
|
||||
return;
|
||||
}
|
||||
let fileList = [...info.fileList];
|
||||
fileList = fileList.map((file) => {
|
||||
if (file.response) {
|
||||
file.url = `${downloadAttachmentPathOId}${file.response.oid}`;
|
||||
file.oid = file.response.oid;
|
||||
}
|
||||
return file;
|
||||
});
|
||||
setFileListData(fileList);
|
||||
};
|
||||
|
||||
const whetherToUpload = () => {
|
||||
if (num === -1) {
|
||||
return false;
|
||||
}
|
||||
return fileListData.length >= num;
|
||||
}
|
||||
|
||||
//上传文件大小控制
|
||||
const beforeUpload = (file: any) => {
|
||||
if (whetherToUpload()) {
|
||||
message.info(`最多只能上传 ${num} 个文件`);
|
||||
return false;
|
||||
}
|
||||
let flag = file.size > 52428800;
|
||||
if (flag) {
|
||||
message.info("上传文件大于50M,请重新上传");
|
||||
}
|
||||
return !flag;
|
||||
}
|
||||
|
||||
const onRemove = (e: any) => {
|
||||
let data = fileListData;
|
||||
let a = data.findIndex(item => item.url === e.url);
|
||||
data.splice(a, 1)
|
||||
setFileListData([...data]);
|
||||
}
|
||||
|
||||
const uploadProps = {
|
||||
action: '/api/core-service-ebtp-updownload/v1/attachment/upload',
|
||||
onChange: handleChange,
|
||||
onRemove: onRemove,
|
||||
beforeUpload: beforeUpload,
|
||||
};
|
||||
|
||||
|
||||
|
||||
const createForm = () => {
|
||||
return (
|
||||
<>
|
||||
<Modal visible={visible}
|
||||
style={{ top: 20 }}
|
||||
centered
|
||||
width="50%"
|
||||
title="质询内容"
|
||||
onCancel={handleCancel}
|
||||
maskClosable={false}
|
||||
@ -116,27 +250,28 @@ const ClarificationOfTheBid: React.FC<{}> = () => {
|
||||
<Button key="back" onClick={handleCancel}>
|
||||
取消
|
||||
</Button>,
|
||||
<Button key="submit" type="primary" onClick={save}>
|
||||
<Button key="submit" type="primary" loading={submitLoading} onClick={() => form.submit()}>
|
||||
保存
|
||||
</Button>,
|
||||
]}
|
||||
>
|
||||
<Form
|
||||
<Form
|
||||
{...layout}
|
||||
onFinish={onFinish}
|
||||
form={form}
|
||||
>
|
||||
<Form.Item
|
||||
label="选择供应商"
|
||||
name=""
|
||||
name="companyIdList"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Checkbox.Group disabled={whetherReadonly}>
|
||||
{suppliersCheckbox}
|
||||
</Checkbox.Group>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="应答截止时间"
|
||||
name=""
|
||||
name="deadlineTime"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<DatePicker showTime format={dateTimeFormatter} disabled={whetherReadonly} />
|
||||
@ -145,35 +280,47 @@ const ClarificationOfTheBid: React.FC<{}> = () => {
|
||||
{/* 招标没有 */}
|
||||
<Form.Item
|
||||
label="应答打开时间"
|
||||
name=""
|
||||
name="openTime"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<DatePicker showTime format={dateTimeFormatter} disabled={whetherReadonly} />
|
||||
</Form.Item>
|
||||
|
||||
|
||||
<Form.Item
|
||||
label="主题"
|
||||
name=""
|
||||
name="questionTitle"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Input disabled={whetherReadonly} readOnly={whetherReadonly} />
|
||||
<Input maxLength={140} disabled={whetherReadonly} readOnly={whetherReadonly} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="澄清文件"
|
||||
name=""
|
||||
rules={[{ required: true }]}
|
||||
name="attId"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请上传澄清文件!'
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Upload name="logo" action="/upload.do" listType="picture" disabled={whetherReadonly} >
|
||||
<Button icon={<UploadOutlined />}>上传文件</Button>
|
||||
</Upload>
|
||||
{
|
||||
whetherReadonly ? viewFile :
|
||||
(
|
||||
<Upload {...uploadProps} fileList={fileListData}>
|
||||
<Button disabled={whetherReadonly}><UploadOutlined />上传附件</Button>
|
||||
</Upload>
|
||||
)
|
||||
}
|
||||
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="内容"
|
||||
name="reasonsAndGrounds"
|
||||
name="questionContext"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Input.TextArea maxLength={32} disabled={whetherReadonly} readOnly={whetherReadonly} />
|
||||
<Input.TextArea maxLength={900} disabled={whetherReadonly} readOnly={whetherReadonly} rows={4} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
@ -188,14 +335,16 @@ const ClarificationOfTheBid: React.FC<{}> = () => {
|
||||
form.resetFields();
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="background">
|
||||
<ProTable
|
||||
rowSelection={{ type: 'radio' }}
|
||||
rowKey="key"
|
||||
rowKey="id"
|
||||
actionRef={actionRef}
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
params={{ assessRoomId: assessRoomId }}
|
||||
request={params => queryingPagingData('/api/biz-service-ebtp-tender/v1/evaluationquestion/list', 'post', params)}
|
||||
search={false}
|
||||
toolBarRender={() => [
|
||||
<Button key="added" onClick={added} type="primary">
|
||||
@ -203,6 +352,13 @@ const ClarificationOfTheBid: React.FC<{}> = () => {
|
||||
</Button>,
|
||||
]}
|
||||
/>
|
||||
<InquiryBox
|
||||
visible={visibleSend}
|
||||
setVisible={setVisibleSend}
|
||||
message={'确定要发送吗?'}
|
||||
onOk={(data) => sendDataBasedOnId(data)}
|
||||
data={sendId}
|
||||
/>
|
||||
{createForm()}
|
||||
</div>
|
||||
</>
|
||||
|
@ -1,13 +1,10 @@
|
||||
import React from 'react';
|
||||
import ClarificationOfTheBid from './components/ClarificationOfTheBid';
|
||||
import { PageHeaderWrapper } from '@ant-design/pro-layout';
|
||||
|
||||
// 标中质询澄清列表
|
||||
const Index: React.FC<{}> = () => {
|
||||
// 标中质询澄清列表(澄清说明)
|
||||
const Index: React.FC = () => {
|
||||
return (
|
||||
<PageHeaderWrapper>
|
||||
<ClarificationOfTheBid />
|
||||
</PageHeaderWrapper>
|
||||
<ClarificationOfTheBid />
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,33 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
/*
|
||||
* @Author: liqiang
|
||||
* @Date: 2020-12-29 10:02:56
|
||||
* @LastEditTime: 2020-12-29 14:59:35
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \ebtp-cloud-frontend\src\pages\Evaluation\supplier\ChallengeListInTheIndex\service.ts
|
||||
*/
|
||||
/**
|
||||
* 新增标中质询
|
||||
* @param data
|
||||
*/
|
||||
export function evaluationquestionIinsert(data: any) {
|
||||
return request('/api/biz-service-ebtp-tender/v1/evaluationquestion/insert', {
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取供应商
|
||||
*/
|
||||
export function getAssessroomSuppliers(assessRoomId: string, projectId:string) {
|
||||
return request(`/api/biz-service-ebtp-tender/v1/supplier_register/assessroom/suppliers?assessRoomId=${assessRoomId}&projectId=${projectId}`);
|
||||
}
|
||||
/**
|
||||
* 发送
|
||||
* @param id
|
||||
*/
|
||||
export function evaluationquestionSend(id:string){
|
||||
return request('/api/biz-service-ebtp-tender/v1/evaluationquestion/send/' + id)
|
||||
}
|
@ -1,111 +1,322 @@
|
||||
import { getReviewResult } from '@/pages/Evaluation/expert/ReviewResults/GroupLeader/service';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { enterTheNumberToRetainTheDecimal } from '@/utils/NumberUtils';
|
||||
import ProTable from '@ant-design/pro-table';
|
||||
import { Button, Col, Collapse, Row, Space, Table } from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
import { Button, Card, Col, Collapse, Form, Input, message, Modal, Row, Space, Spin } from 'antd';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import Weboffice from "@/pages/webOffice/weboffice";
|
||||
import { queryReviewReport, reviewReportSave, reviewReportSend } from '../../service';
|
||||
import { commonMessage } from '@/utils/MessageUtils';
|
||||
import { getRoomId } from '@/utils/session';
|
||||
|
||||
const { Panel } = Collapse;
|
||||
|
||||
const firstRvwResult = ['未通过', '通过'];
|
||||
const winnerCandidate = ['否', '是'];
|
||||
/**
|
||||
* 项目经理
|
||||
*/
|
||||
const Manager: React.FC = () => {
|
||||
const [tableData, setTableData] = useState<any[]>([]);
|
||||
//详审
|
||||
//供应商table数据
|
||||
const [supplierTableData, setSupplierTableData] = useState<any[]>([]);
|
||||
//备注模态框
|
||||
const [remarkVisible, setRemarkVisible] = useState<boolean>(false);
|
||||
//评审结果加载
|
||||
const [resultReviewLoading, setResultReviewLoading] = useState<boolean>(false);
|
||||
//专家确认情况table数据
|
||||
const [expertTableData, setExpertTableData] = useState<any[]>([]);
|
||||
//评审 报告 数据
|
||||
let [resultReportData, setResultReportData] = useState<any>({});
|
||||
//评审报告按钮点击禁用状态
|
||||
const [reviewReport, setReviewReport] = useState<boolean>();
|
||||
//备注form
|
||||
const [remarkForm] = Form.useForm();
|
||||
const columns: any[] = [
|
||||
{
|
||||
title: '投标人',
|
||||
dataIndex: 'name',
|
||||
title: '序号',
|
||||
fixed: 'left',
|
||||
width: 70,
|
||||
render: (_: any, record: any, index: number) => index + 1,
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
dataIndex: 'name',
|
||||
title: '供应商名称',
|
||||
dataIndex: 'companyName',
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
title: '报价分',
|
||||
dataIndex: 'name',
|
||||
title: '报价(元)',
|
||||
dataIndex: 'price',
|
||||
},
|
||||
{
|
||||
title: '最终得分',
|
||||
dataIndex: 'name',
|
||||
title: '评审价(元)',
|
||||
dataIndex: 'priceReview',
|
||||
},
|
||||
{
|
||||
title: '投标价',
|
||||
dataIndex: 'name',
|
||||
title: '商务分',
|
||||
dataIndex: 'businessScore',
|
||||
},
|
||||
{
|
||||
title: '评标价',
|
||||
dataIndex: 'name',
|
||||
title: '技术分',
|
||||
dataIndex: 'technicalScore',
|
||||
},
|
||||
{
|
||||
title: '拟签约金额(不含税)',
|
||||
dataIndex: 'name',
|
||||
title: '服务分',
|
||||
dataIndex: 'serviceScore',
|
||||
},
|
||||
{
|
||||
title: '拟签约金额(含税)',
|
||||
dataIndex: 'name',
|
||||
title: '价格分',
|
||||
dataIndex: 'priceScore',
|
||||
},
|
||||
{
|
||||
title: '增值税税率',
|
||||
dataIndex: 'name',
|
||||
title: '综合得分',
|
||||
dataIndex: 'totalScore',
|
||||
},
|
||||
{
|
||||
title: '拟签约金额(不含增值税)(元)',
|
||||
width: 180,
|
||||
dataIndex: 'contractedMoney',
|
||||
},
|
||||
{
|
||||
title: '增值税金额(元)',
|
||||
width: 160,
|
||||
dataIndex: 'taxRatePrice',
|
||||
},
|
||||
{
|
||||
title: '是否通过初步评审',
|
||||
dataIndex: 'firstRvwResult',
|
||||
render: (_: any) => firstRvwResult[_],
|
||||
},
|
||||
{
|
||||
title: '是否中标候选人',
|
||||
dataIndex: 'winnerCandidate',
|
||||
render: (_: any, record: any) => winnerCandidate[_]
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'remarks',
|
||||
width: 70,
|
||||
render: (_: any, record: any) =>
|
||||
<a onClick={() => remarksOnClick(record)}>备注</a>
|
||||
},
|
||||
];
|
||||
//初审
|
||||
const col = [
|
||||
{
|
||||
title: '投标人',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '是否通过初审',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '投标价',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '拟签约金额(不含税)',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '拟签约金额(含税)',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '增值税税率',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
]
|
||||
|
||||
//评审室id
|
||||
const assessId = getRoomId();
|
||||
//角色—1、组长;2、专家;3、项目经理
|
||||
const roleType = 3;
|
||||
|
||||
const [docFileCode, setDocFileCode] = useState<string>("");//文档id
|
||||
const [docBtnName, setDocBtnName] = useState<any>("");//文档按钮文字
|
||||
const [docReadOnly, setDocReadOnly] = useState<string>("false");//是否可编辑
|
||||
const [docSaveBtn, setDocSaveBtn] = useState<string>("compact");//保存按钮是否展示
|
||||
/*weboffice 相关*/
|
||||
const WebofficeRef = useRef<Weboffice>(null);
|
||||
const onRef = (ref: any) => {
|
||||
/* this.child = ref;*/
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setResultReviewLoading(true);
|
||||
getReviewResult(assessId, roleType).then(res => {
|
||||
setResultReviewLoading(false);
|
||||
let data = res.data;
|
||||
console.log(res);
|
||||
//供应商数据
|
||||
let suppliers = isEmpty(data.suppliers) ? [] : data.suppliers;
|
||||
suppliers.forEach((item: any) => {
|
||||
item.contractedMoney = enterTheNumberToRetainTheDecimal(item.contractedMoney, 4);
|
||||
item.taxRatePrice = enterTheNumberToRetainTheDecimal(item.taxRatePrice, 4);
|
||||
});
|
||||
setSupplierTableData(suppliers);
|
||||
});
|
||||
//获取评审报告
|
||||
queryReviewReport(assessId, 1).then(res => {
|
||||
if (res.code === 200) {
|
||||
let data = res.data;
|
||||
setResultReportData(data);
|
||||
setDocFileCode(isEmpty(data.reportTextId) ? null : data.reportTextId);
|
||||
setExpertTableData(data.expertList);
|
||||
setReviewReport(String(data.status) === '0');
|
||||
}
|
||||
})
|
||||
}, []);
|
||||
|
||||
/**
|
||||
* 备注点击事件
|
||||
* @param record
|
||||
*/
|
||||
const remarksOnClick = (record: any) => {
|
||||
remarkForm.setFieldsValue(record);
|
||||
setRemarkVisible(true);
|
||||
}
|
||||
/**
|
||||
* 备注关闭事件
|
||||
*/
|
||||
const closeRemarksModal = () => {
|
||||
setRemarkVisible(false);
|
||||
}
|
||||
/**
|
||||
* 供应商备注
|
||||
*/
|
||||
const modalRemark = () => {
|
||||
return (
|
||||
<Modal
|
||||
title="备注"
|
||||
width={600}
|
||||
visible={remarkVisible}
|
||||
onCancel={() => closeRemarksModal()}
|
||||
maskClosable={false}
|
||||
footer={null}
|
||||
>
|
||||
<Form form={remarkForm}>
|
||||
<Form.Item name="id" hidden={true}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item name='remarks'>
|
||||
<Input.TextArea className="input-invariable-grey" bordered={false} disabled rows={4} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 专家确认情况
|
||||
*/
|
||||
const expertConfirmation = () => {
|
||||
//确认情况
|
||||
const confirmStatus = ['未确认', '已确认'];
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
width: '5%',
|
||||
valueType: 'index'
|
||||
},
|
||||
{
|
||||
title: '专家姓名',
|
||||
width: '12%',
|
||||
dataIndex: 'expertName',
|
||||
},
|
||||
{
|
||||
title: '确认情况',
|
||||
width: '12%',
|
||||
dataIndex: 'status',
|
||||
render: (_: any) => confirmStatus[_],
|
||||
},
|
||||
{
|
||||
title: '原因',
|
||||
dataIndex: 'expertReason',
|
||||
},
|
||||
]
|
||||
return (
|
||||
<>
|
||||
<h4>专家确认情况:</h4>
|
||||
<ProTable
|
||||
columns={columns}
|
||||
dataSource={expertTableData}
|
||||
pagination={false}
|
||||
options={false}
|
||||
search={false}
|
||||
rowKey='id'
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
const verificationOffice = () => {
|
||||
if (WebofficeRef.current!.uninitialized) {
|
||||
message.warn("您未编辑office文件!");
|
||||
return false;
|
||||
} else {
|
||||
if (WebofficeRef.current!.uploadDOCType != "success") {
|
||||
message.warn("您未保存office文件!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!WebofficeRef.current!.uninitialized) {
|
||||
if (WebofficeRef.current!.uploadDOCType != "success") {
|
||||
message.warn("您未保存office文件!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const saveReport = () => {
|
||||
if (verificationOffice()) {
|
||||
let reportTextId = WebofficeRef.current!.DocfileCode;
|
||||
let params = {
|
||||
id: resultReportData.id,
|
||||
reportTextId: reportTextId,
|
||||
}
|
||||
reviewReportSave(params).then(res => {
|
||||
commonMessage(res);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const sendExpertConfirmation = () => {
|
||||
if (verificationOffice()) {
|
||||
reviewReportSend(resultReportData.id).then(res => {
|
||||
commonMessage(res);
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Collapse defaultActiveKey={['1', '2']}>
|
||||
<Collapse defaultActiveKey={['1', '2', '3']}>
|
||||
<Panel header="评审结果表" key="1">
|
||||
<ProTable
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
search={false}
|
||||
headerTitle="评审结果表"
|
||||
rowKey="id"
|
||||
/>
|
||||
<Spin spinning={resultReviewLoading}>
|
||||
<ProTable
|
||||
columns={columns}
|
||||
dataSource={supplierTableData}
|
||||
pagination={false}
|
||||
search={false}
|
||||
options={false}
|
||||
headerTitle="评审结果表"
|
||||
rowKey="id"
|
||||
/>
|
||||
</Spin>
|
||||
{modalRemark()}
|
||||
</Panel>
|
||||
|
||||
<Panel header="编辑评审报告" key="2">
|
||||
<Row justify="end">
|
||||
<Col>
|
||||
<Space>
|
||||
<Button type="primary">保存</Button>
|
||||
<Button type="primary">更换模板</Button>
|
||||
<Button type="primary">发送专家确认</Button>
|
||||
<Button type="primary" disabled={!reviewReport} onClick={saveReport}>保存</Button>
|
||||
<Button type="primary" disabled={!reviewReport}>更换模板</Button>
|
||||
<Button type="primary" disabled={!reviewReport} onClick={sendExpertConfirmation}>发送专家确认</Button>
|
||||
</Space>
|
||||
</Col>
|
||||
</Row>
|
||||
{
|
||||
reviewReport && (
|
||||
<Card style={{ textAlign: "center" }}>
|
||||
{
|
||||
docFileCode !== '' ? (
|
||||
<Weboffice
|
||||
memberBtnName={docBtnName}
|
||||
readonly={docReadOnly}
|
||||
btnStyle={docSaveBtn}
|
||||
btnName={"保存"}
|
||||
DocfileCode={docFileCode}
|
||||
ref={WebofficeRef}
|
||||
onRef={onRef}
|
||||
/>
|
||||
) : null
|
||||
}
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
</Panel>
|
||||
|
||||
<Panel header="专家确认情况查看" key="3">
|
||||
{expertConfirmation()}
|
||||
</Panel>
|
||||
</Collapse>
|
||||
|
||||
|
37
src/pages/Evaluation/projectManager/ReviewResults/service.ts
Normal file
37
src/pages/Evaluation/projectManager/ReviewResults/service.ts
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* @Author: liqiang
|
||||
* @Date: 2021-01-08 10:06:53
|
||||
* @LastEditTime: 2021-01-12 08:47:28
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \ebtp-cloud-frontend\src\pages\Evaluation\projectManager\ReviewResults\service.ts
|
||||
*/
|
||||
|
||||
import request from "@/utils/request";
|
||||
/**
|
||||
* 保存评审报告
|
||||
*/
|
||||
export function reviewReportSave (data:any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/review/report/save', {
|
||||
method:'post',
|
||||
data:data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 发送评审报告
|
||||
* @param id
|
||||
*/
|
||||
export function reviewReportSend (id:string){
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/review/report/send/' + id, {
|
||||
method:'put'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取评审报告
|
||||
* @param assessId
|
||||
* @param roleType
|
||||
*/
|
||||
export function queryReviewReport(assessId:any, roleType:number){
|
||||
return request(`/api/biz-service-ebtp-evaluation/v1/review/report/${assessId}?roleType=${roleType}`);
|
||||
}
|
Reference in New Issue
Block a user