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 5f384ff7
authored
Oct 29, 2021
by
zhouzy
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
改bug
1 parent
b082e2f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
88 deletions
src/views/customer/rightsCardManagement/index.vue
src/views/equity/list/index.vue
src/views/customer/rightsCardManagement/index.vue
View file @
5f384ff
...
...
@@ -651,6 +651,8 @@ export default {
this
.
isAdd
=
cd
console
.
log
(
this
.
isAdd
)
this
.
ruleForm
=
{}
this
.
tryNum
=
''
this
.
value
=
false
setTimeout
(()
=>
{
this
.
clearStyle
()
},
20
)
...
...
@@ -715,6 +717,8 @@ export default {
this
.
dialogVisible
=
false
this
.
effectiveNum
=
''
this
.
isAdd
=
false
this
.
value
=
false
this
.
tryNum
=
''
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
,
...
...
src/views/equity/list/index.vue
View file @
5f384ff
...
...
@@ -3,10 +3,7 @@
<div
class=
"box"
>
<div
class=
"equity-title"
>
汽车权益
</div>
<div
class=
"add-box"
>
<el-button
type=
"primary"
@
click=
"addEquity(1)"
>
添加
</el-button>
<el-button
type=
"primary"
@
click=
"addEquity(1)"
>
添加
</el-button>
</div>
<div
class=
"table-box"
>
<d2-table
...
...
@@ -16,32 +13,21 @@
:hasPage=
"false"
:hasNum=
"false"
>
<div
slot=
"mainPageFlag"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"carsDisplay(scope.scope)"
>
{{
scope
.
scope
.
mainPageFlag
==
1
?
'取消首页展示'
:
'首页展示'
}}
</el-button>
<div
slot=
"mainPageFlag"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"carsDisplay(scope.scope)"
>
{{
scope
.
scope
.
mainPageFlag
==
1
?
'取消首页展示'
:
'首页展示'
}}
</el-button>
</div>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"editEquity(scope.scope,1)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"updateShelves(scope.scope, 'car')"
>
{{
scope
.
scope
.
status
==
0
?
'上架'
:
'下架'
}}
</el-button>
<el-button
type=
"text"
@
click=
"setTop(scope.scope.id,'car')"
>
置顶
</el-button>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"editEquity(scope.scope, 1)"
>
编辑
</el-button
>
<el-button
type=
"text"
@
click=
"updateShelves(scope.scope, 'car')"
>
{{
scope
.
scope
.
status
==
0
?
'上架'
:
'下架'
}}
</el-button>
<el-button
type=
"text"
@
click=
"setTop(scope.scope.id, 'car')"
>
置顶
</el-button
>
</span>
</d2-table>
</div>
...
...
@@ -49,12 +35,12 @@
<div
class=
"box"
>
<div
class=
"equity-title"
>
商品权益
</div>
<div
class=
"tags-box"
>
<template
v-for=
"(item,index) in tags"
>
<template
v-for=
"(item,
index) in tags"
>
<el-tag
:key=
"index"
effect=
"dark"
:type=
"item.active ? ''
:
'info'"
@
click
.
native=
"changeGoodsCategory(
{
id:item.id,index
})"
:type=
"item.active ? ''
:
'info'"
@
click
.
native=
"changeGoodsCategory(
{
id: item.id, index
})"
:ref="`tag-${index}`"
@dblclick.native="showInput(index, item.goodsCategory)"
>
...
...
@@ -62,18 +48,17 @@
class=
"del el-icon-error"
@
click
.
stop=
"categoryDelete(item.id)"
></i>
{{
item
.
goodsCategory
}}
{{
item
.
goodsCategory
}}
<el-input
class=
"input-tag"
v-model=
"inputValue"
:ref=
"`tag-input-$
{index}`"
size="small"
@keyup.enter.native="changeTagName({
id:item.id,index
})"
@blur="changeTagName({
id:item.id,index
})"
@keyup.enter.native="changeTagName({
id: item.id, index
})"
@blur="changeTagName({
id: item.id, index
})"
>
</el-input>
</el-tag>
</
template
>
<el-input
class=
"input-new-tag"
...
...
@@ -86,18 +71,12 @@
maxlength=
"8"
>
</el-input>
<el-button
class=
"addTag"
size=
"small"
@
click=
"showAddInput"
v-else
>
添加分类
</el-button>
<el-button
class=
"addTag"
size=
"small"
@
click=
"showAddInput"
v-else
>
添加分类
</el-button
>
</div>
<div
class=
"add-box"
>
<el-button
type=
"primary"
@
click=
"addEquity(2)"
>
添加
</el-button>
<el-button
type=
"primary"
@
click=
"addEquity(2)"
>
添加
</el-button>
</div>
<div
class=
"table-box"
>
<d2-table
...
...
@@ -107,32 +86,23 @@
:hasPage=
"false"
:hasNum=
"false"
>
<div
slot=
"mainPageFlag"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"goodsDisplay(scope.scope)"
>
{{scope.scope.mainPageFlag==1?'取消首页展示':'首页展示'}}
</el-button>
<div
slot=
"mainPageFlag"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"goodsDisplay(scope.scope)"
>
{{
scope.scope.mainPageFlag == 1 ? '取消首页展示' : '首页展示'
}}
</el-button>
</div>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<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>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"editEquity(scope.scope, 2)"
>
编辑
</el-button
>
<el-button
type=
"text"
@
click=
"setTop(scope.scope.id,'goods')"
>
置顶
</el-button>
@
click=
"updateShelves(scope.scope, 'goods')"
>
{{ scope.scope.status == 0 ? '上架' : '下架' }}
</el-button
>
<el-button
type=
"text"
@
click=
"setTop(scope.scope.id, 'goods')"
>
置顶
</el-button
>
</span>
</d2-table>
</div>
...
...
@@ -151,53 +121,59 @@ import { goodsEquityManageApi, carEquityManageApi } from '@api/api'
export
default
{
name
:
''
,
mixins
:
[
carMixin
,
goodsMixin
],
data
()
{
data
()
{
return
{
showDialog
:
false
,
isEdit
:
false
,
dialogType
:
1
,
editData
:
{}
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
)
=>
{
this
.
getCarList
()
})
}
else
{
carEquityManageApi
.
cardsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
0
})
.
then
(
res
=>
{
})
.
then
((
res
)
=>
{
this
.
getCarList
()
})
}
this
.
getCarList
()
},
/*改变商品展示状态 */
goodsDisplay
(
row
)
{
goodsDisplay
(
row
)
{
if
(
row
.
mainPageFlag
==
0
)
{
goodsEquityManageApi
.
goodsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
1
})
.
then
(
res
=>
{
})
.
then
((
res
)
=>
{
this
.
getCategoryList
()
})
}
else
{
goodsEquityManageApi
.
goodsDisplay
({
id
:
row
.
id
,
mainPageFlag
:
0
})
.
then
(
res
=>
{
})
.
then
((
res
)
=>
{
this
.
getCategoryList
()
})
}
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
)
{
...
...
@@ -208,12 +184,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
=
()
=>
{
...
...
@@ -231,15 +207,15 @@ export default {
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
center
:
true
center
:
true
,
}).
then
(()
=>
{
callBack
()
})
}
else
{
callBack
()
}
}
}
}
,
}
,
}
</
script
>
<
style
src=
"@a/css/tao.css"
>
...
...
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