-- 客户合同管理菜单及按钮权限
-- 父菜单ID: 1878652341000000100 (客户运营)

-- 合同管理菜单（隐藏）
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
VALUES (1878652341000000620, '合同管理', 1878652341000000100, 11, 'contract', '', 1, 0, 'M', '1', '0', '', '#', 103, 1, NOW(), NULL, NULL, '合同管理目录');

-- 合同列表查询权限
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
VALUES (1878652341000000621, '合同列表', 1878652341000000620, 1, '', '', 1, 0, 'F', '0', '0', 'customer:contract:list', '#', 103, 1, NOW(), NULL, NULL, '合同列表查询');

-- 合同详情查询权限
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
VALUES (1878652341000000622, '合同详情', 1878652341000000620, 2, '', '', 1, 0, 'F', '0', '0', 'customer:contract:query', '#', 103, 1, NOW(), NULL, NULL, '合同详情查询');

-- 合同新增权限
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
VALUES (1878652341000000623, '合同新增', 1878652341000000620, 3, '', '', 1, 0, 'F', '0', '0', 'customer:contract:add', '#', 103, 1, NOW(), NULL, NULL, '合同新增');

-- 合同修改权限
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
VALUES (1878652341000000624, '合同修改', 1878652341000000620, 4, '', '', 1, 0, 'F', '0', '0', 'customer:contract:edit', '#', 103, 1, NOW(), NULL, NULL, '合同修改');

-- 合同删除权限
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
VALUES (1878652341000000625, '合同删除', 1878652341000000620, 5, '', '', 1, 0, 'F', '0', '0', 'customer:contract:remove', '#', 103, 1, NOW(), NULL, NULL, '合同删除');

-- 合同导出权限
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
VALUES (1878652341000000626, '合同导出', 1878652341000000620, 6, '', '', 1, 0, 'F', '0', '0', 'customer:contract:export', '#', 103, 1, NOW(), NULL, NULL, '合同导出');

-- 给超级管理员角色(role_id=1)分配权限
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 1878652341000000620);
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 1878652341000000621);
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 1878652341000000622);
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 1878652341000000623);
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 1878652341000000624);
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 1878652341000000625);
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 1878652341000000626);
