This commit is contained in:
liushuai
2020-02-12 16:46:01 +08:00
parent c6852ed7c1
commit dd28e09a2d
7 changed files with 163 additions and 109 deletions

View File

@@ -16,13 +16,13 @@
<el-button size="small" type="primary" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
</el-card>
<el-card>
<el-table :data="tableData" size="mini" style="max-height: 720px" height="720px" border>
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border>
<el-table-column align="center" label="姓名" width="70px">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="图号" width="170px">
<el-table-column align="center" label="图号" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号_短 }}
</template>
@@ -32,7 +32,7 @@
{{ scope.row.跟单号 }}
</template>
</el-table-column>
<el-table-column align="center" label="序" width="50px">
<el-table-column align="center" label="序" width="50px">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
</template>
@@ -42,22 +42,22 @@
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="录入准结工时" width="100px">
<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">
<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="70px">
<el-table-column align="center" label="合格件数" width="70px">
<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="70px">
<template slot-scope="scope">
{{ scope.row.不合格数 }}
</template>
@@ -69,15 +69,15 @@
</el-table-column>
<el-table-column align="center" label="加工日期" width="100px">
<template slot-scope="scope">
{{ scope.row.操作时间.substr(0,10) }}
{{ scope.row.操作时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划准结工时" width="100px">
<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="100px">
<el-table-column align="center" label="计划定额(分)" width="100px">
<template slot-scope="scope">
{{ scope.row.单件定额工时 }}
</template>
@@ -87,7 +87,7 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床号" width="100px">
<el-table-column align="center" label="机床号" width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
@@ -97,7 +97,7 @@
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="设计" width="70px">
<el-table-column align="center" label="设计" width="70px">
<template slot-scope="scope">
{{ scope.row.设计者 }}
</template>
@@ -117,7 +117,8 @@ export default {
data() {
return {
tableData: [],
startTime: ''
startTime: '',
loading: false
}
},
methods: {
@@ -132,7 +133,7 @@ export default {
return
}
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['日期', '姓名', '图号', '跟单号', '序', '工序名', '录入准结工时', '实际工时', '合格数', '不合格数', '备注', '计划准结工时', '计划定额工时', '项目名称', '机床图号', '组号', '设计', '材料']
const tHeader = ['日期', '姓名', '图号', '跟单号', '序', '工序名', '录入准结(分)', '实际工时(分)', '合格数', '废品件数', '备注', '计划准结(分)', '计划定额(分)', '项目名称', '机床图号', '组号', '设计', '材料']
const filterVal = ['操作时间', '姓名', '零件图号_短', '跟单号', '工序顺序', '工艺名称', '修补准结工时', '设备工时', '合格数', '不合格数', '备注', '准结定额工时', '单件定额工时', '项目名称', '机床图号', '组号', '设计者', '材料']
const list = this.tableData
const data = this.formatJson(filterVal, list)
@@ -147,8 +148,10 @@ export default {
},
searchTable() {
if (this.startTime[0] && this.startTime[1]) {
this.loading = true
searchTable(this.startTime[0], this.startTime[1]).then(response => {
this.tableData = response.data
this.loading = false
})
} else {
this.$message.warning('请选择时间段')