| | |
| | | import { access } from "fs"; |
| | | |
| | | export default [ |
| | | export default [ |
| | | { |
| | | path: '/user', |
| | | path: "/user", |
| | | layout: false, |
| | | routes: [{ name: '登录', path: '/user/login', component: './User/Login' }], |
| | | routes: [{ name: "登录", path: "/user/login", component: "./User/Login" }], |
| | | }, |
| | | { path: '/welcome', name: '欢迎', icon: 'smile', component: './Welcome' }, |
| | | { |
| | | path: '/admin', |
| | | name: '管理页', |
| | | icon: 'crown', |
| | | // layout: false, |
| | | path: "/welcome", |
| | | name: "欢迎", |
| | | icon: "smile", |
| | | component: "./Welcome", |
| | | }, |
| | | { |
| | | path: "/admin", |
| | | name: "管理页", |
| | | icon: "crown", |
| | | routes: [ |
| | | { path: '/admin', redirect: '/admin/sub-page' }, |
| | | { path: '/admin/sub-page', access: 'canAdmin', name: '二级管理页', component: './Admin' }, |
| | | { path: "/admin", redirect: "/admin/sub-page" }, |
| | | { |
| | | path: "/admin/sub-page", |
| | | access: "canAdmin", |
| | | name: "二级管理页", |
| | | component: "./Admin", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | |
| | | // ], |
| | | // }, |
| | | { |
| | | path: '/myWork', |
| | | name: '我的工作', |
| | | icon: 'crown', |
| | | path: "/myWork", |
| | | name: "我的工作", |
| | | icon: "crown", |
| | | routes: [ |
| | | { path: '/myWork', redirect: '/admin/sub-page' }, |
| | | { path: '/myWork/taskManagement', name: '任务管理', component: './myWork/taskManagement' }, |
| | | { path: '/myWork/AnnouncementManagement', name: '公告管理', component: './Admin' }, |
| | | { path: '/myWork/messageManagement', name: '消息管理', component: './Admin' }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/organizationDesign', |
| | | name: '组织设计', |
| | | icon: 'crown', |
| | | routes: [ |
| | | { path: '/organizationDesign', redirect: '/admin/sub-page' }, |
| | | { path: '/organizationDesign/OrganizationalStructureConfiguration', name: '组织机构配置', component: './organizationDesign/OrganizationalStructureConfiguration' }, |
| | | { path: '/organizationDesign/DepartmentalInformationConfiguration', name: '部门信息配置', component: './organizationDesign/DepartmentalInformationConfiguration' }, |
| | | { path: '/organizationDesign/JobInformationConfiguration', name: '职位信息配置', component: './organizationDesign/JobInformationConfiguration' }, |
| | | { path: '/organizationDesign/jobLevelInformationConfiguration', name: '职级信息配置', component: './organizationDesign/jobLevelInformationConfiguration' }, |
| | | { path: '/organizationDesign/postInformationConfiguration', name: '岗位信息配置', component: './organizationDesign/postInformationConfiguration' }, |
| | | { path: '/organizationDesign/departmentalEmployeeInformation', name: '部门员工信息', component: './Admin' }, |
| | | { path: '/organizationDesign/organizationChart', name: '组织结构图', component: './Admin' }, |
| | | { path: '/organizationDesign/organizationalStructureChanges', name: '组织结构变迁', component: './Admin' }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/humanResourcePlanning', |
| | | name: '人力资源规划', |
| | | icon: 'crown', |
| | | routes: [ |
| | | { path: '/humanResourcePlanning', redirect: '/admin/sub-page' }, |
| | | { path: '/humanResourcePlanning/organizationalStrategyFormulation', name: '组织战略制定', component: './humanResourcePlanning/organizationalStrategyFormulation' }, |
| | | { path: '/humanResourcePlanning/personnelRequirementAnalysis', name: '人员需求分析', component: './Admin' }, |
| | | { path: '/humanResourcePlanning/analysisOfHumanResourceSupply', name: '人力资源供给分析', component: './Admin' }, |
| | | { path: '/humanResourcePlanning/humanResourcesBudget', name: '人力资源预算', component: './Admin' }, |
| | | { path: '/humanResourcePlanning/jobAnalysis', name: '工作分析', component: './Admin' }, |
| | | { path: '/humanResourcePlanning/jobEvaluation', name: '工作评价', component: './Admin' }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/Recruiting', |
| | | name: '招聘管理', |
| | | icon: 'crown', |
| | | routes: [ |
| | | { path: '/Recruiting', redirect: '/admin/sub-page' }, |
| | | { path: '/Recruiting/recruitmentNeeds', name: '招聘需求', component: './Admin' }, |
| | | { path: '/Recruiting/recruitingPlan', name: '招聘计划', component: './Admin' }, |
| | | { path: '/Recruiting/jobPosting', name: '岗位发布', component: './Admin' }, |
| | | { path: '/Recruiting/workApplicationApproval', name: '工作申请审批', component: './Admin' }, |
| | | { path: '/Recruiting/select', name: '甄选', component: './Admin' }, |
| | | { path: '/Recruiting/physicalExamination', name: '体检', component: './Admin' }, |
| | | { path: "/myWork", redirect: "/admin/sub-page" }, |
| | | { |
| | | path: '/Recruiting/employmentInformationRelease', |
| | | name: '录用信息发布', |
| | | component: './Admin', |
| | | path: "/myWork/taskManagement", |
| | | name: "任务管理", |
| | | component: "./myWork/taskManagement", |
| | | }, |
| | | { path: '/Recruiting/newEmployeeRegistration', name: '新员工报到', component: './Admin' }, |
| | | { path: '/Recruiting/recruitmentEvaluation', name: '录用评估', component: './Admin' }, |
| | | { path: '/Recruiting/costManagement', name: '费用管理', component: './Admin' }, |
| | | { path: '/Recruiting/talentPoolMaintenance', name: '人才库维护', component: './Admin' }, |
| | | { |
| | | path: "/myWork/AnnouncementManagement", |
| | | name: "公告管理", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/myWork/messageManagement", |
| | | name: "消息管理", |
| | | component: "./Admin", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/humanResourceManagement', |
| | | name: '人事管理', |
| | | icon: 'crown', |
| | | path: "/organizationDesign", |
| | | name: "组织设计", |
| | | icon: "crown", |
| | | routes: [ |
| | | { path: '/humanResourceManagement', redirect: '/admin/sub-page' }, |
| | | { path: '/humanResourceManagement/employeeInformation', name: '员工信息', component: './Admin' }, |
| | | { path: '/humanResourceManagement/contractManagement', name: '合同管理', component: './HumanResourceManagement/contractManagement' }, |
| | | { path: '/humanResourceManagement/nominationForAppointment', name: '任职提名', component: './HumanResourceManagement/nominationForAppointment' }, |
| | | { path: '/humanResourceManagement/dismissalApplication', name: '免职申请', component: './HumanResourceManagement/dismissalApplication' }, |
| | | |
| | | { path: '/humanResourceManagement/transferApplication', name: '调入申请', component: './Admin' }, |
| | | { path: '/humanResourceManagement/transferOutApplication', name: '调出申请', component: './Admin' }, |
| | | { path: '/humanResourceManagement/changeRequest', name: '变动申请', component: './HumanResourceManagement/changeRequest' }, |
| | | // { path: '/humanResourceManagement/transferApplication', name: '转任申请', component: './Admin' }, |
| | | { path: '/humanResourceManagement/applicationForSecondment', name: '挂职申请', component: './HumanResourceManagement/applicationForSecondment' }, |
| | | { path: '/humanResourceManagement/challengeForCause', name: '回避申请', component: './HumanResourceManagement/challengeForCause' }, |
| | | { path: '/humanResourceManagement/resignationApplication', name: '离职申请', component: './HumanResourceManagement/resignationApplication' }, |
| | | // { path: '/humanResourceManagement/dismissalApplication', name: '辞退申请', component: './Admin' }, |
| | | // { path: '/humanResourceManagement/retirementManagement', name: '离休管理', component: './Admin' }, |
| | | { path: '/humanResourceManagement/retirementManagement', name: '退休管理', component: './HumanResourceManagement/retirementManagement' }, |
| | | { path: '/humanResourceManagement/compulsoryRetirementApplication', name: '强制退休申请', component: './Admin' }, |
| | | { |
| | | path: "/organizationDesign", |
| | | redirect: "/organizationDesign/OrganizationalStructureConfiguration", |
| | | }, |
| | | { |
| | | path: "/organizationDesign/OrganizationalStructureConfiguration", |
| | | name: "组织机构配置", |
| | | component: "./organizationDesign/OrganizationalStructureConfiguration", |
| | | }, |
| | | { |
| | | path: "/organizationDesign/DepartmentalInformationConfiguration", |
| | | name: "部门信息配置", |
| | | component: "./organizationDesign/DepartmentalInformationConfiguration", |
| | | }, |
| | | { |
| | | path: "/organizationDesign/JobInformationConfiguration", |
| | | name: "职位信息配置", |
| | | component: "./organizationDesign/JobInformationConfiguration", |
| | | }, |
| | | { |
| | | path: "/organizationDesign/jobLevelInformationConfiguration", |
| | | name: "职级信息配置", |
| | | component: "./organizationDesign/jobLevelInformationConfiguration", |
| | | }, |
| | | { |
| | | path: "/organizationDesign/postInformationConfiguration", |
| | | name: "岗位信息配置", |
| | | component: "./organizationDesign/postInformationConfiguration", |
| | | }, |
| | | { |
| | | path: "/organizationDesign/departmentalEmployeeInformation", |
| | | name: "部门员工信息", |
| | | component: "./organizationDesign/departmentalEmployeeInformation", |
| | | }, |
| | | { |
| | | path: "/organizationDesign/organizationChart", |
| | | name: "组织结构图", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/organizationDesign/organizationalStructureChanges", |
| | | name: "组织结构变迁", |
| | | component: "./Admin", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/trainingManagement', |
| | | name: '培训管理', |
| | | icon: 'crown', |
| | | path: "/humanResourcePlanning", |
| | | name: "人力资源规划", |
| | | icon: "crown", |
| | | routes: [ |
| | | { path: '/trainingManagement', redirect: '/admin/sub-page' }, |
| | | { path: '/trainingManagement/培训机构管理', name: '培训机构管理', component: './Admin' }, |
| | | { path: '/trainingManagement/contractManagement', name: '基础资料管理', component: './Admin' }, |
| | | { path: '/trainingManagement/nominationForAppointment', name: '培训需求管理', component: './Admin' }, |
| | | // { path: '/trainingManagement/dismissalApplication', name: '培训计划管理', component: './Admin' }, |
| | | { path: '/trainingManagement/transferApplication', name: '培训计划管理', component: './Admin' }, |
| | | { path: '/trainingManagement/transferOutApplication', name: '培训日程管理', component: './Admin' }, |
| | | { path: '/trainingManagement/changeRequest', name: '培训效果管理', component: './Admin' }, |
| | | // { path: '/trainingManagement/transferApplication', name: '培训费用管理', component: './Admin' }, |
| | | { path: "/humanResourcePlanning", redirect: "/admin/sub-page" }, |
| | | { |
| | | path: "/humanResourcePlanning/organizationalStrategyFormulation", |
| | | name: "组织战略制定", |
| | | component: "./humanResourcePlanning/organizationalStrategyFormulation", |
| | | }, |
| | | { |
| | | path: "/humanResourcePlanning/personnelRequirementAnalysis", |
| | | name: "人员需求分析", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/humanResourcePlanning/analysisOfHumanResourceSupply", |
| | | name: "人力资源供给分析", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/humanResourcePlanning/humanResourcesBudget", |
| | | name: "人力资源预算", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/humanResourcePlanning/jobAnalysis", |
| | | name: "工作分析", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/humanResourcePlanning/jobEvaluation", |
| | | name: "工作评价", |
| | | component: "./Admin", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: "/Recruiting", |
| | | name: "招聘管理", |
| | | icon: "crown", |
| | | routes: [ |
| | | { path: "/Recruiting", redirect: "/admin/sub-page" }, |
| | | { |
| | | path: "/Recruiting/recruitmentNeeds", |
| | | name: "招聘需求", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/Recruiting/recruitingPlan", |
| | | name: "招聘计划", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/Recruiting/jobPosting", |
| | | name: "岗位发布", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/Recruiting/workApplicationApproval", |
| | | name: "工作申请审批", |
| | | component: "./Admin", |
| | | }, |
| | | { path: "/Recruiting/select", name: "甄选", component: "./Admin" }, |
| | | { |
| | | path: "/Recruiting/physicalExamination", |
| | | name: "体检", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/Recruiting/employmentInformationRelease", |
| | | name: "录用信息发布", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/Recruiting/newEmployeeRegistration", |
| | | name: "新员工报到", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/Recruiting/recruitmentEvaluation", |
| | | name: "录用评估", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/Recruiting/costManagement", |
| | | name: "费用管理", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/Recruiting/talentPoolMaintenance", |
| | | name: "人才库维护", |
| | | component: "./Admin", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: "/humanResourceManagement", |
| | | name: "人事管理", |
| | | icon: "crown", |
| | | routes: [ |
| | | { path: "/humanResourceManagement", redirect: "/admin/sub-page" }, |
| | | { |
| | | path: "/humanResourceManagement/employeeInformation", |
| | | name: "员工信息", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/humanResourceManagement/contractManagement", |
| | | name: "合同管理", |
| | | component: "./HumanResourceManagement/contractManagement", |
| | | }, |
| | | { |
| | | path: "/humanResourceManagement/nominationForAppointment", |
| | | name: "任职提名", |
| | | component: "./HumanResourceManagement/nominationForAppointment", |
| | | }, |
| | | { |
| | | path: "/humanResourceManagement/dismissalApplication", |
| | | name: "免职申请", |
| | | component: "./HumanResourceManagement/dismissalApplication", |
| | | }, |
| | | |
| | | { |
| | | path: "/humanResourceManagement/transferApplication", |
| | | name: "调入申请", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/humanResourceManagement/transferOutApplication", |
| | | name: "调出申请", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/humanResourceManagement/changeRequest", |
| | | name: "变动申请", |
| | | component: "./HumanResourceManagement/changeRequest", |
| | | }, |
| | | // { path: '/humanResourceManagement/transferApplication', name: '转任申请', component: './Admin' }, |
| | | { |
| | | path: "/humanResourceManagement/applicationForSecondment", |
| | | name: "挂职申请", |
| | | component: "./HumanResourceManagement/applicationForSecondment", |
| | | }, |
| | | { |
| | | path: "/humanResourceManagement/challengeForCause", |
| | | name: "回避申请", |
| | | component: "./HumanResourceManagement/challengeForCause", |
| | | }, |
| | | { |
| | | path: "/humanResourceManagement/resignationApplication", |
| | | name: "离职申请", |
| | | component: "./HumanResourceManagement/resignationApplication", |
| | | }, |
| | | // { path: '/humanResourceManagement/dismissalApplication', name: '辞退申请', component: './Admin' }, |
| | | // { path: '/humanResourceManagement/retirementManagement', name: '离休管理', component: './Admin' }, |
| | | { |
| | | path: "/humanResourceManagement/retirementManagement", |
| | | name: "退休管理", |
| | | component: "./HumanResourceManagement/retirementManagement", |
| | | }, |
| | | { |
| | | path: "/humanResourceManagement/compulsoryRetirementApplication", |
| | | name: "强制退休申请", |
| | | component: "./HumanResourceManagement/compulsoryRetirementApplication", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: "/trainingManagement", |
| | | name: "培训管理", |
| | | icon: "crown", |
| | | routes: [ |
| | | { path: "/trainingManagement", redirect: "/admin/sub-page" }, |
| | | { |
| | | path: "/trainingManagement/培训机构管理", |
| | | name: "培训机构管理", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/trainingManagement/contractManagement", |
| | | name: "基础资料管理", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/trainingManagement/nominationForAppointment", |
| | | name: "培训需求管理", |
| | | component: "./Admin", |
| | | }, |
| | | // { path: '/trainingManagement/dismissalApplication', name: '培训计划管理', component: './Admin' }, |
| | | { |
| | | path: "/trainingManagement/transferApplication", |
| | | name: "培训计划管理", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/trainingManagement/transferOutApplication", |
| | | name: "培训日程管理", |
| | | component: "./Admin", |
| | | }, |
| | | { |
| | | path: "/trainingManagement/changeRequest", |
| | | name: "培训效果管理", |
| | | component: "./Admin", |
| | | }, |
| | | // { path: '/trainingManagement/transferApplication', name: '培训费用管理', component: './Admin' }, |
| | | ], |
| | | }, |
| | | // { name: '查询表格', icon: 'table', path: '/list', component: './TableList' }, |
| | |
| | | // component: './orgManage', |
| | | // }, |
| | | { |
| | | name: '部门管理', |
| | | icon: 'crown', |
| | | name: "部门管理", |
| | | icon: "crown", |
| | | headerRender: true, |
| | | access: 'canAdmin', |
| | | path: '/department', |
| | | component: './DepartmentManage', |
| | | access: "canAdmin", |
| | | path: "/department", |
| | | component: "./DepartmentManage", |
| | | }, |
| | | { path: '*', layout: false, component: './404' }, |
| | | { path: "*", layout: false, component: "./404" }, |
| | | ]; |
| | |
| | | export default function access( |
| | | initialState: { currentUser?: API.CurrentUser } | undefined |
| | | ) { |
| | | const { currentUser } = initialState ?? {}; |
| | | console.log(currentUser, "currentUser"); |
| | | const { currentUser, selectRole } = initialState ?? {}; |
| | | console.log(selectRole, "selectRole"); |
| | | return { |
| | | canAdmin: currentUser && currentUser.id === 1, |
| | | canAdmin: currentUser && currentUser.id === 0, |
| | | }; |
| | | } |
| | |
| | | * */ |
| | | export async function getInitialState(): Promise<{ |
| | | settings?: Partial<LayoutSettings>; |
| | | currentUser?: API.CurrentUser; |
| | | currentUser?: any; |
| | | appInfo?: any; |
| | | roleList?: any; |
| | | selectRole?: any; |
| | | loading?: boolean; |
| | | fetchUserInfo?: () => Promise<API.CurrentUser | undefined>; |
| | | fetchAppInfo?: () => Promise<API.CurrentUser | undefined>; |
| | | fetchRoleList?: () => Promise<API.CurrentUser | undefined>; |
| | | fetchUserInfo?: () => Promise<any>; |
| | | fetchAppInfo?: () => Promise<any>; |
| | | fetchRoleList?: () => Promise<any>; |
| | | }> { |
| | | const fetchAppInfo = async () => { |
| | | try { |
| | |
| | | } |
| | | return undefined; |
| | | }; |
| | | |
| | | |
| | | // 如果不是登录页面,执行 |
| | | const { location } = history; |
| | | if (![loginPath, '/user/register', '/user/register-result'].includes(location.pathname)) { |
| | | const currentUser = await fetchUserInfo(); |
| | | const appInfo = await fetchAppInfo(); |
| | | const roleList = await fetchRoleList(); |
| | | return { |
| | | currentUser, |
| | | appInfo, |
| | | roleList, |
| | | selectRole: {}, |
| | | fetchUserInfo, |
| | | settings: defaultSettings as Partial<LayoutSettings>, |
| | | }; |
| | | } |
| | | const currentUser = await fetchUserInfo(); |
| | | const appInfo = await fetchAppInfo(); |
| | | const roleList = await fetchRoleList(); |
| | | return { |
| | | currentUser, |
| | | appInfo, |
| | | roleList, |
| | | selectRole: {}, |
| | | fetchUserInfo, |
| | | settings: defaultSettings as Partial<LayoutSettings>, |
| | | }; |
| | | // return { |
| | | // fetchUserInfo, |
| | | // settings: defaultSettings as Partial<LayoutSettings>, |
| | | // }; |
| | | } |
| | | |
| | | |
| | |
| | | Select, |
| | | } from "antd"; |
| | | import React, { useEffect, useState } from "react"; |
| | | import Staff from "./staff"; |
| | | |
| | | interface ApplyProps { |
| | | visible: boolean; |
| | |
| | | const { visible, setFormDat, onCancel, applyType, title, formItems } = props; |
| | | |
| | | const [staffVisible, setStaffVisible] = useState(false); |
| | | const [form] = Form.useForm(); |
| | | |
| | | const onFinish = (values: any) => { |
| | | console.log(values); |
| | |
| | | |
| | | // 设置选中员工 |
| | | const onSetStaff = (val: any) => { |
| | | if (val) { |
| | | form.setFieldsValue(val); |
| | | } |
| | | console.log(val); |
| | | }; |
| | | |
| | |
| | | } |
| | | }, [visible]); |
| | | |
| | | // 关闭且重置表单 |
| | | const closeForm = () => { |
| | | if (onCancel) { |
| | | onCancel(); |
| | | } |
| | | form.resetFields(); |
| | | }; |
| | | |
| | | return ( |
| | | <Modal |
| | | width={910} |
| | | title={title + "申请"} |
| | | open={visible} |
| | | onCancel={onCancel} |
| | | onCancel={closeForm} |
| | | footer={null} |
| | | className="ModelForm" |
| | | > |
| | |
| | | style={{ paddingTop: 20 }} |
| | | onFinish={onFinish} |
| | | autoComplete="off" |
| | | form={form} |
| | | > |
| | | <Row> |
| | | {formItems?.length && |
| | |
| | | name={item.name} |
| | | rules={item.rules} |
| | | > |
| | | <Input style={{ width: item.width }} /> |
| | | {item.name !== "name" && ( |
| | | <Input |
| | | readOnly={item.readOnly} |
| | | style={{ width: item.width }} |
| | | /> |
| | | )} |
| | | {item.name === "name" && ( |
| | | <Input |
| | | readOnly={item.readOnly} |
| | | style={{ width: item.width }} |
| | | onClick={onStaffVisible} |
| | | /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | ); |
| | |
| | | <Button type="primary" htmlType="submit"> |
| | | 提交 |
| | | </Button> |
| | | <Button onClick={onCancel}>关闭</Button> |
| | | <Button onClick={closeForm}>关闭</Button> |
| | | <Staff |
| | | open={staffVisible} |
| | | onCancel={() => setStaffVisible(false)} |
| | | setData={onSetStaff} |
| | | /> |
| | | </div> |
| | | </Form.Item> |
| | | </Form> |
| | |
| | | import { postOaStaffGetStaffList } from '@/services/WebApi/oaStaff'; |
| | | import { Modal, Table } from 'antd'; |
| | | import React, { useEffect, useState } from 'react'; |
| | | import { postOaStaffGetStaffList } from "@/services/WebApi/oaStaff"; |
| | | import type { TableProps } from "antd"; |
| | | import { Modal, Table } from "antd"; |
| | | import React, { useEffect, useState } from "react"; |
| | | |
| | | interface StaffProps { |
| | | open: boolean; |
| | |
| | | onCancel: () => void; |
| | | } |
| | | |
| | | interface DataType { |
| | | id: number | string; |
| | | label: string; |
| | | value: number | string; |
| | | department?: string; |
| | | post?: string; |
| | | } |
| | | |
| | | const Staff: React.FC<StaffProps> = (props) => { |
| | | const { open, setData, onCancel } = props; |
| | | |
| | | const [staffOptions, setStaffOptions] = useState([]); |
| | | const [staffOptions, setStaffOptions] = useState([]); // 员工数据 |
| | | const [currentRow, setRow] = useState<DataType>(); // 选中行 |
| | | const [loading, setLoading] = useState(false); |
| | | |
| | | const staffColums: any[] = [ |
| | | { |
| | | title: '员工姓名', |
| | | dataIndex: 'label', |
| | | title: "员工姓名", |
| | | dataIndex: "label", |
| | | }, |
| | | { |
| | | title: '部门', |
| | | dataIndex: 'tsetwe', |
| | | title: "部门", |
| | | dataIndex: "department", |
| | | }, |
| | | { |
| | | title: '职位', |
| | | dataIndex: 'post', |
| | | title: "职位", |
| | | dataIndex: "post", |
| | | }, |
| | | ]; |
| | | |
| | | // 获取员工列表 |
| | | const getStaffList = async () => { |
| | | const res = await postOaStaffGetStaffList({ start: 0, size: 10, orgId: 4 }); |
| | | if (res && res.datas.length > 0) { |
| | | const data = res.datas.map((item: any) => ({ |
| | | label: item.name, |
| | | value: item.id, |
| | | })); |
| | | setStaffOptions(data); |
| | | // 关闭员工弹框 |
| | | const onCloseStaff = () => { |
| | | if (onCancel) { |
| | | onCancel(); |
| | | } |
| | | return []; |
| | | setData(null); |
| | | }; |
| | | |
| | | // 设置选中行 |
| | | const onSelectRow = () => { |
| | | setData(currentRow); |
| | | onCloseStaff(); |
| | | }; |
| | | |
| | | // 获取员工列表 |
| | | const getStaffList = () => { |
| | | setLoading(true); |
| | | postOaStaffGetStaffList({ start: 0, size: 10, orgId: 4 }) |
| | | .then((res) => { |
| | | if (res && res.datas.length > 0) { |
| | | const data = res.datas.map((item: any) => ({ |
| | | label: item.name, |
| | | value: item.id, |
| | | ...item, |
| | | })); |
| | | setStaffOptions(data); |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | setLoading(false); |
| | | setStaffOptions([]); |
| | | }) |
| | | .finally(() => { |
| | | setLoading(false); |
| | | }); |
| | | }; |
| | | |
| | | useEffect(() => { |
| | |
| | | } |
| | | }, [open]); |
| | | |
| | | const rowSelection: TableProps<DataType>["rowSelection"] = { |
| | | onChange: (selectedRowKeys: React.Key[], selectedRows: DataType[]) => { |
| | | setRow(selectedRows[0]); |
| | | }, |
| | | }; |
| | | |
| | | return ( |
| | | <Modal title={'员工列表'} width={600} open={open} onCancel={onCancel}> |
| | | <Table dataSource={staffOptions} columns={staffColums} pagination={false} /> |
| | | <Modal |
| | | title={"员工列表"} |
| | | width={600} |
| | | open={open} |
| | | onCancel={onCloseStaff} |
| | | onOk={onSelectRow} |
| | | > |
| | | <Table |
| | | dataSource={staffOptions} |
| | | columns={staffColums} |
| | | pagination={false} |
| | | loading={loading} |
| | | rowKey={(record) => record?.id} |
| | | rowSelection={{ type: "radio", ...rowSelection }} |
| | | scroll={{ y: 400 }} |
| | | /> |
| | | </Modal> |
| | | ); |
| | | }; |
New file |
| | |
| | | .dialogContent{ |
| | | padding: 24px; |
| | | overflow: auto; |
| | | } |
New file |
| | |
| | | import { postOaStaffGetStaffList } from "@/services/WebApi/oaStaff"; |
| | | import { ProTable } from "@ant-design/pro-components"; |
| | | import { useModel } from "@umijs/max"; |
| | | import { Modal } from "antd"; |
| | | import React, { useRef, useState } from "react"; |
| | | import styles from "./index.less"; |
| | | |
| | | type SelectUserProps = { |
| | | title?: string; |
| | | mask?: boolean; |
| | | width?: string | number; |
| | | height?: string | number; |
| | | open?: boolean; |
| | | destroyOnClose?: boolean; |
| | | footerBtn?: FooterBtn; |
| | | onCancel?: () => void; |
| | | onConfirm?: (user: any) => void; |
| | | }; |
| | | |
| | | interface FooterBtn { |
| | | okBtn?: { |
| | | text?: string; |
| | | loading?: boolean; |
| | | disabled?: boolean; |
| | | click?: () => void; |
| | | }; |
| | | cancelBtn?: { |
| | | text?: string; |
| | | disabled?: boolean; |
| | | }; |
| | | } |
| | | |
| | | const SelectUser: React.FC<SelectUserProps> = (props) => { |
| | | const { |
| | | title, |
| | | mask, |
| | | width, |
| | | height, |
| | | open, |
| | | footerBtn, |
| | | destroyOnClose = false, |
| | | onConfirm, |
| | | onCancel, |
| | | } = props; |
| | | const [disabled, setDisabled] = useState(true); |
| | | const actionRef = useRef(null); |
| | | const { initialState, setInitialState } = useModel("@@initialState"); |
| | | const [selecRow, setSelecRow] = useState<any>([]) |
| | | const [selecRowKey, setSelecRowKey] = useState<any>([]) |
| | | |
| | | const columns = [ |
| | | { |
| | | title: "员工姓名", |
| | | key: "name", |
| | | dataIndex: "name", |
| | | align: "center", |
| | | search: false, |
| | | |
| | | }, |
| | | { |
| | | title: "部门", |
| | | key: "department", |
| | | dataIndex: "department", |
| | | align: "center", |
| | | search: false, |
| | | render: (text, record) => { |
| | | return <span>{record.department.name}</span>; |
| | | }, |
| | | }, |
| | | { |
| | | title: "职位", |
| | | key: "role", |
| | | dataIndex: "role", |
| | | align: "center", |
| | | search: false, |
| | | render: (text, record) => { |
| | | |
| | | return <span>{record?.role?.name || "-"}</span>; |
| | | }, |
| | | }, |
| | | { |
| | | title: "城市", |
| | | key: "city", |
| | | dataIndex: "city", |
| | | align: "center", |
| | | search: false, |
| | | render: (text, record) => { |
| | | console.log(record.city, "record"); |
| | | |
| | | return <span>{record?.city?.name || "-"}</span>; |
| | | }, |
| | | }, |
| | | ]; |
| | | |
| | | const handleOk = () => { |
| | | console.log(selecRow, "selecRow"); |
| | | onConfirm && onConfirm(selecRow[0]) |
| | | }; |
| | | const handleCancel = () => { }; |
| | | |
| | | const getTableData = (params: { current: number; pageSize: number }) => { |
| | | console.log(params, "params"); |
| | | const body = { |
| | | start: (params.current - 1) * params.pageSize, |
| | | size: params.pageSize, |
| | | filterList: [], |
| | | searchList: [], |
| | | orgId: 5, |
| | | // orgId: initialState?.appInfo?.org?.id, |
| | | }; |
| | | return postOaStaffGetStaffList(body).then((res) => { |
| | | console.log(res, "res"); |
| | | return { |
| | | data: res.datas, |
| | | total: res.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | | |
| | | return ( |
| | | <Modal |
| | | title={ |
| | | <div |
| | | onMouseOver={() => { |
| | | setDisabled(false); |
| | | }} |
| | | onMouseOut={() => { |
| | | setDisabled(true); |
| | | }} |
| | | > |
| | | {title} |
| | | </div> |
| | | } |
| | | open={true} |
| | | width={width || "50%"} |
| | | onOk={handleOk} |
| | | onCancel={onCancel} |
| | | centered={true} |
| | | > |
| | | <div style={{ height: height || "80vh" }} className={styles.dialogContent}> |
| | | <ProTable |
| | | actionRef={actionRef} |
| | | rowSelection={{ |
| | | type: 'radio', |
| | | fixed: 'left', |
| | | selectedRowKeys: selecRowKey, |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | console.log(selectedRowKeys, selectedRows, 'selectedRows'); |
| | | setSelecRowKey(selectedRowKeys) |
| | | setSelecRow(selectedRows) |
| | | } |
| | | }} |
| | | rowKey="id" |
| | | columns={columns} |
| | | search={false} |
| | | request={getTableData} |
| | | /> |
| | | </div> |
| | | </Modal> |
| | | ); |
| | | }; |
| | | |
| | | export default SelectUser; |
| | |
| | | { |
| | | label: "名称", |
| | | name: "applyName", |
| | | rules: [{ required: true, message: "请输入名称!" }], |
| | | rules: [{ required: true, message: "请填写名称!" }], |
| | | type: "input", |
| | | pageType: "applicationForSecondment", |
| | | labelCol: 6, |
| | |
| | | }, |
| | | { |
| | | label: "员工姓名", |
| | | name: "employeeName", |
| | | rules: [{ required: true, message: "请输入员工姓名!" }], |
| | | name: "name", |
| | | rules: [{ required: true, message: "请填写员工姓名!" }], |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "applicationForSecondment", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | { |
| | | label: "挂职部门", |
| | | name: "secondmentDepartment", |
| | | rules: [{ required: true, message: "请输入挂职部门!" }], |
| | | rules: [{ required: true, message: "请填写挂职部门!" }], |
| | | type: "input", |
| | | pageType: "applicationForSecondment", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "名称", |
| | | name: "applyName", |
| | | rules: [{ required: true, message: "请输入名称!" }], |
| | | rules: [{ required: true, message: "请填写名称!" }], |
| | | type: "input", |
| | | pageType: "challengeForCause", |
| | | labelCol: 6, |
| | |
| | | }, |
| | | { |
| | | label: "员工姓名", |
| | | name: "employeeName", |
| | | rules: [{ required: true, message: "请输入员工姓名!" }], |
| | | name: "name", |
| | | rules: [{ required: true, message: "请填写员工姓名!" }], |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "challengeForCause", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | { |
| | | label: "开始时间", |
| | | name: "startTime", |
| | | rules: [{ required: true, message: "请输入开始时间!" }], |
| | | rules: [{ required: true, message: "请填写开始时间!" }], |
| | | type: "date", |
| | | pageType: "challengeForCause", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "结束时间", |
| | | name: "endTime", |
| | | rules: [{ required: true, message: "请输入结束时间!" }], |
| | | rules: [{ required: true, message: "请填写结束时间!" }], |
| | | type: "date", |
| | | pageType: "challengeForCause", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "替代人员", |
| | | name: "substitute", |
| | | rules: [{ required: true, message: "请输入替代人员!" }], |
| | | rules: [{ required: true, message: "请填写替代人员!" }], |
| | | type: "input", |
| | | pageType: "challengeForCause", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "回避原由", |
| | | name: "reason", |
| | | rules: [{ required: true, message: "请输入回避原由!" }], |
| | | type: "textArea", |
| | | pageType: "challengeForCause", |
| | | labelCol: 3, |
| | |
| | | { |
| | | label: "回避内容", |
| | | name: "avoidContent", |
| | | rules: [{ required: true, message: "请输入回避内容!" }], |
| | | type: "textArea", |
| | | pageType: "challengeForCause", |
| | | labelCol: 3, |
| | |
| | | { |
| | | label: "名称", |
| | | name: "applyName", |
| | | rules: [{ required: true, message: "请输入名称!" }], |
| | | rules: [{ required: true, message: "请填写名称!" }], |
| | | type: "input", |
| | | pageType: "changeRequest", |
| | | labelCol: 6, |
| | |
| | | }, |
| | | { |
| | | label: "员工姓名", |
| | | name: "employeeName", |
| | | rules: [{ required: true, message: "请输入员工姓名!" }], |
| | | name: "name", |
| | | rules: [{ required: true, message: "请填写员工姓名!" }], |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "dismissalApplication", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | { |
| | | label: "调前部门", |
| | | name: "changeBeforeDepartment", |
| | | rules: [{ required: true, message: "请选择调前部门!" }], |
| | | type: "select", |
| | | pageType: "changeRequest", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "调前职位", |
| | | name: "changeBeforePosition", |
| | | rules: [{ required: true, message: "请选择调前职位!" }], |
| | | type: "select", |
| | | pageType: "changeRequest", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "调前职级", |
| | | name: "changeBeforeRank", |
| | | rules: [{ required: true, message: "请选择调前职级!" }], |
| | | type: "select", |
| | | pageType: "changeRequest", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "调前基本工资", |
| | | name: "changeBeforeMoney", |
| | | rules: [{ required: true, message: "请输入调前基本工资!" }], |
| | | type: "input", |
| | | pageType: "changeRequest", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "调后基本工资", |
| | | name: "changeAfterMoney", |
| | | rules: [{ required: true, message: "请输入调后基本工资!" }], |
| | | rules: [{ required: true, message: "请填写调后基本工资!" }], |
| | | type: "input", |
| | | pageType: "changeRequest", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "调前工种", |
| | | name: "changeBeforeJob", |
| | | rules: [{ required: true, message: "请选择调前工种!" }], |
| | | type: "select", |
| | | pageType: "changeRequest", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "调前状态", |
| | | name: "changeBeforeStatus", |
| | | rules: [{ required: true, message: "请选择调前状态!" }], |
| | | type: "select", |
| | | pageType: "changeRequest", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "调动原因", |
| | | name: "reason", |
| | | rules: [{ required: true, message: "请输入调动原因!" }], |
| | | type: "textArea", |
| | | pageType: "changeRequest", |
| | | labelCol: 3, |
New file |
| | |
| | | import Apply from "@/components/ApplyIndex"; |
| | | import React from "react"; |
| | | |
| | | const NominationForAppointment: React.FC = () => { |
| | | const params = { |
| | | title: "强制退休", |
| | | applyType: "retirementManagement", |
| | | formItems: [ |
| | | { |
| | | label: "选择员工", |
| | | name: "selectStaff", |
| | | type: "select", |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "基础信息", |
| | | type: "divider", |
| | | pageType: "retirementManagement", |
| | | }, |
| | | { |
| | | label: "员工姓名", |
| | | name: "name", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "部门名称", |
| | | name: "departmentName", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | name: "idNum", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "性别", |
| | | name: "sex", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "籍贯", |
| | | name: "nativePlace", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "雇佣类型", |
| | | name: "employmentType", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "出生年月", |
| | | name: "birthday", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "民族", |
| | | name: "race", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "婚姻状况", |
| | | name: "marriageStatus", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "政治面貌", |
| | | name: "politicalStatus", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "毕业院校", |
| | | name: "graduateSchool", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "专业", |
| | | name: "major", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "文化程度", |
| | | name: "educationLevel", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "工种", |
| | | name: "jobType", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "职称", |
| | | name: "workTitle", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "手机", |
| | | name: "mobilePhone", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "联系地址", |
| | | name: "contactAddress", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "电子邮件", |
| | | name: "eMail", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "家庭住址", |
| | | name: "homeAddress", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | name: "phone", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "备注", |
| | | name: "remarks", |
| | | type: "textArea", |
| | | pageType: "retirementManagement", |
| | | labelCol: 3, |
| | | width: 730, |
| | | }, |
| | | { |
| | | label: "强制退休待遇", |
| | | type: "divider", |
| | | pageType: "retirementManagement", |
| | | }, |
| | | { |
| | | label: "申请名称", |
| | | name: "applyName", |
| | | rules: [{ required: true, message: "请填写申请名称!" }], |
| | | type: "input", |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "津贴", |
| | | name: "allowance", |
| | | rules: [{ required: true, message: "请填写津贴!" }], |
| | | type: "input", |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "每月工资", |
| | | name: "monthlySalary", |
| | | rules: [{ required: true, message: "请填写每月工资!" }], |
| | | type: "input", |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "福利", |
| | | name: "welfare", |
| | | rules: [{ required: true, message: "请填写福利!" }], |
| | | type: "input", |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "强制退休原因", |
| | | name: "retirementReason", |
| | | type: "textArea", |
| | | pageType: "retirementManagement", |
| | | labelCol: 3, |
| | | width: 730, |
| | | }, |
| | | { |
| | | label: "备注", |
| | | name: "retirementRemarks", |
| | | type: "textArea", |
| | | pageType: "retirementManagement", |
| | | labelCol: 3, |
| | | width: 730, |
| | | }, |
| | | ], |
| | | }; |
| | | |
| | | return <Apply {...params} />; |
| | | }; |
| | | |
| | | export default NominationForAppointment; |
| | |
| | | <Form.Item |
| | | label="员工姓名" |
| | | name="name" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | rules={[{ required: true, message: '请填写机构名称' }]} |
| | | > |
| | | <Input suffix={<UserOutlined className="site-form-item-icon" />} /> |
| | | </Form.Item> |
| | |
| | | <Form.Item |
| | | label="所属部门" |
| | | name="name" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | rules={[{ required: true, message: '请填写机构名称' }]} |
| | | > |
| | | <Input /> |
| | | </Form.Item> |
| | |
| | | <Form.Item |
| | | label="合同类型" |
| | | name="name" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | rules={[{ required: true, message: '请填写机构名称' }]} |
| | | > |
| | | <Select |
| | | defaultValue="lucy" |
| | |
| | | { |
| | | label: "名称", |
| | | name: "applyName", |
| | | rules: [{ required: true, message: "请输入名称!" }], |
| | | rules: [{ required: true, message: "请填写名称!" }], |
| | | type: "input", |
| | | pageType: "dismissalApplication", |
| | | labelCol: 3, |
| | |
| | | }, |
| | | { |
| | | label: "员工姓名", |
| | | name: "employeeName", |
| | | rules: [{ required: true, message: "请输入员工姓名!" }], |
| | | name: "name", |
| | | rules: [{ required: true, message: "请填写员工姓名!" }], |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "dismissalApplication", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | { |
| | | label: "免职原由", |
| | | name: "reason", |
| | | rules: [{ required: true, message: "请输入免职原由!" }], |
| | | type: "textArea", |
| | | pageType: "dismissalApplication", |
| | | labelCol: 3, |
| | |
| | | { |
| | | label: "名称", |
| | | name: "applyName", |
| | | rules: [{ required: true, message: "请输入名称!" }], |
| | | rules: [{ required: true, message: "请填写名称!" }], |
| | | type: "input", |
| | | pageType: "nominationForAppointment", |
| | | labelCol: 3, |
| | |
| | | }, |
| | | { |
| | | label: "员工姓名", |
| | | name: "employeeName", |
| | | rules: [{ required: true, message: "请输入员工姓名!" }], |
| | | name: "name", |
| | | rules: [{ required: true, message: "请填写员工姓名!" }], |
| | | type: "input", |
| | | pageType: "dismissalApplication", |
| | | readOnly: true, |
| | | pageType: "nominationForAppointment", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | |
| | | { |
| | | label: "名称", |
| | | name: "applyName", |
| | | rules: [{ required: true, message: "请输入名称!" }], |
| | | rules: [{ required: true, message: "请填写名称!" }], |
| | | type: "input", |
| | | pageType: "resignationApplication", |
| | | labelCol: 3, |
| | |
| | | }, |
| | | { |
| | | label: "员工姓名", |
| | | name: "employeeName", |
| | | rules: [{ required: true, message: "请输入员工姓名!" }], |
| | | name: "name", |
| | | rules: [{ required: true, message: "请填写员工姓名!" }], |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "resignationApplication", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | { |
| | | label: "所属部门", |
| | | name: "department", |
| | | rules: [{ required: true, message: "请输入所属部门!" }], |
| | | rules: [{ required: true, message: "请填写所属部门!" }], |
| | | type: "input", |
| | | pageType: "resignationApplication", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "所属职位", |
| | | name: "position", |
| | | rules: [{ required: true, message: "请输入所属部门!" }], |
| | | rules: [{ required: true, message: "请填写所属部门!" }], |
| | | type: "input", |
| | | pageType: "resignationApplication", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "所在城市", |
| | | name: "address", |
| | | rules: [{ required: true, message: "请输入所在城市!" }], |
| | | rules: [{ required: true, message: "请填写所在城市!" }], |
| | | type: "input", |
| | | pageType: "resignationApplication", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "申请时间", |
| | | name: "resignationTime", |
| | | rules: [{ required: true, message: "请输入申请时间!" }], |
| | | rules: [{ required: true, message: "请填写申请时间!" }], |
| | | type: "date", |
| | | pageType: "resignationApplication", |
| | | labelCol: 6, |
| | |
| | | { |
| | | label: "离职原因", |
| | | name: "reason", |
| | | rules: [{ required: true, message: "请输入离职原因!" }], |
| | | rules: [{ required: true, message: "请填写离职原因!" }], |
| | | type: "textArea", |
| | | pageType: "resignationApplication", |
| | | labelCol: 3, |
| | |
| | | { |
| | | label: "备注", |
| | | name: "remarks", |
| | | rules: [{ required: true, message: "请输入备注!" }], |
| | | rules: [{ required: true, message: "请填写备注!" }], |
| | | type: "textArea", |
| | | pageType: "resignationApplication", |
| | | labelCol: 3, |
| | |
| | | }, |
| | | { |
| | | label: "员工姓名", |
| | | name: "employeeName", |
| | | name: "name", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | label: "部门名称", |
| | | name: "departmentName", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | name: "idCardNumber", |
| | | name: "idNum", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | label: "性别", |
| | | name: "sex", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "籍贯", |
| | | name: "origin", |
| | | name: "nativePlace", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | label: "雇佣类型", |
| | | name: "employmentType", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "出生年月", |
| | | name: "birthDate", |
| | | name: "birthday", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "民族", |
| | | name: "nationality", |
| | | name: "race", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "婚姻状况", |
| | | name: "maritalStatus", |
| | | name: "marriageStatus", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | label: "政治面貌", |
| | | name: "politicalStatus", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "毕业院校", |
| | | name: "graduationSchool", |
| | | name: "graduateSchool", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | label: "专业", |
| | | name: "major", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "文化程度", |
| | | name: "culturalDegree", |
| | | name: "educationLevel", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "工种", |
| | | name: "workType", |
| | | name: "jobType", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | label: "职称", |
| | | name: "workTitle", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "手机", |
| | | name: "mobile", |
| | | name: "mobilePhone", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | label: "联系地址", |
| | | name: "contactAddress", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "电子邮件", |
| | | name: "email", |
| | | name: "eMail", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | label: "家庭住址", |
| | | name: "homeAddress", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | name: "contactPhone", |
| | | name: "phone", |
| | | type: "input", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 6, |
| | | width: 300, |
| | |
| | | label: "备注", |
| | | name: "remarks", |
| | | type: "textArea", |
| | | readOnly: true, |
| | | pageType: "retirementManagement", |
| | | labelCol: 3, |
| | | width: 730, |
| | |
| | | import { postIdentityLoginLoginOa } from '@/services/WebApi/login'; |
| | | import { postOaRoleGetRoleList } from '@/services/WebApi/oaRole'; |
| | | import { postOaStaffGetStaffList, postOaStaffNewStaff } from '@/services/WebApi/oaStaff'; |
| | | import { DownOutlined } from '@ant-design/icons'; |
| | | import { PageContainer } from '@ant-design/pro-components'; |
| | | import { useModel } from '@umijs/max'; |
| | | import { Card, theme } from 'antd'; |
| | | import React from 'react'; |
| | | |
| | | /** |
| | | * 每个单独的卡片,为了复用样式抽成了组件 |
| | | * @param param0 |
| | | * @returns |
| | | */ |
| | | const InfoCard: React.FC<{ |
| | | title: string; |
| | | index: number; |
| | | desc: string; |
| | | href: string; |
| | | }> = ({ title, href, index, desc }) => { |
| | | const { useToken } = theme; |
| | | |
| | | const { token } = useToken(); |
| | | |
| | | return ( |
| | | <div |
| | | style={{ |
| | | backgroundColor: token.colorBgContainer, |
| | | boxShadow: token.boxShadow, |
| | | borderRadius: '8px', |
| | | fontSize: '14px', |
| | | color: token.colorTextSecondary, |
| | | lineHeight: '22px', |
| | | padding: '16px 19px', |
| | | minWidth: '220px', |
| | | flex: 1, |
| | | }} |
| | | > |
| | | <div |
| | | style={{ |
| | | display: 'flex', |
| | | gap: '4px', |
| | | alignItems: 'center', |
| | | }} |
| | | > |
| | | <div |
| | | style={{ |
| | | width: 48, |
| | | height: 48, |
| | | lineHeight: '22px', |
| | | backgroundSize: '100%', |
| | | textAlign: 'center', |
| | | padding: '8px 16px 16px 12px', |
| | | color: '#FFF', |
| | | fontWeight: 'bold', |
| | | backgroundImage: |
| | | "url('https://gw.alipayobjects.com/zos/bmw-prod/daaf8d50-8e6d-4251-905d-676a24ddfa12.svg')", |
| | | }} |
| | | > |
| | | {index} |
| | | </div> |
| | | <div |
| | | style={{ |
| | | fontSize: '16px', |
| | | color: token.colorText, |
| | | paddingBottom: 8, |
| | | }} |
| | | > |
| | | {title} |
| | | </div> |
| | | </div> |
| | | <div |
| | | style={{ |
| | | fontSize: '14px', |
| | | color: token.colorTextSecondary, |
| | | textAlign: 'justify', |
| | | lineHeight: '22px', |
| | | marginBottom: 8, |
| | | }} |
| | | > |
| | | {desc} |
| | | </div> |
| | | <a href={href} target="_blank" rel="noreferrer"> |
| | | 了解更多 {'>'} |
| | | </a> |
| | | </div> |
| | | ); |
| | | }; |
| | | |
| | | import { history, useModel } from '@umijs/max'; |
| | | import { Button, Col, DatePicker, Divider, Form, Input, Modal, Radio, Row, Select, Space, Tree } from 'antd'; |
| | | import TextArea from 'antd/es/input/TextArea'; |
| | | import { Router } from 'express'; |
| | | import React, { useEffect, useState } from 'react'; |
| | | import { flushSync } from 'react-dom'; |
| | | import moment from 'moment'; |
| | | import { postOaJobLevelGetJobLevelList } from '@/services/WebApi/oaJobLevel'; |
| | | import { postOaJobGetJobList } from '@/services/WebApi/oaJob'; |
| | | import { postOaDepartmentGetDepartmentList } from '@/services/WebApi/oaDepartment'; |
| | | import { postOaJobPositionGetJobPositionList } from '@/services/WebApi/oaJobPosition'; |
| | | const Welcome: React.FC = () => { |
| | | const { token } = theme.useToken(); |
| | | const { initialState } = useModel('@@initialState'); |
| | | const [treeData, setTreeData] = useState([]); |
| | | const [expandedKeys, setExpandedKeys] = useState([]); |
| | | const { initialState, setInitialState, refresh } = useModel('@@initialState'); |
| | | const [dialogTitle, setDialogTitle] = useState('新建用户'); |
| | | const [addDialogVisible, setAddDialogVisible] = useState(false); |
| | | const [birthday, setBirthday] = useState("") |
| | | const [formRef] = Form.useForm(); |
| | | const [currentRoleId, setCurrentRoleId] = useState(''); |
| | | const [jobList, setJobList] = useState([]); |
| | | const [oaJobLevelList, setOaJobLevelList] = useState([]); |
| | | const [deplist, setDepList] = useState([]); |
| | | const [jobPositionList, setJobPositionList] = useState([]); |
| | | |
| | | const getStaffList = async (roleList) => { |
| | | const res = await postOaStaffGetStaffList({ start: 0, size: 100, orgId: 5 }); |
| | | const staffList = res.datas.map((item: any) => { |
| | | return { |
| | | key: item.id + 'staff', |
| | | title: item.name, |
| | | roleId: item.role?.id, |
| | | ...item, |
| | | }; |
| | | }); |
| | | for (let i = 0; i < roleList.length; i++) { |
| | | const item = roleList[i]; |
| | | item.children = staffList.filter((staff) => staff.roleId === item.id); |
| | | if (item.children && item.children.length > 0) { |
| | | item.children = item.children.map((staff) => { |
| | | return { |
| | | ...staff, |
| | | parent: item, |
| | | }; |
| | | }); |
| | | } |
| | | } |
| | | console.log(roleList, 'roleList'); |
| | | |
| | | setTreeData(roleList); |
| | | }; |
| | | const getRoleList = async () => { |
| | | const res = await postOaRoleGetRoleList({ start: 0, size: 100, orgId: 4 }); |
| | | if (res && res.datas.length > 0) { |
| | | const treeRoles = res.datas.map((item: any) => { |
| | | return { |
| | | key: item.id, |
| | | title: item.name, |
| | | children: [], |
| | | ...item, |
| | | }; |
| | | }); |
| | | |
| | | const keyList = treeRoles.map((item) => item.key); |
| | | setExpandedKeys(keyList); |
| | | getStaffList(treeRoles); |
| | | } |
| | | }; |
| | | |
| | | const selecStaff = (id, parent) => { |
| | | postIdentityLoginLoginOa({ staffId: id }).then((res) => { |
| | | flushSync(() => { |
| | | setInitialState((s: any) => ({ |
| | | ...s, |
| | | selectRole: parent, |
| | | })); |
| | | }); |
| | | // setInitialState({ |
| | | // ...initialState, |
| | | // selectRole: parent, |
| | | // }); |
| | | |
| | | refresh(); |
| | | history.push('/organizationDesign'); |
| | | }); |
| | | }; |
| | | |
| | | const addStaff = (id, parent) => { |
| | | setAddDialogVisible(true); |
| | | setDialogTitle('新建用户'); |
| | | setCurrentRoleId(id); |
| | | } |
| | | |
| | | const MyTreeNode = ({ title, children, id, parent }) => { |
| | | return ( |
| | | <div style={{ width: '200px', display: 'flex', justifyContent: 'space-between' }}> |
| | | <span>{title}</span> |
| | | |
| | | {children ? ( |
| | | <span |
| | | onClick={() => { |
| | | addStaff(id, parent); |
| | | }} |
| | | style={{ color: '#1890ff', cursor: 'pointer' }} |
| | | > |
| | | 新增用户 |
| | | </span> |
| | | ) : ( |
| | | <span |
| | | onClick={() => { |
| | | selecStaff(id, parent); |
| | | }} |
| | | style={{ color: '#1890ff', cursor: 'pointer' }} |
| | | > |
| | | 操作 |
| | | </span> |
| | | )} |
| | | </div> |
| | | ); |
| | | }; |
| | | |
| | | const handleOk = () => { |
| | | |
| | | formRef.validateFields().then((values) => { |
| | | |
| | | for (const key in values) { |
| | | if (values[key] === undefined) { |
| | | values[key] = "" |
| | | } |
| | | if (values[key] != null && typeof values[key] === 'object') { |
| | | values[key] = moment(values[key]).format('YYYY-MM-DD'); |
| | | } |
| | | } |
| | | const params = { |
| | | ...values, |
| | | sex: "1", |
| | | isOnJob: true, |
| | | roleId: currentRoleId, |
| | | PinYin: "pinyin", |
| | | positionSalary: 2, |
| | | performanceRates: 2, |
| | | performanceSalary: 2, |
| | | publicRates: 2, |
| | | socialRates: 2, |
| | | orgId: 5 |
| | | } |
| | | |
| | | postOaStaffNewStaff(params).then((res) => { |
| | | setAddDialogVisible(false); |
| | | getRoleList(); |
| | | }) |
| | | }) |
| | | } |
| | | const handleCancel = () => { |
| | | console.log('OK'); |
| | | setAddDialogVisible(false); |
| | | } |
| | | |
| | | const getJobPositionList = async () => { |
| | | const res = await postOaJobPositionGetJobPositionList({ start: 0, size: 100, orgId: 5 }); |
| | | const options = res.datas.map((item) => { |
| | | return { |
| | | value: item.id, |
| | | label: item.name, |
| | | } |
| | | }) |
| | | setJobPositionList(options); |
| | | console.log(res, "getDepList"); |
| | | } |
| | | const getDepList = async () => { |
| | | const res = await postOaDepartmentGetDepartmentList({ start: 0, size: 100, orgId: 5 }); |
| | | const options = res.datas.map((item) => { |
| | | return { |
| | | value: item.id, |
| | | label: item.name, |
| | | } |
| | | }) |
| | | setDepList(options); |
| | | console.log(res, "getDepList"); |
| | | } |
| | | const getJobLevelList = async () => { |
| | | const res = await postOaJobLevelGetJobLevelList({ start: 0, size: 100, orgId: 5 }); |
| | | const options = res.datas.map((item) => { |
| | | return { |
| | | value: item.id, |
| | | label: item.name, |
| | | } |
| | | }) |
| | | setOaJobLevelList(options); |
| | | console.log(res, "getJobLevelList"); |
| | | } |
| | | useEffect(() => { |
| | | getRoleList(); |
| | | getJobLevelList(); |
| | | getJobList(); |
| | | getDepList(); |
| | | getJobPositionList(); |
| | | console.log(initialState, "initialState"); |
| | | |
| | | }, []); |
| | | |
| | | |
| | | const getJobList = () => { |
| | | postOaJobGetJobList({ start: 0, size: 100, orgId: 5 }).then((res) => { |
| | | |
| | | const options = res.datas.map((item) => { |
| | | return { |
| | | value: item.id, |
| | | label: item.name, |
| | | } |
| | | }) |
| | | setJobList(options); |
| | | }) |
| | | } |
| | | return ( |
| | | <PageContainer> |
| | | <Card |
| | | style={{ |
| | | borderRadius: 8, |
| | | }} |
| | | styles={{ |
| | | body: { |
| | | backgroundImage: |
| | | initialState?.settings?.navTheme === 'realDark' |
| | | ? 'background-image: linear-gradient(75deg, #1A1B1F 0%, #191C1F 100%)' |
| | | : 'background-image: linear-gradient(75deg, #FBFDFF 0%, #F5F7FF 100%)', |
| | | }, |
| | | }} |
| | | <div> |
| | | <Tree |
| | | style={{ width: '300px' }} |
| | | titleRender={(nodeData) => <MyTreeNode {...nodeData} />} |
| | | defaultExpandAll |
| | | expandedKeys={expandedKeys} |
| | | showLine |
| | | switcherIcon={<DownOutlined />} |
| | | treeData={treeData} |
| | | /> |
| | | </div> |
| | | |
| | | <Modal |
| | | title={dialogTitle} |
| | | width={900} |
| | | onOk={handleOk} |
| | | open={addDialogVisible} |
| | | // confirmLoading={confirmLoading} |
| | | centered={true} |
| | | onCancel={handleCancel} |
| | | > |
| | | <div |
| | | style={{ |
| | | backgroundPosition: '100% -30%', |
| | | backgroundRepeat: 'no-repeat', |
| | | backgroundSize: '274px auto', |
| | | backgroundImage: |
| | | "url('https://gw.alipayobjects.com/mdn/rms_a9745b/afts/img/A*BuFmQqsB2iAAAAAAAAAAAAAAARQnAQ')", |
| | | }} |
| | | > |
| | | <div |
| | | style={{ |
| | | fontSize: '20px', |
| | | color: token.colorTextHeading, |
| | | }} |
| | | > |
| | | 欢迎使用 Ant Design Pro |
| | | </div> |
| | | <p |
| | | style={{ |
| | | fontSize: '14px', |
| | | color: token.colorTextSecondary, |
| | | lineHeight: '22px', |
| | | marginTop: 16, |
| | | marginBottom: 32, |
| | | width: '65%', |
| | | }} |
| | | > |
| | | Ant Design Pro 是一个整合了 umi,Ant Design 和 ProComponents |
| | | 的脚手架方案。致力于在设计规范和基础组件的基础上,继续向上构建,提炼出典型模板/业务组件/配套设计资源,进一步提升企业级中后台产品设计研发过程中的『用户』和『设计者』的体验。 |
| | | </p> |
| | | <div |
| | | style={{ |
| | | display: 'flex', |
| | | flexWrap: 'wrap', |
| | | gap: 16, |
| | | }} |
| | | > |
| | | <InfoCard |
| | | index={1} |
| | | href="https://umijs.org/docs/introduce/introduce" |
| | | title="了解 umi" |
| | | desc="umi 是一个可扩展的企业级前端应用框架,umi 以路由为基础的,同时支持配置式路由和约定式路由,保证路由的功能完备,并以此进行功能扩展。" |
| | | /> |
| | | <InfoCard |
| | | index={2} |
| | | title="了解 ant design" |
| | | href="https://ant.design" |
| | | desc="antd 是基于 Ant Design 设计体系的 React UI 组件库,主要用于研发企业级中后台产品。" |
| | | /> |
| | | <InfoCard |
| | | index={3} |
| | | title="了解 Pro Components" |
| | | href="https://procomponents.ant.design" |
| | | desc="ProComponents 是一个基于 Ant Design 做了更高抽象的模板组件,以 一个组件就是一个页面为开发理念,为中后台开发带来更好的体验。" |
| | | /> |
| | | </div> |
| | | <div style={{ height: '80vh', overflow: 'auto' }}> |
| | | <Form form={formRef} layout="vertical" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="员工姓名" name="name" rules={[{ required: true, message: '请输入员工姓名' }]}> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="部门名称" name="departmentId"> |
| | | <Select |
| | | options={deplist} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="身份证号" name="idNum" rules={[{ required: true, message: '请输入员工姓名' }]}> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="性别" name="sex"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '0', |
| | | label: '女', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '男', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="籍贯" name="nativePlace"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="雇佣类型" name="employmentType"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '0', |
| | | label: '兼职', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '全职', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="出生年月" name="birthday"> |
| | | <DatePicker value={birthday} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="民族" name="race"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '1', |
| | | label: '汉族', |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '藏族', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="婚姻状况" name="marriageStatus"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '1', |
| | | label: '已婚', |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '未婚', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="政治面貌" name="politicalStatus"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '1', |
| | | label: '群众', |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '党员', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="毕业院校" name="graduateSchool"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="专业" name="major"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="职称" name="title"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '1', |
| | | label: '教授', |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '老师', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="工种" name="jobType"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '1', |
| | | label: '技工', |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '工程师', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="文化程度" name="educationLevel"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '1', |
| | | label: '初中', |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '高中', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="手机" name="mobilePhone"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="联系地址" name="contactAddress"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="电子邮件" name="eMail"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="家庭住址" name="homeAddress"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="联系电话" name="phone"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="备注" name="remarks"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Divider orientation="left">岗位信息</Divider> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="工号" name="jobNumber"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="所在城市" name="city"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '1', |
| | | label: '上海', |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '北京 ', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="岗位" name="station"> |
| | | <Select |
| | | options={jobPositionList} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="是否在职" name="isOnJob"> |
| | | <Radio.Group |
| | | options={[ |
| | | { value: 1, label: '离职' }, |
| | | { value: 2, label: '在职' }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="入职时间" name="joinDate"> |
| | | <DatePicker format="YYYY-MM-DD" /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="离职时间" name="offJobDate"> |
| | | <DatePicker format="YYYY-MM-DD" /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="是否退休" name="isRetire"> |
| | | <Radio.Group |
| | | options={[ |
| | | { value: 1, label: '否' }, |
| | | { value: 2, label: '是' }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="参加工作时间" name="beginWorkDate"> |
| | | <DatePicker format="YYYY-MM-DD" /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="带薪休假天数" name="payDayOffs"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="职位" name="jobId"> |
| | | <Select |
| | | options={jobList} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="职级" name="jobPositionId"> |
| | | <Select |
| | | options={oaJobLevelList} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="基本工资" name="name333"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="职级工资" name="positionSalary"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="绩效系数" name="performanceRates"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="绩效工资" name="performanceSalary"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="社保基数" name="socialRates"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="公积金基数" name="publicRates"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="绩效等级" name="performanceLevel"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '1', |
| | | label: '1', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="晋升潜力" name="promoteLevel"> |
| | | <Select |
| | | defaultValue="1" |
| | | options={[ |
| | | { |
| | | value: '1', |
| | | label: 'A', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="社保账户" name="socialAccount"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="银行账号" name="bankAccount"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | </div> |
| | | </Card> |
| | | </Modal> |
| | | </PageContainer> |
| | | ); |
| | | }; |
| | |
| | | import { |
| | | postOaStrategyPlanGetStrategyPlanList, |
| | | postOaStrategyPlanNewStrategyPlan, |
| | | } from '@/services/WebApi/strategyPlan'; |
| | | import { PlusOutlined } from '@ant-design/icons'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Col, DatePicker, Form, Modal, Row } from 'antd'; |
| | | import TextArea from 'antd/es/input/TextArea'; |
| | | import React, { useState } from 'react'; |
| | | import styles from './index.less'; |
| | | postOaStrategyPlanUpdateStrategyPlan, |
| | | postOaStrategyPlanDelStrategyPlan |
| | | } from "@/services/WebApi/strategyPlan"; |
| | | import { PlusOutlined, ExclamationCircleOutlined } from "@ant-design/icons"; |
| | | import { PageContainer, ProTable } from "@ant-design/pro-components"; |
| | | import { |
| | | Button, |
| | | Col, |
| | | DatePicker, |
| | | Form, |
| | | Input, |
| | | Modal, |
| | | Row, |
| | | message, |
| | | } from "antd"; |
| | | import TextArea from "antd/es/input/TextArea"; |
| | | import dayjs from "dayjs"; |
| | | import React, { useEffect, useRef, useState } from "react"; |
| | | import styles from "./index.less"; |
| | | const organizationalStrategyFormulation: React.FC = () => { |
| | | const [dialogTitle, setDialogTitle] = useState(''); |
| | | const [addDialogVisible, setAddDialogVisible] = useState(false); |
| | | const [dialogTitle, setDialogTitle] = useState(""); |
| | | const [addDialogVisible, setAddDialogVisible] = useState({ |
| | | open: false, // 初始状态 |
| | | type: "", |
| | | }); |
| | | |
| | | const [formRef] = Form.useForm(); |
| | | const tableRef = useRef(null); |
| | | const { confirm } = Modal; |
| | | // 表头 |
| | | const columns = [ |
| | | { |
| | | title: '时间段', |
| | | dataIndex: ['beginDate', 'endDate'], // 匹配后端返回的数据结构 |
| | | key: 'dateRange', |
| | | valueType: 'dateRange', // 使用 antd 的 RangePicker |
| | | render: (_, record) => ( |
| | | title: "时间段", |
| | | dataIndex: ["beginDate", "endDate"], // 匹配后端返回的数据结构 |
| | | key: "dateRange", |
| | | width: 200, |
| | | valueType: "dateRange", // 使用 antd 的 RangePicker |
| | | render: (_: any, record: any) => ( |
| | | <span> |
| | | {record.beginDate && record.endDate |
| | | ? `${record.beginDate.split('T')[0]} 至${record.endDate.split('T')[0]}` |
| | | : '未设置'} |
| | | ? `${record.beginDate} —${record.endDate}` |
| | | : "未设置"} |
| | | </span> |
| | | ), |
| | | search: { |
| | | transform: (values) => ({ |
| | | transform: (values: any) => ({ |
| | | beginDate: values[0], // 转换为后端需要的格式 |
| | | endDate: values[1], |
| | | }), |
| | | }, |
| | | }, |
| | | { |
| | | title: '实现的目标', |
| | | dataIndex: 'aim', |
| | | key: 'aim', |
| | | title: "实现的目标", |
| | | dataIndex: "aim", |
| | | key: "aim", |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '核心价值观', |
| | | dataIndex: 'coreValue', |
| | | key: 'coreValue', |
| | | title: "核心价值观", |
| | | dataIndex: "coreValue", |
| | | key: "coreValue", |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'operate', |
| | | key: 'operate', |
| | | title: "操作", |
| | | width: 200, |
| | | dataIndex: "operate", |
| | | key: "operate", |
| | | search: false, |
| | | render: (text: string) => <a>编辑</a>, |
| | | render: (text: string, record: any) => { |
| | | return ( |
| | | <div> |
| | | <Button |
| | | onClick={() => { |
| | | console.log(text, "text001"); |
| | | console.log(record, "record001"); |
| | | record.time = [dayjs(record.beginDate), dayjs(record.endDate)]; |
| | | setAddDialogVisible({ |
| | | open: true, |
| | | type: "edit", |
| | | }); |
| | | setDialogTitle("编辑组织战略"); |
| | | formRef.setFieldsValue(record); |
| | | }} |
| | | color="primary" |
| | | variant="text" |
| | | > |
| | | 编辑 |
| | | </Button> |
| | | <Button onClick={() => { |
| | | confirm({ |
| | | icon: <ExclamationCircleOutlined />, |
| | | content: "是否删除该数据", |
| | | onOk() { |
| | | postOaStrategyPlanDelStrategyPlan({ |
| | | ids: [record.id], |
| | | }).then((res) => { |
| | | message.success("删除成功"); |
| | | tableRef?.current?.reload(); |
| | | }); |
| | | console.log('OK'); |
| | | }, |
| | | onCancel() { |
| | | console.log('Cancel'); |
| | | }, |
| | | }); |
| | | |
| | | }} color="danger" variant="text"> |
| | | 删除 |
| | | </Button> |
| | | </div> |
| | | ); |
| | | }, |
| | | }, |
| | | ]; |
| | | |
| | | // 表格全选 |
| | | const rowSelection: TableProps<DataType>['rowSelection'] = { |
| | | const rowSelection: TableProps<DataType>["rowSelection"] = { |
| | | onChange: (selectedRowKeys: React.Key[], selectedRows: DataType[]) => { |
| | | // 当选中行变化时触发,打印选中的行键和行数据 |
| | | console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows); |
| | | console.log( |
| | | `selectedRowKeys: ${selectedRowKeys}`, |
| | | "selectedRows: ", |
| | | selectedRows |
| | | ); |
| | | }, |
| | | }; |
| | | |
| | | useEffect(() => { |
| | | if (addDialogVisible && !addDialogVisible.open) { |
| | | formRef.resetFields(); |
| | | } |
| | | }, [addDialogVisible.open]); |
| | | |
| | | // 表单提交 |
| | | const handleOk = () => { |
| | | const values = formRef.getFieldsValue(); |
| | | const body = { |
| | | beginDate: values.time[0], |
| | | endDate: values.time[1], |
| | | aim: values.aim, |
| | | coreValue: values.coreValue, |
| | | direction: values.direction, |
| | | plan: values.plan, |
| | | guide: values.guide, |
| | | steps: values.steps, |
| | | orgId: 4, |
| | | }; |
| | | postOaStrategyPlanNewStrategyPlan(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | setAddDialogVisible(false); |
| | | formRef.validateFields().then((values) => { |
| | | console.log(values, "values"); |
| | | const recordId = values.id || null; |
| | | const body = { |
| | | beginDate: values.time[0], |
| | | endDate: values.time[1], |
| | | aim: values.aim, |
| | | coreValue: values.coreValue, |
| | | direction: values.direction, |
| | | plan: values.plan, |
| | | guide: values.guide, |
| | | steps: values.steps, |
| | | orgId: 4, |
| | | ...(recordId && { id: recordId }), |
| | | }; |
| | | if (body.id) { |
| | | // 修改表单 |
| | | postOaStrategyPlanUpdateStrategyPlan(body).then((res) => { |
| | | console.log(res, "res"); |
| | | message.success("更新成功"); |
| | | setAddDialogVisible({ open: false, type: "" }); |
| | | // 刷新 |
| | | tableRef.current.reload(); |
| | | }); |
| | | } else { |
| | | // 新增表单 |
| | | postOaStrategyPlanNewStrategyPlan(body).then((res) => { |
| | | console.log(res, "res"); |
| | | message.success("新建成功"); |
| | | setAddDialogVisible({ |
| | | open: false, |
| | | type: "add", |
| | | }); |
| | | tableRef.current.reload(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // 弹框取消 |
| | | const handleCancel = () => { |
| | | setAddDialogVisible(false); |
| | | setAddDialogVisible({ |
| | | open: false, |
| | | type: "", |
| | | }); |
| | | }; |
| | | |
| | | // 获取表格数据 |
| | | const getTableData = (params: { current: number; pageSize: number }) => { |
| | | debugger; |
| | | console.log(params, "params001"); |
| | | const body = { |
| | | start: (params.current - 1) * params.pageSize, |
| | | size: params.pageSize, |
| | |
| | | orgId: 4, |
| | | }; |
| | | return postOaStrategyPlanGetStrategyPlanList(body).then((res) => { |
| | | return { |
| | | data: res.datas, |
| | | total: res.totalSize, |
| | | }; |
| | | if (params.beginDate && params.endDate) { |
| | | let tableList = []; |
| | | res.datas.forEach((item: any) => { |
| | | item.beginDateWithinRange = isDateWithinRange( |
| | | item.beginDate, |
| | | params.beginDate, |
| | | params.endDate |
| | | ); |
| | | item.endDateWithinRange = isDateWithinRange( |
| | | item.endDate, |
| | | params.beginDate, |
| | | params.endDate |
| | | ); |
| | | item.beginDate = item.beginDate.split("T")[0]; |
| | | item.endDate = item.endDate.split("T")[0]; |
| | | if (item.beginDateWithinRange && item.endDateWithinRange) { |
| | | tableList.push(item); |
| | | } |
| | | }); |
| | | return { |
| | | data: tableList, |
| | | total: tableList.length, |
| | | }; |
| | | } else { |
| | | res.datas.forEach((item: any) => { |
| | | item.beginDate = item.beginDate.split("T")[0]; |
| | | item.endDate = item.endDate.split("T")[0]; |
| | | }); |
| | | return { |
| | | data: res.datas, |
| | | total: res.totalSize, |
| | | }; |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // 查询 |
| | | // 判断日期是否在范围内 |
| | | const isDateWithinRange = (dateStr: any, startStr: any, endStr: any) => { |
| | | const date = new Date(dateStr); |
| | | const start = new Date(startStr); |
| | | start.setHours(0, 0, 0, 0); |
| | | const end = new Date(endStr); |
| | | end.setHours(23, 59, 59, 999); |
| | | return date >= start && date <= end; |
| | | }; |
| | | |
| | | // 查询 |
| | | const handleSearch = (params: { current: number; pageSize: number }) => { |
| | | console.log(params, 'params001'); |
| | | console.log(params, "params001"); |
| | | debugger; |
| | | }; |
| | | |
| | | return ( |
| | | <PageContainer> |
| | | <ProTable |
| | | actionRef={tableRef} |
| | | headerTitle="组织战略制定表" |
| | | columns={columns} |
| | | rowKey="id" |
| | |
| | | key="button" |
| | | icon={<PlusOutlined />} |
| | | onClick={() => { |
| | | setAddDialogVisible(true); |
| | | setDialogTitle('新建组织战略'); |
| | | setAddDialogVisible({ |
| | | open: true, |
| | | type: "add", |
| | | }); |
| | | setDialogTitle("新建组织战略"); |
| | | }} |
| | | type="primary" |
| | | > |
| | |
| | | ></ProTable> |
| | | |
| | | <Modal |
| | | title={dialogTitle} |
| | | title={addDialogVisible.type == "add" ? "新建组织战略" : "编辑组织战略"} |
| | | width={900} |
| | | onOk={handleOk} |
| | | open={addDialogVisible} |
| | | open={addDialogVisible.open} |
| | | // confirmLoading={confirmLoading} |
| | | onCancel={handleCancel} |
| | | > |
| | | <div className={styles.addDialog}> |
| | | <Form form={formRef} layout="vertical" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}> |
| | | <Form |
| | | form={formRef} |
| | | layout="vertical" |
| | | labelCol={{ span: 6 }} |
| | | wrapperCol={{ span: 18 }} |
| | | > |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="时间段" |
| | | name="time" |
| | | rules={[{ required: true, message: '请输入时间段' }]} |
| | | rules={[{ required: true, message: "请输入时间段" }]} |
| | | > |
| | | <DatePicker.RangePicker style={{ width: '100%' }} /> |
| | | <DatePicker.RangePicker style={{ width: "100%" }} /> |
| | | </Form.Item> |
| | | <Form.Item name="id" hidden> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | |
| | | <Form.Item |
| | | label="组织需要实现的目标" |
| | | name="aim" |
| | | rules={[{ required: true, message: '请输入组织需要实现的目标' }]} |
| | | rules={[ |
| | | { required: true, message: "请输入组织需要实现的目标" }, |
| | | ]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | |
| | | <Form.Item |
| | | label="核心价值观" |
| | | name="coreValue" |
| | | rules={[{ required: true, message: '请输入核心价值观' }]} |
| | | rules={[{ required: true, message: "请输入核心价值观" }]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | |
| | | <Form.Item |
| | | label="组织的发展方向" |
| | | name="direction" |
| | | rules={[{ required: true, message: '请输入组织的发展方向' }]} |
| | | rules={[{ required: true, message: "请输入组织的发展方向" }]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | |
| | | <Form.Item |
| | | label="组织的发展计划" |
| | | name="plan" |
| | | rules={[{ required: true, message: '请输入组织的发展计划' }]} |
| | | rules={[{ required: true, message: "请输入组织的发展计划" }]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | |
| | | <Form.Item |
| | | label="指导方针" |
| | | name="guide" |
| | | rules={[{ required: true, message: '请输入指导方针' }]} |
| | | rules={[{ required: true, message: "请输入指导方针" }]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | |
| | | <Form.Item |
| | | label="实施措施" |
| | | name="steps" |
| | | rules={[{ required: true, message: '请输入实施措施' }]} |
| | | rules={[{ required: true, message: "请输入实施措施" }]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
New file |
| | |
| | | .title { |
| | | border: 1px solid #fafafa; |
| | | margin: 10px 0; |
| | | padding: 5px 10px; |
| | | } |
| | | |
| | | .addDialog{ |
| | | max-height: 600px; |
| | | overflow-y: auto; |
| | | } |
New file |
| | |
| | | import { |
| | | postOaResourceRequirementAnalysisGetResourceRequirementAnalysisList, |
| | | postOaResourceRequirementAnalysisNewApprove, |
| | | postOaResourceRequirementAnalysisNewResourceRequirementAnalysis, |
| | | postOaResourceRequirementAnalysisUpdateResourceRequirementAnalysis, |
| | | postOaResourceRequirementAnalysisDelResourceRequirementAnalysis |
| | | } from "@/services/WebApi/resourceRequirementAnalysis"; |
| | | import { postOaDepartmentGetDepartmentList } from '@/services/WebApi/oaDepartment'; |
| | | import { postOaJobGetJobList } from '@/services/WebApi/oaJob'; |
| | | import { PageContainer, ProTable } from "@ant-design/pro-components"; |
| | | import { PlusOutlined, ExclamationCircleOutlined } from "@ant-design/icons"; |
| | | import styles from "./index.less"; |
| | | import dayjs from "dayjs"; |
| | | import React, { useEffect, useRef, useState } from "react"; |
| | | import { |
| | | Button, |
| | | Col, |
| | | Form, |
| | | Input, |
| | | Modal, |
| | | Row, |
| | | message, |
| | | Select, |
| | | Radio, |
| | | Divider |
| | | } from "antd"; |
| | | import TextArea from "antd/es/input/TextArea"; |
| | | |
| | | const personnelRequirementAnalysis: React.FC = () => { |
| | | const [dialogTitle, setDialogTitle] = useState(""); |
| | | const [addDialogVisible, setAddDialogVisible] = useState({ |
| | | open: false, // 初始状态 |
| | | type: "", // examine 审批 add 新建 modify 修改 |
| | | }); |
| | | const [currentTime, setCurrentTime] = useState(''); |
| | | const [formRef] = Form.useForm(); |
| | | const tableRef = useRef(null); |
| | | const { confirm } = Modal; |
| | | |
| | | // 只需要存储原始数据 |
| | | const [departments, setDepartments] = useState([]); |
| | | const [positions, setPositions] = useState([]); |
| | | |
| | | useEffect(() => { |
| | | // 组件挂载时获取当前时间 |
| | | const loadData = async () => { |
| | | try { |
| | | // 使用 Promise.all 并行请求,效率更高 |
| | | const [depData, posData] = await Promise.all([ |
| | | getDepList(), |
| | | getPositionList() |
| | | ]); |
| | | setDepartments(depData.data); |
| | | setPositions(posData.data); |
| | | setCurrentTime(new Date().toLocaleString()); |
| | | |
| | | } catch (error) { |
| | | console.error("获取数据失败:", error); |
| | | } |
| | | }; |
| | | loadData(); |
| | | setCurrentTime(new Date().toLocaleString()); |
| | | }, []); |
| | | |
| | | //获取部门列表 |
| | | const getDepList = () => { |
| | | const params = { |
| | | start: 0, |
| | | size: 99, |
| | | orgId: 5, |
| | | filterList: [], |
| | | searchList: [], |
| | | }; |
| | | return postOaDepartmentGetDepartmentList(params).then((res) => { |
| | | console.log(res, 'res'); |
| | | return { |
| | | data: res.datas, |
| | | total: res.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | | // 获取职位列表 |
| | | const getPositionList = () => { |
| | | const params = { |
| | | start: 0, |
| | | size: 99, |
| | | orgId: 5, |
| | | filterList: [], |
| | | searchList: [], |
| | | }; |
| | | return postOaJobGetJobList(params).then((res) => { |
| | | console.log(res, 'res'); |
| | | return { |
| | | data: res.datas, |
| | | total: res.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | | |
| | | const handleEdit = (record: any, txt: any,) => { |
| | | setAddDialogVisible({ |
| | | open: true, |
| | | type: "edit", |
| | | }); |
| | | setDialogTitle(txt + "组织战略"); |
| | | // 用于反显数据 |
| | | formRef.setFieldsValue({ |
| | | name: record.name, |
| | | department: record.department?.id, |
| | | position: record.job?.id, |
| | | currentStaffCount: record.job.currentStaffCount, |
| | | resourceCount: record.resourceCount, |
| | | remarks: record.remarks, |
| | | affect: record.affect, |
| | | }); |
| | | }; |
| | | |
| | | const handleSubmit = async (record: any,) => { |
| | | const params = { |
| | | refId: record.id, |
| | | state: "不错,很满意", |
| | | remarks:"", |
| | | }; |
| | | return await postOaResourceRequirementAnalysisNewApprove(params).then((res) => { |
| | | console.log(res, 'res'); |
| | | return { |
| | | data: res.datas, |
| | | total: res.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | | |
| | | // 表头 |
| | | const columns = [ |
| | | { |
| | | title: "需求分析名称", |
| | | dataIndex: "name", |
| | | key: "name", |
| | | formItemProps: { |
| | | labelWrap: true, |
| | | labelCol: { span: 8 }, |
| | | }, |
| | | }, |
| | | { |
| | | title: "部门", |
| | | dataIndex: "department", |
| | | key: "department", |
| | | search: false, |
| | | render: (text: string, record: any) => { |
| | | return ( |
| | | <div> |
| | | {record.department.name} |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | { |
| | | title: "职位", |
| | | dataIndex: "position", |
| | | key: "position", |
| | | search: false, |
| | | render: (text: string, record: any) => { |
| | | return ( |
| | | <div> |
| | | {record.job.name} |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | { |
| | | title: "现有人数", |
| | | dataIndex: "currentStaffCount", |
| | | key: "currentStaffCount", |
| | | search: false, |
| | | render: (text: string, record: any) => { |
| | | return ( |
| | | <div> |
| | | {record.job.currentStaffCount} |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | { |
| | | title: "是否受供给因素影响", |
| | | dataIndex: "affectByMarket", |
| | | key: "affectByMarket", |
| | | search: false, |
| | | render: (text: string, record: any) => { |
| | | return ( |
| | | <div> |
| | | {record.affectByMarket == true ? "是" : "否"} |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | { |
| | | title: "需求人数", |
| | | dataIndex: "resourceCount", |
| | | key: "resourceCount", |
| | | search: false, |
| | | }, |
| | | { |
| | | title: "状态", |
| | | dataIndex: "affectByMarket", |
| | | key: "affectByMarket", |
| | | search: false, |
| | | render: (text: string, record: any) => { |
| | | // 假设 record.approve 的值是 true, false, 或 null |
| | | let statusText = ""; |
| | | let color = ""; |
| | | if (record.approve === true) { |
| | | statusText = "已审批"; |
| | | color = "#3f7cb5"; |
| | | } else if (record.approve === false) { |
| | | statusText = "待审批"; |
| | | color = "#ff1c1c"; |
| | | } else { |
| | | statusText = "未提交"; |
| | | color = "#bab7aa"; |
| | | } |
| | | return ( |
| | | <div style={{ color: color, fontWeight: 'bold' }}> |
| | | {statusText} |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | { |
| | | title: "操作", |
| | | width: 200, |
| | | dataIndex: "operate", |
| | | key: "operate", |
| | | search: false, |
| | | render: (text: string, record: any) => { |
| | | let statusText = ""; |
| | | let type = "" |
| | | if (record.approve === true) { |
| | | statusText = "查看"; |
| | | type |
| | | } else if (record.approve === false) { |
| | | statusText = "审批"; |
| | | } else { |
| | | statusText = "编辑"; |
| | | } |
| | | return ( |
| | | <div> |
| | | <Button |
| | | onClick={() => { |
| | | console.log(record, "record001"); |
| | | record.time = [dayjs(record.beginDate), dayjs(record.endDate)]; |
| | | handleEdit(record, statusText,) |
| | | }} |
| | | color="primary" |
| | | variant="text" |
| | | > |
| | | {statusText} |
| | | </Button> |
| | | <Button |
| | | onClick={() => { |
| | | console.log(record, "record001"); |
| | | handleSubmit(record) |
| | | |
| | | }} |
| | | color="primary" |
| | | variant="text" |
| | | > |
| | | 提交 |
| | | </Button> |
| | | <Button onClick={() => { |
| | | confirm({ |
| | | icon: <ExclamationCircleOutlined />, |
| | | content: "是否删除该数据", |
| | | onOk() { |
| | | postOaResourceRequirementAnalysisDelResourceRequirementAnalysis({ |
| | | ids: [record.id], |
| | | }).then((res) => { |
| | | message.success("删除成功"); |
| | | tableRef?.current?.reload(); |
| | | }); |
| | | console.log('OK'); |
| | | }, |
| | | onCancel() { |
| | | console.log('Cancel'); |
| | | }, |
| | | }); |
| | | |
| | | }} color="danger" variant="text"> |
| | | 删除 |
| | | </Button> |
| | | </div> |
| | | ); |
| | | }, |
| | | }, |
| | | ]; |
| | | // 全选 |
| | | const rowSelection: TableProps<DataType>["rowSelection"] = { |
| | | onChange: (selectedRowKeys: React.Key[], selectedRows: DataType[]) => { |
| | | // 当选中行变化时触发,打印选中的行键和行数据 |
| | | console.log( |
| | | `selectedRowKeys: ${selectedRowKeys}`, |
| | | "selectedRows: ", |
| | | selectedRows |
| | | ); |
| | | }, |
| | | }; |
| | | // 获取表格数据 |
| | | const getTableData = (params: { current: number; pageSize: number }) => { |
| | | const body = { |
| | | start: (params.current - 1) * params.pageSize, |
| | | size: params.pageSize, |
| | | filterList: [], |
| | | searchList: [], |
| | | orgId: 5, |
| | | }; |
| | | return postOaResourceRequirementAnalysisGetResourceRequirementAnalysisList(body).then((res) => { |
| | | return { |
| | | data: res.datas, |
| | | total: res.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | | |
| | | // 表单提交 |
| | | const handleOk = () => { |
| | | formRef.validateFields().then((values) => { |
| | | console.log(values, "values"); |
| | | debugger |
| | | }); |
| | | }; |
| | | // 表单取消 |
| | | const handleCancel = () => { |
| | | setAddDialogVisible({ |
| | | open: false, |
| | | type: "", |
| | | }); |
| | | }; |
| | | |
| | | |
| | | |
| | | // 查询 |
| | | const handleSearch = (params: { current: number; pageSize: number }) => { |
| | | console.log(params, "params001"); |
| | | debugger; |
| | | }; |
| | | |
| | | const radioOptions: CheckboxGroupProps<string>['options'] = [ |
| | | { label: '审批通过', value: 'true' }, |
| | | { label: '审批拒绝', value: 'false' }, |
| | | ]; |
| | | |
| | | const supplyOptions: CheckboxGroupProps<string>['options'] = [ |
| | | { label: '是', value: 'true' }, |
| | | { label: '否', value: 'false' }, |
| | | ]; |
| | | |
| | | return ( |
| | | <PageContainer> |
| | | <ProTable |
| | | actionRef={tableRef} |
| | | headerTitle="人员需求分析表" |
| | | columns={columns} |
| | | rowKey="id" |
| | | rowSelection={rowSelection} |
| | | request={getTableData} |
| | | onSearch={handleSearch} |
| | | toolBarRender={() => [ |
| | | <Button |
| | | key="button" |
| | | icon={<PlusOutlined />} |
| | | onClick={() => { |
| | | setAddDialogVisible({ |
| | | open: true, |
| | | type: "add", |
| | | }); |
| | | setDialogTitle("新建人员需求分析表"); |
| | | }} |
| | | type="primary" |
| | | > |
| | | 新建 |
| | | </Button>, |
| | | ]}> |
| | | </ProTable> |
| | | <Modal |
| | | title={addDialogVisible.type == "add" ? "新建人员需求分析" : "编辑人员需求分析"} |
| | | width={900} |
| | | onOk={handleOk} |
| | | open={addDialogVisible.open} |
| | | // confirmLoading={confirmLoading} |
| | | onCancel={handleCancel} |
| | | > |
| | | <div className={styles.addDialog}> |
| | | <Form |
| | | form={formRef} |
| | | layout="vertical" |
| | | labelCol={{ span: 6 }} |
| | | wrapperCol={{ span: 18 }} |
| | | > |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="人员需求分析名称" |
| | | labelCol={{ span: 12 }} |
| | | name="name" |
| | | rules={[ |
| | | { required: true, message: "请输入人员需求分析名称" }, |
| | | ]} |
| | | > |
| | | <Input placeholder="请输入人员需求分析名称" /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="部门" |
| | | name="department" |
| | | rules={[{ required: true, message: "请选择部门" }]} |
| | | > |
| | | <Select |
| | | placeholder="请选择部门" |
| | | options={departments.map(dep => ({ |
| | | value: dep.id, |
| | | label: dep.name, |
| | | }))} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="职位" |
| | | name="position" |
| | | rules={[{ required: true, message: "请选择职位" }]} |
| | | > |
| | | <Select |
| | | placeholder="请选择职位" |
| | | options={positions.map(dep => ({ |
| | | value: dep.id, |
| | | label: dep.name, |
| | | }))} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="现有人数" |
| | | name="currentStaffCount" |
| | | > |
| | | <Input placeholder="请输入人员需求分析名称" /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="人力需求预测方法" |
| | | name="demandForecastingMethod" |
| | | rules={[{ required: true, message: "请选择人力需求预测方法" }]} |
| | | labelCol={{ span: 12 }} |
| | | > |
| | | <Select |
| | | defaultValue="a1" |
| | | style={{ width: '100%' }} |
| | | // onChange={handleChange} |
| | | |
| | | // options={options} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="是否受供给因素影响" |
| | | name="affectByMarket" |
| | | rules={[{ required: true, message: "请选择是否受供给因素影响" }]} |
| | | labelCol={{ span: 12 }} |
| | | > |
| | | <Radio.Group block options={supplyOptions} defaultValue="true" /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | label="需求人数" |
| | | name="resourceCount" |
| | | rules={[{ required: true, message: "请输入需求人数" }]} |
| | | > |
| | | <Input placeholder="请输入人员需求分析名称" /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | label="影响因素" |
| | | name="affect" |
| | | rules={[{ message: "请输入影响因素" }]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | label="备注" |
| | | name="remarks" |
| | | rules={[{ message: "请输入备注" }]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | |
| | | {/* 根据表格的type来判断是否显示 */} |
| | | { |
| | | addDialogVisible.type == "examine" ? ( |
| | | <> |
| | | <Divider orientation="center">待处理的人员需求分析</Divider> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | label="审批说明" |
| | | name="affect" |
| | | rules={[{ required: true, message: "请输入审批说明" }]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="审批人签字" |
| | | name="affect" |
| | | rules={[{ required: true, message: "请输入审批说明" }]} |
| | | > |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="审批时间" |
| | | name="affect" |
| | | rules={[{ required: true, message: "请输入审批说明" }]} |
| | | > |
| | | <div >{currentTime}</div> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="选择要执行的操作" |
| | | labelCol={{ span: 12 }} |
| | | name="remarks" |
| | | rules={[{ required: true, message: "请选择要执行的操作" }]} |
| | | > |
| | | <Radio.Group block options={radioOptions} defaultValue="" /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </> |
| | | ) : null |
| | | } |
| | | </Form> |
| | | </div> |
| | | </Modal> |
| | | </PageContainer> |
| | | ); |
| | | }; |
| | | |
| | | export default personnelRequirementAnalysis; |
| | |
| | | import { postOaContractGetContractList } from '@/services/WebApi/contract'; |
| | | import { PlusOutlined, UserOutlined } from '@ant-design/icons'; |
| | | import { ExclamationCircleOutlined, PlusOutlined, UserOutlined } from '@ant-design/icons'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Col, Form, Input, Modal, Row, Select, Space } from 'antd'; |
| | | import { Button, Col, Form, Input, message, Modal, Row, Select, Space } from 'antd'; |
| | | import TextArea from 'antd/es/input/TextArea'; |
| | | import React, { useRef, useState } from 'react'; |
| | | import React, { useEffect, useRef, useState } from 'react'; |
| | | import styles from './index.less'; |
| | | import { postOaDepartmentGetDepartmentList } from '@/services/WebApi/oaDepartment'; |
| | | import { postOaDepartmentDelDepartment, postOaDepartmentGetDepartmentList, postOaDepartmentNewDepartment, postOaDepartmentUpdateDepartment } from '@/services/WebApi/oaDepartment'; |
| | | import { useModel } from '@umijs/max'; |
| | | import { postOaOrgGetOrgList } from '@/services/WebApi/oaOrg'; |
| | | import { postIdentityDepartmentNewDepartment } from '@/services/WebApi/department'; |
| | | import SelectUser from '@/components/selectUser'; |
| | | import modal from 'antd/es/modal'; |
| | | |
| | | const DepartmentalInformationConfiguration: React.FC = () => { |
| | | const { initialState, setInitialState } = useModel('@@initialState'); |
| | | |
| | | const [dialogTitle, setDialogTitle] = useState(''); |
| | | const [addDialogVisible, setAddDialogVisible] = useState(false); |
| | | |
| | | const [selectUserDialogVisible, setSelectUserDialogVisible] = useState(false); |
| | | const [userDialogTitle, setUserDialogTitle] = useState("选择部门领导"); |
| | | const [depLeader, setDepLeader] = useState<any>(null); |
| | | const [currentEditDepartment, setCurrentEditDepartment] = useState<any>(null); |
| | | const actionRef = useRef(null); |
| | | const [formRef] = Form.useForm(); |
| | | |
| | | const columns = [ |
| | | { |
| | | title: '部门名称', |
| | | key: 'code', |
| | | dataIndex: 'code', |
| | | key: 'name', |
| | | dataIndex: 'name', |
| | | align: 'center', |
| | | }, |
| | | { |
| | |
| | | dataIndex: 'name', |
| | | align: 'center', |
| | | search: false, |
| | | render: (_, rowData) => { |
| | | return rowData?.manager?.name || "-" |
| | | } |
| | | }, |
| | | { |
| | | title: '部门类型', |
| | |
| | | }, |
| | | { |
| | | title: '部门电话', |
| | | key: 'date1', |
| | | dataIndex: 'date1', |
| | | key: 'phone', |
| | | dataIndex: 'phone', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '上级部门', |
| | | key: 'date2', |
| | | dataIndex: 'date2', |
| | | key: 'parent', |
| | | dataIndex: 'parent', |
| | | align: 'center', |
| | | search: false, |
| | | render: (_, rowData) => { |
| | | return rowData?.parent?.name || "-" |
| | | } |
| | | }, |
| | | |
| | | { |
| | |
| | | search: false, |
| | | render: (_, rowData) => ( |
| | | <Space size="middle"> |
| | | <a onClick={() => {}} style={{ cursor: 'pointer', margin: ' 0 5px' }}> |
| | | <a onClick={() => { |
| | | formRef.setFieldsValue(rowData); |
| | | setDepLeader(rowData.manager) |
| | | formRef.setFieldValue('managerId', rowData.manager.name) |
| | | setDialogTitle('编辑部门'); |
| | | setCurrentEditDepartment(rowData); |
| | | setAddDialogVisible(true); |
| | | }} style={{ cursor: 'pointer', margin: ' 0 5px' }}> |
| | | 编辑 |
| | | </a> |
| | | |
| | | <a onClick={() => { |
| | | handleDelete(rowData.id) |
| | | }} style={{ cursor: 'pointer', margin: ' 0 5px', color: 'red' }}> 删除</a> |
| | | </Space> |
| | | ), |
| | | }, |
| | | ]; |
| | | const handleOk = () => {}; |
| | | |
| | | useEffect(() => { |
| | | if (!addDialogVisible) { |
| | | formRef.resetFields(); |
| | | } |
| | | }, [addDialogVisible]) |
| | | |
| | | |
| | | //删除部门 |
| | | const handleDelete = (id: number) => { |
| | | modal.confirm({ |
| | | title: '删除', |
| | | icon: <ExclamationCircleOutlined />, |
| | | content: '是否删除该部门?', |
| | | okText: '确认', |
| | | cancelText: '取消', |
| | | onOk: () => { |
| | | postOaDepartmentDelDepartment({ ids: [id] }).then((res) => { |
| | | message.success('删除成功'); |
| | | actionRef.current?.reload(); |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //新增or编辑 |
| | | const handleOk = () => { |
| | | formRef.validateFields().then((values) => { |
| | | const body = { |
| | | orgId: initialState?.appInfo?.org?.id, |
| | | ...values |
| | | } |
| | | for (let key in body) { |
| | | if (body[key] === undefined) { |
| | | body[key] = '' |
| | | } |
| | | } |
| | | body.parentId = 14 |
| | | body.type = "Normal" |
| | | body.managerId = depLeader.id |
| | | if (dialogTitle == '编辑部门') { |
| | | body.id = currentEditDepartment.id |
| | | postOaDepartmentUpdateDepartment(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | setAddDialogVisible(false); |
| | | message.success('编辑成功'); |
| | | actionRef.current?.reload(); |
| | | }) |
| | | } else { |
| | | postOaDepartmentNewDepartment(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | setAddDialogVisible(false); |
| | | message.success('添加成功'); |
| | | actionRef.current?.reload(); |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }; |
| | | const handleCancel = () => { |
| | | setAddDialogVisible(false); |
| | | }; |
| | | const getTableData = (params: { current: number; pageSize: number }) => { |
| | | console.log(params, 'params'); |
| | | let searchList = []; |
| | | if (params?.name) { |
| | | searchList = [{ |
| | | field: 'name', keywords: params.name, compareType: 'Contains', domain: "", |
| | | type: "", |
| | | fieldBaseType: "", |
| | | subSearches: [ |
| | | ] |
| | | }]; |
| | | } |
| | | const body = { |
| | | start: (params.current - 1) * params.pageSize, |
| | | size: params.pageSize, |
| | | filterList: [], |
| | | searchList: [], |
| | | searchList, |
| | | orgId: initialState?.appInfo?.org?.id, |
| | | }; |
| | | |
| | | return postOaDepartmentGetDepartmentList(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | return { |
| | | data: res.datas, |
| | | total: res.data.totalSize, |
| | | total: res.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | | |
| | | |
| | | return ( |
| | | <PageContainer> |
| | | <ProTable |
| | |
| | | width={900} |
| | | onOk={handleOk} |
| | | open={addDialogVisible} |
| | | // confirmLoading={confirmLoading} |
| | | onCancel={handleCancel} |
| | | > |
| | | <div className={styles.addDialog}> |
| | | <Form form={formRef} layout="vertical" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="部门名称" name="name"> |
| | | <Form.Item label="部门名称" name="name" rules={[{ required: true, message: '请输入部门名称' }]}> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="部门类型" |
| | | name="name" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | name="type" |
| | | rules={[{ required: true, message: '请选择部门类型' }]} |
| | | > |
| | | <Select |
| | | defaultValue="lucy" |
| | |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="部门领导" name="name"> |
| | | <Input suffix={<UserOutlined className="site-form-item-icon" />} /> |
| | | <Form.Item label="部门领导" name="managerId"> |
| | | <Input suffix={<UserOutlined onClick={() => { |
| | | setSelectUserDialogVisible(true) |
| | | }} className="site-form-item-icon" />} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="上级部门" name="name"> |
| | | <Form.Item label="上级部门" name="parentId"> |
| | | <Select |
| | | defaultValue="lucy" |
| | | options={[ |
| | |
| | | |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="部门电话" name="name"> |
| | | <Form.Item label="部门电话" name="phone"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="部门描述" name="name"> |
| | | <Form.Item label="部门描述" name="description"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | </Form> |
| | | </div> |
| | | </Modal> |
| | | |
| | | { |
| | | selectUserDialogVisible && <SelectUser title={userDialogTitle} onConfirm={(user) => { |
| | | formRef.setFieldValue('managerId', user.name) |
| | | setDepLeader(user) |
| | | setSelectUserDialogVisible(false) |
| | | }} onCancel={() => { |
| | | setSelectUserDialogVisible(false) |
| | | }} /> |
| | | } |
| | | |
| | | </PageContainer> |
| | | ); |
| | | }; |
| | |
| | | import { postOaContractGetContractList } from '@/services/WebApi/contract'; |
| | | import { PlusOutlined } from '@ant-design/icons'; |
| | | import { ExclamationCircleOutlined, PlusOutlined } from '@ant-design/icons'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Col, Form, Input, Modal, Row, Select, Space } from 'antd'; |
| | | import { Button, Col, Form, Input, message, Modal, Row, Select, Space } from 'antd'; |
| | | import TextArea from 'antd/es/input/TextArea'; |
| | | import React, { useRef, useState } from 'react'; |
| | | import React, { useEffect, useRef, useState } from 'react'; |
| | | import styles from './index.less'; |
| | | import { postOaJobDelJob, postOaJobGetJobList, postOaJobNewJob, postOaJobUpdateJob } from '@/services/WebApi/oaJob'; |
| | | import { useModel } from '@umijs/max'; |
| | | import modal from 'antd/es/modal'; |
| | | |
| | | const DepartmentalInformationConfiguration: React.FC = () => { |
| | | const JobInformationConfiguration: React.FC = () => { |
| | | |
| | | const { initialState, setInitialState } = useModel('@@initialState'); |
| | | const [dialogTitle, setDialogTitle] = useState(''); |
| | | const [addDialogVisible, setAddDialogVisible] = useState(false); |
| | | const [currentEditJob, setCurrentEditJob] = useState<any>(null); |
| | | |
| | | const actionRef = useRef(null); |
| | | const [formRef] = Form.useForm(); |
| | |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '职级下线', |
| | | title: '职级下限', |
| | | key: 'type', |
| | | dataIndex: 'type', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '职级上线', |
| | | title: '职级上限', |
| | | key: 'date1', |
| | | dataIndex: 'date1', |
| | | align: 'center', |
| | |
| | | }, |
| | | { |
| | | title: '上级部门', |
| | | key: 'date2', |
| | | dataIndex: 'date2', |
| | | key: 'parentJobId', |
| | | dataIndex: 'parentJobId', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | |
| | | search: false, |
| | | render: (_, rowData) => ( |
| | | <Space size="middle"> |
| | | <a onClick={() => {}} style={{ cursor: 'pointer', margin: ' 0 5px' }}> |
| | | <a onClick={() => { |
| | | formRef.setFieldsValue(rowData); |
| | | setDialogTitle('编辑职位'); |
| | | setCurrentEditJob(rowData); |
| | | setAddDialogVisible(true); |
| | | }} style={{ cursor: 'pointer', margin: ' 0 5px' }}> |
| | | 编辑 |
| | | </a> |
| | | <a onClick={() => { |
| | | handleDelete(rowData.id) |
| | | }} style={{ cursor: 'pointer', margin: ' 0 5px', color: 'red' }}> 删除</a> |
| | | </Space> |
| | | ), |
| | | }, |
| | | ]; |
| | | const handleOk = () => {}; |
| | | |
| | | useEffect(() => { |
| | | if (!addDialogVisible) { |
| | | formRef.resetFields(); |
| | | } |
| | | }, [addDialogVisible]) |
| | | |
| | | |
| | | //删除部门 |
| | | const handleDelete = (id: number) => { |
| | | modal.confirm({ |
| | | title: '删除', |
| | | icon: <ExclamationCircleOutlined />, |
| | | content: '是否删除该职位?', |
| | | okText: '确认', |
| | | cancelText: '取消', |
| | | onOk: () => { |
| | | postOaJobDelJob({ ids: [id] }).then((res) => { |
| | | message.success('删除成功'); |
| | | actionRef.current?.reload(); |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | |
| | | const handleOk = () => { |
| | | formRef.validateFields().then((values) => { |
| | | const body = { |
| | | ...values, |
| | | orgId: initialState?.appInfo?.org?.id, |
| | | }; |
| | | console.log(body, 'body'); |
| | | body.parentJobId = null; |
| | | body.type = 'Normal'; |
| | | |
| | | if (dialogTitle === '新建职位') { |
| | | postOaJobNewJob(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | actionRef.current?.reload(); |
| | | setAddDialogVisible(false); |
| | | message.success('添加成功'); |
| | | }) |
| | | } else { |
| | | body.id = currentEditJob.id |
| | | postOaJobUpdateJob(body).then((res) => { |
| | | actionRef.current?.reload(); |
| | | setAddDialogVisible(false); |
| | | message.success('编辑成功'); |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }; |
| | | const handleCancel = () => { |
| | | setAddDialogVisible(false); |
| | | }; |
| | |
| | | size: params.pageSize, |
| | | filterList: [], |
| | | searchList: [], |
| | | orgId: initialState?.appInfo?.org?.id, |
| | | }; |
| | | return postOaContractGetContractList(body).then((res) => { |
| | | return postOaJobGetJobList(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | return { |
| | | data: res.datas, |
| | | total: res.data.totalSize, |
| | | total: res.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | |
| | | icon={<PlusOutlined />} |
| | | onClick={() => { |
| | | setAddDialogVisible(true); |
| | | setDialogTitle('新建合同'); |
| | | setDialogTitle('新建职位'); |
| | | }} |
| | | type="primary" |
| | | > |
| | |
| | | <Form form={formRef} layout="vertical" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="职位编号" name="name"> |
| | | <Form.Item label="职位编号" name="code" rules={[{ required: true, message: '请输入职位编号' }]}> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="职位名称" name="name"> |
| | | <Form.Item label="职位名称" name="name" rules={[{ required: true, message: '请输入职位名称' }]}> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="上级职位" name="name"> |
| | | <Form.Item label="上级职位" name="parentJobId"> |
| | | <Select |
| | | defaultValue="lucy" |
| | | options={[ |
| | |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="职位下限" name="name"> |
| | | <Input /> |
| | | <Input disabled /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="职位上限" name="name"> |
| | | <Input /> |
| | | <Input disabled /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="工资详情" name="name"> |
| | | <Form.Item label="工资详情" name="baseSalary"> |
| | | {/* <TextArea rows={4} /> */} |
| | | <Input /> |
| | | </Form.Item> |
| | |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="基本工资参考" name="name"> |
| | | <Form.Item label="基本工资参考" name="baseSalary" rules={[{ required: true, message: '请输入基本工资参考' }]}> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="职位分类" name="name"> |
| | | <Form.Item label="职位分类" name="type" rules={[{ required: true, message: '请选择职位分类' }]}> |
| | | <Select |
| | | defaultValue="lucy" |
| | | options={[ |
| | |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="备注" name="name"> |
| | | <Form.Item label="备注" name="remarks"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default DepartmentalInformationConfiguration; |
| | | export default JobInformationConfiguration; |
| | |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Col, DatePicker, Form, Input, Modal, Row, Select, Tabs } from 'antd'; |
| | | import TextArea from 'antd/es/input/TextArea'; |
| | | import React, { useRef, useState } from 'react'; |
| | | import React, { useEffect, useRef, useState } from 'react'; |
| | | import styles from './index.less'; |
| | | import { useModel } from '@umijs/max'; |
| | | |
| | | const OrganizationalStructureConfiguration: React.FC = () => { |
| | | const [dialogTitle, setDialogTitle] = useState(''); |
| | | const [addDialogVisible, setAddDialogVisible] = useState(false); |
| | | |
| | | const actionRef = useRef(null); |
| | | const { initialState, setInitialState } = useModel('@@initialState'); |
| | | const [formRef] = Form.useForm(); |
| | | useEffect(() => { |
| | | console.log(initialState); |
| | | formRef.setFieldsValue({ |
| | | name: initialState?.appInfo.org?.name, |
| | | }) |
| | | }, []) |
| | | |
| | | const columns = [ |
| | | { |
| | | title: '合同编号', |
| | | key: 'code', |
| | | dataIndex: 'code', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '合同名称', |
| | | key: 'name', |
| | | dataIndex: 'name', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '合同类型', |
| | | key: 'type', |
| | | dataIndex: 'type', |
| | | align: 'center', |
| | | valueEnum: { |
| | | all: { text: '全部' }, |
| | | 付小小: { text: '付小小' }, |
| | | 曲丽丽: { text: '曲丽丽' }, |
| | | 林东东: { text: '林东东' }, |
| | | 陈帅帅: { text: '陈帅帅' }, |
| | | 兼某某: { text: '兼某某' }, |
| | | }, |
| | | }, |
| | | { |
| | | title: '签订日期', |
| | | key: 'date1', |
| | | dataIndex: 'date1', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '生效日期', |
| | | key: 'date2', |
| | | dataIndex: 'date2', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '终止日期', |
| | | key: 'date3', |
| | | dataIndex: 'date3', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '状态', |
| | | key: 'status', |
| | | dataIndex: 'status', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | | ]; |
| | | const handleOk = () => {}; |
| | | const handleCancel = () => { |
| | | setAddDialogVisible(false); |
| | | }; |
| | | const getTableData = (params: { current: number; pageSize: number }) => { |
| | | console.log(params, 'params'); |
| | | const body = { |
| | | start: (params.current - 1) * params.pageSize, |
| | | size: params.pageSize, |
| | | filterList: [], |
| | | searchList: [], |
| | | }; |
| | | return postOaContractGetContractList(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | return { |
| | | data: res.datas, |
| | | total: res.data.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | | return ( |
| | | <PageContainer> |
| | | <Tabs style={{ minHeight: 500 }}> |
| | | <Tabs.TabPane key="1" tab={`我的合同`}> |
| | | <ProTable |
| | | headerTitle="合同管理" |
| | | actionRef={actionRef} |
| | | rowKey="id" |
| | | columns={columns} |
| | | request={getTableData} |
| | | toolBarRender={() => [ |
| | | <Button |
| | | key="button" |
| | | icon={<PlusOutlined />} |
| | | onClick={() => { |
| | | setAddDialogVisible(true); |
| | | setDialogTitle('新建合同'); |
| | | }} |
| | | type="primary" |
| | | <div className={styles.addDialog}> |
| | | <Form form={formRef} layout="vertical" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="组织机构名称" |
| | | name="name" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | > |
| | | 新建 |
| | | </Button>, |
| | | ]} |
| | | /> |
| | | </Tabs.TabPane> |
| | | <Tabs.TabPane key="2" tab={`我的合同`}> |
| | | 我的合同 |
| | | </Tabs.TabPane> |
| | | <Tabs.TabPane key="3" tab={`快到期合同`}> |
| | | 快到期合同 |
| | | </Tabs.TabPane> |
| | | </Tabs> |
| | | |
| | | <Modal |
| | | title={dialogTitle} |
| | | width={900} |
| | | onOk={handleOk} |
| | | open={addDialogVisible} |
| | | // confirmLoading={confirmLoading} |
| | | onCancel={handleCancel} |
| | | > |
| | | <div className={styles.addDialog}> |
| | | <Form form={formRef} layout="vertical" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="员工姓名" |
| | | name="name" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | > |
| | | <Input suffix={<UserOutlined className="site-form-item-icon" />} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="所属部门" |
| | | name="name" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | > |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="合同类型" |
| | | name="name" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | > |
| | | <Select |
| | | defaultValue="lucy" |
| | | options={[ |
| | | { |
| | | value: 'jack', |
| | | label: 'Jack', |
| | | }, |
| | | { |
| | | value: 'lucy', |
| | | label: 'Lucy', |
| | | }, |
| | | { |
| | | value: 'disabled', |
| | | disabled: true, |
| | | label: 'Disabled', |
| | | }, |
| | | { |
| | | value: 'Yiminghe', |
| | | label: 'yiminghe', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="签订日期" name="name"> |
| | | <DatePicker style={{ width: '100%' }} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="生效日期" name="name"> |
| | | <DatePicker style={{ width: '100%' }} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="正常终止日期" name="name"> |
| | | <DatePicker style={{ width: '100%' }} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="关联文件" name="name"> |
| | | <DatePicker style={{ width: '100%' }} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="备注" name="name"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | </div> |
| | | </Modal> |
| | | <Input suffix={<UserOutlined className="site-form-item-icon" />} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="公共部门性质" |
| | | name="name" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | > |
| | | <Select |
| | | defaultValue="lucy" |
| | | options={[ |
| | | { |
| | | value: 'jack', |
| | | label: 'Jack', |
| | | }, |
| | | { |
| | | value: 'lucy', |
| | | label: 'Lucy', |
| | | }, |
| | | { |
| | | value: 'disabled', |
| | | disabled: true, |
| | | label: 'Disabled', |
| | | }, |
| | | { |
| | | value: 'Yiminghe', |
| | | label: 'yiminghe', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | label="所在城市" |
| | | name="city" |
| | | rules={[{ required: true, message: '请输入机构名称' }]} |
| | | > |
| | | <Select |
| | | defaultValue="lucy" |
| | | options={[ |
| | | { |
| | | value: 'jack', |
| | | label: 'Jack', |
| | | }, |
| | | { |
| | | value: 'lucy', |
| | | label: 'Lucy', |
| | | }, |
| | | { |
| | | value: 'disabled', |
| | | disabled: true, |
| | | label: 'Disabled', |
| | | }, |
| | | { |
| | | value: 'Yiminghe', |
| | | label: 'yiminghe', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="组织规模" name="name"> |
| | | <Select |
| | | defaultValue="lucy" |
| | | options={[ |
| | | { |
| | | value: 'jack', |
| | | label: 'Jack', |
| | | }, |
| | | { |
| | | value: 'lucy', |
| | | label: 'Lucy', |
| | | }, |
| | | { |
| | | value: 'disabled', |
| | | disabled: true, |
| | | label: 'Disabled', |
| | | }, |
| | | { |
| | | value: 'Yiminghe', |
| | | label: 'yiminghe', |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="负责人" name="manager"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="联系电话" name="phone"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="联系地址" name="address"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="电子邮箱" name="name"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="网址" name="webSite"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="上级机关" name="manageOrg"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="组织职责" name="duty"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="组织文化" name="culture"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="组织核心价值观" name="name"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | |
| | | </div> |
| | | </PageContainer> |
| | | ); |
| | | }; |
New file |
| | |
| | | .container { |
| | | display: flex; |
| | | height: calc(100vh - 340px); |
| | | |
| | | .leftTree { |
| | | width: 300px; |
| | | height: 100%; |
| | | border-right: 1px solid #e8e8e8; |
| | | |
| | | .leftTreeTitle { |
| | | height: 50px; |
| | | line-height: 50px; |
| | | padding-left: 20px; |
| | | border-bottom: 1px solid #e8e8e8; |
| | | } |
| | | } |
| | | |
| | | .rightTable { |
| | | width: calc(100% - 400px); |
| | | margin-left: 100px; |
| | | overflow-y: scroll; |
| | | } |
| | | } |
New file |
| | |
| | | import { PageContainer } from "@ant-design/pro-components" |
| | | import styles from './index.less' |
| | | import { Col, DatePicker, Divider, Form, Input, Radio, Row, Select, Tree } from "antd" |
| | | import { useEffect, useState } from "react"; |
| | | import { DownOutlined } from "@ant-design/icons"; |
| | | import { postOaDepartmentGetDepartmentList } from "@/services/WebApi/oaDepartment"; |
| | | import { postOaStaffGetStaffList } from "@/services/WebApi/oaStaff"; |
| | | import TextArea from "antd/es/input/TextArea"; |
| | | |
| | | |
| | | const departmentalEmployeeInformation: React.FC = () => { |
| | | const [expandedKeys, setExpandedKeys] = useState([]); |
| | | const [treeData, setTreeData] = useState([]); |
| | | const [deplist, setDepList] = useState([]); |
| | | const [birthday, setBirthday] = useState("") |
| | | const [jobList, setJobList] = useState([]); |
| | | const [oaJobLevelList, setOaJobLevelList] = useState([]); |
| | | const [formRef] = Form.useForm(); |
| | | const [jobPositionList, setJobPositionList] = useState([]); |
| | | const [currentTreeNode, setCurrentTreeNode] = useState({}); |
| | | useEffect(() => { |
| | | getDepList(); |
| | | }, []) |
| | | useEffect(() => { |
| | | console.log(currentTreeNode, "currentTreeNode"); |
| | | if (currentTreeNode && currentTreeNode?.roleId) { |
| | | formRef.setFieldsValue(currentTreeNode) |
| | | } |
| | | }, [currentTreeNode]) |
| | | |
| | | const findDepFun = (list, staff) => { |
| | | for (let i = 0; i < list.length; i++) { |
| | | const item = list[i]; |
| | | if (item.id === staff.department?.id) { |
| | | item.children.push(staff); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | const getStaffList = async (roleList) => { |
| | | const res = await postOaStaffGetStaffList({ start: 0, size: 100, orgId: 5 }); |
| | | const staffList = res.datas.map((item: any) => { |
| | | return { |
| | | key: item.id + 'staff', |
| | | title: item.name, |
| | | roleId: item.role?.id, |
| | | ...item, |
| | | }; |
| | | }); |
| | | for (let i = 0; i < staffList.length; i++) { |
| | | const item = staffList[i]; |
| | | findDepFun(roleList, item); |
| | | } |
| | | console.log(staffList, "staffList"); |
| | | console.log(roleList, "roleList"); |
| | | return roleList; |
| | | } |
| | | const getDepList = async () => { |
| | | const res = await postOaDepartmentGetDepartmentList({ start: 0, size: 100, orgId: 5 }); |
| | | const treeDep = res.datas.map((item: any) => { |
| | | return { |
| | | key: item.id, |
| | | title: item.name, |
| | | children: [], |
| | | ...item, |
| | | }; |
| | | }); |
| | | for (let i = 0; i < treeDep.length; i++) { |
| | | const item = treeDep[i]; |
| | | if (item.parent) { |
| | | const parent = treeDep.find((f) => f.id === item.parent?.id); |
| | | parent.children.push(item); |
| | | } |
| | | } |
| | | const haveStaffList = await getStaffList(treeDep); |
| | | console.log(haveStaffList, "haveStaffList"); |
| | | const treeData = haveStaffList.filter((item) => !item.parent); |
| | | console.log(treeData, "treeData"); |
| | | const keyList = treeDep.map((item) => item.key); |
| | | setTreeData(treeData); |
| | | setExpandedKeys(keyList); |
| | | setDepList(treeDep); |
| | | } |
| | | return ( |
| | | <PageContainer> |
| | | <div className={styles.container} style={{ padding: 24 }}> |
| | | <div className={styles.leftTree}> |
| | | <Tree |
| | | style={{ width: '300px' }} |
| | | defaultExpandAll |
| | | expandedKeys={expandedKeys} |
| | | showLine |
| | | switcherIcon={<DownOutlined />} |
| | | treeData={treeData} |
| | | onSelect={(selectedKeys, info) => { |
| | | console.log(selectedKeys, info); |
| | | setCurrentTreeNode(info.node); |
| | | }} |
| | | /> |
| | | </div> |
| | | <div className={styles.rightTable}> |
| | | { |
| | | currentTreeNode && |
| | | <Form form={formRef} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }} disabled> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="员工姓名" name="name" rules={[{ required: true, message: '请输入员工姓名' }]}> |
| | | <span>{currentTreeNode?.name}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="部门名称" name="departmentId"> |
| | | <span>{currentTreeNode?.department?.name}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="身份证号" name="idNum" rules={[{ required: true, message: '请输入员工姓名' }]}> |
| | | <span>{currentTreeNode?.idNum}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="性别" name="sex"> |
| | | <span>{currentTreeNode?.sex == 1 ? '男' : '女'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="籍贯" name="nativePlace"> |
| | | <span>{currentTreeNode?.nativePlace}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="雇佣类型" name="employmentType"> |
| | | <span>{currentTreeNode?.employmentType}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="出生年月" name="birthday"> |
| | | <span>{currentTreeNode?.birthday}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="民族" name="race"> |
| | | <span>{currentTreeNode?.race}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="婚姻状况" name="marriageStatus"> |
| | | <span>{currentTreeNode?.marriageStatus}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="政治面貌" name="politicalStatus"> |
| | | <span>{currentTreeNode?.politicalStatus}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="毕业院校" name="graduateSchool"> |
| | | <span>{currentTreeNode?.graduateSchool}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="专业" name="major"> |
| | | <span>{currentTreeNode?.major}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="职称" name="title"> |
| | | <span>{currentTreeNode?.title}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="工种" name="jobType"> |
| | | <span>{currentTreeNode?.jobType}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="文化程度" name="educationLevel"> |
| | | <span>{currentTreeNode?.educationLevel}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="手机" name="mobilePhone"> |
| | | <span>{currentTreeNode?.mobilePhone}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="联系地址" name="contactAddress"> |
| | | <span>{currentTreeNode?.contactAddress}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="电子邮件" name="eMail"> |
| | | <span>{currentTreeNode?.eMail}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="家庭住址" name="homeAddress"> |
| | | <span>{currentTreeNode?.homeAddress}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="联系电话" name="phone"> |
| | | <span>{currentTreeNode?.phone}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="备注" name="remarks"> |
| | | <span>{currentTreeNode?.remarks}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Divider orientation="left">岗位信息</Divider> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="工号" name="jobNumber"> |
| | | <span>{currentTreeNode?.jobNumber}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="所在城市" name="city"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.city}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="岗位" name="station"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.jobPosition?.name}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="是否在职" name="isOnJob"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.isOnJob ? '是' : '否'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="入职时间" name="joinDate"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.joinDate}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="离职时间" name="offJobDate"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.offJobDate}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="是否退休" name="isRetire"> |
| | | <span>{currentTreeNode?.isRetire ? '是' : '否'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="参加工作时间" name="beginWorkDate"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.beginWorkDate}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="带薪休假天数" name="payDayOffs"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.payDayOffs}天</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="职位" name="jobId"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.job.name}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="职级" name="jobPositionId"> |
| | | <span></span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="基本工资" name="name333"> |
| | | <span></span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="职级工资" name="positionSalary"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.positionSalary}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="绩效系数" name="performanceRates"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.performanceRates}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="绩效工资" name="performanceSalary"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.performanceSalary || '-'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="社保基数" name="socialRates"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.socialRates || '-'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="公积金基数" name="publicRates"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.publicRates || '-'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="绩效等级" name="performanceLevel"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.performanceLevel || '-'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="晋升潜力" name="promoteLevel"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.promoteLevel || '-'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="社保账户" name="socialAccount"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.socialAccount || '-'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | <Col span={12}> |
| | | <Form.Item label="银行账号" name="bankAccount"> |
| | | <span>{currentTreeNode?.jobPositionInfo?.bankAccount || '-'}</span> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | } |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </PageContainer> |
| | | ) |
| | | } |
| | | |
| | | |
| | | export default departmentalEmployeeInformation |
| | |
| | | import { postOaContractGetContractList } from '@/services/WebApi/contract'; |
| | | import { PlusOutlined } from '@ant-design/icons'; |
| | | import { ExclamationCircleOutlined, PlusOutlined } from '@ant-design/icons'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Col, Form, Input, Modal, Row, Select, Space } from 'antd'; |
| | | import { Button, Col, Form, Input, message, Modal, Row, Select, Space } from 'antd'; |
| | | import TextArea from 'antd/es/input/TextArea'; |
| | | import React, { useRef, useState } from 'react'; |
| | | import React, { useEffect, useRef, useState } from 'react'; |
| | | import styles from './index.less'; |
| | | import { useModel } from '@umijs/max'; |
| | | import { postOaJobLevelDelJobLevel, postOaJobLevelGetJobLevelList, postOaJobLevelNewJobLevel, postOaJobLevelUpdateJobLevel } from '@/services/WebApi/oaJobLevel'; |
| | | import { postOaJobGetJobList } from '@/services/WebApi/oaJob'; |
| | | import modal from 'antd/es/modal'; |
| | | import { postOaDepartmentDelDepartment } from '@/services/WebApi/oaDepartment'; |
| | | |
| | | const DepartmentalInformationConfiguration: React.FC = () => { |
| | | const jobLevelInformationConfiguration: React.FC = () => { |
| | | const { initialState, setInitialState } = useModel('@@initialState'); |
| | | |
| | | const [dialogTitle, setDialogTitle] = useState(''); |
| | | const [addDialogVisible, setAddDialogVisible] = useState(false); |
| | | |
| | | const [currentEditJob, setCurrentEditJob] = useState(null); |
| | | const [jobSelectOptions, setJobSelectOptions] = useState([]); |
| | | const actionRef = useRef(null); |
| | | const [formRef] = Form.useForm(); |
| | | |
| | |
| | | }, |
| | | { |
| | | title: '工资额', |
| | | key: 'name', |
| | | dataIndex: 'name', |
| | | key: 'salary', |
| | | dataIndex: 'salary', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | |
| | | search: false, |
| | | render: (_, rowData) => ( |
| | | <Space size="middle"> |
| | | <a onClick={() => {}} style={{ cursor: 'pointer', margin: ' 0 5px' }}> |
| | | <a onClick={() => { |
| | | formRef.setFieldsValue(rowData); |
| | | setDialogTitle('编辑职级'); |
| | | setCurrentEditJob(rowData); |
| | | setAddDialogVisible(true); |
| | | }} style={{ cursor: 'pointer', margin: ' 0 5px' }}> |
| | | 编辑 |
| | | </a> |
| | | <a onClick={() => { |
| | | handleDelete(rowData.id) |
| | | }} style={{ cursor: 'pointer', margin: ' 0 5px', color: 'red' }}> 删除</a> |
| | | </Space> |
| | | ), |
| | | }, |
| | | ]; |
| | | const handleOk = () => {}; |
| | | |
| | | useEffect(() => { |
| | | getJobSelectOptions(); |
| | | }, []) |
| | | useEffect(() => { |
| | | if (!addDialogVisible) { |
| | | formRef.resetFields(); |
| | | } |
| | | }, [addDialogVisible]) |
| | | |
| | | |
| | | const handleDelete = (id) => { |
| | | modal.confirm({ |
| | | title: '删除', |
| | | icon: <ExclamationCircleOutlined />, |
| | | content: '是否删除该职级?', |
| | | okText: '确认', |
| | | cancelText: '取消', |
| | | onOk: () => { |
| | | postOaJobLevelDelJobLevel({ ids: [id] }).then((res) => { |
| | | message.success('删除成功'); |
| | | actionRef.current?.reload(); |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const getJobSelectOptions = () => { |
| | | const body = { |
| | | start: 0, |
| | | size: 99, |
| | | filterList: [], |
| | | searchList: [], |
| | | orgId: initialState?.appInfo?.org?.id, |
| | | }; |
| | | postOaJobGetJobList(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | const options = res.datas.map((item) => { |
| | | return { |
| | | ...item, |
| | | label: item.name, |
| | | value: item.id, |
| | | } |
| | | }) |
| | | console.log(options, 'res'); |
| | | |
| | | setJobSelectOptions(options) |
| | | }); |
| | | } |
| | | |
| | | |
| | | const handleOk = () => { |
| | | formRef.validateFields().then((values) => { |
| | | const body = { |
| | | ...values, |
| | | orgId: initialState?.appInfo?.org?.id, |
| | | }; |
| | | |
| | | if (dialogTitle === '新建职级') { |
| | | postOaJobLevelNewJobLevel(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | actionRef.current?.reload(); |
| | | setAddDialogVisible(false); |
| | | message.success('添加成功'); |
| | | }) |
| | | } else { |
| | | body.id = currentEditJob.id |
| | | postOaJobLevelUpdateJobLevel(body).then((res) => { |
| | | actionRef.current?.reload(); |
| | | setAddDialogVisible(false); |
| | | message.success('编辑成功'); |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }; |
| | | const handleCancel = () => { |
| | | setAddDialogVisible(false); |
| | | }; |
| | |
| | | size: params.pageSize, |
| | | filterList: [], |
| | | searchList: [], |
| | | orgId: initialState?.appInfo?.org?.id, |
| | | }; |
| | | return postOaContractGetContractList(body).then((res) => { |
| | | return postOaJobLevelGetJobLevelList(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | return { |
| | | data: res.datas, |
| | | total: res.data.totalSize, |
| | | total: res.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | |
| | | icon={<PlusOutlined />} |
| | | onClick={() => { |
| | | setAddDialogVisible(true); |
| | | setDialogTitle('新建合同'); |
| | | setDialogTitle('新建职级'); |
| | | }} |
| | | type="primary" |
| | | > |
| | |
| | | <Form form={formRef} layout="vertical" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}> |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item label="职级编号" name="name"> |
| | | <Form.Item label="职级编号" name="code"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="工资额" name="name"> |
| | | <Form.Item label="工资额" name="salary"> |
| | | <Input /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="所属单位" name="name"> |
| | | <Form.Item label="所属职位" name="jobId"> |
| | | <Select |
| | | defaultValue="lucy" |
| | | options={[ |
| | | { |
| | | value: 'jack', |
| | | label: 'Jack', |
| | | }, |
| | | { |
| | | value: 'lucy', |
| | | label: 'Lucy', |
| | | }, |
| | | { |
| | | value: 'disabled', |
| | | disabled: true, |
| | | label: 'Disabled', |
| | | }, |
| | | { |
| | | value: 'Yiminghe', |
| | | label: 'yiminghe', |
| | | }, |
| | | ]} |
| | | options={jobSelectOptions} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | |
| | | </Row> |
| | | |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="备注" name="name"> |
| | | <Form.Item label="备注" name="remarks"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default DepartmentalInformationConfiguration; |
| | | export default jobLevelInformationConfiguration; |
| | |
| | | import { postOaContractGetContractList } from '@/services/WebApi/contract'; |
| | | import { PlusOutlined } from '@ant-design/icons'; |
| | | import { ExclamationCircleOutlined, PlusOutlined } from '@ant-design/icons'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Col, Form, Input, Modal, Row, Select, Space } from 'antd'; |
| | | import { Button, Col, Form, Input, message, Modal, Row, Select, Space } from 'antd'; |
| | | import TextArea from 'antd/es/input/TextArea'; |
| | | import React, { useRef, useState } from 'react'; |
| | | import React, { useEffect, useRef, useState } from 'react'; |
| | | import styles from './index.less'; |
| | | import { postOaJobPositionDelJobPosition, postOaJobPositionGetJobPositionList, postOaJobPositionNewJobPosition, postOaJobPositionUpdateJobPosition } from '@/services/WebApi/oaJobPosition'; |
| | | import { useModel } from '@umijs/max'; |
| | | import modal from 'antd/es/modal'; |
| | | |
| | | const DepartmentalInformationConfiguration: React.FC = () => { |
| | | const postInformationConfiguration: React.FC = () => { |
| | | const { initialState, setInitialState } = useModel('@@initialState'); |
| | | |
| | | const [dialogTitle, setDialogTitle] = useState(''); |
| | | const [addDialogVisible, setAddDialogVisible] = useState(false); |
| | | const [currentEditJob, setCurrentEditJob] = useState(null); |
| | | |
| | | const actionRef = useRef(null); |
| | | const [formRef] = Form.useForm(); |
| | | |
| | | |
| | | useEffect(() => { |
| | | if (!addDialogVisible) { |
| | | formRef.resetFields(); |
| | | } |
| | | }, [addDialogVisible]) |
| | | |
| | | const columns = [ |
| | | { |
| | | title: '岗位名称', |
| | | key: 'code', |
| | | dataIndex: 'code', |
| | | key: 'name', |
| | | dataIndex: 'name', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | | { |
| | | title: '岗位职责', |
| | | key: 'name', |
| | | dataIndex: 'name', |
| | | key: 'duty', |
| | | dataIndex: 'duty', |
| | | align: 'center', |
| | | search: false, |
| | | }, |
| | |
| | | search: false, |
| | | render: (_, rowData) => ( |
| | | <Space size="middle"> |
| | | <a onClick={() => {}} style={{ cursor: 'pointer', margin: ' 0 5px' }}> |
| | | <a onClick={() => { |
| | | formRef.setFieldsValue(rowData); |
| | | setDialogTitle('编辑岗位'); |
| | | setCurrentEditJob(rowData); |
| | | setAddDialogVisible(true); |
| | | }} style={{ cursor: 'pointer', margin: ' 0 5px' }}> |
| | | 编辑 |
| | | </a> |
| | | <a onClick={() => { |
| | | handleDelete(rowData.id) |
| | | }} style={{ cursor: 'pointer', margin: ' 0 5px', color: 'red' }}> 删除</a> |
| | | </Space> |
| | | ), |
| | | }, |
| | | ]; |
| | | const handleOk = () => {}; |
| | | |
| | | |
| | | const handleDelete = (id) => { |
| | | modal.confirm({ |
| | | title: '删除', |
| | | icon: <ExclamationCircleOutlined />, |
| | | content: '是否删除该岗位?', |
| | | okText: '确认', |
| | | cancelText: '取消', |
| | | onOk: () => { |
| | | postOaJobPositionDelJobPosition({ ids: [id] }).then((res) => { |
| | | message.success('删除成功'); |
| | | actionRef.current?.reload(); |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const handleOk = () => { |
| | | formRef.validateFields().then((values) => { |
| | | const body = { |
| | | ...values, |
| | | orgId: initialState?.appInfo?.org?.id, |
| | | }; |
| | | |
| | | if (dialogTitle === '新建岗位') { |
| | | postOaJobPositionNewJobPosition(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | actionRef.current?.reload(); |
| | | setAddDialogVisible(false); |
| | | message.success('添加成功'); |
| | | }) |
| | | } else { |
| | | body.id = currentEditJob.id |
| | | postOaJobPositionUpdateJobPosition(body).then((res) => { |
| | | actionRef.current?.reload(); |
| | | setAddDialogVisible(false); |
| | | message.success('编辑成功'); |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | |
| | | }; |
| | | const handleCancel = () => { |
| | | setAddDialogVisible(false); |
| | | }; |
| | |
| | | size: params.pageSize, |
| | | filterList: [], |
| | | searchList: [], |
| | | orgId: initialState?.appInfo?.org?.id, |
| | | }; |
| | | return postOaContractGetContractList(body).then((res) => { |
| | | return postOaJobPositionGetJobPositionList(body).then((res) => { |
| | | console.log(res, 'res'); |
| | | return { |
| | | data: res.datas, |
| | | total: res.data.totalSize, |
| | | total: res.totalSize, |
| | | }; |
| | | }); |
| | | }; |
| | |
| | | icon={<PlusOutlined />} |
| | | onClick={() => { |
| | | setAddDialogVisible(true); |
| | | setDialogTitle('新建合同'); |
| | | setDialogTitle('新建岗位'); |
| | | }} |
| | | type="primary" |
| | | > |
| | |
| | | |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="岗位职责" name="name"> |
| | | <Form.Item label="岗位职责" name="duty"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label="工作内容" name="name"> |
| | | <Form.Item label="工作内容" name="description"> |
| | | <TextArea rows={4} /> |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default DepartmentalInformationConfiguration; |
| | | export default postInformationConfiguration; |
| | |
| | | import * as retire from "./retire"; |
| | | import * as retiring from "./retiring"; |
| | | import * as strategyPlan from "./strategyPlan"; |
| | | import * as trainAssess from "./trainAssess"; |
| | | import * as trainCourse from "./trainCourse"; |
| | | import * as trainFee from "./trainFee"; |
| | | import * as trainOrg from "./trainOrg"; |
| | | import * as trainPlan from "./trainPlan"; |
| | | import * as trainRequirement from "./trainRequirement"; |
| | | import * as trainRules from "./trainRules"; |
| | | import * as trainSchedule from "./trainSchedule"; |
| | | import * as transfer from "./transfer"; |
| | | import * as transferIn from "./transferIn"; |
| | | import * as transferOut from "./transferOut"; |
| | |
| | | retire, |
| | | retiring, |
| | | strategyPlan, |
| | | trainAssess, |
| | | trainCourse, |
| | | trainFee, |
| | | trainOrg, |
| | | trainPlan, |
| | | trainRequirement, |
| | | trainRules, |
| | | trainSchedule, |
| | | transfer, |
| | | transferIn, |
| | | transferOut, |
New file |
| | |
| | | // @ts-ignore |
| | | /* eslint-disable */ |
| | | import { request } from "umi"; |
| | | |
| | | /** 新建培训评估 POST /oa/trainAssess/NewTrainAssess */ |
| | | export async function postOaTrainAssessNewTrainAssess( |
| | | body: API.NewTrainAssessRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainAssess/NewTrainAssess", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 更新培训评估 POST /oa/trainAssess/UpdateTrainAssess */ |
| | | export async function postOaTrainAssessUpdateTrainAssess( |
| | | body: API.UpdateTrainAssessRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainAssess/UpdateTrainAssess", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
New file |
| | |
| | | // @ts-ignore |
| | | /* eslint-disable */ |
| | | import { request } from "umi"; |
| | | |
| | | /** 删除培训课程 POST /oa/trainCourse/DelTrainCourse */ |
| | | export async function postOaTrainCourseDelTrainCourse( |
| | | body: API.DelRequestBase, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainCourse/DelTrainCourse", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取培训课程列表 POST /oa/trainCourse/GetTrainCourseList */ |
| | | export async function postOaTrainCourseGetTrainCourseList( |
| | | body: API.GetTrainCourseListRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainCourse/GetTrainCourseList", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 审批培训课程 POST /oa/trainCourse/NewApprove */ |
| | | export async function postOaTrainCourseNewApprove( |
| | | body: API.NewApproveRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainCourse/NewApprove", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 新建培训课程 POST /oa/trainCourse/NewTrainCourse */ |
| | | export async function postOaTrainCourseNewTrainCourse( |
| | | body: API.NewTrainCourseRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainCourse/NewTrainCourse", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 更新培训课程 POST /oa/trainCourse/UpdateTrainCourse */ |
| | | export async function postOaTrainCourseUpdateTrainCourse( |
| | | body: API.UpdateTrainCourseRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainCourse/UpdateTrainCourse", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
New file |
| | |
| | | // @ts-ignore |
| | | /* eslint-disable */ |
| | | import { request } from "umi"; |
| | | |
| | | /** 获取培训费用列表 POST /oa/trainFee/GetTrainFeeList */ |
| | | export async function postOaTrainFeeGetTrainFeeList( |
| | | body: API.GetTrainFeeListRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainFee/GetTrainFeeList", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 新建培训费用 POST /oa/trainFee/NewTrainFee */ |
| | | export async function postOaTrainFeeNewTrainFee( |
| | | body: API.NewTrainFeeRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainFee/NewTrainFee", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 更新培训费用 POST /oa/trainFee/UpdateTrainFee */ |
| | | export async function postOaTrainFeeUpdateTrainFee( |
| | | body: API.UpdateTrainFeeRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainFee/UpdateTrainFee", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
New file |
| | |
| | | // @ts-ignore |
| | | /* eslint-disable */ |
| | | import { request } from "umi"; |
| | | |
| | | /** 删除培训机构 POST /oa/trainOrg/DelTrainOrg */ |
| | | export async function postOaTrainOrgDelTrainOrg( |
| | | body: API.DelRequestBase, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainOrg/DelTrainOrg", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取培训机构列表 POST /oa/trainOrg/GetTrainOrgList */ |
| | | export async function postOaTrainOrgGetTrainOrgList( |
| | | body: API.GetTrainOrgListRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainOrg/GetTrainOrgList", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 新建培训机构 POST /oa/trainOrg/NewTrainOrg */ |
| | | export async function postOaTrainOrgNewTrainOrg( |
| | | body: API.NewTrainOrgRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainOrg/NewTrainOrg", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 更新培训机构 POST /oa/trainOrg/UpdateTrainOrg */ |
| | | export async function postOaTrainOrgUpdateTrainOrg( |
| | | body: API.UpdateTrainOrgRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainOrg/UpdateTrainOrg", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
New file |
| | |
| | | // @ts-ignore |
| | | /* eslint-disable */ |
| | | import { request } from "umi"; |
| | | |
| | | /** 删除培训计划 POST /oa/trainPlan/DelTrainPlan */ |
| | | export async function postOaTrainPlanDelTrainPlan( |
| | | body: API.DelRequestBase, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainPlan/DelTrainPlan", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取培训计划列表 POST /oa/trainPlan/GetTrainPlanList */ |
| | | export async function postOaTrainPlanGetTrainPlanList( |
| | | body: API.GetTrainPlanListRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainPlan/GetTrainPlanList", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 审批培训计划 POST /oa/trainPlan/NewApprove */ |
| | | export async function postOaTrainPlanNewApprove( |
| | | body: API.NewApproveRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainPlan/NewApprove", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 新建培训计划 POST /oa/trainPlan/NewTrainPlan */ |
| | | export async function postOaTrainPlanNewTrainPlan( |
| | | body: API.NewTrainPlanRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainPlan/NewTrainPlan", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 更新培训计划 POST /oa/trainPlan/UpdateTrainPlan */ |
| | | export async function postOaTrainPlanUpdateTrainPlan( |
| | | body: API.UpdateTrainPlanRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainPlan/UpdateTrainPlan", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
New file |
| | |
| | | // @ts-ignore |
| | | /* eslint-disable */ |
| | | import { request } from "umi"; |
| | | |
| | | /** 删除培训需求 POST /oa/trainPlan/DelTrainRequirement */ |
| | | export async function postOaTrainPlanDelTrainRequirement( |
| | | body: API.DelRequestBase, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainPlan/DelTrainRequirement", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取培训需求列表 POST /oa/trainPlan/GetTrainRequirementList */ |
| | | export async function postOaTrainPlanGetTrainRequirementList( |
| | | body: API.GetTrainRequirementListRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainPlan/GetTrainRequirementList", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 新建培训需求 POST /oa/trainPlan/NewTrainRequirement */ |
| | | export async function postOaTrainPlanNewTrainRequirement( |
| | | body: API.NewTrainRequirementRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainPlan/NewTrainRequirement", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 更新培训需求 POST /oa/trainPlan/UpdateTrainRequirement */ |
| | | export async function postOaTrainPlanUpdateTrainRequirement( |
| | | body: API.UpdateTrainRequirementRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainPlan/UpdateTrainRequirement", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
New file |
| | |
| | | // @ts-ignore |
| | | /* eslint-disable */ |
| | | import { request } from "umi"; |
| | | |
| | | /** 删除培训规章制度 POST /oa/trainRules/DelTrainOrg */ |
| | | export async function postOaTrainRulesDelTrainOrg( |
| | | body: API.DelRequestBase, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainRules/DelTrainOrg", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取培训规章制度列表 POST /oa/trainRules/GetTrainRulesList */ |
| | | export async function postOaTrainRulesGetTrainRulesList( |
| | | body: API.GetTrainRulesListRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainRules/GetTrainRulesList", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 新建培训规章制度 POST /oa/trainRules/NewTrainRules */ |
| | | export async function postOaTrainRulesNewTrainRules( |
| | | body: API.NewTrainRulesRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainRules/NewTrainRules", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 更新培训规章制度 POST /oa/trainRules/UpdateTrainRules */ |
| | | export async function postOaTrainRulesUpdateTrainRules( |
| | | body: API.UpdateTrainRulesRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainRules/UpdateTrainRules", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
New file |
| | |
| | | // @ts-ignore |
| | | /* eslint-disable */ |
| | | import { request } from "umi"; |
| | | |
| | | /** 删除培训日程 POST /oa/trainSchedule/DelTrainSchedule */ |
| | | export async function postOaTrainScheduleDelTrainSchedule( |
| | | body: API.DelRequestBase, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainSchedule/DelTrainSchedule", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取培训日程 POST /oa/trainSchedule/GetTrainScheduleList */ |
| | | export async function postOaTrainScheduleGetTrainScheduleList( |
| | | body: API.GetTrainScheduleListRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainSchedule/GetTrainScheduleList", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 更新培训日程 POST /oa/trainSchedule/UpdateTrainSchedule */ |
| | | export async function postOaTrainScheduleUpdateTrainSchedule( |
| | | body: API.UpdateTrainScheduleRequest, |
| | | options?: { [key: string]: any } |
| | | ) { |
| | | return request<API.ResponseData>("/oa/trainSchedule/UpdateTrainSchedule", { |
| | | method: "POST", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | orgId?: number; |
| | | }; |
| | | |
| | | type GetTrainCourseListRequest = { |
| | | start: number; |
| | | size: number; |
| | | sort?: SortRequest; |
| | | filterList?: FilterRequest[]; |
| | | searchList?: SearchRequest[]; |
| | | orgId?: number; |
| | | }; |
| | | |
| | | type GetTrainFeeListRequest = { |
| | | start: number; |
| | | size: number; |
| | | sort?: SortRequest; |
| | | filterList?: FilterRequest[]; |
| | | searchList?: SearchRequest[]; |
| | | orgId?: number; |
| | | }; |
| | | |
| | | type GetTrainOrgListRequest = { |
| | | start: number; |
| | | size: number; |
| | | sort?: SortRequest; |
| | | filterList?: FilterRequest[]; |
| | | searchList?: SearchRequest[]; |
| | | orgId?: number; |
| | | }; |
| | | |
| | | type GetTrainPlanListRequest = { |
| | | start: number; |
| | | size: number; |
| | | sort?: SortRequest; |
| | | filterList?: FilterRequest[]; |
| | | searchList?: SearchRequest[]; |
| | | orgId?: number; |
| | | }; |
| | | |
| | | type GetTrainRequirementListRequest = { |
| | | start: number; |
| | | size: number; |
| | | sort?: SortRequest; |
| | | filterList?: FilterRequest[]; |
| | | searchList?: SearchRequest[]; |
| | | orgId?: number; |
| | | }; |
| | | |
| | | type GetTrainRulesListRequest = { |
| | | start: number; |
| | | size: number; |
| | | sort?: SortRequest; |
| | | filterList?: FilterRequest[]; |
| | | searchList?: SearchRequest[]; |
| | | orgId?: number; |
| | | }; |
| | | |
| | | type GetTrainScheduleListRequest = { |
| | | start: number; |
| | | size: number; |
| | | sort?: SortRequest; |
| | | filterList?: FilterRequest[]; |
| | | searchList?: SearchRequest[]; |
| | | orgId?: number; |
| | | }; |
| | | |
| | | type GetTransferInListRequest = { |
| | | start: number; |
| | | size: number; |
| | |
| | | orgId?: number; |
| | | name?: string; |
| | | type?: string; |
| | | description?: string; |
| | | phone?: string; |
| | | managerId?: number; |
| | | parentId?: number; |
| | |
| | | steps?: string; |
| | | }; |
| | | |
| | | type NewTrainAssessRequest = { |
| | | orgId?: number; |
| | | trainPlanId?: number; |
| | | model?: string; |
| | | content?: string; |
| | | actual?: string; |
| | | }; |
| | | |
| | | type NewTrainCourseRequest = { |
| | | orgId?: number; |
| | | name?: string; |
| | | trainOrgId?: number; |
| | | description?: string; |
| | | hours?: number; |
| | | teacher?: string; |
| | | file?: string; |
| | | }; |
| | | |
| | | type NewTrainFeeRequest = { |
| | | orgId?: number; |
| | | name?: string; |
| | | trainPlanId?: number; |
| | | type?: string; |
| | | fee?: number; |
| | | remarks?: string; |
| | | }; |
| | | |
| | | type NewTrainOrgRequest = { |
| | | orgId?: number; |
| | | name?: string; |
| | | type?: string; |
| | | position?: string; |
| | | aim?: string; |
| | | content?: string; |
| | | course?: string; |
| | | eduType?: string; |
| | | characteristic?: string; |
| | | address?: string; |
| | | phone?: string; |
| | | contactUser?: string; |
| | | }; |
| | | |
| | | type NewTrainPlanRequest = { |
| | | orgId?: number; |
| | | name?: string; |
| | | requirement?: string; |
| | | content?: string; |
| | | beginDate?: string; |
| | | endDate?: string; |
| | | staffIds?: number[]; |
| | | courseIds?: number[]; |
| | | newTrainScheduleRequests?: NewTrainScheduleRequest[]; |
| | | }; |
| | | |
| | | type NewTrainRequirementRequest = { |
| | | orgId?: number; |
| | | name?: string; |
| | | type?: string; |
| | | content?: string; |
| | | planDate?: string; |
| | | staffIds?: number[]; |
| | | }; |
| | | |
| | | type NewTrainRulesRequest = { |
| | | orgId?: number; |
| | | name?: string; |
| | | trainOrgId?: number; |
| | | description?: string; |
| | | file?: string; |
| | | }; |
| | | |
| | | type NewTrainScheduleRequest = { |
| | | staffId?: number; |
| | | content?: string; |
| | | planBeginDate?: string; |
| | | planEndDate?: string; |
| | | }; |
| | | |
| | | type NewTransferInRequest = { |
| | | orgId?: number; |
| | | staffId?: number; |
| | |
| | | type UpdateOADepartmentRequest = { |
| | | id?: number; |
| | | name?: string; |
| | | description?: string; |
| | | type?: string; |
| | | phone?: string; |
| | | managerId?: number; |
| | |
| | | steps?: string; |
| | | }; |
| | | |
| | | type UpdateTrainAssessRequest = { |
| | | id?: number; |
| | | model?: string; |
| | | content?: string; |
| | | actual?: string; |
| | | }; |
| | | |
| | | type UpdateTrainCourseRequest = { |
| | | id?: number; |
| | | name?: string; |
| | | trainOrgId?: number; |
| | | description?: string; |
| | | hours?: number; |
| | | teacher?: string; |
| | | file?: string; |
| | | }; |
| | | |
| | | type UpdateTrainFeeRequest = { |
| | | id?: number; |
| | | name?: string; |
| | | trainPlanId?: number; |
| | | type?: string; |
| | | fee?: number; |
| | | remarks?: string; |
| | | }; |
| | | |
| | | type UpdateTrainOrgRequest = { |
| | | id?: number; |
| | | name?: string; |
| | | type?: string; |
| | | position?: string; |
| | | aim?: string; |
| | | content?: string; |
| | | course?: string; |
| | | eduType?: string; |
| | | characteristic?: string; |
| | | address?: string; |
| | | phone?: string; |
| | | contactUser?: string; |
| | | }; |
| | | |
| | | type UpdateTrainPlanRequest = { |
| | | id?: number; |
| | | name?: string; |
| | | requirement?: string; |
| | | content?: string; |
| | | beginDate?: string; |
| | | endDate?: string; |
| | | staffIds?: number[]; |
| | | courseIds?: number[]; |
| | | }; |
| | | |
| | | type UpdateTrainRequirementRequest = { |
| | | id?: number; |
| | | name?: string; |
| | | type?: string; |
| | | content?: string; |
| | | planDate?: string; |
| | | staffIds?: number[]; |
| | | }; |
| | | |
| | | type UpdateTrainRulesRequest = { |
| | | id?: number; |
| | | name?: string; |
| | | trainOrgId?: number; |
| | | description?: string; |
| | | file?: string; |
| | | }; |
| | | |
| | | type UpdateTrainScheduleRequest = { |
| | | id?: number; |
| | | staffId?: number; |
| | | content?: string; |
| | | planBeginDate?: string; |
| | | planEndDate?: string; |
| | | beginDate?: string; |
| | | endDate?: string; |
| | | planUserCount?: number; |
| | | userCount?: number; |
| | | summarize?: string; |
| | | }; |
| | | |
| | | type UpdateTransferInRequest = { |
| | | id?: number; |
| | | staffId?: number; |