新增提现审核
This commit is contained in:
parent
a526f5ddd6
commit
139f198ad5
|
|
@ -0,0 +1,27 @@
|
|||
import $http from "@/utils/httpRequest";
|
||||
|
||||
/**
|
||||
* 提现记录
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function cashOutAuditPage(params) {
|
||||
return $http({
|
||||
url: "/cashOutAudit/page",
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现审核
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function cashOutAuditAudit(data) {
|
||||
return $http({
|
||||
url: "/cashOutAudit/audit",
|
||||
method: "POST",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
|
@ -2,9 +2,9 @@ export const testUrl='video-admin';
|
|||
export const productUrl='dj-admin';
|
||||
|
||||
// const baseUrl = "http://192.168.1.7:8100/czg/"
|
||||
// const baseUrl = "https://video.hnsiyao.cn/czg/"
|
||||
const baseUrl = "https://video.hnsiyao.cn/czg/" //
|
||||
// const baseUrl = "https://api.tianjinzhitongdaohe.com/czg/"
|
||||
const baseUrl = "https://dj-api.hnsiyao.cn/czg/"
|
||||
// const baseUrl = "https://dj-api.hnsiyao.cn/czg/" // 线上
|
||||
|
||||
export default{
|
||||
baseUrl
|
||||
|
|
|
|||
|
|
@ -0,0 +1,256 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form inline>
|
||||
<el-form-item label="用户ID">
|
||||
<el-input v-model="query.userId" placeholder="请输入用户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名">
|
||||
<el-input v-model="query.userName" placeholder="请输入用户名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="支付宝账号">
|
||||
<el-input v-model="query.zhifubao" placeholder="请输入支付宝账号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="支付宝姓名">
|
||||
<el-input v-model="query.zhifubaoName" placeholder="请输入支付宝姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="提现类型">
|
||||
<el-select v-model="query.userType">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="用户提现" value="1"></el-option>
|
||||
<el-option label="分销商提现" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="query.state">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="待转账" value="0"></el-option>
|
||||
<el-option label="成功" value="1"></el-option>
|
||||
<el-option label="失败" value="2"></el-option>
|
||||
<el-option label="待审核" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker v-model="timeValue" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" @change="changeTime"
|
||||
:default-time="['00:00:00', '23:59:59']">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="queryHandle">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="tableData.loading" :data="tableData.list" border stripe>
|
||||
<el-table-column label="提现申请ID" prop="id"></el-table-column>
|
||||
<el-table-column label="用户id" prop="userId"></el-table-column>
|
||||
<el-table-column label="用户名" prop="userName"></el-table-column>
|
||||
<el-table-column label="提现金额" prop="money">
|
||||
<template slot-scope="scope">
|
||||
¥{{ scope.row.money }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手续费" prop="rate">
|
||||
<template slot-scope="scope">
|
||||
¥{{ scope.row.rate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否转账" prop="isOut"></el-table-column>
|
||||
<el-table-column label="会员编号" prop="relationId"></el-table-column>
|
||||
<el-table-column label="支付宝信息" prop="zhifubao">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.zhifubaoName }} / {{ scope.row.zhifubao }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单编号" prop="orderNumber"></el-table-column>
|
||||
<el-table-column label="订单编号" prop="orderNumber"></el-table-column>
|
||||
<el-table-column label="代理用户id" prop="sysUserId"></el-table-column>
|
||||
<el-table-column label="提现类型" prop="userType">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.userType == 1">用户提现</span>
|
||||
<span v-if="scope.row.userType == 2">代理提现</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" prop="createAt"></el-table-column>
|
||||
<el-table-column label="转账时间" prop="outAt"></el-table-column>
|
||||
<el-table-column label="状态" prop="state">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="warning" v-if="scope.row.state == 0" disable-transitions>
|
||||
待转账
|
||||
</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.state == 1" disable-transitions>
|
||||
成功
|
||||
</el-tag>
|
||||
<template v-if="scope.row.state == 2">
|
||||
<el-tag type="danger" disable-transitions>
|
||||
失败
|
||||
</el-tag>
|
||||
原因: {{ scope.row.refund }}
|
||||
</template>
|
||||
<el-tag type="warning" v-if="scope.row.state == 3" disable-transitions>
|
||||
待审核
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="deliverHandle(scope.row)" v-if="scope.row.state == 3">
|
||||
待审核
|
||||
</el-button>
|
||||
<el-button type="text" disabled v-else>已审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination">
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:page-sizes="[10, 20, 30, 40]" :page-size="tableData.limit" :current-page="tableData.page"
|
||||
layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<el-dialog title="提现审核" width="600px" :visible.sync="visible" @close="onClose">
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="80px" label-position="left">
|
||||
<el-form-item label="审核" prop="isAgree">
|
||||
<el-radio-group v-model="form.isAgree">
|
||||
<el-radio label="1"> 同意 </el-radio>
|
||||
<el-radio label="0"> 拒绝 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="refund" v-if="form.isAgree == 0">
|
||||
<el-input v-model="form.refund" placeholder="拒绝原因"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer" style="display: flex; justify-content: flex-end;">
|
||||
<el-button size="small" @click="visible = false"> 取 消 </el-button>
|
||||
<el-button size="small" type="primary" :loading="confirmLoading"
|
||||
@click="confirmHandle">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { cashOutAuditPage, cashOutAuditAudit } from "@/api/withdraw.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeValue: [],
|
||||
query: {
|
||||
userId: "",
|
||||
userName: "",
|
||||
userType: '',
|
||||
zhifubao: "",
|
||||
zhifubaoName: "",
|
||||
state: "",
|
||||
startTime: "",
|
||||
endTime: ""
|
||||
},
|
||||
resetQuery: {},
|
||||
tableData: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
total: 0,
|
||||
list: [],
|
||||
loading: false
|
||||
},
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: {
|
||||
id: "",
|
||||
isAgree: "1",
|
||||
refund: ""
|
||||
},
|
||||
rules: {
|
||||
isAgree: [],
|
||||
refund: [
|
||||
{ required: true, message: "请输入拒绝原因", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.resetQuery = { ...this.query };
|
||||
this.cashOutAuditPage();
|
||||
},
|
||||
methods: {
|
||||
// 关闭弹窗, 重置表单
|
||||
onClose() {
|
||||
this.$refs.form.resetFields();
|
||||
},
|
||||
// 打开发放奖品弹窗
|
||||
deliverHandle(row) {
|
||||
this.form.id = row.id;
|
||||
this.visible = true;
|
||||
},
|
||||
// 提交发放奖品
|
||||
confirmHandle() {
|
||||
this.$refs.form.validate(async valid => {
|
||||
if (valid) {
|
||||
this.confirmLoading = true;
|
||||
try {
|
||||
const { data } = await cashOutAuditAudit(this.form);
|
||||
if (data.code == 0) {
|
||||
this.$message.success("审核成功");
|
||||
this.visible = false;
|
||||
this.cashOutAuditPage();
|
||||
} else {
|
||||
this.$message.error(data.msg || "审核失败");
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
this.confirmLoading = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 开始查询
|
||||
queryHandle() {
|
||||
this.page = 1;
|
||||
this.cashOutAuditPage();
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
this.query = { ...this.resetQuery };
|
||||
this.timeValue = [];
|
||||
this.cashOutAuditPage();
|
||||
},
|
||||
// 确认选择日期
|
||||
changeTime() {
|
||||
if (this.timeValue.length == 2) {
|
||||
this.query.startTime = this.timeValue[0];
|
||||
this.query.endTime = this.timeValue[1];
|
||||
} else {
|
||||
this.query.startTime = "";
|
||||
this.query.endTime = "";
|
||||
}
|
||||
},
|
||||
// 分页数量
|
||||
handleSizeChange(size) {
|
||||
this.tableData.limit = size;
|
||||
this.cashOutAuditPage();
|
||||
},
|
||||
// 分页
|
||||
handleCurrentChange(val) {
|
||||
this.tableData.page = val;
|
||||
this.cashOutAuditPage();
|
||||
},
|
||||
// 获取列表
|
||||
async cashOutAuditPage() {
|
||||
try {
|
||||
this.tableData.loading = true;
|
||||
const { data } = await cashOutAuditPage({
|
||||
...this.query,
|
||||
page: this.tableData.page,
|
||||
limit: this.tableData.limit
|
||||
});
|
||||
this.tableData.loading = false;
|
||||
this.tableData.list = data.page.list;
|
||||
this.tableData.total = data.page.totalCount;
|
||||
} catch (error) {
|
||||
this.tableData.loading = false;
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -25,7 +25,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker v-model="timeValue" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" @change="changeTime">
|
||||
end-placeholder="结束日期" @change="changeTime" :default-time="['00:00:00', '23:59:59']">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
|
|||
Loading…
Reference in New Issue