fix(stats/self_input): 修复保存不入库/路由 404,补全部门与自媒体来源下拉
- 模型去掉 defaultSoftDelete=0,避免 ThinkPHP 软删过滤导致新增记录"隐形" - 菜单 paths 改相对路径并新增「自录数据统计」目录,迁移已有菜单 - Lists/Overview 补部门关联、支持按部门筛选 - 数据权限改由 self_input_stats_view_all_roles 白名单 + DataScope 控制, 编辑/删除完全交给按钮权限校验(移除"仅本人可改"硬限制) - 新增 /stats.self_input/mediaSourceOptions 接口,统计页/账户消耗页/录入弹窗 共用 useMediaSourceOptions + MediaSourceSelect,去重动态加载 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -64,12 +64,6 @@ class PersonalAccountCostLogic extends BaseLogic
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!self::canMutateRecord($adminId, $adminInfo, (int) $model->creator_id)) {
|
||||
self::setError('仅可编辑本人录入的账户消耗');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$model->amount = round((float) ($params['amount'] ?? 0), 2);
|
||||
$model->remark = (string) ($params['remark'] ?? '');
|
||||
$model->updater_id = $adminId;
|
||||
@@ -100,12 +94,6 @@ class PersonalAccountCostLogic extends BaseLogic
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!self::canMutateRecord($adminId, $adminInfo, (int) $model->creator_id)) {
|
||||
self::setError('仅可删除本人录入的账户消耗');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$model->delete();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user