2024.2.21

This commit is contained in:
魏啾
2024-02-21 18:42:17 +08:00
parent 786bceb7a4
commit 3db00932f7
21 changed files with 758 additions and 403 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="card">
<el-space>
<!-- <el-space>
<el-input placeholder="用户名称" v-model="tableOptions.userName" style="width: 200px;" />
<el-input placeholder="商户号" v-model="tableOptions.merchantCode" style="width: 200px;" />
<el-select v-model="tableOptions.status">
@@ -11,46 +11,48 @@
<el-option :key="3" :value="3" label="审核中"></el-option>
</el-select>
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
</el-space>
</el-space> -->
<div class="table mt15">
<el-table :data="tableOptions.list" size="large" stripe border height="100%" v-loading="tableOptions.loading">
<el-table-column prop="id" label="机构id"></el-table-column>
<el-table-column prop="merchantCode" label="商户号"></el-table-column>
<el-table-column prop="userName" label="商户名称"></el-table-column>
<el-table-column prop="accountNo" label="账户号"></el-table-column>
<el-table-column prop="cashAmt" label="提现金额">
<el-table-column prop="user_id" label="机构id"></el-table-column>
<!-- <el-table-column prop="merchantCode" label="商户号"></el-table-column> -->
<!-- <el-table-column prop="userName" label="商户名称"></el-table-column>
<el-table-column prop="accountNo" label="账户号"></el-table-column> -->
<el-table-column prop="amount" label="提现金额">
<template #default="scope">
<el-text type="primary">{{ scope.row.cashAmt }}</el-text>
<el-text type="primary">{{ scope.row.amount }}</el-text>
</template>
</el-table-column>
<el-table-column prop="userId" label="用户id"></el-table-column>
<el-table-column prop="createDt" label="提现时间">
<!-- <el-table-column prop="userId" label="用户id"></el-table-column> -->
<!-- <el-table-column prop="notes" label="提现时间">
<template #default="scope">
<el-text>{{ dayjs(scope.row.createDt).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
<el-text>{{ dayjs(scope.row.notes).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
</template>
</el-table-column>
<el-table-column prop="typeCode" label="提现人身份">
</el-table-column> -->
<el-table-column prop="create_time" label="提现时间"></el-table-column>
<!-- <el-table-column prop="user" label="提现人身份" >
<template #default="scope">
<el-tag disable-transitions>{{ typeNames[scope.row.typeCode] }}</el-tag>
<el-tag disable-transitions>{{ scope.row.user.nick_name }}</el-tag>
</template>
</el-table-column>
<el-table-column label="状态">
</el-table-column> -->
<el-table-column label="状态" v-if="userInfo == 1">
<template #default="scope">
<el-tag type="info" v-if="scope.row.status == 0">待审核</el-tag>
<el-tag type="success" v-if="scope.row.status == 1">提现成功</el-tag>
<el-tag type="warning" v-if="scope.row.status == 2">提现失败</el-tag>
<el-tag type="info" v-if="scope.row.status == 3">审核中</el-tag>
<el-tag type="success" v-if="scope.row.status == 1">通过</el-tag>
<el-tag type="warning" v-if="scope.row.status == 2">拒绝</el-tag>
<!-- <el-tag type="info" v-if="scope.row.status == 3">审核中</el-tag> -->
</template>
</el-table-column>
<el-table-column prop="cashStatus" label="上级审核信息">
<!-- <el-table-column prop="cashStatus" label="上级审核信息">
<template #default="scope">
<el-link type="primary" icon="Search"
@click="showCheckModle(scope.$index, scope.row.cashStatus)">查看进度</el-link>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作">
<template #default="scope">
<template v-if="scope.row.show && scope.row.status != 2">
<template v-if="scope.row.status == 0 && userInfo == 1">
<el-popconfirm title="是否审核通过?" width="200" confirm-button-text="通过" cancel-button-text="驳回"
@cancel="checkHandle(scope.row, 2)" @confirm="checkHandle(scope.row, 1)">
<template #reference>
@@ -90,7 +92,7 @@ import { typeNames } from '@/utils/index.js'
import { ElMessage } from 'element-plus'
import { dayjs } from 'element-plus'
import hooks from '@/hooks'
import _hook from "@/hooks/index.js";
// 显示进度dialog
const show = ref(false)
// 当前表格索引
@@ -106,7 +108,6 @@ const statusEmun = ref({
"2": '提现失败',
"3": '审核中'
})
// 查看当前进度
function showCheckModle(row, cashStatus) {
show.value = true
@@ -120,13 +121,18 @@ function showCheckModle(row, cashStatus) {
}
})
}
// 本地数据
const userInfo = reactive(
_hook.useLocalStorage.get("userInfo").is_admin
)
// 审核操作
async function checkHandle(row, status) {
console.log(row, status)
try {
await modifyOutFlow({
id: row.id,
status: status
type: status
})
ElMessage.success('提交成功')
paginationChange()
@@ -161,36 +167,33 @@ function paginationChange() {
async function getOutFlowHandle() {
try {
const res = await getOutFlow({
userName: tableOptions.userName,
merchantCode: tableOptions.merchantCode,
status: tableOptions.status,
pageNum: tableOptions.pageNum,
pageSize: tableOptions.pageSize
page: tableOptions.pageNum
})
const userInfo = hooks.useLocalStorage.get('userInfo')
const data = [...res.list];
const data = [...res.data];
// console.log(userInfo.userType)
console.log(data, '1111111')
for (let item of data) {
item.show = false;
const arr = JSON.parse(item.cashStatus);
// console.log(arr);
for (let child of arr) {
if (child.userType == userInfo.userType && child.status == 0) {
item.show = true;
}
}
}
// for (let item of data) {
// item.show = false;
// const arr = JSON.parse(item.cashStatus);
// // console.log(arr);
// for (let child of arr) {
// if (child.userType == userInfo.userType && child.status == 0) {
// item.show = true;
// }
// }
// }
tableOptions.loading = false
tableOptions.list = data
tableOptions.total = res.total
tableOptions.total = res.count
} catch (error) { }
}
onMounted(() => {
getOutFlowHandle()
})
</script>