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 accountCashSuccess(id) {
export function addAccountCash(data) {
return request({ return request({
url: '/cai/accountCash', url: '/cai/accountCash/success',
method: 'post', method: 'get',
data: data params: {id}
}) })
} }
// 修改用户提现记录 export function accountCashFail(id) {
export function updateAccountCash(data) {
return request({ return request({
url: '/cai/accountCash', url: '/cai/accountCash/fail',
method: 'put', method: 'get',
data: data params: {id}
}) })
} }
// 删除用户提现记录 export function accountCashClose(id) {
export function delAccountCash(id) {
return request({ return request({
url: '/cai/accountCash/' + id, url: '/cai/accountCash/close',
method: 'delete' 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 plain
icon="el-icon-edit" icon="el-icon-edit"
size="mini" size="mini"
:disabled="single" :disabled="multiple"
@click="handleUpdate" @click="handleBatchSuccess"
v-hasPermi="['cai:accountCash:edit']" >批量通过</el-button>
>批量审核</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@@ -84,16 +83,27 @@
<el-table-column label="申请时间" align="center" prop="createTime" /> <el-table-column label="申请时间" align="center" prop="createTime" />
<el-table-column label="审核人IP" align="center" prop="operateIp" /> <el-table-column label="审核人IP" align="center" prop="operateIp" />
<el-table-column label="审核时间" align="center" prop="verifyTime" /> <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"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" @click="handleSuccess(scope.row)"
@click="handleUpdate(scope.row)" v-if="scope.row.status === 1"
v-hasPermi="['cai:accountCash:edit']" >通过</el-button>
>审核</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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -109,7 +119,13 @@
</template> </template>
<script> <script>
import { listAccountCash } from '@/api/cai/accountCash' import {
accountCashBatchSuccess,
accountCashClose,
accountCashFail,
accountCashSuccess,
listAccountCash
} from '@/api/cai/accountCash'
import {cashStatusList} from '@/constant/statusMap' import {cashStatusList} from '@/constant/statusMap'
export default { export default {
@@ -172,8 +188,61 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 修改按钮操作 */ handleSuccess(row) {
handleUpdate(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() { handleExport() {