This commit is contained in:
liushuai
2019-07-08 12:43:11 +08:00
parent 4559eabbaa
commit 013de5e5f1
4 changed files with 176 additions and 11 deletions

View File

@@ -39,34 +39,49 @@
</div>
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries" show-summary border style="width: 100%;min-height: 400px" height="400px" size="mini">
<el-table-column label="序号" align="center" width="80" type="index"/>
<el-table-column label="零件名称" align="center" min-width="120">
<el-table-column label="零件名称" align="center">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="120">
<el-table-column label="零件图号" align="center">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="100">
<el-table-column label="零件数量" align="center">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="检验数量" align="center" width="100">
<el-table-column label="质检人员" align="center">
<template slot-scope="scope">
{{ scope.row.检验数量 || 0 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="不合格数量" align="center" width="100">
<el-table-column label="检验数量" align="center">
<template slot-scope="scope">
{{ scope.row.数量 || 0 }}
</template>
</el-table-column>
<el-table-column label="不合格数量" align="center">
<template slot-scope="scope">
{{ scope.row.不合格数量 || 0 }}
</template>
</el-table-column>
<el-table-column label="检验时间" align="center" min-width="100">
<el-table-column label="不合格原因" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.检验时间 || '—' }}
{{ scope.row.不合格原因文本 }}
</template>
</el-table-column>
<el-table-column label="处理结果" align="center">
<template slot-scope="scope">
{{ scope.row.不合格处理文本 }}
</template>
</el-table-column>
<el-table-column label="检验时间" align="center">
<template slot-scope="scope">
{{ scope.row.操作时间 || '—' }}
</template>
</el-table-column>
<el-table-column label="形位" align="center" width="100">
@@ -195,7 +210,7 @@ export default {
sums[index] = 'N/A'
}
} else if (index === 4) {
const values = data.map(item => Number(item['检验数量']) || 0)
const values = data.map(item => Number(item['数量']) || 0)
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)