feat(admin): 用户管理新增用户明细抽屉,聚合资金与交易全链路数据
- 用户管理操作列新增「明细」入口,抽屉按权限提供 5 个 Tab:钱包流水、订单记录、提现记录、邀请返利、支付记录 - 后端:后台订单列表新增 user_id 精确过滤(owner_id / renter_id),邀请关系与返利流水新增 inviter_id / invitee_id 过滤 - 修复:返利流水的「被邀请人手机号」筛选此前后端未实现,一直无效 - 资金流水页、支付记录页支持 ?user_id= 预填,可从明细直达 - 顺带将 invitation/dto.go、repository.go 中两处既有缩进错位按 gofmt 规整
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
Wallet,
|
||||
} from '@element-plus/icons-vue'
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
import { fetchAdminPayments, type AdminPayment } from '@/features/admin/api/adminPayments'
|
||||
import { adminPath } from '@/shared/utils/adminPath'
|
||||
@@ -45,7 +46,14 @@ const refundAmount = computed(() =>
|
||||
.reduce((sum, item) => sum + Number(item.amount_cent || 0), 0)
|
||||
)
|
||||
|
||||
onMounted(loadPayments)
|
||||
onMounted(() => {
|
||||
// 支持从用户管理「明细」跳转预填用户,直接查看该用户的支付记录。
|
||||
const routeUserID = useRoute().query.user_id
|
||||
if (typeof routeUserID === 'string' && routeUserID.trim()) {
|
||||
filters.user_id = routeUserID.trim()
|
||||
}
|
||||
void loadPayments()
|
||||
})
|
||||
|
||||
async function loadPayments() {
|
||||
loading.value = true
|
||||
|
||||
Reference in New Issue
Block a user