|
|
@@ -12,24 +12,11 @@
|
|
|
<ElTableColumn prop="createdAt" label="创建时间" width="150" :formatter="timeFormatter" />
|
|
|
<ElTableColumn label="操作" width="180" align="center">
|
|
|
<template #default="{ row }">
|
|
|
- <ElButton
|
|
|
- v-if="row.status === 'PENDING'"
|
|
|
- @click="finish(row, true)"
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- :disabled="processing"
|
|
|
- >
|
|
|
- 完成
|
|
|
- </ElButton>
|
|
|
- <ElButton
|
|
|
- v-if="row.status === 'PENDING'"
|
|
|
- @click="finish(row, false)"
|
|
|
- type="danger"
|
|
|
- plain
|
|
|
- :disabled="processing"
|
|
|
- >
|
|
|
- 拒绝
|
|
|
- </ElButton>
|
|
|
+ <ElButton v-if="selected && selected.id === row.id && processing" loading disabled />
|
|
|
+ <template v-else-if="row.status === 'PENDING'">
|
|
|
+ <ElButton @click="finish(row, true)" type="success" plain :disabled="processing"> 完成 </ElButton>
|
|
|
+ <ElButton @click="finish(row, false)" type="danger" plain :disabled="processing"> 拒绝 </ElButton>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</ElTableColumn>
|
|
|
</PagingTable>
|
|
|
@@ -42,6 +29,7 @@ import { WithdrawStatus } from '@/enums'
|
|
|
import EnumSelect from '@/components/EnumSelect.vue'
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
|
|
import { http } from '@/plugins/http'
|
|
|
+import { Loader } from '@vicons/tabler'
|
|
|
|
|
|
const table = ref(null)
|
|
|
const timeFormatter = useTimeFormatter()
|
|
|
@@ -51,8 +39,9 @@ const where = ref({
|
|
|
})
|
|
|
|
|
|
const processing = ref(false)
|
|
|
+const selected = ref(null)
|
|
|
async function finish(row, success) {
|
|
|
- console.log(event)
|
|
|
+ selected.value = row
|
|
|
try {
|
|
|
processing.value = true
|
|
|
await ElMessageBox.confirm(`确认${success ? '完成' : '拒绝'}提现申请?`, '确认', {
|