Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_web
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
pseer
gxpt_web
Commits
c4f8720e
Commit
c4f8720e
authored
Jan 15, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改优惠卷显示
parent
fc95c407
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
30 deletions
+43
-30
index.vue
src/views/system/consumer/index.vue
+13
-3
index.vue
src/views/system/consumerCoupon/index.vue
+3
-3
durationIndex.vue
src/views/system/coupon/durationIndex.vue
+14
-12
index.vue
src/views/system/coupon/index.vue
+13
-12
No files found.
src/views/system/consumer/index.vue
View file @
c4f8720e
...
@@ -268,12 +268,17 @@
...
@@ -268,12 +268,17 @@
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"时长"
align
=
"center"
prop
=
"duration"
/>
<
el
-
table
-
column
label
=
"时长"
align
=
"center"
prop
=
"duration"
/>
<
el
-
table
-
column
label
=
"
优惠金额"
align
=
"center"
prop
=
"subPrice
"
/>
<
el
-
table
-
column
label
=
"
门槛时长"
align
=
"center"
prop
=
"minDuration
"
/>
<
el
-
table
-
column
label
=
"平台类型"
align
=
"center"
prop
=
"platformType"
>
<
el
-
table
-
column
label
=
"平台类型"
align
=
"center"
prop
=
"platformType"
>
<
template
slot
-
scope
=
"scope"
>
<
template
slot
-
scope
=
"scope"
>
<
dict
-
tag
:
options
=
"dict.type.store_platform_type"
:
value
=
"scope.row.platformType"
/>
<
dict
-
tag
:
options
=
"dict.type.store_platform_type"
:
value
=
"scope.row.platformType"
/>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"适用星期"
align
=
"center"
prop
=
"weeks"
width
=
"250px"
>
<
template
slot
-
scope
=
"scope"
>
<
dict
-
tag
:
options
=
"dict.type.sunday_type"
:
value
=
"scope.row.weeks"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"有效期开始"
align
=
"center"
prop
=
"startDate"
width
=
"180"
>
<
el
-
table
-
column
label
=
"有效期开始"
align
=
"center"
prop
=
"startDate"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
startDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
span
>
{{
parseTime
(
scope
.
row
.
startDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
...
@@ -327,7 +332,7 @@ import moment from "moment";
...
@@ -327,7 +332,7 @@ import moment from "moment";
export
default
{
export
default
{
name
:
"Consumer"
,
name
:
"Consumer"
,
dicts
:
[
'sys_user_sex'
,
'wechat_role_type'
,
'store_coupon_type'
,
'store_platform_type'
,
'store_platform_type'
],
dicts
:
[
'sys_user_sex'
,
'wechat_role_type'
,
'store_coupon_type'
,
'store_platform_type'
,
'store_platform_type'
,
'sunday_type'
],
data
()
{
data
()
{
return
{
return
{
// 遮罩层
// 遮罩层
...
@@ -406,7 +411,12 @@ export default {
...
@@ -406,7 +411,12 @@ export default {
getCouponList
()
{
getCouponList
()
{
this
.
couponQueryParams
.
endDate
=
moment
().
format
(
'YYYY-MM-DD'
)
this
.
couponQueryParams
.
endDate
=
moment
().
format
(
'YYYY-MM-DD'
)
listDuration
(
this
.
couponQueryParams
).
then
(
response
=>
{
listDuration
(
this
.
couponQueryParams
).
then
(
response
=>
{
this
.
couponList
=
response
.
rows
;
this
.
couponList
=
response
.
rows
.
map
(
item
=>
{
return
{
...
item
,
weeks
:
item
.
weeks
?
item
.
weeks
.
split
(
","
)
:
[]
}
}
);
this
.
couponTotal
=
response
.
total
;
this
.
couponTotal
=
response
.
total
;
}
);
}
);
}
,
}
,
...
...
src/views/system/consumerCoupon/index.vue
View file @
c4f8720e
...
@@ -205,9 +205,9 @@
...
@@ -205,9 +205,9 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"适用星期"
align=
"center"
prop=
"
sunday
s"
width=
"250px"
>
<el-table-column
label=
"适用星期"
align=
"center"
prop=
"
week
s"
width=
"250px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sunday_type"
:value=
"scope.row.
sunday
s"
/>
<dict-tag
:options=
"dict.type.sunday_type"
:value=
"scope.row.
week
s"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"有效开始时段"
align=
"center"
prop=
"couponTimeStart"
/>
<el-table-column
label=
"有效开始时段"
align=
"center"
prop=
"couponTimeStart"
/>
...
@@ -465,7 +465,7 @@ export default {
...
@@ -465,7 +465,7 @@ export default {
this
.
consumerCouponList
=
response
.
rows
.
map
(
item
=>
{
this
.
consumerCouponList
=
response
.
rows
.
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
sundays
:
item
.
sundays
?
item
.
sunday
s
.
split
(
","
)
:
[]
weeks
:
item
.
weeks
?
item
.
week
s
.
split
(
","
)
:
[]
}
}
}
);
}
);
this
.
total
=
response
.
total
this
.
total
=
response
.
total
...
...
src/views/system/coupon/durationIndex.vue
View file @
c4f8720e
...
@@ -128,9 +128,9 @@
...
@@ -128,9 +128,9 @@
<dict-tag
:options=
"dict.type.store_order_type"
:value=
"scope.row.orderType"
/>
<dict-tag
:options=
"dict.type.store_order_type"
:value=
"scope.row.orderType"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"适用星期"
align=
"center"
prop=
"
sunday
s"
width=
"250px"
>
<el-table-column
label=
"适用星期"
align=
"center"
prop=
"
week
s"
width=
"250px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sunday_type"
:value=
"scope.row.
sunday
s"
/>
<dict-tag
:options=
"dict.type.sunday_type"
:value=
"scope.row.
week
s"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"套餐"
align=
"center"
prop=
"packageId"
>
<el-table-column
label=
"套餐"
align=
"center"
prop=
"packageId"
>
...
@@ -229,9 +229,9 @@
...
@@ -229,9 +229,9 @@
/>
/>
<
/el-select
>
<
/el-select
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"适用星期"
prop
=
"
sunday
s"
>
<
el
-
form
-
item
label
=
"适用星期"
prop
=
"
week
s"
>
<
div
style
=
"display: flex;flex-direction: row;align-items: center;width: 100%;"
>
<
div
style
=
"display: flex;flex-direction: row;align-items: center;width: 100%;"
>
<
el
-
select
style
=
"width: 100%;"
v
-
model
=
"
sundays"
multiple
placeholder
=
"选择星期"
@
change
=
"onChangeSunday
s"
>
<
el
-
select
style
=
"width: 100%;"
v
-
model
=
"
weeks"
multiple
placeholder
=
"选择星期"
@
change
=
"onChangeweek
s"
>
<
el
-
option
<
el
-
option
v
-
for
=
"dict in dict.type.sunday_type"
v
-
for
=
"dict in dict.type.sunday_type"
:
key
=
"dict.value"
:
key
=
"dict.value"
...
@@ -310,7 +310,7 @@ export default {
...
@@ -310,7 +310,7 @@ export default {
// 优惠券表格数据
// 优惠券表格数据
couponList
:
[],
couponList
:
[],
packList
:
[],
packList
:
[],
sunday
s
:
[],
week
s
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
// 是否显示弹出层
// 是否显示弹出层
...
@@ -367,19 +367,20 @@ export default {
...
@@ -367,19 +367,20 @@ export default {
console
.
log
(
e
)
console
.
log
(
e
)
this
.
form
.
roomType
=
e
.
join
()
this
.
form
.
roomType
=
e
.
join
()
}
,
}
,
onChange
Sunday
s
(
e
)
{
onChange
week
s
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
this
.
form
.
sunday
s
=
e
.
join
()
this
.
form
.
week
s
=
e
.
join
()
}
,
}
,
/** 查询优惠券列表 */
/** 查询优惠券列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
weeks
=
[];
listDuration
(
this
.
queryParams
).
then
(
response
=>
{
listDuration
(
this
.
queryParams
).
then
(
response
=>
{
this
.
couponList
=
response
.
rows
.
map
(
item
=>
{
this
.
couponList
=
response
.
rows
.
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
sundays
:
item
.
sundays
?
item
.
sunday
s
.
split
(
","
)
:
[]
weeks
:
item
.
weeks
?
item
.
week
s
.
split
(
","
)
:
[]
}
}
}
);
}
);
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
...
@@ -412,6 +413,7 @@ export default {
...
@@ -412,6 +413,7 @@ export default {
}
,
}
,
// 表单重置
// 表单重置
reset
()
{
reset
()
{
this
.
weeks
=
[]
this
.
form
=
{
this
.
form
=
{
id
:
null
,
id
:
null
,
name
:
null
,
name
:
null
,
...
@@ -473,8 +475,8 @@ export default {
...
@@ -473,8 +475,8 @@ export default {
if
(
this
.
form
.
roomType
)
{
if
(
this
.
form
.
roomType
)
{
this
.
roomType
=
this
.
form
.
roomType
.
split
(
","
)
this
.
roomType
=
this
.
form
.
roomType
.
split
(
","
)
}
}
if
(
this
.
form
.
sunday
s
)
{
if
(
this
.
form
.
week
s
)
{
this
.
sundays
=
this
.
form
.
sunday
s
.
split
(
","
)
this
.
weeks
=
this
.
form
.
week
s
.
split
(
","
)
}
}
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"修改优惠券"
;
this
.
title
=
"修改优惠券"
;
...
@@ -484,8 +486,8 @@ export default {
...
@@ -484,8 +486,8 @@ export default {
submitForm
()
{
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
sunday
s
.
length
)
{
if
(
this
.
week
s
.
length
)
{
this
.
form
.
sundays
=
this
.
sunday
s
.
join
();
this
.
form
.
weeks
=
this
.
week
s
.
join
();
}
}
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateCoupon
(
this
.
form
).
then
(
response
=>
{
updateCoupon
(
this
.
form
).
then
(
response
=>
{
...
...
src/views/system/coupon/index.vue
View file @
c4f8720e
...
@@ -134,9 +134,9 @@
...
@@ -134,9 +134,9 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"适用星期"
align=
"center"
prop=
"
sunday
s"
width=
"250px"
>
<el-table-column
label=
"适用星期"
align=
"center"
prop=
"
week
s"
width=
"250px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sunday_type"
:value=
"scope.row.
sunday
s"
/>
<dict-tag
:options=
"dict.type.sunday_type"
:value=
"scope.row.
week
s"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"适用门店"
align=
"center"
prop=
"storeIds"
width=
"350"
>
<el-table-column
label=
"适用门店"
align=
"center"
prop=
"storeIds"
width=
"350"
>
...
@@ -238,9 +238,9 @@
...
@@ -238,9 +238,9 @@
/>
/>
<
/el-select
>
<
/el-select
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"适用星期"
prop
=
"
sunday
s"
>
<
el
-
form
-
item
label
=
"适用星期"
prop
=
"
week
s"
>
<
div
style
=
"display: flex;flex-direction: row;align-items: center;width: 100%;"
>
<
div
style
=
"display: flex;flex-direction: row;align-items: center;width: 100%;"
>
<
el
-
select
style
=
"width: 100%;"
v
-
model
=
"
sundays"
multiple
placeholder
=
"选择星期"
@
change
=
"onChangeSunday
s"
>
<
el
-
select
style
=
"width: 100%;"
v
-
model
=
"
weeks"
multiple
placeholder
=
"选择星期"
@
change
=
"onChangeweek
s"
>
<
el
-
option
<
el
-
option
v
-
for
=
"dict in dict.type.sunday_type"
v
-
for
=
"dict in dict.type.sunday_type"
:
key
=
"dict.value"
:
key
=
"dict.value"
...
@@ -346,7 +346,7 @@ export default {
...
@@ -346,7 +346,7 @@ export default {
couponList
:
[],
couponList
:
[],
packList
:
[],
packList
:
[],
storeList
:
[],
storeList
:
[],
sunday
s
:
[],
week
s
:
[],
storeIds
:
[],
storeIds
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
...
@@ -402,9 +402,9 @@ export default {
...
@@ -402,9 +402,9 @@ export default {
console
.
log
(
e
)
console
.
log
(
e
)
this
.
form
.
roomType
=
e
.
join
()
this
.
form
.
roomType
=
e
.
join
()
}
,
}
,
onChange
Sunday
s
(
e
)
{
onChange
week
s
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
this
.
form
.
sunday
s
=
e
.
join
()
this
.
form
.
week
s
=
e
.
join
()
}
,
}
,
/** 查询优惠券列表 */
/** 查询优惠券列表 */
...
@@ -415,7 +415,7 @@ export default {
...
@@ -415,7 +415,7 @@ export default {
return
{
return
{
...
item
,
...
item
,
storeIds
:
item
.
storeIds
&&
item
.
storeIds
.
length
?
item
.
storeIds
.
split
(
","
)
:
[],
storeIds
:
item
.
storeIds
&&
item
.
storeIds
.
length
?
item
.
storeIds
.
split
(
","
)
:
[],
sundays
:
item
.
sundays
?
item
.
sunday
s
.
split
(
","
)
:
[]
weeks
:
item
.
weeks
?
item
.
week
s
.
split
(
","
)
:
[]
}
}
}
);
}
);
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
...
@@ -466,6 +466,7 @@ export default {
...
@@ -466,6 +466,7 @@ export default {
}
,
}
,
// 表单重置
// 表单重置
reset
()
{
reset
()
{
this
.
weeks
=
[]
this
.
form
=
{
this
.
form
=
{
id
:
null
,
id
:
null
,
name
:
null
,
name
:
null
,
...
@@ -534,8 +535,8 @@ export default {
...
@@ -534,8 +535,8 @@ export default {
if
(
this
.
form
.
storeIds
)
{
if
(
this
.
form
.
storeIds
)
{
this
.
form
.
storeIds
=
this
.
form
.
storeIds
.
split
(
","
)
this
.
form
.
storeIds
=
this
.
form
.
storeIds
.
split
(
","
)
}
}
if
(
this
.
form
.
sunday
s
)
{
if
(
this
.
form
.
week
s
)
{
this
.
sundays
=
this
.
form
.
sunday
s
.
split
(
","
)
this
.
weeks
=
this
.
form
.
week
s
.
split
(
","
)
}
}
this
.
open
=
true
;
this
.
open
=
true
;
...
@@ -546,8 +547,8 @@ export default {
...
@@ -546,8 +547,8 @@ export default {
submitForm
()
{
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
sunday
s
.
length
)
{
if
(
this
.
week
s
.
length
)
{
this
.
form
.
sundays
=
this
.
sunday
s
.
join
();
this
.
form
.
weeks
=
this
.
week
s
.
join
();
}
}
this
.
form
.
storeIds
=
this
.
form
.
storeIds
&&
this
.
form
.
storeIds
.
length
?
this
.
form
.
storeIds
.
join
()
:
''
this
.
form
.
storeIds
=
this
.
form
.
storeIds
&&
this
.
form
.
storeIds
.
length
?
this
.
form
.
storeIds
.
join
()
:
''
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
...
...
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