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