feat: 新增提现管理员审批
This commit is contained in:
parent
0f76fd36bc
commit
b301439644
|
@ -44,3 +44,12 @@ export interface ListParams {
|
||||||
export function lists(params: ListParams) {
|
export function lists(params: ListParams) {
|
||||||
return axios.post<jobuser>('/admin/api/v1/withdraw/lists',params);
|
return axios.post<jobuser>('/admin/api/v1/withdraw/lists',params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param data 管理员同意转账
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function pushMoney(params:any) {
|
||||||
|
return axios.post<jobuser>('/api/withdraw/pushMoney',params);
|
||||||
|
}
|
||||||
|
|
|
@ -67,6 +67,11 @@
|
||||||
<a-table-column title="交易时间" data-index="createtime2"></a-table-column>
|
<a-table-column title="交易时间" data-index="createtime2"></a-table-column>
|
||||||
<a-table-column title="交易金额" data-index="amount"></a-table-column>
|
<a-table-column title="交易金额" data-index="amount"></a-table-column>
|
||||||
<a-table-column title="订单编号" data-index="id"></a-table-column>
|
<a-table-column title="订单编号" data-index="id"></a-table-column>
|
||||||
|
<a-table-column title="操作">
|
||||||
|
<template #cell="{ record }">
|
||||||
|
<a-button v-if="record.status == '1'" @click="showConfirm(record)">审批</a-button>
|
||||||
|
</template>
|
||||||
|
</a-table-column>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -96,10 +101,9 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, reactive, watch, nextTick, onMounted } from 'vue';
|
import { computed, ref, reactive, watch, nextTick, onMounted } from 'vue';
|
||||||
import { PaginationProps,TableChangeExtra } from '@arco-design/web-vue';
|
import { PaginationProps,TableChangeExtra } from '@arco-design/web-vue';
|
||||||
import { lists } from '@/api/withdraw';
|
import { lists,pushMoney } from '@/api/withdraw';
|
||||||
import { Modal } from '@arco-design/web-vue';
|
import { Modal } from '@arco-design/web-vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { login } from '@/api/user';
|
|
||||||
|
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
username: "",
|
username: "",
|
||||||
|
@ -153,16 +157,38 @@ const handleTableChange = (page:number) => {
|
||||||
// queryParams.value.pageSize = pagination.pageSize;
|
// queryParams.value.pageSize = pagination.pageSize;
|
||||||
// getAll();
|
// getAll();
|
||||||
// }
|
// }
|
||||||
// const showConfirm = (id: string) => {
|
const showConfirm = (record) => {
|
||||||
// Modal.confirm({
|
Modal.confirm({
|
||||||
// title: '操作提醒',
|
title: '操作提醒',
|
||||||
// content: '是否同意该用户的提现申请',
|
content: '是否同意该用户的提现申请',
|
||||||
// okText: '同意',
|
okText: '同意',
|
||||||
// cancelText: '拒绝',
|
cancelText: '拒绝',
|
||||||
// onOk: () => handleBlock(id),
|
onOk: () => handleBlock(record),
|
||||||
// onCancel: () => Message.info('取消操作'),
|
onCancel: () => handleNotBlock(record),
|
||||||
// });
|
});
|
||||||
// };
|
};
|
||||||
|
|
||||||
|
//同意提现
|
||||||
|
const handleBlock = async(record:any) => {
|
||||||
|
record.type = 0;
|
||||||
|
const res = await pushMoney(record);
|
||||||
|
if(res.code === 200 ){
|
||||||
|
reset();
|
||||||
|
Message.success('操作成功')
|
||||||
|
}else{
|
||||||
|
Message.error(res.msg)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//不同意提现
|
||||||
|
const handleNotBlock = async(record:any) => {
|
||||||
|
record.type = 1;
|
||||||
|
const res = await pushMoney(record);
|
||||||
|
if(res.code === 200 ){
|
||||||
|
reset();
|
||||||
|
Message.success('操作成功')
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
//显示合计
|
//显示合计
|
||||||
const summary = () => {
|
const summary = () => {
|
||||||
|
|
Loading…
Reference in New Issue