Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
薪
薪瑞通-前端
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
许珑标
薪瑞通-前端
Commits
22ed45b6
Commit
22ed45b6
authored
Mar 26, 2025
by
谢子梦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stage:统计时间处理
parent
89da18f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
10 deletions
+24
-10
src/views/statistics/index.vue
src/views/statistics/index.vue
+24
-10
No files found.
src/views/statistics/index.vue
View file @
22ed45b6
...
...
@@ -29,9 +29,9 @@
</el-row>
</el-form>
<!-- 列表内容部分 -->
<el-table
:data=
"statisticsMothList"
style=
"width: 100%"
:
header-cell-style=
"
{ textAlign: 'center' }
"
:
cell-style="{ textAlign: 'center' }" height="calc(100vh - 300px)" show-summary
:summary-method="getSummariesMonth">
<el-table
:data=
"statisticsMothList"
style=
"width: 100%"
:
key=
"statisticsMothKey
"
:
header-cell-style=
"
{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"
height="calc(100vh - 300px)" show-summary
:summary-method="getSummariesMonth">
<el-table-column
label=
"序号"
type=
"index"
:index=
"indexMonthFN"
width=
"50"
>
</el-table-column>
<el-table-column
prop=
"companyName"
label=
"单位名称"
>
...
...
@@ -39,6 +39,9 @@
<el-table-column
prop=
"actualPayable"
label=
"实发工资"
>
</el-table-column>
<el-table-column
prop=
"timeVal"
label=
"时间"
>
<template
slot-scope=
"
{row}">
{{
statisticsMothTime
(
row
.
timeVal
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"公司承担部分"
>
<el-table-column
prop=
"gsbxCompanyMoney"
label=
"工商保险"
>
...
...
@@ -90,9 +93,9 @@
</el-row>
</el-form>
<!-- 列表内容部分 -->
<el-table
:data=
"statisticsYearList"
style=
"width: 100%"
:
header-cell-style=
"
{ textAlign: 'center' }
"
:
cell-style="{ textAlign: 'center' }" height="calc(100vh - 300px)" show-summary
:summary-method="getSummariesYear">
<el-table
:data=
"statisticsYearList"
style=
"width: 100%"
:
key=
"statisticsYearKey
"
:
header-cell-style=
"{ textAlign: 'center' }"
:cell-style=
"{ textAlign: 'center' }"
height=
"calc(100vh - 300px)"
show-summary
:summary-method=
"getSummariesYear"
>
<el-table-column
label=
"序号"
type=
"index"
:index=
"indexYearFN"
width=
"50"
>
</el-table-column>
<el-table-column
prop=
"companyName"
label=
"单位名称"
>
...
...
@@ -100,6 +103,9 @@
<el-table-column
prop=
"actualPayable"
label=
"实发工资"
>
</el-table-column>
<el-table-column
prop=
"timeVal"
label=
"时间"
>
<
template
slot-scope=
"{row}"
>
{{
statisticsYearTime
(
row
.
timeVal
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"公司承担部分"
>
<el-table-column
prop=
"gsbxCompanyMoney"
label=
"工商保险"
>
...
...
@@ -143,6 +149,7 @@ export default {
},
totalMonth
:
0
,
statisticsMothList
:
[],
statisticsMothKey
:
1
,
/** 按年统计参数 */
paramsYear
:
{
pageNum
:
1
,
...
...
@@ -153,6 +160,7 @@ export default {
},
totalYear
:
0
,
statisticsYearList
:
[],
statisticsYearKey
:
1
,
activeName
:
'
first
'
}
},
...
...
@@ -161,6 +169,14 @@ export default {
this
.
getStatisticsListMonth
()
},
methods
:
{
/** 年份时间处理 */
statisticsYearTime
(
val
)
{
return
val
.
substring
(
0
,
4
)
},
/** 月份时间处理 */
statisticsMothTime
(
val
)
{
return
val
.
substring
(
0
,
7
)
},
/** 按年统计-总计方法 */
getSummariesYear
(
param
)
{
const
{
columns
,
data
}
=
param
;
...
...
@@ -204,7 +220,6 @@ export default {
}
})
this
.
$forceUpdate
()
return
arrAY
;
},
/** 按月统计-总计方法 */
...
...
@@ -250,7 +265,6 @@ export default {
}
})
this
.
$forceUpdate
()
return
arrAY
;
},
/** 按年统计-重置方法 */
...
...
@@ -318,7 +332,7 @@ export default {
if
(
res
.
code
==
200
)
{
this
.
statisticsMothList
=
res
.
rows
this
.
totalMonth
=
res
.
total
this
.
$forceUpdate
()
this
.
statisticsMothKey
+=
12
}
}).
finally
(()
=>
{
this
.
$modal
.
closeLoading
()
...
...
@@ -331,7 +345,7 @@ export default {
if
(
res
.
code
==
200
)
{
this
.
statisticsYearList
=
res
.
rows
this
.
totalYear
=
res
.
total
this
.
$forceUpdate
()
this
.
statisticsYearKey
+=
12
}
}).
finally
(()
=>
{
this
.
$modal
.
closeLoading
()
...
...
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