trim((string)($_GET['user_id'] ?? '')), 'type' => trim((string)($_GET['type'] ?? '')), 'order_no' => trim((string)($_GET['order_no'] ?? '')), ]; $result = balance_admin_logs($page_num, 30, $filters); $list = $result['list']; $total = $result['total']; $total_pages = $result['per_page'] > 0 ? (int)ceil($total / $result['per_page']) : 1; $type_labels = [ 'recharge' => '充值', 'consume' => '消费', 'refund' => '退款', 'adjust' => '调整', ]; $type_classes = [ 'recharge' => 'badge-success', 'consume' => 'badge-danger', 'refund' => 'badge-info', 'adjust' => 'badge-warning', ]; $title = $title ?? '余额流水'; mnbt_admin_include('head'); ?>
| ID | 用户ID | 用户名 | 金额(元) | 变动后余额(元) | 类型 | 订单号 | 备注 | 时间 |
|---|---|---|---|---|---|---|---|---|
| 暂无记录 | ||||||||
| = (int)$log['id'] ?> | = (int)$log['user_id'] ?> | = htmlspecialchars($log['username'] ?: ('#' . $log['user_id']), ENT_QUOTES) ?> |
= $is_income ? '+' : '' ?>¥= htmlspecialchars(balance_format(abs($amt)), ENT_QUOTES) ?> | ¥= htmlspecialchars(balance_format((int)$log['balance_after']), ENT_QUOTES) ?> | = htmlspecialchars($type_labels[$log['type']] ?? $log['type']) ?> | = htmlspecialchars($log['order_no'] ?: '-', ENT_QUOTES) ?> | = htmlspecialchars($log['remark'] ?: '-', ENT_QUOTES) ?> | = htmlspecialchars($log['created_at'], ENT_QUOTES) ?> |