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
815897ca
authored
Aug 12, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商城:优惠劵的前端完善
parent
98477ef4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
39 deletions
+35
-39
src/views/mall/promotion/coupon/index.vue
+35
-39
src/views/mall/promotion/couponTemplate/CouponTemplateForm.vue
+0
-0
src/views/mall/promotion/couponTemplate/index.vue
+0
-0
No files found.
src/views/mall/promotion/coupon/index.vue
View file @
815897ca
<
template
>
<
template
>
<doc-alert
title=
"功能开启"
url=
"https://doc.iocoder.cn/mall/build/"
/>
<doc-alert
title=
"功能开启"
url=
"https://doc.iocoder.cn/mall/build/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryFormRef"
:inline=
"true"
label-width=
"68px"
>
<ContentWrap>
<el-form
ref=
"queryFormRef"
:inline=
"true"
:model=
"queryParams"
class=
"-mb-15px"
label-width=
"68px"
>
<el-form-item
label=
"会员昵称"
prop=
"nickname"
>
<el-form-item
label=
"会员昵称"
prop=
"nickname"
>
<el-input
<el-input
v-model=
"queryParams.nickname"
v-model=
"queryParams.nickname"
class=
"!w-240px"
placeholder=
"请输入会员昵称"
placeholder=
"请输入会员昵称"
clearable
clearable
@
keyup=
"handleQuery"
@
keyup=
"handleQuery"
...
@@ -15,13 +22,12 @@
...
@@ -15,13 +22,12 @@
<el-form-item
label=
"创建时间"
prop=
"createTime"
>
<el-form-item
label=
"创建时间"
prop=
"createTime"
>
<el-date-picker
<el-date-picker
v-model=
"queryParams.createTime"
v-model=
"queryParams.createTime"
style=
"width: 240px"
type=
"datetimerange"
value-format=
"YYYY-MM-DD HH:mm:ss"
value-format=
"YYYY-MM-DD HH:mm:ss"
range-separator=
"-
"
type=
"daterange
"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
:default-time=
"[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)]"
:default-time=
"[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class=
"!w-240px"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -31,11 +37,6 @@
...
@@ -31,11 +37,6 @@
<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-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 操作工具栏 -->
<!--
<el-row
:gutter=
"10"
class=
"mb8"
>
<right-toolbar
v-model:showSearch=
"showSearch"
@
queryTable=
"getList"
/>
</el-row>
-->
</ContentWrap>
</ContentWrap>
<ContentWrap>
<ContentWrap>
...
@@ -86,23 +87,21 @@
...
@@ -86,23 +87,21 @@
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
size=
"small"
type=
"primary"
link
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['promotion:coupon:delete']"
v-hasPermi=
"['promotion:coupon:delete']"
><Icon
icon=
"ep:delete"
:size=
"12"
class=
"mr-1px"
/>
回收
</el-button
type=
"danger"
link
@
click=
"handleDelete(scope.row.id)"
>
>
回收
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页组件 -->
<Pagination
<pagination
v-show=
"total > 0"
:total=
"total"
v-model:page=
"queryParams.pageNo"
v-model:limit=
"queryParams.pageSize"
v-model:limit=
"queryParams.pageSize"
v-model:page=
"queryParams.pageNo"
:total=
"total"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
...
@@ -112,17 +111,14 @@
...
@@ -112,17 +111,14 @@
import
{
deleteCoupon
,
getCouponPage
}
from
'@/api/mall/promotion/coupon'
import
{
deleteCoupon
,
getCouponPage
}
from
'@/api/mall/promotion/coupon'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
FormInstance
}
from
'element-plus'
// 消息弹窗
defineOptions
({
name
:
'PromotionCoupon'
})
const
message
=
useMessage
()
// 遮罩层
const
message
=
useMessage
()
// 消息弹窗
const
loading
=
ref
(
true
)
// 总条数
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
const
total
=
ref
(
0
)
// 列表的总页数
// 优惠劵列表
const
list
=
ref
([])
// 字典表格数据
const
list
=
ref
([])
// 查询参数
// 查询参数
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
pageNo
:
1
,
pageNo
:
1
,
...
@@ -130,9 +126,9 @@ const queryParams = reactive({
...
@@ -130,9 +126,9 @@ const queryParams = reactive({
createTime
:
[],
createTime
:
[],
status
:
undefined
status
:
undefined
})
})
// Tab 筛选
const
queryFormRef
=
ref
()
// 搜索的表单
const
activeTab
=
ref
(
'all'
)
const
activeTab
=
ref
(
'all'
)
// Tab 筛选
const
statusTabs
=
reactive
([
const
statusTabs
=
reactive
([
{
{
label
:
'全部'
,
label
:
'全部'
,
...
@@ -140,8 +136,6 @@ const statusTabs = reactive([
...
@@ -140,8 +136,6 @@ const statusTabs = reactive([
}
}
])
])
const
queryFormRef
=
ref
<
FormInstance
|
null
>
(
null
)
/** 查询列表 */
/** 查询列表 */
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
...
@@ -168,16 +162,17 @@ const resetQuery = () => {
...
@@ -168,16 +162,17 @@ const resetQuery = () => {
}
}
/** 删除按钮操作 */
/** 删除按钮操作 */
const
handleDelete
=
async
(
row
)
=>
{
const
handleDelete
=
async
(
id
:
number
)
=>
{
const
id
=
row
.
id
try
{
try
{
// 二次确认
await
message
.
confirm
(
await
message
.
confirm
(
'回收将会收回会员领取的待使用的优惠券,已使用的将无法回收,确定要回收所选优惠券吗?'
'回收将会收回会员领取的待使用的优惠券,已使用的将无法回收,确定要回收所选优惠券吗?'
)
)
// 发起删除
await
deleteCoupon
(
id
)
await
deleteCoupon
(
id
)
getList
()
message
.
notifySuccess
(
'回收成功'
)
message
.
notifySuccess
(
'回收成功'
)
// 重新加载列表
await
getList
()
}
catch
{}
}
catch
{}
}
}
...
@@ -187,6 +182,7 @@ const onTabChange = (tabName) => {
...
@@ -187,6 +182,7 @@ const onTabChange = (tabName) => {
getList
()
getList
()
}
}
/** 初始化 **/
onMounted
(()
=>
{
onMounted
(()
=>
{
getList
()
getList
()
// 设置 statuses 过滤
// 设置 statuses 过滤
...
...
src/views/mall/promotion/couponTemplate/CouponTemplateForm.vue
0 → 100644
View file @
815897ca
This diff is collapsed.
Click to expand it.
src/views/mall/promotion/couponTemplate/index.vue
View file @
815897ca
This diff is collapsed.
Click to expand it.
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