Files
MES/yawei-mes/.sql/2026-01-17_v1.6.014_周启威_生产报表.sql
2026-04-02 10:39:03 +08:00

26 lines
1.8 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- =====================================================
-- 生产报表模块 - 菜单及权限配置
-- 版本: v1.6.014
-- 日期: 2026-01-17
-- 开发者: 周启威
-- 说明: 新增生产报表功能,用于统计产量、合格率、工时等数据
-- 父菜单: 首页(parent_id=0),作为一级菜单
-- =====================================================
-- 1. 新增"生产报表"菜单 (M类型-目录菜单,与首页同级,排在首页后面)
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
VALUES ('生产报表', 0, 1, 'productionStatement', 'mes/statement/productionStatement/index', NULL, 1, 0, 'M', '0', '0', 'statement:productionStatement:list', 'chart', 'admin', NOW(), '', NOW(), '生产报表-统计产量、合格率、工时等');
-- 获取刚插入的菜单ID (用于后续按钮权限的parent_id)
SET @productionStatementMenuId = LAST_INSERT_ID();
-- 2. 新增"导出"按钮权限 (F类型-按钮权限)
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
VALUES ('导出报表', @productionStatementMenuId, 1, '', '', '', 1, 0, 'F', '0', '0', 'statement:productionStatement:export', '#', 'admin', NOW(), '', NOW(), '生产报表-导出功能');
-- =====================================================
-- 回滚脚本 (如需回滚执行以下SQL)
-- =====================================================
-- DELETE FROM sys_menu WHERE perms = 'statement:productionStatement:export';
-- DELETE FROM sys_menu WHERE perms = 'statement:productionStatement:list';