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

@@ -51,46 +51,61 @@
{{ scope.row.工序名 }}
</template>
</el-table-column>
<el-table-column label="计划件数" align="center" width="70">
<el-table-column label="计划件数" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.计划数量 }}
</template>
</el-table-column>
<el-table-column label="计划准结(分)" align="center" width="120">
<el-table-column label="计划准结(分)" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.计划准备工时 }}
</template>
</el-table-column>
<el-table-column label="计划定额(分)" align="center" width="120">
<el-table-column label="计划定额(分)" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.单件计划工时 }}
</template>
</el-table-column>
<el-table-column label="计划工时(分)" align="center" prop="计划工时" width="100">
<el-table-column label="计划工时(分)" align="center" prop="计划工时" width="110">
<template slot-scope="scope">
{{ scope.row.计划工时 }}
</template>
</el-table-column>
<el-table-column label="计划加工日期" align="center" width="100">
<el-table-column label="计划加工日期" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.计划加工日期 }}
</template>
</el-table-column>
<el-table-column label="加工件数" align="center" width="70">
<el-table-column label="加工件数" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.加工数量 }}
</template>
</el-table-column>
<el-table-column label="录入准结(分)" align="center" width="120">
<el-table-column label="录入准结(分)" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.加工准备工时 }}
</template>
</el-table-column>
<el-table-column label="加工工时(分)" align="center" prop="加工工时" width="100">
<el-table-column label="加工工时(分)" align="center" prop="加工工时" width="110">
<template slot-scope="scope">
{{ scope.row.加工工时 }}
</template>
</el-table-column>
<el-table-column label="扫码工时(分)" align="center" prop="扫码工时" width="110">
<template slot-scope="scope">
{{ scope.row.扫码工时 }}
</template>
</el-table-column>
<el-table-column label="辅助工时(分)" align="center" prop="辅助工时" width="110">
<template slot-scope="scope">
{{ scope.row.辅助工时 }}
</template>
</el-table-column>
<el-table-column label="工时比值" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.工时比值 }}
</template>
</el-table-column>
<el-table-column label="加工日期" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.加工日期 }}
@@ -162,11 +177,14 @@ export default {
计划数量: response.data[i].批次数量,
计划准备工时: response.data[i].准结定额工时,
单件计划工时: response.data[i].单件定额工时,
计划工时: Number(response.data[i].批次数量) * (Number(response.data[i].单件定额工时) + Number(response.data[i].准结定额工时)),
计划工时: response.data[i].计划工时,
计划加工日期: response.data[i].计划日期.split(' ')[0],
加工数量: response.data[i].完成数量,
加工准备工时: response.data[i].修补准结工时,
加工工时: response.data[i].设备工时,
扫码工时: response.data[i].扫码工时,
辅助工时: response.data[i].辅助工时,
工时比值: Number(response.data[i].计划工时) === 0 ? 0 : Math.round(response.data[i].扫码工时 / Number(response.data[i].计划工时) * 100) / 100.00,
加工日期: response.data[i].操作时间,
图号及规格: response.data[i].零件图号_零件工艺计划,
制品名称: response.data[i].零件名称
@@ -190,8 +208,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({