4.1 同步发版内容到天梯

This commit is contained in:
jl-zhoujl2
2022-04-01 20:06:34 +08:00
parent a3b939d154
commit 7b3efe00dd
128 changed files with 929 additions and 5029 deletions

View File

@ -1,10 +1,11 @@
import React, { useEffect, useState } from 'react';
import { Form, Input, Pagination, Radio, Table } from 'antd';
import '@/assets/ld_style.less';
import { checkShowData, getFileListByBid, getSupplierScoreData } from '../service';
import { checkShowData, getSupplierScoreData } from '../service';
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
import { getProMethod, getRoomId, getUserToken } from '@/utils/session';
import { getProMethod, getRoomId } from '@/utils/session';
import { getURLInformation } from '@/utils/CommonUtils';
import ExtendUpload from '@/utils/ExtendUpload';
interface BidPreliminarySummaryProps {
totalSupplier: any;
@ -28,21 +29,20 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
const [radioValue, setRadioValue] = useState<number>(1);
//是否显示合格供应商不足三家
const [isShowFoot, setIsShowFoot] = useState<boolean>(false);
//上传文件列表
const [fileListData, setFileListData] = useState<any[]>([]);
//说明文件fileId
const [fileId, setFileId] = useState<string>('');
//每页显示数量常量
const pageSize = 3;
const { TextArea } = Input;
const [form] = Form.useForm();
const token = getUserToken();
//获取采购方式
const method = getProMethod();
let showNameT: any = { tbr: '' }//投标人供应商
if (method === 'procurement_mode_1' || method === 'procurement_mode_2') {//招标
showNameT = { tbr: '投标人' };
showNameT = { tbr: '投标人' };
} else {
showNameT = { tbr: '供应商' }
showNameT = { tbr: '供应商' }
}
//分页回调方法
@ -55,9 +55,9 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
setRadioValue(e.target.value);
};
//截取字符串方法
const getCaption =(obj: any) => {
var index=obj.lastIndexOf("\-");
obj=obj.substring(index+1,obj.length);
const getCaption = (obj: any) => {
var index = obj.lastIndexOf("\-");
obj = obj.substring(index + 1, obj.length);
return obj;
}
@ -74,14 +74,14 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
inner.categoryName = ele.categoryName
inner.name = ele.name;
inner.rowSpan = index == 0 ? ele.detailList.length : 0;
inner.length = data.reduce((pre: any,item: any) => {
if(item.category == ele.category) {
inner.length = data.reduce((pre: any, item: any) => {
if (item.category == ele.category) {
return pre + item.detailList?.length
} else {
return pre
}
}, 0)
if(count == inner.length - 1) {
if (count == inner.length - 1) {
count = 0
} else {
count = count + 1
@ -180,14 +180,14 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
'-'
) : value.judgesResult == true ? (
<>
<CheckOutlined style={{color: '#29ab6f'}} />({value.qualified}
<CheckOutlined style={{ color: '#29ab6f' }} />({value.qualified}
<CheckOutlined />
{value.unqualified}
<CloseOutlined />)
</>
) : (
<>
<CloseOutlined style={{color: '#f30a05'}}/>({value.qualified}
<CloseOutlined style={{ color: '#f30a05' }} />({value.qualified}
<CheckOutlined />
{value.unqualified}
<CloseOutlined />)
@ -218,45 +218,16 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
);
};
//根据bid获取到oid列表
const getOidList = async (param: any) => {
if (param == undefined || param == '' || param == null) {
} else {
let list: any[] = [];
list.push(param);
await getFileListByBid({ bidList: list }).then((res) => {
let data = res[param];
let list: any[] = [];
if (data.length == 0) {
setFileListData([]);
} else {
data.forEach((ele: any) => {
list.push({
uid: ele.id,
name: ele.filename,
status: 'done',
oid: ele.id,
businessId: ele.bid,
url: `/api/core-service-ebtp-updownload/v1/attachment/download/oid/${ele.id}?Authorization=${token}`,
});
});
setFileListData(list);
}
});
}
};
const getFooterData = () => {
checkShowData(getRoomId()).then(response => {
if(response?.code == 200) {
if(response?.data == undefined) {} else {
if (response?.code == 200) {
if (response?.data == undefined) { } else {
setIsShowFoot(true)
setRadioValue(response.data?.continueStatus)
if(response.data?.continueStatus == 1) {
getOidList(response.data?.fileId)
if (response.data?.continueStatus == 1) {
setFileId(response.data?.fileId)
form.setFieldsValue({
remarks:response.data?.remarks
remarks: response.data?.remarks
})
}
}
@ -315,14 +286,9 @@ const PreliminarySummary: React.FC<BidPreliminarySummaryProps> = (props) => {
<Form.Item name="remarks" label="说明" hidden={radioValue == 0}>
<TextArea maxLength={500} readOnly bordered={false} style={{ resize: 'none' }} />
</Form.Item>
{fileListData?.length == 0 ? null :
<Form.Item name="fileId" label="说明文件" hidden={radioValue == 0}>
{fileListData?.map((e: any, index: any) => (
<a href={e.url} key={index + 1}>
{e.name}
</a>
))}
</Form.Item>}
<ExtendUpload bid={fileId} uploadProps={{ disabled: true }} />
</Form.Item>
</Form>
</div>
) : null}

View File

@ -87,17 +87,6 @@ export async function checkShowData(params: any) {
})
}
/**
* 根据bid获取文件列表
* @param params
*/
export async function getFileListByBid(params: any) {
return request('/api/core-service-ebtp-updownload/v1/attachment/find', {
method: 'POST',
data: {...params}
});
}
/**
* 根据评审室id获取评审室信息
* @param params

View File

@ -1,6 +1,6 @@
import React, { useState, useEffect, useRef } from 'react';
import { Button, Table, Tabs, Space, Progress, Radio, Modal, Menu, Checkbox, Pagination, Input, message, Upload, Spin, Form, Collapse } from 'antd';
import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, getMemberInfo, getEval, getUnlock, isStatus, checkShowData, getFileListByBid, getFile, submitSummary, submQualified } from './service';
import { getTabList, getProgress, getScoreDetail, getRegister, submitDetail, updateJudgesStatus, getMemberInfo, getEval, getUnlock, isStatus, checkShowData, getFile, submitSummary, submQualified } from './service';
import '@/assets/ld_style.less'
import BidPreliminarySpeed from './components/BidPreliminarySpeed';
import BidPreliminarySummary from './components/BidPreliminarySummary';
@ -67,9 +67,6 @@ const Index: React.FC<{}> = () => {
const [tableDisplay, setTableDisplay] = useState<boolean>(false);
//上传文件id存储
const [uploadId, setUploadId] = useState<any>();
//上传文件列表
const [fileListData, setFileListData] = useState<any[]>([]);
const token = getUserToken();
//单选数值存储
const [radioValue, setRadioValue] = useState<number>();
//是否显示合格供应商不足三家
@ -85,9 +82,9 @@ const Index: React.FC<{}> = () => {
const proMethod = getProMethod();//获取采购方式
let showNameT: any = { tbr: '', pb: '', tb: '' }//投标人供应商
if (proMethod === 'procurement_mode_1' || proMethod === 'procurement_mode_2') {//招标
showNameT = { tbr: '投标人', pb: '评标', tb: '投标' };
showNameT = { tbr: '投标人', pb: '评标', tb: '投标' };
} else {
showNameT = { tbr: '供应商', pb: '评审', tb: '应答' }
showNameT = { tbr: '供应商', pb: '评审', tb: '应答' }
}
const columns: any[] = [ // 列表数据
@ -236,7 +233,7 @@ const Index: React.FC<{}> = () => {
if (res.code == 200) {
setSpinVisible(false)
bidEvalDetailDTOList = []
let date = {
bidEvalId: bidEvalId,
reviewTurnId: reviewTurnId,
@ -246,7 +243,7 @@ const Index: React.FC<{}> = () => {
}
getProgress({ ...date }).then((res) => {
if (res.code == 200) {
if(res.data == 100){
if (res.data == 100) {
setProcess(res.data)
submitApi()
} else {
@ -270,7 +267,7 @@ const Index: React.FC<{}> = () => {
}
getProgress({ ...date }).then((res) => {
if (res.code == 200) {
if(res.data == 100){
if (res.data == 100) {
submitApi()
} else {
message.error("您有未完成的打分项,请完成后再提交!")
@ -668,7 +665,7 @@ const Index: React.FC<{}> = () => {
}
const handleOk = () => { // 确认解锁
if(unLockArr != ''){
if (unLockArr != '') {
let date = {
bidEvalId: bidEvalId,
judgesStatus: '1',
@ -713,7 +710,7 @@ const Index: React.FC<{}> = () => {
form.submit();
} else {
const remarkList = getRemarkList(ref.current)
if(remarkList) {
if (remarkList) {
let submitData = {
reviewStatus: '2',
reviewTurnId: getURLInformation("turnId"),
@ -744,8 +741,8 @@ const Index: React.FC<{}> = () => {
const Error: any[] = []
totalSupplierColumns.forEach((item: any) => {
const obj = data[data.length - 1][item?.supplierRegisterId]
if(obj.judgesResult == false) {//判断为不合格情况
if(isEmpty(obj.remarks)) {
if (obj.judgesResult == false) {//判断为不合格情况
if (isEmpty(obj.remarks)) {
Error.push(item?.supplierRegisterName)
return
}
@ -756,7 +753,7 @@ const Index: React.FC<{}> = () => {
remarks: obj?.judgesResult ? null : obj?.remarks,
})
});
if(Error.length > 0) {
if (Error.length > 0) {
message.info(`请填写【${Error[0]}】的不合格原因说明`)
return false
}
@ -815,7 +812,7 @@ const Index: React.FC<{}> = () => {
data["fileId"] = values.fileId
}
const remarkList = getRemarkList(ref.current)
if(remarkList) {
if (remarkList) {
let submitData = {
reviewStatus: '2',
reviewTurnId: getURLInformation("turnId"),
@ -827,33 +824,6 @@ const Index: React.FC<{}> = () => {
}
};
//根据bid获取到oid列表
const getOidList = async (param: any) => {
if (param == undefined || param == '' || param == null) { } else {
let list: any[] = []
list.push(param)
await getFileListByBid({ bidList: list }).then(res => {
let data = res[param]
let list: any[] = []
if (data.length == 0) {
setFileListData([])
} else {
data.forEach((ele: any) => {
list.push({
uid: ele.id,
name: ele.filename,
status: 'done',
oid: ele.id,
businessId: ele.bid,
url: `/api/core-service-ebtp-updownload/v1/attachment/download/oid/${ele.id}?Authorization=${token}`,
})
});
setFileListData(list)
}
})
}
}
useEffect(() => {
bidEvalDetailDTOList = []
let date = {
@ -867,7 +837,7 @@ const Index: React.FC<{}> = () => {
reviewType = res.data.reviewType
bidEvalId = res.data.id
reviewStatus = res.data.reviewStatus
if(res.data.reviewStatus != 1){
if (res.data.reviewStatus != 1) {
endProgress = true
setIsEndProgress(true)
} else {
@ -888,7 +858,6 @@ const Index: React.FC<{}> = () => {
//初始化三家供应商判断数据
await checkShowData(assessRoomId).then(response => {
if (response?.code == 200) {
getOidList(response?.data?.fileId)
setUploadId(response?.data?.fileId)
setRadioValue(response?.data?.continueStatus == undefined ? 1 : response?.data?.continueStatus)
form.setFieldsValue({
@ -969,14 +938,7 @@ const Index: React.FC<{}> = () => {
label="说明文件"
hidden={radioValue == 0}
>
{fileListData?.map((e: any, index: any) => (
<a
href={e.url}
key={index + 1}
>
{e.name}
</a>
))}
<ExtendUpload bid={uploadId} uploadProps={{ disabled: true }} />
</Form.Item>
) : (

View File

@ -184,17 +184,6 @@ export async function checkShowData(params: any) {
})
}
/**
* 根据bid获取文件列表
* @param params
*/
export async function getFileListByBid(params: any) {
return request('/api/core-service-ebtp-updownload/v1/attachment/find', {
method: 'POST',
data: {...params}
});
}
export async function getFile(id: any) { // 查找是否有应答文件
return request('/api/biz-service-ebtp-rsms/v1/review/config/detail/doc/list?detailId='+id, {
method: 'get',