This commit is contained in:
liushuai
2020-02-18 08:49:55 +08:00
parent ff571c4e45
commit 97d67c9876
4 changed files with 96 additions and 46 deletions

View File

@@ -42,22 +42,37 @@
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="录入准结(分)" width="100px">
<el-table-column align="center" label="录入准结(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.修补准结工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="加工工时(分)" width="100px">
<el-table-column align="center" label="加工工时(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.设备工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="合格件数" width="70px">
<el-table-column align="center" label="扫码工时(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.扫码工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="辅助工时(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.辅助工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="工时比值" width="100px">
<template slot-scope="scope">
{{ scope.row.工时比值 }}
</template>
</el-table-column>
<el-table-column align="center" label="合格件数" width="80px">
<template slot-scope="scope">
{{ scope.row.合格数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="废品件数" width="70px">
<el-table-column align="center" label="废品件数" width="80px">
<template slot-scope="scope">
{{ scope.row.不合格数量 }}
</template>
@@ -72,17 +87,17 @@
{{ scope.row.操作时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划准结(分)" width="100px">
<el-table-column align="center" label="计划准结(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.准结定额工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划定额(分)" width="100px">
<el-table-column align="center" label="计划定额(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.单件定额工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划工时(分)" width="100px">
<el-table-column align="center" label="计划工时(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.计划工时 }}
</template>
@@ -138,8 +153,8 @@ export default {
return
}
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['日期', '姓名', '图号', '跟单号', '工序', '工序名', '录入准结(分)', '实际工时(分)', '合格件数', '废品件数', '备注', '计划准结(分)', '计划定额(分)', '计划工时(分)', '项目名称', '机床图号', '组号', '设计', '材料']
const filterVal = ['操作时间', '姓名', '零件图号_零件工艺计划', '跟单号', '工序顺序', '工艺名称', '修补准结工时', '设备工时', '合格数量', '不合格数量', '备注', '准结定额工时', '单件定额工时', '计划工时', '项目名称', '机床图号', '组号', '设计者', '材料']
const tHeader = ['日期', '姓名', '图号', '跟单号', '工序', '工序名', '录入准结(分)', '实际工时(分)', '扫码工时(分)', '辅助工时(分)', '工时比值', '合格件数', '废品件数', '备注', '计划准结(分)', '计划定额(分)', '计划工时(分)', '项目名称', '机床图号', '组号', '设计', '材料']
const filterVal = ['操作时间', '姓名', '零件图号_零件工艺计划', '跟单号', '工序顺序', '工艺名称', '修补准结工时', '设备工时', '扫码工时', '辅助工时', '工时比值', '合格数量', '不合格数量', '备注', '准结定额工时', '单件定额工时', '计划工时', '项目名称', '机床图号', '组号', '设计者', '材料']
const list = this.tableData
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({
@@ -155,6 +170,9 @@ export default {
if (this.startTime[0] && this.startTime[1]) {
this.loading = true
searchTable(this.startTime[0], this.startTime[1]).then(response => {
response.data.map(v => {
this.$set(v, '工时比值', v.计划工时 === 0 ? 0 : Math.round(v.扫码工时 / v.计划工时 * 100) / 100.00)
})
this.tableData = response.data
this.loading = false
})