Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
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
黄媛媛
ElectricitySheep
Commits
dfc05333
Commit
dfc05333
authored
Jun 16, 2020
by
zhangjianguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券管理
parent
2fb78f64
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
182 additions
and
3 deletions
+182
-3
usersCoupon.vue
src/components/UserMan/usersCoupon.vue
+170
-0
usersList.vue
src/components/UserMan/usersList.vue
+3
-3
CostManagement.vue
src/components/orderMan/CostManagement.vue
+3
-0
index.js
src/router/index.js
+6
-0
No files found.
src/components/UserMan/usersCoupon.vue
0 → 100644
View file @
dfc05333
<
template
>
<div
class=
"usersCoupon"
>
<div
class=
"head-title"
>
优惠券管理
</div>
<div
class=
"content"
>
<div
style=
"margin-bottom:20px"
>
<el-date-picker
v-model=
"dateList"
@
change=
"getList"
size=
"small"
type=
"datetimerange"
range-separator=
"至"
value-format=
"yyyy-MM-dd HH:mm:ss"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</div>
<div
style=
"margin-top:20px"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"全部"
name=
"first"
:dataId=
"-1"
></el-tab-pane>
<el-tab-pane
v-for=
"(item,index) in StatusList"
:dataId=
"item.Id"
:key=
"index"
:label=
"item.Name"
:name=
"item.Name"
></el-tab-pane>
</el-tabs>
</div>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width: 100%"
>
<el-table-column
prop=
"MemberCouponId"
label=
"ID"
width=
"100"
>
</el-table-column>
<el-table-column
prop=
"Name"
label=
"优惠券名称"
width=
"377"
>
</el-table-column>
<el-table-column
prop=
"MinConsumePrice"
label=
"最低消费金额(元)"
width=
"180"
>
</el-table-column>
<el-table-column
label=
"优惠方式"
width=
"180"
>
<template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.CouponType==1"
>
优惠:
{{
scope
.
row
.
DiscountsPrice
}}
元
</div>
<div
v-if=
"scope.row.CouponType==2"
>
<div>
{{
scope
.
row
.
DiscountsPrice
}}
折
</div>
<div
v-if=
"scope.row.MaxDiscountsPrice!=0"
>
优惠上限:
{{
scope
.
row
.
MaxDiscountsPrice
}}
元
</div>
<div
v-if=
"scope.row.MaxDiscountsPrice==0"
>
优惠上限:无上限
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"有效时间"
width=
"350"
>
<
template
slot-scope=
"scope"
>
<div>
开始时间:
{{
scope
.
row
.
StartDate
}}
</div>
<div>
结束时间:
{{
scope
.
row
.
EndDate
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"CreateDate"
label=
"领取时间"
width=
"180"
>
</el-table-column>
<el-table-column
label=
"领取方式"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.GetType==0"
>
领劵中心领取
</div>
<div
v-if=
"scope.row.GetType==1"
>
分享
</div>
<div
v-if=
"scope.row.GetType==2"
>
购买并付款
</div>
<div
v-if=
"scope.row.GetType==3"
>
新人领取
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.UseState==0"
>
未使用
</div>
<div
v-if=
"scope.row.UseState==1"
>
已使用
</div>
<div
v-if=
"scope.row.UseState==2"
>
已作废
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"CostFinanceId"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
src=
"../../assets/img/setup/del.png"
alt=
""
class=
"imgstyle"
@
click=
"delete_b(scope.row)"
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
loading
:
false
,
activeName
:
'first'
,
dateList
:
''
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
UserId
:
-
1
,
//0-未使用,1-已使用,2-已过期,-1全部
StartDate
:
''
,
EndDate
:
''
,
},
StatusList
:[
// {Name:'全部',Id:-1},
{
Name
:
'未使用'
,
Id
:
0
},
{
Name
:
'已使用'
,
Id
:
1
},
{
Name
:
'已过期'
,
Id
:
2
},
],
total
:
0
,
tableData
:
[],
//列表数据
}
},
created
()
{
this
.
getList
();
},
mounted
()
{
},
methods
:
{
getList
()
{
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
)
{
this
.
msg
.
StartDate
=
this
.
dateList
[
0
];
this
.
msg
.
EndDate
=
this
.
dateList
[
1
];
}
else
{
this
.
msg
.
StartDate
=
''
;
this
.
msg
.
EndDate
=
''
;
}
this
.
loading
=
true
;
this
.
apipost
(
"/api/Coupon/GetCouponPageListByMemberId"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
this
.
tableData
=
res
.
data
.
data
.
pageData
;
}
})
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
handleClick
(
val
){
this
.
msg
.
UserId
=
val
.
$attrs
.
dataId
;
this
.
getList
()
},
delete_b
(
row
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/Coupon/DelMemberCoupon"
,
{
MemberCouponId
:
row
.
MemberCouponId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
);
});
},
}
};
</
script
>
<
style
>
.usersCoupon
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
-webkit-box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
</
style
>
src/components/UserMan/usersList.vue
View file @
dfc05333
...
...
@@ -71,7 +71,7 @@
</el-table-column>
<el-table-column
prop=
"name"
label=
"优惠券数量"
>
<
template
slot-scope=
"scope"
>
<span
@
click=
"CommonJump('
couponManage
')"
class=
"blue point"
>
{{
scope
.
row
.
CouponsNum
}}
</span>
<span
@
click=
"CommonJump('
usersCoupon
')"
class=
"blue point"
>
{{
scope
.
row
.
CouponsNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"卡券数量"
>
...
...
@@ -105,8 +105,8 @@
<img
@
click=
"OpenczjfDig(scope.row,2)"
style=
"width:32px;height:32px"
src=
"../../assets/img/userman/balance.png"
alt=
""
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
...
...
src/components/orderMan/CostManagement.vue
View file @
dfc05333
...
...
@@ -147,6 +147,9 @@
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
'设置成功'
);
this
.
choiceFin
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
)
this
.
choiceFin
=
false
;
}
})
}
...
...
src/router/index.js
View file @
dfc05333
...
...
@@ -211,6 +211,12 @@ export default new Router({
name
:
'distributionOrder'
,
component
:
resolve
=>
require
([
'@/components/UserMan/distributionOrder'
],
resolve
),
},
// 用户管理 优惠券管理
{
path
:
'/usersCoupon'
,
name
:
'usersCoupon'
,
component
:
resolve
=>
require
([
'@/components/UserMan/usersCoupon'
],
resolve
),
},
// 商品管理 素材管理
{
path
:
'/materialMan'
,
...
...
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