This commit is contained in:
houjishuang
2025-05-30 17:05:36 +08:00
parent 8294ab8bfd
commit 0d22f9bd72
3 changed files with 46 additions and 31 deletions

View File

@ -109,6 +109,10 @@ export default [
path: '/ToAgencyManager',
component: './Agency/AgencyManager',
},
{
path: '/ToAgencyValid',
component: './Agency/AgencyManager/applyIndex',
},
//==============================================================引入的业务路由
...approvalForm,//审批单
...juryRoom,//评标室内所有路由

View File

@ -1,9 +1,9 @@
import React, { useState, useRef } from 'react';
import {Radio, message, Modal, Input, Form, PageHeader, Button, Spin, Select, Tree, DatePicker } from 'antd';
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
import { getPage, getDataById, deleteAgency, addAgency, updateAgency,disableAgency } from './service';
import {getValidAgencyPage, applyAgency, getDataById, deleteAgency, addAgency, updateAgency,disableAgency } from './service';
// import './styles.less';
import { getDicData } from '@/utils/session';
import {getSessionRoleData, getDicData,getSessionUserData } from '@/utils/session';
import TextArea from 'antd/lib/input/TextArea';
import SelectProvider from './components/SelectProvider';
@ -22,6 +22,7 @@ const agency: React.FC<{}> = () => {
const [selectProviderVisible, setSelectProviderVisible] = useState<boolean>(false);
const [currentRecord, setCurrentRecord] = useState<any>(null);
const [showEndDate, setShowEndDate] = useState<boolean>(false);
let userData=getSessionUserData();
//查询分页数据
const [pageData, pageDataSet] = useState<any>({
pageNo: 1,
@ -35,39 +36,37 @@ const agency: React.FC<{}> = () => {
value: string;
label: string;
}
const sys_normal_scope: DictType[] = [
{ value: 'EBTP', label: '招标采购中心' },
];
const [date, setDate] = useState('');
//委托列表
const columns: ProColumns<any>[] = [
{ title: '序号', valueType: 'index', width: 50, search: false, },
{ title: '代理机构名称', dataIndex: 'providerName', },//, ellipsis: true
{ title: '申请人', dataIndex: 'applyUser', search: false, },//, ellipsis: true//, ellipsis: true
{ title: '开始服务时间', dataIndex: 'periodBegin', search: false, },//, ellipsis: true
{ title: '开始服务时间', dataIndex: 'createDate', search: false, },//, ellipsis: true
{ title: '准入人', dataIndex: 'accessUser', search: false, },//, ellipsis: true
{ title: '失效时间', dataIndex: 'periodEnd', search: false,},//, ellipsis: true
{ title: '状态', dataIndex: 'validityStatus', valueType: 'select',
valueEnum: { '1': { text: '有效', status: '1' },'2': { text: '失效', status: '2' }, },
{ title: '有效期', dataIndex: 'validity',search: false, valueType: 'select',
valueEnum: { '1': { text: '长期', status: '1' },'2': { text: '定期', status: '2' }, },
},//, ellipsis: true
{ title: 'id', dataIndex: 'id', search: false,hideInTable:true,},//, ellipsis: true
// { title: '创建时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime', search: false },
{ title: 'providerId', dataIndex: 'providerId', search: false,hideInTable:true,},
{
title: '操作', width: '9%',
valueType: 'option',
render: (_, record) => [
<Button type='text' onClick={() => { handleUpdate(record.providerId) }}></Button>,
<Button type='text' onClick={() => { handleUpdate(record) }}></Button>,
record.validityStatus === '1' && (
<Button key="disable" type='text' onClick={() => handleDisable(record.id)}></Button>
),
record.validityStatus === '2' && (
<Button key="select" type='text' onClick={() => { handleReSelect(record) }}></Button>
)
// {
// title: '操作', width: '9%',
// valueType: 'option',
// render: (_, record) => [
// <Button type='text' onClick={() => { handleUpdate(record.providerId) }}>委托项目信息</Button>,
// <Button type='text' onClick={() => { handleUpdate(record) }}>查看</Button>,
// record.validityStatus === '1' && (
// <Button key="disable" type='text' onClick={() => handleDisable(record.id)}>失效</Button>
// ),
// record.validityStatus === '2' && (
// <Button key="select" type='text' onClick={() => { handleReSelect(record) }}>选择</Button>
// )
]
},
// ]
// },
];
// 删除操作
const handleDelete = (id: string) => {
@ -112,7 +111,7 @@ const agency: React.FC<{}> = () => {
});
setOpen(true);
setTitle('添加招标代理机构');
setTitle('申请招标代理机构');
};
const handleReSelect = async (record: any) => {
form.resetFields();
@ -177,12 +176,12 @@ const agency: React.FC<{}> = () => {
}
});
} else {
await addAgency(values).then((r: any) => {
await applyAgency(values).then((r: any) => {
if (r?.code == 200) {
message.success('新增成功');
message.success('申请成功');
} else {
message.error('新增失败');
message.error('申请失败');
}
});
}
@ -292,8 +291,8 @@ const agency: React.FC<{}> = () => {
{showEndDate && (
<Form.Item label="结束日期" name="periodEnd">
<DatePicker style={{ width: '100%' }} format="YYYY-MM-DD" picker="date" />
</Form.Item>
<DatePicker style={{ width: '100%' }} format={"yyyy-MM-DD"} picker="date" />
</Form.Item>
)}
@ -303,7 +302,7 @@ const agency: React.FC<{}> = () => {
);
return (
<Spin spinning={spin}>
<PageHeader title="我的招标代理" />
<PageHeader title="招标代理机构" />
<div style={{ maxHeight: innerHeight - 130, height: innerHeight - 130 }} className='xsy-entrust bgCWhite'>
<ProTable<any>
actionRef={actionRef}//action触发后更新表格
@ -314,7 +313,7 @@ const agency: React.FC<{}> = () => {
size='small'
search={{ labelWidth: 'auto', span: 6 }}
request={(params) =>
getPage({
getValidAgencyPage({
...params,
basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize },
}).then((res) => {
@ -332,7 +331,7 @@ const agency: React.FC<{}> = () => {
<Button type="primary" onClick={() => {
setSelectProviderVisible(true);
}}></Button>
}}></Button>
// <Button onClick={() => { handleAdd() }} type="primary">
// 新增招标代理
// </Button>,

View File

@ -7,6 +7,12 @@ export async function getPage(params: any) {
data: params,
});
}
export async function getValidAgencyPage(params: any) {
return request('/api/biz-service-ebtp-agency/api/agencies/find/valid', {
method: 'post',
data: params,
});
}
export async function getDataById(id: any) {
return request(`/api/biz-service-ebtp-agency/api/agencies/${id}`, {
method: 'get',
@ -23,6 +29,12 @@ export async function addAgency(params: any) {
data: params,
});
}
export async function applyAgency(params: any) {
return request('/api/biz-service-ebtp-agency/api/agencies/apply', {
method: 'post',
data: params,
});
}
export async function updateAgency(params: any) {
return request('/api/biz-service-ebtp-agency/api/agencies/update', {
method: 'post',