feat(admin): 提现审核一键查看号主相关订单,订单页支持URL预填搜索
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
import type { WithdrawalDetail } from '@/features/admin/api/adminWithdrawal'
|
||||
import { reviewWithdrawal, confirmPayment } from '@/features/admin/api/adminWithdrawal'
|
||||
import { formatCent } from '@/shared/utils/money'
|
||||
import { adminPath } from '@/shared/utils/adminPath'
|
||||
import AuthImage from '@/shared/components/business/AuthImage.vue'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
withdrawal: WithdrawalDetail | null
|
||||
@@ -19,6 +23,16 @@ const emit = defineEmits<{
|
||||
|
||||
const submitting = ref(false)
|
||||
|
||||
/** 跳转订单管理页并预填号主搜索,快速查看该号主相关订单 */
|
||||
function goToOwnerOrders() {
|
||||
if (!props.withdrawal) return
|
||||
const keyword = props.withdrawal.user_phone?.trim() || String(props.withdrawal.user_id || '')
|
||||
void router.push({
|
||||
path: adminPath('orders'),
|
||||
query: keyword ? { keyword } : {},
|
||||
})
|
||||
}
|
||||
|
||||
async function handleReview(approved: boolean) {
|
||||
if (!props.withdrawal) return
|
||||
|
||||
@@ -144,7 +158,18 @@ function accountTypeLabel(type: string) {
|
||||
</el-descriptions>
|
||||
|
||||
<!-- 用户信息 -->
|
||||
<h3 style="margin-top: 20px">用户信息</h3>
|
||||
<h3 style="margin-top: 20px">
|
||||
用户信息
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
plain
|
||||
style="margin-left: 12px"
|
||||
@click="goToOwnerOrders"
|
||||
>
|
||||
查看该号主订单
|
||||
</el-button>
|
||||
</h3>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="用户ID">
|
||||
{{ withdrawal.user_id }}
|
||||
|
||||
Reference in New Issue
Block a user