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
36fde3cc
Commit
36fde3cc
authored
Sep 28, 2022
by
Marcus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品牌管理-最后一个商标不能删除
http://zentao.jdshangmen.com/bug-view-692.html
parent
d51359b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
14 deletions
+24
-14
index.vue
src/views/ecw/productBrank/BrandForm/index.vue
+5
-1
index.vue
src/views/ecw/productBrank/index.vue
+19
-13
No files found.
src/views/ecw/productBrank/BrandForm/index.vue
View file @
36fde3cc
...
...
@@ -2,7 +2,7 @@
<el-form
ref=
"form"
:model=
"form"
label-width=
"80px"
>
<el-card
class=
"box-card"
style=
"margin-bottom: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
@
click=
"$emit('delete')"
>
删除
</el-button>
<el-button
v-show=
"isShowDelete"
style=
"float: right; padding: 3px 0"
type=
"text"
@
click=
"$emit('delete')"
>
删除
</el-button>
</div>
<el-form-item
:label=
"'商标' + (index + 1)"
>
<el-input
v-model=
"form.brandName"
placeholder=
"商标"
></el-input>
...
...
@@ -37,6 +37,10 @@
export
default
{
name
:
"
BrandForm
"
,
props
:
{
isShowDelete
:
{
type
:
Boolean
,
default
:
true
},
productTypeList
:
{
type
:
Array
,
default
:
[]
...
...
src/views/ecw/productBrank/index.vue
View file @
36fde3cc
...
...
@@ -110,6 +110,7 @@
<h3>
包含商标列表
</h3>
<brand-form
:is-show-delete=
"form.trademarkList.length > 1"
v-for=
"(item, index) in form.trademarkList"
v-model=
"form.trademarkList[index]"
:index=
"index"
...
...
@@ -119,9 +120,9 @@
@
delete=
"form.trademarkList.splice(index, 1)"
></brand-form>
<el-button
type=
"primary"
@
click=
"form.trademarkList.push({
brandName:
''
,
brandName:
form.titleZh
,
productBrandId: form.id,
trademarkCategoryRelList: []
trademarkCategoryRelList: [
{productCategoryId:0, productId:0}
]
})"
>
添加商标
</el-button>
<div
slot=
"footer"
style=
"text-align: center"
>
...
...
@@ -287,21 +288,26 @@ export default {
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateProductBrank
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
if
(
this
.
form
.
trademarkList
?.
length
>
0
){
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateProductBrank
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createProductBrank
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
else
{
this
.
$modal
.
alert
(
'
请至少添加一个商标
'
)
}
// 添加的提交
createProductBrank
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
...
...
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