|
@@ -1,6 +1,6 @@
|
|
|
<!-- 会员积分 -->
|
|
|
<template>
|
|
|
- <ContentWrap v-hasPermi="['menduner:reward:user-point:query']">
|
|
|
+ <ContentWrap v-hasPermi="['menduner:system:user-account:query']">
|
|
|
<!-- 搜索工作栏 -->
|
|
|
<el-form
|
|
|
class="-mb-15px"
|
|
@@ -9,6 +9,24 @@
|
|
|
:inline="true"
|
|
|
label-width="68px"
|
|
|
>
|
|
|
+ <el-form-item label="账户余额" prop="balance">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.balance"
|
|
|
+ placeholder="请输入账户余额"
|
|
|
+ clearable
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
+ class="!w-240px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="积分数量" prop="point">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.point"
|
|
|
+ placeholder="请输入积分数量"
|
|
|
+ clearable
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
+ class="!w-240px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="获得时间" prop="createDate">
|
|
|
<el-date-picker
|
|
|
v-model="queryParams.createDate"
|
|
@@ -40,11 +58,12 @@
|
|
|
<el-table-column
|
|
|
label="获得时间"
|
|
|
align="center"
|
|
|
- prop="updateTime"
|
|
|
+ prop="createTime"
|
|
|
:formatter="dateFormatter"
|
|
|
/>
|
|
|
<el-table-column label="用户" align="center" prop="userId" />
|
|
|
- <el-table-column label="获得积分" align="center" prop="point" width="100">
|
|
|
+ <el-table-column label="剩余金额" align="center" prop="balance" />
|
|
|
+ <el-table-column label="积分数量" align="center" prop="point" width="100">
|
|
|
<template #default="scope">
|
|
|
<el-tag v-if="scope.row.point && scope.row.point > 0" class="ml-2" type="success" effect="dark">
|
|
|
+{{ scope.row.point }}
|
|
@@ -55,7 +74,7 @@
|
|
|
<template #default="scope">
|
|
|
<el-button
|
|
|
link
|
|
|
- @click="openForm('update', scope.row.id)"
|
|
|
+ @click="openForm('update', scope.row.id, scope.row.userId)"
|
|
|
type="primary"
|
|
|
v-hasPermi="['menduner:reward:user-point:update']"
|
|
|
>
|
|
@@ -78,12 +97,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
import UserPointsForm from './UserPointsForm.vue'
|
|
|
-import * as UserPointsApi from '@/api/menduner/reward/userPoints'
|
|
|
+import * as UserAccountApi from '@/api/menduner/system/account/user'
|
|
|
|
|
|
-defineOptions({ name: 'MemberUserPoints' })
|
|
|
+defineOptions({ name: 'AccountUser' })
|
|
|
|
|
|
const loading = ref(true) // 列表的加载中
|
|
|
const total = ref(0) // 列表的总页数
|
|
@@ -91,7 +109,8 @@ const list = ref([]) // 列表的数据
|
|
|
const queryParams = reactive({
|
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
|
- tagIds: [],
|
|
|
+ balance: null,
|
|
|
+ point: null,
|
|
|
createDate: []
|
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
@@ -100,7 +119,7 @@ const queryFormRef = ref() // 搜索的表单
|
|
|
const getList = async () => {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
- const data = await UserPointsApi.getUserPointsPage(queryParams)
|
|
|
+ const data = await UserAccountApi.getUserAccountPage(queryParams)
|
|
|
list.value = data.list
|
|
|
total.value = data.total
|
|
|
} finally {
|
|
@@ -110,8 +129,8 @@ const getList = async () => {
|
|
|
|
|
|
/** 添加/修改操作 */
|
|
|
const formRef = ref()
|
|
|
-const openForm = (type: string, id?: number) => {
|
|
|
- formRef.value.open(type, id)
|
|
|
+const openForm = (type: string, id: number, userId: string) => {
|
|
|
+ formRef.value.open(type, id, userId)
|
|
|
}
|
|
|
|
|
|
/** 搜索按钮操作 */
|