Commit 22ed45b6 authored by 谢子梦's avatar 谢子梦

stage:统计时间处理

parent 89da18f6
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment