From aa48790c24ad74bea5fe3606991e814f16d4844e Mon Sep 17 00:00:00 2001 From: francis-fh Date: Thu, 23 Jul 2026 19:20:32 +0800 Subject: [PATCH 1/6] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Management/List/edit.tsx | 113 ++++++++++++++++++++++- src/pages/Management/List/index.tsx | 8 ++ src/pages/Usermgmt/Companyuser/index.tsx | 28 +++--- src/types/Management/list.d.ts | 8 ++ src/types/cms/company.d.ts | 11 ++- 5 files changed, 153 insertions(+), 15 deletions(-) diff --git a/src/pages/Management/List/edit.tsx b/src/pages/Management/List/edit.tsx index ead7237..a16213a 100644 --- a/src/pages/Management/List/edit.tsx +++ b/src/pages/Management/List/edit.tsx @@ -32,7 +32,7 @@ const toManageFormValues = ( values: Partial, ): Partial => ({ ...values, - jobLocationAreaCode: String(values.jobLocationAreaCode || ''), + jobLocationAreaCode: values.jobLocationAreaCode != null ? String(values.jobLocationAreaCode) : undefined, salaryComposition: parseCommaSeparatedTags(values.salaryComposition), welfareBenefits: parseCommaSeparatedTags(values.welfareBenefits), workSchedule: parseCommaSeparatedTags(values.workSchedule), @@ -65,6 +65,7 @@ export type ListFormProps = { salaryCompositionEnum: DictValueEnumObj; welfareBenefitsEnum: DictValueEnumObj; workScheduleEnum: DictValueEnumObj; + keyPopulationsEnum: DictValueEnumObj; mode?: 'view' | 'edit' | 'create'; }; @@ -81,6 +82,8 @@ const listEdit: React.FC = (props) => { const isEnterprise = initialState?.currentUser?.userType === 'view'; const [form] = Form.useForm(); const companyNameMap = useRef>({}); + const [companyOptions, setCompanyOptions] = useState<{ label: string; value: number }[]>([]); + const [areaOptions, setAreaOptions] = useState<{ label: string; value: string }[]>([]); const [jobDetail, setJobDetail] = useState(null); const [loading, setLoading] = useState(false); const [jobCategoryTreeData, setJobCategoryTreeData] = useState([]); @@ -94,13 +97,36 @@ const listEdit: React.FC = (props) => { salaryCompositionEnum, welfareBenefitsEnum, workScheduleEnum, + keyPopulationsEnum, } = props; const { mode = props.values ? 'edit' : 'create' } = props; + const [showKeyPopulations, setShowKeyPopulations] = useState(false); useEffect(() => { if (props.open) { form.resetFields(); if (props.values) { form.setFieldsValue(toManageFormValues(props.values)); + // 预填充公司选项(编辑时回显公司名称) + if (props.values.companyId && props.values.companyName) { + companyNameMap.current[props.values.companyId] = props.values.companyName; + setCompanyOptions([ + { label: props.values.companyName, value: props.values.companyId }, + ]); + } else { + setCompanyOptions([]); + } + // 预填充区县选项(编辑时回显工作区县名称) + if (props.values.jobLocationAreaCode && areaEnum) { + const code = String(props.values.jobLocationAreaCode); + const areaItem = areaEnum[code]; + if (areaItem) { + setAreaOptions([{ label: areaItem.label ?? areaItem.text, value: code }]); + } else { + setAreaOptions([]); + } + } else { + setAreaOptions([]); + } // 初始化地图位置信息(编辑时回显) if (props.values.latitude || props.values.longitude) { setMapViewInfo({ @@ -111,8 +137,17 @@ const listEdit: React.FC = (props) => { } else { setMapViewInfo({}); } + // 初始化重点人群显示状态(编辑时回显) + if (props.values.isKeyPopulations === '0') { + setShowKeyPopulations(true); + } else { + setShowKeyPopulations(false); + } } else { setMapViewInfo({}); + setShowKeyPopulations(false); + setCompanyOptions([]); + setAreaOptions([]); } // 加载岗位标签树数据 getJobTitleTreeSelect() @@ -123,6 +158,22 @@ const listEdit: React.FC = (props) => { } }, [form, props.values?.jobId, props.open]); + // 区县字典加载完成后,回显工作区县名称 + useEffect(() => { + if ( + props.open && + props.values?.jobLocationAreaCode && + areaEnum && + Object.keys(areaEnum).length > 0 + ) { + const code = String(props.values.jobLocationAreaCode); + const areaItem = areaEnum[code]; + if (areaItem) { + setAreaOptions([{ label: areaItem.label ?? areaItem.text, value: code }]); + } + } + }, [areaEnum, props.open, props.values?.jobLocationAreaCode]); + // 在查看模式和编辑模式下调用API获取详情 useEffect(() => { if (props.open && (mode === 'view' || mode === 'edit') && props.values?.jobId) { @@ -141,6 +192,21 @@ const listEdit: React.FC = (props) => { // 如果是编辑模式,将获取到的详情数据设置到表单中 if (mode === 'edit') { form.setFieldsValue(toManageFormValues(response.data)); + // 预填充公司选项(从详情API获取的数据回显公司名称) + if (response.data.companyId && response.data.companyName) { + companyNameMap.current[response.data.companyId] = response.data.companyName; + setCompanyOptions([ + { label: response.data.companyName, value: response.data.companyId }, + ]); + } + // 预填充区县选项(从详情API获取的数据回显工作区县名称) + if (response.data.jobLocationAreaCode && areaEnum) { + const code = String(response.data.jobLocationAreaCode); + const areaItem = areaEnum[code]; + if (areaItem) { + setAreaOptions([{ label: areaItem.label ?? areaItem.text, value: code }]); + } + } } } } catch (error) { @@ -203,6 +269,8 @@ const listEdit: React.FC = (props) => { ), jobCategory: values.jobCategory, isUrgent: values.isUrgent ? 1 : 0, + isKeyPopulations: showKeyPopulations ? '0' : '1', + keyPopulations: showKeyPopulations ? values.keyPopulations : undefined, latitude: values.latitude, longitude: values.longitude, }; @@ -237,6 +305,16 @@ const listEdit: React.FC = (props) => { label="是否急聘" valueEnum={{ 0: '否', 1: '是' }} /> + + = (props) => { initialValue={0} fieldProps={{ defaultChecked: false }} /> + { + setShowKeyPopulations(checked); + if (!checked) { + form.setFieldValue('keyPopulations', undefined); + } + }, + }} + /> + {showKeyPopulations && ( + + )} {!isEnterprise && ( = (props) => { onChange: (companyId: number) => { form.setFieldValue('companyName', companyNameMap.current[companyId] ?? ''); }, + options: companyOptions.length > 0 ? companyOptions : undefined, }} placeholder="请输入公司名称选择公司" rules={[{ required: true, message: '请输入公司名称选择公司!' }]} @@ -543,6 +649,9 @@ const listEdit: React.FC = (props) => { label={'工作区县'} valueEnum={areaEnum} placeholder="请选择区县" + fieldProps={{ + options: areaOptions.length > 0 ? areaOptions : undefined, + }} rules={[{ required: true, message: '请选择区县!' }]} /> = (props) => { return title.toLowerCase().includes(inputValue.toLowerCase()); }} placeholder="请搜索或选择岗位标签" - style={{ width: '100%' }} + style={{ width: 328 }} /> diff --git a/src/pages/Management/List/index.tsx b/src/pages/Management/List/index.tsx index ec0f94b..c1da99f 100644 --- a/src/pages/Management/List/index.tsx +++ b/src/pages/Management/List/index.tsx @@ -97,6 +97,7 @@ function ManagementList() { const [salaryCompositionEnum, setSalaryCompositionEnum] = useState([]); const [welfareBenefitsEnum, setWelfareBenefitsEnum] = useState([]); const [workScheduleEnum, setWorkScheduleEnum] = useState([]); + const [keyPopulationsEnum, setKeyPopulationsEnum] = useState([]); const [currentRow, setCurrentRow] = useState(); const [modalVisible, setModalVisible] = useState(false); const [mode, setMode] = useState<'view' | 'edit' | 'create'>('create'); @@ -128,6 +129,9 @@ function ManagementList() { getDictValueEnum('work_schedule', false, true).then((data) => { setWorkScheduleEnum(data); }); + getDictValueEnum('kp_type', false, true).then((data) => { + setKeyPopulationsEnum(data); + }); }, []); async function changeRelease(record: API.ManagementList.Manage) { @@ -440,6 +444,9 @@ function ManagementList() { rowKey="jobId" key="index" columns={columns} + search={{ + defaultCollapsed: false, + }} request={(params) => getCmsJobList({ ...params } as API.ManagementList.ListParams).then((res) => { console.log(params); @@ -533,6 +540,7 @@ function ManagementList() { salaryCompositionEnum={salaryCompositionEnum} welfareBenefitsEnum={welfareBenefitsEnum} workScheduleEnum={workScheduleEnum} + keyPopulationsEnum={keyPopulationsEnum} > ); diff --git a/src/pages/Usermgmt/Companyuser/index.tsx b/src/pages/Usermgmt/Companyuser/index.tsx index bf3e9cd..583c487 100644 --- a/src/pages/Usermgmt/Companyuser/index.tsx +++ b/src/pages/Usermgmt/Companyuser/index.tsx @@ -68,20 +68,24 @@ function CompanyUserList() { width: 100, }, { - title: '联系人', - dataIndex: 'contactPerson', + title: '企业联系人', + dataIndex: 'companyContactList', valueType: 'text', align: 'center', - width: 100, - render: (_, record) => record.contactPerson || '-', - }, - { - title: '联系电话', - dataIndex: 'contactPersonPhone', - valueType: 'text', - align: 'center', - width: 130, - render: (_, record) => record.contactPersonPhone || '-', + width: 180, + render: (_, record) => { + const list = record.companyContactList; + if (!list || list.length === 0) return '-'; + return ( +
+ {list.map((item, index) => ( +
+ {item.contactPerson || '-'}:{item.contactPersonPhone || '-'} +
+ ))} +
+ ); + }, }, { title: '状态', diff --git a/src/types/Management/list.d.ts b/src/types/Management/list.d.ts index edcb68c..7035063 100644 --- a/src/types/Management/list.d.ts +++ b/src/types/Management/list.d.ts @@ -39,6 +39,10 @@ declare namespace API.ManagementList { createTime?: string; jobCategory?: string; description?: string; + /** 是否重点人群 0是,1否 */ + isKeyPopulations?: string; + /** 重点人群-1农民工、2团场职工、3失业人员、4零就业家庭、5零工人员、6退役军人 */ + keyPopulations?: string; } export interface AddParams { @@ -71,6 +75,10 @@ declare namespace API.ManagementList { jobContactList?: ContactPerson[]; jobCategory?: string; description?: string; + /** 是否重点人群 0是,1否 */ + isKeyPopulations?: string; + /** 重点人群-1农民工、2团场职工、3失业人员、4零就业家庭、5零工人员、6退役军人 */ + keyPopulations?: string; } export interface ListParams { diff --git a/src/types/cms/company.d.ts b/src/types/cms/company.d.ts index 55e38cb..74a52f2 100644 --- a/src/types/cms/company.d.ts +++ b/src/types/cms/company.d.ts @@ -7,6 +7,15 @@ declare namespace API.CmsCompany { data?: any; } + export interface CompanyContact { + createTime: string | null; + updateTime: string | null; + id: number | null; + companyId: number; + contactPerson: string; + contactPersonPhone: string; + } + export interface CompanyUser { createTime: string; updateTime: string; @@ -29,7 +38,7 @@ declare namespace API.CmsCompany { contactPersonPhone?: string | null; status: number; // 0 待审核, 1 通过, 2 驳回 notPassReason?: string | null; - companyContactList?: any; + companyContactList?: CompanyContact[]; registeredAddress: string; isAbnormal?: any; rejectTime?: string | null; From 4900040e6bbdb19db57cfeb7f315430eaeb50091 Mon Sep 17 00:00:00 2001 From: francis-fh Date: Fri, 24 Jul 2026 11:26:57 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E4=BA=BA=E7=AE=80?= =?UTF-8?q?=E5=8E=86=E7=94=9F=E6=88=90=E5=99=A8=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Management/List/SeeMatching/index.tsx | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/pages/Management/List/SeeMatching/index.tsx b/src/pages/Management/List/SeeMatching/index.tsx index 37cb7b6..e882572 100644 --- a/src/pages/Management/List/SeeMatching/index.tsx +++ b/src/pages/Management/List/SeeMatching/index.tsx @@ -1,8 +1,8 @@ import React, { Fragment, useEffect, useRef, useState } from 'react'; -import { FormattedMessage, useAccess, useParams } from '@umijs/max'; +import { FormattedMessage, useAccess, useNavigate, useParams } from '@umijs/max'; import { Button, FormInstance, message, Tag } from 'antd'; import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components'; -import { FormOutlined, PlusOutlined, AlignLeftOutlined, SendOutlined, FilterOutlined } from '@ant-design/icons'; +import { FormOutlined, PlusOutlined, AlignLeftOutlined, SendOutlined, FilterOutlined, ArrowLeftOutlined } from '@ant-design/icons'; import { getDictValueEnum } from '@/services/system/dict'; import DictTag from '@/components/DictTag'; import { exportCmsAppUserExport } from '@/services/mobileusers/list'; @@ -14,7 +14,6 @@ import { import similarityJobs from '@/utils/similarity_Job'; import Detail from './detail'; import Hire from './hire'; -import ResumeView from './resumeView'; import InterviewInvite from '../ResumeRecommend/InterviewInvite'; import ResumeFilter from './resumeFilter'; @@ -35,6 +34,7 @@ const handleExport = async (values: API.MobileUser.ListParams) => { function ManagementList() { const access = useAccess(); + const navigate = useNavigate(); const formTableRef = useRef(); const actionRef = useRef(); @@ -52,7 +52,6 @@ function ManagementList() { const [hireVisible, setHireVisible] = useState(false); const [jobInfo, setJobInfo] = useState({}); const [matchingDegree, setMatchingDegree] = useState(null); - const [resumeVisible, setResumeVisible] = useState(false); const [inviteVisible, setInviteVisible] = useState(false); const [filterVisible, setFilterVisible] = useState(false); const [hireAdd, setHireAdd] = useState(null); @@ -205,11 +204,10 @@ function ManagementList() { icon={} hidden={!access.hasPerms('cms:userworkexperiences:list')} onClick={() => { - setCurrentRow(record); - setResumeVisible(true); + navigate(`/usermgmt/appuser/resume/${record.userId}?readOnly=1`); }} > - 查看简历 + 简历 , , + , + , + , + , + ], }, ]; @@ -182,7 +360,155 @@ function CompanyUserList() { scroll={{ x: 'max-content' }} pagination={{ defaultPageSize: 10, showSizeChanger: true }} headerTitle="企业用户管理" + toolBarRender={() => [ + , + ]} /> + + {/* 编辑/新增弹窗 */} + { + let resData; + if (values.companyId) { + resData = await putCmsCompanyList({ + ...values, + companyNature: values.companyNature || '', + }); + } else { + resData = await addCmsCompanyList({ + ...values, + companyNature: values.companyNature || '', + }); + } + if (resData.code === 200) { + setModalVisible(false); + setCurrentRow(undefined); + message.success(values.companyId ? '修改成功' : '新增成功'); + actionRef.current?.reload(); + } + }} + onCancel={() => { + setModalVisible(false); + setCurrentRow(undefined); + }} + values={currentRow} + scaleEnum={scaleEnum} + companyNatureEnum={companyNatureEnum} + /> + + {/* 详情弹窗 */} + { + setDetailVisible(false); + setDetailData(undefined); + }} + record={detailData} + scaleEnum={scaleEnum} + companyNatureEnum={companyNatureEnum} + industryEnum={industryEnum} + /> + + {/* 审核弹窗 */} + { + setApprovalVisible(false); + setApprovalReason(''); + }} + footer={null} + > +
+
+ 审核结果: + + +
+ {approvalStatus === 2 && ( +
+
驳回原因(必填):
+