Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
web
soss
Commits
9f52667c
Commit
9f52667c
authored
Jul 27, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券领取信息列表
parent
86005f80
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
126 additions
and
8 deletions
+126
-8
src/api/coupon/coupon.js
+3
-3
src/views/coupon/coupon/giveCoupon.vue
+3
-3
src/views/coupon/coupon/index.vue
+2
-2
src/views/coupon/couponInfo/index.vue
+118
-0
No files found.
src/api/coupon/coupon.js
View file @
9f52667c
...
@@ -52,10 +52,10 @@ export function onlineCoupon(id) {
...
@@ -52,10 +52,10 @@ export function onlineCoupon(id) {
});
});
}
}
//
赠送优惠券
//
用户领取优惠券列表
export
function
g
iveCoupon
(
data
)
{
export
function
g
etCouponInfoList
(
data
)
{
return
request
({
return
request
({
url
:
"/coupon-user/
give
"
,
url
:
"/coupon-user/
list
"
,
method
:
"post"
,
method
:
"post"
,
data
:
data
,
data
:
data
,
});
});
...
...
src/views/coupon/coupon/giveCoupon.vue
View file @
9f52667c
...
@@ -21,11 +21,11 @@
...
@@ -21,11 +21,11 @@
</el-form>
</el-form>
<el-table
v-loading=
"loading"
:data=
"customerList"
>
<el-table
v-loading=
"loading"
:data=
"customerList"
>
<el-table-column
label=
"用户"
align=
"center"
prop=
"userName"
>
<el-table-column
label=
"用户"
align=
"center"
prop=
"userName"
>
<template
slot-scope=
"scope"
>
<
!--
<
template
slot-scope=
"scope"
>
<a
myattr=
"mcv"
v-hasPermi=
"['system:customer:view']"
>
<a
myattr=
"mcv"
v-hasPermi=
"['system:customer:view']"
>
<span
@
click=
"getDetial(scope.row)"
style=
"color: blue"
>
{{
scope
.
row
.
userName
}}
</span>
<span
@
click=
"getDetial(scope.row)"
style=
"color: blue"
>
{{
scope
.
row
.
userName
}}
</span>
</a>
</a>
</
template
>
</
template
>
-->
</el-table-column>
</el-table-column>
<el-table-column
label=
"手机号"
align=
"center"
prop=
"phoneNumber"
/>
<el-table-column
label=
"手机号"
align=
"center"
prop=
"phoneNumber"
/>
<el-table-column
label=
"订单量"
align=
"center"
prop=
"orderCount"
/>
<el-table-column
label=
"订单量"
align=
"center"
prop=
"orderCount"
/>
...
@@ -137,7 +137,7 @@ export default {
...
@@ -137,7 +137,7 @@ export default {
this
.
$message
.
error
(
"请选择需要赠送的优惠券!"
);
this
.
$message
.
error
(
"请选择需要赠送的优惠券!"
);
return
;
return
;
}
}
giveCoupon
({
"
user
Id"
:
userId
,
"couponId"
:
couponId
}).
then
((
response
)
=>
{
giveCoupon
({
"
cust
Id"
:
userId
,
"couponId"
:
couponId
}).
then
((
response
)
=>
{
if
(
response
.
code
==
200
){
if
(
response
.
code
==
200
){
this
.
$modal
.
msgSuccess
(
"赠送成功"
);
this
.
$modal
.
msgSuccess
(
"赠送成功"
);
this
.
giveOpen
=
false
;
this
.
giveOpen
=
false
;
...
...
src/views/coupon/coupon/index.vue
View file @
9f52667c
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"100px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"100px"
>
<el-form-item
label=
"
分类
名称 "
>
<el-form-item
label=
"
优惠券
名称 "
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入
分类
名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入
优惠券
名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"优惠券类别"
>
<el-form-item
label=
"优惠券类别"
>
<el-select
v-model=
"queryParams.categoryId"
placeholder=
"请选择优惠券类别"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
>
<el-select
v-model=
"queryParams.categoryId"
placeholder=
"请选择优惠券类别"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
>
...
...
src/views/coupon/couponInfo/index.vue
View file @
9f52667c
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"100px"
>
<el-form-item
label=
"优惠券类别"
>
<el-input
v-model=
"queryParams.name"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
></el-input>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-select
v-model=
"queryParams.state"
placeholder=
"请选择状态"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
v-hasPermi=
"['coupon:category:query']"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"couponInfoList"
>
<el-table-column
label=
"用户名"
align=
"center"
prop=
"custName"
>
<template
slot-scope=
"scope"
>
<a
@
click=
"handleUpdate(scope.row)"
style=
"color: blue"
>
{{
scope
.
row
.
custName
}}
</a>
</
template
>
</el-table-column>
<el-table-column
label=
"订单号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
label=
"用户手机号"
align=
"center"
prop=
"custPhone"
/>
<el-table-column
label=
"领取优惠券名称"
align=
"center"
prop=
"couponName"
/>
<el-table-column
label=
"领取入口"
align=
"center"
prop=
"source"
/>
<el-table-column
label=
"触发事件"
align=
"center"
prop=
"typeDesc"
/>
<el-table-column
label=
"领取时间"
align=
"center"
prop=
"receiveTime"
/>
<el-table-column
label=
"优惠券适用时间"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
formateTime
(
scope
.
row
.
startTime
)
}}
~
{{
formateTime
(
scope
.
row
.
expiredTime
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"优惠券状态"
align=
"center"
prop=
"stateDesc"
/>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
{
getCouponInfoList
}
from
"@/api/coupon/coupon"
;
export
default
{
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 总条数
total
:
0
,
// 表格数据
couponInfoList
:
[],
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
name
:
null
,
state
:
null
},
options
:
[{
value
:
null
,
label
:
'全部'
},{
value
:
'1'
,
label
:
'生效中'
},{
value
:
'2'
,
label
:
'未生效'
}],
};
},
created
()
{
this
.
getList
();
},
methods
:
{
formateTime
(
val
){
let
index
=
val
.
indexOf
(
":"
);
val
=
val
.
substring
(
0
,
index
-
3
);
console
.
log
(
"val"
,
val
);
return
val
;
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
getCouponInfoList
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
couponInfoList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
.
name
=
null
;
this
.
queryParams
.
state
=
null
;
this
.
handleQuery
();
},
},
};
</
script
>
\ No newline at end of file
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