Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
150e1ce3
Commit
150e1ce3
authored
Sep 18, 2019
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增地接提成
parent
5a1b63ae
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1070 additions
and
2 deletions
+1070
-2
Djcommissions.vue
src/components/FinancialModule/Djcommissions.vue
+313
-0
OPcommissionPeriods.vue
src/components/FinancialModule/OPcommissionPeriods.vue
+8
-1
ClausesOrder.vue
src/components/administrative/ClausesOrder.vue
+119
-0
CommissionManagement.vue
src/components/administrative/CommissionManagement.vue
+1
-1
DjCommissionDetail.vue
src/components/administrative/DjCommissionDetail.vue
+476
-0
DjCommissionsmangment.vue
src/components/administrative/DjCommissionsmangment.vue
+121
-0
config.js
src/router/config.js
+32
-0
No files found.
src/components/FinancialModule/Djcommissions.vue
0 → 100644
View file @
150e1ce3
<
template
>
<div
class=
"Feedback"
>
<ul
style=
"overflow: initial!important"
>
<!--
<li>
<span>
<em>
公司
</em>
</span>
<el-select
filterable
v-model=
"obj.BranchId"
>
<el-option
label=
"不限"
:value=
'-1'
></el-option>
<el-option
v-for=
"item in companyList"
:label=
'item.BName'
:value=
'item.Id'
:key=
'item.Id'
>
</el-option>
</el-select>
</li>
<li>
<span>
<em>
线路
</em>
</span>
<el-select
filterable
v-model=
"obj.LineId"
>
<el-option
label=
"不限"
:value=
'0'
></el-option>
<el-option
v-for=
"item in LineList"
:label=
'item.LineName'
:value=
'item.LineID'
:key=
'item.LineID'
></el-option>
</el-select>
</li>
-->
<li
style=
"float:right;margin-bottom:10px"
>
<!--
<input
type=
"button"
class=
"hollowFixedBtn"
value=
"查询"
@
click=
"getList()"
>
-->
<input
type=
"button"
class=
"hollowFixedBtn"
value=
"新增"
@
click=
"addRule"
>
</li>
</ul>
<table
class=
"singeRowTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
>
<tr>
<th
style=
"width:30%"
>
线路名称
</th>
<th>
人员
</th>
<th>
占比
</th>
<th>
设置
</th>
</tr>
<tr>
<td>
全部
</td>
<td>
地接账户基金
</td>
<td>
{{
allzb
}}
%
</td>
<td>
<!--
<el-button
@
click=
"SetRules(item)"
style=
"padding:4px"
type=
"primary"
icon=
"el-icon-edit"
circle
></el-button>
<el-button
@
click=
"Delete(item)"
style=
"padding:4px"
type=
"danger"
icon=
"el-icon-delete"
circle
></el-button>
-->
</td>
</tr>
<tbody
v-for=
"(item,i) in dataList"
:key=
"i"
>
<tr
v-for=
"(com,index) in item.OPCommissionList"
:key=
"index"
>
<td
:rowspan=
"item.OPCommissionList.length"
v-if=
"index==0"
>
{{
item
.
LineName
}}
</td>
<td>
{{
com
.
EmployeeName
}}
</td>
<td>
{{
com
.
CommissionPercent
}}
%
</td>
<td>
<el-button
@
click=
"SetRules(com)"
style=
"padding:4px"
type=
"primary"
icon=
"el-icon-edit"
circle
></el-button>
<el-button
@
click=
"Delete(com)"
style=
"padding:4px"
type=
"danger"
icon=
"el-icon-delete"
circle
></el-button>
</td>
</tr>
</tbody>
<tr
v-if=
"dataList.length==0"
>
<td
colspan=
"12"
align=
"center"
>
暂无数据
</td>
</tr>
</table>
<el-dialog
title=
"提成规则"
:visible
.
sync=
"ruleVisible"
width=
"400px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<!--
<el-form-item
label=
"线路"
prop=
"LineIdList"
>
<el-select
class=
"multiple_input"
filterable
value-key=
"item"
v-model=
"form.LineIdList"
@
change=
"getLine"
>
<el-option
v-for=
"item in LineList"
:label=
'item.LineName'
:value=
'item'
:key=
'item.LineID'
></el-option>
</el-select>
</el-form-item>
-->
<el-form-item
label=
"人员"
prop=
"EmployeeId"
>
<el-select
class=
"multiple_input"
filterable
v-model=
"form.EmployeeId"
>
<el-option
v-for=
"item in EmployeeList"
:label=
"item.EmName"
:value=
"item.EmployeeId"
:key=
"item.EmployeeId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"占比"
prop=
"CommissionPercent"
>
<el-input
class=
"w220"
@
keyup
.
native=
"checkInteger(form,'CommissionPercent')"
v-model=
"form.CommissionPercent"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"ruleVisible = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"RulesOk('form')"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
moment
from
"moment"
import
{
constants
}
from
'fs'
;
export
default
{
name
:
'Feedback'
,
data
(){
return
{
allzb
:
100
,
obj
:{
BranchId
:
-
1
,
LineId
:
0
,
},
dataList
:[],
loading
:
false
,
dateList
:[],
LineList
:[],
companyList
:[],
ruleVisible
:
false
,
form
:{
// LineIdList:[],
LineName
:
'出境日本线'
,
LineID
:
14
,
EmployeeId
:
''
,
CommissionPercent
:
0
,
},
departmentMsg
:
{
RB_Group_Id
:
'0'
,
RB_Branch_Id
:
'-1'
,
Status
:
'0'
,
ParentId
:
'-1'
,
Tier
:
'0'
,
},
LineTeamList
:[],
EmployeeList
:[],
rules
:{
EmployeeId
:
[
{
required
:
true
,
message
:
'请选择参与人员'
,
trigger
:
'change'
}
],
CommissionPercent
:
[{
required
:
true
,
message
:
"请输入占比"
,
trigger
:
"blur"
}],
},
departmentList
:[]
}
},
created
(){
},
mounted
(){
this
.
getList
();
this
.
getEmployeeList
();
this
.
getLineList
();
},
methods
:{
Delete
(
item
)
{
this
.
$confirm
(
"是否删除? 删除后不可恢复"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
})
.
then
(()
=>
{
this
.
apipost
(
'OPCommission_RemoveOPCommission'
,
{
ID
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
)
this
.
getList
()
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
})
})
.
catch
(()
=>
{});
},
addRule
(){
this
.
ruleVisible
=
true
;
this
.
form
=
{
LineName
:
'出境日本线'
,
LineID
:
14
,
EmployeeId
:
''
,
CommissionPercent
:
0
,
}
},
SetRules
(
item
){
this
.
ruleVisible
=
true
;
this
.
form
=
{
LineName
:
'出境日本线'
,
LineID
:
14
,
EmployeeId
:
item
.
EmployeeId
,
CommissionPercent
:
item
.
CommissionPercent
,
Id
:
item
.
Id
}
},
RulesOk
(
formName
){
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
num
=
0
;
let
newnum
=
0
;
if
(
this
.
form
.
Id
){
this
.
dataList
.
forEach
(
item
=>
{
item
.
OPCommissionList
.
forEach
(
com
=>
{
if
(
com
.
Id
!=
this
.
form
.
Id
){
num
+=
com
.
CommissionPercent
;
}
})
})
newnum
=
100
-
num
;
}
else
{
newnum
=
this
.
allzb
;
}
if
(
Number
(
this
.
form
.
CommissionPercent
)
>
newnum
||
Number
(
this
.
form
.
CommissionPercent
)
==
0
){
this
.
Error
(
"请输入正确的占比!"
);
return
;
}
this
.
apipost
(
'OPCommission_SetOPCommission'
,
this
.
form
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getList
();
this
.
ruleVisible
=
false
;
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
err
=>
{
}
)
}
else
{
}
});
},
getEmployeeList
()
{
let
userInfo
=
this
.
getLocalStorage
()
let
msg
=
{
GroupId
:
userInfo
.
RB_Group_id
,
BranchId
:
'-1'
,
DepartmentId
:
'-1'
,
PostId
:
'-1'
,
IsLeave
:
'0'
}
this
.
apipost
(
'admin_get_EmployeeGetList'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
EmployeeList
=
res
.
data
.
data
}
},
err
=>
{
}
)
},
getLineList
()
{
this
.
apipost
(
"line_post_GetAllList_V2"
,
{
LineDirection
:
0
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
LineList
=
res
.
data
.
data
;
}
});
},
linkageDepartment
(){
this
.
departmentMsg
.
RB_Branch_Id
=
this
.
form
.
BranchId
;
this
.
departmentList
=
[];
this
.
form
.
DepartmentId
=-
1
;
this
.
getDepartment
();
},
getDepart
(
id
){
this
.
form
.
DepartmentId
=
id
;
this
.
$forceUpdate
();
},
getDepartment
()
{
this
.
apipost
(
'admin_get_DepartmentGetList'
,
this
.
departmentMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
departmentList
=
res
.
data
.
data
;
}
},
err
=>
{})
},
getList
(){
this
.
loading
=
true
;
this
.
apipost
(
"OPCommission_GetPageList"
,
{},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
console
.
log
(
"this.dataList"
,
this
.
dataList
)
// allzb
let
num
=
0
;
this
.
dataList
.
forEach
(
item
=>
{
item
.
OPCommissionList
.
forEach
(
com
=>
{
num
+=
com
.
CommissionPercent
;
})
})
this
.
allzb
=
100
-
num
;
}
});
},
}
}
</
script
>
<
style
>
.Feedback
ul
>
li
{
display
:
inline-block
;
font-size
:
12px
;
color
:
#666
;
margin
:
20px
30px
0px
0
;
}
.Feedback
.singeRowTable
{
margin-top
:
20px
;
}
</
style
>
src/components/FinancialModule/OPcommissionPeriods.vue
View file @
150e1ce3
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
placeholder=
"选择月"
>
placeholder=
"选择月"
>
</el-date-picker>
</el-date-picker>
</li>
</li>
<li>
<li
v-show=
"btnShow"
>
<el-button
size=
"mini"
type=
"danger"
style=
"border-radius:14px"
:loading=
"btnLoading"
@
click=
"generateTable"
>
生成提成
</el-button>
<el-button
size=
"mini"
type=
"danger"
style=
"border-radius:14px"
:loading=
"btnLoading"
@
click=
"generateTable"
>
生成提成
</el-button>
<!--
<input
v-loading=
"btnLoading"
type=
"button"
class=
"normalBtn"
@
click=
"generateTable"
value=
"生成提成"
/>
-->
<!--
<input
v-loading=
"btnLoading"
type=
"button"
class=
"normalBtn"
@
click=
"generateTable"
value=
"生成提成"
/>
-->
</li>
</li>
...
@@ -72,9 +72,16 @@ import moment from "moment"
...
@@ -72,9 +72,16 @@ import moment from "moment"
total
:
0
,
total
:
0
,
currentPage
:
1
,
currentPage
:
1
,
btnLoading
:
false
,
btnLoading
:
false
,
btnShow
:
false
,
}
}
},
},
mounted
()
{
mounted
()
{
let
userInfo
=
this
.
getLocalStorage
();
let
ActionMenuCode
=
userInfo
.
ActionMenuCode
;
if
(
ActionMenuCode
.
indexOf
(
'P_OPCommissionSend'
)
!=-
1
){
this
.
btnShow
=
true
;
}
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
...
...
src/components/administrative/ClausesOrder.vue
0 → 100644
View file @
150e1ce3
<
style
>
.CM_look
{
padding
:
4px
!important
;
position
:
relative
;
top
:
1px
;
}
</
style
>
<
template
>
<div
class=
"flexOne"
>
<!--
<div
class=
"query-box"
>
<ul>
<li>
<input
type=
"button"
class=
"normalBtn"
@
click=
"generateTable"
value=
"生成提成报表"
/>
</li>
</ul>
</div>
-->
<table
v-loading=
"loading"
class=
"singeRowTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<th>
订单号
</th>
<th>
团号
</th>
<th>
旅客数
</th>
<th>
销售名称
</th>
</tr>
<tr
v-for=
"(item,index) in dataList"
:key=
"index"
>
<td>
{{
item
.
OrderId
}}
</td>
<td>
{{
item
.
TCNUM
}}
</td>
<td>
{{
item
.
GuestNum
}}
</td>
<td>
{{
item
.
CreateByName
}}
</td>
<!--
<td>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"查看"
placement=
"top"
>
<el-button
type=
"primary"
class=
"CM_look"
@
click=
"goUrl('CommissionDetail',item.id)"
icon=
"iconfont icon-chakan"
circle
></el-button>
</el-tooltip>
</td>
-->
</tr>
<tr>
<td
v-show=
"dataList.length==0"
colspan=
"4"
align=
"center"
>
暂无数据
</td>
</tr>
</table>
<!-- 分页 -->
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
'msg.PageSize'
:total=
'total'
>
</el-pagination>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
msg
:
{
PageIndex
:
1
,
PageSize
:
20
,
StartDate
:
''
,
},
loading
:
false
,
//数据源
dataList
:[],
total
:
0
,
currentPage
:
1
,
}
},
mounted
()
{
this
.
msg
.
StartDate
=
this
.
$route
.
query
.
StartDate
;
this
.
getList
();
},
methods
:
{
handleCurrentChange
(
val
)
{
this
.
msg
.
PageIndex
=
val
;
this
.
getList
();
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
path
:
path
,
query
:
{
ParentId
:
id
,
blank
:
'y'
,
tab
:
'报价详情'
}
});
},
//获取数据
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"OPCommission_GetCommissionOrderPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
//生成提成报表
generateTable
(){
let
msg
=
{
UserId
:
0
}
this
.
apipost
(
"sellcommission_SetGenerateCommission"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
getList
();
this
.
Success
(
'报表生成成功'
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}
}
}
</
script
>
src/components/administrative/CommissionManagement.vue
View file @
150e1ce3
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<th>
日期
</th>
<th>
日期
</th>
<th>
{{
$t
(
'system.table_operation'
)
}}
</th>
<th>
{{
$t
(
'system.table_operation'
)
}}
</th>
</tr>
</tr>
<tr
v-for=
"
item in dataList
"
>
<tr
v-for=
"
(item,index) in dataList"
:key=
"index
"
>
<td>
{{
item
.
periods
}}
</td>
<td>
{{
item
.
periods
}}
</td>
<td>
{{
item
.
sumPrice
}}
</td>
<td>
{{
item
.
sumPrice
}}
</td>
<td>
{{
item
.
createByStr
}}
</td>
<td>
{{
item
.
createByStr
}}
</td>
...
...
src/components/administrative/DjCommissionDetail.vue
0 → 100644
View file @
150e1ce3
<
template
>
<div
class=
"commissionDetails-box"
>
<div
class=
"query-box"
>
<ul>
<li>
<!--
<input
type=
"button"
class=
"normalBtn"
value=
"导出"
@
click=
"exportExcel"
>
-->
</li>
</ul>
</div>
<v-table
v-if=
"isReady"
is-horizontal-resize
column-width-drag
style=
"width:100%"
:columns=
"columns"
:table-data=
"dataList"
:filter-method=
"filterMethod"
:total=
"total"
:pageSize=
"msg.pageSize"
:pageIndex=
"msg.pageIndex"
:handleCurrentChange=
"handleCurrentChange"
:multiple-sort=
"multipleSort"
:is-loading=
"loading"
sort-always
@
on-custom-comp=
"customCompFunc"
></v-table>
<div
style=
"height:20px;"
>
</div>
<!-- @sort-change="sortChange" -->
</div>
</
template
>
<
script
>
import
moment
from
"moment"
import
Vue
from
'vue'
import
XLSX
from
'xlsx'
var
FileSaver
=
require
(
'file-saver'
)
export
default
{
data
()
{
return
{
activeName
:
"first"
,
commonName
:
"姓名"
,
loading
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
20
,
ParentId
:
0
,
OrderStr
:
"RB_Branch_Id asc"
,
BName
:
-
1
},
total
:
0
,
currentPage
:
1
,
columns
:
[],
remoteLoading
:
false
,
total
:
0
,
dataList
:
[],
isReady
:
false
,
multipleSort
:
false
,
loading
:
true
,
CompanyList
:[],
dataListTwo
:
[],
stringPerons
:
''
,
oPComissionPeriods
:{},
};
},
methods
:
{
exportExcel
(){
const
defaultCellStyle
=
{
'!cols'
:
[{
wpx
:
60
},
{
wpx
:
200
},
{
wpx
:
60
},
{
wpx
:
150
},{
wpx
:
60
}]};
const
wopts
=
{
bookType
:
'xlsx'
,
bookSST
:
false
,
type
:
'binary'
,
defaultCellStyle
:
defaultCellStyle
,
showGridLines
:
true
};
const
wb
=
{
SheetNames
:
[
'提成统计'
],
Sheets
:
{},
Props
:
{}
};
let
data
=
[]
this
.
dataList
.
forEach
(
x
=>
{
let
obj
=
{
'公司'
:
x
.
bName
,
'部门'
:
x
.
departmentName
,
'员工'
:
x
.
createByStr
,
'提成金额'
:
x
.
commissionMoney
.
toFixed
(
2
),
'额外奖励'
:
x
.
otherMoney
.
toFixed
(
2
),
'额外扣除'
:
x
.
backMoney
.
toFixed
(
2
),
'应发提成'
:
x
.
sumMoney
.
toFixed
(
2
),
'收客数'
:
x
.
peopleCount
,
'单签证人数'
:
x
.
visaPeopleCount
,
'所属期数'
:
x
.
periods
}
data
.
push
(
obj
)
})
wb
.
Sheets
[
'提成统计'
]
=
XLSX
.
utils
.
json_to_sheet
(
data
)
//创建二进制对象写入转换好的字节流
let
tmpDown
=
new
Blob
([
this
.
s2ab
(
XLSX
.
write
(
wb
,
wopts
))],
{
type
:
"application/octet-stream"
})
FileSaver
.
saveAs
(
tmpDown
,
"提成统计.xls"
);
},
s2ab
(
s
)
{
if
(
typeof
ArrayBuffer
!==
'undefined'
)
{
var
buf
=
new
ArrayBuffer
(
s
.
length
);
var
view
=
new
Uint8Array
(
buf
);
for
(
var
i
=
0
;
i
!=
s
.
length
;
++
i
)
view
[
i
]
=
s
.
charCodeAt
(
i
)
&
0xFF
;
return
buf
;
}
else
{
var
buf
=
new
Array
(
s
.
length
);
for
(
var
i
=
0
;
i
!=
s
.
length
;
++
i
)
buf
[
i
]
=
s
.
charCodeAt
(
i
)
&
0xFF
;
return
buf
;
}
},
filterMethod
(
filters
){
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dataListTwo
))
let
dataListTwo
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dataListTwo
))
if
(
filters
.
BranchName
!=
''
&&
filters
.
BranchName
!=
'__all__'
){
data
=
data
.
filter
(
item
=>
item
.
BranchName
.
indexOf
(
filters
.
BranchName
)
!=-
1
);
}
if
(
filters
.
DepartmentName
!=
''
){
data
=
data
.
filter
(
item
=>
item
.
DepartmentName
.
indexOf
(
filters
.
DepartmentName
)
!=-
1
);
}
if
(
filters
.
EmployeeName
!=
''
){
data
=
data
.
filter
(
item
=>
item
.
EmployeeName
.
indexOf
(
filters
.
EmployeeName
)
!=-
1
);
}
if
((
filters
.
BranchName
===
''
||
filters
.
BranchName
===
'__all__'
)
&&
filters
.
DepartmentName
===
''
&&
filters
.
EmployeeName
===
''
){
data
=
dataListTwo
}
this
.
dataList
=
data
},
customCompFunc
(
params
)
{
if
(
params
.
type
===
"see"
)
{
this
.
getInfo
(
params
.
data
)
}
else
{
this
.
voucher
(
params
.
data
)
}
},
voucher
(
data
){
let
msg
=
{
TemplateId
:
27
,
RB_Branch_Id
:
data
.
RB_Branch_Id
,
IsPublic
:
6
,
BType
:
4
,
AccountId
:
22
,
CostTypeID
:
189
,
WBMoney
:
data
.
CommissionMoney
,
Remark
:
''
,
TCID
:
0
,
IsRelevanceTravel
:
1
,
OrderID
:
0
,
vorcherInos
:[],
Description
:
''
,
RemitterName
:
''
,
TradeDate
:
moment
().
format
(
'YYYY-MM-DD'
),
OrderSource
:
14
,
};
this
.
$confirm
(
'提成金额是否正确?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
loading
=
true
;
this
.
apipost
(
"Financial_post_SetFinanceInfoCommonForIn"
,
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
apipost
(
"OPCommission_UpdatePeriodsFrID"
,
{
ID
:
this
.
oPComissionPeriods
.
ID
,
FrId
:
res
.
data
.
data
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
getList
();
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{
});
},
getCompanyList
()
{
//获取公司列表
this
.
apipost
(
"admin_get_BranchGetList"
,
this
.
getCompanyMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
x
.
disabled
=
false
;
});
this
.
CompanyList
=
data
;
}
else
{
}
},
err
=>
{}
);
},
initColums
()
{
let
oPComissionPeriods
=
this
.
oPComissionPeriods
;
this
.
isReady
=
false
;
let
that
=
this
;
let
companyList
=
[];
this
.
CompanyList
.
forEach
(
x
=>
{
let
item
=
{};
item
.
label
=
x
.
BName
;
item
.
value
=
x
.
BName
;
companyList
.
push
(
item
);
});
let
company
=
{
field
:
"BranchName"
,
title
:
"公司"
,
width
:
40
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
result
:
""
,
filterMultiple
:
false
,
filters
:
companyList
,
type
:
"select"
// filterMultiple: false,
// filters: companyList,
// result: "",
// type: "select",
// orderBy: "asc"
// isFrozen:true
};
let
department
=
{
field
:
"DepartmentName"
,
title
:
"部门"
,
width
:
80
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
result
:
""
,
filterMultiple
:
false
,
filters
:
companyList
,
type
:
"text"
};
let
userName
=
{
field
:
"EmployeeName"
,
title
:
"姓名"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
result
:
""
,
filterMultiple
:
false
,
filters
:
[{}],
type
:
"text"
};
let
CommissionMoney
=
{
field
:
"CommissionMoney"
,
title
:
"提成金额"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
return
`<span>
${
rowData
.
CommissionMoney
.
toFixed
(
2
)}
</span>`
}
};
let
Zhanbi
=
{
field
:
"CommissionPercent"
,
title
:
"占比"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
return
`<span>
${
rowData
.
CommissionPercent
}
%</span>`
}
};
let
remark
=
{
field
:
"remark"
,
title
:
"备注"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
80
,
componentName
:
"commission-table-beizhu"
// formatter: function(rowData, rowIndex, pagingIndex, field) {
// return `
<
span
v
-
if
=
"${rowData.EmployeeId==0 && oPComissionPeriods.FRID>0}"
>
//
<
span
>
$
{
rowData
.
EmployeeId
}
<
/span
>
// 单据号:${oPComissionPeriods.FRID}
<
/span>`
;
// }
};
let
opera
=
{
title
:
"操作"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
width
:
80
,
isResize
:
false
,
componentName
:
"commission-table-operation"
};
this
.
columns
=
[];
this
.
columns
.
push
(
company
);
this
.
columns
.
push
(
department
);
this
.
columns
.
push
(
userName
);
this
.
columns
.
push
(
CommissionMoney
);
// this.columns.push(otherMoney);
// this.columns.push(backMoney);
// this.columns.push(sumMoney);
// this.columns.push(peopleCount);
// this.columns.push(visaPeopleCount);
this
.
columns
.
push
(
Zhanbi
);
this
.
columns
.
push
(
remark
);
this
.
columns
.
push
(
opera
);
this
.
isReady
=
true
;
},
sortChange
(
param
)
{
if
(
param
.
sumMoney
==
''
){
if
(
param
.
BName
!=
''
){
this
.
msg
.
OrderStr
=
'RB_Branch_Id '
+
param
.
bName
}
if
(
param
.
commissionMoney
!=
''
){
this
.
msg
.
OrderStr
=
'CommissionMoney '
+
param
.
commissionMoney
}
if
(
param
.
peopleCount
!=
''
){
this
.
msg
.
OrderStr
=
'PeopleCount '
+
param
.
peopleCount
}
if
(
param
.
backMoney
!=
''
){
this
.
msg
.
OrderStr
=
'BackMoney '
+
param
.
backMoney
}
if
(
param
.
otherMoney
!=
''
){
this
.
msg
.
OrderStr
=
'OtherMoney '
+
param
.
otherMoney
}
this
.
getList
();
}
else
{
let
d
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dataList
))
this
.
dataList
=
this
.
orderBy
(
d
,
[
"sumMoney"
],
param
.
sumMoney
).
results
;
}
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"OPCommission_GetPeriodsDetailsList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
.
data
;
this
.
oPComissionPeriods
=
res
.
data
.
data
.
oPComissionPeriods
;
data
.
forEach
(
item
=>
{
item
.
FRID
=
this
.
oPComissionPeriods
.
FRID
;
item
.
PeriodsDate
=
this
.
oPComissionPeriods
.
PeriodsDate
;
})
this
.
total
=
res
.
data
.
data
.
data
.
length
;
this
.
dataList
=
data
;
// this.dataList.forEach(x=>{
// x.sumMoney=x.commissionMoney+x.otherMoney-x.backMoney
// })
this
.
dataListTwo
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dataList
))
this
.
initColums
();
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
//切换排序
handleClick
(
tab
,
event
)
{
if
(
this
.
activeName
==
"first"
)
{
// this.commonName='姓名'
this
.
msg
.
OrderStr
=
"UserId"
;
}
else
{
// this.commonName='公司名'
this
.
msg
.
OrderStr
=
"RB_Branch_Id"
;
}
this
.
getList
();
},
//跳转
getInfo
(
item
)
{
this
.
$router
.
push
({
path
:
"ClausesOrder"
,
query
:
{
StartDate
:
item
.
PeriodsDate
,
blank
:
'y'
}
});
}
},
mounted
()
{
this
.
msg
.
pageSize
=
10000
;
//不分页
this
.
msg
.
ID
=
this
.
$route
.
query
.
ID
;
let
dt
=
new
Date
()
this
.
stringPerons
=
(
dt
.
getMonth
()
==
0
?(
dt
.
getFullYear
()
-
1
):
dt
.
getFullYear
())
+
''
+
(
dt
.
getMonth
().
toString
().
length
<
2
?
'0'
:
''
)
+
(
dt
.
getMonth
()
==
0
?
12
:
dt
.
getMonth
());
this
.
getList
();
this
.
getCompanyList
();
},
created
(){
Vue
.
component
(
'commission-table-beizhu'
,{
template
:
` <span v-if="rowData.EmployeeId==0 && rowData.FRID>0">
单据号:{{rowData.FRID}}</span>`
,
props
:{
rowData
:{
type
:
Object
},
field
:{
type
:
String
},
index
:{
type
:
Number
}
},
created
(){
},
methods
:{
see
(){
let
params
=
{
type
:
'see'
,
data
:
this
.
rowData
};
this
.
$emit
(
'on-custom-comp'
,
params
);
},
ZhiDan
(){
let
params
=
{
type
:
'zhidan'
,
data
:
this
.
rowData
};
this
.
$emit
(
'on-custom-comp'
,
params
);
},
}
})
Vue
.
component
(
'commission-table-operation'
,{
template
:
`<div style='width:80px;height:40px;background:#fff;text-align:center;position: relative;left:-5px;padding-top: 6px;padding-top:6px;'>
<el-button v-if="rowData.EmployeeId==0 && rowData.FRID==0" type="danger" size='mini' icon="el-icon-document" circle @click="ZhiDan(rowData,index)"></el-button>
<el-button type="primary" size='mini' icon="el-icon-view" circle @click="see(rowData,index)"></el-button>
</div>`
,
props
:{
rowData
:{
type
:
Object
},
field
:{
type
:
String
},
index
:{
type
:
Number
}
},
methods
:{
see
(){
let
params
=
{
type
:
'see'
,
data
:
this
.
rowData
};
this
.
$emit
(
'on-custom-comp'
,
params
);
},
ZhiDan
(){
let
params
=
{
type
:
'zhidan'
,
data
:
this
.
rowData
};
this
.
$emit
(
'on-custom-comp'
,
params
);
},
}
})
}
};
</
script
>
<
style
>
.commissionDetails-box
.el-button.is-circle
{
padding
:
5px
!important
;}
.commissionDetails-box
.v-table-body-cell
span
{
display
:
block
;
width
:
100%
;
}
</
style
>
src/components/administrative/DjCommissionsmangment.vue
0 → 100644
View file @
150e1ce3
<
style
>
.CM_look
{
padding
:
4px
!important
;
position
:
relative
;
top
:
1px
;
}
</
style
>
<
template
>
<div
class=
"flexOne"
>
<!--
<div
class=
"query-box"
>
<ul>
<li>
<input
type=
"button"
class=
"normalBtn"
@
click=
"generateTable"
value=
"生成提成报表"
/>
</li>
</ul>
</div>
-->
<table
class=
"singeRowTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<th>
期数
</th>
<th>
提成总金额
</th>
<th>
{{
$t
(
'admin.admin_czPerson'
)
}}
</th>
<th>
日期
</th>
<th>
{{
$t
(
'system.table_operation'
)
}}
</th>
</tr>
<tr
v-for=
"(item,index) in dataList"
:key=
"index"
>
<td>
{{
item
.
Periods
}}
</td>
<td>
{{
item
.
SumPrice
}}
</td>
<td>
{{
item
.
CreateByStr
}}
</td>
<td>
{{
item
.
CreateStr
}}
</td>
<td>
<!--
<el-tooltip
class=
"item"
effect=
"dark"
content=
"取消"
placement=
"top"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
circle
></el-button>
</el-tooltip>
-->
<el-tooltip
class=
"item"
effect=
"dark"
content=
"查看"
placement=
"top"
>
<el-button
type=
"primary"
class=
"CM_look"
@
click=
"goUrl('DjCommissionDetail',item.ID)"
icon=
"iconfont icon-chakan"
circle
></el-button>
</el-tooltip>
</td>
</tr>
<tr
v-if=
"dataList.length==0"
>
<td
colspan=
"5"
align=
"center"
>
暂无数据
</td>
</tr>
</table>
<!-- 分页 -->
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
'msg.PageSize'
:total=
'total'
>
</el-pagination>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
msg
:
{
PageIndex
:
1
,
PageSize
:
20
},
loading
:
false
,
//数据源
dataList
:[],
total
:
0
,
currentPage
:
1
,
}
},
mounted
()
{
this
.
getList
();
},
methods
:
{
handleCurrentChange
(
val
)
{
this
.
msg
.
PageIndex
=
val
;
this
.
getList
();
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
path
:
path
,
query
:
{
ID
:
id
,
blank
:
'y'
,
tab
:
'详情'
}
});
},
//获取数据
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"OPCommission_GetPeriodsPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
//生成提成报表
generateTable
(){
let
msg
=
{
UserId
:
0
}
this
.
apipost
(
"sellcommission_SetGenerateCommission"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
getList
();
this
.
Success
(
'报表生成成功'
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}
}
}
</
script
>
src/router/config.js
View file @
150e1ce3
...
@@ -328,6 +328,14 @@ export default {
...
@@ -328,6 +328,14 @@ export default {
title
:
'提成管理'
title
:
'提成管理'
},
},
},
},
{
path
:
'/DjCommissionsmangment'
,
//提成管理
name
:
'DjCommissionsmangment'
,
component
:
resolve
=>
require
([
'@/components/administrative/DjCommissionsmangment'
],
resolve
),
meta
:
{
title
:
'地接提成'
},
},
{
{
path
:
'/AirticketCommission'
,
//票务提成
path
:
'/AirticketCommission'
,
//票务提成
name
:
'AirticketCommission'
,
name
:
'AirticketCommission'
,
...
@@ -352,6 +360,22 @@ export default {
...
@@ -352,6 +360,22 @@ export default {
title
:
'提成详情'
title
:
'提成详情'
},
},
},
},
{
path
:
'/ClausesOrder'
,
//提成详情
name
:
'ClausesOrder'
,
component
:
resolve
=>
require
([
'@/components/administrative/ClausesOrder'
],
resolve
),
meta
:
{
title
:
'期数订单'
},
},
{
path
:
'/DjCommissionDetail'
,
//提成详情
name
:
'DjCommissionDetail'
,
component
:
resolve
=>
require
([
'@/components/administrative/DjCommissionDetail'
],
resolve
),
meta
:
{
title
:
'提成详情'
},
},
{
{
path
:
'/ExaminationStatistics'
,
//考核管理
path
:
'/ExaminationStatistics'
,
//考核管理
name
:
'ExaminationStatistics'
,
name
:
'ExaminationStatistics'
,
...
@@ -3635,6 +3659,14 @@ export default {
...
@@ -3635,6 +3659,14 @@ export default {
title
:
'op提成'
title
:
'op提成'
}
}
},
},
{
path
:
'/Djcommissions'
,
name
:
'Djcommissions'
,
component
:
resolve
=>
require
([
'@/components/FinancialModule/Djcommissions'
],
resolve
),
meta
:
{
title
:
'地接提成规则'
}
},
{
{
path
:
'/OPCommissionDetail'
,
path
:
'/OPCommissionDetail'
,
name
:
'OPCommissionDetail'
,
name
:
'OPCommissionDetail'
,
...
...
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