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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
src/views/equity/list/index.vue
src/views/equity/list/index.vue
View file @
df5f053
...
@@ -123,6 +123,10 @@
...
@@ -123,6 +123,10 @@
>
>
<el-button
<el-button
type=
"text"
type=
"text"
@
click=
"editEquity(scope.scope,2)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"updateShelves(scope.scope,'goods')"
@
click=
"updateShelves(scope.scope,'goods')"
>
{{scope.scope.status == 0?'上架':'下架'}}
</el-button>
>
{{scope.scope.status == 0?'上架':'下架'}}
</el-button>
<el-button
<el-button
...
@@ -147,7 +151,7 @@ import { goodsEquityManageApi, carEquityManageApi } from '@api/api'
...
@@ -147,7 +151,7 @@ import { goodsEquityManageApi, carEquityManageApi } from '@api/api'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
mixins
:
[
carMixin
,
goodsMixin
],
mixins
:
[
carMixin
,
goodsMixin
],
data
()
{
data
()
{
return
{
return
{
showDialog
:
false
,
showDialog
:
false
,
isEdit
:
false
,
isEdit
:
false
,
...
@@ -155,45 +159,45 @@ export default {
...
@@ -155,45 +159,45 @@ export default {
editData
:
{}
editData
:
{}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
init
()
this
.
init
()
},
},
methods
:
{
methods
:
{
/*更改汽车展示状态 */
/*更改汽车展示状态 */
carsDisplay
(
row
)
{
carsDisplay
(
row
)
{
if
(
row
.
mainPageFlag
==
0
)
{
if
(
row
.
mainPageFlag
==
0
)
{
carEquityManageApi
carEquityManageApi
.
cardsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
1
})
.
cardsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
1
})
.
then
(
res
=>
{})
.
then
(
res
=>
{
})
}
else
{
}
else
{
carEquityManageApi
carEquityManageApi
.
cardsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
0
})
.
cardsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
0
})
.
then
(
res
=>
{})
.
then
(
res
=>
{
})
}
}
this
.
getCarList
()
this
.
getCarList
()
},
},
/*改变商品展示状态 */
/*改变商品展示状态 */
goodsDisplay
(
row
)
{
goodsDisplay
(
row
)
{
if
(
row
.
mainPageFlag
==
0
)
{
if
(
row
.
mainPageFlag
==
0
)
{
goodsEquityManageApi
goodsEquityManageApi
.
goodsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
1
})
.
goodsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
1
})
.
then
(
res
=>
{})
.
then
(
res
=>
{
})
}
else
{
}
else
{
goodsEquityManageApi
goodsEquityManageApi
.
goodsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
0
})
.
goodsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
0
})
.
then
(
res
=>
{})
.
then
(
res
=>
{
})
}
}
this
.
getCategoryList
()
this
.
getCategoryList
()
},
},
init
()
{
init
()
{
this
.
getCarList
()
this
.
getCarList
()
this
.
getCategoryList
()
this
.
getCategoryList
()
},
},
addEquity
(
type
)
{
addEquity
(
type
)
{
this
.
dialogType
=
type
this
.
dialogType
=
type
this
.
showDialog
=
true
this
.
showDialog
=
true
},
},
setTop
(
id
,
type
)
{
setTop
(
id
,
type
)
{
let
target
=
type
==
'car'
?
carEquityManageApi
:
goodsEquityManageApi
let
target
=
type
==
'car'
?
carEquityManageApi
:
goodsEquityManageApi
target
.
setTop
({
id
}).
then
(({
code
,
message
})
=>
{
target
.
setTop
({
id
}).
then
(({
code
,
message
})
=>
{
if
(
code
==
0
)
{
if
(
code
==
0
)
{
...
@@ -204,12 +208,12 @@ export default {
...
@@ -204,12 +208,12 @@ export default {
}
}
})
})
},
},
editEquity
(
data
,
type
)
{
editEquity
(
data
,
type
)
{
this
.
editData
=
data
this
.
editData
=
data
this
.
isEdit
=
true
this
.
isEdit
=
true
this
.
addEquity
(
type
)
this
.
addEquity
(
type
)
},
},
updateShelves
({
id
,
status
},
type
)
{
updateShelves
({
id
,
status
},
type
)
{
let
target
=
type
==
'car'
?
carEquityManageApi
:
goodsEquityManageApi
let
target
=
type
==
'car'
?
carEquityManageApi
:
goodsEquityManageApi
status
=
status
==
1
?
0
:
1
status
=
status
==
1
?
0
:
1
const
callBack
=
()
=>
{
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