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
ee740730
Commit
ee740730
authored
Jan 13, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
显示领取记录适用门店
parent
6358c0f7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
24 deletions
+96
-24
index.vue
src/views/system/consumerCoupon/index.vue
+3
-1
durationIndex.vue
src/views/system/coupon/durationIndex.vue
+1
-1
index.vue
src/views/system/coupon/index.vue
+54
-18
queryShopDeal.vue
src/views/system/coupon/queryShopDeal.vue
+38
-4
No files found.
src/views/system/consumerCoupon/index.vue
View file @
ee740730
...
...
@@ -418,7 +418,9 @@ export default {
useStatus
:
null
,
isDelete
:
null
,
deleteBy
:
null
,
deleteTime
:
null
deleteTime
:
null
,
phone
:
null
,
nickName
:
null
}
,
// 表单参数
form
:
{
}
,
...
...
src/views/system/coupon/durationIndex.vue
View file @
ee740730
...
...
@@ -220,7 +220,7 @@
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"套餐"
prop
=
"packageId"
>
<
el
-
select
v
-
model
=
"form.packageId"
placeholder
=
"请选择套餐"
>
<
el
-
select
v
-
model
=
"form.packageId"
placeholder
=
"请选择套餐"
clearable
>
<
el
-
option
v
-
for
=
"dict in packList"
:
key
=
"dict.value"
...
...
src/views/system/coupon/index.vue
View file @
ee740730
...
...
@@ -134,14 +134,24 @@
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"适用门店"
align=
"center"
prop=
"storeId
Enum
"
width=
"350"
>
<el-table-column
label=
"适用门店"
align=
"center"
prop=
"storeId
s
"
width=
"350"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.storeId
Enum
"
style=
"display: flex;flex-wrap: wrap;width: 100%;"
>
<dict-tag
style=
"margin: 0 3px;"
v-for=
"(item ,k) in scope.row.storeId
Enum
"
:key=
"k"
:options=
"storeList"
<div
v-if=
"scope.row.storeId
s
"
style=
"display: flex;flex-wrap: wrap;width: 100%;"
>
<dict-tag
style=
"margin: 0 3px;"
v-for=
"(item ,k) in scope.row.storeId
s
"
:key=
"k"
:options=
"storeList"
:value=
"item"
/>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"有效期开始"
align=
"center"
prop=
"startDate"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
startDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"有效期结束"
align
=
"center"
prop
=
"endDate"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
endDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"有效开始时段"
align
=
"center"
prop
=
"validStartTime"
width
=
"180"
/>
<
el
-
table
-
column
label
=
"有效结束时段"
align
=
"center"
prop
=
"validEndTime"
width
=
"180"
/>
<!--
<
el
-
table
-
column
label
=
"数量"
align
=
"center"
prop
=
"number"
/>-->
...
...
@@ -224,7 +234,7 @@
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"套餐"
prop
=
"packageId"
>
<el-select
v-model=
"form.packageId"
placeholder=
"请选择套餐"
>
<
el
-
select
v
-
model
=
"form.packageId"
placeholder
=
"请选择套餐"
clearable
>
<
el
-
option
v
-
for
=
"dict in packList"
:
key
=
"dict.value"
...
...
@@ -233,25 +243,41 @@
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"有效期开始"
prop
=
"startDate"
>
<
el
-
date
-
picker
clearable
disabled
v
-
model
=
"form.startDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择有效期开始"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"有效期结束"
prop
=
"endDate"
>
<
el
-
date
-
picker
clearable
disabled
v
-
model
=
"form.endDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择有效期结束"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"有效开始时段"
prop
=
"validStartTime"
>
<el-time-select
<
el
-
time
-
select
clearable
v
-
model
=
"form.validStartTime"
:
picker
-
options
=
"{
start: '00:00',
step: '00:3
0',
end: '24
:00'
}"
start: '00:00',
step: '01:0
0',
end: '23
:00'
}
"
placeholder
=
"选择开始时段"
>
<
/el-time-select
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"有效结束时段"
prop
=
"validEndTime"
>
<el-time-select
<
el
-
time
-
select
clearable
v
-
model
=
"form.validEndTime"
:
picker
-
options
=
"{
start: '00:00',
step: '00:3
0',
end: '24
:00'
}"
start: '00:00',
step: '01:0
0',
end: '23
:00'
}
"
placeholder
=
"选择结束时段"
>
<
/el-time-select
>
<
/el-form-item
>
...
...
@@ -278,6 +304,7 @@ import {storeList} from '@/api/system/store'
import
{
listGroup
,
getCoupon
,
delCoupon
,
addCoupon
,
updateCoupon
}
from
"@/api/system/coupon"
;
import
{
query
}
from
'@/api/system/pack'
;
import
queryShopDeal
from
"./queryShopDeal"
;
export
default
{
name
:
"Coupon"
,
components
:
{
queryShopDeal
}
,
...
...
@@ -302,7 +329,7 @@ export default {
couponList
:
[],
packList
:
[],
storeList
:
[],
storeId
Enum
:
[],
storeId
s
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
...
...
@@ -316,6 +343,8 @@ export default {
duration
:
null
,
minPrice
:
null
,
subPrice
:
null
,
validStartTime
:
null
,
validEndTime
:
null
,
useStatus
:
null
,
platformType
:
null
,
startDate
:
null
,
...
...
@@ -363,7 +392,7 @@ export default {
this
.
couponList
=
response
.
rows
.
map
(
item
=>
{
return
{
...
item
,
storeId
Enum
:
item
.
storeIdEnum
?
item
.
storeIdEnum
.
split
(
","
)
:
[]
storeId
s
:
item
.
storeIds
&&
item
.
storeIds
.
length
?
item
.
storeIds
.
split
(
","
)
:
[]
}
}
);
this
.
total
=
response
.
total
;
...
...
@@ -462,6 +491,8 @@ export default {
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
/**数组转字符串**/
getCoupon
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
.
platformType
=
"2"
;
...
...
@@ -477,6 +508,10 @@ export default {
if
(
this
.
form
.
roomType
)
{
this
.
roomType
=
this
.
form
.
roomType
.
split
(
","
)
}
if
(
this
.
form
.
storeIds
)
{
this
.
storeIds
=
this
.
form
.
storeIds
.
split
(
","
)
}
this
.
open
=
true
;
this
.
title
=
"修改优惠券"
;
}
);
...
...
@@ -485,6 +520,7 @@ export default {
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
form
.
storeIds
=
this
.
storeIds
&&
this
.
storeIds
.
length
?
this
.
storeIds
.
join
()
:
''
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
platformType
===
"美团"
)
{
this
.
form
.
platformType
=
2
...
...
@@ -524,13 +560,13 @@ export default {
openShopDeal
()
{
this
.
$refs
.
select
.
show
();
}
,
queryShopDeal
(
name
,
startDate
,
endDate
,
subPrice
,
dealgroupId
,
storeId
Enum
)
{
queryShopDeal
(
name
,
startDate
,
endDate
,
subPrice
,
dealgroupId
,
storeId
s
)
{
this
.
form
.
name
=
name
;
this
.
form
.
startDate
=
startDate
;
this
.
form
.
endDate
=
endDate
;
this
.
form
.
subPrice
=
subPrice
;
this
.
form
.
dealgroupId
=
dealgroupId
;
this
.
form
.
storeId
Enum
=
storeIdEnum
;
this
.
form
.
storeId
s
=
storeIds
;
}
}
...
...
src/views/system/coupon/queryShopDeal.vue
View file @
ee740730
...
...
@@ -17,7 +17,13 @@
<
/el-table-column
>
<
el
-
table
-
column
label
=
"套餐价格"
align
=
"center"
prop
=
"subPrice"
/>
<
el
-
table
-
column
label
=
"团购ID"
align
=
"center"
prop
=
"dealgroupId"
/>
<
el
-
table
-
column
label
=
"适用门店id"
align
=
"center"
prop
=
"storeIdEnum"
>
<
el
-
table
-
column
label
=
"适用门店id"
align
=
"center"
prop
=
"storeIds"
width
=
"350"
>
<
template
slot
-
scope
=
"scope"
>
<
div
v
-
if
=
"scope.row.storeIds"
style
=
"display: flex;flex-wrap: wrap;width: 100%;"
>
<
dict
-
tag
style
=
"margin: 0 3px;"
v
-
for
=
"(item ,k) in scope.row.storeIds"
:
key
=
"k"
:
options
=
"storeList"
:
value
=
"item"
/>
<
/div
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
...
...
@@ -27,7 +33,8 @@
<
/template
>
<
script
>
import
{
queryshopdeal
}
from
"@/api/system/coupon"
;
import
{
queryshopdeal
,
listGroup
}
from
"@/api/system/coupon"
;
import
{
storeList
}
from
'@/api/system/store'
export
default
{
data
()
{
...
...
@@ -38,6 +45,9 @@ export default {
total
:
0
,
// 团购劵信息
dataList
:
[],
storeList
:
[],
couponList
:
[],
storeIds
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
...
...
@@ -49,20 +59,44 @@ export default {
methods
:
{
// 显示弹框
show
()
{
this
.
onStoreList
();
this
.
getList
();
this
.
visible
=
true
;
}
,
clickRow
(
row
)
{
this
.
$emit
(
'select'
,
row
.
name
,
row
.
startDate
,
row
.
endDate
,
row
.
subPrice
,
row
.
dealgroupId
,
row
.
storeId
Enum
);
this
.
$emit
(
'select'
,
row
.
name
,
row
.
startDate
,
row
.
endDate
,
row
.
subPrice
,
row
.
dealgroupId
,
row
.
storeId
s
);
this
.
visible
=
false
;
}
,
// 查询表数据
getList
()
{
queryshopdeal
().
then
(
res
=>
{
this
.
dataList
=
res
.
data
;
this
.
dataList
=
res
.
data
.
map
(
item
=>
{
return
{
...
item
,
storeIds
:
item
.
storeIds
?
item
.
storeIds
.
split
(
","
)
:
[]
}
}
);
this
.
total
=
res
.
total
;
}
);
}
,
onStoreList
()
{
storeList
().
then
(
res
=>
{
this
.
storeList
=
res
.
data
.
map
(
obj
=>
{
return
{
...
obj
,
raw
:
{
dictSort
:
1
,
dictValue
:
"1"
,
listClass
:
"primary"
,
cssClass
:
''
}
,
value
:
obj
.
id
.
toString
(),
label
:
obj
.
name
,
}
}
)
this
.
$forceUpdate
();
}
)
}
,
}
}
;
<
/script
>
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