This commit is contained in:
dute7liang
2024-01-16 21:34:17 +08:00
parent 360d6e62a4
commit e0b567de79
2 changed files with 102 additions and 27 deletions

View File

@@ -17,28 +17,34 @@ export function getAccountCash(id) {
})
}
// 新增用户提现记录
export function addAccountCash(data) {
export function accountCashSuccess(id) {
return request({
url: '/cai/accountCash',
method: 'post',
data: data
url: '/cai/accountCash/success',
method: 'get',
params: {id}
})
}
// 修改用户提现记录
export function updateAccountCash(data) {
export function accountCashFail(id) {
return request({
url: '/cai/accountCash',
method: 'put',
data: data
url: '/cai/accountCash/fail',
method: 'get',
params: {id}
})
}
// 删除用户提现记录
export function delAccountCash(id) {
export function accountCashClose(id) {
return request({
url: '/cai/accountCash/' + id,
method: 'delete'
url: '/cai/accountCash/close',
method: 'get',
params: {id}
})
}
export function accountCashBatchSuccess(ids) {
return request({
url: '/cai/accountCash/batchSuccess',
method: 'get',
params: {ids}
})
}

View File

@@ -49,10 +49,9 @@
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['cai:accountCash:edit']"
>批量审核</el-button>
:disabled="multiple"
@click="handleBatchSuccess"
>批量通过</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -84,16 +83,27 @@
<el-table-column label="申请时间" align="center" prop="createTime" />
<el-table-column label="审核人IP" align="center" prop="operateIp" />
<el-table-column label="审核时间" align="center" prop="verifyTime" />
<el-table-column label="审核备注" align="center" prop="verifyRemark" />
<!-- <el-table-column label="审核备注" align="center" prop="verifyRemark" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:accountCash:edit']"
>审核</el-button>
@click="handleSuccess(scope.row)"
v-if="scope.row.status === 1"
>通过</el-button>
<el-button
size="mini"
type="text"
@click="handleFail(scope.row)"
v-if="scope.row.status === 1"
>不通过</el-button>
<el-button
size="mini"
type="text"
@click="handleClose(scope.row)"
v-if="scope.row.status === 1"
>取消</el-button>
</template>
</el-table-column>
</el-table>
@@ -109,8 +119,14 @@
</template>
<script>
import { listAccountCash } from '@/api/cai/accountCash'
import { cashStatusList } from '@/constant/statusMap'
import {
accountCashBatchSuccess,
accountCashClose,
accountCashFail,
accountCashSuccess,
listAccountCash
} from '@/api/cai/accountCash'
import {cashStatusList} from '@/constant/statusMap'
export default {
name: "AccountCash",
@@ -172,8 +188,61 @@ export default {
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
handleSuccess(row) {
const id = row.id
this.$modal.confirm('是否确认通过该提现?').then(() => {
this.loading = true;
return accountCashSuccess(id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleFail(row) {
const id = row.id
this.$modal.confirm('是否不通过该提现?').then(() => {
this.loading = true;
return accountCashFail(id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleClose(row) {
const id = row.id
this.$modal.confirm('是否取消该提现?').then(() => {
this.loading = true;
return accountCashClose(id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleBatchSuccess() {
const ids = this.ids.split(",");
this.$modal.confirm('是否批量确认通过该提现?').then(() => {
this.loading = true;
return accountCashBatchSuccess(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {