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
76a63e01
authored
Aug 20, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review:会员签到配置
parent
cbd3d6c9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
40 deletions
+13
-40
src/api/member/tag/index.ts
+0
-5
src/views/member/point/config/index.vue
+13
-9
src/views/member/tag/index.vue
+0
-26
No files found.
src/api/member/tag/index.ts
View file @
76a63e01
...
...
@@ -29,8 +29,3 @@ export const updateMemberTag = async (data: TagVO) => {
export
const
deleteMemberTag
=
async
(
id
:
number
)
=>
{
return
await
request
.
delete
({
url
:
`/member/tag/delete?id=`
+
id
})
}
// 导出会员标签 Excel
export
const
exportMemberTag
=
async
(
params
)
=>
{
return
await
request
.
download
({
url
:
`/member/tag/export-excel`
,
params
})
}
src/views/member/point/config/index.vue
View file @
76a63e01
...
...
@@ -25,8 +25,8 @@
/>
</el-form-item>
<el-form-item>
<el-text
class=
"mx-1"
size=
"small"
type=
"info"
>
积分抵用比例(1积分抵多少金额)
单位:元
<el-text
class=
"mx-1"
size=
"small"
type=
"info"
>
积分抵用比例(1 积分抵多少金额),
单位:元
</el-text>
</el-form-item>
<el-form-item
label=
"积分抵扣最大值"
prop=
"tradeDeductMaxPrice"
class=
"item-bottom"
>
...
...
@@ -37,7 +37,7 @@
/>
</el-form-item>
<el-form-item>
<el-text
class=
"mx-1"
size=
"small"
type=
"info"
>
单次下单积分使用上限
,0
不限制
</el-text>
<el-text
class=
"mx-1"
size=
"small"
type=
"info"
>
单次下单积分使用上限
,0
不限制
</el-text>
</el-form-item>
<el-form-item
label=
"1 元赠送多少分"
prop=
"tradeGivePoint"
class=
"item-bottom"
>
<el-input-number
...
...
@@ -47,9 +47,9 @@
/>
</el-form-item>
<el-form-item>
<el-text
class=
"mx-1"
size=
"small"
type=
"info"
>
下单支付金额按比例赠送积分(实际支付1元赠送多少积分)
</el-text
>
<el-text
class=
"mx-1"
size=
"small"
type=
"info"
>
下单支付金额按比例赠送积分(实际支付 1 元赠送多少积分)
</el-text
>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
保存
</el-button>
...
...
@@ -60,18 +60,20 @@
<
script
lang=
"ts"
setup
>
import
*
as
ConfigApi
from
'@/api/point/config'
defineOptions
({
name
:
'MemberPointConfig'
})
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
const
dialogVisible
=
ref
(
false
)
// 弹窗的是否展示
const
formLoading
=
ref
(
false
)
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const
formData
=
ref
({
id
:
undefined
,
tradeDeductEnable
:
true
,
tradeDeductUnitPrice
:
0
,
tradeDeductMaxPrice
:
0
,
tradeGivePoint
:
0
})
// 创建一个计算属性,用于将 tradeDeductUnitPrice 显示为带两位小数的形式
const
computedTradeDeductUnitPrice
=
computed
({
get
:
()
=>
(
formData
.
value
.
tradeDeductUnitPrice
/
100
).
toFixed
(
2
),
...
...
@@ -105,7 +107,9 @@ const onSubmit = async () => {
const
getConfig
=
async
()
=>
{
try
{
const
data
=
await
ConfigApi
.
getConfig
()
if
(
data
===
null
)
return
if
(
data
===
null
)
{
return
}
formData
.
value
=
data
}
finally
{
}
...
...
@@ -118,6 +122,6 @@ onMounted(() => {
<
style
scoped
>
.item-bottom
{
margin-bottom
:
0
px
;
margin-bottom
:
0
;
}
</
style
>
src/views/member/tag/index.vue
View file @
76a63e01
...
...
@@ -34,15 +34,6 @@
<el-button
type=
"primary"
@
click=
"openForm('create')"
v-hasPermi=
"['member:tag:create']"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['member:tag:export']"
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
...
...
@@ -50,7 +41,6 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"70px"
/>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
width=
"150px"
/>
<el-table-column
label=
"标签名称"
align=
"center"
prop=
"name"
/>
<el-table-column
...
...
@@ -112,7 +102,6 @@ const queryParams = reactive({
createTime
:
[]
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
exportLoading
=
ref
(
false
)
// 导出的加载中
/** 查询列表 */
const
getList
=
async
()
=>
{
...
...
@@ -157,21 +146,6 @@ const handleDelete = async (id: number) => {
}
catch
{}
}
/** 导出按钮操作 */
const
handleExport
=
async
()
=>
{
try
{
// 导出的二次确认
await
message
.
exportConfirm
()
// 发起导出
exportLoading
.
value
=
true
const
data
=
await
TagApi
.
exportMemberTag
(
queryParams
)
download
.
excel
(
data
,
'会员标签.xls'
)
}
catch
{
}
finally
{
exportLoading
.
value
=
false
}
}
/** 初始化 **/
onMounted
(()
=>
{
getList
()
...
...
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