-- ============================================================================
-- 修正甲方报价菜单结构
-- 目标：甲方报价作为一个单页管理页面，类似供应商报价
-- ============================================================================

-- 1. 将 甲方报价历史(2061) 改为指向 index 主页面
UPDATE sys_menu
SET menu_name = '甲方报价',
    component = 'bid/clientquote/index',
    perms = 'bid:clientquote:list',
    path = 'index'
WHERE menu_id = 2061;

-- 2. 删除多余的 甲方报价列表(2063) 和 甲方报价单详情(2062)
DELETE FROM sys_role_menu WHERE menu_id IN (2062, 2063);
DELETE FROM sys_menu WHERE menu_id IN (2062, 2063);

-- 3. 将权限按钮从历史页面移到主菜单下
UPDATE sys_menu SET parent_id = 2061 WHERE menu_id = 2064; -- 查询
UPDATE sys_menu SET parent_id = 2061 WHERE menu_id = 2065; -- 新增
UPDATE sys_menu SET parent_id = 2061 WHERE menu_id = 2066; -- 修改
UPDATE sys_menu SET parent_id = 2061 WHERE menu_id = 2067; -- 删除
