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
60b3b70d
Commit
60b3b70d
authored
Nov 27, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
票务提成修改
parent
09c8bed2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
303 additions
and
194 deletions
+303
-194
flightPerformance.vue
src/components/Ticketing/flightPerformance.vue
+303
-194
No files found.
src/components/Ticketing/flightPerformance.vue
View file @
60b3b70d
<
style
>
.flightPerformance
.fpTable
th
{
border-bottom
:
1px
solid
#d1d1d1
;
border-right
:
1px
solid
#d1d1d1
;
background
:
#E6E6E
6
;
height
:
40px
;
font-size
:
14px
;
color
:
#333
;
}
.flightPerformance
.fpTable
th
{
border-bottom
:
1px
solid
#d1d1d1
;
border-right
:
1px
solid
#d1d1d1
;
background
:
#e6e6e
6
;
height
:
40px
;
font-size
:
14px
;
color
:
#333
;
}
.flightPerformance
.fpTable
{
width
:
1000px
;
margin-bottom
:
30px
;
border-collapse
:
collapse
;
}
.flightPerformance
.fpTable
{
width
:
1000px
;
margin-bottom
:
30px
;
border-collapse
:
collapse
;
}
.flightPerformance
.creatName
{
color
:
green
;
font-weight
:
bold
;
margin-right
:
10px
;
}
.flightPerformance
.creatName
{
color
:
green
;
font-weight
:
bold
;
margin-right
:
10px
;
}
.flightPerformance
.fpTable
tr
{
background
:
#fff
;
text-align
:
center
;
height
:
40px
;
}
.flightPerformance
.fpTable
tr
{
background
:
#fff
;
text-align
:
center
;
height
:
40px
;
}
.flightPerformance
.fpTable
tr
td
{
font-size
:
12px
;
border
:
1px
solid
#E5E5E5
;
}
.flightPerformance
.fpTable
tbody
tr
:last-child
{
border-bottom
:
2px
solid
#333
;
}
.flightPerformance
.fpTable
tr
td
{
font-size
:
12px
;
border
:
1px
solid
#e5e5e5
;
}
.flightPerformance
.fpTable
tbody
tr
:last-child
{
border-bottom
:
2px
solid
#333
;
}
</
style
>
<
template
>
...
...
@@ -44,35 +43,68 @@
<li>
<span>
<em>
操作人
</em>
<el-select
v-model=
"msg.CreateBy"
filterable
:placeholder=
"$t('system.ph_in')"
>
<el-select
v-model=
"msg.CreateBy"
filterable
:placeholder=
"$t('system.ph_in')"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
"0"
></el-option>
<el-option
v-for=
"item in EmployeeList"
:label=
"item.EmName"
:value=
"item.EmployeeId"
:key=
"item.EmployeeId"
></el-option>
<el-option
v-for=
"item in EmployeeList"
:label=
"item.EmName"
:value=
"item.EmployeeId"
:key=
"item.EmployeeId"
></el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>
月份
</em>
<el-date-picker
v-model=
'msg.QMonth'
value-format=
"yyyy-MM"
type=
"month"
></el-date-picker>
<el-date-picker
v-model=
"msg.QMonth"
value-format=
"yyyy-MM"
type=
"month"
></el-date-picker>
</span>
</li>
<li
style=
"line-height:34px;font-size:14px;"
>
单买机票计算方式:
<span
style=
"color:red;"
>
(售价-成本价)
X
{{
singlePercent
}}
</span>
</li>
<li>
<input
type=
"button"
class=
"hollowFixedBtn"
@
click=
"getList()"
:value=
"$t('pub.searchBtn')"
/>
<input
type=
"button"
class=
"hollowFixedBtn"
@
click=
"DownLoad()"
value=
"导出"
/>
<input
type=
"button"
class=
"hollowFixedBtn"
@
click=
"getList()"
:value=
"$t('pub.searchBtn')"
/>
<input
type=
"button"
class=
"hollowFixedBtn"
@
click=
"DownLoad()"
value=
"导出"
/>
</li>
</ul>
</div>
<table
class=
"fpTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
v-for=
"(item,index) in dataList.resultList"
:key=
"index"
>
<tbody
v-for=
"(subItem,subIndex) in item.TicketList"
:key=
"subIndex"
>
<tr
v-if=
"subIndex==0"
>
<table
class=
"fpTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
v-for=
"(item, index) in dataList.resultList"
:key=
"index"
>
<tbody
v-for=
"(subItem, subIndex) in item.TicketList"
:key=
"subIndex"
>
<tr
v-if=
"subIndex == 0"
>
<td
colspan=
"6"
>
<span
class=
"creatName"
>
{{
item
.
CreateByName
}}
</span>
{{
msg
.
QMonth
}}
提成数据
</td>
<span
class=
"creatName"
>
{{
item
.
CreateByName
}}
</span>
{{
msg
.
QMonth
}}
提成数据
</td>
</tr>
<tr
v-if=
"index
==0&&subIndex==
0"
>
<tr
v-if=
"index
== 0 && subIndex ==
0"
>
<th>
序号
</th>
<th>
公司
</th>
<th>
团号
</th>
...
...
@@ -80,185 +112,262 @@
<th>
金额
</th>
<th>
小计
</th>
</tr>
<template
v-for=
"(childItem,
childIndex) in subItem.SubList"
>
<template
v-for=
"(childItem,
childIndex) in subItem.SubList"
>
<tr
:key=
"childIndex"
>
<td
width=
"10%"
>
{{
childIndex
+
1
}}
{{
childIndex
+
1
}}
</td>
<td
width=
"20%"
:rowspan=
"subItem.SubList.length+1"
style=
"border-bottom:2px solid black"
v-if=
"childIndex==0"
>
{{
subItem
.
OutBranchName
}}
<td
width=
"20%"
:rowspan=
"subItem.SubList.length + 1"
style=
"border-bottom:2px solid black"
v-if=
"childIndex == 0"
>
{{
subItem
.
OutBranchName
}}
</td>
<td
width=
"30%"
>
<template
v-if=
"childItem.TCID>0"
>
<a
style=
"color:blue;cursor:pointer"
@
click=
'goUrlT("RegistrationList",childItem.TCID,"报名清单")'
>
(
{{
childItem
.
TCID
}}
)
{{
childItem
.
TCNUM
}}
<template
v-if=
"childItem.TCID > 0"
>
<template
v-if=
"childItem.TicketType==2"
>
<a
style=
"color:blue;cursor:pointer"
@
click=
"goUrlT('TicketManager', childItem.TCID, '票务关闭')"
>
{{
childItem
.
TCNUM
}}
</a>
</
template
>
<
template
v-if=
"childItem.TicketType==1"
>
<a
style=
"color:blue;cursor:pointer"
@
click=
"goUrlT('RegistrationList', childItem.TCID, '报名清单')"
>
(
{{
childItem
.
TCID
}}
)
{{
childItem
.
TCNUM
}}
</a>
</
template
>
</template>
<
template
v-else
>
{{
childItem
.
TCNUM
}}
</
template
>
</td>
<td
width=
"10%"
>
{{childItem.TicketNum}}
</td>
<td
width=
"10%"
:rowspan=
"subItem.SubList.length+1"
style=
"border-bottom:2px solid black"
v-if=
"childIndex==0"
>
{{dataList.UnitPrice}}
</td>
<td
width=
"10%"
>
{{childItem.TicketNum*dataList.UnitPrice}}
</td>
</tr>
<tr
v-if=
"childIndex==subItem.SubList.length-1"
:key=
"childIndex+500"
>
<td></td>
<td
style=
"font-weight:bold;"
>
合计
</td>
<td
style=
"color:red;"
>
{{getPeopleCount(subItem.SubList)}}
</td>
<td
style=
"color:red;"
>
{{getCount(subItem.SubList)}}
</td>
<td
width=
"10%"
>
{{ childItem.TicketNum }}
</td>
<!--单卖机票-->
<
template
v-if=
"childItem.TicketType == 2"
>
<td
width=
"10%"
>
{{
childItem
.
SalePrice
-
childItem
.
CostPrice
}}
</td>
<td
width=
"10%"
>
{{
childItem
.
TicketNum
*
(
childItem
.
SalePrice
-
childItem
.
CostPrice
)
*
singlePercent
}}
</td>
</
template
>
<
template
v-else
>
<td
width=
"10%"
:rowspan=
"subItem.SubList.length + 1"
style=
"border-bottom:2px solid black"
v-if=
"childIndex == 0"
>
{{
dataList
.
UnitPrice
}}
</td>
<td
width=
"10%"
>
{{
childItem
.
TicketNum
*
dataList
.
UnitPrice
}}
</td>
</
template
>
</tr>
<
template
v-if=
"childItem.TicketType == 2"
>
<tr
v-if=
"childIndex == subItem.SubList.length - 1"
:key=
"childIndex + 500"
>
<td></td>
<td
style=
"font-weight:bold;"
>
合计
</td>
<td
style=
"color:red;"
>
{{
getPeopleCount
(
subItem
.
SubList
)
}}
</td>
<td>
</td>
<td
style=
"color:red;"
>
{{
getSingleCount
(
subItem
.
SubList
)
}}
</td>
</tr>
</
template
>
<
template
v-else
>
<tr
v-if=
"childIndex == subItem.SubList.length - 1"
:key=
"childIndex + 500"
>
<td></td>
<td
style=
"font-weight:bold;"
>
合计
</td>
<td
style=
"color:red;"
>
{{
getPeopleCount
(
subItem
.
SubList
)
}}
</td>
<td
style=
"color:red;"
>
{{
getCount
(
subItem
.
SubList
)
}}
</td>
</tr>
</
template
>
</template>
<tr
v-if=
"subIndex
==item.TicketList.length-
1"
>
<tr
v-if=
"subIndex
== item.TicketList.length -
1"
>
<td></td>
<td></td>
<td
style=
"font-weight:bold;"
>
总计
</td>
<td>
<span
style=
"color:red;"
>
{{getTotalNum(item.TicketList)}}
</span>
<span
style=
"color:red;"
>
{{ getTotalNum(item.TicketList) }}
</span>
</td>
<td>
{{ dataList.UnitPrice }}
</td>
<td>
<span
style=
"color:red;"
>
{{ getTotalCount(item.TicketList) }}
</span>
</td>
<td>
{{dataList.UnitPrice}}
</td>
<td><span
style=
"color:red;"
>
{{getTotalCount(item.TicketList)}}
</span></td>
</tr>
</tbody>
</table>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
msg
:
{
LineId
:
0
,
//线路编号
OutBranchId
:
-
1
,
//出团公司
AirLineID
:
0
,
//航空公司编号
CreateBy
:
0
,
//操作人
QMonth
:
''
,
//月份
},
loading
:
false
,
dataList
:
{},
//航空公司下拉
airlineList
:
[],
//操作人下拉
EmployeeList
:
[],
}
export
default
{
data
()
{
return
{
msg
:
{
LineId
:
0
,
//线路编号
OutBranchId
:
-
1
,
//出团公司
AirLineID
:
0
,
//航空公司编号
CreateBy
:
0
,
//操作人
QMonth
:
""
//月份
},
//单机票百分比
singlePercent
:
0.1
,
loading
:
false
,
dataList
:
{},
//航空公司下拉
airlineList
:
[],
//操作人下拉
EmployeeList
:
[]
};
},
mounted
()
{
this
.
getEmployeeList
();
if
(
this
.
$route
.
query
.
UserId
)
{
this
.
msg
.
CreateBy
=
Number
(
this
.
$route
.
query
.
UserId
);
}
if
(
this
.
$route
.
query
.
Periods
)
{
var
str
=
this
.
$route
.
query
.
Periods
;
this
.
msg
.
QMonth
=
str
.
substring
(
0
,
4
)
+
"-"
+
str
.
substring
(
4
);
}
else
{
let
date
=
new
Date
(),
y
=
date
.
getFullYear
(),
m
=
date
.
getMonth
()
<
10
?
"0"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
;
this
.
msg
.
QMonth
=
y
+
"-"
+
m
;
}
this
.
initAirlines
();
this
.
getList
();
},
methods
:
{
//单卖机票计算
getSingleCount
(
list
)
{
let
count
=
0
;
list
.
forEach
(
x
=>
{
count
+=
x
.
TicketNum
*
(
x
.
SalePrice
-
x
.
CostPrice
)
*
this
.
singlePercent
;
});
return
count
;
},
//页面跳转
goUrlT
(
path
,
obj
,
title
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
id
:
obj
,
blank
:
"y"
,
tab
:
title
}
});
},
//获取列表数据
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"AirTicket_get_GetTicketPerformance"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
});
},
mounted
()
{
this
.
getEmployeeList
();
if
(
this
.
$route
.
query
.
UserId
)
{
this
.
msg
.
CreateBy
=
Number
(
this
.
$route
.
query
.
UserId
);
}
if
(
this
.
$route
.
query
.
Periods
)
{
var
str
=
this
.
$route
.
query
.
Periods
;
this
.
msg
.
QMonth
=
str
.
substring
(
0
,
4
)
+
"-"
+
str
.
substring
(
4
);
}
else
{
let
date
=
new
Date
(),
y
=
date
.
getFullYear
(),
m
=
date
.
getMonth
()
<
10
?
"0"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
;
this
.
msg
.
QMonth
=
y
+
'-'
+
m
;
}
this
.
initAirlines
();
this
.
getList
()
//获取没个的人数
getPeopleCount
(
subList
)
{
let
count
=
0
;
subList
.
forEach
(
x
=>
{
count
+=
x
.
TicketNum
;
});
return
count
;
},
methods
:
{
//页面跳转
goUrlT
(
path
,
obj
,
title
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
"id"
:
obj
,
blank
:
'y'
,
tab
:
title
//计算小计
getCount
(
list
)
{
let
count
=
0
;
list
.
forEach
(
x
=>
{
count
+=
x
.
TicketNum
;
});
return
count
*
this
.
dataList
.
UnitPrice
;
},
//计算总计
getTotalCount
(
list
)
{
let
count
=
0
;
list
.
forEach
(
x
=>
{
x
.
SubList
.
forEach
(
y
=>
{
if
(
y
.
TicketType
!=
2
)
{
count
+=
y
.
TicketNum
*
this
.
dataList
.
UnitPrice
;
}
})
},
//获取列表数据
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"AirTicket_get_GetTicketPerformance"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
else
{
count
+=
y
.
TicketNum
*
(
y
.
SalePrice
-
y
.
CostPrice
)
*
this
.
singlePercent
;
}
});
},
//获取没个的人数
getPeopleCount
(
subList
)
{
let
count
=
0
;
subList
.
forEach
(
x
=>
{
count
+=
x
.
TicketNum
;
});
return
count
;
},
//计算小计
getCount
(
list
)
{
let
count
=
0
;
list
.
forEach
(
x
=>
{
count
+=
x
.
TicketNum
;
});
return
count
;
},
//获取总计人数
getTotalNum
(
list
)
{
let
count
=
0
;
list
.
forEach
(
x
=>
{
x
.
SubList
.
forEach
(
y
=>
{
count
+=
y
.
TicketNum
;
});
return
count
*
this
.
dataList
.
UnitPrice
;
},
//计算总计
getTotalCount
(
list
)
{
let
count
=
0
;
list
.
forEach
(
x
=>
{
x
.
SubList
.
forEach
(
y
=>
{
count
+=
y
.
TicketNum
})
})
return
count
*
this
.
dataList
.
UnitPrice
;
},
//获取总计人数
getTotalNum
(
list
)
{
let
count
=
0
;
list
.
forEach
(
x
=>
{
x
.
SubList
.
forEach
(
y
=>
{
count
+=
y
.
TicketNum
})
})
return
count
;
},
//初始化航空公司下拉
initAirlines
()
{
this
.
apipost
(
"airline_post_GetList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
airlineList
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
//根据当前员工所在部门获取该部门及子部门员工信息
getEmployeeList
()
{
this
.
apipost
(
"admin_get_GetEmployeeByUserDepartmentId"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
EmployeeList
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
//下载业绩数据
DownLoad
()
{
this
.
loading
=
true
;
var
fileName
=
"机票业绩下载"
+
this
.
msg
.
QMonth
+
".xls"
;
this
.
GetLocalFile
(
"AirTicket_get_DownLoadGetTicketPerformance"
,
this
.
msg
,
fileName
,
res
=>
{
this
.
loading
=
false
;
});
}
});
return
count
;
},
//初始化航空公司下拉
initAirlines
()
{
this
.
apipost
(
"airline_post_GetList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
airlineList
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
//根据当前员工所在部门获取该部门及子部门员工信息
getEmployeeList
()
{
this
.
apipost
(
"admin_get_GetEmployeeByUserDepartmentId"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
EmployeeList
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
//下载业绩数据
DownLoad
()
{
this
.
loading
=
true
;
var
fileName
=
"机票业绩下载"
+
this
.
msg
.
QMonth
+
".xls"
;
this
.
GetLocalFile
(
"AirTicket_get_DownLoadGetTicketPerformance"
,
this
.
msg
,
fileName
,
res
=>
{
this
.
loading
=
false
;
}
);
}
}
};
</
script
>
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