Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-dj-oss-equity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit df5f0538
authored
Oct 25, 2021
by
liwk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
权益商品编辑
1 parent
8776a17a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
src/views/equity/list/index.vue
src/views/equity/list/index.vue
View file @
df5f053
...
...
@@ -16,7 +16,7 @@
:hasPage=
"false"
:hasNum=
"false"
>
<div
<div
slot=
"mainPageFlag"
slot-scope=
"scope"
>
...
...
@@ -123,6 +123,10 @@
>
<el-button
type=
"text"
@
click=
"editEquity(scope.scope,2)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"updateShelves(scope.scope,'goods')"
>
{{scope.scope.status == 0?'上架':'下架'}}
</el-button>
<el-button
...
...
@@ -147,7 +151,7 @@ import { goodsEquityManageApi, carEquityManageApi } from '@api/api'
export
default
{
name
:
''
,
mixins
:
[
carMixin
,
goodsMixin
],
data
()
{
data
()
{
return
{
showDialog
:
false
,
isEdit
:
false
,
...
...
@@ -155,45 +159,45 @@ export default {
editData
:
{}
}
},
mounted
()
{
mounted
()
{
this
.
init
()
},
methods
:
{
/*更改汽车展示状态 */
carsDisplay
(
row
)
{
carsDisplay
(
row
)
{
if
(
row
.
mainPageFlag
==
0
)
{
carEquityManageApi
.
cardsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
1
})
.
then
(
res
=>
{})
.
then
(
res
=>
{
})
}
else
{
carEquityManageApi
.
cardsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
0
})
.
then
(
res
=>
{})
.
then
(
res
=>
{
})
}
this
.
getCarList
()
},
/*改变商品展示状态 */
goodsDisplay
(
row
)
{
goodsDisplay
(
row
)
{
if
(
row
.
mainPageFlag
==
0
)
{
goodsEquityManageApi
.
goodsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
1
})
.
then
(
res
=>
{})
.
then
(
res
=>
{
})
}
else
{
goodsEquityManageApi
.
goodsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
0
})
.
then
(
res
=>
{})
.
then
(
res
=>
{
})
}
this
.
getCategoryList
()
},
init
()
{
init
()
{
this
.
getCarList
()
this
.
getCategoryList
()
},
addEquity
(
type
)
{
addEquity
(
type
)
{
this
.
dialogType
=
type
this
.
showDialog
=
true
},
setTop
(
id
,
type
)
{
setTop
(
id
,
type
)
{
let
target
=
type
==
'car'
?
carEquityManageApi
:
goodsEquityManageApi
target
.
setTop
({
id
}).
then
(({
code
,
message
})
=>
{
if
(
code
==
0
)
{
...
...
@@ -204,12 +208,12 @@ export default {
}
})
},
editEquity
(
data
,
type
)
{
editEquity
(
data
,
type
)
{
this
.
editData
=
data
this
.
isEdit
=
true
this
.
addEquity
(
type
)
},
updateShelves
({
id
,
status
},
type
)
{
updateShelves
({
id
,
status
},
type
)
{
let
target
=
type
==
'car'
?
carEquityManageApi
:
goodsEquityManageApi
status
=
status
==
1
?
0
:
1
const
callBack
=
()
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment