|
|
@@ -0,0 +1,160 @@
|
|
|
+<template>
|
|
|
+ <div class="divBox">
|
|
|
+ <el-card :bordered="false" shadow="never" class="ivu-mt" :body-style="{ padding: 0 }">
|
|
|
+ <div class="padding-add">
|
|
|
+ <el-form size="small" inline @submit.native.prevent>
|
|
|
+ <el-form-item label="提现状态:">
|
|
|
+ <el-select v-model="tableFrom.status" placeholder="请选择" class="selWidth" clearable @change="getList(1)">
|
|
|
+ <el-option label="全部" value="" />
|
|
|
+ <el-option label="待处理" value="0" />
|
|
|
+ <el-option label="已放款" value="1" />
|
|
|
+ <el-option label="已拒绝" value="2" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="提现地址:">
|
|
|
+ <el-input v-model.trim="tableFrom.address" @keyup.enter.native="getList(1)" placeholder="请输入提现地址" class="selWidth" size="small" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="用户账号:">
|
|
|
+ <el-input v-model.trim="tableFrom.account" @keyup.enter.native="getList(1)" placeholder="请输入用户账号/ID" class="selWidth" size="small" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" size="small" @click="getList(1)">查询</el-button>
|
|
|
+ <el-button size="small" @click="reset()">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card mt14" :body-style="{ padding: '20px' }" shadow="never" :bordered="false">
|
|
|
+ <el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="small" height="500">
|
|
|
+ <el-table-column prop="transactionId" label="交易ID" min-width="220" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column prop="account" label="用户账号" min-width="120" />
|
|
|
+ <el-table-column label="提现金额(sL)" min-width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ Number(scope.row.amount) + Number(scope.row.handlingFeeSl) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="amount" label="到账金额(sL)" min-width="80" />
|
|
|
+ <el-table-column prop="handlingFeeSl" label="手续费(sL)" min-width="100" />
|
|
|
+ <el-table-column prop="address" label="提现地址" min-width="200" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="状态" min-width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.status === 0">待处理</span>
|
|
|
+ <span v-else-if="scope.row.status === 1" style="color:#009688">已放款</span>
|
|
|
+ <span v-else-if="scope.row.status === 2" style="color:#ed4014">已拒绝</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createTime" label="申请时间" min-width="150" />
|
|
|
+ <el-table-column prop="remark" label="备注" min-width="150" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="操作" width="150" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <template v-if="scope.row.status === 0">
|
|
|
+ <el-button type="text" size="small" @click="onAudit(scope.row.id, 1)">放款</el-button>
|
|
|
+ <el-button type="text" size="small" @click="onReject(scope.row.id)">拒绝</el-button>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="block">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ :page-sizes="[20, 40, 60, 80]"
|
|
|
+ :page-size="tableFrom.limit"
|
|
|
+ :current-page="tableFrom.page"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="tableData.total"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="pageChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { withdrawalListApi, withdrawalAuditApi } from '@/api/finance';
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'FinanceWithdrawal',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableFrom: {
|
|
|
+ page: 1,
|
|
|
+ limit: 20,
|
|
|
+ status: '',
|
|
|
+ address: '',
|
|
|
+ account: '',
|
|
|
+ },
|
|
|
+ listLoading: true,
|
|
|
+ tableData: {
|
|
|
+ data: [],
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList(num) {
|
|
|
+ this.listLoading = true;
|
|
|
+ this.tableFrom.page = num ? num : this.tableFrom.page;
|
|
|
+ withdrawalListApi(this.tableFrom)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableData.data = res.list;
|
|
|
+ this.tableData.total = res.total;
|
|
|
+ this.listLoading = false;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.listLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ reset() {
|
|
|
+ this.tableFrom.status = '';
|
|
|
+ this.tableFrom.address = '';
|
|
|
+ this.tableFrom.account = '';
|
|
|
+ this.getList(1);
|
|
|
+ },
|
|
|
+ pageChange(page) {
|
|
|
+ this.tableFrom.page = page;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.tableFrom.limit = val;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ onAudit(id, status) {
|
|
|
+ this.$confirm('确定要放款吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.submitAudit(id, status);
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+ onReject(id) {
|
|
|
+ this.$prompt('请输入拒绝原因/备注', '拒绝提现', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ }).then(({ value }) => {
|
|
|
+ this.submitAudit(id, 2, value);
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+ submitAudit(id, status, remark = '') {
|
|
|
+ const loading = this.$loading({ lock: true, text: '处理中...', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' });
|
|
|
+ withdrawalAuditApi({ id, status, remark }).then(() => {
|
|
|
+ loading.close();
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.getList();
|
|
|
+ }).catch(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.selWidth {
|
|
|
+ width: 260px;
|
|
|
+}
|
|
|
+</style>
|