review 积分配置
This commit is contained in:
parent
032d5a0a06
commit
4571f893ed
@ -146,9 +146,8 @@ export enum DICT_TYPE {
|
|||||||
MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型
|
MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型
|
||||||
|
|
||||||
// ========== MALL - 会员模块 ==========
|
// ========== MALL - 会员模块 ==========
|
||||||
// 积分模块 TODO 芋艿:改成 member_ 前缀;包括枚举和值;
|
MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型
|
||||||
MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type',
|
MEMBER_POINT_STATUS = 'member_point_status', // 积分的状态
|
||||||
MEMBER_POINT_STATUS = 'member_point_status',
|
|
||||||
|
|
||||||
// ========== MALL - 商品模块 ==========
|
// ========== MALL - 商品模块 ==========
|
||||||
PRODUCT_UNIT = 'product_unit', // 商品单位
|
PRODUCT_UNIT = 'product_unit', // 商品单位
|
||||||
|
@ -10,9 +10,11 @@
|
|||||||
<el-form-item label="hideId" v-show="false">
|
<el-form-item label="hideId" v-show="false">
|
||||||
<el-input v-model="formData.id" />
|
<el-input v-model="formData.id" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- TODO @xiaqing:展示给用户的字段名,可以和 crmeb 保持一直,然后每一个表单都有类似 crmeb 的 tip;例如说:积分抵用比例(1积分抵多少金额)单位:元 -->
|
||||||
<el-form-item label="积分抵扣" prop="tradeDeductEnable">
|
<el-form-item label="积分抵扣" prop="tradeDeductEnable">
|
||||||
<el-switch v-model="formData.tradeDeductEnable" />
|
<el-switch v-model="formData.tradeDeductEnable" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- TODO @xiaqing:用户看到的是元,最多 2 位;分是后端的存储哈 -->
|
||||||
<el-form-item label="抵扣单位(分)" prop="tradeDeductUnitPrice">
|
<el-form-item label="抵扣单位(分)" prop="tradeDeductUnitPrice">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="formData.tradeDeductUnitPrice"
|
v-model="formData.tradeDeductUnitPrice"
|
||||||
@ -58,6 +60,7 @@ const formData = ref({
|
|||||||
const formRules = reactive({})
|
const formRules = reactive({})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
|
/** 修改积分配置 */
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
// 校验表单
|
// 校验表单
|
||||||
if (!formRef) return
|
if (!formRef) return
|
||||||
@ -75,6 +78,7 @@ const onSubmit = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 获得积分配置 */
|
||||||
const getConfig = async () => {
|
const getConfig = async () => {
|
||||||
try {
|
try {
|
||||||
const data = await ConfigApi.getConfig()
|
const data = await ConfigApi.getConfig()
|
||||||
@ -82,6 +86,7 @@ const getConfig = async () => {
|
|||||||
} finally {
|
} finally {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getConfig()
|
getConfig()
|
||||||
})
|
})
|
||||||
|
@ -157,6 +157,7 @@ const submitForm = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @xiaqing:不需要更新操作哇?
|
||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
@ -78,13 +78,18 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="序号" align="center" prop="id" />
|
<el-table-column label="编号" align="center" prop="id" />
|
||||||
<el-table-column label="业务编码" align="center" prop="bizId" />
|
<!-- TODO @xiaqing:展示用户的昵称哈; -->
|
||||||
<el-table-column label="业务类型" align="center" prop="bizType">
|
<el-table-column label="用户" align="center" prop="userId" />
|
||||||
<template #default="scope">
|
<el-table-column label="积分标题" align="center" prop="title" />
|
||||||
<dict-tag :type="DICT_TYPE.MEMBER_POINT_BIZ_TYPE" :value="scope.row.bizType" />
|
<el-table-column label="积分描述" align="center" prop="description" />
|
||||||
</template>
|
<el-table-column
|
||||||
</el-table-column>
|
label="获得时间"
|
||||||
|
align="center"
|
||||||
|
prop="createDate"
|
||||||
|
:formatter="dateFormatter"
|
||||||
|
/>
|
||||||
|
<!-- todo @xiaqing:可以参考 crmeb 的展示,把积分和增加减少放一起,用红色和绿色展示 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作类型"
|
label="操作类型"
|
||||||
align="center"
|
align="center"
|
||||||
@ -95,16 +100,19 @@
|
|||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="积分标题" align="center" prop="title" />
|
|
||||||
<el-table-column label="积分描述" align="center" prop="description" />
|
|
||||||
<el-table-column label="积分" align="center" prop="point" />
|
<el-table-column label="积分" align="center" prop="point" />
|
||||||
<el-table-column label="变动后的积分" align="center" prop="totalPoint" />
|
<el-table-column label="变动后的积分" align="center" prop="totalPoint" />
|
||||||
|
<el-table-column label="业务编码" align="center" prop="bizId" />
|
||||||
|
<el-table-column label="业务类型" align="center" prop="bizType">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.MEMBER_POINT_BIZ_TYPE" :value="scope.row.bizType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<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_STATUS" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="用户id" align="center" prop="userId" />
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="冻结时间"
|
label="冻结时间"
|
||||||
align="center"
|
align="center"
|
||||||
@ -117,12 +125,6 @@
|
|||||||
prop="thawingTime"
|
prop="thawingTime"
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
|
||||||
label="发生时间"
|
|
||||||
align="center"
|
|
||||||
prop="createDate"
|
|
||||||
:formatter="dateFormatter"
|
|
||||||
/>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<Pagination
|
<Pagination
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
|
<!-- TODO @xiaqing:搜索可以去掉,因为一共就没几条配置哈 -->
|
||||||
<el-form-item label="签到天数" prop="day">
|
<el-form-item label="签到天数" prop="day">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.day"
|
v-model="queryParams.day"
|
||||||
@ -35,6 +36,7 @@
|
|||||||
:loading="exportLoading"
|
:loading="exportLoading"
|
||||||
v-hasPermi="['point:sign-in-config:export']"
|
v-hasPermi="['point:sign-in-config:export']"
|
||||||
>
|
>
|
||||||
|
<!-- TODO @xiaqing:四个功能的导出都可以去掉 -->
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -44,15 +46,10 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="序号" align="center" prop="id" v-if="false" />
|
<!-- TODO @xiaqing:展示优化下,改成第 1 天、第 2 天这种 -->
|
||||||
<el-table-column label="签到天数" align="center" prop="day" />
|
<el-table-column label="签到天数" align="center" prop="day" />
|
||||||
<el-table-column label="签到分数" align="center" prop="point" />
|
<el-table-column label="获得积分" align="center" prop="point" />
|
||||||
<el-table-column
|
<!-- TODO @xiaqing:展示一个是否开启 -->
|
||||||
label="创建时间"
|
|
||||||
align="center"
|
|
||||||
prop="createTime"
|
|
||||||
:formatter="dateFormatter"
|
|
||||||
/>
|
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -88,7 +85,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import * as SignInConfigApi from '@/api/point/signInConfig'
|
import * as SignInConfigApi from '@/api/point/signInConfig'
|
||||||
import SignInConfigForm from './SignInConfigForm.vue'
|
import SignInConfigForm from './SignInConfigForm.vue'
|
||||||
@ -109,6 +105,7 @@ const queryParams = reactive({
|
|||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
|
|
||||||
|
// TODO @xiaqing:可以不分页;
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
@ -40,14 +40,6 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery"><Icon icon="ep:search" 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-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- @click="openForm('create')"-->
|
|
||||||
<!-- v-hasPermi="['point:sign-in-record:create']"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
plain
|
plain
|
||||||
@ -64,10 +56,11 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="序号" align="center" prop="id" />
|
<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="userId" />
|
||||||
<el-table-column label="签到天数" align="center" prop="day" />
|
<el-table-column label="签到天数" align="center" prop="day" />
|
||||||
<el-table-column label="签到的分数" align="center" prop="point" />
|
<el-table-column label="获得积分" align="center" prop="point" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="签到时间"
|
label="签到时间"
|
||||||
align="center"
|
align="center"
|
||||||
@ -76,14 +69,6 @@
|
|||||||
/>
|
/>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- link-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- @click="openForm('update', scope.row.id)"-->
|
|
||||||
<!-- v-hasPermi="['point:sign-in-record:update']"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- 编辑-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
|
Loading…
Reference in New Issue
Block a user