| | |
| | | icon: "/static/images/icon/gongyingshangwanglai.svg", |
| | | label: "供应商往来", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigouguanli.svg", |
| | | label: "采购退货", |
| | | }, |
| | | ]); |
| | | |
| | | // 财务管理功能数据 |
| | |
| | | icon: "/static/images/icon/fukuanliushui.svg", |
| | | label: "付款流水", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/huikuandengji.svg", |
| | | label: "收入管理", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/fukuandengji.svg", |
| | | label: "支出管理", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/huikuanliushui.svg", |
| | | label: "借款管理", |
| | | }, |
| | | ]); |
| | | |
| | | // 档案管理功能数据 |
| | | const archiveManagementItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/gongchuguanli.svg", |
| | | label: "供应商档案", |
| | | }, |
| | | ]); |
| | | |
| | | // 售后服务功能数据 |
| | | const afterSalesServiceItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/xiaoshoutaizhang.svg", |
| | | label: "反馈登记", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigouguanli.svg", |
| | | label: "售后处理", |
| | | }, |
| | | ]); |
| | | |
| | | const humanResourcesItems = reactive([ |
| | |
| | | url: "/pages/procurementManagement/receiptPaymentHistory/index", |
| | | }); |
| | | break; |
| | | case "收入管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/financialManagement/revenueManagement/index", |
| | | }); |
| | | break; |
| | | case "支出管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/financialManagement/expenseManagement/index", |
| | | }); |
| | | break; |
| | | case "借款管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/financialManagement/loanManagement/index", |
| | | }); |
| | | break; |
| | | case "供应商往来": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/paymentLedger/index", |
| | | }); |
| | | break; |
| | | case "采购退货": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/purchaseReturnOrder/index", |
| | | }); |
| | | break; |
| | | case "供应商档案": |
| | | uni.navigateTo({ |
| | | url: "/pages/basicData/supplierManage/index", |
| | | }); |
| | | break; |
| | | case "公出管理": |
| | |
| | | url: "/pages/qualityManagement/finalInspection/index", |
| | | }); |
| | | break; |
| | | case "反馈登记": |
| | | uni.navigateTo({ |
| | | url: "/pages/customerService/feedbackRegistration/index", |
| | | }); |
| | | break; |
| | | case "售后处理": |
| | | uni.navigateTo({ |
| | | url: "/pages/customerService/afterSalesHandling/index", |
| | | }); |
| | | break; |
| | | default: |
| | | uni.showToast({ |
| | | title: `点击了${item.label}`, |
| | |
| | | |
| | | // 收集所有有权限的菜单标题(根据 meta.title) |
| | | const allowedMenuTitles = new Set(); |
| | | const alwaysShowTitles = new Set(["采购退货单", "供应商管理"]); |
| | | const collectMenuTitles = routes => { |
| | | if (!Array.isArray(routes)) return; |
| | | routes.forEach(route => { |
| | |
| | | // 定义菜单配置映射 |
| | | const menuMapping = { |
| | | collaboration: { target: collaborationItems, specialMapping: { "规章制度": "规章制度管理" } }, |
| | | archiveManagement: { target: archiveManagementItems, specialMapping: { "供应商档案": "供应商管理" } }, |
| | | }; |
| | | |
| | | console.log(allowedMenuTitles) |
| | | // 通用过滤函数 |
| | | const filterArray = (targetArray, specialMapping) => { |
| | | const filtered = targetArray.filter(item => { |
| | |
| | | filterArray(marketingItems); |
| | | filterArray(purchaseItems); |
| | | filterArray(financeManagementItems); |
| | | filterArray(archiveManagementItems); |
| | | filterArray(afterSalesServiceItems); |
| | | filterArray(archiveManagementItems, menuMapping.archiveManagement.specialMapping); |
| | | filterArray(collaborationItems, menuMapping.collaboration.specialMapping); |
| | | filterArray(safetyItems); |
| | | filterArray(humanResourcesItems); |
| | |
| | | const hasMarketingItems = computed(() => marketingItems.length > 0); |
| | | const hasPurchaseItems = computed(() => purchaseItems.length > 0); |
| | | const hasFinanceManagementItems = computed(() => financeManagementItems.length > 0); |
| | | const hasArchiveManagementItems = computed(() => true); |
| | | const hasAfterSalesServiceItems = computed(() => true); |
| | | const hasArchiveManagementItems = computed(() => archiveManagementItems.length > 0); |
| | | const hasAfterSalesServiceItems = computed(() => afterSalesServiceItems.length > 0); |
| | | const hasCollaborationItems = computed(() => collaborationItems.length > 0); |
| | | const hasSafetyItems = computed(() => safetyItems.length > 0); |
| | | const hasQualityItems = computed(() => qualityItems.length > 0); |
| | |
| | | box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.4); |
| | | } |
| | | } |
| | | </style> |
| | | </style> |