Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
0481d232
Commit
0481d232
authored
Sep 20, 2022
by
Marcus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台-品牌管理-添加品牌错误
http://zentao.jdshangmen.com/bug-view-489.html
parent
cc84e62b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
index.vue
src/views/ecw/productBrank/BrandForm/index.vue
+16
-3
index.vue
src/views/ecw/productBrank/index.vue
+6
-3
No files found.
src/views/ecw/productBrank/BrandForm/index.vue
View file @
0481d232
...
...
@@ -8,7 +8,7 @@
<el-input
v-model=
"form.brandName"
placeholder=
"商标"
></el-input>
</el-form-item>
<el-form-item
:label=
"`商标$
{index + 1}分类`">
<el-select
v-model=
"form.productTypeId"
:placeholder=
"`请选择商标$
{index + 1}分类`" @change="form.productIds = [], updateValue()">
<el-select
v-model=
"form.productTypeId"
:placeholder=
"`请选择商标$
{index + 1}分类`" @change="form.productIds = [
0
], updateValue()">
<el-option
v-for=
"item in productTypeList"
:key=
"item.id"
...
...
@@ -19,7 +19,7 @@
</el-select>
</el-form-item>
<el-form-item
:label=
"`商标$
{index + 1}商品`">
<el-select
v-model=
"form.productIds"
:placeholder=
"`请选择商标$
{index + 1}商品`" multiple filterable @change="updateValue">
<el-select
v-model=
"form.productIds"
:placeholder=
"`请选择商标$
{index + 1}商品`" multiple filterable
clearable
@change="updateValue">
<el-option
v-for=
"item in getProductListByTypeId(form.productTypeId)"
:key=
"item.id"
...
...
@@ -73,9 +73,22 @@ export default {
},
methods
:
{
getProductListByTypeId
(
typeId
)
{
return
typeId
===
0
?
[]
:
this
.
productList
.
filter
((
p
)
=>
p
.
typeId
===
typeId
)
return
[
{
id
:
0
,
titleZh
:
'
全部
'
},
...(
typeId
===
0
?
[]
:
this
.
productList
.
filter
((
p
)
=>
p
.
typeId
===
typeId
))
]
},
// 删除商品0
delete0
(){
if
(
this
.
form
.
productIds
.
length
>
1
){
const
index
=
this
.
form
.
productIds
.
indexOf
(
0
)
if
(
index
!==
-
1
)
{
this
.
form
.
productIds
.
splice
(
index
,
1
)
}
}
},
updateValue
()
{
this
.
delete0
()
const
trademarkCategoryRelList
=
[]
this
.
form
.
productIds
.
forEach
(
productId
=>
{
trademarkCategoryRelList
.
push
({
...
...
src/views/ecw/productBrank/index.vue
View file @
0481d232
...
...
@@ -124,7 +124,7 @@
trademarkCategoryRelList: []
})"
>
添加商标
</el-button>
<div
slot=
"footer"
class=
"dialog-foo
ter"
>
<div
slot=
"footer"
style=
"text-align: cen
ter"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
...
...
@@ -143,7 +143,6 @@ import {getProductList} from "@/api/ecw/product"
import
BrandForm
from
"
@/views/ecw/productBrank/BrandForm
"
import
Empower
from
"
@/views/ecw/productBrank/Empower
"
export
default
{
name
:
"
ProductBrank
"
,
components
:
{
...
...
@@ -182,6 +181,10 @@ export default {
form
:
{},
// 表单校验
rules
:
{
titleZh
:
[{
required
:
true
,
message
:
'
请输入品牌中文标题
'
,
trigger
:
"
blur
"
}],
titleEn
:
[{
required
:
true
,
message
:
'
请输入品牌英文标题
'
,
trigger
:
"
blur
"
}],
// aorder: [{ required: true, message: '请输入排序', trigger: "blur" }],
filing
:
[{
required
:
true
,
message
:
'
请选择是否备案
'
,
trigger
:
"
change
"
}],
},
recordStatus
:
getDictDatas
(
DICT_TYPE
.
BRAND_REG_TYPE
),
...
...
@@ -196,7 +199,7 @@ export default {
created
()
{
this
.
getList
();
getProductTypeList
().
then
(
r
=>
{
this
.
productTypeList
=
r
.
data
this
.
productTypeList
=
[{
id
:
0
,
titleZh
:
'
全部
'
},
...
r
.
data
]
})
getProductList
().
then
(
r
=>
{
this
.
productList
=
r
.
data
...
...
Write
Preview
Markdown
is supported
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