Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
黄媛媛
ElectricitySheep
Commits
524460d0
Commit
524460d0
authored
Jun 02, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
和平分销
parent
b41b3372
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1288 additions
and
81 deletions
+1288
-81
goodsListEdit.vue
src/components/CommodityMan/goodsListEdit.vue
+93
-60
PdistributorLevel.vue
src/components/UserMan/PdistributorLevel.vue
+327
-0
PeaceDistribution.vue
src/components/UserMan/PeaceDistribution.vue
+278
-0
PeaceDistributionSet.vue
src/components/UserMan/PeaceDistributionSet.vue
+484
-0
distributors.vue
src/components/UserMan/distributors.vue
+88
-21
index.js
src/router/index.js
+18
-0
No files found.
src/components/CommodityMan/goodsListEdit.vue
View file @
524460d0
...
...
@@ -672,72 +672,71 @@
</el-form>
<div
class=
"bottom-div"
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
<
el-button
size=
"small"
>
预览
</el-button
>
<
!-- <el-button size="small">预览</el-button> --
>
</div>
</div>
<!-- 选择分类 -->
<el-dialog
custom-class=
"app-add-cat"
title=
"选择分类"
:visible
.
sync=
"flDig"
width=
"1100px"
>
<el-row>
<el-col
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
一级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"addMsg.CategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in fenleiData"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild2(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
<el-row>
<el-col
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
一级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in fenleiData"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild2(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</div>
</el-checkbox-group>
</el-col>
<el-col
v-show=
"childList2.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
二级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in childList2"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild3(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList2.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
二级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"addMsg.CategoryList"
>
<div
v-for=
"(item,index) in childList2"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild3(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</el-col>
<el-col
v-show=
"childList3.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
三级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in childList3"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList3.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
三级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"addMsg.CategoryList"
>
<div
v-for=
"(item,index) in childList3"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<div
class=
"tag-box"
>
<el-tag
@
close=
"exitCheck(item)"
v-for=
"(item,index) in addMsg.CategoryList"
:key=
"index"
type=
"warning"
closable
style=
"margin-right:5px"
>
{{item.Name}}
</el-tag>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"flDig=false,addMsg.CategoryList=keepCategoryList"
>
取 消
</el-button>
<el-button
@
click=
"flDig = false"
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-col>
</el-row>
<div
class=
"tag-box"
>
<el-tag
@
close=
"exitCheck(item)"
v-for=
"(item,index) in addMsg.CategoryList"
:key=
"index"
type=
"warning"
closable
style=
"margin-right:5px"
>
{{item.Name}}
</el-tag>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"flDig=false,addMsg.CategoryList=keepCategoryList,ExitCateList()"
>
取 消
</el-button>
<el-button
@
click=
"flDig = false"
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 查看图例 -->
<el-dialog
title=
"查看自定义分享图片图例"
:visible
.
sync=
"imgDig"
width=
"30%"
>
...
...
@@ -1013,6 +1012,7 @@
imgListIndex1
:
0
,
imgListIndex2
:
0
,
NewCategoryList
:[],
};
},
...
...
@@ -1531,10 +1531,38 @@
getChild2
(
ChildList
)
{
this
.
childList2
=
ChildList
;
},
ExitCateList
(){
this
.
NewCategoryList
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
this
.
NewCategoryList
.
push
(
item
.
CategoryId
)
})
},
handleCheckChange
()
{
this
.
addMsg
.
CategoryList
.
forEach
((
item
,
k
)
=>
{
item
.
CategoryId
=
item
.
Id
;
})
this
.
addMsg
.
CategoryList
=
[];
this
.
NewCategoryList
.
forEach
(
list
=>
{
this
.
fenleiData
.
forEach
(
item
=>
{
if
(
list
==
item
.
Id
){
item
.
CategoryId
=
item
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item
)
}
item
.
ChildList
.
forEach
(
item2
=>
{
if
(
list
==
item2
.
Id
){
item2
.
CategoryId
=
item2
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item2
)
}
item2
.
ChildList
.
forEach
(
item3
=>
{
if
(
list
==
item3
.
Id
){
item3
.
CategoryId
=
item3
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item3
)
}
})
})
})
})
console
.
log
(
"this.addMsg.CategoryList"
,
this
.
addMsg
.
CategoryList
)
},
exitCheck
(
item
,
index
)
{
this
.
addMsg
.
CategoryList
.
forEach
((
list
,
k
)
=>
{
...
...
@@ -1594,6 +1622,11 @@
if
(
this
.
addMsg
.
GoodsDetails
&&
this
.
addMsg
.
GoodsDetails
!=
''
){
this
.
$refs
.
ue
.
SetVal
(
this
.
addMsg
.
GoodsDetails
);
}
this
.
NewCategoryList
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
this
.
NewCategoryList
.
push
(
item
.
CategoryId
)
})
})
},
...
...
src/components/UserMan/PdistributorLevel.vue
0 → 100644
View file @
524460d0
<
template
>
<div
class=
"usersList PdistributorLevel"
>
<div
class=
"head-title"
>
和平分销商等级
<el-button
@
click=
"AddDig"
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
>
添加分销商等级
</el-button>
</div>
<div
class=
"content"
>
<div>
<!--
<el-select
class=
"w100"
@
change=
"getList"
style=
"margin-right: 10px;"
v-model=
"msg.Source"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"全部平台"
:value=
"0"
></el-option>
<el-option
v-for=
"item in platList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
-->
<div
class=
"searchInput"
style=
"width:230px"
>
<el-input
style=
"display:inline-block;width:205px;height:30px"
placeholder=
"请输入分销商等级名称查询"
v-model=
"msg.GradeName"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"getList"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
</div>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
prop=
"Id"
label=
"ID"
>
</el-table-column>
<el-table-column
prop=
"address"
label=
"分销商等级"
>
<template
slot-scope=
"scope"
>
等级
{{
scope
.
row
.
Grade
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
label=
"是否直客"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.IsGuest==1"
>
是
</span>
<span
class=
"blue"
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"GradeName"
label=
"分销商等级名称"
>
</el-table-column>
<el-table-column
prop=
"UpdateDate"
label=
"修改时间"
>
</el-table-column>
<el-table-column
prop=
"address"
width=
"150"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
@
click=
"Edit(scope.row)"
style=
"width:32px;height:32px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
@
click=
"Delete(scope.row,1)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
<!-- 修改-->
<el-dialog
title=
"修改"
:visible
.
sync=
"dialogVisible"
width=
"500px"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
>
<p
style=
"padding-left:34px;margin-bottom:15px"
class=
"cred"
>
注:等级需连续,从等级1开始
</p>
<el-form-item
label=
"分销商等级选择"
prop=
"Grade"
>
<el-select
size=
"small"
v-model=
"addMsg.Grade"
placeholder=
"请选择"
>
<el-option
v-for=
"(item,index) in numList"
:key=
"index"
:label=
"`等级${index+1}`"
:value=
"item.Id"
:disabled=
"item.dis"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"分销商等级名称"
prop=
"GradeName"
>
<el-input
v-model=
"addMsg.GradeName"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"是否直客"
prop=
"IsGuest"
>
<el-select
size=
"small"
v-model=
"addMsg.IsGuest"
placeholder=
"请选择"
>
<el-option
label=
"是"
:value=
"1"
></el-option>
<el-option
label=
"否"
:value=
"2"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
dialogVisible
:
false
,
czType
:
1
,
czjfDig
:
false
,
changeState
:
false
,
loading
:
false
,
isIndeterminate
:
true
,
value
:
''
,
options
:[],
tableData
:[],
msg
:{
pageIndex
:
1
,
pageSize
:
15
,
GradeName
:
''
,
},
total
:
0
,
addMsg
:
{
Id
:
0
,
Grade
:
1
,
GradeName
:
''
,
IsGuest
:
''
,
},
rules
:
{
Grade
:
[{
required
:
true
,
message
:
'请选择分销商等级'
,
trigger
:
'change'
}],
GradeName
:
[{
required
:
true
,
message
:
'请输入分销商等级名称'
,
trigger
:
'blur'
}],
IsGuest
:
[{
required
:
true
,
message
:
'请选择是否直客'
,
trigger
:
'change'
}],
},
tierInfo
:{},
numList
:[],
disList
:[],
};
},
created
()
{
this
.
getList
();
this
.
GetTierInfo
();
this
.
addMsg
.
MallBaseId
=
this
.
getLocalStorage
().
MallBaseId
;
this
.
numList
=
[]
for
(
let
i
=
1
;
i
<
11
;
i
++
){
let
obj
=
{
Id
:
i
,
dis
:
false
,
}
this
.
numList
.
push
(
obj
)
}
},
methods
:
{
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
apipost
(
"/api/user/SetHpDistributorGradeInfo"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getList
();
this
.
dialogVisible
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
else
{
return
false
;
}
});
},
AddDig
(){
this
.
dialogVisible
=
true
;
this
.
addMsg
=
{
Id
:
0
,
Grade
:
1
,
GradeName
:
''
,
IsGuest
:
''
,
}
},
SetEnabled
(
row
){
let
that
=
this
;
that
.
apipost
(
"/api/user/SetDistributorGradeEnabledStatus"
,
{
GradeId
:
row
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
Delete
(
row
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/user/DelHpDistributorGradeInfo"
,
{
GradeId
:
row
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
null
);
});
},
Edit
(
item
){
this
.
dialogVisible
=
true
;
this
.
addMsg
=
Object
.
assign
({},
item
);
},
EditgoUrl
(){
this
.
$router
.
push
({
name
:
'PsetDistributorLevel'
,
});
},
getList
(){
this
.
loading
=
true
;
this
.
apipost
(
"/api/user/GetHpDistributorGradePageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
tableData
=
pageData
;
}
})
},
GetTierInfo
(){
this
.
apipost
(
"/api/user/GetDistributorTierInfo"
,{},
res
=>
{
this
.
tierInfo
=
res
.
data
.
data
;
})
},
handleCheckAllChange
(
val
)
{
this
.
checkedCities
=
val
?
this
.
cityOptions
:
[];
this
.
isIndeterminate
=
false
;
},
handleCheckedCitiesChange
(
value
)
{
let
checkedCount
=
value
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
;
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
;
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
},
mounted
()
{
}
};
</
script
>
<
style
>
.usersList
.remark_name
{
color
:
#888888
;
font-size
:
12px
;
margin-left
:
10px
;
float
:
right
;
}
.usersList
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
.usersList
.blue
{
color
:
#409EFF
;
}
.usersList
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
}
.usersList
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.usersList
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
width
:
100%
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
margin-right
:
20px
;
}
.usersList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
</
style
>
src/components/UserMan/PeaceDistribution.vue
0 → 100644
View file @
524460d0
<
template
>
<div
class=
"usersList PeaceDistribution"
>
<div
class=
"head-title"
>
和平分销商等级
<el-button
@
click=
"CommonJump('PeaceDistributionSet')"
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
>
添加分销商等级
</el-button>
</div>
<div
class=
"content"
>
<div>
<el-select
class=
"w120"
@
change=
"getList"
style=
"margin-right: 10px;"
filterable
v-model=
"msg.CategoryId"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"全部分类"
:value=
"0"
></el-option>
<el-option
v-for=
"item in cateList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
<div
class=
"searchInput"
style=
"width:230px"
>
<el-input
style=
"display:inline-block;width:205px;height:30px"
placeholder=
"请输入名称查询"
v-model=
"msg.Name"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"getList"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
</div>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
prop=
"Id"
width=
"80"
label=
"ID"
>
</el-table-column>
<el-table-column
prop=
"Name"
width=
"200"
label=
"分销名称"
>
</el-table-column>
<el-table-column
prop=
"GradeName"
width=
"150"
label=
"类型"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.DecimalType==1"
>
整数
</span>
<span
v-if=
"scope.row.DecimalType==2"
>
保留两位小数
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"GradeName"
width=
"150"
label=
"是否启用"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.Enabled"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"2"
@
change=
"changeEnabled(scope.row)"
>
</el-switch>
</
template
>
</el-table-column>
<el-table-column
prop=
"GradeName"
label=
"分类"
>
<
template
slot-scope=
"scope"
>
<el-tag
style=
"margin:0 5px 5px 0"
size=
"mini"
v-for=
"(item,index) in scope.row.CategoryList"
:key=
"index"
>
{{
item
.
CategoryName
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"GradeName"
label=
"返佣(名称/比例)"
>
<
template
slot-scope=
"scope"
>
<p
v-for=
"(item,index) in scope.row.RatioList"
:key=
"index"
type=
"success"
style=
"margin-right:6px"
>
{{
item
.
GradeName
}}
:
{{
item
.
CommissionRatio
}}
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
width=
"150"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
@
click=
"CommonJump('PeaceDistributionSet',
{UserId:scope.row.Id})" style="width:32px;height:32px" src="../../assets/img/userman/edit.png" alt="">
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
@
click=
"Delete(scope.row,1)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
czType
:
1
,
czjfDig
:
false
,
changeState
:
false
,
loading
:
false
,
isIndeterminate
:
true
,
value
:
''
,
options
:[],
tableData
:[],
msg
:{
pageIndex
:
1
,
pageSize
:
15
,
Name
:
''
,
CategoryId
:
0
,
},
total
:
0
,
cateList
:[],
};
},
created
()
{
this
.
getList
();
this
.
getCateId
();
},
methods
:
{
changeEnabled
(
item
){
this
.
apipost
(
"/api/user/SetGetHpDistributorEnabled"
,{
CommissionId
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
getList
()
}
})
},
SetEnabled
(
row
){
let
that
=
this
;
that
.
apipost
(
"/api/user/SetDistributorGradeEnabledStatus"
,
{
GradeId
:
row
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
Delete
(
row
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/user/DelHpDistributorInfo"
,
{
CommissionId
:
row
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
null
);
});
},
EditgoUrl
(){
this
.
$router
.
push
({
name
:
'PsetDistributorLevel'
,
});
},
getList
(){
this
.
loading
=
true
;
this
.
apipost
(
"/api/user/GetHpDistributorPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
tableData
=
pageData
;
}
})
},
getCateId
(){
let
msg
=
{
pageIndex
:
0
,
pageSize
:
1000
,
Id
:
0
,
Name
:
''
,
Tier
:
0
,
ParentId
:
0
,
Enabled
:
1
,
IsShow
:
1
,
};
this
.
apipost
(
"/api/product/GetProductCategoryPageList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
cateList
=
pageData
;
}
})
},
handleCheckAllChange
(
val
)
{
this
.
checkedCities
=
val
?
this
.
cityOptions
:
[];
this
.
isIndeterminate
=
false
;
},
handleCheckedCitiesChange
(
value
)
{
let
checkedCount
=
value
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
;
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
;
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
},
mounted
()
{
}
};
</
script
>
<
style
>
.usersList
.remark_name
{
color
:
#888888
;
font-size
:
12px
;
margin-left
:
10px
;
float
:
right
;
}
.usersList
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
.usersList
.blue
{
color
:
#409EFF
;
}
.usersList
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
}
.usersList
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.usersList
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
width
:
100%
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
margin-right
:
20px
;
}
.usersList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
</
style
>
src/components/UserMan/PeaceDistributionSet.vue
0 → 100644
View file @
524460d0
<
template
>
<div
v-loading=
"loading"
class=
"setMember usersList usersListEdit"
>
<div
class=
"head-title"
>
<span
@
click=
"CommonJump('PeaceDistribution')"
class=
"blue point"
>
和平分销
</span>
/ 编辑和平分销
</div>
<div
class=
"content"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
style=
"width:60%"
>
<el-form-item
label=
"分销名称"
prop=
"Name"
>
<el-input
v-model=
"addMsg.Name"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"返佣小数类型"
prop=
"DecimalType"
>
<el-radio
v-model=
"addMsg.DecimalType"
:label=
"1"
>
整数
</el-radio>
<el-radio
v-model=
"addMsg.DecimalType"
:label=
"2"
>
保留2位小数
</el-radio>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"Enabled"
>
<el-radio
v-model=
"addMsg.Enabled"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.Enabled"
:label=
"2"
>
否
</el-radio>
</el-form-item>
<el-form-item
label=
"等级"
>
<el-button
@
click=
"gradeDig=true"
size=
"small"
type=
"primary"
style=
"margin-bottom:10px"
>
选择等级
</el-button>
<el-table
:data=
"addMsg.RatioList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"GradeName"
label=
"名称"
>
</el-table-column>
<el-table-column
prop=
"address"
label=
"比例"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.CommissionRatio"
size=
"small"
placeholder=
"请输入"
>
<el-button
slot=
"append"
>
%
</el-button>
</el-input>
</
template
>
</el-table-column>
<el-table-column
width=
"80px"
prop=
"address"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
@
click=
"Delete(scope.row,scope.$index)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item
label=
"分类"
>
<
template
v-if=
"addMsg.CategoryList && addMsg.CategoryList.length>0"
>
<el-tag
type=
"warning"
style=
"margin-right:10px;"
@
close=
"exitCheck(item,index)"
v-for=
"(item,index) in addMsg.CategoryList"
:key=
"index"
closable
>
{{
item
.
CategoryName
}}
</el-tag>
</
template
>
<el-button
type=
"primary"
@
click=
"flDig=true,keepCategoryList=addMsg.CategoryList"
style=
"margin:0 10px;"
size=
"small"
>
选择分类
</el-button>
</el-form-item>
</el-form>
</div>
<div
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
</div>
<!-- 选择分类 -->
<el-dialog
custom-class=
"app-add-cat"
title=
"选择分类"
:visible
.
sync=
"flDig"
width=
"1100px"
>
<el-row>
<el-col
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
一级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in fenleiData"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild2(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList2.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
二级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in childList2"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild3(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList3.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
三级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in childList3"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<i
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<div
class=
"tag-box"
>
<el-tag
@
close=
"exitCheck(item)"
v-for=
"(item,index) in addMsg.CategoryList"
:key=
"index"
type=
"warning"
closable
style=
"margin-right:5px"
>
{{item.Name}}
</el-tag>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"flDig=false,addMsg.CategoryList=keepCategoryList,ExitCateList()"
>
取 消
</el-button>
<el-button
@
click=
"flDig = false"
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 选择等级 -->
<el-dialog
title=
"选择等级"
:visible
.
sync=
"gradeDig"
width=
"510px"
>
<div
style=
"box-sizing: border-box;background-color: #F3F5F6;width: 100%;padding-left: 20px;height: 50px;line-height: 50px;"
>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
>
全选
</el-checkbox>
</div>
<div
style=
"margin: 15px 0;"
></div>
<div
style=
"padding: 10px 25px 20px;"
>
<el-checkbox-group
v-model=
"checkedCities"
@
change=
"handleCheckedCitiesChange"
>
<el-checkbox
style=
"margin-bottom:10px;width:110px"
v-for=
"city in cities"
:label=
"city.Id"
:key=
"city.GradeName"
>
{{city.GradeName}}
</el-checkbox>
</el-checkbox-group>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"gradeDig = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"chooseGrade"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
checkAll
:
false
,
checkedCities
:
[],
cities
:
[],
cityOptions
:
[],
isIndeterminate
:
true
,
gradeDig
:
false
,
flDig
:
false
,
addMsg
:
{
Id
:
0
,
DecimalType
:
1
,
Name
:
''
,
Enabled
:
2
,
RatioList
:[],
CategoryList
:[],
},
rules
:
{
Name
:
[{
required
:
true
,
message
:
'请输入分销名称'
,
trigger
:
'blur'
}],
DecimalType
:
[
{
required
:
true
,
message
:
'请选择类型'
,
trigger
:
'change'
}
],
Enabled
:
[
{
required
:
true
,
message
:
'请选择是否启用'
,
trigger
:
'change'
}
],
},
GradeId
:
''
,
loading
:
false
,
gradeList
:
[],
fenleiData
:[],
checkList
:
[],
childList2
:
[],
childList3
:
[],
keepCategoryList
:
[],
HpGradeList
:[],
NewCategoryList
:[],
};
},
created
()
{
this
.
getTree
();
this
.
getHpDistributorGrade
();
},
methods
:
{
Delete
(
item
,
index
){
this
.
addMsg
.
RatioList
.
splice
(
index
,
1
);
this
.
checkedCities
.
forEach
((
list
,
k
)
=>
{
if
(
list
==
item
.
GradeId
){
this
.
checkedCities
.
splice
(
k
,
1
);
}
})
},
chooseGrade
(){
let
arr
=
[];
this
.
addMsg
.
RatioList
=
[];
this
.
cities
.
forEach
(
item
=>
{
this
.
checkedCities
.
forEach
(
list
=>
{
if
(
item
.
Id
==
list
){
let
Obj
=
{
Grade
:
item
.
Grade
,
GradeId
:
item
.
Id
,
CommissionRatio
:
''
,
GradeName
:
item
.
GradeName
,
}
arr
.
push
(
Obj
);
}
})
})
let
list
=
arr
.
sort
(
this
.
compareGrade
(
"Grade"
,
true
));
this
.
addMsg
.
RatioList
=
list
;
this
.
gradeDig
=
false
;
},
compareGrade
(
property
,
desc
)
{
return
function
(
a
,
b
)
{
var
value1
=
a
[
property
];
var
value2
=
b
[
property
];
if
(
desc
==
true
){
// 升序排列
return
value1
-
value2
;
}
else
{
// 降序排列
return
value2
-
value1
;
}
}
},
handleCheckAllChange
(
val
)
{
this
.
checkedCities
=
val
?
this
.
cityOptions
:
[];
this
.
isIndeterminate
=
false
;
},
handleCheckedCitiesChange
(
value
)
{
let
checkedCount
=
value
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
;
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
;
},
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
addMsg
.
RatioList
.
length
==
0
){
this
.
Error
(
"请选择返佣等级!"
);
return
;
}
this
.
apipost
(
"/api/user/SetHpDistributorInfo"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CommonJump
(
'PeaceDistribution'
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
else
{
return
false
;
}
});
},
ExitCateList
(){
this
.
NewCategoryList
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
this
.
NewCategoryList
.
push
(
item
.
CategoryId
)
})
},
handleCheckChange
()
{
this
.
addMsg
.
CategoryList
=
[];
this
.
NewCategoryList
.
forEach
(
list
=>
{
this
.
fenleiData
.
forEach
(
item
=>
{
if
(
list
==
item
.
Id
){
item
.
CategoryId
=
item
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item
)
}
item
.
ChildList
.
forEach
(
item2
=>
{
if
(
list
==
item2
.
Id
){
item2
.
CategoryId
=
item2
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item2
)
}
item2
.
ChildList
.
forEach
(
item3
=>
{
if
(
list
==
item3
.
Id
){
item3
.
CategoryId
=
item3
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item3
)
}
})
})
})
})
console
.
log
(
"this.addMsg.CategoryList"
,
this
.
addMsg
.
CategoryList
)
},
exitCheck
(
item
,
index
)
{
this
.
addMsg
.
CategoryList
.
forEach
((
list
,
k
)
=>
{
if
(
list
.
Id
==
item
.
Id
)
{
this
.
addMsg
.
CategoryList
.
splice
(
k
,
1
);
}
})
},
getChild3
(
ChildList
)
{
this
.
childList3
=
ChildList
;
},
getChild2
(
ChildList
)
{
this
.
childList2
=
ChildList
;
},
getTree
()
{
let
msg1
=
{
Id
:
0
,
Name
:
''
,
Tier
:
0
,
ParentId
:
0
,
Enabled
:
1
,
IsShow
:
1
,
}
this
.
apipost
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
;
this
.
fenleiData
=
pageData
;
this
.
fenleiData
.
forEach
(
item
=>
{
item
.
CategoryName
=
item
.
Name
;
item
.
ChildList
.
forEach
(
item2
=>
{
item2
.
CategoryName
=
item2
.
Name
;
item2
.
ChildList
.
forEach
(
item3
=>
{
item3
.
CategoryName
=
item3
.
Name
;
})
})
})
}
})
},
getHpDistributorGrade
()
{
this
.
cityOptions
=
[];
this
.
apipost
(
"/api/user/GetHpDistributorGradeList"
,
{},
res
=>
{
this
.
cities
=
res
.
data
.
data
;
let
data
=
res
.
data
.
data
;
data
.
forEach
(
item
=>
{
this
.
cityOptions
.
push
(
item
.
Id
)
})
if
(
this
.
$route
.
query
.
UserId
)
{
this
.
GradeId
=
this
.
$route
.
query
.
UserId
;
this
.
getData
()
}
})
},
getData
()
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/user/GetHpdistributorInfo"
,
{
CommissionId
:
this
.
GradeId
},
res
=>
{
this
.
loading
=
false
;
this
.
addMsg
=
res
.
data
.
data
;
this
.
NewCategoryList
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
this
.
NewCategoryList
.
push
(
item
.
CategoryId
)
})
this
.
checkedCities
=
[];
this
.
addMsg
.
RatioList
.
forEach
(
item
=>
{
this
.
cities
.
forEach
(
list
=>
{
if
(
item
.
GradeId
==
list
.
Id
){
this
.
checkedCities
.
push
(
list
.
Id
);
}
})
})
//
})
},
},
mounted
()
{
}
};
</
script
>
<
style
>
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
}
.app-add-cat
.el-checkbox
{
margin-right
:
0
;
}
.app-add-cat
.el-dialog__body
{
padding
:
10px
20px
!important
;
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
{
margin
:
20px
0
;
}
.app-add-cat
.app-goods-cat-list
.active
{
background
:
#FAFAFA
;
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
padding
:
5px
10px
;
}
.app-add-cat
.app-goods-cat-list
{
border
:
1px
solid
#E8EAEE
;
border-radius
:
5px
;
margin-top
:
-5px
;
padding
:
10px
0
;
overflow
:
scroll
;
height
:
400px
;
}
.usersListEdit
.tip
{
margin-left
:
10px
;
display
:
inline-block
;
height
:
30px
;
line-height
:
30px
;
color
:
#ff4544
;
background-color
:
#FEF0F0
;
padding
:
0
20px
;
border-radius
:
5px
;
}
.usersListEdit
.app-image
{
background-size
:
cover
;
background-position
:
center
center
;
width
:
80px
;
height
:
80px
;
border-radius
:
0%
;
}
.setMember
.setTable
.el-table__body
.cell
{
display
:
flex
;
align-items
:
center
;
}
.setMember
.commonLabel
.el-form-item__label
{
margin-top
:
-4px
;
}
.setMember
.discount
.el-form-item__label
{
padding-right
:
30px
;
margin-top
:
-4px
;
}
.setMember
.el-form-item
.elzk
{
position
:
absolute
;
left
:
-25px
;
top
:
8px
;
}
.setMember
.el-form-item
{
position
:
relative
;
}
.usersList
.blue
{
color
:
#409EFF
;
}
.usersList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
</
style
>
src/components/UserMan/distributors.vue
View file @
524460d0
...
...
@@ -94,12 +94,17 @@
<p
@
click=
"getReferrals(3,scope.row)"
class=
"blue point"
>
三级:
{{
scope
.
row
.
ThreeNum
}}
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"分销商等级"
>
<el-table-column
v-if=
"hpEnabled==2"
prop=
"name"
label=
"分销商等级"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.GradeName=='默认等级'"
type=
"info"
>
{{
scope
.
row
.
GradeName
}}
</el-tag>
<el-tag
v-if=
"scope.row.GradeName!='默认等级' && scope.row.GradeName!=''"
>
{{
scope
.
row
.
GradeName
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
v-if=
"hpEnabled==1"
prop=
"name"
label=
"和平分销商等级"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.HPGradeName && scope.row.HPGradeName!=''"
type=
"info"
>
{{
scope
.
row
.
HPGradeName
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.AuditStatusName=='待审核'"
type=
"info"
>
{{
scope
.
row
.
AuditStatusName
}}
</el-tag>
...
...
@@ -135,7 +140,11 @@
</el-tooltip>
<template
v-if=
"scope.row.AuditStatus!=1 && scope.row.AuditStatus!=3"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"修改分销商等级"
placement=
"top-start"
>
<img
@
click=
"openReason(4,scope.row)"
style=
"width:32px;height:32px"
<img
v-if=
"hpEnabled==1"
@
click=
"openReasonNew(6,scope.row)"
style=
"width:32px;height:32px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"修改分销商等级"
placement=
"top-start"
>
<img
v-if=
"hpEnabled==2"
@
click=
"openReason(4,scope.row)"
style=
"width:32px;height:32px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"添加备注"
placement=
"top-start"
>
...
...
@@ -182,26 +191,45 @@
</el-dialog>
<!-- 审批同意或拒绝单个修改等级 -->
<el-dialog
title=
"提示"
:visible
.
sync=
"reasonDig"
width=
"500px"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"0"
>
<
template
v-if=
"addMsg.Type==1 || addMsg.Type==2"
>
<p
style=
"margin-bottom:10px"
>
请输入原因
</p>
<el-form-item>
<el-input
size=
"small"
v-model=
"addMsg.Remark"
></el-input>
</el-form-item>
</
template
>
<
template
v-if=
"hpEnabled==1"
>
<p
v-if=
"hpUserInfo.Status==1"
>
{{
hpUserInfo
.
UserName
}}
(
{{
hpUserInfo
.
HPGradeName
}}
)
</p>
<p
class=
"cred"
v-if=
"hpUserInfo.Status==2"
>
需上级用户先分配分销等级
</p>
<p
class=
"cred"
v-if=
"hpUserInfo.Status==3"
>
需上级用户先成为分销商
</p>
<el-form
style=
"margin-top:10px"
v-if=
"hpUserInfo.Status==1 || SuperiorNum==1"
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"0"
>
<el-form-item
label-width=
"100px"
label=
"分销商等级"
>
<el-select
class=
"w200"
v-model=
"addMsg.NewGradeId"
size=
"small"
placeholder=
"请选择"
>
<el-option
v-for=
"item in hpGradeList"
:key=
"item.Id"
:label=
"item.GradeName"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"reasonDig = false"
>
取 消
</el-button>
<el-button
v-if=
"hpUserInfo.Status==1 || SuperiorNum==1"
size=
"small"
type=
"primary"
@
click=
"czsubmitForm('addMsg')"
>
确 定
</el-button>
</span>
</
template
>
<
template
v-if=
"hpEnabled==2"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"0"
>
<template
v-if=
"addMsg.Type==1 || addMsg.Type==2"
>
<p
style=
"margin-bottom:10px"
>
请输入原因
</p>
<el-form-item>
<el-input
size=
"small"
v-model=
"addMsg.Remark"
></el-input>
</el-form-item>
</
template
>
<el-form-item
label-width=
"100px"
v-if=
"addMsg.Type==4"
label=
"分销商等级"
>
<el-select
class=
"w200"
v-model=
"addMsg.NewGradeId"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"默认等级"
:value=
"0"
></el-option>
<el-option
v-for=
"item in DropdownList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"reasonDig = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"czsubmitForm('addMsg')"
>
确 定
</el-button>
</span>
<el-form-item
label-width=
"100px"
v-if=
"addMsg.Type==4"
label=
"分销商等级"
>
<el-select
class=
"w200"
v-model=
"addMsg.NewGradeId"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"默认等级"
:value=
"0"
></el-option>
<el-option
v-for=
"item in DropdownList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"reasonDig = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"czsubmitForm('addMsg')"
>
确 定
</el-button>
</span>
</template>
</el-dialog>
<!-- 批量修改 -->
<el-dialog
custom-class=
"plxg"
title=
"批量修改"
:visible
.
sync=
"plDig"
width=
"960px"
>
...
...
@@ -287,6 +315,7 @@
},
data
()
{
return
{
hpEnabled
:
1
,
adduserDig
:
false
,
remarkDig
:
false
,
plDig
:
false
,
...
...
@@ -371,6 +400,9 @@
referDig
:
false
,
loading1
:
false
,
tableData1
:
[],
hpUserInfo
:{},
hpGradeList
:[],
SuperiorNum
:
0
,
};
},
created
()
{
...
...
@@ -381,8 +413,43 @@
this
.
GetAuditStatus
();
this
.
GetDropdownList
();
this
.
getUserList
();
this
.
getGrade
();
},
methods
:
{
openReasonNew
(
num
,
row
){
this
.
addMsg
.
Type
=
num
;
this
.
addMsg
.
UserIds
=
row
.
UserId
;
this
.
addMsg
.
NewGradeId
=
row
.
HPGradeId
;
this
.
reasonDig
=
true
;
this
.
hpUserInfo
=
{};
this
.
SuperiorNum
=
0
;
if
(
row
.
SuperiorId
==
0
){
this
.
SuperiorNum
=
1
;
}
else
{
this
.
getbutorInfo
(
row
)
}
},
getGrade
(
row
){
this
.
apipost
(
"/api/user/GetHpDistributorGradeList"
,{
GradeName
:
''
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
hpGradeList
=
res
.
data
.
data
;
}
})
},
getbutorInfo
(
row
){
this
.
apipost
(
"/api/user/GetHpUserDistributorInfo"
,{
UserId
:
row
.
SuperiorId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
hpUserInfo
=
res
.
data
.
data
;
}
})
},
HpEnabled
(){
this
.
apipost
(
"/api/user/GetHpDistributorIsEnabled"
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
hpEnabled
=
res
.
data
.
data
;
}
})
},
getReferrals
(
type
,
row
)
{
this
.
referMsg
.
ReferralsType
=
type
;
this
.
referMsg
.
UserId
=
row
.
Id
;
...
...
src/router/index.js
View file @
524460d0
...
...
@@ -171,6 +171,24 @@ export default new Router({
name
:
'setDistributorLevel'
,
component
:
resolve
=>
require
([
'@/components/UserMan/setDistributorLevel'
],
resolve
),
},
// 用户管理 分销商管理 和平分销商等级
{
path
:
'/PdistributorLevel'
,
name
:
'PdistributorLevel'
,
component
:
resolve
=>
require
([
'@/components/UserMan/PdistributorLevel'
],
resolve
),
},
// 用户管理 分销商管理 和平分销商
{
path
:
'/PeaceDistribution'
,
name
:
'PeaceDistribution'
,
component
:
resolve
=>
require
([
'@/components/UserMan/PeaceDistribution'
],
resolve
),
},
// 用户管理 分销商管理 和平分销商
{
path
:
'/PeaceDistributionSet'
,
name
:
'PeaceDistributionSet'
,
component
:
resolve
=>
require
([
'@/components/UserMan/PeaceDistributionSet'
],
resolve
),
},
// 用户管理 分销商管理 分销商
{
path
:
'/distributors'
,
...
...
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