|
@@ -8,10 +8,10 @@
|
|
:inline="true"
|
|
:inline="true"
|
|
label-width="68px"
|
|
label-width="68px"
|
|
>
|
|
>
|
|
- <el-form-item label="业务编码" prop="bizId">
|
|
|
|
|
|
+ <el-form-item label="用户" prop="nickname">
|
|
<el-input
|
|
<el-input
|
|
- v-model="queryParams.bizId"
|
|
|
|
- placeholder="请输入业务编码"
|
|
|
|
|
|
+ v-model="queryParams.nickname"
|
|
|
|
+ placeholder="请输入用户昵称"
|
|
clearable
|
|
clearable
|
|
@keyup.enter="handleQuery"
|
|
@keyup.enter="handleQuery"
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
@@ -25,19 +25,13 @@
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in getStrDictOptions(DICT_TYPE.MEMBER_POINT_BIZ_TYPE)"
|
|
|
|
|
|
+ v-for="dict in getIntDictOptions(DICT_TYPE.MEMBER_POINT_BIZ_TYPE)"
|
|
:key="dict.value"
|
|
:key="dict.value"
|
|
:label="dict.label"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
:value="dict.value"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="操作类型" prop="type">
|
|
|
|
- <el-select v-model="queryParams.type" placeholder="操作类型" clearable class="!w-240px">
|
|
|
|
- <el-option label="增加" value="1" />
|
|
|
|
- <el-option label="扣减" value="0" />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item label="积分标题" prop="title">
|
|
<el-form-item label="积分标题" prop="title">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.title"
|
|
v-model="queryParams.title"
|
|
@@ -47,16 +41,6 @@
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="积分状态" prop="status">
|
|
|
|
- <el-select v-model="queryParams.status" placeholder="请选择状态" clearable class="!w-240px">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in getIntDictOptions(DICT_TYPE.MEMBER_POINT_STATUS)"
|
|
|
|
- :key="dict.value"
|
|
|
|
- :label="dict.label"
|
|
|
|
- :value="dict.value"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item label="获得时间" prop="createDate">
|
|
<el-form-item label="获得时间" prop="createDate">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="queryParams.createDate"
|
|
v-model="queryParams.createDate"
|
|
@@ -69,8 +53,14 @@
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
|
- <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
|
|
|
+ <el-button @click="handleQuery">
|
|
|
|
+ <Icon icon="ep:search" class="mr-5px" />
|
|
|
|
+ 搜索
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button @click="resetQuery">
|
|
|
|
+ <Icon icon="ep:refresh" class="mr-5px" />
|
|
|
|
+ 重置
|
|
|
|
+ </el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
@@ -78,53 +68,32 @@
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<ContentWrap>
|
|
<ContentWrap>
|
|
<el-table v-loading="loading" :data="list">
|
|
<el-table v-loading="loading" :data="list">
|
|
- <el-table-column label="编号" align="center" prop="id" />
|
|
|
|
- <!-- TODO @xiaqing:展示用户的昵称哈; -->
|
|
|
|
- <el-table-column label="用户" align="center" prop="userId" />
|
|
|
|
- <el-table-column label="积分标题" align="center" prop="title" />
|
|
|
|
- <el-table-column label="积分描述" align="center" prop="description" />
|
|
|
|
|
|
+ <el-table-column label="编号" align="center" prop="id" width="180" />
|
|
<el-table-column
|
|
<el-table-column
|
|
label="获得时间"
|
|
label="获得时间"
|
|
align="center"
|
|
align="center"
|
|
- prop="createDate"
|
|
|
|
|
|
+ prop="createTime"
|
|
:formatter="dateFormatter"
|
|
:formatter="dateFormatter"
|
|
|
|
+ width="180"
|
|
/>
|
|
/>
|
|
- <!-- todo @xiaqing:可以参考 crmeb 的展示,把积分和增加减少放一起,用红色和绿色展示 -->
|
|
|
|
- <el-table-column
|
|
|
|
- label="操作类型"
|
|
|
|
- align="center"
|
|
|
|
- prop="type"
|
|
|
|
- :formatter="
|
|
|
|
- (a, b, c) => {
|
|
|
|
- return c === '1' ? '增加' : '扣减'
|
|
|
|
- }
|
|
|
|
- "
|
|
|
|
- />
|
|
|
|
- <el-table-column label="积分" align="center" prop="point" />
|
|
|
|
- <el-table-column label="变动后的积分" align="center" prop="totalPoint" />
|
|
|
|
- <el-table-column label="业务编码" align="center" prop="bizId" />
|
|
|
|
- <el-table-column label="业务类型" align="center" prop="bizType">
|
|
|
|
|
|
+ <el-table-column label="用户" align="center" prop="nickname" width="200" />
|
|
|
|
+ <el-table-column label="获得积分" align="center" prop="point" width="100">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <dict-tag :type="DICT_TYPE.MEMBER_POINT_BIZ_TYPE" :value="scope.row.bizType" />
|
|
|
|
|
|
+ <el-tag v-if="scope.row.point > 0" class="ml-2" type="success" effect="dark">
|
|
|
|
+ +{{ scope.row.point }}
|
|
|
|
+ </el-tag>
|
|
|
|
+ <el-tag v-else class="ml-2" type="danger" effect="dark"> {{ scope.row.point }} </el-tag>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="状态" align="center" prop="status">
|
|
|
|
|
|
+ <el-table-column label="总积分" align="center" prop="totalPoint" width="100" />
|
|
|
|
+ <el-table-column label="标题" align="center" prop="title" />
|
|
|
|
+ <el-table-column label="描述" align="center" prop="description" />
|
|
|
|
+ <el-table-column label="业务编码" align="center" prop="bizId" />
|
|
|
|
+ <el-table-column label="业务类型" align="center" prop="bizType">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <dict-tag :type="DICT_TYPE.MEMBER_POINT_STATUS" :value="scope.row.status" />
|
|
|
|
|
|
+ <dict-tag :type="DICT_TYPE.MEMBER_POINT_BIZ_TYPE" :value="scope.row.bizType" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="冻结时间"
|
|
|
|
- align="center"
|
|
|
|
- prop="freezingTime"
|
|
|
|
- :formatter="dateFormatter"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- label="解冻时间"
|
|
|
|
- align="center"
|
|
|
|
- prop="thawingTime"
|
|
|
|
- :formatter="dateFormatter"
|
|
|
|
- />
|
|
|
|
</el-table>
|
|
</el-table>
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
<Pagination
|
|
<Pagination
|
|
@@ -140,10 +109,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
-import { DICT_TYPE, getStrDictOptions, getIntDictOptions } from '@/utils/dict'
|
|
|
|
|
|
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
-import * as RecordApi from '@/api/point/record'
|
|
|
|
-import RecordForm from './RecordForm.vue'
|
|
|
|
|
|
+import * as RecordApi from '@/api//member/point/record'
|
|
|
|
|
|
defineOptions({ name: 'PointRecord' })
|
|
defineOptions({ name: 'PointRecord' })
|
|
|
|
|
|
@@ -153,11 +121,9 @@ const list = ref([]) // 列表的数据
|
|
const queryParams = reactive({
|
|
const queryParams = reactive({
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- bizId: null,
|
|
|
|
|
|
+ nickname: null,
|
|
bizType: null,
|
|
bizType: null,
|
|
- type: null,
|
|
|
|
title: null,
|
|
title: null,
|
|
- status: null,
|
|
|
|
createDate: []
|
|
createDate: []
|
|
})
|
|
})
|
|
const queryFormRef = ref() // 搜索的表单
|
|
const queryFormRef = ref() // 搜索的表单
|