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
98f4847d
Commit
98f4847d
authored
Jul 15, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加分享等级
parent
ba4508ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
421 additions
and
0 deletions
+421
-0
fxDistribution.vue
src/components/UserMan/fxDistribution.vue
+415
-0
index.js
src/router/index.js
+6
-0
No files found.
src/components/UserMan/fxDistribution.vue
0 → 100644
View file @
98f4847d
<
template
>
<div
class=
"fxDistribution PdistributorLevel"
>
<div
class=
"head-title"
>
粉象返佣等级
<el-button
@
click=
"AddDig"
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
>
新增
</el-button>
<el-button
@
click=
"getView"
style=
"float:right;margin: -5px 20px 0 0;"
size=
"small"
type=
"primary"
>
预览
</el-button>
</div>
<div
class=
"content"
>
<div>
<div
class=
"searchInput"
style=
"width:230px"
>
<el-input
style=
"display:inline-block;width:205px;height:30px"
placeholder=
"请输入等级名称查询"
v-model=
"msg.GradeName"
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
@
clear=
"msg.pageIndex=1,getList()"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"msg.pageIndex=1,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"
width=
"80"
>
</el-table-column>
<el-table-column
prop=
"Grade"
label=
"等级"
>
</el-table-column>
<el-table-column
prop=
"GradeName"
label=
"等级名称"
>
</el-table-column>
<el-table-column
prop=
"IsGuest"
label=
"是否普通会员"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
IsGuest
==
1
?
'是'
:
'否'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"CommissionRatio"
label=
"返佣比例"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
CommissionRatio
+
'%'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"SiblingRatio"
label=
"同级返佣比例"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
SiblingRatio
+
'%'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"SiblingRebatesNum"
label=
"可拿同级返佣的数量"
width=
"150"
>
</el-table-column>
<el-table-column
prop=
"IsCanBuy"
label=
"是否可以购买"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
IsCanBuy
==
1
?
'是'
:
'否'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"DecimalType"
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=
"BuyMoney"
label=
"购买金额"
>
</el-table-column>
<el-table-column
prop=
"UpdateDate"
label=
"操作时间"
>
</el-table-column>
<el-table-column
prop=
"address"
width=
"120"
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)"
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"
:current-page
.
sync=
"msg.pageIndex"
:total=
"total"
>
</el-pagination>
</div>
<!-- 新增与修改-->
<el-dialog
:title=
"commonTitle"
:visible
.
sync=
"dialogVisible"
width=
"900px"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"160px"
>
<el-row>
<el-col
:span=
"12"
>
<p
style=
"padding-left:34px;margin-bottom:15px"
class=
"cred"
>
注:等级需连续,从等级1开始
</p>
<el-form-item
label=
"分销商等级选择"
prop=
"Grade"
>
<el-select
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-col>
<el-col
:span=
"12"
>
<p
style=
"padding-left:34px;margin-bottom:15px;visibility:hidden;"
class=
"cred"
>
.
</p>
<el-form-item
label=
"分销商等级名称"
prop=
"GradeName"
>
<el-input
v-model=
"addMsg.GradeName"
style=
"width:218px;"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否普通会员"
prop=
"IsGuest"
>
<el-select
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-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"返佣比例"
>
<el-input
style=
"width:218px;"
v-model=
"addMsg.CommissionRatio"
@
keyup
.
native=
"checkPrice(addMsg,'CommissionRatio')"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"同级返佣比例"
>
<el-input
v-model=
"addMsg.SiblingRatio"
style=
"width:218px;"
@
keyup
.
native=
"checkPrice(addMsg,'SiblingRatio')"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"同级返佣数量"
>
<el-input
v-model=
"addMsg.SiblingRebatesNum"
style=
"width:218px;"
@
keyup
.
native=
"checkInteger(addMsg,'SiblingRebatesNum')"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否可以购买"
>
<el-select
v-model=
"addMsg.IsCanBuy"
placeholder=
"请选择"
>
<el-option
label=
"是"
:value=
"1"
></el-option>
<el-option
label=
"否"
:value=
"2"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"购买金额"
>
<el-input
v-model=
"addMsg.BuyMoney"
style=
"width:218px;"
@
keyup
.
native=
"checkPrice(addMsg,'BuyMoney')"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否可以升级"
>
<el-select
v-model=
"addMsg.IsUpgrade"
placeholder=
"请选择"
>
<el-option
label=
"是"
:value=
"1"
></el-option>
<el-option
label=
"否"
:value=
"2"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"小数类型"
>
<el-select
v-model=
"addMsg.DecimalType"
placeholder=
"请选择"
>
<el-option
label=
"取整"
:value=
"1"
></el-option>
<el-option
label=
"保留两位小数"
:value=
"2"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"升级所需下级等级"
>
<el-select
v-model=
"addMsg.UpgradeId"
placeholder=
"请选择"
>
<el-option
v-for=
"(item,index) in UpgradeIdList"
:key=
"index"
:label=
"item.GradeName"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"升级所需下级等级数量"
>
<el-input
v-model=
"addMsg.UpgradeNum"
style=
"width:218px;"
@
keyup
.
native=
"checkInteger(addMsg,'UpgradeNum')"
></el-input>
</el-form-item>
</el-col>
</el-row>
</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>
<!-- 预览弹窗 -->
<el-dialog
title=
"预览"
:visible
.
sync=
"viewdialog"
width=
"900px"
>
<table
class=
"commonTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<th
v-for=
"(item,index) in viewData.TitleList"
:key=
"index"
>
{{item}}
</th>
</tr>
<tr
v-for=
"(item,index) in viewData.ContenList"
:key=
"index"
>
<td
v-for=
"(subItem,subIndex) in item"
:key=
"subIndex"
>
{{subItem}}
</td>
</tr>
</table>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"viewdialog = false"
>
关闭
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
loading
:
false
,
commonTitle
:
'新增'
,
disList
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
GradeName
:
''
},
total
:
0
,
tableData
:
[],
dialogVisible
:
false
,
//预览弹窗
viewdialog
:
false
,
addMsg
:
{
Id
:
0
,
//等级id
Grade
:
1
,
//等级
GradeName
:
''
,
//等级名称
IsGuest
:
1
,
//是否普通会员 1是 2否
CommissionRatio
:
0
,
//返佣比例
SiblingRatio
:
0
,
//同级返佣比例
SiblingRebatesNum
:
0
,
//可拿同级返佣的数量
IsCanBuy
:
1
,
//是否可以购买 1是 2否
BuyMoney
:
0
,
//购买金额
IsUpgrade
:
1
,
//是否可以升级 1是 2否
UpgradeNum
:
0
,
//升级所需下级等级数量
UpgradeId
:
1
,
//升序所需下级等级id
DecimalType
:
1
//小数类型
},
//分销商选择等级
numList
:
[],
//升序所需下级等级id
UpgradeIdList
:
[],
rules
:
{
Grade
:
[{
required
:
true
,
message
:
'请选择分销商等级'
,
trigger
:
'change'
}],
GradeName
:
[{
required
:
true
,
message
:
'请输入分销商等级名称'
,
trigger
:
'blur'
}],
IsGuest
:
[{
required
:
true
,
message
:
'是否普通会员'
,
trigger
:
'change'
}],
},
//预览数据
viewData
:
[]
};
},
created
()
{
this
.
numList
=
[]
for
(
let
i
=
1
;
i
<
11
;
i
++
)
{
let
obj
=
{
Id
:
i
,
dis
:
false
,
}
this
.
numList
.
push
(
obj
)
}
},
methods
:
{
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/user/GetFXDistributorGradePageList"
,
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
;
this
.
numList
.
forEach
(
item
=>
{
this
.
tableData
.
forEach
(
val
=>
{
if
(
item
.
Id
==
val
.
Id
){
item
.
dis
=
true
;
}
})
})
}
})
},
getUpgradeId
()
{
let
msg
=
{
GradeName
:
''
}
this
.
apipost
(
"/api/user/GetFXDistributorGradeList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
UpgradeIdList
=
res
.
data
.
data
;
}
})
},
//新增
AddDig
()
{
this
.
commonTitle
=
'新增'
;
this
.
dialogVisible
=
true
;
this
.
addMsg
=
{
Id
:
0
,
Grade
:
1
,
GradeName
:
''
,
IsGuest
:
1
,
CommissionRatio
:
0
,
//返佣比例
SiblingRatio
:
0
,
//同级返佣比例
SiblingRebatesNum
:
0
,
//可拿同级返佣的数量
IsCanBuy
:
1
,
//是否可以购买 1是 2否
BuyMoney
:
0
,
//购买金额
IsUpgrade
:
1
,
//是否可以升级 1是 2否
UpgradeNum
:
0
,
//升级所需下级等级数量
UpgradeId
:
1
,
//升序所需下级等级id
DecimalType
:
1
//小数类型
}
},
//修改
Edit
(
item
)
{
this
.
commonTitle
=
'修改'
;
this
.
dialogVisible
=
true
;
this
.
addMsg
=
Object
.
assign
({},
item
);
},
//删除
Delete
(
row
)
{
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/user/DelFXDistributorGradeInfo"
,
{
GradeId
:
row
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
null
);
});
},
//保存
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
apipost
(
"/api/user/SetFXDistributorGradeInfo"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getList
();
this
.
dialogVisible
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
else
{
return
false
;
}
});
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//预览
getView
()
{
this
.
viewdialog
=
true
;
this
.
apipost
(
"/api/user/GetFXDistributorGradeView"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
viewData
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
},
mounted
()
{
this
.
getList
();
this
.
getUpgradeId
();
}
};
</
script
>
<
style
>
.fxDistribution
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
}
.fxDistribution
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.fxDistribution
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
width
:
100%
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
margin-right
:
20px
;
}
.fxDistribution
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
</
style
>
src/router/index.js
View file @
98f4847d
...
@@ -220,6 +220,12 @@ export default new Router({
...
@@ -220,6 +220,12 @@ export default new Router({
name
:
'customSet'
,
name
:
'customSet'
,
component
:
resolve
=>
require
([
'@/components/UserMan/customSet'
],
resolve
),
component
:
resolve
=>
require
([
'@/components/UserMan/customSet'
],
resolve
),
},
},
// 用户管理 分销商管理 粉象分销等级
{
path
:
'/fxDistribution'
,
name
:
'fxDistribution'
,
component
:
resolve
=>
require
([
'@/components/UserMan/fxDistribution'
],
resolve
),
},
// 用户管理 分销商管理 分销商等级
// 用户管理 分销商管理 分销商等级
{
{
path
:
'/distributorLevel'
,
path
:
'/distributorLevel'
,
...
...
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