This commit is contained in:
liushuai
2020-03-19 17:53:05 +08:00
parent 97bb2dcd3d
commit 3c9e0cb1b5
11 changed files with 474 additions and 374 deletions

View File

@@ -31,7 +31,7 @@
</el-table-column>
<el-table-column label="录入工时(分)" align="center">
<template slot-scope="scope">
{{ scope.row.实际工时 }}
{{ scope.row.录入工时 }}
</template>
</el-table-column>
<el-table-column label="扫码工时(分)" align="center">
@@ -172,7 +172,7 @@ export default {
}
searchtable(this.workerName_ckeck, this.workerName, check1, this.dateRange[0], this.dateRange[1]).then(response => {
response.data.map(v => {
this.$set(v, '工时比值', v.计划工时 === 0 ? 0 : Math.round(v.扫码工时 / v.计划工时 * 100) / 100.00)
this.$set(v, '工时比值', v.计划工时 === 0 ? 0 : Math.round(v.录入工时 / v.计划工时 * 100) / 100.00)
})
this.tableData = response.data
this.loading = false
@@ -180,22 +180,22 @@ export default {
},
// 导出
exportTable() {
import('./Export2Excel').then(excel => {
const filterVal1 = ['姓名', '计划工时', '实际工时', '扫码工时', '工时比值']
const data1 = this.tableData.map(v => filterVal1.map(j => v[j]))
const dataGroup = []
dataGroup.push(data1)
const headerGroup = [['操作员', '计划工时', '录入工时', '扫码工时', '工时比值']]
const sheetGroup = ['工时统计表']
excel.export_json_to_excel({
headerGroup: headerGroup,
dataGroup: dataGroup,
sheetGroup: sheetGroup,
filename: '工时统计表',
autoWidth: true,
bookType: 'xlsx'
})
})
let check, check1
this.workerName ? check = 1 : check = 0
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
var param = []
param[0] = ['操作者_check', check]
param[1] = ['姓名', this.workerName]
param[6] = ['时间_check', check1]
if (check1 === 0) {
param[7] = ['开始时间', '']
param[8] = ['结束时间', '']
} else {
param[7] = ['开始时间', this.dateRange[0]]
param[8] = ['结束时间', this.dateRange[1]]
}
var Data = this.CreateData('2001', '报表_人员工时查询', param)
this.exportExcel_NPOI(Data)
},
searchTable2() {
this.loading2 = true