|
|
@@ -17,7 +17,7 @@ export const quickActions = [
|
|
|
{ key: 'shift', label: '调班', icon: '调', color: '#7262fd' },
|
|
|
{ key: 'check', label: '补卡', icon: '卡', color: '#78d3f8' },
|
|
|
{ key: 'certificate', label: '证明', icon: '证', color: '#f6903d' },
|
|
|
- { key: 'more', label: '更多', icon: '•••', color: '#8b939f' },
|
|
|
+ { key: 'resign', label: '离职', icon: '离', color: '#ee6666' },
|
|
|
]
|
|
|
|
|
|
export const applicationTypes = {
|
|
|
@@ -55,6 +55,181 @@ export const notices = [
|
|
|
{ id: 3, title: '新版考勤管理制度自8月1日起执行', date: '07-28', tag: '制度发布', read: true },
|
|
|
]
|
|
|
|
|
|
+export const onboardStatus = {
|
|
|
+ pending: { label: '待入职', class: 'status-pending' },
|
|
|
+ processing: { label: '入职中', class: 'status-processing' },
|
|
|
+ done: { label: '已入职', class: 'status-approved' },
|
|
|
+ overdue: { label: '已逾期', class: 'status-rejected' },
|
|
|
+}
|
|
|
+
|
|
|
+// 入职流程节点定义(详情页时间线用)
|
|
|
+export const onboardStages = [
|
|
|
+ { key: 'offer', label: 'Offer 确认', desc: '候选人确认入职意向与到岗日期' },
|
|
|
+ { key: 'materials', label: '资料收集', desc: '身份证、学历、体检等入职材料' },
|
|
|
+ { key: 'contract', label: '合同签订', desc: '电子合同 / 纸质合同签署' },
|
|
|
+ { key: 'social', label: '社保办理', desc: '社保、公积金参保登记' },
|
|
|
+ { key: 'account', label: '账号开通', desc: '邮箱、门禁、办公系统账号' },
|
|
|
+ { key: 'training', label: '岗前培训', desc: '新员工入职培训与考试' },
|
|
|
+ { key: 'onboard', label: '部门接收', desc: '工位分配、直属上级、试用期安排' },
|
|
|
+]
|
|
|
+
|
|
|
+export const onboardings = [
|
|
|
+ {
|
|
|
+ id: 'ZY20260915',
|
|
|
+ name: '孙浩',
|
|
|
+ avatar: '孙',
|
|
|
+ department: '生产一部',
|
|
|
+ position: '工艺员',
|
|
|
+ source: '社会招聘',
|
|
|
+ status: 'pending',
|
|
|
+ expectedEntryDate: '2026-09-15',
|
|
|
+ entryDate: null,
|
|
|
+ probationMonths: 3,
|
|
|
+ probationEndDate: '2026-12-15',
|
|
|
+ mentor: '李明',
|
|
|
+ phone: '186 1234 5678',
|
|
|
+ email: 'sunhao@aimill.com',
|
|
|
+ materials: {
|
|
|
+ identityCard: true,
|
|
|
+ degreeCertificate: true,
|
|
|
+ physicalReport: true,
|
|
|
+ photo: true,
|
|
|
+ bankCard: true,
|
|
|
+ resignationCert: false,
|
|
|
+ },
|
|
|
+ contract: { status: '待签订', signMethod: '电子签', deadline: '2026-09-14' },
|
|
|
+ socialSecurity: { status: '办理中', city: '北京', deadline: '2026-09-30' },
|
|
|
+ training: { status: '未开始', name: '新员工入职培训', duration: '2天', deadline: '2026-09-20' },
|
|
|
+ workstation: { status: '已分配', location: '生产一部 3号工位' },
|
|
|
+ itAccount: { status: '待开通', items: ['邮箱', '门禁', 'OA'] },
|
|
|
+ stage: 'materials',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'ZY20260918',
|
|
|
+ name: '胡静',
|
|
|
+ avatar: '胡',
|
|
|
+ department: '财务部',
|
|
|
+ position: '出纳',
|
|
|
+ source: '校园招聘',
|
|
|
+ status: 'processing',
|
|
|
+ expectedEntryDate: '2026-09-18',
|
|
|
+ entryDate: '2026-09-18',
|
|
|
+ probationMonths: 6,
|
|
|
+ probationEndDate: '2027-03-18',
|
|
|
+ mentor: '周倩',
|
|
|
+ phone: '135 7721 4521',
|
|
|
+ email: 'hujing@aimill.com',
|
|
|
+ materials: {
|
|
|
+ identityCard: true,
|
|
|
+ degreeCertificate: true,
|
|
|
+ physicalReport: true,
|
|
|
+ photo: true,
|
|
|
+ bankCard: true,
|
|
|
+ resignationCert: true,
|
|
|
+ },
|
|
|
+ contract: { status: '已签订', signMethod: '电子签', signDate: '2026-09-10' },
|
|
|
+ socialSecurity: { status: '已办理', city: '北京', deadline: '2026-09-25' },
|
|
|
+ training: { status: '进行中', name: '新员工入职培训', duration: '2天', deadline: '2026-09-20' },
|
|
|
+ workstation: { status: '已分配', location: '财务部 2楼 201' },
|
|
|
+ itAccount: { status: '已开通', items: ['邮箱', '门禁', 'OA', '财务系统'] },
|
|
|
+ stage: 'training',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'ZY20260804',
|
|
|
+ name: '郑凯',
|
|
|
+ avatar: '郑',
|
|
|
+ department: '设备管理部',
|
|
|
+ position: '技工',
|
|
|
+ source: '社会招聘',
|
|
|
+ status: 'done',
|
|
|
+ expectedEntryDate: '2026-08-04',
|
|
|
+ entryDate: '2026-08-04',
|
|
|
+ probationMonths: 3,
|
|
|
+ probationEndDate: '2026-11-04',
|
|
|
+ mentor: '王建国',
|
|
|
+ phone: '137 2098 3201',
|
|
|
+ email: 'zhengkai@aimill.com',
|
|
|
+ materials: {
|
|
|
+ identityCard: true,
|
|
|
+ degreeCertificate: true,
|
|
|
+ physicalReport: true,
|
|
|
+ photo: true,
|
|
|
+ bankCard: true,
|
|
|
+ resignationCert: true,
|
|
|
+ },
|
|
|
+ contract: { status: '已签订', signMethod: '纸质签', signDate: '2026-08-03' },
|
|
|
+ socialSecurity: { status: '已办理', city: '北京', deadline: '2026-08-20' },
|
|
|
+ training: { status: '已完成', name: '新员工入职培训', duration: '2天', deadline: '2026-08-08' },
|
|
|
+ workstation: { status: '已分配', location: '设备管理部 主楼 B102' },
|
|
|
+ itAccount: { status: '已开通', items: ['邮箱', '门禁', 'OA', 'EAM'] },
|
|
|
+ stage: 'onboard',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'ZY20260905',
|
|
|
+ name: '刘洋',
|
|
|
+ avatar: '刘',
|
|
|
+ department: '品质管理部',
|
|
|
+ position: '质量工程师',
|
|
|
+ source: '社会招聘',
|
|
|
+ status: 'overdue',
|
|
|
+ expectedEntryDate: '2026-09-05',
|
|
|
+ entryDate: null,
|
|
|
+ probationMonths: 3,
|
|
|
+ probationEndDate: null,
|
|
|
+ mentor: '赵磊',
|
|
|
+ phone: '186 9988 1100',
|
|
|
+ email: 'liuyang@aimill.com',
|
|
|
+ materials: {
|
|
|
+ identityCard: true,
|
|
|
+ degreeCertificate: true,
|
|
|
+ physicalReport: false,
|
|
|
+ photo: false,
|
|
|
+ bankCard: false,
|
|
|
+ resignationCert: true,
|
|
|
+ },
|
|
|
+ contract: { status: '待签订', signMethod: '电子签', deadline: '2026-09-04' },
|
|
|
+ socialSecurity: { status: '未办理', city: '北京', deadline: null },
|
|
|
+ training: { status: '未开始', name: '新员工入职培训', duration: '2天', deadline: null },
|
|
|
+ workstation: { status: '待分配', location: '' },
|
|
|
+ itAccount: { status: '未开通', items: [] },
|
|
|
+ stage: 'contract',
|
|
|
+ },
|
|
|
+]
|
|
|
+
|
|
|
+// 内置入职记录(mock);用户通过表单新增的记录由 storage.js 维护
|
|
|
+export const defaultOnboardings = onboardings
|
|
|
+
|
|
|
+// 入职流程可选项
|
|
|
+export const onboardOptions = {
|
|
|
+ sources: ['社会招聘', '校园招聘', '内部转岗', '实习留用'],
|
|
|
+ departments: [
|
|
|
+ '总经办',
|
|
|
+ '人力资源部',
|
|
|
+ '财务部',
|
|
|
+ '生产一部',
|
|
|
+ '生产二部',
|
|
|
+ '研发中心',
|
|
|
+ '品质管理部',
|
|
|
+ '设备管理部',
|
|
|
+ '采购部',
|
|
|
+ '市场部',
|
|
|
+ ],
|
|
|
+ probationMonths: [1, 2, 3, 6],
|
|
|
+ signMethods: ['电子签', '纸质签'],
|
|
|
+}
|
|
|
+
|
|
|
+// 工号生成:ZY + YYYYMMDD + 3 位序号;同一日期去重
|
|
|
+export function generateEmployeeId(usedIds = []) {
|
|
|
+ const d = new Date()
|
|
|
+ const ymd = `${d.getFullYear()}${String(d.getMonth() + 1).padStart(2, '0')}${String(d.getDate()).padStart(2, '0')}`
|
|
|
+ for (let i = 0; i < 999; i++) {
|
|
|
+ const seq = String(i + 1).padStart(3, '0')
|
|
|
+ const id = `ZY${ymd}${seq}`
|
|
|
+ if (!usedIds.includes(id)) return id
|
|
|
+ }
|
|
|
+ return `ZY${ymd}${Date.now().toString().slice(-3)}`
|
|
|
+}
|
|
|
+
|
|
|
export const workModules = [
|
|
|
{ group: '员工服务', items: [
|
|
|
{ label: '我的申请', icon: '申', color: '#5b8ff9', url: '/pages/apply/list' },
|
|
|
@@ -65,6 +240,7 @@ export const workModules = [
|
|
|
{ label: '培训学习', icon: '学', color: '#269a99', url: '/pages/training/index' },
|
|
|
{ label: '个人档案', icon: '档', color: '#f6903d', url: '/pages/profile/edit' },
|
|
|
{ label: '证明申请', icon: '证', color: '#6dc8ec', url: '/pages/apply/form?type=certificate' },
|
|
|
+ { label: '离职申请', icon: '离', color: '#ee6666', url: '/pages/apply/form?type=resign' },
|
|
|
] },
|
|
|
{ group: '人事管理', items: [
|
|
|
{ label: '审批中心', icon: '审', color: '#1677ff', url: '/pages/approval/index', badge: 3 },
|
|
|
@@ -74,6 +250,195 @@ export const workModules = [
|
|
|
{ label: '合同管理', icon: '合', color: '#7262fd', url: '/pages/manage/index?type=contract' },
|
|
|
{ label: '员工入职', icon: '入', color: '#78d3f8', url: '/pages/manage/index?type=onboard' },
|
|
|
{ label: '人事异动', icon: '动', color: '#f6903d', url: '/pages/manage/index?type=transfer' },
|
|
|
+ { label: '离职管理', icon: '离', color: '#ee6666', url: '/pages/manage/index?type=resign' },
|
|
|
{ label: '数据看板', icon: '数', color: '#5ad8a6', url: '/pages/manage/index?type=dashboard' },
|
|
|
] },
|
|
|
]
|
|
|
+
|
|
|
+export const resignStatus = {
|
|
|
+ pending: { label: '待审批', class: 'status-pending' },
|
|
|
+ processing: { label: '进行中', class: 'status-processing' },
|
|
|
+ done: { label: '已离职', class: 'status-approved' },
|
|
|
+ overdue: { label: '已逾期', class: 'status-rejected' },
|
|
|
+ cancelled: { label: '已撤回', class: 'status-rejected' },
|
|
|
+}
|
|
|
+
|
|
|
+export const resignStages = [
|
|
|
+ { key: 'submit', label: '申请提交', desc: '员工提交离职申请并填写预计离职日' },
|
|
|
+ { key: 'manager', label: '直属主管审批', desc: '直属上级确认业务交接可行性' },
|
|
|
+ { key: 'department', label: '部门负责人审批', desc: '部门负责人审批离职安排' },
|
|
|
+ { key: 'hrbp', label: 'HRBP 审批', desc: 'HRBP 复核离职条件与补偿方案' },
|
|
|
+ { key: 'handover', label: '工作交接', desc: '交接人确认工作内容、客户与文档移交' },
|
|
|
+ { key: 'assetReturn', label: '资产归还', desc: '办公设备、工牌、门禁卡归还登记' },
|
|
|
+ { key: 'finance', label: '财务结算', desc: '工资、补偿金、年假折算与社保停缴' },
|
|
|
+ { key: 'certificate', label: '离职证明/账号注销', desc: '开具离职证明并注销 OA/门禁/邮箱账号' },
|
|
|
+]
|
|
|
+
|
|
|
+export const resignings = [
|
|
|
+ {
|
|
|
+ id: 'ZY20260812',
|
|
|
+ name: '郭峰',
|
|
|
+ avatar: '郭',
|
|
|
+ department: '设备管理部',
|
|
|
+ position: '设备维修工',
|
|
|
+ entryDate: '2019-03-18',
|
|
|
+ status: 'processing',
|
|
|
+ expectedLeaveDate: '2026-08-25',
|
|
|
+ lastWorkDate: null,
|
|
|
+ submitDate: '2026-08-12',
|
|
|
+ type: '主动离职',
|
|
|
+ reason: '寻求个人发展',
|
|
|
+ handover: {
|
|
|
+ person: '王建国',
|
|
|
+ dept: '设备管理部',
|
|
|
+ progress: '70%',
|
|
|
+ deadline: '2026-08-25',
|
|
|
+ items: [
|
|
|
+ 'EAM 系统权限与账号交接',
|
|
|
+ '3 号产线设备维护记录归档',
|
|
|
+ '测量仪器校准台账移交',
|
|
|
+ '备件库存盘点表交接',
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ compensation: { scheme: 'N+1', amount: '¥ 48,200', status: '审批中', note: '按最近 12 个月平均工资计算' },
|
|
|
+ assetReturn: {
|
|
|
+ status: '部分归还',
|
|
|
+ items: [
|
|
|
+ { name: '工牌', returned: true, remark: '已交还前台' },
|
|
|
+ { name: '门禁卡', returned: true, remark: '已注销' },
|
|
|
+ { name: '办公电脑', returned: false, remark: '预计 8/24 归还' },
|
|
|
+ { name: '测量仪器', returned: false, remark: '等待王建国验收' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ contractTermination: { method: '协商解除', deadline: '2026-08-25', status: '办理中' },
|
|
|
+ socialSecurity: { stopMonth: '2026-08', city: '北京', status: '办理中' },
|
|
|
+ financeSettle: { lastSalary: '¥ 12,800', annualLeave: '3 天', compensation: '¥ 23,400', payoutDate: '2026-08-31', status: '办理中' },
|
|
|
+ accountOff: { status: '办理中', items: ['OA', '门禁', 'EAM'] },
|
|
|
+ certificate: { status: '待开具', needCopy: true },
|
|
|
+ stage: 'handover',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'ZY20260710',
|
|
|
+ name: '陈静',
|
|
|
+ avatar: '陈',
|
|
|
+ department: '财务部',
|
|
|
+ position: '成本会计',
|
|
|
+ entryDate: '2018-06-01',
|
|
|
+ status: 'done',
|
|
|
+ expectedLeaveDate: '2026-07-31',
|
|
|
+ lastWorkDate: '2026-07-31',
|
|
|
+ submitDate: '2026-07-10',
|
|
|
+ type: '主动离职',
|
|
|
+ reason: '家庭原因',
|
|
|
+ handover: {
|
|
|
+ person: '周倩',
|
|
|
+ dept: '财务部',
|
|
|
+ progress: '100%',
|
|
|
+ deadline: '2026-07-31',
|
|
|
+ items: [
|
|
|
+ '成本核算月度结转 SOP',
|
|
|
+ '供应商对账单归档',
|
|
|
+ 'ERP 系统操作权限交接',
|
|
|
+ '银行回单与发票管理移交',
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ compensation: { scheme: '协商一致', amount: '¥ 32,000', status: '已发放', note: '一次性协商补偿' },
|
|
|
+ assetReturn: {
|
|
|
+ status: '已归还',
|
|
|
+ items: [
|
|
|
+ { name: '工牌', returned: true, remark: '已归档' },
|
|
|
+ { name: '门禁卡', returned: true, remark: '已注销' },
|
|
|
+ { name: '办公电脑', returned: true, remark: '已回收' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ contractTermination: { method: '协商解除', deadline: '2026-07-31', status: '已解除' },
|
|
|
+ socialSecurity: { stopMonth: '2026-07', city: '北京', status: '已停缴' },
|
|
|
+ financeSettle: { lastSalary: '¥ 14,500', annualLeave: '5 天', compensation: '¥ 32,000', payoutDate: '2026-08-15', status: '已结算' },
|
|
|
+ accountOff: { status: '已注销', items: ['OA', '门禁', '邮箱', 'ERP'] },
|
|
|
+ certificate: { status: '已开具', needCopy: true },
|
|
|
+ stage: 'certificate',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'ZY20260825',
|
|
|
+ name: '黄亮',
|
|
|
+ avatar: '黄',
|
|
|
+ department: '研发中心',
|
|
|
+ position: '前端工程师',
|
|
|
+ entryDate: '2022-04-11',
|
|
|
+ status: 'pending',
|
|
|
+ expectedLeaveDate: '2026-09-30',
|
|
|
+ lastWorkDate: null,
|
|
|
+ submitDate: '2026-08-25',
|
|
|
+ type: '主动离职',
|
|
|
+ reason: '职业转型',
|
|
|
+ handover: {
|
|
|
+ person: '待指派',
|
|
|
+ dept: '研发中心',
|
|
|
+ progress: '0%',
|
|
|
+ deadline: '2026-09-30',
|
|
|
+ items: [
|
|
|
+ 'HR H5 前端代码仓库交接',
|
|
|
+ 'BPM 表单设计文档移交',
|
|
|
+ '组件库版本与权限交接',
|
|
|
+ '未完成工单与发布计划',
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ compensation: { scheme: 'N', amount: '—', status: '待核算', note: 'HRBP 复核中' },
|
|
|
+ assetReturn: {
|
|
|
+ status: '未开始',
|
|
|
+ items: [
|
|
|
+ { name: '工牌', returned: false, remark: '' },
|
|
|
+ { name: '门禁卡', returned: false, remark: '' },
|
|
|
+ { name: '办公电脑', returned: false, remark: '' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ contractTermination: { method: '提前 30 日通知', deadline: '2026-09-30', status: '待解除' },
|
|
|
+ socialSecurity: { stopMonth: '2026-09', city: '北京', status: '待办理' },
|
|
|
+ financeSettle: { lastSalary: '¥ 18,000', annualLeave: '2 天', compensation: '—', payoutDate: '', status: '待核算' },
|
|
|
+ accountOff: { status: '待注销', items: [] },
|
|
|
+ certificate: { status: '待开具', needCopy: true },
|
|
|
+ stage: 'submit',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'ZY20260805',
|
|
|
+ name: '马涛',
|
|
|
+ avatar: '马',
|
|
|
+ department: '生产一部',
|
|
|
+ position: '工艺工程师',
|
|
|
+ entryDate: '2020-09-15',
|
|
|
+ status: 'overdue',
|
|
|
+ expectedLeaveDate: '2026-08-05',
|
|
|
+ lastWorkDate: '2026-08-05',
|
|
|
+ submitDate: '2026-07-25',
|
|
|
+ type: '协商离职',
|
|
|
+ reason: '公司调整',
|
|
|
+ handover: {
|
|
|
+ person: '李明',
|
|
|
+ dept: '生产一部',
|
|
|
+ progress: '40%',
|
|
|
+ deadline: '2026-08-05',
|
|
|
+ items: [
|
|
|
+ '工艺路线文档移交',
|
|
|
+ '3 号产线 SOP 交接',
|
|
|
+ '质量异常台账',
|
|
|
+ '设备参数与配方归档',
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ compensation: { scheme: 'N+1', amount: '¥ 56,800', status: '审批中', note: '需 HRBP 加急复核' },
|
|
|
+ assetReturn: {
|
|
|
+ status: '部分归还',
|
|
|
+ items: [
|
|
|
+ { name: '工牌', returned: true, remark: '已交还' },
|
|
|
+ { name: '门禁卡', returned: false, remark: '未归还' },
|
|
|
+ { name: '办公电脑', returned: false, remark: '未归还' },
|
|
|
+ { name: '测量仪器', returned: true, remark: '已交接' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ contractTermination: { method: '协商解除', deadline: '2026-08-05', status: '已逾期' },
|
|
|
+ socialSecurity: { stopMonth: '2026-08', city: '北京', status: '已逾期' },
|
|
|
+ financeSettle: { lastSalary: '¥ 13,200', annualLeave: '4 天', compensation: '¥ 56,800', payoutDate: '', status: '已逾期' },
|
|
|
+ accountOff: { status: '部分注销', items: ['门禁'] },
|
|
|
+ certificate: { status: '待开具', needCopy: true },
|
|
|
+ stage: 'assetReturn',
|
|
|
+ },
|
|
|
+]
|