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
b9d9c73d
Commit
b9d9c73d
authored
Jun 26, 2022
by
Marcus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品牌管理多商标,部分授权客户
parent
d07eab51
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
190 additions
and
8 deletions
+190
-8
productBrandEmpower.js
src/api/ecw/productBrandEmpower.js
+18
-0
index.vue
src/views/ecw/productBrank/BrandForm/index.vue
+12
-6
index.vue
src/views/ecw/productBrank/Empower/index.vue
+136
-0
index.vue
src/views/ecw/productBrank/index.vue
+24
-2
No files found.
src/api/ecw/productBrandEmpower.js
View file @
b9d9c73d
...
...
@@ -34,6 +34,24 @@ export function getProductBrandEmpower(id) {
})
}
// 获得商品品牌已授权分页
export
function
getProductBrandEmpowerPageAuth
(
query
)
{
return
request
({
url
:
'
/ecw/product-brand-empower/page/auth
'
,
method
:
'
get
'
,
params
:
query
})
}
// 获得商品品牌未授权分页
export
function
getProductBrandEmpowerPageUnauth
(
query
)
{
return
request
({
url
:
'
/ecw/product-brand-empower/page/unauth
'
,
method
:
'
get
'
,
params
:
query
})
}
// 获得商品品牌授权分页
export
function
getProductBrandEmpowerPage
(
query
)
{
return
request
({
...
...
src/views/ecw/productBrank/BrandForm/index.vue
View file @
b9d9c73d
...
...
@@ -3,7 +3,7 @@
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
卡片名称
</span>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
>
操作按钮
</el-button>
<el-button
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>
...
...
@@ -36,7 +36,7 @@
<
script
>
export
default
{
name
:
"
index
"
,
name
:
"
BrandForm
"
,
props
:
{
productTypeList
:
{
type
:
Array
,
...
...
@@ -69,6 +69,9 @@ export default {
}
}
},
mounted
()
{
this
.
updateForm
(
this
.
value
)
},
methods
:
{
getProductListByTypeId
(
typeId
)
{
return
typeId
===
0
?
[]
:
this
.
productList
.
filter
((
p
)
=>
p
.
typeId
===
typeId
)
...
...
@@ -87,10 +90,8 @@ export default {
productBrandId
:
this
.
form
.
productBrandId
,
trademarkCategoryRelList
})
}
},
watch
:
{
value
(
e
)
{
},
updateForm
(
e
){
if
(
!!
e
){
this
.
form
.
brandName
=
e
.
brandName
this
.
form
.
id
=
e
.
id
...
...
@@ -104,6 +105,11 @@ export default {
}
}
}
},
watch
:
{
value
(
e
)
{
this
.
updateForm
(
e
)
}
}
}
</
script
>
...
...
src/views/ecw/productBrank/Empower/index.vue
0 → 100644
View file @
b9d9c73d
<
template
>
<div>
<el-dialog
:title=
"brandName"
:visible.sync=
"dialogVisible"
width=
"900px"
:before-close=
"handleClose()"
>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
label=
"未授权客户"
name=
"first"
>
<el-form
:inline=
"true"
class=
"demo-form-inline"
>
<el-form-item
label=
"关键字"
>
<el-input
v-model=
"customerKey"
placeholder=
"审批人"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"filterCustomer"
>
查询
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"list1"
style=
"width: 100%"
>
<el-table-column
prop=
"customerName"
label=
"客户名称"
>
</el-table-column>
<el-table-column
prop=
"phone"
label=
"客户号码"
>
</el-table-column>
<el-table-column
width=
"100px"
label=
"操作"
>
<template
v-slot=
"
{row}">
<el-button
type=
"primary"
size=
"mini"
>
添加
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"已授权客户"
name=
"second"
>
<el-table
:data=
"list2"
style=
"width: 100%"
>
<el-table-column
prop=
"customerName"
label=
"客户名称"
>
</el-table-column>
<el-table-column
prop=
"phone"
label=
"客户号码"
>
</el-table-column>
<el-table-column
width=
"100px"
label=
"操作"
>
<
template
v-slot=
"{row}"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleDelete(row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</template>
<
script
>
import
{
deleteProductBrandEmpower
,
getProductBrandEmpowerPageAuth
,
getProductBrandEmpowerPageUnauth
}
from
"
@/api/ecw/productBrandEmpower
"
export
default
{
name
:
"
Empower
"
,
props
:
{
id
:
{
type
:
Number
,
default
:
0
},
brandName
:
String
,
visible
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
dialogVisible
:
false
,
activeName
:
'
first
'
,
customerKey
:
''
,
list1
:
[],
list2
:
[]
}
},
created
()
{
},
methods
:
{
handleClose
()
{},
filterCustomer
()
{},
handleDelete
(
id
)
{
deleteProductBrandEmpower
(
id
).
then
(
r
=>
{
this
.
getList2
()
})
},
getList1
(){
getProductBrandEmpowerPageUnauth
({
productBrandId
:
this
.
id
}).
then
(
r
=>
{
this
.
list1
=
r
.
data
.
list
})
},
getList2
()
{
getProductBrandEmpowerPageAuth
({
productBrandId
:
this
.
id
}).
then
(
r
=>
{
this
.
list2
=
r
.
data
.
list
})
}
},
watch
:
{
visible
(
v
){
if
(
v
){
this
.
getList1
()
this
.
getList2
()
}
this
.
dialogVisible
=
v
},
dialogVisible
(
v
)
{
this
.
$emit
(
'
update:visible
'
,
v
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/productBrank/index.vue
View file @
b9d9c73d
...
...
@@ -67,6 +67,8 @@
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleEmpower(scope.row)"
v-show=
"scope.row.filing === '1'"
v-hasPermi=
"['ecw:product-brank:update']"
>
添加授权客户
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:product-brank:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
...
...
@@ -111,14 +113,23 @@
v-for=
"(item, index) in form.trademarkList"
v-model=
"form.trademarkList[index]"
:index=
"index"
:key=
"item.id"
:product-type-list=
"productTypeList"
:product-list=
"productList"
></brand-form>
:product-list=
"productList"
@
delete=
"form.trademarkList.splice(index, 1)"
></brand-form>
<el-button
type=
"primary"
@
click=
"form.trademarkList.push({
brandName: '',
trademarkCategoryRelList: []
})"
>
添加商标
</el-button>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<empower
:visible.sync=
"showEmpower"
:brandName=
"empowerTitle"
:id=
"empowerId"
></empower>
</div>
</template>
...
...
@@ -129,12 +140,14 @@ import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
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
:
{
BrandForm
BrandForm
,
Empower
},
data
()
{
return
{
...
...
@@ -173,6 +186,10 @@ export default {
productTypeList
:
[],
productList
:
[],
showEmpower
:
false
,
empowerId
:
null
,
empowerTitle
:
''
};
},
created
()
{
...
...
@@ -185,6 +202,11 @@ export default {
})
},
methods
:
{
handleEmpower
(
row
){
this
.
empowerId
=
row
.
id
this
.
empowerTitle
=
row
.
titleZh
this
.
showEmpower
=
true
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
...
...
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