Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4571f893
authored
Jul 02, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review 积分配置
parent
032d5a0a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
49 deletions
+38
-49
src/utils/dict.ts
+2
-3
src/views/member/point/config/index.vue
+7
-2
src/views/member/point/record/RecordForm.vue
+1
-0
src/views/member/point/record/index.vue
+19
-17
src/views/member/signin/config/index.vue
+6
-9
src/views/member/signin/record/index.vue
+3
-18
No files found.
src/utils/dict.ts
View file @
4571f893
...
...
@@ -146,9 +146,8 @@ export enum DICT_TYPE {
MP_MESSAGE_TYPE
=
'mp_message_type'
,
// 消息类型
// ========== MALL - 会员模块 ==========
// 积分模块 TODO 芋艿:改成 member_ 前缀;包括枚举和值;
MEMBER_POINT_BIZ_TYPE
=
'member_point_biz_type'
,
MEMBER_POINT_STATUS
=
'member_point_status'
,
MEMBER_POINT_BIZ_TYPE
=
'member_point_biz_type'
,
// 积分的业务类型
MEMBER_POINT_STATUS
=
'member_point_status'
,
// 积分的状态
// ========== MALL - 商品模块 ==========
PRODUCT_UNIT
=
'product_unit'
,
// 商品单位
...
...
src/views/member/point/config/index.vue
View file @
4571f893
...
...
@@ -10,9 +10,11 @@
<el-form-item
label=
"hideId"
v-show=
"false"
>
<el-input
v-model=
"formData.id"
/>
</el-form-item>
<!-- TODO @xiaqing:展示给用户的字段名,可以和 crmeb 保持一直,然后每一个表单都有类似 crmeb 的 tip;例如说:积分抵用比例(1积分抵多少金额)单位:元 -->
<el-form-item
label=
"积分抵扣"
prop=
"tradeDeductEnable"
>
<el-switch
v-model=
"formData.tradeDeductEnable"
/>
</el-form-item>
<!-- TODO @xiaqing:用户看到的是元,最多 2 位;分是后端的存储哈 -->
<el-form-item
label=
"抵扣单位(分)"
prop=
"tradeDeductUnitPrice"
>
<el-input-number
v-model=
"formData.tradeDeductUnitPrice"
...
...
@@ -27,10 +29,10 @@
style=
"width: 300px"
/>
</el-form-item>
<el-form-item
label=
"1元赠送多少分"
prop=
"tradeGivePoint"
>
<el-form-item
label=
"1
元赠送多少分"
prop=
"tradeGivePoint"
>
<el-input-number
v-model=
"formData.tradeGivePoint"
placeholder=
"请输入
1
元赠送多少积分"
placeholder=
"请输入
1
元赠送多少积分"
style=
"width: 300px"
/>
</el-form-item>
...
...
@@ -58,6 +60,7 @@ const formData = ref({
const
formRules
=
reactive
({})
const
formRef
=
ref
()
// 表单 Ref
/** 修改积分配置 */
const
onSubmit
=
async
()
=>
{
// 校验表单
if
(
!
formRef
)
return
...
...
@@ -75,6 +78,7 @@ const onSubmit = async () => {
}
}
/** 获得积分配置 */
const
getConfig
=
async
()
=>
{
try
{
const
data
=
await
ConfigApi
.
getConfig
()
...
...
@@ -82,6 +86,7 @@ const getConfig = async () => {
}
finally
{
}
}
onMounted
(()
=>
{
getConfig
()
})
...
...
src/views/member/point/record/RecordForm.vue
View file @
4571f893
...
...
@@ -157,6 +157,7 @@ const submitForm = async () => {
}
}
// TODO @xiaqing:不需要更新操作哇?
/** 重置表单 */
const
resetForm
=
()
=>
{
formData
.
value
=
{
...
...
src/views/member/point/record/index.vue
View file @
4571f893
...
...
@@ -57,7 +57,7 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"
发生
时间"
prop=
"createDate"
>
<el-form-item
label=
"
获得
时间"
prop=
"createDate"
>
<el-date-picker
v-model=
"queryParams.createDate"
value-format=
"YYYY-MM-DD HH:mm:ss"
...
...
@@ -78,13 +78,18 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"序号"
align=
"center"
prop=
"id"
/>
<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=
"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=
"createDate"
:formatter=
"dateFormatter"
/>
<!-- todo @xiaqing:可以参考 crmeb 的展示,把积分和增加减少放一起,用红色和绿色展示 -->
<el-table-column
label=
"操作类型"
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=
"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"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.MEMBER_POINT_STATUS"
:value=
"scope.row.status"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"用户id"
align=
"center"
prop=
"userId"
/>
<el-table-column
label=
"冻结时间"
align=
"center"
...
...
@@ -117,12 +125,6 @@
prop=
"thawingTime"
:formatter=
"dateFormatter"
/>
<el-table-column
label=
"发生时间"
align=
"center"
prop=
"createDate"
:formatter=
"dateFormatter"
/>
</el-table>
<!-- 分页 -->
<Pagination
...
...
src/views/member/signin/config/index.vue
View file @
4571f893
...
...
@@ -8,6 +8,7 @@
:inline=
"true"
label-width=
"68px"
>
<!-- TODO @xiaqing:搜索可以去掉,因为一共就没几条配置哈 -->
<el-form-item
label=
"签到天数"
prop=
"day"
>
<el-input
v-model=
"queryParams.day"
...
...
@@ -35,6 +36,7 @@
:loading=
"exportLoading"
v-hasPermi=
"['point:sign-in-config:export']"
>
<!-- TODO @xiaqing:四个功能的导出都可以去掉 -->
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
</el-button>
</el-form-item>
...
...
@@ -44,15 +46,10 @@
<!-- 列表 -->
<ContentWrap>
<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=
"point"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
:formatter=
"dateFormatter"
/>
<el-table-column
label=
"获得积分"
align=
"center"
prop=
"point"
/>
<!-- TODO @xiaqing:展示一个是否开启 -->
<el-table-column
label=
"操作"
align=
"center"
>
<template
#
default=
"scope"
>
<el-button
...
...
@@ -88,7 +85,6 @@
</template>
<
script
lang=
"ts"
setup
>
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
download
from
'@/utils/download'
import
*
as
SignInConfigApi
from
'@/api/point/signInConfig'
import
SignInConfigForm
from
'./SignInConfigForm.vue'
...
...
@@ -109,6 +105,7 @@ const queryParams = reactive({
const
queryFormRef
=
ref
()
// 搜索的表单
const
exportLoading
=
ref
(
false
)
// 导出的加载中
// TODO @xiaqing:可以不分页;
/** 查询列表 */
const
getList
=
async
()
=>
{
loading
.
value
=
true
...
...
src/views/member/signin/record/index.vue
View file @
4571f893
...
...
@@ -40,14 +40,6 @@
<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-->
<!-- type="primary"-->
<!-- plain-->
<!-- @click="openForm('create')"-->
<!-- v-hasPermi="['point:sign-in-record:create']"-->
<!-- >-->
<!--
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增-->
<!--
</el-button>
-->
<el-button
type=
"success"
plain
...
...
@@ -64,10 +56,11 @@
<!-- 列表 -->
<ContentWrap>
<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=
"day"
/>
<el-table-column
label=
"
签到的分数
"
align=
"center"
prop=
"point"
/>
<el-table-column
label=
"
获得积分
"
align=
"center"
prop=
"point"
/>
<el-table-column
label=
"签到时间"
align=
"center"
...
...
@@ -76,14 +69,6 @@
/>
<el-table-column
label=
"操作"
align=
"center"
>
<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
link
type=
"danger"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment