Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
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
hooloo
web
soss
Commits
5d3532aa
Commit
5d3532aa
authored
Jul 29, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优惠券回显
parent
6d04ed6a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
20 deletions
+44
-20
src/views/coupon/coupon/index.vue
+44
-20
No files found.
src/views/coupon/coupon/index.vue
View file @
5d3532aa
...
...
@@ -35,7 +35,6 @@
v-hasPermi=
"['coupon:coupon:add']"
>
赠送
</el-button>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"couponList"
>
<el-table-column
label=
"优惠券名称"
align=
"center"
prop=
"name"
>
<template
slot-scope=
"scope"
>
...
...
@@ -246,7 +245,9 @@ export default {
shopIds
:[],
area
:[],
city
:[],
province
:[]
province
:[],
userLimit
:
null
,
daysLimit
:
null
},
// 表单校验
rules
:
{
...
...
@@ -429,9 +430,9 @@ export default {
this
.
queryParams
.
state
=
null
;
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
form
.
sendMsgTag
=
2
this
.
open
=
true
;
this
.
title
=
"新增优惠券"
;
...
...
@@ -465,6 +466,7 @@ export default {
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"修改优惠券"
;
this
.
getShopRangeList
();
...
...
@@ -476,7 +478,7 @@ export default {
this
.
form
.
name
=
response
.
data
.
name
;
this
.
form
.
categoryId
=
response
.
data
.
categoryId
;
this
.
type
=
response
.
data
.
type
;
if
(
this
.
type
==
"1"
){
if
(
this
.
type
==
1
){
this
.
liJian
=
response
.
data
.
priceDiscount
;
if
(
response
.
data
.
priceLimit
==
0
){
this
.
firstRadioValue
=
1
;
...
...
@@ -484,14 +486,14 @@ export default {
this
.
firstRadioValue
=
2
;
this
.
priceLimit
=
response
.
data
.
priceLimit
;
}
}
else
if
(
this
.
type
==
"2"
){
}
else
if
(
this
.
type
==
2
){
this
.
jiZhe
=
response
.
data
.
priceDiscount
;
if
(
response
.
data
.
orderLimit
){
this
.
twoRadioValue
=
3
;
}
else
{
this
.
twoRadioValue
=
4
;
}
}
else
if
(
this
.
type
==
"3"
){
}
else
if
(
this
.
type
==
3
){
this
.
twoRadioValue
=
3
;
if
(
response
.
data
.
priceLimit
==
0
){
this
.
firstRadioValue
=
1
;
...
...
@@ -511,14 +513,29 @@ export default {
this
.
form
.
relativeTime
=
response
.
data
.
relativeTime
;
this
.
form
.
receivableTime
=
response
.
data
.
receivableTime
;
this
.
form
.
weekLimit
=
response
.
data
.
weekLimit
;
//适用范围分品类
if
(
response
.
data
.
categoryIds
.
length
>
0
){
if
(
response
.
data
.
categoryIds
[
0
]
==
'0'
){
this
.
shopRange
=
[
0
];
}
else
{
console
.
log
(
"response.data.categoryIds"
,
response
.
data
.
categoryIds
[
0
]);
this
.
shopRange
=
[
1
,
"49"
]
let
sr_ary
=
new
Array
();
for
(
let
i
=
0
;
i
<
response
.
data
.
categoryIds
.
length
;
i
++
){
sr_ary
.
push
([
1
,
response
.
data
.
categoryIds
[
i
]])
}
this
.
shopRange
=
sr_ary
;
}
}
//适用范围商品
if
(
response
.
data
.
shopIds
!=
null
){
let
sh_ary
=
new
Array
();
for
(
let
i
=
0
;
i
<
response
.
data
.
shopIds
.
length
;
i
++
){
sh_ary
.
push
([
1
,
response
.
data
.
shopIds
[
i
]])
}
this
.
shopRange
=
sh_ary
;
}
//省市区门店
}
...
...
@@ -574,7 +591,6 @@ export default {
this
.
form
.
useEndTime
=
this
.
form
.
times
[
1
]
}
//适用下拉商品类范围
console
.
log
(
"this.shopRange"
,
this
.
shopRange
);
if
(
this
.
shopRange
.
length
>
0
){
let
cateList
=
[];
let
goodSList
=
[];
...
...
@@ -686,17 +702,25 @@ export default {
}
});
},
// reset(){
// this.form.id=null;
// this.form.name=null;
// this.form.categoryId=null;
// this.form.categoryIds=null;
// this.form.userNumber=null,
// this.form.times=null;
// this.form.relativeTime=null;
// this.form.receivableTime=null;
// this.form.weekLimit=null;
// }
reset
(){
this
.
form
.
id
=
null
;
this
.
form
.
name
=
null
;
this
.
form
.
categoryId
=
null
;
this
.
form
.
categoryIds
=
[];
this
.
form
.
userNumber
=
null
,
this
.
form
.
times
=
[];
this
.
form
.
relativeTime
=
null
;
this
.
form
.
receivableTime
=
null
;
this
.
form
.
weekLimit
=
[];
this
.
firstRadioValue
=
null
;
this
.
twoRadioValue
=
null
;
this
.
jiZhe
=
""
;
this
.
liJian
=
""
;
this
.
shopRange
=
[];
this
.
form
.
daysLimit
=
null
;
this
.
form
.
userLimit
=
null
;
this
.
priceLimit
=
""
;
}
},
};
</
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