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 4829f2ed
authored
Jul 27, 2021
by
liwk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
9f3db0fa
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
20 deletions
package.json
src/components/equity-dialog/index.vue
src/views/equity/list/index.vue
src/views/tao/goods/addGoods/index.vue
src/views/tao/goods/index/index.vue
package.json
View file @
4829f2e
...
@@ -5,7 +5,8 @@
...
@@ -5,7 +5,8 @@
"scripts"
:
{
"scripts"
:
{
"serve"
:
"vue-cli-service serve --open"
,
"serve"
:
"vue-cli-service serve --open"
,
"build"
:
"vue-cli-service build"
,
"build"
:
"vue-cli-service build"
,
"lint"
:
"vue-cli-service lint"
"lint"
:
"vue-cli-service lint"
,
"dev"
:
"npm run serve"
},
},
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
"^0.18.0"
,
"axios"
:
"^0.18.0"
,
...
...
src/components/equity-dialog/index.vue
View file @
4829f2e
...
@@ -53,8 +53,8 @@
...
@@ -53,8 +53,8 @@
>
>
<el-option
<el-option
v-for=
"item in brandList"
v-for=
"item in brandList"
:key=
"item.brand
Id
"
:key=
"item.brand
Name
"
:value=
"item.brand
Id
"
:value=
"item.brand
Name
"
:label=
"item.brandName"
:label=
"item.brandName"
></el-option>
></el-option>
</el-select>
</el-select>
...
@@ -64,7 +64,10 @@
...
@@ -64,7 +64,10 @@
prop=
"appearance"
prop=
"appearance"
v-if=
"form.brandName"
v-if=
"form.brandName"
>
>
<el-select
v-model=
"form.appearance"
>
<el-select
v-model=
"form.appearance"
@
change=
"changeAppearance"
>
<el-option
<el-option
v-for=
"item in appearanceList"
v-for=
"item in appearanceList"
:key=
"item.value"
:key=
"item.value"
...
@@ -275,25 +278,25 @@ export default {
...
@@ -275,25 +278,25 @@ export default {
}
}
})
})
},
},
getAppearanceList
(
brandId
)
{
getAppearanceList
(
brandName
)
{
goodsEquityManageApi
.
getAppearanceList
({
brandId
}).
then
(({
data
})
=>
{
goodsEquityManageApi
.
getAppearanceList
({
brandName
}).
then
(({
data
})
=>
{
console
.
log
(
data
)
data
.
map
(
i
=>
i
.
label
=
{
1
:
'卡券'
,
2
:
'直充'
}[
i
.
appearance
])
data
.
map
(
i
=>
i
.
label
=
{
1
:
'卡券'
,
2
:
'直充'
}[
i
.
appearance
])
this
.
appearanceList
=
data
this
.
appearanceList
=
data
this
.
form
.
appearance
=
''
this
.
form
.
appearance
=
''
})
})
},
},
changeAppearance
(
e
)
{
console
.
log
(
this
.
appearanceList
)
this
.
appearanceList
.
map
(
i
=>
{
if
(
i
.
label
==
e
)
this
.
form
.
brandId
=
i
.
brandId
})
},
changeBrandName
(
e
)
{
changeBrandName
(
e
)
{
this
.
form
.
brandId
=
e
this
.
getAppearanceList
(
e
)
this
.
getAppearanceList
(
e
)
this
.
brandList
.
map
(
i
=>
{
if
(
i
.
brandId
==
e
)
{
this
.
form
.
brandName
=
i
.
brandName
this
.
form
.
equityName
=
i
.
brandName
}
})
},
},
submit
(
type
)
{
submit
(
type
)
{
console
.
log
(
this
.
form
)
let
{
form
,
isEdit
}
=
this
let
{
form
,
isEdit
}
=
this
let
target
=
type
==
1
?
carEquityManageApi
:
goodsEquityManageApi
let
target
=
type
==
1
?
carEquityManageApi
:
goodsEquityManageApi
this
.
$refs
.
ruleForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
ruleForm
.
validate
((
valid
)
=>
{
...
@@ -304,7 +307,7 @@ export default {
...
@@ -304,7 +307,7 @@ export default {
}
}
let
apiName
=
'createEquity'
let
apiName
=
'createEquity'
if
(
isEdit
)
apiName
=
'updateEquity'
if
(
isEdit
)
apiName
=
'updateEquity'
console
.
log
(
this
.
form
)
target
[
apiName
](
this
.
form
).
then
(({
code
,
data
,
message
})
=>
{
target
[
apiName
](
this
.
form
).
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
0
)
{
if
(
code
==
0
)
{
this
.
close
()
this
.
close
()
...
...
src/views/equity/list/index.vue
View file @
4829f2e
...
@@ -143,7 +143,7 @@ export default {
...
@@ -143,7 +143,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
//
this.init()
this
.
init
()
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
...
...
src/views/tao/goods/addGoods/index.vue
View file @
4829f2e
...
@@ -345,13 +345,13 @@ export default {
...
@@ -345,13 +345,13 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getListWithPageOutGoods
()
this
.
$root
.
eventBus
.
$on
(
'params'
,
({
id
,
edit
})
=>
{
this
.
$root
.
eventBus
.
$on
(
'params'
,
({
id
,
edit
})
=>
{
console
.
log
({
id
,
edit
})
console
.
log
({
id
,
edit
})
if
(
id
)
{
if
(
id
)
{
this
.
getEquityGoodsById
(
id
)
this
.
getEquityGoodsById
(
id
)
this
.
isEdit
=
!
edit
this
.
isEdit
=
!
edit
}
else
{
}
else
{
this
.
getListWithPageOutGoods
()
this
.
isNewGoods
=
true
this
.
isNewGoods
=
true
}
}
})
})
...
@@ -380,7 +380,8 @@ export default {
...
@@ -380,7 +380,8 @@ export default {
})
})
},
},
getListWithPageOutGoods
()
{
getListWithPageOutGoods
()
{
orderApi
.
getListWithPageOutGoods
().
then
(({
code
,
data
:
{
list
}
})
=>
{
let
{
appearance
}
=
this
.
ruleForm
orderApi
.
getListWithPageOutGoods
({
appearance
}).
then
(({
code
,
data
:
{
list
}
})
=>
{
if
(
code
==
0
)
{
if
(
code
==
0
)
{
this
.
brandNameList
=
list
this
.
brandNameList
=
list
}
}
...
@@ -446,7 +447,9 @@ export default {
...
@@ -446,7 +447,9 @@ export default {
this
.
ruleForm
.
goodsImage
=
''
this
.
ruleForm
.
goodsImage
=
''
},
},
changeAppearance
()
{
changeAppearance
()
{
this
.
getListWithPageOutGoods
()
this
.
$refs
.
ruleForm
.
resetFields
()
this
.
$refs
.
ruleForm
.
resetFields
()
},
},
onSubmit
(
flag
)
{
onSubmit
(
flag
)
{
this
.
ruleForm
.
insertOperationType
=
flag
==
'save'
?
0
:
1
this
.
ruleForm
.
insertOperationType
=
flag
==
'save'
?
0
:
1
...
...
src/views/tao/goods/index/index.vue
View file @
4829f2e
...
@@ -226,7 +226,8 @@ export default {
...
@@ -226,7 +226,8 @@ export default {
]
]
},
},
goodsBrandList
:
[]
goodsBrandList
:
[],
selectStatus
:
false
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -279,8 +280,9 @@ export default {
...
@@ -279,8 +280,9 @@ export default {
toggleAll
()
{
toggleAll
()
{
let
{
goodsIndexMutiTable
}
=
this
.
$refs
.
table
.
$refs
let
{
goodsIndexMutiTable
}
=
this
.
$refs
.
table
.
$refs
let
{
data
}
=
goodsIndexMutiTable
let
{
data
}
=
goodsIndexMutiTable
this
.
selectStatus
=
!
this
.
selectStatus
data
.
map
(
row
=>
{
data
.
map
(
row
=>
{
goodsIndexMutiTable
.
toggleRowSelection
(
row
)
goodsIndexMutiTable
.
toggleRowSelection
(
row
,
this
.
selectStatus
)
})
})
},
},
// ['待上架', '上架', '下架'] //
// ['待上架', '上架', '下架'] //
...
...
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