<template>
|
<div class="app-container">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true">
|
<el-form-item label="用户账号" prop="userName">
|
<el-input v-model="queryParams.userName" placeholder="请输入用户账号" clearable style="width: 200px"></el-input>
|
</el-form-item>
|
<el-form-item label="订单号" prop="orderNo">
|
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号" clearable style="width: 200px"></el-input>
|
</el-form-item>
|
<el-form-item label="提现账户类型" prop="accountType">
|
<el-select v-model="queryParams.accountType" placeholder="提现账户类型" clearable style="width: 200px">
|
<el-option v-for="dict in account_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
</el-select>
|
</el-form-item>
|
<el-form-item>
|
<el-button type="primary" icon="Search" @click="getDataList">搜索</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
</el-form-item>
|
</el-form>
|
<el-row :gutter="10" class="mb8">
|
<!-- <el-col :span="1.5">
|
<el-button type="primary" plain :disabled="power.add" @click="handleRate">解冻</el-button>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
</el-col> -->
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getDataList"></right-toolbar>
|
</el-row>
|
<el-table v-loading="tableOption.loading" :data="dataTable">
|
<el-table-column type="index" width="50" />
|
<el-table-column label="订单号" align="center" key="orderNo" prop="orderNo" width="180" />
|
<el-table-column label="用户账号" align="center" key="userName" prop="userName" width="180" />
|
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" width="100" />
|
<el-table-column label="账户类型" align="center" width="100">
|
<template #default="scope">
|
<span>{{ dispAccountType(scope.row.accountType) }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="账户号" align="center" key="accountNo" prop="accountNo" width="200">
|
<template #default="scope">
|
<div v-if="scope.row.accountType == '1'">{{ scope.row.accountBank }}</div>
|
<div>{{ scope.row.accountNo }}</div>
|
</template>
|
</el-table-column>
|
<el-table-column label="提现金额" align="center" key="orderMoney" prop="orderMoney" />
|
<el-table-column label="手续费" align="center" key="serviceMoney" prop="serviceMoney" />
|
<el-table-column label="到账金额" align="center">
|
<template #default="scope">
|
<div>
|
<el-button link type="primary">{{ scope.row.realMoney }}</el-button>
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column label="备注" align="center" key="orderRemark" prop="orderRemark" />
|
<el-table-column label="审核状态" align="center">
|
<template #default="scope">
|
<span>{{ dispCheckState(scope.row.checkState) }}</span>
|
</template>
|
</el-table-column>
|
<!-- <el-table-column label="创建时间" align="center" key="addTime" prop="addTime" /> -->
|
<el-table-column label="操作" align="center" width="120">
|
<template #default="scope">
|
<el-button type="primary" size="small" @click="handleCheck(scope.row)">审核</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getDataList" />
|
<!-- 审核-->
|
<el-dialog title="审核" :close-on-click-modal="false" v-model="isOpenRate" width="400px" top="20vh" draggable>
|
<el-row class="_cu_row">
|
<el-col :span="3"> 审核 </el-col>
|
<el-col :span="18" :offset="1">
|
<el-radio-group v-model="formData.type">
|
<el-radio :label="1">通过</el-radio>
|
<el-radio :label="2">拒绝</el-radio>
|
</el-radio-group>
|
</el-col>
|
</el-row>
|
<el-row class="_cu_row">
|
<el-col :span="3"> 备注 </el-col>
|
<el-col :span="18" :offset="1">
|
<el-input v-model="formData.checkRemark" type="textarea" :row="2" resize="none" clearable placeholder="备注" style="width: 250px" />
|
</el-col>
|
</el-row>
|
<template #footer>
|
<el-button @click="state.isOpenRate = false">取消</el-button>
|
<el-button type="primary" @click="sumbitCheckOrder()"> 提交 </el-button>
|
</template>
|
</el-dialog>
|
</div>
|
</template>
|
<script setup lang="ts">
|
import { reactive, onMounted, toRefs, ref, getCurrentInstance } from "vue";
|
import { GetDataList, GetDataInfo } from "@/api/orders/cash";
|
import { checkOrder } from "@/api/check";
|
import type { FormInstance } from "element-plus";
|
import { isHttp } from "@/utils/validate";
|
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { account_type, check_state } = proxy.useDict("account_type", "check_state");
|
const state = reactive({
|
dataTable: [] as any[], //数据列表
|
total: 0, //总条数
|
amountInfo: {} as any, //合计信息
|
tableOption: {
|
//表格配置
|
loading: true,
|
},
|
power: {
|
//操作权限
|
add: false,
|
single: false, //
|
multiple: true, //
|
},
|
dataInfo: {} as any, //数据详情
|
showSearch: true, //是否显示分类
|
isOpenInfo: false,
|
isOpenRate: false,
|
});
|
const { dataTable, total, tableOption, power, showSearch, isOpenRate, isOpenInfo, dataInfo } = toRefs(state);
|
|
onMounted(() => {
|
getDataList();
|
});
|
|
//#region commonDisp
|
/**
|
* 账户类型
|
* @param e
|
*/
|
const dispAccountType = (e: string) => {
|
let stt = account_type.value.find((f: Dict.dictType) => f.value == e);
|
return stt ? stt.label : "";
|
};
|
|
/**
|
* 审核状态
|
* @param e
|
*/
|
const dispCheckState = (e: string) => {
|
let stt = check_state.value.find((f: Dict.dictType) => f.value == e);
|
return stt ? stt.label : "";
|
};
|
|
const dispPayImgs = (e: string) => {
|
let sdd: string[] = [];
|
if (e) {
|
sdd = e.split(",");
|
sdd!.forEach((f) => {
|
if (!isHttp(f)) {
|
f = baseUrl + f;
|
}
|
});
|
}
|
return sdd;
|
};
|
|
//#endregion
|
|
//#region 查询
|
|
const queryRef = ref<FormInstance>();
|
const queryParams = reactive({
|
//查询配置参数
|
pageNum: 1,
|
pageSize: 10,
|
userName: "", //用户账号
|
accountType: "", //支付方式
|
orderNo: "", //订单号
|
checkState: "1", //审核状态
|
});
|
/**
|
* 获取数据列表
|
*/
|
const getDataList = async () => {
|
// if (queryParams.shopState == 0) queryParams.shopState = "";
|
await GetDataList(queryParams).then((res) => {
|
if (res.code == 200) {
|
state.dataTable = res.rows;
|
state.total = res.total;
|
state.tableOption.loading = false;
|
}
|
});
|
};
|
|
/**
|
* 重置
|
*/
|
const resetQuery = () => {
|
queryRef.value!.resetFields();
|
};
|
|
//#endregion
|
|
//#region 详情
|
|
/**
|
* 查看详情
|
*/
|
const handleInfo = (e: any) => {
|
getDataInfo(e.id, () => {
|
state.isOpenInfo = true;
|
});
|
};
|
|
/**
|
* 查看详情
|
*/
|
const getDataInfo = (e: number, f: () => void) => {
|
GetDataInfo(e).then((res) => {
|
if (res.code == 200) {
|
state.dataInfo = res.data;
|
f();
|
}
|
});
|
};
|
//#endregion
|
|
//#region 审核
|
|
const formData = reactive({
|
type: 1, // 类型:1通过,2拒绝
|
orderNo: "",
|
checkRemark: "",
|
});
|
|
/**
|
* 打开审核
|
* @param e
|
*/
|
const handleCheck = (e: any) => {
|
formData.orderNo = e.orderNo;
|
formData.checkRemark = "";
|
formData.type = 1;
|
state.isOpenRate = true;
|
};
|
|
/**
|
* 提交审核的订单
|
*/
|
const sumbitCheckOrder = async () => {
|
await checkOrder(formData).then((res) => {
|
if (res.code == 200) {
|
proxy.$modal.msgSuccess("操作成功");
|
getDataList();
|
state.isOpenRate = false;
|
} else {
|
proxy.$modal.msgError(res.msg);
|
}
|
});
|
};
|
//#endregion
|
</script>
|
|
<style scoped lang="scss">
|
._cu_row {
|
padding: 5px 0px;
|
align-items: center;
|
}
|
|
.el-table :deep(.danger-row) {
|
--el-table-tr-bg-color: var(--el-color-danger-light-9);
|
}
|
._el-row {
|
padding: 5px 0px;
|
border-bottom: 1px solid var(--el-border-color);
|
// margin-left: 20px;
|
align-items: center;
|
|
.el-input__wrapper {
|
padding: 0px !important;
|
}
|
}
|
// .td {
|
// overflow: hidden;
|
// }
|
// :deep(.el-descriptions__table) {
|
// table-layout: fixed;
|
// }
|
:deep(.el-descriptions__cell) {
|
padding: 8px 0px !important;
|
}
|
// .custom-item-sty {
|
// color: #333;
|
// padding: 8px 0px;
|
// font-weight: bold;
|
// overflow-x: hidden;
|
// }
|
</style>
|