feat: 完成WMS系统权限体系与业务功能迭代

本提交完成了WMS系统的多维度优化升级:
1. 新增RBAC权限系统,支持角色/菜单/按钮三级权限管控
2. 重构库存盘点、物料管理、区域维护等模块的查询筛选与展示逻辑
3. 优化入库/出库/质检等业务流程,完善数据冗余与业务闭环
4. 移除旧装箱表,将装箱逻辑合并到出库主表
5. 新增前端权限判断工具、导出工具与端到端测试用例
6. 补充完善各类注释与数据库字段说明
This commit is contained in:
SunYF
2026-09-03 14:20:37 +08:00
parent 665ff257dc
commit 572fa975bc
101 changed files with 14531 additions and 4692 deletions
+18 -6
View File
@@ -116,16 +116,28 @@ func (f OutboundOrderFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Valu
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.OutboundOrderMutation", m)
}
// The PackageBoxFunc type is an adapter to allow the use of ordinary
// function as PackageBox mutator.
type PackageBoxFunc func(context.Context, *ent.PackageBoxMutation) (ent.Value, error)
// The PermissionFunc type is an adapter to allow the use of ordinary
// function as Permission mutator.
type PermissionFunc func(context.Context, *ent.PermissionMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f PackageBoxFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.PackageBoxMutation); ok {
func (f PermissionFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.PermissionMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.PackageBoxMutation", m)
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.PermissionMutation", m)
}
// The RoleFunc type is an adapter to allow the use of ordinary
// function as Role mutator.
type RoleFunc func(context.Context, *ent.RoleMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f RoleFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.RoleMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.RoleMutation", m)
}
// The SemiFinishedFunc type is an adapter to allow the use of ordinary