Files
erp-next/sql/20260601/003_add_clientquote_menu.sql
王文昊 a75589018f feat(bid): 完成甲方报价模块全量功能开发
1.  新增甲方报价业务实体,继承基础实体类
2.  新增供应商报价明细查询接口,支持按供应商ID展开物料明细
3.  重构甲方报价关联逻辑,通过material_id精确关联物料表
4.  新增甲方报价历史统计、月度趋势、快速新建等服务功能
5.  完善菜单配置,修正甲方报价菜单结构,添加完整权限控制
6.  新增物料搜索自动补全功能,优化报价单详情页面
7.  在供应商详情页新增报价历史Tab页签,展示该供应商的所有报价物料明细
8.  在物料详情页新增甲方报价记录Tab页签,展示该物料的所有甲方报价历史
9.  新增数据库优化脚本,添加索引并修复历史数据关联
2026-06-01 19:05:04 +08:00

51 lines
4.3 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.

-- ============================================================================
-- 添加"甲方报价"菜单到智慧报价模块
-- 说明:
-- 1. 在智慧报价模块下添加"甲方报价"菜单(目录)
-- 2. 添加"甲方报价历史"菜单(菜单)
-- 3. 添加"甲方报价单详情"隐藏路由
-- ============================================================================
-- 1. 添加甲方报价目录菜单parent_id = 2000 智慧报价)
INSERT INTO sys_menu (menu_id, 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 (2060, '甲方报价', 2000, 5, 'clientquote', NULL, NULL, 1, 0, 'M', '0', '0', NULL, 'el-icon-document-copy', 'admin', NOW(), 'admin', NOW(), '甲方报价管理模块');
-- 2. 添加甲方报价历史页面菜单
INSERT INTO sys_menu (menu_id, 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 (2061, '甲方报价历史', 2060, 1, 'history', 'bid/clientquote/history/index', NULL, 1, 0, 'C', '0', '0', 'bid:clientquote:history', 'el-icon-document-copy', 'admin', NOW(), 'admin', NOW(), '甲方报价历史记录');
-- 3. 添加甲方报价单详情隐藏路由(路径为 /quotemgr/clientquote/detail
INSERT INTO sys_menu (menu_id, 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 (2062, '甲方报价单详情', 2060, 2, 'detail', 'bid/clientquote/detail', NULL, 1, 0, 'C', '1', '0', 'bid:clientquote:detail', NULL, 'admin', NOW(), 'admin', NOW(), '甲方报价单详情编辑页');
-- 4. 添加甲方报价列表页(给现有的 clientquote/index.vue
INSERT INTO sys_menu (menu_id, 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 (2063, '甲方报价列表', 2060, 3, 'index', 'bid/clientquote/index', NULL, 1, 0, 'C', '0', '0', 'bid:clientquote:list', NULL, 'admin', NOW(), 'admin', NOW(), '甲方报价列表');
-- ============================================================================
-- 添加权限按钮
-- ============================================================================
-- 甲方报价历史:查询
INSERT INTO sys_menu (menu_id, 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 (2064, '查询', 2061, 1, '#', NULL, NULL, 1, 0, 'F', '0', '0', 'bid:clientquote:query', '#', 'admin', NOW(), 'admin', NOW(), '');
-- 甲方报价历史:新增
INSERT INTO sys_menu (menu_id, 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 (2065, '新增', 2061, 2, '#', NULL, NULL, 1, 0, 'F', '0', '0', 'bid:clientquote:add', '#', 'admin', NOW(), 'admin', NOW(), '');
-- 甲方报价历史:修改
INSERT INTO sys_menu (menu_id, 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 (2066, '修改', 2061, 3, '#', NULL, NULL, 1, 0, 'F', '0', '0', 'bid:clientquote:edit', '#', 'admin', NOW(), 'admin', NOW(), '');
-- 甲方报价历史:删除
INSERT INTO sys_menu (menu_id, 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 (2067, '删除', 2061, 4, '#', NULL, NULL, 1, 0, 'F', '0', '0', 'bid:clientquote:remove', '#', 'admin', NOW(), 'admin', NOW(), '');
-- ============================================================================
-- 分配菜单给管理员角色 (role_id = 1)
-- ============================================================================
INSERT INTO sys_role_menu (role_id, menu_id)
SELECT 1, menu_id FROM sys_menu WHERE menu_id BETWEEN 2060 AND 2067
AND NOT EXISTS (SELECT 1 FROM sys_role_menu WHERE role_id = 1 AND menu_id = sys_menu.menu_id);