-- =====================================================
-- 修复菜单组件路径不匹配问题
-- 数据库中的 component 字段与实际文件名不一致
-- =====================================================

SET NAMES utf8mb4;

-- 修复委外交料单的组件路径
-- 数据库中是 OutsourceDeliveryList，实际文件是 OutsourcingDeliveryList
UPDATE `system_menu` 
SET `component` = 'jianmo/views/wms/OutsourcingDeliveryList',
    `component_name` = 'JianmoOutsourcingDeliveryList'
WHERE `id` = 6601;

-- 修复仓库数据相关的组件路径
-- 标签查询: LabelQueryList -> TagQuery
UPDATE `system_menu` 
SET `component` = 'jianmo/views/inventory/TagQuery'
WHERE `id` = 6701;

-- 标签历史记录: LabelHistoryList -> TagHistory
UPDATE `system_menu` 
SET `component` = 'jianmo/views/inventory/TagHistory'
WHERE `id` = 6702;

-- 库存查询: InventoryQueryList -> StockQuery
UPDATE `system_menu` 
SET `component` = 'jianmo/views/inventory/StockQuery'
WHERE `id` = 6704;

-- 进出存查询: StockMovementList -> StockFlow
UPDATE `system_menu` 
SET `component` = 'jianmo/views/inventory/StockFlow'
WHERE `id` = 6705;

-- 销售发货通知: SalesShippingNoticeList -> SalesShipmentNotice
UPDATE `system_menu` 
SET `component` = 'jianmo/views/s7/SalesShipmentNotice'
WHERE `id` = 6802;

-- =====================================================
-- 完成提示
-- =====================================================
-- 执行完成后，请：
-- 1. 清除浏览器缓存或使用无痕模式
-- 2. 重新登录管理后台
-- 3. 刷新页面查看菜单是否正常
