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
33a8acdb
Commit
33a8acdb
authored
Jun 05, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
87c39158
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
321 additions
and
333 deletions
+321
-333
PeaceDistributionSet.vue
src/components/UserMan/PeaceDistributionSet.vue
+318
-330
rubik.vue
src/components/sallCenter/plugin/rubik.vue
+3
-3
No files found.
src/components/UserMan/PeaceDistributionSet.vue
View file @
33a8acdb
...
@@ -5,145 +5,139 @@
...
@@ -5,145 +5,139 @@
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
style=
"width:60%"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
style=
"width:60%"
>
<el-form-item
label=
"分类"
>
<el-form-item
label=
"分类"
>
<template
v-if=
"addMsg.CategoryList && addMsg.CategoryList.length>0"
>
<template
v-if=
"addMsg.CategoryList && addMsg.CategoryList.length>0"
>
<el-tag
type=
"warning"
style=
"margin-right:10px;"
@
close=
"exitCheck(item,index)"
<el-tag
type=
"warning"
style=
"margin-right:10px;"
@
close=
"exitCheck(item,index)"
v-for=
"(item,index) in addMsg.CategoryList"
:key=
"index"
closable
>
v-for=
"(item,index) in addMsg.CategoryList"
:key=
"index"
closable
>
{{
item
.
CategoryName
}}
{{
item
.
CategoryName
}}
</el-tag>
</el-tag>
</
template
>
</
template
>
<el-button
type=
"primary"
@
click=
"flDig=true,keepCategoryList=addMsg.CategoryList
"
<el-button
type=
"primary"
@
click=
"flDig=true,keepCategoryList=addMsg.CategoryList"
style=
"margin:0 10px;
"
style=
"margin:0 10px;"
size=
"small"
>
选择分类
</el-button>
size=
"small"
>
选择分类
</el-button>
</el-form-item>
</el-form-item>
<!-- <el-form-item label="分销名称" prop="Name">
<!-- <el-form-item label="分销名称" prop="Name">
<el-input v-model="addMsg.Name" size="small"></el-input>
<el-input v-model="addMsg.Name" size="small"></el-input>
</el-form-item> -->
</el-form-item> -->
<el-form-item
label=
"等级"
>
<el-form-item
label=
"等级"
>
<el-button
@
click=
"gradeDig=true"
size=
"small"
type=
"primary"
style=
"margin-bottom:10px"
>
选择等级
</el-button>
<el-button
@
click=
"gradeDig=true"
size=
"small"
type=
"primary"
style=
"margin-bottom:10px"
>
选择等级
</el-button>
<el-table
<el-table
:data=
"addMsg.RatioList"
border
style=
"width: 100%"
>
:data=
"addMsg.RatioList"
<el-table-column
prop=
"GradeName"
label=
"名称"
>
border
</el-table-column>
style=
"width: 100%"
>
<el-table-column
prop=
"address"
label=
"比例"
>
<el-table-column
<
template
slot-scope=
"scope"
>
prop=
"GradeName"
<el-input
@
input=
"inputVal(scope.row)"
type=
"number"
min=
"1"
v-model=
"scope.row.CommissionRatio"
label=
"名称"
>
size=
"small"
placeholder=
"请输入"
>
</el-table-column>
<el-button
slot=
"append"
>
%
</el-button>
<el-table-column
</el-input>
prop=
"address"
</
template
>
label=
"比例"
>
</el-table-column>
<
template
slot-scope=
"scope"
>
<el-table-column
width=
"80px"
prop=
"address"
label=
"操作"
>
<el-input
@
input=
"inputVal(scope.row)"
type=
"number"
min=
"1"
v-model=
"scope.row.CommissionRatio"
size=
"small"
placeholder=
"请输入"
>
<
template
slot-scope=
"scope"
>
<el-button
slot=
"append"
>
%
</el-button>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
</el-input>
<img
@
click=
"Delete(scope.row,scope.$index)"
style=
"width:32px;height:32px;margin:0 10px"
</
template
>
src=
"../../assets/img/userman/del.png"
alt=
""
>
</el-table-column>
</el-tooltip>
<el-table-column
</
template
>
width=
"80px"
</el-table-column>
prop=
"address"
</el-table>
label=
"操作"
>
</el-form-item>
<
template
slot-scope=
"scope"
>
<el-form-item
label=
"返佣小数类型"
prop=
"DecimalType"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<el-radio
v-model=
"addMsg.DecimalType"
:label=
"1"
>
整数
</el-radio>
<img
@
click=
"Delete(scope.row,scope.$index)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
<el-radio
v-model=
"addMsg.DecimalType"
:label=
"2"
>
保留2位小数
</el-radio>
</el-tooltip>
</el-form-item>
</
template
>
<el-form-item
label=
"是否启用"
prop=
"Enabled"
>
</el-table-column>
<el-radio
v-model=
"addMsg.Enabled"
:label=
"1"
>
是
</el-radio>
</el-table>
<el-radio
v-model=
"addMsg.Enabled"
:label=
"2"
>
否
</el-radio>
</el-form-item>
</el-form-item>
<el-form-item
label=
"返佣小数类型"
prop=
"DecimalType"
>
<el-radio
v-model=
"addMsg.DecimalType"
:label=
"1"
>
整数
</el-radio>
</el-form>
<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>
</div>
</div>
<div
style=
"margin-top:20px"
>
<div
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
</div>
</div>
<!-- 选择分类 -->
<!-- 选择分类 -->
<el-dialog
custom-class=
"app-add-cat"
title=
"选择分类"
:visible
.
sync=
"flDig"
width=
"1100px"
>
<el-dialog
custom-class=
"app-add-cat"
title=
"选择分类"
:visible
.
sync=
"flDig"
width=
"1100px"
>
<el-row>
<el-row>
<el-col
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<el-col
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
一级分类
</h3>
<h3
style=
"padding:15px 0"
>
一级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<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"
>
<div
v-for=
"(item,index) in fenleiData"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
</el-checkbox>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<div
flex=
"box:last cross:center"
>
<span>
{{item.Name}}
</span>
<span>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild2(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
<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-col>
</div>
<el-col
v-show=
"childList2.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
</el-checkbox-group>
<h3
style=
"padding:15px 0"
>
二级分类
</h3>
</div>
<div
class=
"app-goods-cat-list active"
>
</el-col>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<el-col
v-show=
"childList2.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<div
v-for=
"(item,index) in childList2"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<h3
style=
"padding:15px 0"
>
二级分类
</h3>
<el-checkbox
:label=
"item.Id"
>
<div
class=
"app-goods-cat-list active"
>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
</el-checkbox>
<div
v-for=
"(item,index) in childList2"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<div
flex=
"box:last cross:center"
>
<el-checkbox
:label=
"item.Id"
>
<span>
{{item.Name}}
</span>
<span
style=
"display: none;"
>
{{item.Name}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild3(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</el-checkbox>
</div>
<div
flex=
"box:last cross:center"
>
</div>
<span>
{{item.Name}}
</span>
</el-checkbox-group>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild3(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-col>
</div>
<el-col
v-show=
"childList3.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
</el-checkbox-group>
<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=
"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-col>
</div>
</el-row>
</el-checkbox-group>
<div
class=
"tag-box"
>
<el-tag
@
close=
"exitCheck(item)"
v-for=
"(item,index) in addMsg.CategoryList"
:key=
"index"
type=
"warning"
</div>
closable
style=
"margin-right:5px"
>
{{item.Name}}
</el-tag>
</el-col>
</div>
</el-row>
<span
slot=
"footer"
class=
"dialog-footer"
>
<div
class=
"tag-box"
>
<el-button
size=
"small"
@
click=
"flDig=false,addMsg.CategoryList=keepCategoryList,ExitCateList()"
>
取 消
</el-button>
<el-tag
@
close=
"exitCheck(item)"
v-for=
"(item,index) in addMsg.CategoryList"
:key=
"index"
type=
"warning"
<el-button
@
click=
"flDig = false"
size=
"small"
type=
"primary"
>
确 定
</el-button>
closable
style=
"margin-right:5px"
>
{{item.Name}}
</el-tag>
</span>
</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>
<!-- 选择等级 -->
<!-- 选择等级 -->
<el-dialog
title=
"选择等级"
:visible
.
sync=
"gradeDig"
width=
"510px"
>
<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;"
>
<div
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
>
全选
style=
"box-sizing: border-box;background-color: #F3F5F6;width: 100%;padding-left: 20px;height: 50px;line-height: 50px;"
>
</el-checkbox>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
>
全选
</div>
</el-checkbox>
<div
style=
"margin: 15px 0;"
></div>
</div>
<div
style=
"padding: 10px 25px 20px;"
>
<div
style=
"margin: 15px 0;"
></div>
<el-checkbox-group
v-model=
"checkedCities"
@
change=
"handleCheckedCitiesChange"
>
<div
style=
"padding: 10px 25px 20px;"
>
<el-checkbox
style=
"margin-bottom:10px;width:110px"
v-for=
"city in cities"
:label=
"city.Id"
:key=
"city.GradeName"
>
<el-checkbox-group
v-model=
"checkedCities"
@
change=
"handleCheckedCitiesChange"
>
{{city.GradeName}}
</el-checkbox>
<el-checkbox
style=
"margin-bottom:10px;width:110px"
v-for=
"city in cities"
:label=
"city.Id"
</el-checkbox-group>
:key=
"city.GradeName"
>
</div>
{{city.GradeName}}
</el-checkbox>
<span
slot=
"footer"
class=
"dialog-footer"
>
</el-checkbox-group>
<el-button
size=
"small"
@
click=
"gradeDig = false"
>
取 消
</el-button>
</div>
<el-button
size=
"small"
type=
"primary"
@
click=
"chooseGrade"
>
确 定
</el-button>
<span
slot=
"footer"
class=
"dialog-footer"
>
</span>
<el-button
size=
"small"
@
click=
"gradeDig = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"chooseGrade"
>
确 定
</el-button>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -156,15 +150,15 @@
...
@@ -156,15 +150,15 @@
cities
:
[],
cities
:
[],
cityOptions
:
[],
cityOptions
:
[],
isIndeterminate
:
true
,
isIndeterminate
:
true
,
gradeDig
:
false
,
gradeDig
:
false
,
flDig
:
false
,
flDig
:
false
,
addMsg
:
{
addMsg
:
{
Id
:
0
,
Id
:
0
,
DecimalType
:
2
,
DecimalType
:
2
,
Name
:
''
,
Name
:
''
,
Enabled
:
2
,
Enabled
:
2
,
RatioList
:
[],
RatioList
:
[],
CategoryList
:
[],
CategoryList
:
[],
},
},
rules
:
{
rules
:
{
Name
:
[{
Name
:
[{
...
@@ -172,233 +166,226 @@
...
@@ -172,233 +166,226 @@
message
:
'请输入分销名称'
,
message
:
'请输入分销名称'
,
trigger
:
'blur'
trigger
:
'blur'
}],
}],
DecimalType
:
[
DecimalType
:
[{
{
required
:
true
,
message
:
'请选择类型'
,
trigger
:
'change'
}
required
:
true
,
],
message
:
'请选择类型'
,
Enabled
:
[
trigger
:
'change'
{
required
:
true
,
message
:
'请选择是否启用'
,
trigger
:
'change'
}
}],
],
Enabled
:
[{
required
:
true
,
message
:
'请选择是否启用'
,
trigger
:
'change'
}],
},
},
GradeId
:
''
,
GradeId
:
''
,
loading
:
false
,
loading
:
false
,
gradeList
:
[],
gradeList
:
[],
fenleiData
:[],
fenleiData
:
[],
checkList
:
[],
checkList
:
[],
childList2
:
[],
childList2
:
[],
childList3
:
[],
childList3
:
[],
keepCategoryList
:
[],
keepCategoryList
:
[],
HpGradeList
:[],
HpGradeList
:
[],
NewCategoryList
:[],
NewCategoryList
:
[],
};
};
},
},
created
()
{
created
()
{
this
.
getTree
();
this
.
getTree
();
this
.
getHpDistributorGrade
();
this
.
getHpDistributorGrade
();
},
},
methods
:
{
methods
:
{
inputVal
(
row
){
inputVal
(
row
)
{
if
(
Number
(
row
.
CommissionRatio
)
<
0
){
if
(
Number
(
row
.
CommissionRatio
)
<
0
)
{
row
.
CommissionRatio
=
1
;
row
.
CommissionRatio
=
1
;
}
}
if
(
Number
(
row
.
CommissionRatio
)
>
100
){
if
(
Number
(
row
.
CommissionRatio
)
>
100
)
{
row
.
CommissionRatio
=
100
;
row
.
CommissionRatio
=
100
;
}
}
},
},
Delete
(
item
,
index
){
Delete
(
item
,
index
)
{
this
.
addMsg
.
RatioList
.
splice
(
index
,
1
);
this
.
addMsg
.
RatioList
.
splice
(
index
,
1
);
this
.
checkedCities
.
forEach
((
list
,
k
)
=>
{
this
.
checkedCities
.
forEach
((
list
,
k
)
=>
{
if
(
list
==
item
.
GradeId
){
if
(
list
==
item
.
GradeId
)
{
this
.
checkedCities
.
splice
(
k
,
1
);
this
.
checkedCities
.
splice
(
k
,
1
);
}
}
})
})
},
},
chooseGrade
(){
chooseGrade
()
{
let
arr
=
[];
let
arr
=
[];
this
.
addMsg
.
RatioList
=
[];
this
.
addMsg
.
RatioList
=
[];
this
.
cities
.
forEach
(
item
=>
{
this
.
cities
.
forEach
(
item
=>
{
this
.
checkedCities
.
forEach
(
list
=>
{
this
.
checkedCities
.
forEach
(
list
=>
{
if
(
item
.
Id
==
list
){
if
(
item
.
Id
==
list
)
{
let
Obj
=
{
let
Obj
=
{
Grade
:
item
.
Grade
,
Grade
:
item
.
Grade
,
GradeId
:
item
.
Id
,
GradeId
:
item
.
Id
,
CommissionRatio
:
''
,
CommissionRatio
:
''
,
GradeName
:
item
.
GradeName
,
GradeName
:
item
.
GradeName
,
}
}
arr
.
push
(
Obj
);
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
)
}
})
})
let
list
=
arr
.
sort
(
this
.
compareGrade
(
"Grade"
,
true
));
})
this
.
addMsg
.
RatioList
=
list
;
})
this
.
gradeDig
=
false
;
console
.
log
(
"this.addMsg.CategoryList"
,
this
.
addMsg
.
CategoryList
)
},
},
compareGrade
(
property
,
desc
)
{
exitCheck
(
item
,
index
)
{
return
function
(
a
,
b
)
{
this
.
addMsg
.
CategoryList
.
forEach
((
list
,
k
)
=>
{
var
value1
=
a
[
property
];
if
(
list
.
Id
==
item
.
Id
)
{
var
value2
=
b
[
property
];
this
.
addMsg
.
CategoryList
.
splice
(
k
,
1
);
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
);
}
})
})
this
.
ExitCateList
();
}
else
{
},
return
false
;
getChild3
(
ChildList
)
{
}
this
.
childList3
=
ChildList
;
});
},
},
getChild2
(
ChildList
)
{
ExitCateList
()
{
this
.
childList2
=
ChildList
;
this
.
NewCategoryList
=
[];
},
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
getTree
()
{
item
.
Name
=
item
.
CategoryName
;
let
msg1
=
{
this
.
NewCategoryList
.
push
(
item
.
CategoryId
)
Id
:
0
,
})
Name
:
''
,
},
Tier
:
0
,
handleCheckChange
()
{
ParentId
:
0
,
this
.
addMsg
.
CategoryList
=
[];
Enabled
:
1
,
this
.
NewCategoryList
.
forEach
(
list
=>
{
IsShow
:
1
,
this
.
fenleiData
.
forEach
(
item
=>
{
}
if
(
list
==
item
.
Id
)
{
this
.
apipost
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
item
.
CategoryId
=
item
.
Id
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
.
CategoryList
.
push
(
item
)
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
;
})
})
})
}
}
item
.
ChildList
.
forEach
(
item2
=>
{
})
if
(
list
==
item2
.
Id
)
{
},
item2
.
CategoryId
=
item2
.
Id
;
getHpDistributorGrade
()
{
this
.
addMsg
.
CategoryList
.
push
(
item2
)
this
.
cityOptions
=
[];
}
this
.
apipost
(
"/api/user/GetHpDistributorGradeList"
,
{},
res
=>
{
item2
.
ChildList
.
forEach
(
item3
=>
{
this
.
cities
=
res
.
data
.
data
;
if
(
list
==
item3
.
Id
)
{
let
data
=
res
.
data
.
data
;
item3
.
CategoryId
=
item3
.
Id
;
data
.
forEach
(
item
=>
{
this
.
addMsg
.
CategoryList
.
push
(
item3
)
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"
,
{
exitCheck
(
item
,
index
)
{
CommissionId
:
this
.
GradeId
this
.
addMsg
.
CategoryList
.
forEach
((
list
,
k
)
=>
{
},
res
=>
{
if
(
list
.
Id
==
item
.
Id
)
{
this
.
loading
=
false
;
this
.
addMsg
.
CategoryList
.
splice
(
k
,
1
);
this
.
addMsg
=
res
.
data
.
data
;
}
this
.
NewCategoryList
=
[];
})
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
this
.
ExitCateList
();
item
.
Name
=
item
.
CategoryName
;
},
this
.
NewCategoryList
.
push
(
item
.
CategoryId
)
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
;
})
})
this
.
checkedCities
=
[];
})
this
.
addMsg
.
RatioList
.
forEach
(
item
=>
{
this
.
cities
.
forEach
(
list
=>
{
if
(
item
.
GradeId
==
list
.
Id
){
this
.
checkedCities
.
push
(
list
.
Id
);
}
})
})
//
})
})
},
}
})
},
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
()
{
mounted
()
{
}
}
};
};
</
script
>
</
script
>
<
style
>
<
style
>
.app-add-cat
.el-checkbox-group
{
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
font-size
:
14px
!important
;
}
}
...
@@ -435,6 +422,7 @@
...
@@ -435,6 +422,7 @@
overflow
:
scroll
;
overflow
:
scroll
;
height
:
400px
;
height
:
400px
;
}
}
.usersListEdit
.tip
{
.usersListEdit
.tip
{
margin-left
:
10px
;
margin-left
:
10px
;
display
:
inline-block
;
display
:
inline-block
;
...
...
src/components/sallCenter/plugin/rubik.vue
View file @
33a8acdb
...
@@ -132,7 +132,7 @@
...
@@ -132,7 +132,7 @@
</el-input>
</el-input>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<
template
v-if=
"!rubData.data.list[rubik]"
>
<
template
v-if=
"
rubData.data.list&&
!rubData.data.list[rubik]"
>
<el-form-item
label=
"图片上传"
>
<el-form-item
label=
"图片上传"
>
<span>
请先在左边选择图片位置
</span>
<span>
请先在左边选择图片位置
</span>
</el-form-item>
</el-form-item>
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
<el-card
shadow=
"never"
>
<el-card
shadow=
"never"
>
<el-form-item
label=
"图片上传"
>
<el-form-item
label=
"图片上传"
>
<el-button
size=
"mini"
@
click=
"choicImg=true"
>
选择图片
</el-button>
<el-button
size=
"mini"
@
click=
"choicImg=true"
>
选择图片
</el-button>
<div
flex
style=
"flex-wrap: wrap;"
v-if=
"rubData.data.list[rubik].pic_url"
>
<div
flex
style=
"flex-wrap: wrap;"
v-if=
"rubData.data.list
&&rubData.data.list
[rubik].pic_url"
>
<div
flex=
"main:center cross:center"
class=
"app-gallery-item"
<div
flex=
"main:center cross:center"
class=
"app-gallery-item"
style=
"height: 100px; width: 100px;"
>
style=
"height: 100px; width: 100px;"
>
<img
:src=
"getIconLink(rubData.data.list[rubik].pic_url)"
style=
"width:100%;height:100%;"
>
<img
:src=
"getIconLink(rubData.data.list[rubik].pic_url)"
style=
"width:100%;height:100%;"
>
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"选择链接"
>
<el-form-item
label=
"选择链接"
>
<el-input
size=
"small"
v-model=
"rubData.data.list[rubik].link[0].PageName"
:disabled=
"true"
>
<el-input
size=
"small"
v-model=
"rubData.data.list
&&rubData.data.list
[rubik].link[0].PageName"
:disabled=
"true"
>
<template
slot=
"append"
>
<template
slot=
"append"
>
<el-button
@
click=
"isShowLink=true"
>
选择链接
</el-button>
<el-button
@
click=
"isShowLink=true"
>
选择链接
</el-button>
</
template
>
</
template
>
...
...
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