Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
747a3e7f
Commit
747a3e7f
authored
Dec 13, 2020
by
滑稽刘
Committed by
Gitee
Dec 13, 2020
Browse files
修复编辑优惠券看不到 商品或类目列表的问题
parent
519d7b15
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-admin/src/views/promotion/coupon.vue
View file @
747a3e7f
...
...
@@ -447,7 +447,18 @@ export default {
},
handleUpdate
(
row
)
{
this
.
dataForm
=
Object
.
assign
({},
row
)
if
(
this
.
dataForm
.
goodsType
===
1
)
{
this
.
couponCategoryList
=
[]
for
(
let
i
=
0
,
len
=
row
.
goodsValue
.
length
;
i
<
len
;
i
++
)
{
this
.
couponCategoryList
.
push
(
this
.
getGoodsCategoryById
(
row
.
goodsValue
[
i
]))
}
}
if
(
this
.
dataForm
.
goodsType
===
2
)
{
this
.
couponGoodsList
=
[]
for
(
let
i
=
0
,
len
=
row
.
goodsValue
.
length
;
i
<
len
;
i
++
)
{
this
.
couponGoodsList
.
push
(
this
.
getGoodsById
(
row
.
goodsValue
[
i
]))
}
}
this
.
dialogStatus
=
'
update
'
this
.
dialogFormVisible
=
true
this
.
$nextTick
(()
=>
{
...
...
@@ -601,6 +612,19 @@ export default {
}
})
},
getGoodsCategoryById
(
id
)
{
let
name
let
parentName
for
(
let
i
=
0
;
i
<
this
.
goodsCategoryOptions
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
this
.
goodsCategoryOptions
[
i
].
children
.
length
;
j
++
)
{
if
(
this
.
goodsCategoryOptions
[
i
].
children
[
j
].
value
===
id
)
{
parentName
=
this
.
goodsCategoryOptions
[
i
].
label
name
=
this
.
goodsCategoryOptions
[
i
].
children
[
j
].
label
}
}
}
return
{
goodsCategoryId
:
id
,
goodsCategoryName
:
name
,
parentCategoryName
:
parentName
}
},
getGoodsCategoryByIds
(
ids
)
{
let
name
let
parentName
...
...
Write
Preview
Supports
Markdown
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