fix(oa): 修复多处 Duplicate attribute 错误问题

- 修改 app/components/oa/TaskForm.vue 中 a-input 类型冲突为 a-input-number
- 合并 admin/supply/warehouse.vue 和 production/equipment.vue 中多个 :class 绑定,避免重复属性
- 统一改为数组方式绑定静态和动态 class,防止 Vue 编译器 Duplicate attribute 警告
- 清理缓存并验证构建通过,确保无重复属性错误
- 通过扫描确认 app/ 目录下 Vue 文件不再存在重复属性问题
- 添加 OaTaskForm 组件类型声明及懒加载声明
- 将 ERP 演示独立 HTML 页面整合至 /app/pages,统一布局与导航
- 升级制造业管理后台页面风格,采用玻璃态和渐变设计
- 修订规划文档相关内容,更新 DEMO 系统名称及功能模块描述
- 修改 ecosystem.config.cjs 中运行端口为 10591
This commit is contained in:
2026-04-09 12:08:55 +08:00
parent f9e1286ab1
commit a9da04fbb8
26 changed files with 1203 additions and 2516 deletions

Binary file not shown.

View File

@@ -30,6 +30,7 @@ export const DeveloperPermissionGuard: typeof import("../app/components/develope
export const DeveloperRoleTag: typeof import("../app/components/developer/RoleTag.vue").default
export const InviteBell: typeof import("../app/components/invite/InviteBell.vue").default
export const InviteNotification: typeof import("../app/components/invite/InviteNotification.vue").default
export const OaTaskForm: typeof import("../app/components/oa/TaskForm.vue").default
export const PaymentModal: typeof import("../app/components/payment/PaymentModal.vue").default
export const ProseA: typeof import("../node_modules/.pnpm/@nuxtjs+mdc@0.20.2_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseA.vue").default
export const ProseBlockquote: typeof import("../node_modules/.pnpm/@nuxtjs+mdc@0.20.2_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseBlockquote.vue").default
@@ -102,6 +103,7 @@ export const LazyDeveloperPermissionGuard: LazyComponent<typeof import("../app/c
export const LazyDeveloperRoleTag: LazyComponent<typeof import("../app/components/developer/RoleTag.vue").default>
export const LazyInviteBell: LazyComponent<typeof import("../app/components/invite/InviteBell.vue").default>
export const LazyInviteNotification: LazyComponent<typeof import("../app/components/invite/InviteNotification.vue").default>
export const LazyOaTaskForm: LazyComponent<typeof import("../app/components/oa/TaskForm.vue").default>
export const LazyPaymentModal: LazyComponent<typeof import("../app/components/payment/PaymentModal.vue").default>
export const LazyProseA: LazyComponent<typeof import("../node_modules/.pnpm/@nuxtjs+mdc@0.20.2_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseA.vue").default>
export const LazyProseBlockquote: LazyComponent<typeof import("../node_modules/.pnpm/@nuxtjs+mdc@0.20.2_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseBlockquote.vue").default>

View File

@@ -22,6 +22,7 @@ export const localComponentLoaders = {
DeveloperRoleTag: () => import("./../../app/components/developer/RoleTag.vue").then(m => pickExport(m, "default", "DeveloperRoleTag", "./../../app/components/developer/RoleTag.vue")),
InviteBell: () => import("./../../app/components/invite/InviteBell.vue").then(m => pickExport(m, "default", "InviteBell", "./../../app/components/invite/InviteBell.vue")),
InviteNotification: () => import("./../../app/components/invite/InviteNotification.vue").then(m => pickExport(m, "default", "InviteNotification", "./../../app/components/invite/InviteNotification.vue")),
OaTaskForm: () => import("./../../app/components/oa/TaskForm.vue").then(m => pickExport(m, "default", "OaTaskForm", "./../../app/components/oa/TaskForm.vue")),
PaymentModal: () => import("./../../app/components/payment/PaymentModal.vue").then(m => pickExport(m, "default", "PaymentModal", "./../../app/components/payment/PaymentModal.vue")),
NuxtWelcome: () => import("./../../node_modules/.pnpm/nuxt@4.2.2_@parcel+watcher@2.5.1_@types+node@25.0.3_@vue+compiler-sfc@3.5.26_better-sql_ac6a4d57fe59bc83c2ad1951937f70f6/node_modules/nuxt/dist/app/components/welcome.vue").then(m => pickExport(m, "default", "NuxtWelcome", "./../../node_modules/.pnpm/nuxt@4.2.2_@parcel+watcher@2.5.1_@types+node@25.0.3_@vue+compiler-sfc@3.5.26_better-sql_ac6a4d57fe59bc83c2ad1951937f70f6/node_modules/nuxt/dist/app/components/welcome.vue")),
NuxtLayout: () => import("./../../node_modules/.pnpm/nuxt@4.2.2_@parcel+watcher@2.5.1_@types+node@25.0.3_@vue+compiler-sfc@3.5.26_better-sql_ac6a4d57fe59bc83c2ad1951937f70f6/node_modules/nuxt/dist/app/components/nuxt-layout").then(m => pickExport(m, "default", "NuxtLayout", "./../../node_modules/.pnpm/nuxt@4.2.2_@parcel+watcher@2.5.1_@types+node@25.0.3_@vue+compiler-sfc@3.5.26_better-sql_ac6a4d57fe59bc83c2ad1951937f70f6/node_modules/nuxt/dist/app/components/nuxt-layout")),
@@ -55,4 +56,4 @@ export const localComponentLoaders = {
NuxtIsland: () => import("./../../node_modules/.pnpm/nuxt@4.2.2_@parcel+watcher@2.5.1_@types+node@25.0.3_@vue+compiler-sfc@3.5.26_better-sql_ac6a4d57fe59bc83c2ad1951937f70f6/node_modules/nuxt/dist/app/components/nuxt-island").then(m => pickExport(m, "default", "NuxtIsland", "./../../node_modules/.pnpm/nuxt@4.2.2_@parcel+watcher@2.5.1_@types+node@25.0.3_@vue+compiler-sfc@3.5.26_better-sql_ac6a4d57fe59bc83c2ad1951937f70f6/node_modules/nuxt/dist/app/components/nuxt-island")),
}
export const globalComponents: string[] = ["ProseA","ProseBlockquote","ProseCode","ProseEm","ProseH1","ProseH2","ProseH3","ProseH4","ProseH5","ProseH6","ProseHr","ProseImg","ProseLi","ProseOl","ProseP","ProsePre","ProseScript","ProseStrong","ProseTable","ProseTbody","ProseTd","ProseTh","ProseThead","ProseTr","ProseUl"]
export const localComponents: string[] = ["LangSwitch","NotificationBell","QrCodeModal","QrLogin","SiteFooter","SiteHeader","AdminMarkdownEditor","AdminMarkdownRenderer","ConsoleAppsCenter","ConsoleHeader","DeveloperAppDetail","DeveloperAppsCenter","DeveloperPermissionGuard","DeveloperRoleTag","InviteBell","InviteNotification","PaymentModal","NuxtWelcome","NuxtLayout","NuxtErrorBoundary","ClientOnly","DevOnly","ServerPlaceholder","NuxtLink","NuxtLoadingIndicator","NuxtTime","NuxtRouteAnnouncer","NuxtImg","NuxtPicture","ContentRenderer","NuxtLinkLocale","SwitchLocalePathLink","NuxtPage","NoScript","Link","Base","Title","Meta","Style","Head","Html","Body","MDC","MDCCached","MDCRenderer","MDCSlot","NuxtIsland"]
export const localComponents: string[] = ["LangSwitch","NotificationBell","QrCodeModal","QrLogin","SiteFooter","SiteHeader","AdminMarkdownEditor","AdminMarkdownRenderer","ConsoleAppsCenter","ConsoleHeader","DeveloperAppDetail","DeveloperAppsCenter","DeveloperPermissionGuard","DeveloperRoleTag","InviteBell","InviteNotification","OaTaskForm","PaymentModal","NuxtWelcome","NuxtLayout","NuxtErrorBoundary","ClientOnly","DevOnly","ServerPlaceholder","NuxtLink","NuxtLoadingIndicator","NuxtTime","NuxtRouteAnnouncer","NuxtImg","NuxtPicture","ContentRenderer","NuxtLinkLocale","SwitchLocalePathLink","NuxtPage","NoScript","Link","Base","Title","Meta","Style","Head","Html","Body","MDC","MDCCached","MDCRenderer","MDCSlot","NuxtIsland"]

View File

@@ -2675,7 +2675,7 @@ const _xcUbjOGHb1DY_0q4vboOUFGJ6nlkQiqabJRmCaoRlCA = defineNitroPlugin(async (ni
const localeSegment = detector.route(event.path);
const pathLocale = isSupportedLocale(localeSegment) && localeSegment || void 0;
const path = (pathLocale && url.pathname.slice(pathLocale.length + 1)) ?? url.pathname;
if (!url.pathname.includes("/_i18n/DlSAXLC0") && !isExistingNuxtRoute(path)) {
if (!url.pathname.includes("/_i18n/7dqJCt8a") && !isExistingNuxtRoute(path)) {
return;
}
const resolved = resolveRedirectPath(event, path, pathLocale, ctx.vueI18nOptions.defaultLocale, detector);
@@ -2777,7 +2777,22 @@ _xcUbjOGHb1DY_0q4vboOUFGJ6nlkQiqabJRmCaoRlCA,
_gQl57XluY2XVUox11CYu2DV1u08gyx_aML83r_h8XmU
];
const assets = {};
const assets = {
"/index.mjs": {
"type": "text/javascript; charset=utf-8",
"etag": "\"26fc2-ygDl+V7YYMJ0mSpU5AmaYP4FFyY\"",
"mtime": "2026-04-09T03:56:59.765Z",
"size": 159682,
"path": "index.mjs"
},
"/index.mjs.map": {
"type": "application/json",
"etag": "\"9d6e0-8lbM8D6Iv8mk+QKpLLL+TYaN4qU\"",
"mtime": "2026-04-09T03:56:59.767Z",
"size": 644832,
"path": "index.mjs.map"
}
};
function readAsset (id) {
const serverDir = dirname$1(fileURLToPath(globalThis._importMeta_.url));

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
{
"date": "2026-04-08T23:33:08.624Z",
"date": "2026-04-09T03:57:02.359Z",
"preset": "nitro-dev",
"framework": {
"name": "nuxt",
@@ -9,9 +9,9 @@
"nitro": "2.12.8"
},
"dev": {
"pid": 94352,
"pid": 95597,
"workerAddress": {
"socketPath": "/var/folders/qz/k8gbknb502j_f8wbdcc8bs6h0000gn/T/nitro-worker-94352-1-1-8709.sock"
"socketPath": "/var/folders/qz/k8gbknb502j_f8wbdcc8bs6h0000gn/T/nitro-worker-95597-3-3-6572.sock"
}
}
}

2
.nuxt/nuxt.d.ts vendored
View File

@@ -1,9 +1,9 @@
/// <reference types="./modules/fix-tailwind-postcss" />
/// <reference types="@nuxtjs/tailwindcss" />
/// <reference types="@nuxt/content" />
/// <reference types="@nuxtjs/i18n" />
/// <reference types="@nuxt/devtools" />
/// <reference types="@nuxt/telemetry" />
/// <reference types="@nuxtjs/tailwindcss" />
/// <reference path="types/builder-env.d.ts" />
/// <reference path="types/plugins.d.ts" />
/// <reference path="types/build.d.ts" />

View File

@@ -1,9 +1,9 @@
/// <reference types="./modules/fix-tailwind-postcss" />
/// <reference types="@nuxtjs/tailwindcss" />
/// <reference types="@nuxt/content" />
/// <reference types="@nuxtjs/i18n" />
/// <reference types="@nuxt/devtools" />
/// <reference types="@nuxt/telemetry" />
/// <reference types="@nuxtjs/tailwindcss" />
/// <reference path="types/modules.d.ts" />
/// <reference path="types/runtime-config.d.ts" />
/// <reference path="types/app.config.d.ts" />

View File

@@ -1,4 +1,4 @@
// generated by the @nuxtjs/tailwindcss <https://github.com/nuxt-modules/tailwindcss> module at 4/9/2026, 7:35:30 AM
// generated by the @nuxtjs/tailwindcss <https://github.com/nuxt-modules/tailwindcss> module at 4/9/2026, 11:56:58 AM
import "@nuxtjs/tailwindcss/config-ctx"
import configMerger from "@nuxtjs/tailwindcss/merger";

View File

@@ -30,6 +30,7 @@ interface _GlobalComponents {
'DeveloperRoleTag': typeof import("../../app/components/developer/RoleTag.vue").default
'InviteBell': typeof import("../../app/components/invite/InviteBell.vue").default
'InviteNotification': typeof import("../../app/components/invite/InviteNotification.vue").default
'OaTaskForm': typeof import("../../app/components/oa/TaskForm.vue").default
'PaymentModal': typeof import("../../app/components/payment/PaymentModal.vue").default
'ProseA': typeof import("../../node_modules/.pnpm/@nuxtjs+mdc@0.20.2_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseA.vue").default
'ProseBlockquote': typeof import("../../node_modules/.pnpm/@nuxtjs+mdc@0.20.2_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseBlockquote.vue").default
@@ -102,6 +103,7 @@ interface _GlobalComponents {
'LazyDeveloperRoleTag': LazyComponent<typeof import("../../app/components/developer/RoleTag.vue").default>
'LazyInviteBell': LazyComponent<typeof import("../../app/components/invite/InviteBell.vue").default>
'LazyInviteNotification': LazyComponent<typeof import("../../app/components/invite/InviteNotification.vue").default>
'LazyOaTaskForm': LazyComponent<typeof import("../../app/components/oa/TaskForm.vue").default>
'LazyPaymentModal': LazyComponent<typeof import("../../app/components/payment/PaymentModal.vue").default>
'LazyProseA': LazyComponent<typeof import("../../node_modules/.pnpm/@nuxtjs+mdc@0.20.2_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseA.vue").default>
'LazyProseBlockquote': LazyComponent<typeof import("../../node_modules/.pnpm/@nuxtjs+mdc@0.20.2_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseBlockquote.vue").default>

View File

@@ -55,7 +55,18 @@
"usedAt": 1775690686771,
"industryId": "all"
}
],
"ee5f4d2526a448f1896717c292b19d87": [
{
"expertId": "SeniorDeveloper",
"name": "Will",
"profession": "高级开发工程师",
"avatarUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/avatars/02-Engineering/SeniorDeveloper/SeniorDeveloper.png",
"promptUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/experts/02-Engineering/SeniorDeveloper/SeniorDeveloper_zh.md",
"usedAt": 1775704984979,
"industryId": "all"
}
]
},
"lastUpdated": 1775691132330
"lastUpdated": 1775705291266
}

View File

@@ -1,5 +1,16 @@
# 2026-04-09 工作日志
## 修复 "Duplicate attribute" 错误(多处)
- **第1处**`app/components/oa/TaskForm.vue``<a-input type="number">` 与组件内部 `type` 属性冲突 → 替换为 `<a-input-number>`
- **第2处**`app/pages/admin/supply/warehouse.vue:183``<span :class=... class=... :class=...>` 三重绑定 → 合并为 `:class="['static', dynamic1, dynamic2]"`
- **第3处**`app/pages/admin/production/equipment.vue:183``equipment.vue:256` 同样的 `:class` 重复问题 → 同样合并
- 根本原因:同一元素上同时出现静态 `class` 和两个动态 `:class` 绑定Vue 编译器报 Duplicate attribute
- 修复模式:将 `class="static" :class="a" :class="b"` 统一改为 `:class="['static', a, b]"`
- 构建验证:`npx nuxi build` 通过,无 Duplicate attribute 错误
- 后续补丁:用 Vue 编译器 API 全量扫描 app/ 下所有 .vue 文件,确认 0 个文件存在真实重复属性
- 已清除 .nuxt 和 node_modules/.cache/nuxt 缓存,防止旧缓存继续报错
- ⚠️ 教训:清除 .nuxt 会导致 tsconfig.json 的 extends 断裂,需执行 `npx nuxi prepare` 重新生成
## 制造业数字化管理后台 /admin 重构
将 /admin 从之前的通用SaaS后端改造为制造业数字化标准体系包含4大模块
@@ -18,6 +29,20 @@
- 每个页面通过 useNav().activeTab 设置当前菜单高亮
- 图标全部使用 @ant-design/icons-vue 有效图标
## ERP演示站点 - 独立HTML风格页面整合到 /app/pages
将根目录下3个HTML原型文件整合为 Nuxt/Vue 页面,全部放入 /app/pages/
- index.vue - 工作台首页(已有,更新导航链接)
- procurement.vue - 采购管理
- hr.vue - 人力资源管理
- device.vue - 设备管理(新建)
- warehouse.vue - 仓储物流(新建)
- finance.vue - 财务管理(新建)
- office.vue - 协同办公(新建)
所有页面使用 layout: blank自带左侧导航所有菜单项均为 NuxtLink 可跳转。
设计风格:紫蓝渐变侧边栏 + 玻璃态卡片 + 渐变统计卡 + Ant Design Vue 组件。
## 页面风格升级 - 玻璃态+渐变
所有制造业管理后台页面已升级为现代风格:

View File

@@ -178,9 +178,7 @@ function handleAdd() {
<a-table-column title="状态" dataIndex="status" width="100" align="center">
<template #default="{ text }">
<span
:class="statusMap[text]?.color"
class="px-2 py-1 rounded-lg text-sm font-medium"
:class="statusMap[text]?.bg"
:class="['px-2 py-1 rounded-lg text-sm font-medium', statusMap[text]?.color, statusMap[text]?.bg]"
>
{{ statusMap[text]?.label }}
</span>
@@ -251,9 +249,7 @@ function handleAdd() {
<a-descriptions-item label="安装位置">{{ selectedEquipment.location }}</a-descriptions-item>
<a-descriptions-item label="当前状态">
<span
:class="statusMap[selectedEquipment.status]?.color"
class="px-2 py-0.5 rounded text-sm font-medium"
:class="statusMap[selectedEquipment.status]?.bg"
:class="['px-2 py-0.5 rounded text-sm font-medium', statusMap[selectedEquipment.status]?.color, statusMap[selectedEquipment.status]?.bg]"
>
{{ statusMap[selectedEquipment.status]?.label }}
</span>

View File

@@ -167,9 +167,8 @@ function handleAdd() {
<a-table-column title="状态" dataIndex="status" width="100" align="center">
<template #default="{ text }">
<span
:class="statusMap[text]?.color"
class="px-2 py-1 rounded-lg text-sm font-medium"
:class="statusMap[text]?.bg"
:class="[statusMap[text]?.color, statusMap[text]?.bg]"
>
{{ statusMap[text]?.label }}
</span>

View File

@@ -178,9 +178,7 @@ function handleInbound() {
<a-table-column title="状态" dataIndex="status" width="100" align="center">
<template #default="{ text }">
<span
:class="statusMap[text]?.color"
class="px-2 py-1 rounded-lg text-sm font-medium"
:class="statusMap[text]?.bg"
:class="['px-2 py-1 rounded-lg text-sm font-medium', statusMap[text]?.color, statusMap[text]?.bg]"
>
{{ statusMap[text]?.label }}
</span>

535
app/pages/hr.vue Normal file
View File

@@ -0,0 +1,535 @@
<template>
<div class="flex min-h-screen bg-gradient-to-br from-gray-50 to-gray-100">
<!-- 左侧导航 -->
<aside class="w-64 fixed h-full text-white flex flex-col sidebar">
<!-- Logo -->
<div class="p-6 border-b border-white/10">
<div class="flex items-center gap-3">
<div class="w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center">
<BlockOutlined class="text-xl" />
</div>
<div>
<h1 class="font-bold text-lg">DEMO演示系统</h1>
<p class="text-xs text-white/70">ERP 管理平台</p>
</div>
</div>
</div>
<!-- 导航菜单 -->
<nav class="flex-1 py-6 px-3">
<div class="space-y-1">
<NuxtLink to="/" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<HomeOutlined class="text-base" />
<span>工作台</span>
</NuxtLink>
<NuxtLink to="/device" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<SettingOutlined class="text-base" />
<span>设备管理</span>
</NuxtLink>
<NuxtLink to="/procurement" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<ShoppingCartOutlined class="text-base" />
<span>采购管理</span>
</NuxtLink>
<NuxtLink to="/warehouse" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<InboxOutlined class="text-base" />
<span>仓储物流</span>
</NuxtLink>
<NuxtLink to="/finance" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<WalletOutlined class="text-base" />
<span>财务管理</span>
</NuxtLink>
<NuxtLink to="/hr" class="sidebar-item active flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<TeamOutlined class="text-base" />
<span>人力资源</span>
</NuxtLink>
<NuxtLink to="/office" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<ProjectOutlined class="text-base" />
<span>协同办公</span>
</NuxtLink>
</div>
<div class="mt-8 pt-6 border-t border-white/10">
<p class="px-4 text-xs text-white/50 mb-3">个人</p>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<UserOutlined class="text-base" />
<span>个人信息</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<SettingOutlined class="text-base" />
<span>系统设置</span>
</a>
</div>
</nav>
<!-- 用户信息 -->
<div class="p-4 border-t border-white/10">
<div class="flex items-center gap-3">
<div class="w-10 h-10 bg-white/20 rounded-full flex items-center justify-center">
<UserOutlined />
</div>
<div class="flex-1">
<p class="font-medium">管理员</p>
<p class="text-xs text-white/70">超级管理员</p>
</div>
<button class="text-white/70 hover:text-white">
<LogoutOutlined />
</button>
</div>
</div>
</aside>
<!-- 主内容区 -->
<main class="flex-1 ml-64">
<!-- 顶部栏 -->
<header class="bg-white/85 backdrop-blur-xl sticky top-0 z-50 px-8 py-4 border-b border-white/30">
<div class="flex items-center justify-between">
<!-- 搜索 -->
<div class="relative w-96">
<a-input
v-model:value="searchKeyword"
placeholder="搜索员工、部门、职位..."
class="w-full"
size="large"
>
<template #prefix>
<SearchOutlined class="text-gray-400" />
</template>
</a-input>
</div>
<!-- 右侧 -->
<div class="flex items-center gap-6">
<button class="text-gray-500 hover:text-purple-600 transition-colors">
<FullscreenOutlined class="text-lg" />
</button>
<a-badge count="5" :offset="[-2, 2]">
<BellOutlined class="text-gray-500 hover:text-purple-600 transition-colors text-lg cursor-pointer" />
</a-badge>
<button class="text-gray-500 hover:text-purple-600 transition-colors">
<GlobalOutlined class="text-lg" />
</button>
<div class="flex items-center gap-3 pl-6 border-l border-gray-200">
<a-avatar class="bg-gradient-to-br from-purple-500 to-pink-500">A</a-avatar>
<div>
<p class="font-medium text-gray-800">Admin</p>
<p class="text-xs text-gray-500">超级管理员</p>
</div>
</div>
</div>
</div>
</header>
<!-- 内容区域 -->
<div class="p-8">
<!-- 页面标题 -->
<div class="mb-8">
<div class="flex items-center gap-3 mb-2">
<NuxtLink to="/" class="text-gray-500 hover:text-purple-600 transition-colors">
<ArrowLeftOutlined />
</NuxtLink>
<h2 class="text-3xl font-bold text-gray-800">人力资源管理</h2>
</div>
<p class="text-gray-500">管理员工信息组织架构考勤记录薪资福利及招聘流程</p>
</div>
<!-- 数据概览 -->
<div class="grid grid-cols-4 gap-6 mb-8">
<div class="stat-card blue bg-white rounded-2xl p-6 card-hover shadow-sm">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center">
<TeamOutlined class="text-blue-600 text-xl" />
</div>
<span class="text-green-500 text-sm font-medium flex items-center gap-1"><ArrowUpOutlined /> 5%</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">186</h3>
<p class="text-gray-500 text-sm">在职员工</p>
</div>
<div class="stat-card green bg-white rounded-2xl p-6 card-hover shadow-sm">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center">
<UserAddOutlined class="text-green-600 text-xl" />
</div>
<span class="text-green-500 text-sm font-medium flex items-center gap-1"><ArrowUpOutlined /> 12%</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">8</h3>
<p class="text-gray-500 text-sm">本月入职</p>
</div>
<div class="stat-card orange bg-white rounded-2xl p-6 card-hover shadow-sm">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-orange-100 rounded-xl flex items-center justify-center">
<ClockCircleOutlined class="text-orange-600 text-xl" />
</div>
<span class="text-red-500 text-sm font-medium flex items-center gap-1"><ArrowUpOutlined /> 3</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">12</h3>
<p class="text-gray-500 text-sm">待审批请假</p>
</div>
<div class="stat-card purple bg-white rounded-2xl p-6 card-hover shadow-sm">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-purple-100 rounded-xl flex items-center justify-center">
<DollarOutlined class="text-purple-600 text-xl" />
</div>
<span class="text-green-500 text-sm font-medium flex items-center gap-1"><ArrowUpOutlined /> 8%</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">¥156<span class="text-lg"></span></h3>
<p class="text-gray-500 text-sm">本月薪资总额</p>
</div>
</div>
<!-- 快捷操作栏 -->
<div class="bg-white/85 backdrop-blur-xl rounded-2xl p-4 mb-8 shadow-sm">
<div class="flex items-center justify-between">
<div class="flex gap-3">
<a-button type="primary" class="bg-gradient-to-r from-purple-600 to-purple-700 border-0">
<PlusOutlined />
新增员工
</a-button>
<a-button>
<ImportOutlined class="text-blue-500" />
批量导入
</a-button>
<a-button>
<ExportOutlined class="text-green-500" />
导出报表
</a-button>
</div>
<div class="flex gap-3">
<a-button>
<FilterOutlined class="text-gray-500" />
筛选
</a-button>
<a-button>
<CalendarOutlined class="text-gray-500" />
2026年4月
</a-button>
</div>
</div>
</div>
<!-- 标签页 -->
<div class="bg-white/85 backdrop-blur-xl rounded-2xl p-2 mb-8 inline-flex shadow-sm">
<a-segmented v-model:value="activeTab" :options="tabOptions" />
</div>
<!-- 员工列表 -->
<div class="bg-white/85 backdrop-blur-xl rounded-2xl overflow-hidden mb-8 shadow-sm">
<div class="p-6 border-b border-gray-100">
<div class="flex items-center justify-between">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<UnorderedListOutlined class="text-purple-500" />
员工列表
<a-tag color="purple">186</a-tag>
</h3>
<div class="flex items-center gap-3">
<a-input-search
v-model:value="listSearchKeyword"
placeholder="搜索姓名、工号、部门..."
class="w-64"
/>
</div>
</div>
</div>
<a-table :dataSource="employeeData" :columns="columns" :pagination="false">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'employee'">
<div class="flex items-center gap-3">
<a-avatar :style="{ background: record.avatarBg }">{{ record.name[0] }}</a-avatar>
<div>
<p class="font-medium text-gray-800">{{ record.name }}</p>
<p class="text-xs text-gray-500">{{ record.employeeId }}</p>
</div>
</div>
</template>
<template v-if="column.key === 'department'">
<p class="font-medium text-gray-800">{{ record.department }}</p>
<p class="text-xs text-gray-500">{{ record.position }}</p>
</template>
<template v-if="column.key === 'status'">
<a-tag :color="getStatusColor(record.status)">
<template v-if="record.status === 'active'"><CheckCircleOutlined /> 在职</template>
<template v-else-if="record.status === 'probation'"><ClockCircleOutlined /> 试用期</template>
<template v-else-if="record.status === 'leave'"><PauseCircleOutlined /> 休假中</template>
<template v-else-if="record.status === 'resigned'"><CloseCircleOutlined /> 已离职</template>
</a-tag>
</template>
<template v-if="column.key === 'action'">
<div class="flex items-center justify-center gap-2">
<a-button type="text" size="small" class="text-blue-600">
<EyeOutlined />
</a-button>
<a-button type="text" size="small" class="text-green-600">
<EditOutlined />
</a-button>
<a-button type="text" size="small" class="text-red-600">
<DeleteOutlined />
</a-button>
</div>
</template>
</template>
</a-table>
<!-- 分页 -->
<div class="p-6 border-t border-gray-100">
<div class="flex items-center justify-between">
<p class="text-sm text-gray-500">显示 1-5 186 </p>
<a-pagination v-model:current="currentPage" :total="186" :pageSize="5" show-less-items />
</div>
</div>
</div>
<!-- 底部区域 -->
<div class="grid grid-cols-2 gap-6">
<!-- 部门分布 -->
<div class="bg-white/85 backdrop-blur-xl rounded-2xl p-6 card-hover shadow-sm">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<PieChartOutlined class="text-blue-500" />
部门人员分布
</h3>
<button class="text-purple-600 text-sm font-medium hover:underline">查看全部</button>
</div>
<div class="space-y-4">
<div v-for="dept in departments" :key="dept.name">
<div class="flex items-center justify-between mb-2">
<span class="text-sm text-gray-600">{{ dept.name }}</span>
<span class="text-sm font-medium text-gray-800">{{ dept.count }} ({{ dept.percent }}%)</span>
</div>
<a-progress :percent="dept.percent" :stroke-color="dept.color" :show-info="false" />
</div>
</div>
</div>
<!-- 待办事项 -->
<div class="bg-white/85 backdrop-blur-xl rounded-2xl p-6 card-hover shadow-sm">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<BellOutlined class="text-orange-500" />
待办事项
</h3>
<a-badge count="5" />
</div>
<div class="space-y-3">
<div
v-for="todo in todos"
:key="todo.id"
class="todo-item flex items-center gap-4 p-4 bg-gray-50 rounded-xl cursor-pointer hover:shadow-md transition-all"
>
<div class="w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0" :class="todo.iconBg">
<component :is="todo.icon" :class="todo.iconColor" />
</div>
<div class="flex-1">
<h4 class="font-medium text-gray-800">{{ todo.title }}</h4>
<p class="text-xs text-gray-500">{{ todo.desc }}</p>
</div>
<a-tag :color="todo.urgency === 'high' ? 'red' : todo.urgency === 'medium' ? 'orange' : 'blue'">
{{ todo.urgencyText }}
</a-tag>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import {
HomeOutlined,
SettingOutlined,
ShoppingCartOutlined,
InboxOutlined,
WalletOutlined,
TeamOutlined,
ProjectOutlined,
UserOutlined,
LogoutOutlined,
SearchOutlined,
FullscreenOutlined,
BellOutlined,
GlobalOutlined,
ArrowLeftOutlined,
ArrowUpOutlined,
PlusOutlined,
ImportOutlined,
ExportOutlined,
FilterOutlined,
CalendarOutlined,
UnorderedListOutlined,
CheckCircleOutlined,
ClockCircleOutlined,
DollarOutlined,
UserAddOutlined,
PauseCircleOutlined,
CloseCircleOutlined,
EyeOutlined,
EditOutlined,
DeleteOutlined,
PieChartOutlined,
BlockOutlined,
FileTextOutlined,
CheckOutlined,
} from '@ant-design/icons-vue'
definePageMeta({ layout: 'blank' })
// 搜索关键词
const searchKeyword = ref('')
const listSearchKeyword = ref('')
const currentPage = ref(1)
// 标签页
const activeTab = ref('员工管理')
const tabOptions = ['员工管理', '组织架构', '考勤管理', '薪资福利', '招聘管理']
// 表格列定义
const columns = [
{ title: '员工信息', key: 'employee' },
{ title: '部门职位', key: 'department' },
{ title: '入职日期', dataIndex: 'joinDate', key: 'joinDate' },
{ title: '联系方式', dataIndex: 'phone', key: 'phone' },
{ title: '状态', key: 'status' },
{ title: '操作', key: 'action', align: 'center' },
]
// 员工数据
const employeeData = [
{
key: '1',
name: '张三',
employeeId: 'TT2024001',
department: '技术部',
position: '高级前端工程师',
joinDate: '2024-03-15',
phone: '138****1234',
status: 'active',
avatarBg: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
},
{
key: '2',
name: '李四',
employeeId: 'TT2024002',
department: '产品部',
position: '产品经理',
joinDate: '2024-02-20',
phone: '139****5678',
status: 'active',
avatarBg: 'linear-gradient(135deg, #11998e 0%, #38ef7d 100%)',
},
{
key: '3',
name: '王五',
employeeId: 'TT2025001',
department: '销售部',
position: '销售经理',
joinDate: '2025-01-10',
phone: '137****9012',
status: 'probation',
avatarBg: 'linear-gradient(135deg, #f5576c 0%, #f093fb 100%)',
},
{
key: '4',
name: '赵六',
employeeId: 'TT2023005',
department: '人事部',
position: 'HR专员',
joinDate: '2023-08-15',
phone: '136****3456',
status: 'leave',
avatarBg: 'linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)',
},
{
key: '5',
name: '孙七',
employeeId: 'TT2022008',
department: '财务部',
position: '财务主管',
joinDate: '2022-06-01',
phone: '135****7890',
status: 'active',
avatarBg: 'linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)',
},
]
// 部门数据
const departments = [
{ name: '技术部', count: 45, percent: 24, color: { from: '#667eea', to: '#764ba2' } },
{ name: '销售部', count: 38, percent: 20, color: { from: '#11998e', to: '#38ef7d' } },
{ name: '产品部', count: 25, percent: 13, color: { from: '#f5576c', to: '#f093fb' } },
{ name: '运营部', count: 32, percent: 17, color: { from: '#ffecd2', to: '#fcb69f' } },
{ name: '人事行政部', count: 18, percent: 10, color: { from: '#a8edea', to: '#fed6e3' } },
{ name: '财务部', count: 15, percent: 8, color: { from: '#667eea', to: '#764ba2' } },
{ name: '其他', count: 13, percent: 7, color: { from: '#11998e', to: '#38ef7d' } },
]
// 待办事项
const todos = [
{ id: 1, title: '审批请假申请', desc: '技术部 - 张三3天病假', urgency: 'high', urgencyText: '紧急', icon: FileTextOutlined, iconBg: 'bg-red-100', iconColor: 'text-red-600' },
{ id: 2, title: '试用期转正评估', desc: '销售部 - 王五入职3个月', urgency: 'medium', urgencyText: '今日', icon: CheckOutlined, iconBg: 'bg-orange-100', iconColor: 'text-orange-600' },
{ id: 3, title: '薪资调整审批', desc: '产品部 - 李四,晋升调薪', urgency: 'medium', urgencyText: '本周', icon: DollarOutlined, iconBg: 'bg-blue-100', iconColor: 'text-blue-600' },
{ id: 4, title: '新员工入职办理', desc: '明天有2名新员工报到', urgency: 'low', urgencyText: '明日', icon: UserAddOutlined, iconBg: 'bg-green-100', iconColor: 'text-green-600' },
]
// 获取状态颜色
const getStatusColor = (status: string) => {
const colorMap: Record<string, string> = {
active: 'success',
probation: 'warning',
leave: 'processing',
resigned: 'default',
}
return colorMap[status] || 'default'
}
</script>
<style scoped>
.sidebar {
background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}
.sidebar-item {
color: white;
}
.sidebar-item:hover,
.sidebar-item.active {
background: rgba(255, 255, 255, 0.2);
}
.card-hover {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.stat-card {
position: relative;
overflow: hidden;
}
.stat-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
}
.stat-card.blue::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.stat-card.green::before { background: linear-gradient(90deg, #11998e, #38ef7d); }
.stat-card.orange::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.stat-card.purple::before { background: linear-gradient(90deg, #a8edea, #fed6e3); }
.todo-item {
transition: all 0.3s ease;
}
</style>

View File

@@ -9,7 +9,7 @@
<BlockOutlined class="text-xl" />
</div>
<div>
<h1 class="font-bold text-lg">天天系统</h1>
<h1 class="font-bold text-lg">DEMO演示系统</h1>
<p class="text-xs text-white/70">ERP 管理平台</p>
</div>
</div>
@@ -18,34 +18,34 @@
<!-- 导航菜单 -->
<nav class="flex-1 py-6 px-3">
<div class="space-y-1">
<a href="#" class="sidebar-item active flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer" @click.prevent="activeMenu = 'home'">
<NuxtLink to="/" class="sidebar-item active flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<HomeOutlined class="text-base" />
<span>工作台</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer" @click.prevent="activeMenu = 'device'">
</NuxtLink>
<NuxtLink to="/device" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<SettingOutlined class="text-base" />
<span>设备管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer" @click.prevent="activeMenu = 'purchase'">
</NuxtLink>
<NuxtLink to="/procurement" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<ShoppingCartOutlined class="text-base" />
<span>采购管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer" @click.prevent="activeMenu = 'warehouse'">
</NuxtLink>
<NuxtLink to="/warehouse" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<InboxOutlined class="text-base" />
<span>仓储物流</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer" @click.prevent="activeMenu = 'finance'">
</NuxtLink>
<NuxtLink to="/finance" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<WalletOutlined class="text-base" />
<span>财务管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer" @click.prevent="activeMenu = 'hr'">
</NuxtLink>
<NuxtLink to="/hr" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<TeamOutlined class="text-base" />
<span>人力资源</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer" @click.prevent="activeMenu = 'office'">
</NuxtLink>
<NuxtLink to="/office" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<ProjectOutlined class="text-base" />
<span>协同办公</span>
</a>
</NuxtLink>
</div>
<div class="mt-8 pt-6 border-t border-white/10">
@@ -336,12 +336,12 @@ const todos = [
// 应用模块
const apps = [
{ name: '设备管理', icon: SettingOutlined, gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', stats: '128 设备', route: '/admin/device' },
{ name: '采购管理', icon: ShoppingCartOutlined, gradient: 'linear-gradient(135deg, #11998e 0%, #38ef7d 100%)', stats: '23 订单', route: '/admin/purchase' },
{ name: '仓储物流', icon: InboxOutlined, gradient: 'linear-gradient(135deg, #f5576c 0%, #f093fb 100%)', stats: '5,230 物料', route: '/admin/warehouse' },
{ name: '财务管理', icon: WalletOutlined, gradient: 'linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)', stats: 89.5万', route: '/admin/finance' },
{ name: '人力资源', icon: TeamOutlined, gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', stats: '56 员工', route: '/admin/hr' },
{ name: '协同办公', icon: ProjectOutlined, gradient: 'linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)', stats: '8 流程', route: '/admin/office' },
{ name: '设备管理', icon: SettingOutlined, gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', stats: '128 设备', route: '/device' },
{ name: '采购管理', icon: ShoppingCartOutlined, gradient: 'linear-gradient(135deg, #11998e 0%, #38ef7d 100%)', stats: '23 订单', route: '/procurement' },
{ name: '仓储物流', icon: InboxOutlined, gradient: 'linear-gradient(135deg, #f5576c 0%, #f093fb 100%)', stats: '5,230 物料', route: '/warehouse' },
{ name: '财务管理', icon: WalletOutlined, gradient: 'linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)', stats: 328万', route: '/finance' },
{ name: '人力资源', icon: TeamOutlined, gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', stats: '186 员工', route: '/hr' },
{ name: '协同办公', icon: ProjectOutlined, gradient: 'linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)', stats: '24 任务', route: '/office' },
]
// 图表数据
@@ -366,6 +366,10 @@ const navigateToApp = (route: string) => {
background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}
.sidebar-item {
color: white;
}
.sidebar-item:hover,
.sidebar-item.active {
background: rgba(255, 255, 255, 0.2);

View File

@@ -43,78 +43,80 @@
</div>
<a-tag color="red" class="priority-badge">高优先</a-tag>
</div>
<draggable
v-model="todoTasks"
group="tasks"
item-key="id"
class="task-list"
@change="handleTaskMove"
>
<template #item="{ element: task }">
<div class="task-card" @click="openTaskDetail(task.id)">
<div class="task-card-header">
<div class="task-priority">
<a-tag :color="getPriorityColor(task.priority)" size="small">
{{ getPriorityText(task.priority) }}
</a-tag>
</div>
<div class="task-actions">
<a-dropdown :trigger="['click']">
<a-button type="text" size="small" class="more-button">
<MoreOutlined />
</a-button>
<template #overlay>
<a-menu>
<a-menu-item key="edit" @click="editTask(task)">
<EditOutlined /> 编辑
</a-menu-item>
<a-menu-item key="assign" @click="assignTask(task)">
<UserAddOutlined /> 分配
</a-menu-item>
<a-menu-item key="delete" danger @click="deleteTask(task)">
<DeleteOutlined /> 删除
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</div>
<div class="task-list">
<div
v-for="task in todoTasks"
:key="task.id"
class="task-card"
@click="openTaskDetail(task.id)"
>
<div class="task-card-header">
<div class="task-priority">
<a-tag :color="getPriorityColor(task.priority)" size="small">
{{ getPriorityText(task.priority) }}
</a-tag>
</div>
<div class="task-title">{{ task.title }}</div>
<div class="task-description" v-if="task.description">
{{ task.description }}
</div>
<div class="task-meta">
<div class="meta-item">
<UserOutlined />
<span>{{ task.assignee }}</span>
</div>
<div class="meta-item">
<CalendarOutlined />
<span :class="{ 'deadline-warning': isDeadlineWarning(task.dueDate) }">
{{ task.dueDate }}
</span>
</div>
</div>
<div class="task-footer">
<div class="task-project">
<span class="project-tag">#{{ task.project }}</span>
</div>
<div class="task-avatars">
<a-avatar-group :max-count="2" size="small">
<a-avatar v-for="avatar in task.collaborators" :key="avatar" :src="avatar" />
</a-avatar-group>
<span v-if="task.collaborators.length > 2" class="more-count">
+{{ task.collaborators.length - 2 }}
</span>
</div>
<div class="task-actions">
<a-dropdown :trigger="['click']">
<a-button type="text" size="small" class="more-button">
<MoreOutlined />
</a-button>
<template #overlay>
<a-menu>
<a-menu-item key="edit" @click="editTask(task)">
<EditOutlined /> 编辑
</a-menu-item>
<a-menu-item key="assign" @click="assignTask(task)">
<UserAddOutlined /> 分配
</a-menu-item>
<a-menu-divider />
<a-menu-item key="move" @click="moveTaskToProgress(task)">
<RightOutlined /> 移动到进行中
</a-menu-item>
<a-menu-divider />
<a-menu-item key="delete" danger @click="deleteTask(task)">
<DeleteOutlined /> 删除
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</div>
</div>
</template>
</draggable>
<div class="task-title">{{ task.title }}</div>
<div class="task-description" v-if="task.description">
{{ task.description }}
</div>
<div class="task-meta">
<div class="meta-item">
<UserOutlined />
<span>{{ task.assignee }}</span>
</div>
<div class="meta-item">
<CalendarOutlined />
<span :class="{ 'deadline-warning': isDeadlineWarning(task.dueDate) }">
{{ task.dueDate }}
</span>
</div>
</div>
<div class="task-footer">
<div class="task-project">
<span class="project-tag">#{{ task.project }}</span>
</div>
<div class="task-avatars">
<a-avatar-group :max-count="2" size="small">
<a-avatar v-for="avatar in task.collaborators" :key="avatar" :src="avatar" />
</a-avatar-group>
<span v-if="task.collaborators.length > 2" class="more-count">
+{{ task.collaborators.length - 2 }}
</span>
</div>
</div>
</div>
</div>
</div>
<!-- In Progress -->
@@ -127,77 +129,79 @@
</div>
<a-tag color="orange" class="priority-badge">进行中</a-tag>
</div>
<draggable
v-model="inProgressTasks"
group="tasks"
item-key="id"
class="task-list"
@change="handleTaskMove"
>
<template #item="{ element: task }">
<div class="task-card" @click="openTaskDetail(task.id)">
<div class="task-card-header">
<div class="task-priority">
<a-tag :color="getPriorityColor(task.priority)" size="small">
{{ getPriorityText(task.priority) }}
</a-tag>
</div>
<div class="task-actions">
<a-dropdown :trigger="['click']">
<a-button type="text" size="small" class="more-button">
<MoreOutlined />
</a-button>
<template #overlay>
<a-menu>
<a-menu-item key="edit" @click="editTask(task)">
<EditOutlined /> 编辑
</a-menu-item>
<a-menu-item key="complete" @click="completeTask(task)">
<CheckCircleOutlined /> 完成
</a-menu-item>
<a-menu-item key="delete" danger @click="deleteTask(task)">
<DeleteOutlined /> 删除
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</div>
<div class="task-list">
<div
v-for="task in inProgressTasks"
:key="task.id"
class="task-card"
@click="openTaskDetail(task.id)"
>
<div class="task-card-header">
<div class="task-priority">
<a-tag :color="getPriorityColor(task.priority)" size="small">
{{ getPriorityText(task.priority) }}
</a-tag>
</div>
<div class="task-title">{{ task.title }}</div>
<div class="task-description" v-if="task.description">
{{ task.description }}
</div>
<div class="task-meta">
<div class="meta-item">
<UserOutlined />
<span>{{ task.assignee }}</span>
</div>
<div class="meta-item">
<FieldTimeOutlined />
<span>已耗时 {{ task.elapsedTime || '--' }}</span>
</div>
</div>
<div class="task-progress">
<a-progress :percent="task.progress || 0" size="small" />
</div>
<div class="task-footer">
<div class="task-project">
<span class="project-tag">#{{ task.project }}</span>
</div>
<div class="task-avatars">
<a-avatar-group :max-count="2" size="small">
<a-avatar v-for="avatar in task.collaborators" :key="avatar" :src="avatar" />
</a-avatar-group>
</div>
<div class="task-actions">
<a-dropdown :trigger="['click']">
<a-button type="text" size="small" class="more-button">
<MoreOutlined />
</a-button>
<template #overlay>
<a-menu>
<a-menu-item key="edit" @click="editTask(task)">
<EditOutlined /> 编辑
</a-menu-item>
<a-menu-item key="complete" @click="completeTask(task)">
<CheckCircleOutlined /> 标记完成
</a-menu-item>
<a-menu-divider />
<a-menu-item key="move" @click="moveTaskToReview(task)">
<RightOutlined /> 移动到待审核
</a-menu-item>
<a-menu-divider />
<a-menu-item key="delete" danger @click="deleteTask(task)">
<DeleteOutlined /> 删除
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</div>
</div>
</template>
</draggable>
<div class="task-title">{{ task.title }}</div>
<div class="task-description" v-if="task.description">
{{ task.description }}
</div>
<div class="task-meta">
<div class="meta-item">
<UserOutlined />
<span>{{ task.assignee }}</span>
</div>
<div class="meta-item">
<FieldTimeOutlined />
<span>已耗时 {{ task.elapsedTime || '--' }}</span>
</div>
</div>
<div class="task-progress">
<a-progress :percent="task.progress || 0" size="small" />
</div>
<div class="task-footer">
<div class="task-project">
<span class="project-tag">#{{ task.project }}</span>
</div>
<div class="task-avatars">
<a-avatar-group :max-count="2" size="small">
<a-avatar v-for="avatar in task.collaborators" :key="avatar" :src="avatar" />
</a-avatar-group>
</div>
</div>
</div>
</div>
</div>
<!-- Review -->
@@ -210,62 +214,76 @@
</div>
<a-tag color="blue" class="priority-badge">待审核</a-tag>
</div>
<draggable
v-model="reviewTasks"
group="tasks"
item-key="id"
class="task-list"
@change="handleTaskMove"
>
<template #item="{ element: task }">
<div class="task-card" @click="openTaskDetail(task.id)">
<div class="task-card-header">
<div class="task-priority">
<a-tag :color="getPriorityColor(task.priority)" size="small">
{{ getPriorityText(task.priority) }}
</a-tag>
</div>
<div class="task-reviewer">
<a-tag color="cyan" size="small">审核: {{ task.reviewer }}</a-tag>
</div>
<div class="task-list">
<div
v-for="task in reviewTasks"
:key="task.id"
class="task-card"
@click="openTaskDetail(task.id)"
>
<div class="task-card-header">
<div class="task-priority">
<a-tag :color="getPriorityColor(task.priority)" size="small">
{{ getPriorityText(task.priority) }}
</a-tag>
</div>
<div class="task-title">{{ task.title }}</div>
<div class="task-description" v-if="task.description">
{{ task.description }}
</div>
<div class="task-meta">
<div class="meta-item">
<UserOutlined />
<span>{{ task.assignee }}</span>
</div>
<div class="meta-item">
<CalendarOutlined />
<span>提交: {{ task.submittedDate }}</span>
</div>
</div>
<div class="task-actions-row">
<a-space>
<a-button size="small" type="primary" @click.stop="approveTask(task)">
<CheckCircleOutlined /> 通过
</a-button>
<a-button size="small" danger @click.stop="rejectTask(task)">
<CloseCircleOutlined /> 驳回
</a-button>
</a-space>
</div>
<div class="task-footer">
<div class="task-project">
<span class="project-tag">#{{ task.project }}</span>
</div>
<div class="task-reviewer">
<a-tag color="cyan" size="small">审核: {{ task.reviewer }}</a-tag>
</div>
</div>
</template>
</draggable>
<div class="task-title">{{ task.title }}</div>
<div class="task-description" v-if="task.description">
{{ task.description }}
</div>
<div class="task-meta">
<div class="meta-item">
<UserOutlined />
<span>{{ task.assignee }}</span>
</div>
<div class="meta-item">
<CalendarOutlined />
<span>提交: {{ task.submittedDate }}</span>
</div>
</div>
<div class="task-actions-row">
<a-space>
<a-button size="small" type="primary" @click.stop="approveTask(task)">
<CheckCircleOutlined /> 通过
</a-button>
<a-button size="small" danger @click.stop="rejectTask(task)">
<CloseCircleOutlined /> 驳回
</a-button>
<a-dropdown>
<template #overlay>
<a-menu>
<a-menu-item key="move" @click="moveTaskToDone(task)">
移动到已完成
</a-menu-item>
<a-menu-item key="back" @click="moveTaskToTodo(task)">
退回给负责人
</a-menu-item>
<a-menu-divider />
<a-menu-item key="delete" danger>删除</a-menu-item>
</a-menu>
</template>
<a-button size="small">
更多
</a-button>
</a-dropdown>
</a-space>
</div>
<div class="task-footer">
<div class="task-project">
<span class="project-tag">#{{ task.project }}</span>
</div>
</div>
</div>
</div>
</div>
<!-- Done -->
@@ -278,63 +296,60 @@
</div>
<a-tag color="green" class="priority-badge">已完成</a-tag>
</div>
<draggable
v-model="doneTasks"
group="tasks"
item-key="id"
class="task-list"
@change="handleTaskMove"
>
<template #item="{ element: task }">
<div class="task-card completed" @click="openTaskDetail(task.id)">
<div class="task-card-header">
<div class="task-priority">
<a-tag :color="'green'" size="small">
已完成
</a-tag>
</div>
<div class="task-completed-time">
<a-tag color="green" size="small">
{{ task.completedTime }}
</a-tag>
</div>
<div class="task-list">
<div
v-for="task in doneTasks"
:key="task.id"
class="task-card completed"
@click="openTaskDetail(task.id)"
>
<div class="task-card-header">
<div class="task-priority">
<a-tag :color="'green'" size="small">
已完成
</a-tag>
</div>
<div class="task-title">
<span class="completed-text">{{ task.title }}</span>
</div>
<div class="task-description" v-if="task.description">
{{ task.description }}
</div>
<div class="task-meta">
<div class="meta-item">
<UserOutlined />
<span>{{ task.assignee }}</span>
</div>
<div class="meta-item">
<CheckCircleOutlined />
<span>{{ task.completedBy }}</span>
</div>
</div>
<div class="task-comment" v-if="task.comment">
<div class="comment-label">评价:</div>
<div class="comment-content">{{ task.comment }}</div>
</div>
<div class="task-footer">
<div class="task-project">
<span class="project-tag">#{{ task.project }}</span>
</div>
<div class="task-rating" v-if="task.rating">
<a-rate :value="task.rating" disabled />
</div>
<div class="task-completed-time">
<a-tag color="green" size="small">
{{ task.completedTime }}
</a-tag>
</div>
</div>
</template>
</draggable>
<div class="task-title">
<span class="completed-text">{{ task.title }}</span>
</div>
<div class="task-description" v-if="task.description">
{{ task.description }}
</div>
<div class="task-meta">
<div class="meta-item">
<UserOutlined />
<span>{{ task.assignee }}</span>
</div>
<div class="meta-item">
<CheckCircleOutlined />
<span>{{ task.completedBy }}</span>
</div>
</div>
<div class="task-comment" v-if="task.comment">
<div class="comment-label">评价:</div>
<div class="comment-content">{{ task.comment }}</div>
</div>
<div class="task-footer">
<div class="task-project">
<span class="project-tag">#{{ task.project }}</span>
</div>
<div class="task-rating" v-if="task.rating">
<a-rate :value="task.rating" disabled />
</div>
</div>
</div>
</div>
</div>
</div>
@@ -391,18 +406,128 @@
<!-- 新建任务模态框 -->
<a-modal
v-model:open="showCreateModal"
title="新建任务"
:title="formMode === 'create' ? '新建任务' : '编辑任务'"
:footer="null"
width="600px"
@cancel="resetForm"
>
<task-form
ref="taskFormRef"
:mode="formMode"
:initial-data="editingTask"
@submit="handleTaskSubmit"
@cancel="resetForm"
/>
<a-space direction="vertical" size="large" style="width: 100%">
<div v-if="formMode === 'create'">
<a-form :model="simpleTaskForm" layout="vertical">
<a-form-item label="任务标题" required>
<a-input
v-model:value="simpleTaskForm.title"
placeholder="请输入任务标题"
:maxlength="200"
/>
</a-form-item>
<a-form-item label="任务描述(选填)">
<a-textarea
v-model:value="simpleTaskForm.description"
placeholder="请输入详细任务描述"
:rows="3"
:maxlength="500"
show-count
/>
</a-form-item>
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="优先级" required>
<a-select
v-model:value="simpleTaskForm.priority"
placeholder="选择优先级"
style="width: 100%"
>
<a-select-option value="high"></a-select-option>
<a-select-option value="medium"></a-select-option>
<a-select-option value="low"></a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="负责人" required>
<a-select
v-model:value="simpleTaskForm.assignee"
placeholder="选择负责人"
style="width: 100%"
>
<a-select-option v-for="member in teamMembers" :key="member.id" :value="member.name">
{{ member.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="所属项目" required>
<a-select
v-model:value="simpleTaskForm.project"
placeholder="选择项目"
style="width: 100%"
>
<a-select-option v-for="project in activeProjects" :key="project.id" :value="project.name">
{{ project.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="截止日期">
<a-date-picker
v-model:value="simpleTaskForm.dueDate"
placeholder="选择截止日期"
style="width: 100%"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
<div v-else-if="editingTask">
<div class="edit-task-info">
<h4>编辑任务: {{ editingTask.title }}</h4>
<p class="form-help-text">更新任务信息并说明修改理由</p>
</div>
<a-form layout="vertical">
<a-form-item label="任务标题" required>
<a-input
v-model:value="editingTask.title"
placeholder="请输入任务标题"
:maxlength="200"
/>
</a-form-item>
<a-form-item label="任务描述">
<a-textarea
v-model:value="editingTask.description"
placeholder="请输入详细任务描述"
:rows="3"
:maxlength="500"
show-count
/>
</a-form-item>
<a-form-item label="修改备注(选填)">
<a-textarea
v-model:value="editRemark"
placeholder="请说明本次修改的理由"
:rows="2"
:maxlength="200"
show-count
/>
</a-form-item>
</a-form>
</div>
<div class="form-actions">
<a-space>
<a-button type="primary" @click="handleTaskSubmit">
{{ formMode === 'create' ? '创建任务' : '保存修改' }}
</a-button>
<a-button @click="resetForm">取消</a-button>
</a-space>
</div>
</a-space>
</a-modal>
</div>
</template>
@@ -410,11 +535,11 @@
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue'
import { message } from 'ant-design-vue'
import draggable from 'vuedraggable'
import {
PlusOutlined, DownOutlined, MoreOutlined, EditOutlined,
DeleteOutlined, UserOutlined, CalendarOutlined, FieldTimeOutlined,
CheckCircleOutlined, CloseCircleOutlined, UserAddOutlined
CheckCircleOutlined, CloseCircleOutlined, UserAddOutlined,
RightOutlined
} from '@ant-design/icons-vue'
interface Task {
@@ -563,7 +688,17 @@ const completionRate = computed(() => {
const showCreateModal = ref(false)
const formMode = ref<'create' | 'edit'>('create')
const editingTask = ref<Task | null>(null)
const taskFormRef = ref()
const editRemark = ref('')
// 新增任务表单
const simpleTaskForm = ref({
title: '',
description: '',
priority: 'medium' as 'low' | 'medium' | 'high',
assignee: '',
project: '',
dueDate: null as any
})
// 方法
function handleMenuClick({ key }: { key: string }) {
@@ -588,38 +723,59 @@ function isDeadlineWarning(dueDate: string) {
return diffDays <= 3 && diffDays > 0
}
function handleTaskMove(event: any) {
if (event.added) {
const task = event.added.element
const newStatus = getColumnStatus(event.added.newIndex)
updateTaskStatus(task.id, newStatus)
message.success(`任务已移动到${getStatusText(newStatus)}`)
function moveTaskToProgress(task: Task) {
const index = todoTasks.value.findIndex(t => t.id === task.id)
if (index !== -1) {
const [movedTask] = todoTasks.value.splice(index, 1)
movedTask.status = 'in_progress'
inProgressTasks.value.push(movedTask)
message.success(`任务"${task.title}"已移动到进行中`)
}
}
function getColumnStatus(index: number) {
const statusMap: Record<number, Task['status']> = {
0: 'todo',
1: 'in_progress',
2: 'review',
3: 'done'
function moveTaskToReview(task: Task) {
const index = inProgressTasks.value.findIndex(t => t.id === task.id)
if (index !== -1) {
const [movedTask] = inProgressTasks.value.splice(index, 1)
movedTask.status = 'review'
movedTask.submittedDate = new Date().toLocaleDateString()
reviewTasks.value.push(movedTask)
message.success(`任务"${task.title}"已提交审核`)
}
return statusMap[index]
}
function getStatusText(status: Task['status']) {
const texts = {
todo: '待处理',
in_progress: '进行中',
review: '待审核',
done: '已完成'
function moveTaskToDone(task: Task) {
const index = reviewTasks.value.findIndex(t => t.id === task.id)
if (index !== -1) {
const [movedTask] = reviewTasks.value.splice(index, 1)
movedTask.status = 'done'
movedTask.completedTime = '刚刚'
movedTask.completedBy = '审核人'
doneTasks.value.push(movedTask)
message.success(`任务"${task.title}"已标记为已完成`)
}
return texts[status]
}
function updateTaskStatus(taskId: number, status: Task['status']) {
// 在实际应用中这里应该调用API更新任务状态
console.log(`更新任务${taskId}状态为${status}`)
function moveTaskToTodo(task: Task) {
// 从待审核列退回
const index = reviewTasks.value.findIndex(t => t.id === task.id)
if (index !== -1) {
const [movedTask] = reviewTasks.value.splice(index, 1)
movedTask.status = 'todo'
todoTasks.value.push(movedTask)
message.success(`任务"${task.title}"已退还给负责人`)
}
// 从已完成列恢复
const doneIndex = doneTasks.value.findIndex(t => t.id === task.id)
if (doneIndex !== -1) {
const [movedTask] = doneTasks.value.splice(doneIndex, 1)
movedTask.status = 'todo'
movedTask.completedTime = ''
movedTask.completedBy = ''
todoTasks.value.push(movedTask)
message.success(`任务"${task.title}"已恢复为待处理`)
}
}
function openTaskDetail(taskId: number) {
@@ -659,34 +815,62 @@ function rejectTask(task: Task) {
// 这里应该移动任务到待处理列
}
function handleTaskSubmit(taskData: any) {
// 团队成员数据(从概览页面引入)
const teamMembersData = ref([
{ id: 1, name: '张三', avatar: 'https://randomuser.me/api/portraits/men/32.jpg', role: '产品经理', status: '在线', tasks: 8 },
{ id: 2, name: '李四', avatar: 'https://randomuser.me/api/portraits/women/44.jpg', role: 'UI设计师', status: '在线', tasks: 5 },
{ id: 3, name: '王五', avatar: 'https://randomuser.me/api/portraits/men/67.jpg', role: '前端工程师', status: '忙碌', tasks: 12 },
{ id: 4, name: '赵六', avatar: 'https://randomuser.me/api/portraits/women/23.jpg', role: '后端工程师', status: '在线', tasks: 9 },
{ id: 5, name: '钱七', avatar: 'https://randomuser.me/api/portraits/men/89.jpg', role: '测试工程师', status: '离开', tasks: 7 },
{ id: 6, name: '孙八', avatar: 'https://randomuser.me/api/portraits/women/56.jpg', role: '运维工程师', status: '离线', tasks: 4 }
])
function handleTaskSubmit() {
if (formMode.value === 'create') {
if (!simpleTaskForm.value.title.trim() || !simpleTaskForm.value.assignee || !simpleTaskForm.value.project) {
message.error('请填写必填项:任务标题、负责人和所属项目')
return
}
const newTask: Task = {
id: Date.now(),
title: taskData.title,
description: taskData.description,
priority: taskData.priority,
assignee: taskData.assignee,
project: taskData.project,
title: simpleTaskForm.value.title,
description: simpleTaskForm.value.description,
priority: simpleTaskForm.value.priority,
assignee: simpleTaskForm.value.assignee,
project: simpleTaskForm.value.project,
status: 'todo',
dueDate: taskData.dueDate?.format('YYYY-MM-DD') || taskData.dueDate,
collaborators: []
dueDate: simpleTaskForm.value.dueDate?.format('YYYY-MM-DD') || '今天 18:00',
collaborators: [
'https://randomuser.me/api/portraits/men/32.jpg',
'https://randomuser.me/api/portraits/women/44.jpg'
]
}
todoTasks.value.unshift(newTask)
message.success('任务创建成功')
} else {
resetForm()
} else if (editingTask.value) {
// 更新任务逻辑
message.success('任务更新成功')
resetForm()
}
resetForm()
}
function resetForm() {
showCreateModal.value = false
editingTask.value = null
formMode.value = 'create'
if (taskFormRef.value) {
taskFormRef.value.reset()
editRemark.value = ''
// 重置新建任务表单
simpleTaskForm.value = {
title: '',
description: '',
priority: 'medium',
assignee: '',
project: '',
dueDate: null
}
}

View File

@@ -9,7 +9,7 @@
<BlockOutlined class="text-xl" />
</div>
<div>
<h1 class="font-bold text-lg">天天系统</h1>
<h1 class="font-bold text-lg">DEMO演示系统</h1>
<p class="text-xs text-white/70">ERP 管理平台</p>
</div>
</div>
@@ -22,30 +22,30 @@
<HomeOutlined class="text-base" />
<span>工作台</span>
</NuxtLink>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<NuxtLink to="/device" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<SettingOutlined class="text-base" />
<span>设备管理</span>
</a>
</NuxtLink>
<NuxtLink to="/procurement" class="sidebar-item active flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<ShoppingCartOutlined class="text-base" />
<span>采购管理</span>
</NuxtLink>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<NuxtLink to="/warehouse" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<InboxOutlined class="text-base" />
<span>仓储物流</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
</NuxtLink>
<NuxtLink to="/finance" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<WalletOutlined class="text-base" />
<span>财务管理</span>
</a>
</NuxtLink>
<NuxtLink to="/hr" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<TeamOutlined class="text-base" />
<span>人力资源</span>
</NuxtLink>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<NuxtLink to="/office" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer">
<ProjectOutlined class="text-base" />
<span>协同办公</span>
</a>
</NuxtLink>
</div>
<div class="mt-8 pt-6 border-t border-white/10">
@@ -535,6 +535,10 @@ const getStatusColor = (status: string) => {
background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}
.sidebar-item {
color: white;
}
.sidebar-item:hover,
.sidebar-item.active {
background: rgba(255, 255, 255, 0.2);

View File

@@ -80,7 +80,7 @@ const doc = new Document({
children: [
new Paragraph({
children: [
new TextRun({ text: "天天系统 ERP", bold: true, color: colors.primary, size: 24 }),
new TextRun({ text: "DEMO演示系统 ERP", bold: true, color: colors.primary, size: 24 }),
new TextRun({ text: " 功能需求规划文档", color: colors.gray, size: 20 })
],
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: colors.primary } }
@@ -96,7 +96,7 @@ const doc = new Document({
new TextRun({ text: "第 ", color: colors.gray, size: 20 }),
new TextRun({ children: [PageNumber.CURRENT], color: colors.gray, size: 20 }),
new TextRun({ text: " 页", color: colors.gray, size: 20 }),
new TextRun({ text: " 天天系统 ERP - 机密文件", color: colors.gray, size: 20 })
new TextRun({ text: " DEMO演示系统 ERP - 机密文件", color: colors.gray, size: 20 })
],
alignment: AlignmentType.CENTER,
border: { top: { style: BorderStyle.SINGLE, size: 6, color: colors.primary } }
@@ -108,7 +108,7 @@ const doc = new Document({
// 封面
new Paragraph({ spacing: { before: 2400 } }),
new Paragraph({
children: [new TextRun({ text: "天天系统 ERP", bold: true, size: 72, color: colors.primary })],
children: [new TextRun({ text: "DEMO演示系统 ERP", bold: true, size: 72, color: colors.primary })],
alignment: AlignmentType.CENTER
}),
new Paragraph({

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>天天系统 - 功能菜单脑图</title>
<title>DEMO演示系统 - 功能菜单脑图</title>
<script src="https://cdn.jsdelivr.net/npm/markmap-lib@0.14.4/dist/browser/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
<script src="https://cdn.jsdelivr.net/npm/markmap-view@0.14.4/dist/browser/index.min.js"></script>
@@ -134,7 +134,7 @@
const { Markmap, loadCSS, loadJS } = markmap;
const data = {
content: "天天系统 ERP",
content: "DEMO演示系统 ERP",
children: [
{
content: "1⃣ 设备管理",

View File

@@ -1,4 +1,4 @@
# 天天系统 - 功能菜单规划
# DEMO演示系统 - 功能菜单规划
## 1. 设备管理
### 1.1 设备台账

View File

@@ -1,7 +1,7 @@
module.exports = {
apps: [
{
name: 'websopy-5555',
name: 'websopy-10591',
cwd: __dirname,
script: '.output/server/index.mjs',
interpreter: 'node',
@@ -9,8 +9,8 @@ module.exports = {
env: {
NODE_ENV: 'production',
NITRO_HOST: '0.0.0.0',
NITRO_PORT: 5555,
PORT: 5555,
NITRO_PORT: 10591,
PORT: 10591,
},
},
],

View File

@@ -1,805 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>天天系统 - 人力资源管理</title>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
* {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body {
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
min-height: 100vh;
}
.glass {
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.3);
}
.card-hover {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.stat-card {
position: relative;
overflow: hidden;
}
.stat-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
}
.stat-card.blue::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.stat-card.green::before { background: linear-gradient(90deg, #11998e, #38ef7d); }
.stat-card.orange::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.stat-card.purple::before { background: linear-gradient(90deg, #a8edea, #fed6e3); }
.stat-card.cyan::before { background: linear-gradient(90deg, #06beb6, #48b1bf); }
.stat-card.pink::before { background: linear-gradient(90deg, #ff9a9e, #fecfef); }
.sidebar {
background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}
.sidebar-item {
transition: all 0.2s ease;
}
.sidebar-item:hover, .sidebar-item.active {
background: rgba(255, 255, 255, 0.2);
}
.notification-badge {
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.gradient-text {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.scrollbar-hide::-webkit-scrollbar {
display: none;
}
.tab-btn {
transition: all 0.2s ease;
}
.tab-btn.active {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.employee-card {
transition: all 0.3s ease;
}
.employee-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 24px rgba(102, 126, 234, 0.15);
}
.progress-bar {
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}
.action-btn {
transition: all 0.2s ease;
}
.action-btn:hover {
transform: scale(1.1);
}
.dept-badge {
transition: all 0.2s ease;
}
.dept-badge:hover {
transform: scale(1.05);
}
</style>
</head>
<body class="scrollbar-hide">
<div class="flex min-h-screen">
<!-- 左侧导航 -->
<aside class="sidebar w-64 fixed h-full text-white flex flex-col">
<!-- Logo -->
<div class="p-6 border-b border-white/10">
<div class="flex items-center gap-3">
<div class="w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center">
<i class="fas fa-cube text-xl"></i>
</div>
<div>
<h1 class="font-bold text-lg">天天系统</h1>
<p class="text-xs text-white/70">ERP 管理平台</p>
</div>
</div>
</div>
<!-- 导航菜单 -->
<nav class="flex-1 py-6 px-3">
<div class="space-y-1">
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-home w-5"></i>
<span>工作台</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-cogs w-5"></i>
<span>设备管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-shopping-cart w-5"></i>
<span>采购管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-warehouse w-5"></i>
<span>仓储物流</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-wallet w-5"></i>
<span>财务管理</span>
</a>
<a href="#" class="sidebar-item active flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-users w-5"></i>
<span>人力资源</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-tasks w-5"></i>
<span>协同办公</span>
</a>
</div>
<div class="mt-8 pt-6 border-t border-white/10">
<p class="px-4 text-xs text-white/50 mb-3">个人</p>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-user w-5"></i>
<span>个人信息</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-cog w-5"></i>
<span>系统设置</span>
</a>
</div>
</nav>
<!-- 用户信息 -->
<div class="p-4 border-t border-white/10">
<div class="flex items-center gap-3">
<div class="w-10 h-10 bg-white/20 rounded-full flex items-center justify-center">
<i class="fas fa-user"></i>
</div>
<div class="flex-1">
<p class="font-medium">管理员</p>
<p class="text-xs text-white/70">超级管理员</p>
</div>
<button class="text-white/70 hover:text-white">
<i class="fas fa-sign-out-alt"></i>
</button>
</div>
</div>
</aside>
<!-- 主内容区 -->
<main class="flex-1 ml-64">
<!-- 顶部栏 -->
<header class="glass sticky top-0 z-50 px-8 py-4">
<div class="flex items-center justify-between">
<!-- 搜索 -->
<div class="relative w-96">
<input type="text" placeholder="🔍 搜索员工、部门、职位、档案..."
class="w-full px-5 py-3 bg-gray-100 rounded-xl border-0 focus:ring-2 focus:ring-purple-500 focus:bg-white transition-all">
</div>
<!-- 右侧 -->
<div class="flex items-center gap-6">
<!-- 全屏 -->
<button class="text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-expand text-lg"></i>
</button>
<!-- 消息 -->
<button class="relative text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-bell text-lg"></i>
<span class="notification-badge absolute -top-1 -right-1 w-5 h-5 bg-red-500 text-white text-xs rounded-full flex items-center justify-center">2</span>
</button>
<!-- 语言 -->
<button class="text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-globe text-lg"></i>
</button>
<!-- 用户 -->
<div class="flex items-center gap-3 pl-6 border-l border-gray-200">
<div class="w-10 h-10 bg-gradient-to-br from-purple-500 to-pink-500 rounded-xl flex items-center justify-center text-white font-bold">
A
</div>
<div>
<p class="font-medium text-gray-800">Admin</p>
<p class="text-xs text-gray-500">超级管理员</p>
</div>
</div>
</div>
</div>
</header>
<!-- 内容区域 -->
<div class="p-8">
<!-- 页面标题 -->
<div class="mb-8">
<div class="flex items-center justify-between">
<div>
<h2 class="text-3xl font-bold text-gray-800 mb-2">
<i class="fas fa-users text-purple-500 mr-3"></i>人力资源管理
</h2>
<p class="text-gray-500">管理企业员工信息、组织架构、考勤与薪酬</p>
</div>
<button class="px-6 py-3 bg-gradient-to-r from-purple-500 to-pink-500 text-white rounded-xl font-medium hover:shadow-lg transition-all flex items-center gap-2">
<i class="fas fa-plus"></i>
新增员工
</button>
</div>
</div>
<!-- 数据概览 -->
<div class="grid grid-cols-6 gap-4 mb-8">
<div class="stat-card blue glass rounded-2xl p-5 card-hover">
<div class="flex items-center justify-between mb-3">
<div class="w-10 h-10 bg-blue-100 rounded-xl flex items-center justify-center">
<i class="fas fa-users text-blue-600 text-lg"></i>
</div>
<span class="text-green-500 text-xs font-medium"><i class="fas fa-arrow-up"></i> 3</span>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-1">156</h3>
<p class="text-gray-500 text-xs">在职员工</p>
</div>
<div class="stat-card green glass rounded-2xl p-5 card-hover">
<div class="flex items-center justify-between mb-3">
<div class="w-10 h-10 bg-green-100 rounded-xl flex items-center justify-center">
<i class="fas fa-user-plus text-green-600 text-lg"></i>
</div>
<span class="text-green-500 text-xs font-medium"><i class="fas fa-arrow-up"></i> 2</span>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-1">8</h3>
<p class="text-gray-500 text-xs">本月入职</p>
</div>
<div class="stat-card orange glass rounded-2xl p-5 card-hover">
<div class="flex items-center justify-between mb-3">
<div class="w-10 h-10 bg-orange-100 rounded-xl flex items-center justify-center">
<i class="fas fa-user-minus text-orange-600 text-lg"></i>
</div>
<span class="text-gray-500 text-xs font-medium">-</span>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-1">3</h3>
<p class="text-gray-500 text-xs">本月离职</p>
</div>
<div class="stat-card purple glass rounded-2xl p-5 card-hover">
<div class="flex items-center justify-between mb-3">
<div class="w-10 h-10 bg-purple-100 rounded-xl flex items-center justify-center">
<i class="fas fa-calendar-check text-purple-600 text-lg"></i>
</div>
<span class="text-red-500 text-xs font-medium"><i class="fas fa-arrow-up"></i> 5</span>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-1">12</h3>
<p class="text-gray-500 text-xs">今日缺勤</p>
</div>
<div class="stat-card cyan glass rounded-2xl p-5 card-hover">
<div class="flex items-center justify-between mb-3">
<div class="w-10 h-10 bg-cyan-100 rounded-xl flex items-center justify-center">
<i class="fas fa-clock text-cyan-600 text-lg"></i>
</div>
<span class="text-green-500 text-xs font-medium">98%</span>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-1">144</h3>
<p class="text-gray-500 text-xs">今日出勤</p>
</div>
<div class="stat-card pink glass rounded-2xl p-5 card-hover">
<div class="flex items-center justify-between mb-3">
<div class="w-10 h-10 bg-pink-100 rounded-xl flex items-center justify-center">
<i class="fas fa-wallet text-pink-600 text-lg"></i>
</div>
<span class="text-green-500 text-xs font-medium"><i class="fas fa-arrow-up"></i> 8%</span>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-1">¥86.5<span class="text-sm"></span></h3>
<p class="text-gray-500 text-xs">本月薪酬</p>
</div>
</div>
<!-- 快捷操作与部门分布 -->
<div class="grid grid-cols-3 gap-6 mb-8">
<!-- 快捷操作 -->
<div class="glass rounded-2xl p-6 card-hover">
<h3 class="font-bold text-lg text-gray-800 mb-4 flex items-center gap-2">
<i class="fas fa-bolt text-yellow-500"></i>
快捷操作
</h3>
<div class="grid grid-cols-2 gap-3">
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium hover:bg-gradient-to-r hover:from-purple-500 hover:to-pink-500 hover:text-white transition-all">
<i class="fas fa-user-plus text-purple-500"></i>
入职办理
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium hover:bg-gradient-to-r hover:from-purple-500 hover:to-pink-500 hover:text-white transition-all">
<i class="fas fa-user-minus text-blue-500"></i>
离职办理
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium hover:bg-gradient-to-r hover:from-purple-500 hover:to-pink-500 hover:text-white transition-all">
<i class="fas fa-calendar-alt text-green-500"></i>
请假审批
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium hover:bg-gradient-to-r hover:from-purple-500 hover:to-pink-500 hover:text-white transition-all">
<i class="fas fa-file-invoice-dollar text-orange-500"></i>
薪资核算
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium hover:bg-gradient-to-r hover:from-purple-500 hover:to-pink-500 hover:text-white transition-all">
<i class="fas fa-chart-pie text-red-500"></i>
考勤统计
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium hover:bg-gradient-to-r hover:from-purple-500 hover:to-pink-500 hover:text-white transition-all">
<i class="fas fa-sitemap text-indigo-500"></i>
组织架构
</button>
</div>
</div>
<!-- 部门分布 -->
<div class="glass rounded-2xl p-6 card-hover col-span-2">
<div class="flex items-center justify-between mb-4">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-sitemap text-purple-500"></i>
部门人员分布
</h3>
<button class="text-purple-600 text-sm font-medium hover:underline">查看全部</button>
</div>
<div class="grid grid-cols-4 gap-4">
<div class="dept-badge p-4 bg-gradient-to-br from-blue-50 to-blue-100 rounded-xl cursor-pointer">
<div class="flex items-center justify-between mb-2">
<i class="fas fa-laptop-code text-blue-600 text-xl"></i>
<span class="text-2xl font-bold text-blue-600">32</span>
</div>
<p class="text-sm font-medium text-gray-700">技术研发部</p>
<p class="text-xs text-gray-500 mt-1">占比 20.5%</p>
</div>
<div class="dept-badge p-4 bg-gradient-to-br from-green-50 to-green-100 rounded-xl cursor-pointer">
<div class="flex items-center justify-between mb-2">
<i class="fas fa-bullhorn text-green-600 text-xl"></i>
<span class="text-2xl font-bold text-green-600">28</span>
</div>
<p class="text-sm font-medium text-gray-700">市场销售部</p>
<p class="text-xs text-gray-500 mt-1">占比 17.9%</p>
</div>
<div class="dept-badge p-4 bg-gradient-to-br from-orange-50 to-orange-100 rounded-xl cursor-pointer">
<div class="flex items-center justify-between mb-2">
<i class="fas fa-headset text-orange-600 text-xl"></i>
<span class="text-2xl font-bold text-orange-600">24</span>
</div>
<p class="text-sm font-medium text-gray-700">客户服务部</p>
<p class="text-xs text-gray-500 mt-1">占比 15.4%</p>
</div>
<div class="dept-badge p-4 bg-gradient-to-br from-purple-50 to-purple-100 rounded-xl cursor-pointer">
<div class="flex items-center justify-between mb-2">
<i class="fas fa-cogs text-purple-600 text-xl"></i>
<span class="text-2xl font-bold text-purple-600">22</span>
</div>
<p class="text-sm font-medium text-gray-700">生产运营部</p>
<p class="text-xs text-gray-500 mt-1">占比 14.1%</p>
</div>
<div class="dept-badge p-4 bg-gradient-to-br from-pink-50 to-pink-100 rounded-xl cursor-pointer">
<div class="flex items-center justify-between mb-2">
<i class="fas fa-wallet text-pink-600 text-xl"></i>
<span class="text-2xl font-bold text-pink-600">18</span>
</div>
<p class="text-sm font-medium text-gray-700">财务行政部</p>
<p class="text-xs text-gray-500 mt-1">占比 11.5%</p>
</div>
<div class="dept-badge p-4 bg-gradient-to-br from-cyan-50 to-cyan-100 rounded-xl cursor-pointer">
<div class="flex items-center justify-between mb-2">
<i class="fas fa-warehouse text-cyan-600 text-xl"></i>
<span class="text-2xl font-bold text-cyan-600">16</span>
</div>
<p class="text-sm font-medium text-gray-700">仓储物流部</p>
<p class="text-xs text-gray-500 mt-1">占比 10.3%</p>
</div>
<div class="dept-badge p-4 bg-gradient-to-br from-red-50 to-red-100 rounded-xl cursor-pointer">
<div class="flex items-center justify-between mb-2">
<i class="fas fa-shield-alt text-red-600 text-xl"></i>
<span class="text-2xl font-bold text-red-600">10</span>
</div>
<p class="text-sm font-medium text-gray-700">质量安全部</p>
<p class="text-xs text-gray-500 mt-1">占比 6.4%</p>
</div>
<div class="dept-badge p-4 bg-gradient-to-br from-indigo-50 to-indigo-100 rounded-xl cursor-pointer">
<div class="flex items-center justify-between mb-2">
<i class="fas fa-user-tie text-indigo-600 text-xl"></i>
<span class="text-2xl font-bold text-indigo-600">6</span>
</div>
<p class="text-sm font-medium text-gray-700">管理层</p>
<p class="text-xs text-gray-500 mt-1">占比 3.8%</p>
</div>
</div>
</div>
</div>
<!-- 员工列表 -->
<div class="glass rounded-2xl p-6 card-hover mb-8">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-list text-purple-500"></i>
员工列表
</h3>
<div class="flex items-center gap-3">
<div class="flex bg-gray-100 rounded-xl p-1">
<button class="tab-btn active px-4 py-2 rounded-lg text-sm font-medium">全部</button>
<button class="tab-btn px-4 py-2 rounded-lg text-sm font-medium text-gray-600">在职</button>
<button class="tab-btn px-4 py-2 rounded-lg text-sm font-medium text-gray-600">试用期</button>
<button class="tab-btn px-4 py-2 rounded-lg text-sm font-medium text-gray-600">离职</button>
</div>
<button class="px-4 py-2 bg-gray-100 rounded-xl text-gray-600 text-sm font-medium hover:bg-gray-200 transition-colors">
<i class="fas fa-filter mr-2"></i>筛选
</button>
<button class="px-4 py-2 bg-gray-100 rounded-xl text-gray-600 text-sm font-medium hover:bg-gray-200 transition-colors">
<i class="fas fa-download mr-2"></i>导出
</button>
</div>
</div>
<!-- 表头 -->
<div class="grid grid-cols-12 gap-4 px-4 py-3 bg-gray-50 rounded-xl text-sm font-medium text-gray-600 mb-3">
<div class="col-span-3">员工信息</div>
<div class="col-span-2">部门/职位</div>
<div class="col-span-2">联系方式</div>
<div class="col-span-2">入职日期</div>
<div class="col-span-1">状态</div>
<div class="col-span-2 text-right">操作</div>
</div>
<!-- 员工数据 -->
<div class="space-y-3">
<!-- 员工1 -->
<div class="employee-card grid grid-cols-12 gap-4 px-4 py-4 bg-white rounded-xl border border-gray-100 items-center">
<div class="col-span-3 flex items-center gap-3">
<div class="w-12 h-12 bg-gradient-to-br from-purple-500 to-pink-500 rounded-xl flex items-center justify-center text-white font-bold text-lg">
</div>
<div>
<p class="font-semibold text-gray-800">张伟</p>
<p class="text-xs text-gray-500">EMP2024001</p>
</div>
</div>
<div class="col-span-2">
<p class="text-sm font-medium text-gray-800">技术研发部</p>
<p class="text-xs text-gray-500">高级前端工程师</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">138****8888</p>
<p class="text-xs text-gray-500">zhangwei@company.com</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">2024-01-15</p>
<p class="text-xs text-gray-500">已入职 450 天</p>
</div>
<div class="col-span-1">
<span class="px-3 py-1 bg-green-100 text-green-600 rounded-full text-xs font-medium">在职</span>
</div>
<div class="col-span-2 flex items-center justify-end gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-purple-50 text-purple-600 rounded-lg flex items-center justify-center hover:bg-purple-100">
<i class="fas fa-edit text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-red-50 text-red-600 rounded-lg flex items-center justify-center hover:bg-red-100">
<i class="fas fa-trash text-sm"></i>
</button>
</div>
</div>
<!-- 员工2 -->
<div class="employee-card grid grid-cols-12 gap-4 px-4 py-4 bg-white rounded-xl border border-gray-100 items-center">
<div class="col-span-3 flex items-center gap-3">
<div class="w-12 h-12 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-xl flex items-center justify-center text-white font-bold text-lg">
</div>
<div>
<p class="font-semibold text-gray-800">李明</p>
<p class="text-xs text-gray-500">EMP2024002</p>
</div>
</div>
<div class="col-span-2">
<p class="text-sm font-medium text-gray-800">市场销售部</p>
<p class="text-xs text-gray-500">销售经理</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">139****6666</p>
<p class="text-xs text-gray-500">liming@company.com</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">2024-02-01</p>
<p class="text-xs text-gray-500">已入职 433 天</p>
</div>
<div class="col-span-1">
<span class="px-3 py-1 bg-green-100 text-green-600 rounded-full text-xs font-medium">在职</span>
</div>
<div class="col-span-2 flex items-center justify-end gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-purple-50 text-purple-600 rounded-lg flex items-center justify-center hover:bg-purple-100">
<i class="fas fa-edit text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-red-50 text-red-600 rounded-lg flex items-center justify-center hover:bg-red-100">
<i class="fas fa-trash text-sm"></i>
</button>
</div>
</div>
<!-- 员工3 -->
<div class="employee-card grid grid-cols-12 gap-4 px-4 py-4 bg-white rounded-xl border border-gray-100 items-center">
<div class="col-span-3 flex items-center gap-3">
<div class="w-12 h-12 bg-gradient-to-br from-pink-500 to-rose-500 rounded-xl flex items-center justify-center text-white font-bold text-lg">
</div>
<div>
<p class="font-semibold text-gray-800">王芳</p>
<p class="text-xs text-gray-500">EMP2024003</p>
</div>
</div>
<div class="col-span-2">
<p class="text-sm font-medium text-gray-800">财务行政部</p>
<p class="text-xs text-gray-500">财务主管</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">137****5555</p>
<p class="text-xs text-gray-500">wangfang@company.com</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">2024-03-10</p>
<p class="text-xs text-gray-500">已入职 396 天</p>
</div>
<div class="col-span-1">
<span class="px-3 py-1 bg-green-100 text-green-600 rounded-full text-xs font-medium">在职</span>
</div>
<div class="col-span-2 flex items-center justify-end gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-purple-50 text-purple-600 rounded-lg flex items-center justify-center hover:bg-purple-100">
<i class="fas fa-edit text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-red-50 text-red-600 rounded-lg flex items-center justify-center hover:bg-red-100">
<i class="fas fa-trash text-sm"></i>
</button>
</div>
</div>
<!-- 员工4 -->
<div class="employee-card grid grid-cols-12 gap-4 px-4 py-4 bg-white rounded-xl border border-gray-100 items-center">
<div class="col-span-3 flex items-center gap-3">
<div class="w-12 h-12 bg-gradient-to-br from-green-500 to-teal-500 rounded-xl flex items-center justify-center text-white font-bold text-lg">
</div>
<div>
<p class="font-semibold text-gray-800">陈杰</p>
<p class="text-xs text-gray-500">EMP2025001</p>
</div>
</div>
<div class="col-span-2">
<p class="text-sm font-medium text-gray-800">技术研发部</p>
<p class="text-xs text-gray-500">Java开发工程师</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">136****4444</p>
<p class="text-xs text-gray-500">chenjie@company.com</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">2025-01-05</p>
<p class="text-xs text-gray-500">已入职 95 天</p>
</div>
<div class="col-span-1">
<span class="px-3 py-1 bg-yellow-100 text-yellow-600 rounded-full text-xs font-medium">试用期</span>
</div>
<div class="col-span-2 flex items-center justify-end gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-purple-50 text-purple-600 rounded-lg flex items-center justify-center hover:bg-purple-100">
<i class="fas fa-edit text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-red-50 text-red-600 rounded-lg flex items-center justify-center hover:bg-red-100">
<i class="fas fa-trash text-sm"></i>
</button>
</div>
</div>
<!-- 员工5 -->
<div class="employee-card grid grid-cols-12 gap-4 px-4 py-4 bg-white rounded-xl border border-gray-100 items-center">
<div class="col-span-3 flex items-center gap-3">
<div class="w-12 h-12 bg-gradient-to-br from-orange-500 to-red-500 rounded-xl flex items-center justify-center text-white font-bold text-lg">
</div>
<div>
<p class="font-semibold text-gray-800">刘洋</p>
<p class="text-xs text-gray-500">EMP2025002</p>
</div>
</div>
<div class="col-span-2">
<p class="text-sm font-medium text-gray-800">客户服务部</p>
<p class="text-xs text-gray-500">客服专员</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">135****3333</p>
<p class="text-xs text-gray-500">liuyang@company.com</p>
</div>
<div class="col-span-2">
<p class="text-sm text-gray-700">2025-02-20</p>
<p class="text-xs text-gray-500">已入职 49 天</p>
</div>
<div class="col-span-1">
<span class="px-3 py-1 bg-yellow-100 text-yellow-600 rounded-full text-xs font-medium">试用期</span>
</div>
<div class="col-span-2 flex items-center justify-end gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-purple-50 text-purple-600 rounded-lg flex items-center justify-center hover:bg-purple-100">
<i class="fas fa-edit text-sm"></i>
</button>
<button class="action-btn w-8 h-8 bg-red-50 text-red-600 rounded-lg flex items-center justify-center hover:bg-red-100">
<i class="fas fa-trash text-sm"></i>
</button>
</div>
</div>
</div>
<!-- 分页 -->
<div class="flex items-center justify-between mt-6 pt-4 border-t border-gray-100">
<p class="text-sm text-gray-500">显示 1-5 条,共 156 条</p>
<div class="flex items-center gap-2">
<button class="w-10 h-10 rounded-xl bg-gray-100 text-gray-400 flex items-center justify-center cursor-not-allowed">
<i class="fas fa-chevron-left"></i>
</button>
<button class="w-10 h-10 rounded-xl bg-gradient-to-r from-purple-500 to-pink-500 text-white flex items-center justify-center font-medium">1</button>
<button class="w-10 h-10 rounded-xl bg-gray-100 text-gray-600 flex items-center justify-center font-medium hover:bg-gray-200 transition-colors">2</button>
<button class="w-10 h-10 rounded-xl bg-gray-100 text-gray-600 flex items-center justify-center font-medium hover:bg-gray-200 transition-colors">3</button>
<span class="text-gray-400">...</span>
<button class="w-10 h-10 rounded-xl bg-gray-100 text-gray-600 flex items-center justify-center font-medium hover:bg-gray-200 transition-colors">32</button>
<button class="w-10 h-10 rounded-xl bg-gray-100 text-gray-600 flex items-center justify-center hover:bg-gray-200 transition-colors">
<i class="fas fa-chevron-right"></i>
</button>
</div>
</div>
</div>
<!-- 底部区域 -->
<div class="grid grid-cols-2 gap-6">
<!-- 待审批事项 -->
<div class="glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-clipboard-check text-orange-500"></i>
待审批事项
</h3>
<button class="text-purple-600 text-sm font-medium hover:underline">查看全部</button>
</div>
<div class="space-y-4">
<div class="p-4 bg-orange-50 rounded-xl border-l-4 border-orange-500 cursor-pointer hover:bg-orange-100 transition-colors">
<div class="flex items-center justify-between mb-2">
<h4 class="font-medium text-gray-800">请假申请 - 王芳</h4>
<span class="text-xs text-orange-600 font-medium">待审批</span>
</div>
<p class="text-sm text-gray-600 mb-2">病假 2天 (2026-04-10 至 2026-04-11)</p>
<div class="flex items-center gap-4 text-xs text-gray-500">
<span><i class="fas fa-clock mr-1"></i>2小时前提交</span>
<span><i class="fas fa-user mr-1"></i>财务行政部</span>
</div>
</div>
<div class="p-4 bg-blue-50 rounded-xl border-l-4 border-blue-500 cursor-pointer hover:bg-blue-100 transition-colors">
<div class="flex items-center justify-between mb-2">
<h4 class="font-medium text-gray-800">加班申请 - 张伟</h4>
<span class="text-xs text-blue-600 font-medium">待审批</span>
</div>
<p class="text-sm text-gray-600 mb-2">项目紧急上线,申请加班 4小时</p>
<div class="flex items-center gap-4 text-xs text-gray-500">
<span><i class="fas fa-clock mr-1"></i>4小时前提交</span>
<span><i class="fas fa-user mr-1"></i>技术研发部</span>
</div>
</div>
<div class="p-4 bg-green-50 rounded-xl border-l-4 border-green-500 cursor-pointer hover:bg-green-100 transition-colors">
<div class="flex items-center justify-between mb-2">
<h4 class="font-medium text-gray-800">转正申请 - 陈杰</h4>
<span class="text-xs text-green-600 font-medium">待审批</span>
</div>
<p class="text-sm text-gray-600 mb-2">试用期已满3个月申请转正</p>
<div class="flex items-center gap-4 text-xs text-gray-500">
<span><i class="fas fa-clock mr-1"></i>1天前提交</span>
<span><i class="fas fa-user mr-1"></i>技术研发部</span>
</div>
</div>
</div>
</div>
<!-- 本月生日 -->
<div class="glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-birthday-cake text-pink-500"></i>
本月生日员工
</h3>
<button class="text-purple-600 text-sm font-medium hover:underline">查看全部</button>
</div>
<div class="space-y-4">
<div class="flex items-center gap-4 p-4 bg-gradient-to-r from-pink-50 to-purple-50 rounded-xl">
<div class="w-14 h-14 bg-gradient-to-br from-pink-500 to-purple-500 rounded-xl flex items-center justify-center text-white font-bold text-xl">
</div>
<div class="flex-1">
<h4 class="font-semibold text-gray-800">赵敏</h4>
<p class="text-sm text-gray-500">市场销售部 · 销售专员</p>
</div>
<div class="text-right">
<p class="text-lg font-bold text-pink-600">4月12日</p>
<p class="text-xs text-gray-500">3天后</p>
</div>
</div>
<div class="flex items-center gap-4 p-4 bg-gradient-to-r from-blue-50 to-cyan-50 rounded-xl">
<div class="w-14 h-14 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-xl flex items-center justify-center text-white font-bold text-xl">
</div>
<div class="flex-1">
<h4 class="font-semibold text-gray-800">孙强</h4>
<p class="text-sm text-gray-500">生产运营部 · 生产主管</p>
</div>
<div class="text-right">
<p class="text-lg font-bold text-blue-600">4月18日</p>
<p class="text-xs text-gray-500">9天后</p>
</div>
</div>
<div class="flex items-center gap-4 p-4 bg-gradient-to-r from-green-50 to-teal-50 rounded-xl">
<div class="w-14 h-14 bg-gradient-to-br from-green-500 to-teal-500 rounded-xl flex items-center justify-center text-white font-bold text-xl">
</div>
<div class="flex-1">
<h4 class="font-semibold text-gray-800">周丽</h4>
<p class="text-sm text-gray-500">客户服务部 · 客服主管</p>
</div>
<div class="text-right">
<p class="text-lg font-bold text-green-600">4月25日</p>
<p class="text-xs text-gray-500">16天后</p>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</body>
</html>

View File

@@ -1,536 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>天天系统 - 应用主页工作台</title>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
* {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body {
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
min-height: 100vh;
}
.glass {
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.3);
}
.card-hover {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.app-card {
aspect-ratio: 1;
transition: all 0.3s ease;
}
.app-card:hover {
transform: scale(1.05);
}
.app-card:hover .app-icon {
transform: scale(1.1);
}
.app-icon {
transition: transform 0.3s ease;
}
.stat-card {
position: relative;
overflow: hidden;
}
.stat-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
}
.stat-card.blue::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.stat-card.green::before { background: linear-gradient(90deg, #11998e, #38ef7d); }
.stat-card.orange::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.stat-card.purple::before { background: linear-gradient(90deg, #a8edea, #fed6e3); }
.quick-btn {
transition: all 0.2s ease;
}
.quick-btn:hover {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
transform: translateX(4px);
}
.todo-item {
transition: background 0.2s ease;
}
.todo-item:hover {
background: rgba(102, 126, 234, 0.08);
}
.sidebar {
background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}
.sidebar-item {
transition: all 0.2s ease;
}
.sidebar-item:hover, .sidebar-item.active {
background: rgba(255, 255, 255, 0.2);
}
.notification-badge {
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.gradient-text {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.scrollbar-hide::-webkit-scrollbar {
display: none;
}
</style>
</head>
<body class="scrollbar-hide">
<div class="flex min-h-screen">
<!-- 左侧导航 -->
<aside class="sidebar w-64 fixed h-full text-white flex flex-col">
<!-- Logo -->
<div class="p-6 border-b border-white/10">
<div class="flex items-center gap-3">
<div class="w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center">
<i class="fas fa-cube text-xl"></i>
</div>
<div>
<h1 class="font-bold text-lg">天天系统</h1>
<p class="text-xs text-white/70">ERP 管理平台</p>
</div>
</div>
</div>
<!-- 导航菜单 -->
<nav class="flex-1 py-6 px-3">
<div class="space-y-1">
<a href="#" class="sidebar-item active flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-home w-5"></i>
<span>工作台</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-cogs w-5"></i>
<span>设备管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-shopping-cart w-5"></i>
<span>采购管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-warehouse w-5"></i>
<span>仓储物流</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-wallet w-5"></i>
<span>财务管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-users w-5"></i>
<span>人力资源</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-tasks w-5"></i>
<span>协同办公</span>
</a>
</div>
<div class="mt-8 pt-6 border-t border-white/10">
<p class="px-4 text-xs text-white/50 mb-3">个人</p>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-user w-5"></i>
<span>个人信息</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-cog w-5"></i>
<span>系统设置</span>
</a>
</div>
</nav>
<!-- 用户信息 -->
<div class="p-4 border-t border-white/10">
<div class="flex items-center gap-3">
<div class="w-10 h-10 bg-white/20 rounded-full flex items-center justify-center">
<i class="fas fa-user"></i>
</div>
<div class="flex-1">
<p class="font-medium">管理员</p>
<p class="text-xs text-white/70">超级管理员</p>
</div>
<button class="text-white/70 hover:text-white">
<i class="fas fa-sign-out-alt"></i>
</button>
</div>
</div>
</aside>
<!-- 主内容区 -->
<main class="flex-1 ml-64">
<!-- 顶部栏 -->
<header class="glass sticky top-0 z-50 px-8 py-4">
<div class="flex items-center justify-between">
<!-- 搜索 -->
<div class="relative w-96">
<input type="text" placeholder="🔍 搜索设备、订单、员工、文档..."
class="w-full px-5 py-3 bg-gray-100 rounded-xl border-0 focus:ring-2 focus:ring-purple-500 focus:bg-white transition-all">
</div>
<!-- 右侧 -->
<div class="flex items-center gap-6">
<!-- 全屏 -->
<button class="text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-expand text-lg"></i>
</button>
<!-- 消息 -->
<button class="relative text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-bell text-lg"></i>
<span class="notification-badge absolute -top-1 -right-1 w-5 h-5 bg-red-500 text-white text-xs rounded-full flex items-center justify-center">3</span>
</button>
<!-- 语言 -->
<button class="text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-globe text-lg"></i>
</button>
<!-- 用户 -->
<div class="flex items-center gap-3 pl-6 border-l border-gray-200">
<div class="w-10 h-10 bg-gradient-to-br from-purple-500 to-pink-500 rounded-xl flex items-center justify-center text-white font-bold">
A
</div>
<div>
<p class="font-medium text-gray-800">Admin</p>
<p class="text-xs text-gray-500">超级管理员</p>
</div>
</div>
</div>
</div>
</header>
<!-- 内容区域 -->
<div class="p-8">
<!-- 欢迎区 -->
<div class="mb-8">
<h2 class="text-3xl font-bold text-gray-800 mb-2">
👋 早上好,管理员!
</h2>
<p class="text-gray-500">今天是 2026年4月8日 星期三,本周还有 <span class="text-purple-600 font-semibold">3</span> 天工作日</p>
</div>
<!-- 数据概览 -->
<div class="grid grid-cols-4 gap-6 mb-8">
<div class="stat-card blue glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center">
<i class="fas fa-cogs text-blue-600 text-xl"></i>
</div>
<span class="text-green-500 text-sm font-medium"><i class="fas fa-arrow-up"></i> 12%</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">128</h3>
<p class="text-gray-500 text-sm">设备总数</p>
</div>
<div class="stat-card green glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center">
<i class="fas fa-boxes text-green-600 text-xl"></i>
</div>
<span class="text-green-500 text-sm font-medium"><i class="fas fa-arrow-up"></i> 8%</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">5,230</h3>
<p class="text-gray-500 text-sm">库存物料</p>
</div>
<div class="stat-card orange glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-orange-100 rounded-xl flex items-center justify-center">
<i class="fas fa-clock text-orange-600 text-xl"></i>
</div>
<span class="text-red-500 text-sm font-medium"><i class="fas fa-arrow-up"></i> 5</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">12</h3>
<p class="text-gray-500 text-sm">待审批</p>
</div>
<div class="stat-card purple glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-purple-100 rounded-xl flex items-center justify-center">
<i class="fas fa-chart-line text-purple-600 text-xl"></i>
</div>
<span class="text-green-500 text-sm font-medium"><i class="fas fa-arrow-up"></i> 15%</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">¥89.5<span class="text-lg"></span></h3>
<p class="text-gray-500 text-sm">本月支出</p>
</div>
</div>
<!-- 中间区域 -->
<div class="grid grid-cols-3 gap-6 mb-8">
<!-- 快捷入口 -->
<div class="glass rounded-2xl p-6 card-hover">
<h3 class="font-bold text-lg text-gray-800 mb-4 flex items-center gap-2">
<i class="fas fa-bolt text-yellow-500"></i>
快捷入口
</h3>
<div class="grid grid-cols-2 gap-3">
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium">
<i class="fas fa-search text-purple-500"></i>
设备巡检
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium">
<i class="fas fa-shopping-bag text-blue-500"></i>
采购申请
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium">
<i class="fas fa-dolly text-green-500"></i>
入库登记
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium">
<i class="fas fa-calendar-alt text-orange-500"></i>
请假申请
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium">
<i class="fas fa-file-invoice-dollar text-red-500"></i>
费用报销
</button>
<button class="quick-btn flex items-center gap-2 px-4 py-3 bg-gray-50 rounded-xl text-gray-700 text-sm font-medium">
<i class="fas fa-box text-indigo-500"></i>
库存查询
</button>
</div>
</div>
<!-- 待办事项 -->
<div class="glass rounded-2xl p-6 card-hover col-span-2">
<div class="flex items-center justify-between mb-4">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-list-check text-red-500"></i>
待办事项
<span class="bg-red-100 text-red-600 px-2 py-0.5 rounded-full text-xs font-medium">5</span>
</h3>
<button class="text-purple-600 text-sm font-medium hover:underline">查看全部</button>
</div>
<div class="space-y-3">
<div class="todo-item flex items-center gap-4 p-3 rounded-xl cursor-pointer">
<div class="w-10 h-10 bg-red-100 rounded-xl flex items-center justify-center flex-shrink-0">
<i class="fas fa-clipboard-check text-red-600"></i>
</div>
<div class="flex-1">
<p class="font-medium text-gray-800">审批 - 张三的报销单</p>
<p class="text-xs text-gray-500">差旅费 ¥2,580.00</p>
</div>
<span class="text-xs text-red-500 font-medium">2小时前</span>
</div>
<div class="todo-item flex items-center gap-4 p-3 rounded-xl cursor-pointer">
<div class="w-10 h-10 bg-yellow-100 rounded-xl flex items-center justify-center flex-shrink-0">
<i class="fas fa-search text-yellow-600"></i>
</div>
<div class="flex-1">
<p class="font-medium text-gray-800">巡检 - 3号车间设备待检</p>
<p class="text-xs text-gray-500">包含12台设备</p>
</div>
<span class="text-xs text-yellow-600 font-medium">4小时前</span>
</div>
<div class="todo-item flex items-center gap-4 p-3 rounded-xl cursor-pointer">
<div class="w-10 h-10 bg-blue-100 rounded-xl flex items-center justify-center flex-shrink-0">
<i class="fas fa-shopping-cart text-blue-600"></i>
</div>
<div class="flex-1">
<p class="font-medium text-gray-800">采购 - 办公用品采购单</p>
<p class="text-xs text-gray-500">待审批</p>
</div>
<span class="text-xs text-blue-600 font-medium">1天前</span>
</div>
<div class="todo-item flex items-center gap-4 p-3 rounded-xl cursor-pointer">
<div class="w-10 h-10 bg-green-100 rounded-xl flex items-center justify-center flex-shrink-0">
<i class="fas fa-wrench text-green-600"></i>
</div>
<div class="flex-1">
<p class="font-medium text-gray-800">保养 - 空压机定期保养</p>
<p class="text-xs text-gray-500">例行保养</p>
</div>
<span class="text-xs text-green-600 font-medium">2天前</span>
</div>
</div>
</div>
</div>
<!-- 应用模块 -->
<div class="mb-8">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-xl text-gray-800">
<i class="fas fa-th-large text-purple-500 mr-2"></i>
应用模块
</h3>
<button class="text-purple-600 text-sm font-medium hover:underline">自定义模块</button>
</div>
<div class="grid grid-cols-6 gap-4">
<div class="app-card glass rounded-2xl p-6 flex flex-col items-center justify-center card-hover cursor-pointer">
<div class="app-icon w-16 h-16 bg-gradient-to-br from-blue-500 to-purple-500 rounded-2xl flex items-center justify-center mb-4 shadow-lg">
<i class="fas fa-cogs text-white text-2xl"></i>
</div>
<h4 class="font-semibold text-gray-800 mb-1">设备管理</h4>
<p class="text-xs text-gray-500">128 设备</p>
</div>
<div class="app-card glass rounded-2xl p-6 flex flex-col items-center justify-center card-hover cursor-pointer">
<div class="app-icon w-16 h-16 bg-gradient-to-br from-green-500 to-teal-500 rounded-2xl flex items-center justify-center mb-4 shadow-lg">
<i class="fas fa-shopping-cart text-white text-2xl"></i>
</div>
<h4 class="font-semibold text-gray-800 mb-1">采购管理</h4>
<p class="text-xs text-gray-500">23 订单</p>
</div>
<div class="app-card glass rounded-2xl p-6 flex flex-col items-center justify-center card-hover cursor-pointer">
<div class="app-icon w-16 h-16 bg-gradient-to-br from-orange-500 to-red-500 rounded-2xl flex items-center justify-center mb-4 shadow-lg">
<i class="fas fa-warehouse text-white text-2xl"></i>
</div>
<h4 class="font-semibold text-gray-800 mb-1">仓储物流</h4>
<p class="text-xs text-gray-500">5,230 物料</p>
</div>
<div class="app-card glass rounded-2xl p-6 flex flex-col items-center justify-center card-hover cursor-pointer">
<div class="app-icon w-16 h-16 bg-gradient-to-br from-pink-500 to-rose-500 rounded-2xl flex items-center justify-center mb-4 shadow-lg">
<i class="fas fa-wallet text-white text-2xl"></i>
</div>
<h4 class="font-semibold text-gray-800 mb-1">财务管理</h4>
<p class="text-xs text-gray-500">¥89.5万</p>
</div>
<div class="app-card glass rounded-2xl p-6 flex flex-col items-center justify-center card-hover cursor-pointer">
<div class="app-icon w-16 h-16 bg-gradient-to-br from-cyan-500 to-blue-500 rounded-2xl flex items-center justify-center mb-4 shadow-lg">
<i class="fas fa-users text-white text-2xl"></i>
</div>
<h4 class="font-semibold text-gray-800 mb-1">人力资源</h4>
<p class="text-xs text-gray-500">56 员工</p>
</div>
<div class="app-card glass rounded-2xl p-6 flex flex-col items-center justify-center card-hover cursor-pointer">
<div class="app-icon w-16 h-16 bg-gradient-to-br from-indigo-500 to-purple-500 rounded-2xl flex items-center justify-center mb-4 shadow-lg">
<i class="fas fa-tasks text-white text-2xl"></i>
</div>
<h4 class="font-semibold text-gray-800 mb-1">协同办公</h4>
<p class="text-xs text-gray-500">8 流程</p>
</div>
</div>
</div>
<!-- 底部区域 -->
<div class="grid grid-cols-2 gap-6">
<!-- 经营概览图表 -->
<div class="glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-chart-bar text-blue-500"></i>
经营概览
</h3>
<div class="flex gap-2">
<button class="px-3 py-1 text-xs bg-purple-100 text-purple-600 rounded-lg font-medium">本周</button>
<button class="px-3 py-1 text-xs bg-gray-100 text-gray-600 rounded-lg font-medium">本月</button>
<button class="px-3 py-1 text-xs bg-gray-100 text-gray-600 rounded-lg font-medium">本季</button>
</div>
</div>
<div class="h-48 flex items-end gap-4">
<div class="flex-1 flex flex-col items-center">
<div class="w-full bg-gradient-to-t from-purple-500 to-purple-300 rounded-t-lg transition-all hover:opacity-80" style="height: 60%"></div>
<span class="text-xs text-gray-500 mt-2">周一</span>
</div>
<div class="flex-1 flex flex-col items-center">
<div class="w-full bg-gradient-to-t from-purple-500 to-purple-300 rounded-t-lg transition-all hover:opacity-80" style="height: 75%"></div>
<span class="text-xs text-gray-500 mt-2">周二</span>
</div>
<div class="flex-1 flex flex-col items-center">
<div class="w-full bg-gradient-to-t from-purple-500 to-purple-300 rounded-t-lg transition-all hover:opacity-80" style="height: 45%"></div>
<span class="text-xs text-gray-500 mt-2">周三</span>
</div>
<div class="flex-1 flex flex-col items-center">
<div class="w-full bg-gradient-to-t from-purple-500 to-purple-300 rounded-t-lg transition-all hover:opacity-80" style="height: 90%"></div>
<span class="text-xs text-gray-500 mt-2">周四</span>
</div>
<div class="flex-1 flex flex-col items-center">
<div class="w-full bg-gradient-to-t from-purple-500 to-purple-300 rounded-t-lg transition-all hover:opacity-80" style="height: 85%"></div>
<span class="text-xs text-gray-500 mt-2">周五</span>
</div>
<div class="flex-1 flex flex-col items-center">
<div class="w-full bg-gradient-to-t from-purple-500 to-purple-300 rounded-t-lg transition-all hover:opacity-80 opacity-50" style="height: 40%"></div>
<span class="text-xs text-gray-500 mt-2">周六</span>
</div>
<div class="flex-1 flex flex-col items-center">
<div class="w-full bg-gradient-to-t from-purple-500 to-purple-300 rounded-t-lg transition-all hover:opacity-80 opacity-50" style="height: 30%"></div>
<span class="text-xs text-gray-500 mt-2">周日</span>
</div>
</div>
</div>
<!-- 最新公告 -->
<div class="glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-bullhorn text-red-500"></i>
最新公告
</h3>
<button class="text-purple-600 text-sm font-medium hover:underline">全部公告</button>
</div>
<div class="space-y-4">
<div class="p-4 bg-red-50 rounded-xl border-l-4 border-red-500 cursor-pointer hover:bg-red-100 transition-colors">
<h4 class="font-medium text-gray-800 mb-1">关于清明节放假安排的通知</h4>
<div class="flex items-center gap-4 text-xs text-gray-500">
<span><i class="fas fa-user mr-1"></i>人事行政部</span>
<span><i class="fas fa-clock mr-1"></i>2026-04-01</span>
<span><i class="fas fa-eye mr-1"></i>1,258 阅读</span>
</div>
</div>
<div class="p-4 bg-blue-50 rounded-xl border-l-4 border-blue-500 cursor-pointer hover:bg-blue-100 transition-colors">
<h4 class="font-medium text-gray-800 mb-1">2026年第一季度财报公告</h4>
<div class="flex items-center gap-4 text-xs text-gray-500">
<span><i class="fas fa-user mr-1"></i>财务部</span>
<span><i class="fas fa-clock mr-1"></i>2026-03-28</span>
<span><i class="fas fa-eye mr-1"></i>986 阅读</span>
</div>
</div>
<div class="p-4 bg-green-50 rounded-xl border-l-4 border-green-500 cursor-pointer hover:bg-green-100 transition-colors">
<h4 class="font-medium text-gray-800 mb-1">新版本系统功能更新说明</h4>
<div class="flex items-center gap-4 text-xs text-gray-500">
<span><i class="fas fa-user mr-1"></i>技术部</span>
<span><i class="fas fa-clock mr-1"></i>2026-03-25</span>
<span><i class="fas fa-eye mr-1"></i>756 阅读</span>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</body>
</html>

View File

@@ -1,748 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>采购管理 - 天天系统</title>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
* {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body {
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
min-height: 100vh;
}
.glass {
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.3);
}
.card-hover {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.stat-card {
position: relative;
overflow: hidden;
}
.stat-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
}
.stat-card.blue::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.stat-card.green::before { background: linear-gradient(90deg, #11998e, #38ef7d); }
.stat-card.orange::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.stat-card.purple::before { background: linear-gradient(90deg, #a8edea, #fed6e3); }
.sidebar {
background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}
.sidebar-item {
transition: all 0.2s ease;
}
.sidebar-item:hover, .sidebar-item.active {
background: rgba(255, 255, 255, 0.2);
}
.notification-badge {
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.gradient-text {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.scrollbar-hide::-webkit-scrollbar {
display: none;
}
.tab-btn {
transition: all 0.2s ease;
}
.tab-btn.active {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.tab-btn:hover:not(.active) {
background: rgba(102, 126, 234, 0.1);
}
.status-badge {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border-radius: 9999px;
font-size: 12px;
font-weight: 500;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-completed { background: #e0e7ff; color: #3730a3; }
.table-row {
transition: background 0.2s ease;
}
.table-row:hover {
background: rgba(102, 126, 234, 0.05);
}
.action-btn {
transition: all 0.2s ease;
}
.action-btn:hover {
transform: scale(1.1);
}
.progress-bar {
height: 6px;
background: #e5e7eb;
border-radius: 3px;
overflow: hidden;
}
.progress-fill {
height: 100%;
border-radius: 3px;
transition: width 0.5s ease;
}
.supplier-card {
transition: all 0.3s ease;
}
.supplier-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body class="scrollbar-hide">
<div class="flex min-h-screen">
<!-- 左侧导航 -->
<aside class="sidebar w-64 fixed h-full text-white flex flex-col">
<!-- Logo -->
<div class="p-6 border-b border-white/10">
<div class="flex items-center gap-3">
<div class="w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center">
<i class="fas fa-cube text-xl"></i>
</div>
<div>
<h1 class="font-bold text-lg">天天系统</h1>
<p class="text-xs text-white/70">ERP 管理平台</p>
</div>
</div>
</div>
<!-- 导航菜单 -->
<nav class="flex-1 py-6 px-3">
<div class="space-y-1">
<a href="应用主页工作台.html" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-home w-5"></i>
<span>工作台</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-cogs w-5"></i>
<span>设备管理</span>
</a>
<a href="采购管理.html" class="sidebar-item active flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-shopping-cart w-5"></i>
<span>采购管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-warehouse w-5"></i>
<span>仓储物流</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-wallet w-5"></i>
<span>财务管理</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-users w-5"></i>
<span>人力资源</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-tasks w-5"></i>
<span>协同办公</span>
</a>
</div>
<div class="mt-8 pt-6 border-t border-white/10">
<p class="px-4 text-xs text-white/50 mb-3">个人</p>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-user w-5"></i>
<span>个人信息</span>
</a>
<a href="#" class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl">
<i class="fas fa-cog w-5"></i>
<span>系统设置</span>
</a>
</div>
</nav>
<!-- 用户信息 -->
<div class="p-4 border-t border-white/10">
<div class="flex items-center gap-3">
<div class="w-10 h-10 bg-white/20 rounded-full flex items-center justify-center">
<i class="fas fa-user"></i>
</div>
<div class="flex-1">
<p class="font-medium">管理员</p>
<p class="text-xs text-white/70">超级管理员</p>
</div>
<button class="text-white/70 hover:text-white">
<i class="fas fa-sign-out-alt"></i>
</button>
</div>
</div>
</aside>
<!-- 主内容区 -->
<main class="flex-1 ml-64">
<!-- 顶部栏 -->
<header class="glass sticky top-0 z-50 px-8 py-4">
<div class="flex items-center justify-between">
<!-- 搜索 -->
<div class="relative w-96">
<input type="text" placeholder="🔍 搜索采购单、供应商、物料..."
class="w-full px-5 py-3 bg-gray-100 rounded-xl border-0 focus:ring-2 focus:ring-purple-500 focus:bg-white transition-all">
</div>
<!-- 右侧 -->
<div class="flex items-center gap-6">
<!-- 全屏 -->
<button class="text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-expand text-lg"></i>
</button>
<!-- 消息 -->
<button class="relative text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-bell text-lg"></i>
<span class="notification-badge absolute -top-1 -right-1 w-5 h-5 bg-red-500 text-white text-xs rounded-full flex items-center justify-center">3</span>
</button>
<!-- 语言 -->
<button class="text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-globe text-lg"></i>
</button>
<!-- 用户 -->
<div class="flex items-center gap-3 pl-6 border-l border-gray-200">
<div class="w-10 h-10 bg-gradient-to-br from-purple-500 to-pink-500 rounded-xl flex items-center justify-center text-white font-bold">
A
</div>
<div>
<p class="font-medium text-gray-800">Admin</p>
<p class="text-xs text-gray-500">超级管理员</p>
</div>
</div>
</div>
</div>
</header>
<!-- 内容区域 -->
<div class="p-8">
<!-- 页面标题 -->
<div class="mb-8">
<div class="flex items-center gap-3 mb-2">
<a href="应用主页工作台.html" class="text-gray-500 hover:text-purple-600 transition-colors">
<i class="fas fa-arrow-left"></i>
</a>
<h2 class="text-3xl font-bold text-gray-800">采购管理</h2>
</div>
<p class="text-gray-500">管理采购申请、订单跟踪、供应商信息及采购统计</p>
</div>
<!-- 数据概览 -->
<div class="grid grid-cols-4 gap-6 mb-8">
<div class="stat-card blue glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center">
<i class="fas fa-file-alt text-blue-600 text-xl"></i>
</div>
<span class="text-green-500 text-sm font-medium"><i class="fas fa-arrow-up"></i> 8%</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">23</h3>
<p class="text-gray-500 text-sm">本月采购单</p>
</div>
<div class="stat-card green glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center">
<i class="fas fa-check-circle text-green-600 text-xl"></i>
</div>
<span class="text-green-500 text-sm font-medium"><i class="fas fa-arrow-up"></i> 12%</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">18</h3>
<p class="text-gray-500 text-sm">已完成</p>
</div>
<div class="stat-card orange glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-orange-100 rounded-xl flex items-center justify-center">
<i class="fas fa-clock text-orange-600 text-xl"></i>
</div>
<span class="text-red-500 text-sm font-medium"><i class="fas fa-arrow-up"></i> 3</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">5</h3>
<p class="text-gray-500 text-sm">待审批</p>
</div>
<div class="stat-card purple glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-4">
<div class="w-12 h-12 bg-purple-100 rounded-xl flex items-center justify-center">
<i class="fas fa-yen-sign text-purple-600 text-xl"></i>
</div>
<span class="text-green-500 text-sm font-medium"><i class="fas fa-arrow-up"></i> 15%</span>
</div>
<h3 class="text-3xl font-bold text-gray-800 mb-1">¥45.8<span class="text-lg"></span></h3>
<p class="text-gray-500 text-sm">本月采购额</p>
</div>
</div>
<!-- 快捷操作栏 -->
<div class="glass rounded-2xl p-4 mb-8">
<div class="flex items-center justify-between">
<div class="flex gap-3">
<button class="px-5 py-2.5 bg-gradient-to-r from-purple-600 to-purple-700 text-white rounded-xl font-medium hover:shadow-lg hover:shadow-purple-500/30 transition-all flex items-center gap-2">
<i class="fas fa-plus"></i>
新建采购单
</button>
<button class="px-5 py-2.5 bg-white border border-gray-200 text-gray-700 rounded-xl font-medium hover:bg-gray-50 transition-all flex items-center gap-2">
<i class="fas fa-file-import text-blue-500"></i>
批量导入
</button>
<button class="px-5 py-2.5 bg-white border border-gray-200 text-gray-700 rounded-xl font-medium hover:bg-gray-50 transition-all flex items-center gap-2">
<i class="fas fa-file-export text-green-500"></i>
导出报表
</button>
</div>
<div class="flex gap-3">
<button class="px-4 py-2.5 bg-white border border-gray-200 text-gray-700 rounded-xl font-medium hover:bg-gray-50 transition-all flex items-center gap-2">
<i class="fas fa-filter text-gray-500"></i>
筛选
</button>
<button class="px-4 py-2.5 bg-white border border-gray-200 text-gray-700 rounded-xl font-medium hover:bg-gray-50 transition-all flex items-center gap-2">
<i class="fas fa-calendar text-gray-500"></i>
2026年4月
</button>
</div>
</div>
</div>
<!-- 标签页 -->
<div class="glass rounded-2xl p-2 mb-8 inline-flex">
<button class="tab-btn active px-6 py-2.5 rounded-xl font-medium text-sm">采购申请</button>
<button class="tab-btn px-6 py-2.5 rounded-xl font-medium text-sm text-gray-600">采购订单</button>
<button class="tab-btn px-6 py-2.5 rounded-xl font-medium text-sm text-gray-600">供应商管理</button>
<button class="tab-btn px-6 py-2.5 rounded-xl font-medium text-sm text-gray-600">采购统计</button>
</div>
<!-- 采购申请列表 -->
<div class="glass rounded-2xl overflow-hidden mb-8">
<div class="p-6 border-b border-gray-100">
<div class="flex items-center justify-between">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-list text-purple-500"></i>
采购申请列表
<span class="bg-purple-100 text-purple-600 px-2 py-0.5 rounded-full text-xs font-medium">23</span>
</h3>
<div class="flex items-center gap-3">
<div class="relative">
<input type="text" placeholder="搜索采购单号、申请人..."
class="w-64 px-4 py-2 bg-gray-50 rounded-lg border-0 focus:ring-2 focus:ring-purple-500 text-sm">
<i class="fas fa-search absolute right-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
</div>
</div>
</div>
</div>
<div class="overflow-x-auto">
<table class="w-full">
<thead class="bg-gray-50/50">
<tr>
<th class="px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">采购单号</th>
<th class="px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">申请信息</th>
<th class="px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">采购物品</th>
<th class="px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">金额</th>
<th class="px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">状态</th>
<th class="px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">申请时间</th>
<th class="px-6 py-4 text-center text-xs font-semibold text-gray-500 uppercase tracking-wider">操作</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
<tr class="table-row">
<td class="px-6 py-4">
<span class="font-medium text-gray-800">CG-2026-0409-001</span>
</td>
<td class="px-6 py-4">
<div class="flex items-center gap-3">
<div class="w-8 h-8 bg-gradient-to-br from-blue-500 to-purple-500 rounded-lg flex items-center justify-center text-white text-xs font-bold">
</div>
<div>
<p class="font-medium text-gray-800">张三</p>
<p class="text-xs text-gray-500">技术部</p>
</div>
</div>
</td>
<td class="px-6 py-4">
<p class="font-medium text-gray-800">办公电脑 x5</p>
<p class="text-xs text-gray-500">联想 ThinkPad T14</p>
</td>
<td class="px-6 py-4">
<span class="font-semibold text-gray-800">¥45,000</span>
</td>
<td class="px-6 py-4">
<span class="status-badge status-pending">
<i class="fas fa-clock"></i> 待审批
</span>
</td>
<td class="px-6 py-4 text-sm text-gray-500">2026-04-09 09:30</td>
<td class="px-6 py-4">
<div class="flex items-center justify-center gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-xs"></i>
</button>
<button class="action-btn w-8 h-8 bg-green-50 text-green-600 rounded-lg flex items-center justify-center hover:bg-green-100">
<i class="fas fa-check text-xs"></i>
</button>
<button class="action-btn w-8 h-8 bg-red-50 text-red-600 rounded-lg flex items-center justify-center hover:bg-red-100">
<i class="fas fa-times text-xs"></i>
</button>
</div>
</td>
</tr>
<tr class="table-row">
<td class="px-6 py-4">
<span class="font-medium text-gray-800">CG-2026-0408-003</span>
</td>
<td class="px-6 py-4">
<div class="flex items-center gap-3">
<div class="w-8 h-8 bg-gradient-to-br from-green-500 to-teal-500 rounded-lg flex items-center justify-center text-white text-xs font-bold">
</div>
<div>
<p class="font-medium text-gray-800">李四</p>
<p class="text-xs text-gray-500">生产部</p>
</div>
</div>
</td>
<td class="px-6 py-4">
<p class="font-medium text-gray-800">原材料-钢材 x2000kg</p>
<p class="text-xs text-gray-500">304不锈钢板</p>
</td>
<td class="px-6 py-4">
<span class="font-semibold text-gray-800">¥128,000</span>
</td>
<td class="px-6 py-4">
<span class="status-badge status-approved">
<i class="fas fa-check-circle"></i> 已批准
</span>
</td>
<td class="px-6 py-4 text-sm text-gray-500">2026-04-08 14:20</td>
<td class="px-6 py-4">
<div class="flex items-center justify-center gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-xs"></i>
</button>
<button class="action-btn w-8 h-8 bg-purple-50 text-purple-600 rounded-lg flex items-center justify-center hover:bg-purple-100">
<i class="fas fa-file-invoice text-xs"></i>
</button>
</div>
</td>
</tr>
<tr class="table-row">
<td class="px-6 py-4">
<span class="font-medium text-gray-800">CG-2026-0408-002</span>
</td>
<td class="px-6 py-4">
<div class="flex items-center gap-3">
<div class="w-8 h-8 bg-gradient-to-br from-orange-500 to-red-500 rounded-lg flex items-center justify-center text-white text-xs font-bold">
</div>
<div>
<p class="font-medium text-gray-800">王五</p>
<p class="text-xs text-gray-500">行政部</p>
</div>
</div>
</td>
<td class="px-6 py-4">
<p class="font-medium text-gray-800">办公用品一批</p>
<p class="text-xs text-gray-500">打印纸、墨盒、文具</p>
</td>
<td class="px-6 py-4">
<span class="font-semibold text-gray-800">¥3,580</span>
</td>
<td class="px-6 py-4">
<span class="status-badge status-processing">
<i class="fas fa-spinner fa-spin"></i> 采购中
</span>
</td>
<td class="px-6 py-4 text-sm text-gray-500">2026-04-08 10:15</td>
<td class="px-6 py-4">
<div class="flex items-center justify-center gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-xs"></i>
</button>
<button class="action-btn w-8 h-8 bg-orange-50 text-orange-600 rounded-lg flex items-center justify-center hover:bg-orange-100">
<i class="fas fa-truck text-xs"></i>
</button>
</div>
</td>
</tr>
<tr class="table-row">
<td class="px-6 py-4">
<span class="font-medium text-gray-800">CG-2026-0407-005</span>
</td>
<td class="px-6 py-4">
<div class="flex items-center gap-3">
<div class="w-8 h-8 bg-gradient-to-br from-pink-500 to-rose-500 rounded-lg flex items-center justify-center text-white text-xs font-bold">
</div>
<div>
<p class="font-medium text-gray-800">赵六</p>
<p class="text-xs text-gray-500">研发部</p>
</div>
</div>
</td>
<td class="px-6 py-4">
<p class="font-medium text-gray-800">实验设备 x2</p>
<p class="text-xs text-gray-500">示波器、万用表</p>
</td>
<td class="px-6 py-4">
<span class="font-semibold text-gray-800">¥25,600</span>
</td>
<td class="px-6 py-4">
<span class="status-badge status-completed">
<i class="fas fa-check-double"></i> 已完成
</span>
</td>
<td class="px-6 py-4 text-sm text-gray-500">2026-04-07 16:45</td>
<td class="px-6 py-4">
<div class="flex items-center justify-center gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-xs"></i>
</button>
<button class="action-btn w-8 h-8 bg-gray-50 text-gray-600 rounded-lg flex items-center justify-center hover:bg-gray-100">
<i class="fas fa-print text-xs"></i>
</button>
</div>
</td>
</tr>
<tr class="table-row">
<td class="px-6 py-4">
<span class="font-medium text-gray-800">CG-2026-0407-004</span>
</td>
<td class="px-6 py-4">
<div class="flex items-center gap-3">
<div class="w-8 h-8 bg-gradient-to-br from-cyan-500 to-blue-500 rounded-lg flex items-center justify-center text-white text-xs font-bold">
</div>
<div>
<p class="font-medium text-gray-800">孙七</p>
<p class="text-xs text-gray-500">质量部</p>
</div>
</div>
</td>
<td class="px-6 py-4">
<p class="font-medium text-gray-800">检测设备校准服务</p>
<p class="text-xs text-gray-500">年度校准合同</p>
</td>
<td class="px-6 py-4">
<span class="font-semibold text-gray-800">¥18,000</span>
</td>
<td class="px-6 py-4">
<span class="status-badge status-rejected">
<i class="fas fa-times-circle"></i> 已驳回
</span>
</td>
<td class="px-6 py-4 text-sm text-gray-500">2026-04-07 09:00</td>
<td class="px-6 py-4">
<div class="flex items-center justify-center gap-2">
<button class="action-btn w-8 h-8 bg-blue-50 text-blue-600 rounded-lg flex items-center justify-center hover:bg-blue-100">
<i class="fas fa-eye text-xs"></i>
</button>
<button class="action-btn w-8 h-8 bg-yellow-50 text-yellow-600 rounded-lg flex items-center justify-center hover:bg-yellow-100">
<i class="fas fa-redo text-xs"></i>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 分页 -->
<div class="p-6 border-t border-gray-100">
<div class="flex items-center justify-between">
<p class="text-sm text-gray-500">显示 1-5 条,共 23 条</p>
<div class="flex items-center gap-2">
<button class="w-9 h-9 flex items-center justify-center rounded-lg border border-gray-200 text-gray-500 hover:bg-gray-50 transition-colors">
<i class="fas fa-chevron-left text-xs"></i>
</button>
<button class="w-9 h-9 flex items-center justify-center rounded-lg bg-purple-600 text-white font-medium">1</button>
<button class="w-9 h-9 flex items-center justify-center rounded-lg border border-gray-200 text-gray-700 hover:bg-gray-50 transition-colors">2</button>
<button class="w-9 h-9 flex items-center justify-center rounded-lg border border-gray-200 text-gray-700 hover:bg-gray-50 transition-colors">3</button>
<span class="text-gray-400">...</span>
<button class="w-9 h-9 flex items-center justify-center rounded-lg border border-gray-200 text-gray-700 hover:bg-gray-50 transition-colors">5</button>
<button class="w-9 h-9 flex items-center justify-center rounded-lg border border-gray-200 text-gray-500 hover:bg-gray-50 transition-colors">
<i class="fas fa-chevron-right text-xs"></i>
</button>
</div>
</div>
</div>
</div>
<!-- 底部区域 -->
<div class="grid grid-cols-2 gap-6">
<!-- 供应商概览 -->
<div class="glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-building text-blue-500"></i>
主要供应商
</h3>
<button class="text-purple-600 text-sm font-medium hover:underline">查看全部</button>
</div>
<div class="space-y-4">
<div class="supplier-card flex items-center gap-4 p-4 bg-gray-50 rounded-xl cursor-pointer">
<div class="w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center flex-shrink-0">
<i class="fas fa-industry text-blue-600"></i>
</div>
<div class="flex-1">
<h4 class="font-medium text-gray-800">深圳市华强电子有限公司</h4>
<p class="text-xs text-gray-500">电子元器件 | 合作 3 年</p>
</div>
<div class="text-right">
<p class="font-semibold text-gray-800">¥156万</p>
<p class="text-xs text-green-500">本年采购额</p>
</div>
</div>
<div class="supplier-card flex items-center gap-4 p-4 bg-gray-50 rounded-xl cursor-pointer">
<div class="w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center flex-shrink-0">
<i class="fas fa-boxes text-green-600"></i>
</div>
<div class="flex-1">
<h4 class="font-medium text-gray-800">上海宝钢贸易有限公司</h4>
<p class="text-xs text-gray-500">钢材原料 | 合作 5 年</p>
</div>
<div class="text-right">
<p class="font-semibold text-gray-800">¥328万</p>
<p class="text-xs text-green-500">本年采购额</p>
</div>
</div>
<div class="supplier-card flex items-center gap-4 p-4 bg-gray-50 rounded-xl cursor-pointer">
<div class="w-12 h-12 bg-orange-100 rounded-xl flex items-center justify-center flex-shrink-0">
<i class="fas fa-laptop text-orange-600"></i>
</div>
<div class="flex-1">
<h4 class="font-medium text-gray-800">联想集团(深圳)有限公司</h4>
<p class="text-xs text-gray-500">办公设备 | 合作 2 年</p>
</div>
<div class="text-right">
<p class="font-semibold text-gray-800">¥89万</p>
<p class="text-xs text-green-500">本年采购额</p>
</div>
</div>
</div>
</div>
<!-- 采购趋势 -->
<div class="glass rounded-2xl p-6 card-hover">
<div class="flex items-center justify-between mb-6">
<h3 class="font-bold text-lg text-gray-800 flex items-center gap-2">
<i class="fas fa-chart-line text-purple-500"></i>
采购趋势
</h3>
<div class="flex gap-2">
<button class="px-3 py-1 text-xs bg-purple-100 text-purple-600 rounded-lg font-medium">本月</button>
<button class="px-3 py-1 text-xs bg-gray-100 text-gray-600 rounded-lg font-medium">本季</button>
<button class="px-3 py-1 text-xs bg-gray-100 text-gray-600 rounded-lg font-medium">本年</button>
</div>
</div>
<div class="space-y-4">
<div>
<div class="flex items-center justify-between mb-2">
<span class="text-sm text-gray-600">原材料采购</span>
<span class="text-sm font-medium text-gray-800">¥328万 (65%)</span>
</div>
<div class="progress-bar">
<div class="progress-fill bg-gradient-to-r from-blue-500 to-blue-400" style="width: 65%"></div>
</div>
</div>
<div>
<div class="flex items-center justify-between mb-2">
<span class="text-sm text-gray-600">设备采购</span>
<span class="text-sm font-medium text-gray-800">¥89万 (18%)</span>
</div>
<div class="progress-bar">
<div class="progress-fill bg-gradient-to-r from-green-500 to-green-400" style="width: 18%"></div>
</div>
</div>
<div>
<div class="flex items-center justify-between mb-2">
<span class="text-sm text-gray-600">办公用品</span>
<span class="text-sm font-medium text-gray-800">¥45万 (9%)</span>
</div>
<div class="progress-bar">
<div class="progress-fill bg-gradient-to-r from-orange-500 to-orange-400" style="width: 9%"></div>
</div>
</div>
<div>
<div class="flex items-center justify-between mb-2">
<span class="text-sm text-gray-600">服务采购</span>
<span class="text-sm font-medium text-gray-800">¥40万 (8%)</span>
</div>
<div class="progress-bar">
<div class="progress-fill bg-gradient-to-r from-purple-500 to-purple-400" style="width: 8%"></div>
</div>
</div>
</div>
<div class="mt-6 pt-4 border-t border-gray-100">
<div class="flex items-center justify-between">
<span class="text-sm text-gray-500">本月采购总额</span>
<span class="text-xl font-bold gradient-text">¥502万</span>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</body>
</html>