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
59a07bee
Commit
59a07bee
authored
Sep 22, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
54e4e7d9
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2029 additions
and
307 deletions
+2029
-307
index.js
src/api/finance/index.js
+98
-0
sale.js
src/api/sale/sale.js
+10
-0
orderlist.vue
src/components/sale/orderlist.vue
+49
-1
commissionDetail.vue
src/pages/financial/studyabroad/commissionDetail.vue
+228
-0
ordercommission.vue
src/pages/financial/studyabroad/ordercommission.vue
+320
-0
sBuserCommissionDetails.vue
src/pages/financial/studyabroad/sBuserCommissionDetails.vue
+319
-0
studyAbroadCommission.vue
src/pages/financial/studyabroad/studyAbroadCommission.vue
+401
-0
studyAbroadCommissionTJ.vue
src/pages/financial/studyabroad/studyAbroadCommissionTJ.vue
+409
-0
studyAbroadRules.vue
src/pages/financial/studyabroad/studyAbroadRules.vue
+167
-306
routes.js
src/router/routes.js
+28
-0
No files found.
src/api/finance/index.js
View file @
59a07bee
...
@@ -322,4 +322,102 @@ export function getActivityCommissionPeriodsList(data) {
...
@@ -322,4 +322,102 @@ export function getActivityCommissionPeriodsList(data) {
});
});
}
}
// 获取留学提成规则
export
function
getSellStudyAbroadRuleList
(
data
)
{
return
request
({
url
:
'/SellCommission/GetSellStudyAbroadRuleList'
,
method
:
'post'
,
data
});
}
// 新增修改留学提成
export
function
setSellStudyAbroadRule
(
data
)
{
return
request
({
url
:
'/SellCommission/SetSellStudyAbroadRule'
,
method
:
'post'
,
data
});
}
// 新增修改留学提成
export
function
getSellStudyAbroadPeriodsPageList
(
data
)
{
return
request
({
url
:
'/SellCommission/GetSellStudyAbroadPeriodsPageList'
,
method
:
'post'
,
data
});
}
// 新增修改留学提成
export
function
getSellStudyAbroadUserList
(
data
)
{
return
request
({
url
:
'/SellCommission/GetSellStudyAbroadUserList'
,
method
:
'post'
,
data
});
}
// 获取留学销售提成明细列表
export
function
getSellStudyAbroadUserDetailList
(
data
)
{
return
request
({
url
:
'/SellCommission/GetSellStudyAbroadUserDetailList'
,
method
:
'post'
,
data
});
}
// 获取销售提成 - 订单跳转列表
export
function
getSellStudyAbroadForOrderList
(
data
)
{
return
request
({
url
:
'/SellCommission/GetSellStudyAbroadForOrderList'
,
method
:
'post'
,
data
});
}
// 获取留学提成统计
export
function
getSellStudyAbroadStatistics
(
data
)
{
return
request
({
url
:
'/SellCommission/GetSellStudyAbroadStatistics'
,
method
:
'post'
,
data
});
}
// 获取留学提成统计
export
function
getSellStudyAbroadPeriodsList
(
data
)
{
return
request
({
url
:
'/SellCommission/GetSellStudyAbroadPeriodsList'
,
method
:
'post'
,
data
});
}
// 生成留学提成
export
function
setSellStudyAbroadInfo
(
data
)
{
return
request
({
url
:
'/SellCommission/SetSellStudyAbroadInfo'
,
method
:
'post'
,
data
});
}
//获取提成发放人员
export
function
getSellStudyAbroadSendEmployeeList
(
data
)
{
return
request
({
url
:
'/SellCommission/GetSellStudyAbroadSendEmployeeList'
,
method
:
'post'
,
data
});
}
//设置已制单人员
export
function
setSellStudyAbroadSendEmployee
(
data
)
{
return
request
({
url
:
'/SellCommission/SetSellStudyAbroadSendEmployee'
,
method
:
'post'
,
data
});
}
src/api/sale/sale.js
View file @
59a07bee
...
@@ -367,3 +367,13 @@ export function regressSourceClass(data) {
...
@@ -367,3 +367,13 @@ export function regressSourceClass(data) {
data
data
})
})
}
}
// 留学订单确认完成
export
function
setStudyAboradOrderConfirm
(
data
)
{
return
request
({
url
:
'/SellCommission/SetStudyAboradOrderConfirm'
,
method
:
'post'
,
data
});
}
src/components/sale/orderlist.vue
View file @
59a07bee
...
@@ -332,6 +332,24 @@
...
@@ -332,6 +332,24 @@
</q-item-section>
</q-item-section>
</q-item>
</q-item>
</div>
</div>
<div
v-if=
"item.OrderType==2"
>
<q-item
clickable
v-close-popup
disabled
v-if=
"(item.DueInMoney&&item.DueInMoney!=0) "
>
<q-item-section>
<q-item-label>
订单确认
</q-item-label>
<q-tooltip
anchor=
"center left"
self=
"center right"
content-class=
"bg-red"
>
待收金额不为0,帐未平
</q-tooltip>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
v-else
>
<q-item-section
@
click=
"studyabroadorderconfirmation(item)"
>
<q-item-label>
订单确认
</q-item-label>
</q-item-section>
</q-item>
</div>
<q-item
clickable
v-close-popup
v-if=
"AuthorityObj.isShowBackClass"
>
<q-item
clickable
v-close-popup
v-if=
"AuthorityObj.isShowBackClass"
>
<q-item-section>
<q-item-section>
<q-item-label
@
click=
"showBackClassForm(item)"
>
退课
</q-item-label>
<q-item-label
@
click=
"showBackClassForm(item)"
>
退课
</q-item-label>
...
@@ -931,6 +949,7 @@
...
@@ -931,6 +949,7 @@
setOrderHelpEnterId
,
//老师关联
setOrderHelpEnterId
,
//老师关联
cancelClassOrder
,
//取消订单
cancelClassOrder
,
//取消订单
regressSourceClass
,
//拆分订单回到原班
regressSourceClass
,
//拆分订单回到原班
setStudyAboradOrderConfirm
,
//留学订单确认
}
from
'../../api/sale/sale'
}
from
'../../api/sale/sale'
import
{
import
{
...
@@ -1613,7 +1632,36 @@
...
@@ -1613,7 +1632,36 @@
this
.
$emit
(
'success'
);
this
.
$emit
(
'success'
);
}
}
})
})
},
studyabroadorderconfirmation
(
item
){
//留学订单确认
console
.
log
(
item
)
let
that
=
this
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'<span style="color: var(--q-color-negative)">是否完成此订单</span>'
,
cancel
:
true
,
persistent
:
true
,
html
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
setStudyAboradOrderConfirm
({
OrderId
:
item
.
OrderId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功'
,
position
:
'top'
})
//调用父页面成功方法
this
.
$emit
(
'success'
);
}
}
})
})
},
}
}
}
}
...
...
src/pages/financial/studyabroad/commissionDetail.vue
0 → 100644
View file @
59a07bee
<
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-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=
"UserName"
label=
"销售"
:filters=
'UserNamelist'
:filter-method=
"filterHandler"
>
</el-table-column>
<el-table-column
prop=
"StudentCount"
label=
"客人数量"
sortable
:sort-method=
"StudentCount"
>
</el-table-column>
<el-table-column
prop=
"CommissionMoney"
label=
"订单提成"
sortable
:sort-method=
"CommissionMoney"
>
</el-table-column>
<el-table-column
prop=
"OtherMoney"
label=
"额外奖励"
sortable
:sort-method=
"OtherMoney"
></el-table-column>
<el-table-column
prop=
"BackMoney"
label=
"额外扣除"
sortable
:sort-method=
"BackMoney"
></el-table-column>
<el-table-column
prop=
"FinalCommission"
label=
"最终提成"
sortable
:sort-method=
"FinalCommission"
>
</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('studyabroad/sBuserCommissionDetails',scope.row.UserId)"
></i>
</el-tooltip>
</div>
</
template
>
</el-table-column>
</el-table>
</template>
</div>
</template>
<
script
>
import
{
GetClassTypePageList
,
}
from
'../../../api/system/index'
;
import
{
getSellStudyAbroadUserList
,
}
from
'../../../api/finance/index'
import
{
getClassDropDownList
,
}
from
"../../../api/school/index"
;
export
default
{
meta
:
{
title
:
"销售提成详情"
},
props
:
{},
components
:
{},
data
()
{
return
{
loading
:
false
,
//列表数据参数
msg
:
{
PeriodId
:
0
,
UserId
:
0
,
SourceId
:
0
,
OrderId
:
''
,
School_Id
:
'-1'
,
},
pageCount
:
0
,
persistent
:
false
,
listData
:
{},
tableData
:
[],
company
:
[],
department
:
[],
see_tcdetailed
:
false
,
SchoolNamelist
:
[],
DeptNamelist
:
[],
UserNamelist
:
[],
}
},
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
userinfo
.
ActionMenuList
.
map
(
x
=>
{
//判断权限
if
(
x
.
FunctionCode
==
"see_tcdetailed"
)
{
//判断是否可以查看其他明细
this
.
see_tcdetailed
=
true
;
}
})
if
(
this
.
see_tcdetailed
==
false
)
{
this
.
msg
.
UserId
=
userinfo
.
Id
}
},
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
()
},
methods
:
{
getList
()
{
if
(
this
.
msg
)
this
.
loading
=
true
;
getSellStudyAbroadUserList
(
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
)
);
},
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
;
},
StudentCount
(
a
,
b
,
c
)
{
return
a
.
StudentCount
-
b
.
StudentCount
;
},
BackMoney
(
a
,
b
)
{
return
a
.
BackMoney
-
b
.
BackMoney
;
},
OtherMoney
(
a
,
b
)
{
return
a
.
OtherMoney
-
b
.
OtherMoney
;
},
CommissionMoney
(
a
,
b
)
{
return
a
.
CommissionMoney
-
b
.
CommissionMoney
;
},
FinalCommission
(
a
,
b
)
{
return
a
.
FinalCommission
-
b
.
FinalCommission
;
},
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/studyabroad/ordercommission.vue
0 → 100644
View file @
59a07bee
<
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
use-input
input-debounce=
"0"
option-value=
"Id"
clearable
@
input=
"getList"
option-label=
"Name"
v-model=
"msg.SourceId"
:options=
"StudyAbroadList"
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>
</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=
"UserName"
label=
"销售"
>
</el-table-column>
<el-table-column
prop=
"SourceName"
label=
"项目名称"
>
</el-table-column>
<el-table-column
width=
'170'
prop=
"ClassName"
label=
"客人信息"
>
<template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.SourceType"
>
类型:
{{
scope
.
row
.
SourceType
==
1
?
'留学'
:
'就业'
}}
</div>
<div
v-if=
"scope.row.StudentCount"
>
客人数量:
{{
scope
.
row
.
StudentCount
}}
人
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"OrderId"
label=
"订单号"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.OrderId"
style=
"cursor: pointer;text-decoration: underline;"
@
click=
"goUrlorderList('/sale/orderStatistics',scope.row)"
>
{{
scope
.
row
.
OrderId
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"CommissionMoney"
label=
"订单提成"
></el-table-column>
<el-table-column
prop=
"OtherMoney"
label=
"额外奖励"
></el-table-column>
<el-table-column
prop=
"BackMoney"
label=
"额外扣除"
></el-table-column>
<el-table-column
prop=
"YFMoney"
label=
"最终发放"
>
<
template
slot-scope=
"scope"
>
<div
style=
"color: rgb(233, 82, 82);"
>
{{
scope
.
row
.
YFMoney
}}
</div>
</
template
>
</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
{
getSellStudyAbroadForOrderList
,
}
from
'../../../api/finance/index'
import
{
getClassDropDownList
,
}
from
"../../../api/school/index"
;
import
{
queryStudyAbroadPage
}
from
'../../../api/studyabroad/index'
export
default
{
meta
:
{
title
:
"留学销售提成列表"
},
props
:
{},
components
:
{},
data
()
{
return
{
loading
:
false
,
//列表数据参数
msg
:
{
PeriodId
:
0
,
UserId
:
0
,
SourceId
:
'-1'
,
OrderId
:
1
,
UserIds
:
''
,
},
pageCount
:
0
,
persistent
:
false
,
listData
:
{},
tableData
:
[],
company
:
[],
department
:
[],
StudyAbroadList
:
[],
allStudyAbroadList
:
[],
}
},
created
()
{},
mounted
()
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
userId
)
{
this
.
msg
.
UserId
=
this
.
$route
.
query
.
userId
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
preriodId
)
{
this
.
msg
.
PeriodId
=
this
.
$route
.
query
.
preriodId
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
UserIds
)
{
this
.
msg
.
UserIds
=
this
.
$route
.
query
.
UserIds
}
console
.
log
(
this
.
msg
.
PeriodId
)
this
.
getList
()
this
.
getStudyAbroad
()
},
methods
:
{
getList
()
{
if
(
this
.
msg
)
this
.
loading
=
true
;
if
(
this
.
msg
.
SourceId
==
''
||
this
.
msg
.
SourceId
==
null
){
this
.
msg
.
SourceId
=
'-1'
}
getSellStudyAbroadForOrderList
(
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
:
'合计'
,
YFMoney
:
0
,
}
this
.
tableData
.
forEach
((
x
)
=>
{
if
(
x
.
YFMoney
)
{
obj
.
YFMoney
=
this
.
accAdd
(
x
.
YFMoney
,
obj
.
YFMoney
)
};
})
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
;
},
getStudyAbroad
()
{
let
msg
=
{
pageIndex
:
0
,
pageSize
:
9000
,
Name
:
""
,
IsQPrice
:
1
,
Type
:
-
1
,
//项目类型
SaleState
:
3
,
//已上架
}
queryStudyAbroadPage
(
msg
).
then
(
res
=>
{
let
data
=
res
.
Data
.
PageData
let
obj
=
{
Name
:
'不限'
,
Id
:
'-1'
}
data
.
unshift
(
obj
)
this
.
StudyAbroadList
=
data
;
this
.
allStudyAbroadList
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
})
.
catch
(()
=>
{
});
},
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
StudyAbroadList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allStudyAbroadList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
StudyAbroadList
=
this
.
allStudyAbroadList
.
filter
(
v
=>
v
.
Name
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
path
:
'/financial/'
+
path
,
query
:
{
"id"
:
id
,
blank
:
'y'
,
tab
:
'单据详情'
}
})
},
filterHandler
(
value
,
row
,
column
)
{
const
property
=
column
[
'property'
];
return
row
[
property
]
===
value
;
},
StudentCount
(
a
,
b
)
{
return
a
.
StudentCount
-
b
.
StudentCount
;
},
goorderUrl
(
row
)
{
this
.
$router
.
push
({
path
:
'/financial/cycleOrderList'
,
query
:
{
OrderId
:
row
.
OrderId
,
UserId
:
row
.
UserId
,
blank
:
'y'
,
}
})
},
goreturn
()
{
this
.
$router
.
go
(
-
1
);
},
goUrlorderList
(
path
,
row
){
//订单跳转
this
.
OpenNewUrl
(
path
,
{
OrderId
:
row
.
OrderId
,
// EnterID:row.UserId
});
},
goUrlclass
(
path
,
Names
){
//班级
let
Name
=
encodeURI
(
Names
)
this
.
OpenNewUrl
(
path
,
{
ClassName
:
Name
,
});
},
goUrlkehao
(
path
,
row
){
//跳转到学生课耗
let
StartMonth
=
''
let
EndMonth
=
''
if
(
row
.
IsFirstCommission
==
1
){
EndMonth
=
row
.
Periods
}
else
{
if
(
row
.
Periods
.
indexOf
(
'~'
)
!=-
1
){
StartMonth
=
row
.
Periods
.
split
(
'~'
)[
0
];
EndMonth
=
row
.
Periods
.
split
(
'~'
)[
1
];
}
else
{
StartMonth
=
row
.
Periods
;
EndMonth
=
row
.
Periods
}
}
this
.
OpenNewUrl
(
path
,
{
OrderId
:
row
.
OrderId
,
StartMonth
:
StartMonth
,
EndMonth
:
EndMonth
,
comefrom
:
1
,
});
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/pages/financial/studyabroad/sBuserCommissionDetails.vue
0 → 100644
View file @
59a07bee
<
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
use-input
input-debounce=
"0"
option-value=
"Id"
clearable
@
input=
"getList"
option-label=
"Name"
v-model=
"msg.SourceId"
:options=
"StudyAbroadList"
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>
</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=
"UserName"
label=
"销售"
>
</el-table-column>
<el-table-column
prop=
"SourceName"
label=
"项目名称"
>
</el-table-column>
<el-table-column
width=
'170'
prop=
"ClassName"
label=
"客人信息"
>
<template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.SourceType"
>
类型:
{{
scope
.
row
.
SourceType
==
1
?
'留学'
:
'就业'
}}
</div>
<div
v-if=
"scope.row.StudentCount"
>
客人数量:
{{
scope
.
row
.
StudentCount
}}
人
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"OrderId"
label=
"订单号"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.OrderId"
style=
"cursor: pointer;text-decoration: underline;"
@
click=
"goUrlorderList('/sale/studyOrderStatistics',scope.row)"
>
{{
scope
.
row
.
OrderId
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"CommissionMoney"
label=
"订单提成"
></el-table-column>
<el-table-column
prop=
"OtherMoney"
label=
"额外奖励"
></el-table-column>
<el-table-column
prop=
"BackMoney"
label=
"额外扣除"
></el-table-column>
<el-table-column
prop=
"YFMoney"
label=
"最终发放"
>
<
template
slot-scope=
"scope"
>
<div
style=
"color: rgb(233, 82, 82);"
>
{{
scope
.
row
.
YFMoney
}}
</div>
</
template
>
</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
{
getSellStudyAbroadUserDetailList
,
}
from
'../../../api/finance/index'
import
{
getClassDropDownList
,
}
from
"../../../api/school/index"
;
import
{
queryStudyAbroadPage
}
from
'../../../api/studyabroad/index'
export
default
{
meta
:
{
title
:
"留学提成明细"
},
props
:
{},
components
:
{},
data
()
{
return
{
loading
:
false
,
//列表数据参数
msg
:
{
PeriodId
:
0
,
UserId
:
0
,
SourceId
:
'-1'
,
OrderId
:
''
,
UserIds
:
''
,
},
pageCount
:
0
,
persistent
:
false
,
listData
:
{},
tableData
:
[],
company
:
[],
department
:
[],
StudyAbroadList
:
[],
allStudyAbroadList
:
[],
}
},
created
()
{},
mounted
()
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
userId
)
{
this
.
msg
.
UserId
=
this
.
$route
.
query
.
userId
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
preriodId
)
{
this
.
msg
.
PeriodId
=
this
.
$route
.
query
.
preriodId
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
UserIds
)
{
this
.
msg
.
UserIds
=
this
.
$route
.
query
.
UserIds
}
this
.
getList
()
this
.
getStudyAbroad
()
},
methods
:
{
getList
()
{
if
(
this
.
msg
)
this
.
loading
=
true
;
if
(
this
.
msg
.
SourceId
==
''
||
this
.
msg
.
SourceId
==
null
){
this
.
msg
.
SourceId
=
'-1'
}
getSellStudyAbroadUserDetailList
(
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
:
'合计'
,
YFMoney
:
0
,
}
this
.
tableData
.
forEach
((
x
)
=>
{
if
(
x
.
YFMoney
)
{
obj
.
YFMoney
=
this
.
accAdd
(
x
.
YFMoney
,
obj
.
YFMoney
)
};
})
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
;
},
getStudyAbroad
()
{
let
msg
=
{
pageIndex
:
0
,
pageSize
:
9000
,
Name
:
""
,
IsQPrice
:
1
,
Type
:
-
1
,
//项目类型
SaleState
:
3
,
//已上架
}
queryStudyAbroadPage
(
msg
).
then
(
res
=>
{
let
data
=
res
.
Data
.
PageData
let
obj
=
{
Name
:
'不限'
,
Id
:
'-1'
}
data
.
unshift
(
obj
)
this
.
StudyAbroadList
=
data
;
this
.
allStudyAbroadList
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
})
.
catch
(()
=>
{
});
},
//筛选员工
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
StudyAbroadList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allStudyAbroadList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
StudyAbroadList
=
this
.
allStudyAbroadList
.
filter
(
v
=>
v
.
Name
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
path
:
'/financial/'
+
path
,
query
:
{
"id"
:
id
,
blank
:
'y'
,
tab
:
'单据详情'
}
})
},
filterHandler
(
value
,
row
,
column
)
{
const
property
=
column
[
'property'
];
return
row
[
property
]
===
value
;
},
StudentCount
(
a
,
b
)
{
return
a
.
StudentCount
-
b
.
StudentCount
;
},
goorderUrl
(
row
)
{
this
.
$router
.
push
({
path
:
'/financial/cycleOrderList'
,
query
:
{
OrderId
:
row
.
OrderId
,
UserId
:
row
.
UserId
,
blank
:
'y'
,
}
})
},
goreturn
()
{
this
.
$router
.
go
(
-
1
);
},
goUrlorderList
(
path
,
row
){
//订单跳转
this
.
OpenNewUrl
(
path
,
{
OrderId
:
row
.
OrderId
,
// EnterID:row.UserId
});
},
goUrlclass
(
path
,
Names
){
//班级
let
Name
=
encodeURI
(
Names
)
this
.
OpenNewUrl
(
path
,
{
ClassName
:
Name
,
});
},
goUrlkehao
(
path
,
row
){
//跳转到学生课耗
let
StartMonth
=
''
let
EndMonth
=
''
if
(
row
.
IsFirstCommission
==
1
){
EndMonth
=
row
.
Periods
}
else
{
if
(
row
.
Periods
.
indexOf
(
'~'
)
!=-
1
){
StartMonth
=
row
.
Periods
.
split
(
'~'
)[
0
];
EndMonth
=
row
.
Periods
.
split
(
'~'
)[
1
];
}
else
{
StartMonth
=
row
.
Periods
;
EndMonth
=
row
.
Periods
}
}
this
.
OpenNewUrl
(
path
,
{
OrderId
:
row
.
OrderId
,
StartMonth
:
StartMonth
,
EndMonth
:
EndMonth
,
comefrom
:
1
,
});
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/pages/financial/studyabroad/studyAbroadCommission.vue
0 → 100644
View file @
59a07bee
<
style
>
.baseSet_Title
{
width
:
120px
!important
;
padding
:
18px
0
0
16px
;
text-align
:
right
;
}
.salesCommission
.border-bottom
{
/* border-bottom: 1px dashed #EEE; */
padding-bottom
:
5px
;
margin-bottom
:
5px
;
}
.salesCommission
.text-bottom
{
height
:
32px
;
line-height
:
32px
;
margin-bottom
:
10px
;
}
.salesCommission
._icon_btn
i
.icon-sousuo
{
background-color
:
#47BF8C
;
}
.salesCommission
._icon_btn
.icon-add
{
background-color
:
#47BF8C
;
}
.salesCommission
._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
;
}
.salesCommission
.el-table
td
,
.el-table
th
{
padding
:
5px
0
;
}
</
style
>
<
template
>
<div
class=
"page-body salesCommission"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<!--
<div
style=
"margin-right: 20px;"
v-if=
'iscMaker==true'
>
<div
class=
"block"
>
<span
style=
"margin-right: 5px;"
>
校区
</span>
<el-select
v-model=
"msg.SchoolId"
filterable
@
change=
"handleCurrentChanges(1)"
>
<el-option
value=
"-1"
label=
"不限"
></el-option>
<el-option
v-for=
'item in CompanyList'
:label=
'item.SName'
:value=
'item.SId'
:key=
'item.SId'
></el-option>
</el-select>
</div>
</div>
-->
<div
v-if=
'isgenerate==true'
>
<div
class=
"block"
style=
"display:flex"
>
<span
style=
"margin-right: 5px;"
>
选择月份
</span>
<el-date-picker
v-model=
"value2"
type=
"month"
placeholder=
"选择月"
>
</el-date-picker>
<q-btn
:loading=
"loading1"
color=
"primary"
size=
"11px"
label=
"生成提成"
@
click=
"scCommission"
style=
"margin-left:10px"
/>
</div>
</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=
"Id"
label=
"ID"
></el-table-column>
-->
<el-table-column
prop=
"Periods"
label=
"周期"
></el-table-column>
<el-table-column
prop=
"SumPrice"
label=
"提成总金额"
>
</el-table-column>
<el-table-column
prop=
"SchooldCommission"
label=
"校区提成总金额"
>
<template
slot-scope=
"scope"
>
<div
style=
"display: flex;flex-wrap: wrap;"
v-if=
'scope.row.SchooldCommission>=0'
>
{{
scope
.
row
.
SchooldCommission
>=
0
?
scope
.
row
.
SchooldCommission
:
'-'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"FrIdList"
label=
"财务单据"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;flex-wrap: wrap;"
v-if=
'scope.row.FrIdList.length>0'
>
<span
v-for=
"(x,y) in scope.row.FrIdList"
@
click=
"gocaiwuxiangq(x)"
style=
"cursor: pointer;text-decoration: underline;margin-right: 5px; color: #409EFF;"
>
{{
x
}}
</span>
</div>
<div
v-else
>
无
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"CreateByName"
label=
"创建人"
>
</el-table-column>
<el-table-column
prop=
"CreateTime"
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(scope.row.Id)"
></i>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"制单"
placement=
"top"
v-if=
'iscMaker==true'
>
<i
class=
"iconfont icon-add"
v-if=
'iscMaker==true'
@
click=
"generalFinancacls(scope.row)"
></i>
</el-tooltip>
</div>
</
template
>
</el-table-column>
</el-table>
<div
style=
"margin-top: 10px;text-align: center;"
>
<el-pagination
background
@
current-change=
"handleCurrentChanges"
layout=
"total,prev, pager, next, jumper"
:current-page
.
sync=
"msg.PageIndex"
:page-size=
"msg.PageSize"
:total=
'total'
>
</el-pagination>
</div>
</template>
<el-dialog
title=
"设置发放用户"
width=
"700px"
:visible
.
sync=
"costmode"
center
>
<el-table
:data=
"SendEmployeeList"
border
@
selection-change=
"handleSelectionChange"
style=
"width: 100%"
>
<el-table-column
type=
"selection"
width=
"55"
:selectable=
"checkSelectable"
></el-table-column>
<el-table-column
prop=
"UserName"
label=
"用户"
>
</el-table-column>
<el-table-column
prop=
"StudentCount"
label=
"学生数量"
>
</el-table-column>
<el-table-column
prop=
"CurrentPeriodMoney"
label=
"应发提成金额"
>
</el-table-column>
<el-table-column
prop=
"IsGiveOut"
label=
"是否已发放"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
'scope.row.IsGiveOut==1'
>
已发放
</span>
<span
v-if=
'scope.row.IsGiveOut==2'
>
未发放
</span>
</
template
>
</el-table-column>
</el-table>
<div
style=
"margin-top: 10px;"
>
金额总额:{{totalAmount}}
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"hollowFixedBtn"
@
click=
"costmode=false"
>
取消
</el-button>
<el-button
class=
"normalBtn"
type=
"primary"
@
click=
"preservetransaction()"
>
确定
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
getSchoolDropdown
}
from
'../../../api/school/index'
import
{
GetClassTypePageList
,
}
from
'../../../api/system/index'
;
import
{
getSellStudyAbroadPeriodsPageList
,
setSellCommissionRule
,
setSellStudyAbroadInfo
,
getSellStudyAbroadSendEmployeeList
,
setSellStudyAbroadSendEmployee
}
from
'../../../api/finance/index'
export
default
{
meta
:
{
title
:
"留学销售提成列表"
},
props
:
{},
components
:
{},
data
()
{
return
{
loading
:
false
,
loading1
:
false
,
value2
:
''
,
//列表数据参数
msg
:
{
PageIndex
:
1
,
PageSize
:
15
,
Name
:
''
,
SchoolId
:
'-1'
},
pageCount
:
0
,
persistent
:
false
,
listData
:{},
tableData
:[],
total
:
0
,
CompanyList
:[],
isgenerate
:
false
,
//是否有生成的权限
iscMaker
:
false
,
//是否有制单的权限
SendEmployeeList
:[],
//可发放提成的用户列表
costmode
:
false
,
multipleSelection
:[],
totalAmount
:
0
,
//选中的金额总额
CheckID
:
0
,
}
},
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
userinfo
.
ActionMenuList
.
map
(
x
=>
{
//判断权限
if
(
x
.
FunctionCode
==
"Generate_Commission"
){
//判断是否有生成的权限
this
.
isgenerate
=
true
;
}
if
(
x
.
FunctionCode
==
"Commission_maker"
){
//判断是否有制单的权限
this
.
iscMaker
=
true
;
}
})
var
myDate
=
new
Date
();
myDate
.
setMonth
(
myDate
.
getMonth
()
-
1
);
this
.
value2
=
myDate
.
getFullYear
()
+
"-"
+
(
myDate
.
getMonth
()
+
1
)
},
mounted
()
{
this
.
getList
();
//获取提成周期列表
this
.
getBranchList
()
},
methods
:
{
getList
(){
this
.
loading
=
true
;
getSellStudyAbroadPeriodsPageList
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
loading
=
false
;
this
.
tableData
=
res
.
Data
.
PageData
this
.
total
=
res
.
Data
.
Count
}
})
},
scCommission
(){
//生成提成
if
(
this
.
loading1
==
false
){
this
.
loading1
=
true
;
setSellStudyAbroadInfo
({
Month
:
this
.
value2
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'生成提成成功'
,
position
:
'top'
})
this
.
getList
()
}
this
.
loading1
=
false
;
}).
catch
(
err
=>
{
this
.
loading1
=
false
;
})
}
},
getBranchList
(){
//获取校区
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
CompanyList
=
res
.
Data
;
}).
catch
(()
=>
{
})
},
goUrl
(
id
)
{
this
.
$router
.
push
({
path
:
'/financial/studyabroad/commissionDetail'
,
query
:
{
"id"
:
id
,
blank
:
'y'
,
}
})
},
gocaiwuxiangq
(
id
){
this
.
OpenNewUrl
(
"/financial/financalDocument/FinancialDocumentsDetail"
,
{
id
:
id
});
},
generalFinancacls
(
item
)
{
this
.
CheckID
=
item
.
Id
if
(
this
.
msg
.
SchoolId
==
-
1
){
if
(
item
.
SumPrice
>
0
){
this
.
tishi
(
item
.
SumPrice
,
item
.
Id
)
}
else
{
this
.
$message
.
error
(
'提成总金额为0'
)
}
}
else
{
if
(
item
.
SchooldCommission
>
0
){
this
.
goaddFinancial
(
item
.
SchooldCommission
,
item
.
Id
,
''
)
}
else
{
this
.
$message
.
error
(
'校区提成总金额为0'
)
}
}
},
goaddFinancial
(
Money
,
Id
,
EmpIds
){
let
School_Id
=
0
;
let
obj
=
{
CostType
:
316
,
Money
:
Money
,
CurrencyId
:
21
,
XSTC
:
1
,
School_Id
:
this
.
msg
.
SchoolId
==
-
1
?
0
:
this
.
msg
.
SchoolId
,
OtherType
:
44
,
ReFinanceId
:
Id
,
ReFinanceId2
:
this
.
msg
.
SchoolId
,
EduCommissionEmp
:
EmpIds
}
let
query
=
{
blank
:
"y"
,
tab
:
"新增付款单据"
,
Type
:
2
,
IsUploadPic
:
1
,
Name
:
'销售提成单'
,
id
:
143
,
orderObj
:
JSON
.
stringify
(
obj
)
}
this
.
$router
.
push
({
path
:
"/financial/financalDocument/addFinancialDocuments"
,
query
});
},
tishi
(
Money
,
Id
){
let
that
=
this
this
.
$q
.
dialog
({
title
:
"销售制单"
,
message
:
"你正在进行所有校区一起制单操作?"
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
this
.
getcomSendEmployeeList
(
Id
)
});
},
getcomSendEmployeeList
(
Id
){
//获取可发放提成的用户
getSellStudyAbroadSendEmployeeList
({
PeriodId
:
Id
}).
then
(
res
=>
{
this
.
SendEmployeeList
=
res
.
Data
.
Data
;
this
.
costmode
=
true
}).
catch
(()
=>
{
})
},
handleCurrentChanges
(
val
){
this
.
msg
.
PageIndex
=
val
;
this
.
getList
()
},
checkSelectable
(
row
){
return
row
.
IsGiveOut
==
2
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
let
zong
=
0
this
.
multipleSelection
.
forEach
(
x
=>
{
zong
+=
x
.
CurrentPeriodMoney
})
this
.
totalAmount
=
zong
},
preservetransaction
(){
let
that
=
this
if
(
this
.
multipleSelection
.
length
==
0
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择您要发放的用户`
})
return
}
this
.
$q
.
dialog
({
title
:
"设置用户状态"
,
message
:
"确认后无法更改用户制单状态,如果需修改请联系管理员"
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
let
EmpIds
=
''
;
let
data
=
[]
this
.
multipleSelection
.
forEach
(
x
=>
{
data
.
push
(
x
.
UserId
)
})
EmpIds
=
data
.
join
(
','
)
setSellStudyAbroadSendEmployee
({
PeriodId
:
this
.
CheckID
,
EmpIds
:
EmpIds
}).
then
(
res
=>
{
this
.
goaddFinancial
(
this
.
totalAmount
,
this
.
CheckID
,
EmpIds
)
this
.
$message
.
success
(
'设置成功'
);
}).
catch
(()
=>
{
})
});
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/pages/financial/studyabroad/studyAbroadCommissionTJ.vue
0 → 100644
View file @
59a07bee
<
style
>
.baseSet_Title
{
width
:
120px
!important
;
padding
:
18px
0
0
16px
;
text-align
:
right
;
}
.cycleOrderList
.border-bottom
{
/* border-bottom: 1px dashed #EEE; */
padding-bottom
:
5px
;
margin-bottom
:
5px
;
}
.cycleOrderList
.text-bottom
{
height
:
32px
;
line-height
:
32px
;
margin-bottom
:
10px
;
}
.cycleOrderList
._icon_btn
i
.icon-sousuo
{
background-color
:
#47BF8C
;
}
.cycleOrderList
._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
;
}
.cycleOrderList
.el-table
td
,
.el-table
th
{
padding
:
5px
0
;
}
</
style
>
<
template
>
<div
class=
"page-body cycleOrderList"
>
<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
@
input=
"getDepartList(msg.School_Id),resetSearch()"
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"校区"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
>
<selectTree
:treeData=
'DeptList'
:defaultArray=
"returnString"
nodeKey=
"DeptId"
:multiple=
"false"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
></selectTree>
</div>
<q-select
@
input=
"resetSearch"
filled
stack-label
option-value=
"Id"
option-label=
"EmployeeName"
use-input
v-model=
"msg.UserId"
ref=
"DeptTier"
:options=
"PersionList"
label=
"销售"
:dense=
"false"
class=
"col-3 q-pr-lg"
emit-value
map-options
@
filter=
"filterFn2"
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
<div
class=
"col-3"
>
<q-select
filled
stack-label
use-input
input-debounce=
"0"
option-value=
"Id"
clearable
@
input=
"resetSearch()"
option-label=
"Name"
v-model=
"msg.SourceId"
:options=
"StudyAbroadList"
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>
</div>
<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
@
input=
"resetSearch()"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.PeriodId"
:options=
"PeriodsList"
label=
"周期"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
>
<q-input
filled
v-model=
"msg.OrderId"
@
keyup
.
enter
.
native=
"resetSearch()"
label=
"订单号"
/>
</div>
</div>
</div>
<div
class=
"page-search row items-center"
style=
"justify-content: space-between;"
>
<span
style=
"font-size: 20px;font-weight: 400;"
>
提成统计
<span
style=
"font-size: 16px;"
>
(提成总计:{{TotalCommission}})
</span>
</span>
<q-btn
color=
"primary"
size=
"11px"
label=
"导出"
@
click=
"tcexport"
style=
"margin-left:10px"
/>
</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=
"校区"
width=
'150'
></el-table-column>
<el-table-column
prop=
"DeptName"
label=
"部门"
></el-table-column>
<el-table-column
prop=
"UserName"
label=
"销售"
>
</el-table-column>
<el-table-column
prop=
"SourceName"
label=
"项目名称"
>
</el-table-column>
<el-table-column
width=
'170'
prop=
"ClassName"
label=
"客人信息"
>
<template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.SourceType"
>
类型:
{{
scope
.
row
.
SourceType
==
1
?
'留学'
:
'就业'
}}
</div>
<div
v-if=
"scope.row.StudentCount"
>
客人数量:
{{
scope
.
row
.
StudentCount
}}
人
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"OrderId"
label=
"订单号"
>
<
template
slot-scope=
"scope"
>
<div
style=
"cursor: pointer;text-decoration: underline;"
@
click=
"goUrlorderList('/sale/studyOrderStatistics',scope.row)"
>
{{
scope
.
row
.
OrderId
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"CommissionMoney"
label=
"订单提成"
>
</el-table-column>
<el-table-column
prop=
"OtherMoney"
label=
"额外奖励"
>
</el-table-column>
<el-table-column
prop=
"BackMoney"
label=
"额外扣除"
>
</el-table-column>
<el-table-column
prop=
"YFMoney"
label=
"最终发放"
>
<
template
slot-scope=
"scope"
>
<div
style=
"color: rgb(233, 82, 82);"
>
{{
scope
.
row
.
YFMoney
}}
</div>
</
template
>
</el-table-column>
<el-table-column
width=
'85'
prop=
"Periods"
label=
"期数"
>
</el-table-column>
<el-table-column
prop=
"Remark"
width=
'160'
label=
"备注"
>
</el-table-column>
</el-table>
<div
style=
"margin-top: 10px;text-align: center;"
>
<el-pagination
background
@
current-change=
"handleCurrentChanges"
layout=
"total,prev, pager, next, jumper"
:current-page
.
sync=
"msg.PageIndex"
:page-size=
"msg.PageSize"
:total=
'total'
>
</el-pagination>
</div>
</template>
</div>
</template>
<
script
>
import
{
getSchoolDropdown
}
from
'../../../api/school/index'
import
{
queryEmployee
}
from
'../../../api/users/user'
import
{
getDeptTree
}
from
'../../../api/system/dept.js'
import
{
getSellStudyAbroadStatistics
,
getSellStudyAbroadPeriodsList
}
from
'../../../api/finance/index'
import
{
getClassDropDownList
,
}
from
"../../../api/school/index"
;
import
selectTree
from
'../../../components/common/select-tree'
import
{
EduDownLoad
,
}
from
'../../../api/common/common'
;
import
{
queryStudyAbroadPage
}
from
'../../../api/studyabroad/index'
export
default
{
meta
:
{
title
:
"留学提成统计"
},
props
:
{},
components
:
{
selectTree
},
data
()
{
return
{
loading
:
false
,
//列表数据参数
msg
:
{
PageIndex
:
1
,
PageSize
:
10
,
School_Id
:
'-1'
,
Depart_Id
:
0
,
PeriodId
:
0
,
UserId
:
0
,
SourceId
:
'-1'
,
OrderId
:
''
,
},
pageCount
:
0
,
persistent
:
false
,
listData
:{},
tableData
:[],
total
:
0
,
company
:[],
department
:[],
ClassList
:[],
allClassList
:[],
returnString
:
[],
//默认岗位
see_tcdetailed
:
false
,
schoolList
:[],
DeptList
:
[],
// 部门下拉
PersionList
:
[],
//员工列表
AllemployeeList
:
[],
//所有员工
PeriodsList
:[],
//周期列表
TotalCommission
:
0
,
StudyAbroadList
:
[],
allStudyAbroadList
:
[],
}
},
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
userinfo
.
ActionMenuList
.
map
(
x
=>
{
//判断权限
if
(
x
.
FunctionCode
==
"see_tcdetailed"
){
//判断是否可以查看其他明细
this
.
see_tcdetailed
=
true
;
}
})
if
(
this
.
see_tcdetailed
==
false
){
this
.
msg
.
UserId
=
userinfo
.
Id
}
},
mounted
()
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
OrderId
){
this
.
msg
.
OrderId
=
this
.
$route
.
query
.
OrderId
}
this
.
getList
()
this
.
getStudyAbroad
()
this
.
getBranchList
()
this
.
getDepartList
(
0
);
this
.
getEmployee
();
this
.
getPeriodList
()
},
methods
:
{
resetSearch
()
{
this
.
msg
.
PageIndex
=
1
;
this
.
getList
()
},
getList
(){
if
(
this
.
msg
)
this
.
loading
=
true
;
if
(
this
.
msg
.
SourceId
==
''
||
this
.
msg
.
SourceId
==
null
){
this
.
msg
.
SourceId
=
'-1'
}
getSellStudyAbroadStatistics
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
loading
=
false
;
this
.
tableData
=
res
.
Data
.
PageData
.
List
this
.
TotalCommission
=
res
.
Data
.
PageData
.
TotalCommission
this
.
total
=
res
.
Data
.
Count
}
})
},
unique
(
arr
,
Name
){
//数组去重
const
res
=
new
Map
();
return
arr
.
filter
(
(
list
)
=>
!
res
.
has
(
list
.
text
)
&&
res
.
set
(
list
.
text
,
1
)
);
},
handleCurrentChanges
(
val
){
this
.
msg
.
PageIndex
=
val
;
this
.
getList
()
},
getStudyAbroad
()
{
let
msg
=
{
pageIndex
:
0
,
pageSize
:
9000
,
Name
:
""
,
IsQPrice
:
1
,
Type
:
-
1
,
//项目类型
SaleState
:
3
,
//已上架
}
queryStudyAbroadPage
(
msg
).
then
(
res
=>
{
let
data
=
res
.
Data
.
PageData
let
obj
=
{
Name
:
'不限'
,
Id
:
'-1'
}
data
.
unshift
(
obj
)
this
.
StudyAbroadList
=
data
;
this
.
allStudyAbroadList
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
})
.
catch
(()
=>
{
});
},
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
StudyAbroadList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allStudyAbroadList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
StudyAbroadList
=
this
.
allStudyAbroadList
.
filter
(
v
=>
v
.
Name
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
getBranchList
(){
//获取校区
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
schoolList
=
res
.
Data
;
var
obj
=
{
SName
:
'全部'
,
SId
:
'-1'
}
this
.
schoolList
.
unshift
(
obj
);
}).
catch
(()
=>
{
})
},
//获取部门下拉数据
getDepartList
(
id
)
{
if
(
id
==-
1
){
id
=
0
}
let
msg
=
{
School_Id
:
id
}
getDeptTree
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
}
})
},
getChild
(
deptArray
)
{
var
tempStr
=
""
;
if
(
deptArray
&&
deptArray
!=
''
)
{
tempStr
=
deptArray
;
}
if
(
tempStr
)
{
this
.
msg
.
Depart_Id
=
tempStr
;
}
else
{
this
.
msg
.
Depart_Id
=
0
;
}
this
.
resetSearch
();
},
//筛选员工
filterFn2
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
PersionList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllemployeeList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
PersionList
=
this
.
AllemployeeList
.
filter
(
v
=>
v
.
EmployeeName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
//获取员工列表
getEmployee
()
{
var
qMsg
=
{
EmployeeName
:
""
}
queryEmployee
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
let
obj
=
{
EmployeeName
:
'不限'
,
Id
:
0
}
res
.
Data
.
unshift
(
obj
)
var
jsonData
=
res
.
Data
;
if
(
jsonData
&&
jsonData
.
length
>
0
)
{
this
.
AllemployeeList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
this
.
PersionList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));;
}
}
})
},
getPeriodList
(){
//获取周期下拉列表
getSellStudyAbroadPeriodsList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
PeriodsList
=
res
.
Data
let
obj
=
{
Name
:
'不限'
,
Id
:
0
}
this
.
PeriodsList
.
unshift
(
obj
)
}
})
},
tcexport
(){
//导出
var
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
EduDownLoad
(
"/SellCommission/GetSellStudyAbroadStatisticsToExcel"
,
msg
,
"留学提成统计.xls"
)
},
goUrlclass
(
path
,
Names
){
//班级
let
Name
=
encodeURI
(
Names
)
this
.
OpenNewUrl
(
path
,
{
ClassName
:
Name
,
});
},
goUrlorderList
(
path
,
row
){
//订单跳转
this
.
OpenNewUrl
(
path
,
{
OrderId
:
row
.
OrderId
,
// EnterID:row.UserId
});
},
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/pages/financial/studyabroad/studyAbroadRules.vue
View file @
59a07bee
...
@@ -16,15 +16,13 @@
...
@@ -16,15 +16,13 @@
line-height
:
32px
;
line-height
:
32px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"page-body studyAbroadRules"
>
<div
class=
"page-body studyAbroadRules"
>
<div
class=
"page-search row items-center"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<div
class=
"col-3"
>
<q-input
filled
v-model=
"listData.FirstRate"
:min=
'0'
:max=
'100'
@
input=
"getFirsrate"
label=
"首次发放比例"
type=
"number"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -34,87 +32,52 @@
...
@@ -34,87 +32,52 @@
<template
v-slot:top=
"props"
>
<template
v-slot:top=
"props"
>
<q-space
/>
<q-space
/>
<div
class=
"page-option"
>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
v-if=
'isSalerule_preserve == true'
@
click=
"preservation()"
ref=
"addBtn"
label=
"保存规则"
/>
<q-btn
color=
"accent"
size=
"sm"
v-if=
'isSalerule_preserve == true'
@
click=
"preservation()"
ref=
"addBtn"
label=
"保存规则"
/>
</div>
</div>
</
template
>
</
template
>
<
template
v-slot:body=
"props"
>
<
template
v-slot:body-cell-OrderType=
"props"
>
<q-tr
:props=
"props"
>
<q-td
:props=
"props"
>
<template
v-for=
"col in props.cols"
>
<span
v-if=
"props.row.OrderType==1"
>
直通车
</span>
<q-td
v-if=
"col.name=='CTypeName'"
>
<span
v-if=
"props.row.OrderType==2"
>
代收代付
</span>
{{
col
.
value
}}
<span
v-if=
"props.row.OrderType==3"
>
返佣
</span>
</q-td>
<q-td
v-if=
"col.name == 'EnrollType'"
>
<div
v-for=
"item in col.value"
>
<div
class=
"text-bottom"
>
{{
item
.
EnrollType
==
1
?
'初次'
:
'续班'
}}
</div>
</div>
</q-td>
</q-td>
<q-td
v-if=
"col.name == 'SalesRate'"
>
</
template
>
<div
v-for=
"(item,index) in col.value"
:key=
'index'
>
<
template
v-slot:body-cell-CommissionType=
"props"
>
<div
class=
"border-bottom"
>
<q-td
:props=
"props"
>
<el-select
v-model=
"props.row.CommissionType"
placeholder=
"请选择"
size=
"small"
>
<el-input
v-model=
"item.SalesRate"
style=
'width:180px'
type=
"number"
:min=
'1'
:max=
'100'
<el-option
placeholder=
"请输入内容"
@
blur=
'xiaoshou(props.pageIndex,index)'
size=
"small"
>
v-for=
"item in commissionType"
<template
slot=
"append"
>
%
</
template
>
:key=
"item.Id"
</el-input>
:label=
"item.Name"
</div>
:value=
"item.Id"
>
</div>
</el-option>
</q-td>
</el-select>
<q-td
v-if=
"col.name == 'assistant'"
style=
"width: 100px;text-align: center;"
>
<div
v-for=
"item in col.value"
>
<div
class=
"text-bottom"
>
{{100-item.SalesRate}}%
</div>
</div>
</q-td>
<q-td
v-if=
"col.name == 'TeacherRate'"
>
<div
v-for=
"(item,index) in col.value"
:key=
'index'
>
<div
class=
"border-bottom"
>
<span
style=
"margin-right: 10px;"
>
其中( 老师:
</span>
<el-input
v-model=
"item.TeacherRate"
style=
'width:180px'
type=
"number"
:min=
'0'
:max=
'100'
placeholder=
"请输入内容"
@
blur=
'teacherinput(props.pageIndex,index)'
size=
"small"
>
<
template
slot=
"append"
>
%
</
template
>
</el-input>
</div>
</div>
</q-td>
</q-td>
<q-td
v-if=
"col.name == 'AssistantRate'"
>
</
template
>
<div
v-for=
"(item,index) in col.value"
:key=
'index'
>
<
template
v-slot:body-cell-CommissionRate=
"props"
>
<div
class=
"border-bottom"
>
<q-td
:props=
"props"
>
<span
style=
"margin-right: 10px;"
>
助教:
</span>
<el-input
v-model=
"props.row.CommissionRate"
style=
'width:180px'
type=
"number"
:min=
'0'
:max=
'100'
placeholder=
"请输入内容"
@
blur=
'getinput(props)'
size=
"small"
>
<el-input
v-model=
"item.AssistantRate"
style=
'width:180px'
type=
"number"
:min=
'0'
:max=
'100'
placeholder=
"请输入内容"
@
blur=
'assistantinput(props.pageIndex,index)'
size=
"small"
>
<template
slot=
"append"
>
%
</
template
>
<template
slot=
"append"
>
%
</
template
>
</el-input>
</el-input>
<span
style=
"margin-left: 10px;"
>
)
</span>
</div>
</div>
</q-td>
</q-td>
</template>
</q-tr>
</template>
</template>
<
template
v-slot:bottom
>
<
template
v-slot:bottom
>
<!--
<q-pagination
class=
"full-width justify-end"
v-model=
"tabeMsg.pageIndex"
color=
"primary"
:max=
"1"
:input=
"true"
@
input=
"changePage"
/>
-->
</
template
>
</
template
>
</q-table>
</q-table>
</template>
</template>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
GetClassTypePageList
,
GetClassTypePageList
,
}
from
'../../../api/system/index'
;
}
from
'../../../api/system/index'
;
import
{
import
{
getSellCommissionRuleList
,
setSellStudyAbroadRule
,
setSellCommissionRule
getSellStudyAbroadRuleList
,
}
from
'../../../api/finance/index'
}
from
'../../../api/finance/index'
export
default
{
export
default
{
meta
:
{
meta
:
{
...
@@ -127,48 +90,28 @@
...
@@ -127,48 +90,28 @@
columns
:
[{
columns
:
[{
name
:
'CTypeNam
e'
,
name
:
'OrderTyp
e'
,
label
:
'类型'
,
label
:
'类型'
,
field
:
'CTypeNam
e'
,
field
:
'OrderTyp
e'
,
align
:
'left'
align
:
'left'
},
},
{
{
name
:
'Enroll
Type'
,
name
:
'Commission
Type'
,
label
:
'报名
类型'
,
label
:
'提成
类型'
,
align
:
'left'
,
align
:
'left'
,
field
:
'Enroll
Type'
,
field
:
'Commission
Type'
,
field
:
row
=>
row
.
List
field
:
row
=>
row
.
List
},
},
{
{
name
:
'Sales
Rate'
,
name
:
'Commission
Rate'
,
label
:
'销售提成比例'
,
label
:
'销售提成比例'
,
align
:
'left'
,
align
:
'left'
,
field
:
'SalesRate'
,
field
:
'CommissionRate'
,
field
:
row
=>
row
.
List
},
{
name
:
'assistant'
,
label
:
'(老师+助教总提成)'
,
align
:
'left'
,
field
:
'assistant'
,
field
:
row
=>
row
.
List
},
{
name
:
'TeacherRate'
,
label
:
''
,
align
:
'left'
,
field
:
'TeacherRate'
,
field
:
row
=>
row
.
List
},
{
name
:
'AssistantRate'
,
label
:
''
,
align
:
'left'
,
field
:
'AssistantRate'
,
field
:
row
=>
row
.
List
field
:
row
=>
row
.
List
},
},
],
],
loading
:
false
,
loading
:
false
,
dataList
:
[],
//列表数据
dataList
:
[],
//列表数据
...
@@ -179,15 +122,18 @@
...
@@ -179,15 +122,18 @@
pageSize
:
99
pageSize
:
99
},
},
pageCount
:
0
,
pageCount
:
0
,
persistent
:
false
,
isSalerule_preserve
:
true
,
listData
:
{},
commissionType
:
[
isSalerule_preserve
:
false
,
{
Id
:
1
,
Name
:
'销售额'
},
{
Id
:
2
,
Name
:
'利润'
},
]
}
}
},
},
created
()
{
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
let
userinfo
=
this
.
getLocalStorage
();
userinfo
.
ActionMenuList
.
map
(
x
=>
{
//判断权限
userinfo
.
ActionMenuList
.
map
(
x
=>
{
//判断权限
if
(
x
.
FunctionCode
==
"Salerule_preserve"
)
{
//判断是否有保存的权限
if
(
x
.
FunctionCode
==
"Salerule_studyabpreserve"
)
{
//判断是否有保存的权限
this
.
isSalerule_preserve
=
true
;
this
.
isSalerule_preserve
=
true
;
return
return
}
}
...
@@ -196,114 +142,32 @@
...
@@ -196,114 +142,32 @@
mounted
()
{
mounted
()
{
this
.
getRuleList
();
//获取规则
this
.
getRuleList
();
//获取规则
},
},
methods
:
{
methods
:
{
getRuleList
()
{
getRuleList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
getSellCommissionRuleList
({}).
then
(
res
=>
{
getSellStudyAbroadRuleList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
listData
=
res
.
Data
this
.
GetClassTypePageList
();
//获取班级类型列表数据
}
})
},
//获取班级类型列表数据
GetClassTypePageList
()
{
GetClassTypePageList
(
this
.
tabeMsg
).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
dataList
=
res
.
Data
this
.
dataList
.
forEach
((
x
,
i
)
=>
{
x
.
List
=
[]
this
.
listData
.
List
.
forEach
(
j
=>
{
if
(
x
.
CTypeId
==
j
.
ClassType
)
{
x
.
List
.
push
(
j
)
}
}
})
})
//如果没有相同的但是 班级类型又有 给予默认的值
//注 由于 JavaScript 的限制,Vue 不能检测以下变动的数组:这里使用this.$set方法
if
(
x
.
List
&&
x
.
List
.
length
==
0
)
{
let
obj
=
{
CTypeName
:
x
.
CTypeName
,
CTypeId
:
x
.
CTypeId
,
List
:
[{
Id
:
0
,
ClassType
:
x
.
CTypeId
,
EnrollType
:
2
,
SalesRate
:
1
,
TeacherRate
:
0
,
AssistantRate
:
0
},
},
{
Id
:
0
,
ClassType
:
x
.
CTypeId
,
EnrollType
:
1
,
SalesRate
:
1
,
TeacherRate
:
0
,
AssistantRate
:
0
},
]
}
this
.
$set
(
this
.
dataList
,
i
,
obj
)
}
})
getinput
(
row
){
let
val
=
this
.
dataList
[
row
.
pageIndex
].
CommissionRate
if
(
val
<
0
||
val
==
''
){
this
.
dataList
[
row
.
pageIndex
].
CommissionRate
=
0
}
}
})
if
(
val
>
100
){
this
.
dataList
[
row
.
pageIndex
].
CommissionRate
=
100
},
xiaoshou
(
pageIndex
,
index
)
{
let
that
=
this
if
(
that
.
dataList
[
pageIndex
].
List
[
index
].
SalesRate
==
''
||
that
.
dataList
[
pageIndex
].
List
[
index
].
SalesRate
<
0
)
{
that
.
dataList
[
pageIndex
].
List
[
index
].
SalesRate
=
1
}
else
if
(
that
.
dataList
[
pageIndex
].
List
[
index
].
SalesRate
>
100
)
{
that
.
dataList
[
pageIndex
].
List
[
index
].
SalesRate
=
100
}
},
teacherinput
(
pageIndex
,
index
)
{
//老师输入的时候input
if
(
this
.
dataList
[
pageIndex
].
List
[
index
].
TeacherRate
==
''
)
{
this
.
dataList
[
pageIndex
].
List
[
index
].
TeacherRate
=
100
-
this
.
dataList
[
pageIndex
].
List
[
index
].
AssistantRate
}
else
if
(
this
.
dataList
[
pageIndex
].
List
[
index
].
TeacherRate
>
100
||
this
.
dataList
[
pageIndex
].
List
[
index
]
.
TeacherRate
<
0
)
{
this
.
dataList
[
pageIndex
].
List
[
index
].
TeacherRate
=
0
;
this
.
dataList
[
pageIndex
].
List
[
index
].
AssistantRate
=
100
;
}
else
{
this
.
dataList
[
pageIndex
].
List
[
index
].
AssistantRate
=
100
-
this
.
dataList
[
pageIndex
].
List
[
index
].
TeacherRate
}
},
assistantinput
(
pageIndex
,
index
)
{
//助教输入的时候input
if
(
this
.
dataList
[
pageIndex
].
List
[
index
].
AssistantRate
==
''
)
{
this
.
dataList
[
pageIndex
].
List
[
index
].
AssistantRate
=
100
-
this
.
dataList
[
pageIndex
].
List
[
index
].
TeacherRate
}
else
if
(
this
.
dataList
[
pageIndex
].
List
[
index
].
AssistantRate
>
100
||
this
.
dataList
[
pageIndex
].
List
[
index
]
.
AssistantRate
<
0
)
{
this
.
dataList
[
pageIndex
].
List
[
index
].
AssistantRate
=
0
;
this
.
dataList
[
pageIndex
].
List
[
index
].
TeacherRate
=
100
;
}
else
{
this
.
dataList
[
pageIndex
].
List
[
index
].
TeacherRate
=
100
-
this
.
dataList
[
pageIndex
].
List
[
index
].
AssistantRate
}
},
getFirsrate
()
{
if
(
this
.
listData
.
FirstRate
>
100
)
{
this
.
listData
.
FirstRate
=
100
}
else
if
(
this
.
listData
.
FirstRate
<
0
)
{
this
.
listData
.
FirstRate
=
0
}
}
},
},
preservation
()
{
//保存规则
preservation
()
{
//保存规则
let
addMsg
=
{
FirstRate
:
this
.
listData
.
FirstRate
,
setSellStudyAbroadRule
(
this
.
dataList
).
then
(
res
=>
{
List
:
[],
}
this
.
dataList
.
forEach
(
x
=>
{
x
.
List
.
forEach
(
j
=>
{
addMsg
.
List
.
push
(
j
)
})
})
setSellCommissionRule
(
addMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
icon
:
'iconfont icon-chenggong'
,
...
@@ -312,19 +176,16 @@
...
@@ -312,19 +176,16 @@
message
:
'数据保存成功!'
,
message
:
'数据保存成功!'
,
position
:
'top'
position
:
'top'
})
})
this
.
getRuleList
()
}
}
})
})
},
},
changePage
()
{
}
},
},
}
}
</
script
>
</
script
>
<
style
lang=
"sass"
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
@import
url('~assets/css/table.sass')
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/router/routes.js
View file @
59a07bee
...
@@ -608,6 +608,34 @@ const routes = [{
...
@@ -608,6 +608,34 @@ const routes = [{
component
:
()
=>
component
:
()
=>
import
(
"pages/financial/studyabroad/studyAbroadRules.vue"
)
import
(
"pages/financial/studyabroad/studyAbroadRules.vue"
)
},
},
{
path
:
"/financial/studyabroad/studyAbroadCommission"
,
//工作台 留学销售提成
component
:
()
=>
import
(
"pages/financial/studyabroad/studyAbroadCommission.vue"
)
},
{
path
:
"/financial/studyabroad/studyAbroadCommissionTJ"
,
//工作台 留学销售统计
component
:
()
=>
import
(
"pages/financial/studyabroad/studyAbroadCommissionTJ.vue"
)
},
{
path
:
"/financial/studyabroad/commissionDetail"
,
//工作台 留学销售列表
component
:
()
=>
import
(
"pages/financial/studyabroad/commissionDetail.vue"
)
},
{
path
:
"/financial/studyabroad/sBuserCommissionDetails"
,
//工作台 留学销售明细
component
:
()
=>
import
(
"pages/financial/studyabroad/sBuserCommissionDetails.vue"
)
},
{
path
:
"/financial/studyabroad/ordercommission"
,
//工作台 获取销售提成-订单跳转列表 传的参数不同
component
:
()
=>
import
(
"pages/financial/studyabroad/ordercommission.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