Files
hzdyjs/script/sql/cw-approval-menu-creation-only.sql
T
2025-07-30 23:24:43 +08:00

84 lines
7.0 KiB
SQL

-- 财务项目申报部门审批功能菜单创建脚本(仅创建菜单,不赋权)
-- 日期: 2025-01-26
-- 说明: 在"项目申报管理"(6000)下创建部门审批功能菜单
-- 1. 部门审批管理菜单 (在项目申报管理下新增子菜单)
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (6200, '部门审批管理', 6000, 2, 'deptApproval', 'cw/deptApproval/index', '', 1, 0, 'C', '0', '0', 'cw:approval:dept', 'ele-Checked', 1, now(), 1, now(), '财务项目申报部门审批管理');
-- 2. 部门审批管理功能按钮
-- 查询
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (6201, '部门审批查询', 6200, 1, '#', '', '', 1, 0, 'F', '0', '0', 'cw:approval:dept', '#', 1, now(), 1, now(), '');
-- 审批操作
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (6202, '部门审批操作', 6200, 2, '#', '', '', 1, 0, 'F', '0', '0', 'cw:approval:process', '#', 1, now(), 1, now(), '');
-- 审批详情查看
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (6203, '审批详情查看', 6200, 3, '#', '', '', 1, 0, 'F', '0', '0', 'cw:approval:query', '#', 1, now(), 1, now(), '');
-- 3. 审批记录管理菜单 (给管理员查看所有审批记录)
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (6210, '审批记录管理', 6000, 3, 'approvalRecord', 'cw/approvalRecord/index', '', 1, 0, 'C', '0', '0', 'cw:approval:list', 'ele-List', 1, now(), 1, now(), '财务项目申报审批记录管理');
-- 4. 审批记录管理功能按钮
-- 查询
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (6211, '审批记录查询', 6210, 1, '#', '', '', 1, 0, 'F', '0', '0', 'cw:approval:list', '#', 1, now(), 1, now(), '');
-- 导出
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (6212, '审批记录导出', 6210, 2, '#', '', '', 1, 0, 'F', '0', '0', 'cw:approval:export', '#', 1, now(), 1, now(), '');
-- 详情
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (6213, '审批记录详情', 6210, 3, '#', '', '', 1, 0, 'F', '0', '0', 'cw:approval:query', '#', 1, now(), 1, now(), '');
-- 5. 创建审批流程权限 (系统管理员)
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (6214, '创建审批流程', 6210, 4, '#', '', '', 1, 0, 'F', '0', '0', 'cw:approval:create', '#', 1, now(), 1, now(), '');
-- 6. 审批动作字典数据
-- 审批动作字典类型
INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_by, create_time, remark)
VALUES (1950000000000000001, '000000', '审批动作', 'cw_approve_action', 1, now(), '财务项目申报审批动作字典');
-- 审批动作字典数据
INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_by, create_time, remark)
VALUES (1950000000000001001, '000000', 1, '通过', 'approve', 'cw_approve_action', '', 'success', 'N', 1, now(), '审批通过');
INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_by, create_time, remark)
VALUES (1950000000000001002, '000000', 2, '拒绝', 'reject', 'cw_approve_action', '', 'danger', 'N', 1, now(), '审批拒绝');
INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_by, create_time, remark)
VALUES (1950000000000001003, '000000', 3, '退回', 'return', 'cw_approve_action', '', 'warning', 'N', 1, now(), '退回修改');
-- 7. 审批节点状态字典数据
-- 审批节点状态字典类型
INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_by, create_time, remark)
VALUES (1950000000000000002, '000000', '审批节点状态', 'cw_node_status', 1, now(), '财务项目申报审批节点状态字典');
-- 审批节点状态字典数据
INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_by, create_time, remark)
VALUES (1950000000000002001, '000000', 1, '等待审批', 'waiting', 'cw_node_status', '', 'info', 'N', 1, now(), '等待审批');
INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_by, create_time, remark)
VALUES (1950000000000002002, '000000', 2, '审批中', 'approving', 'cw_node_status', '', 'primary', 'N', 1, now(), '正在审批');
INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_by, create_time, remark)
VALUES (1950000000000002003, '000000', 3, '已通过', 'approved', 'cw_node_status', '', 'success', 'N', 1, now(), '审批通过');
INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_by, create_time, remark)
VALUES (1950000000000002004, '000000', 4, '已拒绝', 'rejected', 'cw_node_status', '', 'danger', 'N', 1, now(), '审批拒绝');
INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_by, create_time, remark)
VALUES (1950000000000002005, '000000', 5, '已退回', 'returned', 'cw_node_status', '', 'warning', 'N', 1, now(), '已退回');
INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_by, create_time, remark)
VALUES (1950000000000002006, '000000', 6, '未开始', 'pending', 'cw_node_status', '', 'info', 'N', 1, now(), '未开始');
COMMIT;
-- 菜单创建完成,等待后续手动赋权操作