3.10 工程代码同步master

This commit is contained in:
jl-zhoujl2
2022-03-10 14:24:13 +08:00
parent 41ab55a4ac
commit 62f6b07ee2
914 changed files with 143121 additions and 29110 deletions

View File

@ -1,27 +0,0 @@
//需要包含筛选里的字段 筛选才能生效
export interface TableListItem {
key?: number;
unitName?: string;
contacts?: string;
tel?: string;
status?: string;
}
export interface DetailListItem {
key?: string;
number?: string;
bidSection?: string;
type?: string;
bidBook?: string;
contacts?: string;
state?: string;
}
export interface DownloadListItem {
key?: string;
number?: string;
edition?: string;
time?: string;
downloaders?: string;
files?: string;
}

View File

@ -2,23 +2,109 @@ import React, { useState, useEffect } from 'react';
import { Button, Table, Space, Modal, Collapse } from 'antd';
import { getPayandreply, getDetail } from './service';
import '@/assets/ld_style.less';
import { getProId } from '@/utils/session';
import { getProId, getProMethod, getDicData } from '@/utils/session';
import FileDown from '@/utils/Download';
import { getURLInformation, proTableValueEnum } from '@/utils/CommonUtils';
import { btnAuthority } from '@/utils/authority';
import ProTable from '@ant-design/pro-table';
const { Panel } = Collapse;
let columns: any = [], detailColumns: any = [], downloadColumns: any[]
let modelTit: string, tit1: string, tit2: string, tit3: string, contactListName: string, contactTelephone: string, contactEmail: string, bidSectBizNum: string, bidSectName: string, bidSectTypeDict: string, bidcontactName: string, dowSectBizNum: string, exportBtn: string;
const Index: React.FC<{}> = () => {
const [detailList, setDetailList] = useState<any>([]); // 标详情
const [detailList, setDetailList] = useState<any>([]); // 标详情
const [downloadList, setDownloadList] = useState<any>([]); // 标书下载记录
const [detailVisible, setDetailVisible] = useState<boolean>(false);
const [packageList, setPackageList] = useState([]);
const [companyName, setCompanyName] = useState<object>(); // 单位名称
const [downloadStatus, setDownloadStatus] = useState<object>(); // 状态
const [contactName, setContactName] = useState<object>(); // 联系人姓名
const projectType = getURLInformation('roomType') ? getURLInformation('roomType') : '2';
const MethodDict = getProMethod(); //获取采购方式
const modalHeight = (innerHeight * 96) / 100;
const columns: any[] = [ // 标包列表
//获取字典
const getDict: any = getDicData();
const dictData = JSON.parse(getDict);
if (MethodDict == "procurement_mode_1" || MethodDict == "procurement_mode_2") {
modelTit = '购标信息'
tit1 = '购标申请信息'
tit2 = '标段详情'
tit3 = '标书下载记录'
contactListName = '购标联系人'
contactTelephone = '购标联系人电话'
contactEmail = '购标联系人邮箱'
bidSectBizNum = '标段编号'
bidSectName = '标段名称'
bidSectTypeDict = '标段分类'
bidcontactName = '标段联系人'
dowSectBizNum = '标段编号'
exportBtn = '导出购标信息'
} else if (MethodDict == "procurement_mode_5" || MethodDict == "procurement_mode_6" || MethodDict == "procurement_mode_3" || MethodDict == "procurement_mode_9") {
modelTit = '缴费信息'
tit1 = '缴费申请信息'
tit2 = '采购包详情'
tit3 = '采购文件下载记录'
contactListName = '缴费联系人'
contactTelephone = '缴费联系人电话'
contactEmail = '缴费联系人邮箱'
bidSectBizNum = '采购包编号'
bidSectName = '采购包名称'
bidSectTypeDict = '采购包分类'
bidcontactName = '采购包联系人'
dowSectBizNum = '采购文件编号'
exportBtn = '导出缴费信息'
} else if (MethodDict == "procurement_mode_7") { // 询价
modelTit = '缴费信息'
tit1 = '缴费申请信息'
tit2 = '采购包详情'
tit3 = '询价文件下载记录'
contactListName = '联系人'
contactTelephone = '联系人电话'
contactEmail = '联系人邮箱'
bidSectBizNum = '采购包编号'
bidSectName = '采购包名称'
bidSectTypeDict = '采购包分类'
bidcontactName = '采购包联系人'
dowSectBizNum = '询价文件编号'
exportBtn = '导出信息'
} else if (MethodDict == "procurement_mode_4") {
modelTit = '缴费信息'
tit1 = '缴费申请信息'
tit2 = '包件详情'
tit3 = '招募文件下载记录'
contactListName = '缴费联系人'
contactTelephone = '缴费联系人电话'
contactEmail = '缴费联系人邮箱'
bidSectBizNum = '包件编号'
bidSectName = '包件名称'
bidSectTypeDict = '包件分类'
bidcontactName = '包件联系人'
dowSectBizNum = '招募文件编号'
exportBtn = '导出缴费信息'
} else if (MethodDict == "procurement_mode_8") {
modelTit = '缴费信息'
tit1 = '缴费申请信息'
tit2 = '标段详情'
tit3 = '标书下载记录'
contactListName = '缴费联系人'
contactTelephone = '缴费联系人电话'
contactEmail = '缴费联系人邮箱'
bidSectBizNum = '标段编号'
bidSectName = '标段名称'
bidSectTypeDict = '标段分类'
bidcontactName = '标段联系人'
dowSectBizNum = '标段编号'
exportBtn = '导出缴费信息'
}
columns = [ // 标段列表
{
title: '序号',
width: '10%',
width: 50,
render: (text: any, record: any, index: any) => `${index + 1}`
},
{
@ -27,41 +113,95 @@ const Index: React.FC<{}> = () => {
dataIndex: 'companyName',
},
{
title: '购标联系人',
title: contactListName,
width: '15%',
dataIndex: 'contactName',
},
{
title: '购标联系人电话',
title: contactTelephone,
width: '20%',
dataIndex: 'contactTelephone',
},
{
title: contactEmail,
width: '20%',
dataIndex: 'contactEmail',
},
{
title: '当前状态',
width: '15%',
render: (text: any, record: any) => {
if (record.registerStatus == '4') {
return (
<>退</>
)
} else {
if (MethodDict == "procurement_mode_1" || MethodDict == "procurement_mode_2") {
if (record.registerStatus == '4') {
return (
<>退</>
)
} else {
if (record.downloadStatus == '1') {
return (
<></>
)
} else if (record.downloadStatus == '2') {
return (
<></>
)
} else {
if (record.payStatus == '2') {
return (
<></>
)
} else if (record.payStatus == '1') {
return (
<></>
)
}
}
}
} else if (MethodDict == "procurement_mode_7") {
if (record.downloadStatus == '1') {
return (
<></>
)
} else if (record.downloadStatus == '2') {
if (record.offerTotalPrice == null || record.offerTotalPrice == undefined || record.offerTotalPrice == "") {
return (
<></>
)
} else {
return (
<></>
)
}
} else {
return (
<></>
<></>
)
}
} else {
if (record.registerStatus == '4') {
return (
<>退</>
)
} else {
if (record.payStatus == '2') {
if (record.downloadStatus == '1') {
return (
<></>
<></>
)
} else if (record.payStatus == '1') {
} else if (record.downloadStatus == '2') {
return (
<></>
<></>
)
} else {
if (record.payStatus == '2') {
return (
<></>
)
} else if (record.payStatus == '1') {
return (
<></>
)
}
}
}
}
@ -72,70 +212,90 @@ const Index: React.FC<{}> = () => {
width: '15%',
render: (text: any, record: any) => (
<Space>
<Button type="link" danger onClick={() => lookDetail(record)}></Button>
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="link" danger onClick={() => lookDetail(record)}></Button>
</Space>
),
},
];
const detailColumns: any[] = [ // 标包详情
detailColumns = [ // 标段详情
{
title: '序号',
width: 50,
render: (text: any, record: any, index: any) => `${index + 1}`
},
{
title: '标包编号',
title: bidSectBizNum,
dataIndex: 'bidSectBizNum',
},
{
title: '标段(包)名称',
title: bidSectName,
dataIndex: 'bidSectName',
},
{
title: '标包分类',
dataIndex: 'bidSectTypeDict',
title: bidSectTypeDict,
dataIndex: 'procurementTypeDict',
valueEnum: proTableValueEnum(dictData['procurement_type=entrust']),
},
{
title: '购标联系人',
title: bidcontactName,
dataIndex: 'contactName',
},
{
title: '当前状态',
dataIndex: 'downloadStatus',
render: (text: any, record: any) => {
if (record.downloadStatus == '0') {
return (
<></>
)
} else if (record.downloadStatus == '1') {
return (
<></>
)
} else if (record.downloadStatus == '2') {
return (
<></>
)
} else if (record.downloadStatus == '3') {
return (
<></>
)
if (MethodDict == "procurement_mode_1" || MethodDict == "procurement_mode_2") {
if (record.downloadStatus == '0') {
return (
<></>
)
} else if (record.downloadStatus == '1') {
return (
<></>
)
} else if (record.downloadStatus == '2') {
return (
<></>
)
} else if (record.downloadStatus == '3') {
return (
<></>
)
}
} else {
if (record.downloadStatus == '0') {
return (
<></>
)
} else if (record.downloadStatus == '1') {
return (
<></>
)
} else if (record.downloadStatus == '2') {
return (
<></>
)
} else if (record.downloadStatus == '3') {
return (
<></>
)
}
}
},
}
];
const downloadColumns: any[] = [ // 标书下载记录
downloadColumns = [ // 标书下载记录
{
title: '序号',
width: 80,
width: 50,
render: (text: any, record: any, index: any) => `${index + 1}`
},
{
title: '标包编号',
title: dowSectBizNum,
dataIndex: 'bidSectBizNum',
},
{
title: '版本',
dataIndex: 'downloadVersion',
},
{
title: '下载时间',
dataIndex: 'downloadTime',
@ -152,7 +312,6 @@ const Index: React.FC<{}> = () => {
];
const callback = (key: any) => {
console.log(key);
}
const lookDetail = (val: any) => { // 购标及应答情况查看-查看详情
@ -160,7 +319,10 @@ const Index: React.FC<{}> = () => {
setCompanyName(val.companyName)
setDownloadStatus(val.downloadStatus)
setContactName(val.contactName)
getDetail(val.id).then((res) => {
let data = {
roomType: projectType
}
getDetail(val.id, data).then((res) => {
if (res.code == 200) {
setDetailList(res.data.projectSection)
setDownloadList(res.data.bizUpdownRecords)
@ -170,7 +332,10 @@ const Index: React.FC<{}> = () => {
useEffect(() => {
let projectId = getProId()
getPayandreply(projectId).then((res) => {
let data = {
roomType: projectType
}
getPayandreply(projectId, data).then((res) => {
if (res.code == 200) {
setPackageList(res.data)
}
@ -179,15 +344,22 @@ const Index: React.FC<{}> = () => {
return (
<>
<div className="bidContent">
<Button type="primary" danger></Button>
<div className="biddingResponse">
<div className="exportBtn">
</div>
{
packageList.map((item: any, index: any) => {
return (
<Collapse className='m10' defaultActiveKey={['1']} onChange={callback}>
<Panel header={item.sectionVO.bsName} key="1">
<Collapse defaultActiveKey={['0']} onChange={callback}>
<Panel header={item.sectionVO.bsName} key={index}>
<div>
<Table pagination={false} columns={columns} dataSource={item.bizSupplierRegisters} />
{
item.bizSupplierRegisters ?
<div hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} className="mb16">
<FileDown apiUrl={`/api/biz-service-ebtp-tender/v1/supplier_register/export/supplier/${item.sectionVO.bsId}/${item.bizSupplierRegisters[0].assessRoomId}?roomType=${projectType}`} fileName={''} type='xlsx' method='GET' btnName={exportBtn} />
</div> : null
}
<Table size='small' pagination={false} columns={columns} dataSource={item.bizSupplierRegisters} />
</div>
</Panel>
</Collapse>
@ -195,15 +367,19 @@ const Index: React.FC<{}> = () => {
})
}
<Modal // 查看详情
title="购标信息"
// title="购标信息"
title={modelTit}
width={800}
visible={detailVisible}
onCancel={() => setDetailVisible(false)}
footer={null}
footer={[<Button onClick={() => setDetailVisible(false)}></Button>]}
centered
style={{ maxHeight: modalHeight }}
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
>
<div className="relative">
<Collapse className='m10' defaultActiveKey={['1']}>
<Panel header="购标申请信息" key="1">
<Collapse defaultActiveKey={['1']}>
<Panel header={tit1} key="1">
<div className="address">
<p>{companyName}</p>
</div>
@ -211,32 +387,36 @@ const Index: React.FC<{}> = () => {
</Collapse>
</div>
<div className="relative">
<Collapse className='m10' defaultActiveKey={['1']}>
<Panel header="标包详情" key="1">
<Collapse defaultActiveKey={['1']}>
<Panel header={tit2} key="1">
{
detailList.map((val: any, index: any) => {
val.contactName = contactName
val.downloadStatus = downloadStatus
})
}
<Table
<ProTable
size='small'
pagination={false}
columns={detailColumns}
dataSource={detailList}
className="mt10"
toolBarRender={false}
search={false}
/>
</Panel>
</Collapse>
</div>
<div className="relative">
<Collapse className='m10' defaultActiveKey={['1']}>
<Panel header="标书下载记录" key="1">
<Collapse defaultActiveKey={['1']}>
<Panel header={tit3} key="1">
{
downloadList.map((val: any, index: any) => {
val.bidSectBizNum = detailList[0].bidSectBizNum
})
}
<Table
size='small'
pagination={false}
columns={downloadColumns}
dataSource={downloadList}

View File

@ -1,13 +1,15 @@
import request from '@/utils/request';
export async function getPayandreply(projectId: any) { // 列表
export async function getPayandreply(projectId: any, params: any) { // 列表
return request('/api/biz-service-ebtp-tender/v1/supplier_register/get_payandreply_status/' + projectId, {
method: 'get',
params
});
}
export async function getDetail(supplierId: any) { // 查看详情
export async function getDetail(supplierId: any, params: any) { // 查看详情
return request('/api/biz-service-ebtp-tender/v1/supplier_register/payandreply_status_detail/' + supplierId, {
method: 'get',
params
});
}