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
8e5ce18c
Commit
8e5ce18c
authored
Nov 27, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
租车订单管理 员工业绩统计导出
parent
c029112e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
12 deletions
+66
-12
statistics.js
src/api/statistics.js
+9
-0
staffPerformance.vue
src/views/financial/staffPerformance.vue
+47
-5
index.vue
src/views/order/rentVehicleInfo/index.vue
+10
-7
No files found.
src/api/statistics.js
View file @
8e5ce18c
...
...
@@ -8,3 +8,12 @@ export function getDate(query) {
data
:
query
});
}
export
function
exports
(
query
)
{
return
fetch
({
url
:
'api/admin/staff_statistics/export'
,
method
:
'post'
,
data
:
query
,
responseType
:
'blob'
});
}
src/views/financial/staffPerformance.vue
View file @
8e5ce18c
...
...
@@ -8,10 +8,11 @@
placeholder=
"请选择公司"
@
change=
"changeCompany"
clearable
ref=
"company"
>
<el-option
v-for=
"item in allCompaniesArr"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<el-select
v-model=
"listquery.userPostionId"
clearable
placeholder=
"请选择身份"
@
change=
"changeStaff"
>
<el-select
v-model=
"listquery.userPostionId"
clearable
placeholder=
"请选择身份"
@
change=
"changeStaff"
ref=
"userPostion"
>
<el-option
v-for=
"item in options"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<el-button
type=
"primary"
:loading=
"excelLoading"
@
click=
"downloadExcel"
>
导出报表
</el-button>
...
...
@@ -46,7 +47,12 @@
ref=
"multipleTable"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
type=
"index"
width=
"80"
label=
"序号"
align=
"center"
></el-table-column>
<!--
<el-table-column
type=
"index"
width=
"80"
label=
"序号"
align=
"center"
></
!
-->
-->
<el-table-column
label=
"序号"
align=
"center"
width=
"70"
>
<template
scope=
"scope"
>
<span>
{{
scope
.
$index
+
(
listquery
.
page
-
1
)
*
listquery
.
limit
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"员工姓名"
align=
"center"
></el-table-column>
<el-table-column
prop=
"companyNames"
label=
"所属公司"
align=
"center"
>
<
template
scope=
"scope"
>
...
...
@@ -96,7 +102,7 @@
</template>
<
script
>
import
{
getAll
}
from
'api/base_info/branch_company/'
import
{
getDate
}
from
'api/statistics'
import
{
getDate
,
exports
}
from
'api/statistics'
import
{
getrewardSetting
}
from
'api/purseManage'
export
default
{
created
()
{
...
...
@@ -122,7 +128,6 @@ export default {
userPostionId
:
null
,
//身份
page
:
1
,
limit
:
10
,
isExport
:
false
}
}
},
...
...
@@ -161,12 +166,14 @@ export default {
},
//分公司筛选
changeCompany
(
val
)
{
this
.
listquery
.
companyName
=
this
.
$refs
.
company
.
query
this
.
listquery
.
page
=
1
this
.
getList
()
},
//身份筛选
changeStaff
()
{
this
.
listquery
.
page
=
1
this
.
listquery
.
postionName
=
this
.
$refs
.
userPostion
.
selectedLabel
this
.
getList
()
},
//列表数据
...
...
@@ -215,7 +222,42 @@ export default {
//导出
downloadExcel
()
{
this
.
excelLoading
=
true
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
;
exports
(
this
.
listquery
,{
responseType
:
'arraybuffer'
}).
then
(
res
=>
{
const
content
=
res
const
blob
=
new
Blob
([
content
],
{
type
:
"application/vnd.ms-excel"
})
const
fileName
=
this
.
timestamp
(
new
Date
())
+
'会员订单列表.xlsx'
if
(
u
.
indexOf
(
'Edge'
)
>
-
1
){
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
console
.
log
(
'ie'
);
}
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
})
},
timestamp
(
now
)
{
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
Hours
=
now
.
getHours
();
var
Minutes
=
now
.
getMinutes
();
var
Seconds
=
now
.
getSeconds
();
month
=
month
.
toString
().
length
==
1
?
'0'
+
month
:
month
;
date
=
date
.
toString
().
length
==
1
?
'0'
+
date
:
date
;
Hours
=
Hours
.
toString
().
length
==
1
?
'0'
+
Hours
:
Hours
;
Minutes
=
Minutes
.
toString
().
length
==
1
?
'0'
+
Minutes
:
Minutes
;
Seconds
=
Seconds
.
toString
().
length
==
1
?
'0'
+
Seconds
:
Seconds
;
return
year
+
"-"
+
month
+
"-"
+
date
+
' '
+
Hours
+
':'
+
Minutes
+
":"
+
Seconds
},
}
}
</
script
>
...
...
src/views/order/rentVehicleInfo/index.vue
View file @
8e5ce18c
...
...
@@ -228,16 +228,16 @@
v-if=
"scope.row.status == 2"
class=
"el-button el-button--text el-button--small"
@
click=
"breakRecord(scope.row)"
>
违约金
记录
</el-button>
>
取消
记录
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 违约金记录 -->
<el-dialog
title=
"
违约金
记录"
:visible
.
sync=
"breakRecordPop"
>
<p>
取消时间
:
{{breakRecordData.time}}
</p>
<p>
违约金额
:
{{breakRecordData.violateAmount}}
</p>
<p>
违约
内容:
{{breakRecordData.violateDesc}}
</p>
<el-dialog
title=
"
取消
记录"
:visible
.
sync=
"breakRecordPop"
>
<p>
取消时间
:
{{breakRecordData.time}}
</p>
<p>
违约金额
:
{{breakRecordData.violateAmount}}
</p>
<p>
违约
原因:
{{breakRecordData.violateDesc}}
</p>
</el-dialog>
<!--违章查询弹框-->
...
...
@@ -1001,11 +1001,14 @@ export default {
if
(
!!
data
.
data
.
orderRentVehicleDetail
.
costDetailExtend
)
{
let
info
=
JSON
.
parse
(
data
.
data
.
orderRentVehicleDetail
.
costDetailExtend
)
this
.
breakRecordData
.
time
=
data
.
data
.
updTime
,
this
.
breakRecordData
.
violateAmount
=
info
.
violateAmount
this
.
breakRecordData
.
violateAmount
=
info
.
violateAmount
+
'元'
this
.
breakRecordData
.
violateDesc
=
info
.
violateDesc
this
.
breakRecordPop
=
true
;
}
else
{
this
.
$message
.
error
(
'暂无违约金记录'
)
this
.
breakRecordData
.
time
=
data
.
data
.
updTime
,
this
.
breakRecordData
.
violateAmount
=
'0元'
this
.
breakRecordData
.
violateDesc
=
'无'
this
.
breakRecordPop
=
true
;
}
}
})
...
...
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