Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
a0aca35a
Commit
a0aca35a
authored
Nov 11, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增投稿提成
parent
09bd1eb1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1426 additions
and
1 deletion
+1426
-1
index.js
src/api/finance/index.js
+85
-0
CommissionUserDetailList.vue
...pages/financial/contribution/CommissionUserDetailList.vue
+235
-0
commissionStatistics.vue
src/pages/financial/contribution/commissionStatistics.vue
+349
-0
commissionUserList.vue
src/pages/financial/contribution/commissionUserList.vue
+245
-0
contributeCommission.vue
src/pages/financial/contribution/contributeCommission.vue
+393
-0
toConfigure.vue
src/pages/financial/contribution/toConfigure.vue
+92
-0
routes.js
src/router/routes.js
+27
-1
No files found.
src/api/finance/index.js
View file @
a0aca35a
...
@@ -492,6 +492,91 @@ export function createWeChatCodeForReceipt(data) {
...
@@ -492,6 +492,91 @@ export function createWeChatCodeForReceipt(data) {
data
data
})
})
}
}
//获取投稿提成配置
export
function
getTeacherContributeConfig
(
data
)
{
return
request
({
url
:
'/TeachingRewards/GetTeacherContributeConfig'
,
method
:
'post'
,
data
})
}
//设置投稿提成配置
export
function
setTeacherContributeConfig
(
data
)
{
return
request
({
url
:
'/TeachingRewards/SetTeacherContributeConfig'
,
method
:
'post'
,
data
})
}
//获取投稿提成期数分页列表
export
function
getTeaConCommissionPeriodsPageList
(
data
)
{
return
request
({
url
:
'/TeachingRewards/GetTeaConCommissionPeriodsPageList'
,
method
:
'post'
,
data
})
}
//创建投稿提成
export
function
SetTeaConCommissionInfo
(
data
)
{
return
request
({
url
:
'/TeachingRewards/SetTeaConCommissionInfo'
,
method
:
'post'
,
data
})
}
//获取投稿提成用户列表
export
function
getTeaConCommissionUserList
(
data
)
{
return
request
({
url
:
'/TeachingRewards/GetTeaConCommissionUserList'
,
method
:
'post'
,
data
})
}
//获取投稿提成明细列表
export
function
getTeaConCommissionUserDetailList
(
data
)
{
return
request
({
url
:
'/TeachingRewards/GetTeaConCommissionUserDetailList'
,
method
:
'post'
,
data
})
}
//投稿提成统计
export
function
getTeaConCommissionStatistics
(
data
)
{
return
request
({
url
:
'/TeachingRewards/GetTeaConCommissionStatistics'
,
method
:
'post'
,
data
})
}
//获取投稿提成期数下拉列表
export
function
getTeaConCommissionPeriodsList
(
data
)
{
return
request
({
url
:
'/TeachingRewards/GetTeaConCommissionPeriodsList'
,
method
:
'post'
,
data
})
}
//获取投稿提成发放人员列表
export
function
getTeaConCommissionSendEmployeeList
(
data
)
{
return
request
({
url
:
'/TeachingRewards/GetTeaConCommissionSendEmployeeList'
,
method
:
'post'
,
data
})
}
//设置提成发放人员
export
function
setTeaConCommissionSendEmployee
(
data
)
{
return
request
({
url
:
'/TeachingRewards/SetTeaConCommissionSendEmployee'
,
method
:
'post'
,
data
})
}
src/pages/financial/contribution/CommissionUserDetailList.vue
0 → 100644
View file @
a0aca35a
<
style
>
.baseSet_Title
{
width
:
120px
!important
;
padding
:
18px
0
0
16px
;
text-align
:
right
;
}
.userCommissionDetails
.border-bottom
{
/* border-bottom: 1px dashed #EEE; */
padding-bottom
:
5px
;
margin-bottom
:
5px
;
}
.userCommissionDetails
.text-bottom
{
height
:
32px
;
line-height
:
32px
;
margin-bottom
:
10px
;
}
.userCommissionDetails
._icon_btn
i
.icon-sousuo
{
background-color
:
#47BF8C
;
}
.userCommissionDetails
._icon_btn
i
{
width
:
30px
;
height
:
30px
;
display
:
inline-block
;
color
:
white
!important
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
30px
;
margin-right
:
10px
;
cursor
:
pointer
;
outline
:
none
;
}
.userCommissionDetails
.el-table
td
,
.el-table
th
{
padding
:
5px
0
;
}
</
style
>
<
template
>
<div
class=
"page-body userCommissionDetails"
>
<div
class=
"page-search row items-center"
>
<div
style=
"margin-right: 10px;"
>
<q-btn
color=
"primary"
size=
"11px"
label=
"返回"
@
click=
"goreturn"
style=
"margin-left:10px"
/>
</div>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-select
filled
stack-label
input-debounce=
"0"
option-value=
"TId"
@
input=
"getList"
option-label=
"TeacherName"
v-model=
"msg.TeacherId"
:options=
"TeacherList"
label=
"老师"
:dense=
"false"
emit-value
map-options
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
<div
class=
"col-3"
>
<q-input
filled
v-model=
"msg.OrderId"
@
keyup
.
enter
.
native=
"getList()"
label=
"订单号"
/>
</div>
</div>
</div>
<
template
>
<el-table
ref=
"filterTable"
:data=
"tableData"
v-loading=
'loading'
:header-cell-style=
"
{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
<el-table-column
prop=
"SchoolName"
width=
'150'
label=
"校区"
></el-table-column>
<el-table-column
prop=
"DeptName"
label=
"部门"
></el-table-column>
<el-table-column
prop=
"TeacherName"
label=
"教师"
></el-table-column>
<el-table-column
width=
'250'
prop=
"ContributeTitle"
label=
"投稿标题"
>
</el-table-column>
<el-table-column
prop=
"ContributeType"
label=
"投稿类型"
>
</el-table-column>
<el-table-column
prop=
"CommissionMoney"
label=
"提成金额"
>
</el-table-column>
<el-table-column
width=
'90'
prop=
"Periods"
label=
"期数"
>
</el-table-column>
<el-table-column
prop=
"Remark"
width=
'160'
label=
"备注"
>
</el-table-column>
</el-table>
</
template
>
</div>
</template>
<
script
>
import
{
GetClassTypePageList
,
}
from
'../../../api/system/index'
;
import
{
getTeaConCommissionUserDetailList
,
}
from
'../../../api/finance/index'
import
{
getClassDropDownList
,
getTeacherDropDownList
}
from
"../../../api/school/index"
;
export
default
{
meta
:
{
title
:
"用户提成明细"
},
props
:
{},
components
:
{},
data
()
{
return
{
loading
:
false
,
//列表数据参数
msg
:
{
PeriodId
:
0
,
TeacherId
:
0
,
},
pageCount
:
0
,
persistent
:
false
,
listData
:
{},
tableData
:
[],
company
:
[],
department
:
[],
ClassList
:
[],
allClassList
:
[],
TeacherList
:
[],
allTeacherList
:
[],
}
},
created
()
{
},
mounted
()
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
preriodId
)
{
this
.
msg
.
PeriodId
=
this
.
$route
.
query
.
preriodId
}
this
.
getList
()
// this.setClass()
this
.
GetTeacherList
()
},
methods
:
{
getList
()
{
if
(
this
.
msg
)
this
.
loading
=
true
;
getTeaConCommissionUserDetailList
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
loading
=
false
;
this
.
tableData
=
res
.
Data
if
(
this
.
tableData
.
length
>
0
)
{
this
.
getAskfor
()
}
}
})
},
getAskfor
()
{
//求值
let
obj
=
{
SchoolName
:
'合计'
,
CommissionMoney
:
0
,
}
this
.
tableData
.
forEach
((
x
)
=>
{
if
(
x
.
CommissionMoney
)
{
obj
.
CommissionMoney
=
this
.
accAdd
(
x
.
CommissionMoney
,
obj
.
CommissionMoney
)
};
})
this
.
tableData
.
push
(
obj
)
},
accAdd
(
arg1
,
arg2
)
{
//js 加法精确计算
var
r1
,
r2
,
m
;
try
{
r1
=
arg1
.
toString
().
split
(
"."
)[
1
].
length
;
}
catch
(
e
)
{
r1
=
0
;
}
try
{
r2
=
arg2
.
toString
().
split
(
"."
)[
1
].
length
;
}
catch
(
e
)
{
r2
=
0
;
}
m
=
Math
.
pow
(
10
,
Math
.
max
(
r1
,
r2
));
return
(
arg1
*
m
+
arg2
*
m
)
/
m
;
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
jsonData
=
res
.
Data
;
jsonData
.
unshift
({
TeacherName
:
'不限'
,
TId
:
0
})
// this.allTeacherList = JSON.parse(JSON.stringify(jsonData));;
this
.
TeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
}
})
},
//选择班级
setClass
(
item
)
{
this
.
isShowClass
=
true
;
getClassDropDownList
({
CourseId
:
0
,
IsAddDefault
:
1
,
//添加默认选项
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
jsonData
=
res
.
Data
;
if
(
jsonData
&&
jsonData
.
length
>
0
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
this
.
allClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));;
}
}
});
},
//筛选老师
filterFn
(
val
,
update
)
{
console
.
log
(
val
)
update
(()
=>
{
if
(
val
===
''
)
{
this
.
TeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allTeacherList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
TeacherList
=
this
.
allTeacherList
.
filter
(
v
=>
v
.
TeacherName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
this
.
$forceUpdate
();
})
},
goreturn
()
{
this
.
$router
.
go
(
-
1
);
},
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/pages/financial/contribution/commissionStatistics.vue
0 → 100644
View file @
a0aca35a
This diff is collapsed.
Click to expand it.
src/pages/financial/contribution/commissionUserList.vue
0 → 100644
View file @
a0aca35a
<
style
>
.baseSet_Title
{
width
:
120px
!important
;
padding
:
18px
0
0
16px
;
text-align
:
right
;
}
.CommissionDetail
.border-bottom
{
/* border-bottom: 1px dashed #EEE; */
padding-bottom
:
5px
;
margin-bottom
:
5px
;
}
.CommissionDetail
.text-bottom
{
height
:
32px
;
line-height
:
32px
;
margin-bottom
:
10px
;
}
.CommissionDetail
._icon_btn
i
.icon-sousuo
{
background-color
:
#47BF8C
;
}
.CommissionDetail
._icon_btn
i
{
width
:
26px
;
height
:
26px
;
display
:
inline-block
;
color
:
white
!important
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
26px
;
margin-right
:
10px
;
cursor
:
pointer
;
outline
:
none
;
}
.CommissionDetail
.el-table
td
,
.el-table
th
{
padding
:
5px
0
;
}
</
style
>
<
template
>
<div
class=
"page-body CommissionDetail"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<!--
<div
class=
"col-3"
>
<q-select
filled
stack-label
use-input
input-debounce=
"0"
option-value=
"ClassId"
clearable
@
input=
"getList"
option-label=
"ClassName"
v-model=
"msg.ClassId"
:options=
"ClassList"
label=
"班级"
:dense=
"false"
emit-value
map-options
@
filter=
"filterFn"
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
<div
class=
"col-3"
>
<q-input
filled
v-model=
"msg.OrderId"
@
keyup
.
enter
.
native=
"getList()"
label=
"订单号"
/>
</div>
-->
<div
class=
"col-3"
>
<q-btn
color=
"primary"
size=
"11px"
label=
"返回"
@
click=
"goreturn"
style=
"margin-left:10px"
/>
</div>
</div>
</div>
<
template
>
<el-table
ref=
"filterTable"
:data=
"tableData"
v-loading=
'loading'
:header-cell-style=
"
{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
<el-table-column
prop=
"SchoolName"
label=
"校区"
:filters=
'SchoolNamelist'
:filter-method=
"filterHandler"
>
</el-table-column>
<el-table-column
prop=
"DeptName"
label=
"部门"
:filters=
'DeptNamelist'
:filter-method=
"filterHandler"
>
</el-table-column>
<el-table-column
prop=
"CommissionMoney"
label=
"提成金额"
sortable
:sort-method=
"CommissionMoney"
>
</el-table-column>
<!--
<el-table-column
prop=
"Periods"
label=
"周期"
>
</el-table-column>
-->
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<div
class=
"_icon_btn"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"查看"
placement=
"top"
>
<i
class=
"iconfont icon-sousuo"
@
click=
"goUrl('contribution/CommissionUserDetailList',scope.row.UserId)"
></i>
</el-tooltip>
</div>
</
template
>
</el-table-column>
</el-table>
</template>
</div>
</template>
<
script
>
import
{
getTeaConCommissionUserList
,
}
from
'../../../api/finance/index'
import
{
getClassDropDownList
,
}
from
"../../../api/school/index"
;
export
default
{
meta
:
{
title
:
"销售提成详情"
},
props
:
{},
components
:
{},
data
()
{
return
{
loading
:
false
,
//列表数据参数
msg
:
{
PeriodId
:
0
,
},
pageCount
:
0
,
persistent
:
false
,
listData
:
{},
tableData
:
[],
company
:
[],
department
:
[],
ClassList
:
[],
allClassList
:
[],
see_tcdetailed
:
false
,
SchoolNamelist
:
[],
DeptNamelist
:
[],
UserNamelist
:
[],
}
},
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
userinfo
.
ActionMenuList
.
map
(
x
=>
{
//判断权限
if
(
x
.
FunctionCode
==
"see_tcdetailed"
)
{
//判断是否可以查看其他明细
this
.
see_tcdetailed
=
true
;
}
})
},
mounted
()
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
id
)
{
this
.
msg
.
PeriodId
=
this
.
$route
.
query
.
id
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
School_Id
)
{
this
.
msg
.
School_Id
=
this
.
$route
.
query
.
School_Id
}
this
.
getList
()
// this.setClass()
},
methods
:
{
getList
()
{
if
(
this
.
msg
)
this
.
loading
=
true
;
getTeaConCommissionUserList
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
loading
=
false
;
this
.
tableData
=
res
.
Data
;
this
.
SchoolNamelist
=
[];
this
.
DeptNamelist
=
[];
this
.
UserNamelist
=
[];
this
.
tableData
.
forEach
(
x
=>
{
let
obj
=
{
text
:
x
.
SchoolName
,
value
:
x
.
SchoolName
}
let
obj2
=
{
text
:
x
.
DeptName
,
value
:
x
.
DeptName
}
let
obj3
=
{
text
:
x
.
UserName
,
value
:
x
.
UserName
}
this
.
SchoolNamelist
.
push
(
obj
)
this
.
DeptNamelist
.
push
(
obj2
)
this
.
UserNamelist
.
push
(
obj3
)
})
this
.
SchoolNamelist
=
this
.
unique
(
this
.
SchoolNamelist
)
this
.
DeptNamelist
=
this
.
unique
(
this
.
DeptNamelist
)
this
.
UserNamelist
=
this
.
unique
(
this
.
UserNamelist
)
}
})
},
unique
(
arr
,
Name
)
{
//数组去重
const
res
=
new
Map
();
return
arr
.
filter
(
(
list
)
=>
!
res
.
has
(
list
.
text
)
&&
res
.
set
(
list
.
text
,
1
)
);
},
//选择班级
setClass
(
item
)
{
this
.
isShowClass
=
true
;
getClassDropDownList
({
CourseId
:
0
,
IsAddDefault
:
1
,
//添加默认选项
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
jsonData
=
res
.
Data
;
if
(
jsonData
&&
jsonData
.
length
>
0
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
this
.
allClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));;
}
}
});
},
//筛选员工
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allClassList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
ClassList
=
this
.
allClassList
.
filter
(
v
=>
v
.
ClassName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
path
:
'/financial/'
+
path
,
query
:
{
userId
:
id
,
preriodId
:
this
.
$route
.
query
.
id
,
blank
:
'y'
,
}
})
},
filterHandler
(
value
,
row
,
column
)
{
const
property
=
column
[
'property'
];
return
row
[
property
]
===
value
;
},
CommissionMoney
(
a
,
b
)
{
return
a
.
CommissionMoney
-
b
.
CommissionMoney
;
},
goreturn
()
{
this
.
$router
.
go
(
-
1
);
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/pages/financial/contribution/contributeCommission.vue
0 → 100644
View file @
a0aca35a
This diff is collapsed.
Click to expand it.
src/pages/financial/contribution/toConfigure.vue
0 → 100644
View file @
a0aca35a
<
style
>
</
style
>
<
template
>
<div
class=
"page-body salesRules"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
filled
v-model=
"Money"
label=
"提成金额"
type=
"number"
/>
</div>
<div>
<q-btn
color=
"accent"
size=
"sm"
v-if=
'isSalerule_preserve == true'
@
click=
"preservation()"
ref=
"addBtn"
label=
"保存规则"
/>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getTeacherContributeConfig
,
setTeacherContributeConfig
}
from
'../../../api/finance/index'
export
default
{
meta
:
{
title
:
"投稿提成规则"
},
props
:
{},
components
:
{},
data
()
{
return
{
Money
:
0
,
isSalerule_preserve
:
false
}
},
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
userinfo
.
ActionMenuList
.
map
(
x
=>
{
//判断权限
if
(
x
.
FunctionCode
==
"F_Contribution_rule"
){
//判断是否有保存的权限
this
.
isSalerule_preserve
=
true
;
return
}
})
},
mounted
()
{
this
.
getRule
();
//获取规则
},
methods
:
{
getRule
()
{
getTeacherContributeConfig
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
Money
=
res
.
Data
.
Money
}
})
},
preservation
()
{
//保存规则
setTeacherContributeConfig
({
Money
:
this
.
Money
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
getTeacherContributeConfig
()
}
})
},
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/router/routes.js
View file @
a0aca35a
...
@@ -653,7 +653,33 @@ const routes = [{
...
@@ -653,7 +653,33 @@ const routes = [{
component
:
()
=>
component
:
()
=>
import
(
"pages/financial/studyabroad/ordercommission.vue"
)
import
(
"pages/financial/studyabroad/ordercommission.vue"
)
},
},
{
path
:
"/financial/contribution/toConfigure"
,
//财务流程 投稿规则
component
:
()
=>
import
(
"pages/financial/contribution/toConfigure.vue"
)
},
{
path
:
"/financial/contribution/contributeCommission"
,
// 工作台 投稿销售提成
component
:
()
=>
import
(
"pages/financial/contribution/contributeCommission.vue"
)
},
{
path
:
"/financial/contribution/commissionUserList"
,
// 工作台 投稿销售提成 用户列表
component
:
()
=>
import
(
"pages/financial/contribution/commissionUserList.vue"
)
},
{
path
:
"/financial/contribution/CommissionUserDetailList"
,
// 工作台 投稿销售提成 用户详情
component
:
()
=>
import
(
"pages/financial/contribution/CommissionUserDetailList.vue"
)
},
{
path
:
"/financial/contribution/commissionStatistics"
,
// 工作台 投稿销售统计
component
:
()
=>
import
(
"pages/financial/contribution/commissionStatistics.vue"
)
},
...
...
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