学员详情;市场管理;

This commit is contained in:
2023-03-21 15:00:24 +08:00
parent 31bd50111e
commit 35fc9df240
14 changed files with 222 additions and 123 deletions

View File

@@ -33,9 +33,12 @@ const dealTypeList = ref([
value:2
},
])
const deal_types = ref([])
// 生命周期
onMounted(() => {
// getDealMoneyList()
queryParams.value.id = parseInt(route.params.user_id)
deal_types.value = custom.getDealType()
getDealMoneyList()
})
// 方法
async function getDealMoneyList() {
@@ -43,6 +46,7 @@ async function getDealMoneyList() {
if(res.code === 0) {
tableData.value = res.data.records
total.value = res.data.total
console.log(res.data)
}
}
function onSubmit() {
@@ -64,6 +68,11 @@ function handleSizeChange(val) {
queryParams.value.pageSize = val
getDealMoneyList()
}
function getTypeName(type) {
return deal_types.value.filter((item,i) => {
return item.value == type
})[0].name
}
</script>
<template>
<div>
@@ -71,25 +80,25 @@ function handleSizeChange(val) {
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="queryParams">
<el-form-item label="交易类别">
<el-select v-model="queryParams.subject" clearable placeholder="请选择">
<el-select v-model="queryParams.type" clearable placeholder="请选择">
<el-option
v-for="item in dealTypeList"
:key="item.id"
v-for="item in deal_types"
:key="item.value"
:label="item.name"
:value="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="交易时间">
<el-date-picker class="oi-item" style="margin-left:5px"
v-model="queryParams.deal_time"
type="date"
placeholder="交易时间"
format="YYYY-MM-DD"
value-format="x"
/>
</el-form-item>
<!-- <el-form-item label="交易时间">-->
<!-- <el-date-picker class="oi-item" style="margin-left:5px"-->
<!-- v-model="queryParams.deal_time"-->
<!-- type="date"-->
<!-- placeholder="交易时间"-->
<!-- format="YYYY-MM-DD"-->
<!-- value-format="x"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
@@ -101,10 +110,10 @@ function handleSizeChange(val) {
<div class="gva-table-box">
<!-- 数据列表-->
<el-table :data="tableData">
<el-table-column align="left" label="交易单号" min-width="150" prop="question_id" />
<el-table-column align="left" label="类别" min-width="150" prop="name" >
<el-table-column align="left" label="交易单号" min-width="150" prop="wallet_log_id" />
<el-table-column align="left" label="类别" min-width="150">
<template #default="scope">
{{custom.getExercisesTypeName(scope.row.type)}}
{{getTypeName(scope.row.wallet_log_type)}}
</template>
</el-table-column>
<el-table-column align="left" label="交易时间" min-width="150" >
@@ -112,10 +121,10 @@ function handleSizeChange(val) {
{{formatDate(scope.row.CreatedAt)}}
</template>
</el-table-column>
<el-table-column align="left" label="交易方式" min-width="150" prop="subject" />
<el-table-column align="left" label="交易详情" min-width="150" prop="teacher_id" />
<el-table-column align="left" label="交易金额" min-width="150" prop="teacher_id" />
<el-table-column align="left" label="资产余额" min-width="150" prop="teacher_id" />
<!-- <el-table-column align="left" label="交易方式" min-width="150" prop="subject" />-->
<el-table-column align="left" label="交易详情" min-width="150" prop="desc" />
<el-table-column align="left" label="交易金额" min-width="150" prop="consume" />
<el-table-column align="left" label="资产余额" min-width="150" prop="balance" />
</el-table>
<div class="gva-pagination">