diff --git a/menu_init.sql b/menu_init.sql new file mode 100644 index 0000000..f7582f1 --- /dev/null +++ b/menu_init.sql @@ -0,0 +1,74 @@ +-- 完整菜单初始化SQL +-- 创建时间: 2025-11-20 +-- 说明: 包含所有新增的菜单项和权限分配 + +-- ======================================== +-- 1. 工作台菜单 +-- ======================================== +INSERT INTO menu (id, name, menu_type, icon, path, "order", parent_id, is_hidden, component, keepalive, redirect, created_at, updated_at) +VALUES + (22, '工作台', 'menu', 'carbon:dashboard', '/workbench', 1, 0, 0, '/workbench', 1, NULL, datetime('now'), datetime('now')); + +-- ======================================== +-- 2. 交易管理菜单 +-- ======================================== +-- 插入一级目录:交易管理 +INSERT INTO menu (id, name, menu_type, icon, path, "order", parent_id, is_hidden, component, keepalive, redirect, created_at, updated_at) +VALUES + (16, '交易管理', 'catalog', 'carbon:receipt', '/transaction', 3, 0, 0, 'Layout', 0, '/transaction/invoice', datetime('now'), datetime('now')); + +-- 插入二级菜单:交易管理 +INSERT INTO menu (id, name, menu_type, icon, path, "order", parent_id, is_hidden, component, keepalive, redirect, created_at, updated_at) +VALUES + (17, '交易管理', 'menu', 'carbon:document', 'invoice', 1, 16, 0, '/transaction/invoice', 0, NULL, datetime('now'), datetime('now')); + +-- ======================================== +-- 3. 估值管理菜单 +-- ======================================== +-- 插入一级目录:估值管理 +INSERT INTO menu (id, name, menu_type, icon, path, "order", parent_id, is_hidden, component, keepalive, redirect, created_at, updated_at) +VALUES + (18, '估值管理', 'catalog', 'carbon:calculator', '/valuation', 4, 0, 0, 'Layout', 0, '/valuation/audit', datetime('now'), datetime('now')); + +-- 插入二级菜单:审核列表 +INSERT INTO menu (id, name, menu_type, icon, path, "order", parent_id, is_hidden, component, keepalive, redirect, created_at, updated_at) +VALUES + (19, '审核列表', 'menu', 'carbon:task-approved', 'audit', 1, 18, 0, '/valuation/audit', 0, NULL, datetime('now'), datetime('now')); + +-- ======================================== +-- 4. 用户管理菜单 +-- ======================================== +-- 插入一级目录:用户管理 +INSERT INTO menu (id, name, menu_type, icon, path, "order", parent_id, is_hidden, component, keepalive, redirect, created_at, updated_at) +VALUES + (20, '用户管理', 'catalog', 'carbon:user-multiple', '/user-management', 5, 0, 0, 'Layout', 0, '/user-management/user-list', datetime('now'), datetime('now')); + +-- 插入二级菜单:用户列表 +INSERT INTO menu (id, name, menu_type, icon, path, "order", parent_id, is_hidden, component, keepalive, redirect, created_at, updated_at) +VALUES + (21, '用户列表', 'menu', 'carbon:user', 'user-list', 1, 20, 0, '/user-management/user-list', 0, NULL, datetime('now'), datetime('now')); + +-- ======================================== +-- 角色权限分配 +-- ======================================== + +-- 为管理员角色(role_id=1)分配所有菜单权限 +INSERT INTO role_menu (role_id, menu_id) +VALUES + (1, 22), -- 工作台 + (1, 16), -- 交易管理 + (1, 17), -- 交易管理 + (1, 18), -- 估值管理 + (1, 19), -- 审核列表 + (1, 20), -- 用户管理 + (1, 21); -- 用户列表 + +-- 为普通用户角色(role_id=2)分配基础菜单权限 +INSERT INTO role_menu (role_id, menu_id) +VALUES + (2, 22), -- 工作台 + (2, 16), -- 交易管理 + (2, 17), -- 交易管理 + (2, 18), -- 估值管理 + (2, 19); -- 审核列表 + -- 注意:普通用户不分配用户管理权限 \ No newline at end of file diff --git a/web/.env.development b/web/.env.development index d4aa8df..309efdb 100644 --- a/web/.env.development +++ b/web/.env.development @@ -5,4 +5,4 @@ VITE_PUBLIC_PATH = '/' VITE_USE_PROXY = true # base api -VITE_BASE_API = '/api/v1' +VITE_BASE_API = 'http://139.224.70.152:9990/api/v1' diff --git a/web/src/api/index.js b/web/src/api/index.js index 20cfdcf..461a67a 100644 --- a/web/src/api/index.js +++ b/web/src/api/index.js @@ -723,9 +723,6 @@ export default { remindInvoice: (data = {}) => request.post('/invoice/remind', data), refundInvoice: (data = {}) => request.post('/invoice/refund', data), sendInvoice: (data = {}) => request.post('/invoice/send', data), - // transactions (对公转账记录) - getReceiptList: (params = {}) => request.get('/transactions/receipts', { params }), - getReceiptById: (params = {}) => request.get(`/transactions/receipts/${params.id}`), // valuation (估值评估) getValuationList: (params = {}) => { // 模拟分页和搜索 diff --git a/web/src/views/transaction/invoice/index.vue b/web/src/views/transaction/invoice/index.vue index 50620f0..1cc0343 100644 --- a/web/src/views/transaction/invoice/index.vue +++ b/web/src/views/transaction/invoice/index.vue @@ -1,26 +1,14 @@