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
db5e966d
Commit
db5e966d
authored
Jan 12, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠卷管理增加显示适用门店
parent
dbfc4f6d
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
145 additions
and
9 deletions
+145
-9
coupon.js
src/api/system/coupon.js
+7
-0
store.js
src/api/system/store.js
+2
-3
durationIndex.vue
src/views/system/coupon/durationIndex.vue
+10
-1
index.vue
src/views/system/coupon/index.vue
+55
-3
queryShopDeal.vue
src/views/system/coupon/queryShopDeal.vue
+68
-0
index.vue
src/views/system/store/index.vue
+2
-1
selectOpenShopUuid.vue
src/views/system/store/selectOpenShopUuid.vue
+1
-1
No files found.
src/api/system/coupon.js
View file @
db5e966d
...
...
@@ -9,6 +9,13 @@ export function listCoupon(query) {
})
}
export
function
queryshopdeal
()
{
return
request
({
url
:
'/system/coupon/queryshopdeal'
,
method
:
'get'
})
}
export
function
listDuration
(
query
)
{
return
request
({
url
:
'/system/coupon/list/duration'
,
...
...
src/api/system/store.js
View file @
db5e966d
...
...
@@ -15,11 +15,10 @@ export function listStore(query) {
})
}
export
function
storeList
(
query
)
{
export
function
storeList
()
{
return
request
({
url
:
'/system/store/query'
,
method
:
'get'
,
params
:
query
method
:
'get'
})
}
...
...
src/views/system/coupon/durationIndex.vue
View file @
db5e966d
...
...
@@ -245,7 +245,7 @@
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"数量"
prop
=
"number"
>
<
el
-
input
-
number
v
-
model
=
"form.number"
:
min
=
"
0
"
:
max
=
"9999"
label
=
"优惠卷数量"
/>
<
el
-
input
-
number
v
-
model
=
"form.number"
:
min
=
"
1
"
:
max
=
"9999"
label
=
"优惠卷数量"
/>
<!--
<
el
-
input
v
-
model
=
"form.number"
type
=
"textarea"
placeholder
=
"请输入数量"
/>-->
<
/el-form-item
>
<
el
-
form
-
item
label
=
"说明"
prop
=
"remark"
>
...
...
@@ -318,6 +318,15 @@ export default {
duration
:
[
{
required
:
true
,
message
:
"时长不能为空"
,
trigger
:
"blur"
}
],
number
:
[
{
required
:
true
,
message
:
"数量不能为空"
,
trigger
:
"blur"
}
],
startDate
:
[
{
required
:
true
,
message
:
"有效期开始不能为空"
,
trigger
:
"change"
}
],
endDate
:
[
{
required
:
true
,
message
:
"有效期结束不能为空"
,
trigger
:
"change"
}
],
}
}
;
}
,
...
...
src/views/system/coupon/index.vue
View file @
db5e966d
...
...
@@ -133,6 +133,14 @@
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"适用门店"
align=
"center"
prop=
"storeIdEnum"
width=
"350"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.storeIdEnum"
style=
"display: flex;flex-wrap: wrap;width: 100%;"
>
<dict-tag
style=
"margin: 0 3px;"
v-for=
"(item ,k) in scope.row.storeIdEnum"
:key=
"k"
:options=
"storeList"
:value=
"item"
/>
</div>
</
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"/>-->
...
...
@@ -197,6 +205,9 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"美团团购id"
prop=
"dealgroupId"
>
<el-input
@
focus=
"openShopDeal()"
v-model=
"form.dealgroupId"
placeholder=
"请输入美团团购id"
/>
</el-form-item>
<el-form-item
label=
"订单类型"
prop=
"orderType"
>
<el-select
v-model=
"form.orderType"
placeholder=
"请选择订单类型"
clearable
>
<el-option
...
...
@@ -257,15 +268,18 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<queryShopDeal
ref=
"select"
@
select=
"queryShopDeal"
/>
</div>
</template>
<
script
>
import
{
storeList
}
from
'@/api/system/store'
import
{
listGroup
,
getCoupon
,
delCoupon
,
addCoupon
,
updateCoupon
}
from
"@/api/system/coupon"
;
import
{
query
}
from
'@/api/system/pack'
import
{
query
}
from
'@/api/system/pack'
;
import
queryShopDeal
from
"./queryShopDeal"
;
export
default
{
name
:
"Coupon"
,
components
:
{
queryShopDeal
},
dicts
:
[
'store_coupon_type'
,
'store_type'
,
'store_room_type'
,
'store_platform_type'
,
'cash_coupon_type'
,
'store_order_type'
,
'coupon_use_status'
],
data
()
{
return
{
...
...
@@ -286,6 +300,8 @@ export default {
// 优惠券表格数据
couponList
:
[],
packList
:
[],
storeList
:
[],
storeIdEnum
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
...
...
@@ -327,6 +343,7 @@ export default {
created
()
{
this
.
getList
();
this
.
onPackList
();
this
.
onStoreList
();
},
methods
:
{
onChangeStoreType
(
e
)
{
...
...
@@ -342,11 +359,34 @@ export default {
getList
()
{
this
.
loading
=
true
;
listGroup
(
this
.
queryParams
).
then
(
response
=>
{
this
.
couponList
=
response
.
rows
;
this
.
couponList
=
response
.
rows
.
map
(
item
=>
{
return
{
...
item
,
storeIdEnum
:
item
.
storeIdEnum
?
item
.
storeIdEnum
.
split
(
","
)
:
[]
}
});
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
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
();
})
},
onPackList
()
{
query
().
then
(
res
=>
{
this
.
packList
=
res
.
data
.
map
(
obj
=>
{
...
...
@@ -479,6 +519,18 @@ export default {
this
.
download
(
'system/coupon/export'
,
{
...
this
.
queryParams
},
`coupon_
${
new
Date
().
getTime
()}
.xlsx`
)
},
openShopDeal
()
{
this
.
$refs
.
select
.
show
();
},
queryShopDeal
(
name
,
startDate
,
endDate
,
subPrice
,
dealgroupId
,
storeIdEnum
)
{
this
.
form
.
name
=
name
;
this
.
form
.
startDate
=
startDate
;
this
.
form
.
endDate
=
endDate
;
this
.
form
.
subPrice
=
subPrice
;
this
.
form
.
dealgroupId
=
dealgroupId
;
this
.
form
.
storeIdEnum
=
storeIdEnum
;
}
}
};
...
...
src/views/system/coupon/queryShopDeal.vue
0 → 100644
View file @
db5e966d
<
template
>
<!-- 授权用户 -->
<el-dialog
title=
"美团所有团购信息"
:visible
.
sync=
"visible"
width=
"80%"
top=
"5vh"
append-to-body
>
<el-row>
<el-table
@
row-click=
"clickRow"
ref=
"table"
:data=
"dataList"
height=
"500px"
>
<el-table-column
label=
"套餐名称"
align=
"center"
prop=
"name"
/>
<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
=
"subPrice"
/>
<
el
-
table
-
column
label
=
"团购ID"
align
=
"center"
prop
=
"dealgroupId"
/>
<
el
-
table
-
column
label
=
"适用门店id"
align
=
"center"
prop
=
"storeIdEnum"
>
<
/el-table-column
>
<
/el-table
>
<
/el-row
>
<
/el-dialog
>
<
/template
>
<
script
>
import
{
queryshopdeal
}
from
"@/api/system/coupon"
;
export
default
{
data
()
{
return
{
// 遮罩层
visible
:
false
,
// 总条数
total
:
0
,
// 团购劵信息
dataList
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
phone
:
undefined
}
}
;
}
,
methods
:
{
// 显示弹框
show
()
{
this
.
getList
();
this
.
visible
=
true
;
}
,
clickRow
(
row
)
{
this
.
$emit
(
'select'
,
row
.
name
,
row
.
startDate
,
row
.
endDate
,
row
.
subPrice
,
row
.
dealgroupId
,
row
.
storeIdEnum
);
this
.
visible
=
false
;
}
,
// 查询表数据
getList
()
{
queryshopdeal
().
then
(
res
=>
{
this
.
dataList
=
res
.
data
;
this
.
total
=
res
.
total
;
}
);
}
,
}
}
;
<
/script
>
src/views/system/store/index.vue
View file @
db5e966d
...
...
@@ -570,9 +570,10 @@ export default {
openShopUuid
()
{
this
.
$refs
.
select
.
show
();
},
selectOpenShopUuids
(
openShopUuid
,
cityname
,
shopaddress
)
{
selectOpenShopUuids
(
openShopUuid
,
cityname
,
shopaddress
,
branchname
)
{
this
.
form
.
openShopUuid
=
openShopUuid
;
this
.
form
.
address
=
cityname
+
shopaddress
;
this
.
form
.
name
=
branchname
;
this
.
onSearchMapAddress
();
}
}
...
...
src/views/system/store/selectOpenShopUuid.vue
View file @
db5e966d
...
...
@@ -41,7 +41,7 @@ export default {
this
.
visible
=
true
;
},
clickRow
(
row
)
{
this
.
$emit
(
'select'
,
row
.
open_shop_uuid
,
row
.
cityname
,
row
.
shopaddress
);
this
.
$emit
(
'select'
,
row
.
open_shop_uuid
,
row
.
cityname
,
row
.
shopaddress
,
row
.
branchname
);
this
.
visible
=
false
;
},
// 查询表数据
...
...
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