Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
5f7489b1
Commit
5f7489b1
authored
Nov 29, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分公司统计
parent
32ec2a74
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
770 additions
and
424 deletions
+770
-424
statistics.js
src/api/statistics.js
+19
-0
index.js
src/api/vehicle/departureLog/index.js
+1
-1
index.js
src/router/index.js
+8
-2
branchCompany.vue
src/views/financial/branchCompany.vue
+184
-0
index.vue
src/views/vehicle/vehicleDepartureLog/index.vue
+558
-421
No files found.
src/api/statistics.js
View file @
5f7489b1
...
...
@@ -35,4 +35,23 @@ export function excel(query) {
data
:
query
,
responseType
:
'blob'
});
}
// 分公司业绩
export
function
company_performance
(
query
)
{
return
fetch
({
url
:
'api/order/statistics/company_performance'
,
method
:
'post'
,
data
:
query
});
}
// 員工業績導出
export
function
excelExport
(
query
)
{
return
fetch
({
url
:
'api/order/statistics/export'
,
method
:
'post'
,
data
:
query
,
responseType
:
'blob'
});
}
\ No newline at end of file
src/api/vehicle/departureLog/index.js
View file @
5f7489b1
...
...
@@ -19,7 +19,7 @@ export function statistic(param) {
export
function
findReserveType
(
param
)
{
return
fetch
({
url
:
'/departure/findReserveType '
,
url
:
'/
vehicle/
departure/findReserveType '
,
method
:
'get'
,
params
:
param
})
...
...
src/router/index.js
View file @
5f7489b1
...
...
@@ -555,7 +555,8 @@ export const asyncRouterMap = [{
component
:
_import
(
'userManagement/imCustomerServiceManger/cusomterServiceList'
),
name
:
'客服列表'
,
authority
:
'imCustomerServiceManger'
},{
},
{
path
:
'employeesInput'
,
component
:
_import
(
'userManagement/employeesInput'
),
name
:
'员工录入'
,
...
...
@@ -587,7 +588,7 @@ export const asyncRouterMap = [{
component
:
_import
(
'appManagement/selectedActivities/index'
),
name
:
'首页精选活动'
,
authority
:
'selectedActivities'
}
,
}
// {
// path: 'pushManagement',
// component: _import('appManagement/pushManagement/index'),
...
...
@@ -753,6 +754,11 @@ export const asyncRouterMap = [{
component
:
_import
(
'financial/memberPerformance'
),
name
:
'总公司报表'
,
authority
:
'memberPerformance'
},
{
path
:
'branchCompany'
,
component
:
_import
(
'financial/branchCompany'
),
name
:
'总公司报表'
,
authority
:
'branchCompany'
}
]
}
...
...
src/views/financial/branchCompany.vue
0 → 100644
View file @
5f7489b1
<
template
>
<div
class=
"app-container calendar-list-container"
>
<div
class=
"filter-container"
>
<el-form
:inline=
"true"
label-position=
"left"
>
<el-form-item
label=
"统计周期"
>
<el-date-picker
v-model=
"time"
type=
"daterange"
placeholder=
"请选择统计周期"
@
change=
"changeTime"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"统计方式"
>
<el-radio-group
v-model=
"listQuery.statisticalWay"
@
change=
"changeType"
>
<el-radio-button
label=
1
>
日
</el-radio-button>
<el-radio-button
label=
2
>
周
</el-radio-button>
<el-radio-button
label=
3
>
月
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"所属公司"
>
<el-select
v-model=
"listQuery.companyId"
filterable
placeholder=
"请选择业绩所属公司"
clearable
@
change=
"changeCompany"
>
<el-option
label=
"全部"
value
>
全部
</el-option>
<el-option
v-for=
"item in allCompaniesArr"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-button
type=
"primary"
@
click=
"clearSearch"
>
清空搜索
</el-button>
<el-button
type=
"primary"
:loading=
"excelLoading"
@
click=
"downloadExcel"
>
导出报表
</el-button>
</el-form>
<el-table
:data=
"tableData"
border
style=
"width: 100%"
header-align=
"center"
>
<el-table-column
prop=
"date"
label=
"时间"
align=
"center"
width=
"200"
v-if=
"listQuery.statisticalWay == 1"
></el-table-column>
<el-table-column
prop=
"weekOfYear"
label=
"时间"
align=
"center"
width=
"200"
v-else-if=
"listQuery.statisticalWay == 2"
></el-table-column>
<el-table-column
prop=
"month"
label=
"时间"
align=
"center"
width=
"200"
v-else
></el-table-column>
<el-table-column
prop=
"companyName"
label=
"公司"
align=
"center"
></el-table-column>
<el-table-column
prop=
"memberAmount"
label=
"会员费"
align=
"center"
></el-table-column>
<el-table-column
prop=
"rentVehilceAmount"
label=
"租车费"
align=
"center"
></el-table-column>
<el-table-column
prop=
"depositAmount"
label=
"押金"
align=
"center"
></el-table-column>
<el-table-column
prop=
"noDeductibleAmount"
label=
"不计免赔费"
align=
"center"
></el-table-column>
<el-table-column
prop=
"travelAmount"
label=
"旅游费"
align=
"center"
></el-table-column>
<el-table-column
prop=
"rentDays"
label=
"租借天数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"extralAmount"
label=
"其他费用"
align=
"center"
></el-table-column>
<el-table-column
prop=
"departureNum"
label=
"出车服务次数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"arrivalNum"
label=
"收车服务次数"
align=
"center"
></el-table-column>
</el-table>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"listQuery.page"
:page-sizes=
"[10,20,30, 50]"
:page-size=
"listQuery.limit"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
style=
"margin-top:20px"
></el-pagination>
</div>
</div>
</
template
>
<
script
>
import
{
company_performance
,
excelExport
}
from
'api/statistics'
import
{
getAll
}
from
'api/base_info/branch_company'
export
default
{
created
()
{
//表格数据
this
.
getList
()
//获取分公司
getAll
().
then
(
data
=>
{
this
.
allCompaniesArr
=
data
.
data
})
},
data
()
{
return
{
tableData
:
[],
//表格数据
time
:
null
,
//时间
excelLoading
:
false
,
//导出loading
allCompaniesArr
:
[],
total
:
null
,
listQuery
:
{
statisticalWay
:
1
,
//统计方式
companyId
:
null
,
//公司
page
:
1
,
limit
:
10
}
}
},
methods
:
{
//统计周期筛选
changeTime
(
val
,
value
)
{
this
.
listQuery
.
page
=
1
if
(
!!
val
)
{
let
value
=
val
.
split
(
' - '
)
this
.
listQuery
.
startDate
=
value
[
0
]
+
' 00:00:00'
this
.
listQuery
.
endDate
=
value
[
1
]
+
' 23:59:59'
this
.
getList
()
}
else
{
this
.
listQuery
.
startDate
=
null
this
.
listQuery
.
endDate
=
null
this
.
getList
()
}
},
//统计方式筛选
changeType
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
},
//公司筛选
changeCompany
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
},
//清空搜索
clearSearch
()
{
this
.
time
=
null
this
.
listQuery
=
{
statisticalWay
:
1
,
//统计方式
companyId
:
null
,
//公司
page
:
1
,
limit
:
10
}
},
//导出
downloadExcel
()
{
this
.
excelLoading
=
true
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
excelExport
(
this
.
listQuery
,
{
responseType
:
'arraybuffer'
}).
then
(
res
=>
{
const
content
=
res
const
blob
=
new
Blob
([
content
],
{
type
:
'application/vnd.ms-excel'
})
const
fileName
=
'报表.xlsx'
if
(
u
.
indexOf
(
'Edge'
)
>
-
1
)
{
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
}
else
{
const
elink
=
document
.
createElement
(
'a'
)
elink
.
download
=
fileName
elink
.
style
.
display
=
'none'
elink
.
href
=
URL
.
createObjectURL
(
blob
)
document
.
body
.
appendChild
(
elink
)
elink
.
click
()
URL
.
revokeObjectURL
(
elink
.
href
)
// 释放URL 对象
document
.
body
.
removeChild
(
elink
)
}
this
.
excelLoading
=
false
})
},
//表格数据
getList
()
{
company_performance
(
this
.
listQuery
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
tableData
=
data
.
data
.
data
this
.
total
=
data
.
data
.
totalCount
}
else
{
this
.
$message
.
error
(
data
.
message
)
}
})
},
//分页
handleSizeChange
(
val
)
{
this
.
listquery
.
limit
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
this
.
listquery
.
page
=
val
this
.
getList
()
}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/views/vehicle/vehicleDepartureLog/index.vue
View file @
5f7489b1
This diff is collapsed.
Click to expand it.
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