diff --git a/config/router.config.ts b/config/router.config.ts index 3cfde99..8633fbb 100644 --- a/config/router.config.ts +++ b/config/router.config.ts @@ -109,6 +109,10 @@ export default [ path: '/ToAgencyManager', component: './Agency/AgencyManager', }, + { + path: '/ToAgencyValid', + component: './Agency/AgencyManager/applyIndex', + }, //==============================================================引入的业务路由 ...approvalForm,//审批单 ...juryRoom,//评标室内所有路由 diff --git a/src/pages/Agency/AgencyManager/applyIndex.tsx b/src/pages/Agency/AgencyManager/applyIndex.tsx index 4415911..f5e96b1 100644 --- a/src/pages/Agency/AgencyManager/applyIndex.tsx +++ b/src/pages/Agency/AgencyManager/applyIndex.tsx @@ -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(false); const [currentRecord, setCurrentRecord] = useState(null); const [showEndDate, setShowEndDate] = useState(false); + let userData=getSessionUserData(); //查询分页数据 const [pageData, pageDataSet] = useState({ 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[] = [ { 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) => [ - , - , - record.validityStatus === '1' && ( - - ), - record.validityStatus === '2' && ( - - ) + // { + // title: '操作', width: '9%', + // valueType: 'option', + // render: (_, record) => [ + // , + // , + // record.validityStatus === '1' && ( + // + // ), + // record.validityStatus === '2' && ( + // + // ) - ] - }, + // ] + // }, ]; // 删除操作 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 && ( - - + + )} @@ -303,7 +302,7 @@ const agency: React.FC<{}> = () => { ); return ( - +
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<{}> = () => { + }}>申请新增招标代理 // , diff --git a/src/pages/Agency/AgencyManager/service.ts b/src/pages/Agency/AgencyManager/service.ts index 0c0d660..ed5c24c 100644 --- a/src/pages/Agency/AgencyManager/service.ts +++ b/src/pages/Agency/AgencyManager/service.ts @@ -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',