| | |
| | | import { createWebHistory, createRouter } from 'vue-router' |
| | | import { createWebHistory, createRouter } from "vue-router"; |
| | | /* Layout */ |
| | | import Layout from '@/layout' |
| | | import Layout from "@/layout"; |
| | | |
| | | /** |
| | | * Note: 路由配置项 |
| | |
| | | * roles: ['admin', 'common'] // 访问路由的角色权限 |
| | | * permissions: ['a:a:a', 'b:b:b'] // 访问路由的菜单权限 |
| | | * meta : { |
| | | noCache: true // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false) |
| | | title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 |
| | | icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg |
| | | breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 |
| | | activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。 |
| | | } |
| | | noCache: true // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false) |
| | | title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 |
| | | icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg |
| | | breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 |
| | | activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。 |
| | | } |
| | | */ |
| | | |
| | | // 公共路由 |
| | | export const constantRoutes = [ |
| | | { |
| | | path: '/redirect', |
| | | path: "/redirect", |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: '/redirect/:path(.*)', |
| | | component: () => import('@/views/redirect/index.vue') |
| | | } |
| | | ] |
| | | path: "/redirect/:path(.*)", |
| | | component: () => import("@/views/redirect/index.vue"), |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/login', |
| | | component: () => import('@/views/login'), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: "/callbacklccpn", |
| | | component: () => import("@/views/tideLogin.vue"), |
| | | path: "/login", |
| | | component: () => import("@/views/login"), |
| | | hidden: true, |
| | | }, |
| | | { |
| | | path: '/register', |
| | | component: () => import('@/views/register'), |
| | | hidden: true |
| | | path: "/register", |
| | | component: () => import("@/views/register"), |
| | | hidden: true, |
| | | }, |
| | | { |
| | | path: "/:pathMatch(.*)*", |
| | | component: () => import('@/views/error/404'), |
| | | hidden: true |
| | | component: () => import("@/views/error/404"), |
| | | hidden: true, |
| | | }, |
| | | { |
| | | path: '/401', |
| | | component: () => import('@/views/error/401'), |
| | | hidden: true |
| | | path: "/401", |
| | | component: () => import("@/views/error/401"), |
| | | hidden: true, |
| | | }, |
| | | |
| | | { |
| | | path: '', |
| | | path: "", |
| | | component: Layout, |
| | | redirect: '/index', |
| | | redirect: "/index", |
| | | children: [ |
| | | { |
| | | path: '/index', |
| | | component: () => import('@/views/index'), |
| | | name: 'Index', |
| | | meta: { title: '首页', icon: 'dashboard', affix: true } |
| | | } |
| | | ] |
| | | path: "/index", |
| | | component: () => import("@/views/index"), |
| | | name: "Index", |
| | | meta: { title: "首页", icon: "dashboard", affix: true }, |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // path: '/main/MobileChat', |
| | | // component: Layout, |
| | | // redirect: '', |
| | | // hidden: true, |
| | | // children: [ |
| | | // { |
| | | // path: '', |
| | | // component: () => import('@/views/chatHome/chatHomeIndex/MobileChat'), |
| | | // name: 'MobileChat', |
| | | // meta: { title: 'AI对话', icon: 'dashboard', affix: true} |
| | | // } |
| | | // ] |
| | | // }, |
| | | { |
| | | path: '/user', |
| | | path: "/main/MobileChat", |
| | | component: Layout, |
| | | redirect: "", |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: "", |
| | | component: () => import("@/views/chatHome/chatHomeIndex/MobileChat"), |
| | | name: "MobileChat", |
| | | meta: { title: "AI对话", icon: "dashboard", affix: true }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: "/user", |
| | | component: Layout, |
| | | hidden: true, |
| | | redirect: 'noredirect', |
| | | redirect: "noredirect", |
| | | children: [ |
| | | { |
| | | path: "profile", |
| | |
| | | name: "DeviceInfo", |
| | | meta: { title: "设备信息", icon: "monitor" }, |
| | | }, |
| | | { |
| | | path: "/data-dashboard", |
| | | component: () => import("@/views/reportAnalysis/dataDashboard/index.vue"), |
| | | hidden: true, |
| | | name: "DataDashboard", |
| | | meta: { title: "数据大屏", icon: "dashboard" }, |
| | | }, |
| | | ]; |
| | | |
| | | // 动态路由,基于用户权限动态去加载 |
| | | export const dynamicRoutes = [ |
| | | { |
| | | path: '/system/user-auth', |
| | | path: "/system/user-auth", |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['system:user:edit'], |
| | | permissions: ["system:user:edit"], |
| | | children: [ |
| | | { |
| | | path: 'role/:userId(\\d+)', |
| | | component: () => import('@/views/system/user/authRole'), |
| | | name: 'AuthRole', |
| | | meta: { title: '分配角色', activeMenu: '/system/user' } |
| | | } |
| | | ] |
| | | path: "role/:userId(\\d+)", |
| | | component: () => import("@/views/system/user/authRole"), |
| | | name: "AuthRole", |
| | | meta: { title: "分配角色", activeMenu: "/system/user" }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/system/role-auth', |
| | | path: "/system/role-auth", |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['system:role:edit'], |
| | | permissions: ["system:role:edit"], |
| | | children: [ |
| | | { |
| | | path: 'user/:roleId(\\d+)', |
| | | component: () => import('@/views/system/role/authUser'), |
| | | name: 'AuthUser', |
| | | meta: { title: '分配用户', activeMenu: '/system/role' } |
| | | } |
| | | ] |
| | | path: "user/:roleId(\\d+)", |
| | | component: () => import("@/views/system/role/authUser"), |
| | | name: "AuthUser", |
| | | meta: { title: "分配用户", activeMenu: "/system/role" }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/system/dict-data', |
| | | path: "/system/dict-data", |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['system:dict:list'], |
| | | permissions: ["system:dict:list"], |
| | | children: [ |
| | | { |
| | | path: 'index/:dictId(\\d+)', |
| | | component: () => import('@/views/system/dict/data'), |
| | | name: 'Data', |
| | | meta: { title: '字典数据', activeMenu: '/system/dict' } |
| | | } |
| | | ] |
| | | path: "index/:dictId(\\d+)", |
| | | component: () => import("@/views/system/dict/data"), |
| | | name: "Data", |
| | | meta: { title: "字典数据", activeMenu: "/system/dict" }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/monitor/job-log', |
| | | path: "/monitor/job-log", |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['monitor:job:list'], |
| | | permissions: ["monitor:job:list"], |
| | | children: [ |
| | | { |
| | | path: 'index/:jobId(\\d+)', |
| | | component: () => import('@/views/monitor/job/log'), |
| | | name: 'JobLog', |
| | | meta: { title: '调度日志', activeMenu: '/monitor/job' } |
| | | } |
| | | ] |
| | | path: "index/:jobId(\\d+)", |
| | | component: () => import("@/views/monitor/job/log"), |
| | | name: "JobLog", |
| | | meta: { title: "调度日志", activeMenu: "/monitor/job" }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/tool/gen-edit', |
| | | path: "/tool/gen-edit", |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['tool:gen:edit'], |
| | | permissions: ["tool:gen:edit"], |
| | | children: [ |
| | | { |
| | | path: 'index/:tableId(\\d+)', |
| | | component: () => import('@/views/tool/gen/editTable'), |
| | | name: 'GenEdit', |
| | | meta: { title: '修改生成配置', activeMenu: '/tool/gen' } |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | path: "index/:tableId(\\d+)", |
| | | component: () => import("@/views/tool/gen/editTable"), |
| | | name: "GenEdit", |
| | | meta: { title: "修改生成配置", activeMenu: "/tool/gen" }, |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHistory(), |
| | | routes: constantRoutes, |
| | | scrollBehavior(to, from, savedPosition) { |
| | | if (savedPosition) { |
| | | return savedPosition |
| | | return savedPosition; |
| | | } |
| | | return { top: 0 } |
| | | return { top: 0 }; |
| | | }, |
| | | }) |
| | | }); |
| | | |
| | | export default router |
| | | export default router; |
| | |
| | | </el-col> |
| | | |
| | | <el-col :span="8"> |
| | | <el-card class="module-card" shadow="hover" @click="navigateTo('/procurementManagement/procurementPlan')"> |
| | | <div class="card-content"> |
| | | <div class="card-icon"> |
| | | <el-icon size="48" color="#9C27B0"><Calendar /></el-icon> |
| | | </div> |
| | | <div class="card-info"> |
| | | <h3>采购计划</h3> |
| | | <p>智能采购计划配置,自动计算采购需求,考虑库存和安全库存</p> |
| | | <div class="card-stats"> |
| | | <span>活跃计划: {{ stats.activePlans }}</span> |
| | | <span>待计算: {{ stats.pendingCalculations }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20" class="module-cards"> |
| | | <el-col :span="8"> |
| | | <el-card class="module-card" shadow="hover" @click="navigateTo('/procurementManagement/procurementLedger')"> |
| | | <div class="card-content"> |
| | | <div class="card-icon"> |
| | |
| | | <div class="card-stats"> |
| | | <span>总订单: {{ stats.totalOrders }}</span> |
| | | <span>总金额: ¥{{ stats.totalAmount.toFixed(2) }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <el-col :span="8"> |
| | | <el-card class="module-card" shadow="hover" @click="navigateTo('/procurementManagement/procurementReport')"> |
| | | <div class="card-content"> |
| | | <div class="card-icon"> |
| | | <el-icon size="48" color="#FF6B6B"><TrendCharts /></el-icon> |
| | | </div> |
| | | <div class="card-info"> |
| | | <h3>采购报表</h3> |
| | | <p>采购订单执行汇总、明细分析、业务统计、供应商供货汇总</p> |
| | | <div class="card-stats"> |
| | | <span>报表类型: 4种</span> |
| | | <span>数据更新: 实时</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <script setup> |
| | | import { ref, onMounted } from 'vue' |
| | | import { useRouter } from 'vue-router' |
| | | import { Document, Box, Search, RefreshLeft, Money, List } from '@element-plus/icons-vue' |
| | | import { Document, Box, Search, RefreshLeft, Money, List, Calendar, TrendCharts } from '@element-plus/icons-vue' |
| | | |
| | | const router = useRouter() |
| | | |
| | |
| | | approvedReturns: 3, |
| | | activePrices: 45, |
| | | pendingPrices: 2, |
| | | activePlans: 8, |
| | | pendingCalculations: 3, |
| | | totalOrders: 30, |
| | | totalAmount: 125.8, |
| | | avgDeliveryTime: 7, |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <el-table :data="orderSummaryData" border v-loading="loading" stripe> |
| | | <el-table :data="orderSummaryData" border v-loading="loading" stripe style="width: 100%"> |
| | | <el-table-column label="订单编号" prop="orderNo" width="180" fixed="left" /> |
| | | <el-table-column label="供应商名称" prop="supplierName" width="150" /> |
| | | <el-table-column label="供应商名称" prop="supplierName" min-width="150" /> |
| | | <el-table-column label="订单日期" prop="orderDate" width="120" /> |
| | | <el-table-column label="计划交期" prop="plannedDelivery" width="120" /> |
| | | <el-table-column label="实际交期" prop="actualDelivery" width="120" /> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <el-table :data="orderDetailData" border v-loading="loading" stripe> |
| | | <el-table :data="orderDetailData" border v-loading="loading" stripe style="width: 100%"> |
| | | <el-table-column label="订单编号" prop="orderNo" width="150" fixed="left" /> |
| | | <el-table-column label="商品编码" prop="productCode" width="120" /> |
| | | <el-table-column label="商品名称" prop="productName" width="200" /> |
| | | <el-table-column label="规格型号" prop="specification" width="150" /> |
| | | <el-table-column label="商品名称" prop="productName" min-width="200" /> |
| | | <el-table-column label="规格型号" prop="specification" min-width="150" /> |
| | | <el-table-column label="单位" prop="unit" width="80" /> |
| | | <el-table-column label="计划数量" prop="plannedQuantity" width="100" /> |
| | | <el-table-column label="已收货数量" prop="receivedQuantity" width="120" /> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <el-table :data="businessSummaryData" border v-loading="loading" stripe> |
| | | <el-table :data="businessSummaryData" border v-loading="loading" stripe style="width: 100%"> |
| | | <el-table-column label="商品类别" prop="category" width="150" fixed="left" /> |
| | | <el-table-column label="商品编码" prop="productCode" width="120" /> |
| | | <el-table-column label="商品名称" prop="productName" width="200" /> |
| | | <el-table-column label="规格型号" prop="specification" width="150" /> |
| | | <el-table-column label="商品名称" prop="productName" min-width="200" /> |
| | | <el-table-column label="规格型号" prop="specification" min-width="150" /> |
| | | <el-table-column label="采购数量" prop="purchaseQuantity" width="120" /> |
| | | <el-table-column label="采购金额" prop="purchaseAmount" width="120"> |
| | | <template #default="{ row }">¥{{ row.purchaseAmount.toLocaleString() }}</template> |
| | |
| | | <template #default="{ row }">¥{{ row.avgPrice.toFixed(2) }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="采购次数" prop="purchaseCount" width="100" /> |
| | | <el-table-column label="主要供应商" prop="mainSupplier" width="150" /> |
| | | <el-table-column label="主要供应商" prop="mainSupplier" min-width="150" /> |
| | | <el-table-column label="最后采购日期" prop="lastPurchaseDate" width="120" /> |
| | | </el-table> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <el-table :data="supplierSummaryData" border v-loading="loading" stripe> |
| | | <el-table :data="supplierSummaryData" border v-loading="loading" stripe style="width: 100%"> |
| | | <el-table-column label="供应商编码" prop="supplierCode" width="120" fixed="left" /> |
| | | <el-table-column label="供应商名称" prop="supplierName" width="200" /> |
| | | <el-table-column label="供应商名称" prop="supplierName" min-width="200" /> |
| | | <el-table-column label="联系人" prop="contactPerson" width="120" /> |
| | | <el-table-column label="联系电话" prop="phone" width="130" /> |
| | | <el-table-column label="供货订单数" prop="orderCount" width="120" /> |
| | |
| | | :deep(.el-table) { |
| | | border-radius: 8px; |
| | | overflow: hidden; |
| | | width: 100% !important; |
| | | } |
| | | |
| | | :deep(.el-table__body-wrapper) { |
| | | width: 100% !important; |
| | | } |
| | | |
| | | :deep(.el-table__header-wrapper) { |
| | | width: 100% !important; |
| | | } |
| | | |
| | | :deep(.el-table th) { |