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
ddf97a9f
Commit
ddf97a9f
authored
Jan 16, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠卷字段修改
parent
0f504466
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
44 deletions
+87
-44
index.vue
src/views/system/consumer/index.vue
+30
-0
index.vue
src/views/system/consumerCoupon/index.vue
+13
-13
durationIndex.vue
src/views/system/coupon/durationIndex.vue
+21
-15
index.vue
src/views/system/coupon/index.vue
+23
-16
No files found.
src/views/system/consumer/index.vue
View file @
ddf97a9f
...
...
@@ -274,6 +274,15 @@
<
dict
-
tag
:
options
=
"dict.type.store_platform_type"
:
value
=
"scope.row.platformType"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"适用套餐"
align
=
"center"
prop
=
"packIds"
>
<
template
slot
-
scope
=
"scope"
>
<
div
v
-
if
=
"scope.row.packIds"
>
<
dict
-
tag
:
options
=
"packList"
:
value
=
"scope.row.packIds.split(',')"
/>
<
/div
>
<
/template
>
<
/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"
/>
...
...
@@ -329,6 +338,7 @@ import { listConsumer, getConsumer, delConsumer, addConsumer, updateConsumer } f
import
{
listDuration
}
from
"../../../api/system/coupon"
;
import
{
give
}
from
"../../../api/system/consumerCoupon"
;
import
moment
from
"moment"
;
import
{
query
}
from
'@/api/system/pack'
;
export
default
{
name
:
"Consumer"
,
...
...
@@ -397,8 +407,28 @@ export default {
}
,
created
()
{
this
.
getList
();
this
.
onPackList
();
}
,
methods
:
{
onPackList
()
{
query
().
then
(
res
=>
{
this
.
packList
=
res
.
data
.
map
(
obj
=>
{
return
{
...
obj
,
raw
:
{
dictSort
:
1
,
dictValue
:
"1"
,
listClass
:
"primary"
,
cssClass
:
''
}
,
value
:
obj
.
id
.
toString
(),
label
:
obj
.
name
,
}
}
)
this
.
$forceUpdate
();
this
.
getList
();
}
)
}
,
/** 查询会员用户列表 */
getList
()
{
this
.
loading
=
true
;
...
...
src/views/system/consumerCoupon/index.vue
View file @
ddf97a9f
...
...
@@ -57,16 +57,16 @@
/>
</el-select>
</el-form-item>
<
el-form-item
label=
"适用套餐"
prop=
"packageId"
>
<el-select
v-model=
"queryParams.packageId"
placeholder=
"请选择适用套餐"
clearable
>
<el-option
v-for=
"dict in packList"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/
>
</el-select
>
<
/el-form-item
>
<
!--
<el-form-item
label=
"适用套餐"
prop=
"packageId"
>
--
>
<!--
<el-select
v-model=
"queryParams.packageId"
placeholder=
"请选择适用套餐"
clearable
>
--
>
<!--
<el-option-->
<!-- v-for="dict in packList"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />--
>
<!--
</el-select>
--
>
<
!--
</el-form-item>
--
>
<el-form-item
label=
"使用状态"
prop=
"useStatus"
>
<el-select
v-model=
"queryParams.useStatus"
placeholder=
"请选择使用状态"
clearable
>
<el-option
...
...
@@ -198,10 +198,10 @@
<dict-tag
:options=
"dict.type.store_order_type"
:value=
"scope.row.orderType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"套餐"
align=
"center"
prop=
"packageId"
>
<el-table-column
label=
"
适用
套餐"
align=
"center"
prop=
"packageId"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.pack
ageId
"
>
<dict-tag
:options=
"packList"
:value=
"scope.row.pack
ageId
"
/>
<div
v-if=
"scope.row.pack
Ids
"
>
<dict-tag
:options=
"packList"
:value=
"scope.row.pack
Ids.split(',')
"
/>
</div>
</
template
>
</el-table-column>
...
...
src/views/system/coupon/durationIndex.vue
View file @
ddf97a9f
...
...
@@ -24,16 +24,16 @@
/>
</el-select>
</el-form-item>
<
el-form-item
label=
"适用套餐"
prop=
"packageId"
>
<el-select
v-model=
"queryParams.packageId"
placeholder=
"请选择适用套餐"
clearable
>
<el-option
v-for=
"dict in packList"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/
>
</el-select
>
<
/el-form-item
>
<
!--
<el-form-item
label=
"适用套餐"
prop=
"packageId"
>
--
>
<!--
<el-select
v-model=
"queryParams.packageId"
placeholder=
"请选择适用套餐"
clearable
>
--
>
<!--
<el-option-->
<!-- v-for="dict in packList"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />--
>
<!--
</el-select>
--
>
<
!--
</el-form-item>
--
>
<el-form-item
label=
"有效期开始"
prop=
"startDate"
>
<el-date-picker
clearable
...
...
@@ -132,11 +132,12 @@
<
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=
"packageId
"
>
<el-table-column
label=
"
适用套餐"
align=
"center"
prop=
"packIds
"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.pack
ageId
"
>
<dict-tag
:options=
"packList"
:value=
"scope.row.pack
ageId
"
/>
<div
v-if=
"scope.row.pack
Ids
"
>
<dict-tag
:options=
"packList"
:value=
"scope.row.pack
Ids.split(',')
"
/>
</div>
</
template
>
</el-table-column>
...
...
@@ -242,7 +243,7 @@
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"套餐"
prop
=
"packageId"
>
<
el
-
select
v
-
model
=
"form.pack
ageId"
placeholder
=
"请选择套餐"
clearable
>
<
el
-
select
v
-
model
=
"form.pack
Ids"
placeholder
=
"请选择套餐"
multiple
clearable
>
<
el
-
option
v
-
for
=
"dict in packList"
:
key
=
"dict.value"
...
...
@@ -431,7 +432,8 @@ export default {
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
remark
:
null
remark
:
null
,
packIds
:
[]
}
;
this
.
resetForm
(
"form"
);
}
,
...
...
@@ -480,6 +482,7 @@ export default {
if
(
this
.
form
.
weeks
)
{
this
.
weeks
=
this
.
form
.
weeks
.
split
(
","
)
}
this
.
form
.
packIds
=
this
.
form
.
packIds
?
this
.
form
.
packIds
.
split
(
","
)
:
[]
this
.
open
=
true
;
this
.
title
=
"修改优惠券"
;
}
);
...
...
@@ -491,6 +494,9 @@ export default {
if
(
this
.
weeks
.
length
)
{
this
.
form
.
weeks
=
this
.
weeks
.
join
();
}
if
(
this
.
form
.
packIds
.
length
)
{
this
.
form
.
packIds
=
this
.
form
.
packIds
.
join
();
}
if
(
this
.
form
.
id
!=
null
)
{
updateCoupon
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
...
...
src/views/system/coupon/index.vue
View file @
ddf97a9f
...
...
@@ -23,16 +23,16 @@
/>
</el-select>
</el-form-item>
<
el-form-item
label=
"适用套餐"
prop=
"packageId"
>
<el-select
v-model=
"queryParams.packageId"
placeholder=
"请选择适用套餐"
clearable
>
<el-option
v-for=
"dict in packList"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/
>
</el-select
>
<
/el-form-item
>
<
!--
<el-form-item
label=
"适用套餐"
prop=
"packageId"
>
--
>
<!--
<el-select
v-model=
"queryParams.packageId"
placeholder=
"请选择适用套餐"
clearable
>
--
>
<!--
<el-option-->
<!-- v-for="dict in packList"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />--
>
<!--
</el-select>
--
>
<
!--
</el-form-item>
--
>
<el-form-item
label=
"有效期开始"
prop=
"startDate"
>
...
...
@@ -127,10 +127,10 @@
<dict-tag
:options=
"dict.type.store_order_type"
:value=
"scope.row.orderType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"
套餐"
align=
"center"
prop=
"packageId
"
>
<el-table-column
label=
"
适用套餐"
align=
"center"
prop=
"packIds
"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.pack
ageId
"
>
<dict-tag
:options=
"packList"
:value=
"scope.row.pack
ageId
"
/>
<div
v-if=
"scope.row.pack
Ids
"
>
<dict-tag
:options=
"packList"
:value=
"scope.row.pack
Ids.split(',')
"
/>
</div>
</
template
>
</el-table-column>
...
...
@@ -251,7 +251,7 @@
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"套餐"
prop
=
"packageId"
>
<
el
-
select
v
-
model
=
"form.pack
ageId"
placeholder
=
"请选择套餐"
clearable
>
<
el
-
select
v
-
model
=
"form.pack
Ids"
placeholder
=
"请选择套餐"
multiple
clearable
>
<
el
-
option
v
-
for
=
"dict in packList"
:
key
=
"dict.value"
...
...
@@ -484,7 +484,8 @@ export default {
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
remark
:
null
remark
:
null
,
packIds
:
[]
}
;
this
.
resetForm
(
"form"
);
}
,
...
...
@@ -540,7 +541,7 @@ export default {
if
(
this
.
form
.
weeks
)
{
this
.
weeks
=
this
.
form
.
weeks
.
split
(
","
)
}
this
.
form
.
packIds
=
this
.
form
.
packIds
?
this
.
form
.
packIds
.
split
(
","
)
:
[]
this
.
open
=
true
;
this
.
title
=
"修改优惠券"
;
}
);
...
...
@@ -552,6 +553,9 @@ export default {
if
(
this
.
weeks
.
length
)
{
this
.
form
.
weeks
=
this
.
weeks
.
join
();
}
if
(
this
.
form
.
packIds
.
length
)
{
this
.
form
.
packIds
=
this
.
form
.
packIds
.
join
();
}
this
.
form
.
storeIds
=
this
.
form
.
storeIds
&&
this
.
form
.
storeIds
.
length
?
this
.
form
.
storeIds
.
join
()
:
''
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
platformType
===
"美团"
)
{
...
...
@@ -565,10 +569,13 @@ export default {
}
);
}
else
{
addCoupon
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
data
.
code
)
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
this
.
reset
();
}
}
);
}
}
...
...
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