fix: router, 佣金
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m20s

This commit is contained in:
luo
2026-08-14 17:22:47 +08:00
parent 0d2a982f69
commit 737ade3a5e
6 changed files with 73 additions and 48 deletions

View File

@@ -29,6 +29,9 @@
:pageSize="pagination.pageSize"
:total="pagination.total"
:marginTop="10"
:actions="getActions"
:inlineActionsCount="1"
:actionsWidth="160"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
@@ -83,7 +86,6 @@
} from '@/types/api/commission'
import type { SearchFormItem } from '@/types'
import { useCheckedColumns } from '@/composables/useCheckedColumns'
import ArtButtonTable from '@/components/core/forms/ArtButtonTable.vue'
import { formatDateTime, formatMoney } from '@/utils/business/format'
import { WithdrawalStatusMap, WithdrawalMethodMap } from '@/config/constants'
import { useI18n } from 'vue-i18n'
@@ -192,8 +194,7 @@
{ label: '提现方式', prop: 'withdrawal_method' },
{ label: '状态', prop: 'status' },
{ label: '申请时间', prop: 'created_at' },
{ label: '审批时间', prop: 'processed_at' },
{ label: '操作', prop: 'operation' }
{ label: '审批时间', prop: 'processed_at' }
]
const rejectFormRef = ref<FormInstance>()
@@ -277,30 +278,6 @@
label: '审批时间',
width: 180,
formatter: (row: WithdrawalRequestItem) => formatDateTime(row.processed_at)
},
{
prop: 'operation',
label: '操作',
width: 150,
fixed: 'right',
formatter: (row: WithdrawalRequestItem) => {
// 只有待审核状态才显示操作按钮
if (row.status === 1) {
return h('div', { style: 'display: flex; gap: 8px;' }, [
h(ArtButtonTable, {
text: '审批通过',
iconColor: '#67C23A',
onClick: () => handleApprove(row)
}),
h(ArtButtonTable, {
text: '拒绝',
iconColor: '#F56C6C',
onClick: () => showRejectDialog(row)
})
])
}
return '-'
}
}
])
@@ -443,6 +420,24 @@
}
})
}
// 获取操作按钮,使用 ArtTable 统一的文字操作样式
const getActions = (row: WithdrawalRequestItem) => {
if (row.status !== 1) return []
return [
{
label: '审批通过',
handler: () => handleApprove(row),
type: 'primary' as const
},
{
label: '拒绝',
handler: () => showRejectDialog(row),
type: 'danger' as const
}
]
}
</script>
<style lang="scss" scoped>