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
efc07da3
Commit
efc07da3
authored
Sep 07, 2022
by
我在何方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品牌管理
parent
37165ac9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
154 additions
and
8 deletions
+154
-8
productBrank.js
src/api/ecw/productBrank.js
+11
-2
index.vue
src/views/ecw/productBrank/Empower/index.vue
+143
-6
No files found.
src/api/ecw/productBrank.js
View file @
efc07da3
...
@@ -10,9 +10,9 @@ export function createProductBrank(data) {
...
@@ -10,9 +10,9 @@ export function createProductBrank(data) {
}
}
// 更新品牌
// 更新品牌
export
function
updateProductBrank
(
data
)
{
export
function
changeFeeModel
(
data
)
{
return
request
({
return
request
({
url
:
'
/ecw/product-brank/
updat
e
'
,
url
:
'
/ecw/product-brank/
changeFeeMod
e
'
,
method
:
'
put
'
,
method
:
'
put
'
,
data
:
data
data
:
data
})
})
...
@@ -52,3 +52,12 @@ export function exportProductBrankExcel(query) {
...
@@ -52,3 +52,12 @@ export function exportProductBrankExcel(query) {
responseType
:
'
blob
'
responseType
:
'
blob
'
})
})
}
}
// 更新品牌
export
function
setUnauthCustomerFeeType
(
data
)
{
return
request
({
url
:
'
/ecw/product-brank/setUnauthCustomerFeeType
'
,
method
:
'
put
'
,
data
:
data
})
}
src/views/ecw/productBrank/Empower/index.vue
View file @
efc07da3
...
@@ -8,6 +8,24 @@
...
@@ -8,6 +8,24 @@
:before-close=
"handleClose()"
>
:before-close=
"handleClose()"
>
<el-tabs
v-model=
"activeName"
>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
label=
"未授权客户"
name=
"first"
>
<el-tab-pane
label=
"未授权客户"
name=
"first"
>
<div
class=
"brand"
>
<el-radio-group
v-model=
"productBrank.unauthChargingModel"
@
change=
"changeModel"
>
<el-radio
label=
"0"
>
统一收费标准
</el-radio>
<el-radio
label=
"1"
>
针对客户收费标准
</el-radio>
</el-radio-group>
</div>
<div
v-if=
"productBrank.unauthChargingModel==0"
class=
"brand"
>
<span>
针对所有未授权客户的收费模式:
</span>
<el-select
v-model=
"productBrank.unauthDefaultFeeType"
placeholder=
"请选择"
size=
"small"
style=
"margin-right: 10px;"
>
<el-option
v-for=
"(item,index) in feeType"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-button
type=
"primary"
@
click=
"updateBrank"
>
确定修改
</el-button>
</div>
<el-form
:inline=
"true"
class=
"demo-form-inline"
>
<el-form
:inline=
"true"
class=
"demo-form-inline"
>
<el-form-item
label=
"关键字"
>
<el-form-item
label=
"关键字"
>
<el-input
v-model=
"list1QueryParams.customerKey"
placeholder=
"请填入关键字"
></el-input>
<el-input
v-model=
"list1QueryParams.customerKey"
placeholder=
"请填入关键字"
></el-input>
...
@@ -29,11 +47,21 @@
...
@@ -29,11 +47,21 @@
label=
"客户号码"
>
label=
"客户号码"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
width=
"100px"
prop=
"feeScale"
label=
"收费类型"
>
<template
slot-scope=
"scope"
>
<dict-tag
v-if=
"productBrank.unauthChargingModel==1&&scope.row.feeScale"
:type=
"DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL"
:value=
"scope.row.feeScale"
/>
<span
v-else-if=
"productBrank.unauthDefaultFeeType"
>
{{
productBrank
.
unauthDefaultFeeType
==
1
?
'
有牌价
'
:
'
中性价
'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"200px"
label=
"操作"
>
label=
"操作"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleAdd(row)"
>
添加
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleAdd(row)"
>
添加授权
</el-button>
<el-button
v-if=
"productBrank.unauthChargingModel=='1'"
type=
"primary"
size=
"mini"
@
click=
"editAdd(row)"
>
修改收费
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -123,6 +151,31 @@
...
@@ -123,6 +151,31 @@
<el-button
type=
"primary"
@
click=
"handleAddSubmit"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"handleAddSubmit"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 添加弹窗 -->
<el-dialog
title=
"修改单个客户收费模式"
:visible.sync=
"editDialog.dialogVisible"
width=
"500px"
>
<el-form
ref=
"form"
:model=
"editDialog.form"
label-width=
"80px"
>
<el-form-item
label=
"客户名称"
>
{{ editDialog.customerName }}
</el-form-item>
<el-form-item
label=
"收费模式"
>
<el-select
v-model=
"editDialog.form.feeScale"
placeholder=
"请选择"
size=
"small"
style=
"margin-right: 10px;"
>
<el-option
v-for=
"item in feeType"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<!-- <dict-selector v-model="editDialog.form.feeScale" :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL"></dict-selector> -->
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleEditSubmit"
>
确 定 修 改
</el-button>
<el-button
@
click=
"editDialog.dialogVisible = false"
>
关 闭 窗 口
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -133,6 +186,7 @@ import {
...
@@ -133,6 +186,7 @@ import {
getProductBrandEmpowerPageAuth
,
getProductBrandEmpowerPageAuth
,
getProductBrandEmpowerPageUnauth
getProductBrandEmpowerPageUnauth
}
from
"
@/api/ecw/productBrandEmpower
"
}
from
"
@/api/ecw/productBrandEmpower
"
import
{
getProductBrank
,
changeFeeModel
,
setUnauthCustomerFeeType
}
from
"
@/api/ecw/productBrank
"
;
import
DictSelector
from
"
@/components/DictSelector
"
import
DictSelector
from
"
@/components/DictSelector
"
import
{
DICT_TYPE
,
getDictDataLabel
}
from
'
@/utils/dict
'
import
{
DICT_TYPE
,
getDictDataLabel
}
from
'
@/utils/dict
'
import
FileUpload
from
'
@/components/FileUpload
'
import
FileUpload
from
'
@/components/FileUpload
'
...
@@ -166,6 +220,14 @@ export default {
...
@@ -166,6 +220,14 @@ export default {
total2
:
0
,
total2
:
0
,
list1
:
[],
list1
:
[],
list2
:
[],
list2
:
[],
feeType
:[{
label
:
'
有牌价
'
,
value
:
1
},{
label
:
'
中性价
'
,
value
:
2
}],
unauthChargingModel
:
0
,
list1QueryParams
:
{
list1QueryParams
:
{
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
...
@@ -175,7 +237,7 @@ export default {
...
@@ -175,7 +237,7 @@ export default {
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
},
},
productBrank
:{},
addDialog
:
{
addDialog
:
{
dialogVisible
:
false
,
dialogVisible
:
false
,
customerName
:
''
,
customerName
:
''
,
...
@@ -183,13 +245,23 @@ export default {
...
@@ -183,13 +245,23 @@ export default {
"
customerContactsId
"
:
0
,
"
customerContactsId
"
:
0
,
"
customerId
"
:
0
,
"
customerId
"
:
0
,
"
endTime
"
:
""
,
"
endTime
"
:
""
,
"
feeScale
"
:
0
,
"
feeScale
"
:
1
,
"
fileUrl
"
:
""
,
"
fileUrl
"
:
""
,
"
productBrandId
"
:
null
,
"
productBrandId
"
:
null
,
"
startTime
"
:
""
,
"
startTime
"
:
""
,
"
status
"
:
0
"
status
"
:
0
},
},
dateRange
:
[]
dateRange
:
[]
},
editDialog
:
{
dialogVisible
:
false
,
customerName
:
''
,
form
:
{
"
customerContactsId
"
:
0
,
"
customerId
"
:
0
,
"
feeScale
"
:
1
,
"
productBrandId
"
:
null
,
}
}
}
}
}
},
},
...
@@ -197,16 +269,42 @@ export default {
...
@@ -197,16 +269,42 @@ export default {
},
},
methods
:
{
methods
:
{
getBrank
(){
getProductBrank
(
this
.
id
).
then
(
r
=>
{
this
.
productBrank
=
r
.
data
if
(
this
.
productBrank
.
unauthDefaultFeeType
){
this
.
productBrank
.
unauthDefaultFeeType
=
parseInt
(
this
.
productBrank
.
unauthDefaultFeeType
)
}
this
.
unauthChargingModel
=
this
.
productBrank
.
unauthChargingModel
})
},
handleAddSubmit
(){
handleAddSubmit
(){
this
.
addDialog
.
form
.
productBrandId
=
this
.
id
this
.
addDialog
.
form
.
productBrandId
=
this
.
id
createProductBrandEmpower
(
this
.
addDialog
.
form
).
then
(()
=>
{
createProductBrandEmpower
(
this
.
addDialog
.
form
).
then
(()
=>
{
this
.
addDialog
.
dialogVisible
=
false
this
.
addDialog
.
dialogVisible
=
false
this
.
getList1
()
this
.
getList1
()
this
.
getList2
()
this
.
getList2
()
this
.
resetForm
(
"
form
"
);
this
.
resetForm
(
"
form
"
);
})
})
},
},
handleEditSubmit
(){
var
data
=
{}
data
=
this
.
editDialog
.
form
data
.
productBrandId
=
this
.
id
setUnauthCustomerFeeType
(
data
).
then
(()
=>
{
this
.
getList1
()
this
.
editDialog
=
{
dialogVisible
:
false
,
customerName
:
''
,
form
:
{
"
customerContactsId
"
:
0
,
"
customerId
"
:
0
,
"
feeScale
"
:
1
,
"
productBrandId
"
:
null
,
}
}
})
},
handleDatePick
(
e
){
handleDatePick
(
e
){
console
.
log
(
e
)
console
.
log
(
e
)
},
},
...
@@ -215,11 +313,46 @@ export default {
...
@@ -215,11 +313,46 @@ export default {
this
.
list1QueryParams
.
pageNo
=
1
this
.
list1QueryParams
.
pageNo
=
1
this
.
getList1
()
this
.
getList1
()
},
},
updateBrank
(){
let
params
=
{}
if
(
this
.
productBrank
.
unauthChargingModel
==
1
){
params
=
{
id
:
this
.
productBrank
.
id
,
unauthChargingModel
:
this
.
productBrank
.
unauthChargingModel
,
}
}
else
{
params
=
{
id
:
this
.
productBrank
.
id
,
unauthChargingModel
:
this
.
productBrank
.
unauthChargingModel
,
unauthDefaultFeeType
:
this
.
productBrank
.
unauthDefaultFeeType
}
}
console
.
log
(
params
)
changeFeeModel
(
params
).
then
(
r
=>
{
this
.
getList1
()
this
.
getList2
()
this
.
getBrank
()
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
})
},
changeModel
(){
if
(
this
.
productBrank
.
unauthChargingModel
==
1
&&
this
.
unauthChargingModel
!=
this
.
productBrank
.
unauthChargingModel
){
this
.
updateBrank
()
}
},
handleAdd
(
row
)
{
handleAdd
(
row
)
{
this
.
addDialog
.
form
.
customerId
=
row
.
customerId
this
.
addDialog
.
form
.
customerId
=
row
.
customerId
this
.
addDialog
.
form
.
customerName
=
row
.
customerName
this
.
addDialog
.
form
.
customerName
=
row
.
customerName
this
.
addDialog
.
dialogVisible
=
true
this
.
addDialog
.
dialogVisible
=
true
},
},
editAdd
(
row
){
this
.
editDialog
.
form
.
customerId
=
row
.
customerId
if
(
row
.
customerContactsId
){
this
.
editDialog
.
form
.
customerContactsId
=
row
.
customerContactsId
}
this
.
editDialog
.
customerName
=
row
.
customerName
this
.
editDialog
.
dialogVisible
=
true
},
handleDelete
(
id
)
{
handleDelete
(
id
)
{
this
.
$confirm
(
'
确认删除该用户的授权?
'
,
'
提示
'
,
{
this
.
$confirm
(
'
确认删除该用户的授权?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
confirmButtonText
:
'
确定
'
,
...
@@ -258,9 +391,11 @@ export default {
...
@@ -258,9 +391,11 @@ export default {
if
(
v
){
if
(
v
){
this
.
list1QueryParams
.
pageNo
=
1
this
.
list1QueryParams
.
pageNo
=
1
this
.
list2QueryParams
.
pageNo
=
1
this
.
list2QueryParams
.
pageNo
=
1
this
.
unauthDefaultFeeType
=
"
1
"
this
.
list1QueryParams
.
customerKey
=
''
this
.
list1QueryParams
.
customerKey
=
''
this
.
getList1
()
this
.
getList1
()
this
.
getList2
()
this
.
getList2
()
this
.
getBrank
()
}
}
this
.
dialogVisible
=
v
this
.
dialogVisible
=
v
},
},
...
@@ -277,5 +412,7 @@ export default {
...
@@ -277,5 +412,7 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.brand
{
padding-bottom
:
20px
;
}
</
style
>
</
style
>
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