feat: 新增户外招聘会企业退订功能
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
import React, { useRef } from 'react';
|
||||
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||
import { getCompanyUnsubscribes } from '@/services/jobportal/outdoorFairDetail';
|
||||
|
||||
interface Props {
|
||||
fairId: number;
|
||||
}
|
||||
|
||||
const CompanyUnsubscribeTab: React.FC<Props> = ({ fairId }) => {
|
||||
const actionRef = useRef<ActionType>();
|
||||
|
||||
const columns: ProColumns<API.OutdoorFairDetail.CompanyUnsubscribe>[] = [
|
||||
{
|
||||
title: '企业名称',
|
||||
dataIndex: 'companyName',
|
||||
ellipsis: true,
|
||||
order: 1,
|
||||
},
|
||||
{ title: '联系人', dataIndex: 'contactPerson', width: 120, hideInSearch: true },
|
||||
{ title: '联系电话', dataIndex: 'contactPhone', width: 150, hideInSearch: true },
|
||||
{
|
||||
title: '退订原因',
|
||||
dataIndex: 'reason',
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
render: (_, record) => <span title={record.reason}>{record.reason}</span>,
|
||||
},
|
||||
{
|
||||
title: '退订时间',
|
||||
dataIndex: 'unsubscribeTime',
|
||||
valueType: 'dateTime',
|
||||
width: 180,
|
||||
hideInSearch: true,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<ProTable<API.OutdoorFairDetail.CompanyUnsubscribe>
|
||||
headerTitle="企业退订记录"
|
||||
actionRef={actionRef}
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
search={{ labelWidth: 'auto' }}
|
||||
options={false}
|
||||
scroll={{ x: 'max-content' }}
|
||||
pagination={{ pageSize: 10 }}
|
||||
request={async (params) => {
|
||||
const res = await getCompanyUnsubscribes(fairId, {
|
||||
current: params.current,
|
||||
pageSize: params.pageSize,
|
||||
companyName: params.companyName,
|
||||
});
|
||||
return {
|
||||
data: res.rows || [],
|
||||
total: res.total || 0,
|
||||
success: res.code === 200,
|
||||
};
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default CompanyUnsubscribeTab;
|
||||
@@ -9,6 +9,7 @@ import FairInfoTab from './components/FairInfoTab';
|
||||
import BoothTab from './components/BoothTab';
|
||||
import ParticipatingCompaniesTab from './components/ParticipatingCompaniesTab';
|
||||
import ParticipatingJobsTab from './components/ParticipatingJobsTab';
|
||||
import CompanyUnsubscribeTab from './components/CompanyUnsubscribeTab';
|
||||
import AttendeeTab from './components/AttendeeTab';
|
||||
import DeviceTab from './components/DeviceTab';
|
||||
|
||||
@@ -42,6 +43,7 @@ const OutdoorFairDetail: React.FC = () => {
|
||||
const tabItems = [
|
||||
{ key: 'fair-info', label: '招聘会管理' },
|
||||
{ key: 'participating-companies', label: '参会企业' },
|
||||
{ key: 'company-unsubscribe', label: '企业退订' },
|
||||
{ key: 'participating-jobs', label: '参会岗位' },
|
||||
{ key: 'attendee', label: '参会人员管理' },
|
||||
{ key: 'device', label: '设备管理' },
|
||||
@@ -86,6 +88,8 @@ const OutdoorFairDetail: React.FC = () => {
|
||||
return <BoothTab fairId={fairId} fairInfo={fairInfo} />;
|
||||
case 'participating-companies':
|
||||
return <ParticipatingCompaniesTab fairId={fairId} />;
|
||||
case 'company-unsubscribe':
|
||||
return <CompanyUnsubscribeTab fairId={fairId} />;
|
||||
case 'participating-jobs':
|
||||
return <ParticipatingJobsTab fairId={fairId} />;
|
||||
case 'attendee':
|
||||
|
||||
Reference in New Issue
Block a user