This commit is contained in:
liushuai
2019-06-24 16:40:50 +08:00
parent ff9817fa13
commit b0b3f80bb1
3 changed files with 107 additions and 12 deletions

View File

@@ -151,10 +151,15 @@ export default {
searchTable1() {
this.tableData1 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
searchTable1(this.machineNumberValue, this.check2).then(response => {
this.tableData1 = response.data
console.log(response.data, 1111)
})
if (this.check2 === 0) {
this.tableData1 = []
this.tableData2 = []
} else {
searchTable1(this.machineNumberValue, this.check2).then(response => {
this.tableData1 = response.data
console.log(response.data, 1111)
})
}
},
searchTable2() {
this.tableData2 = []

View File

@@ -52,11 +52,6 @@
</el-card>
<el-card>
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
<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.机床图号 }}
@@ -112,9 +107,9 @@
{{ scope.row.不合格处理文本 }}
</template>
</el-table-column>
<el-table-column label="操作时间" align="center">
<el-table-column label="质检时间" align="center">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
{{ scope.row.操作时间 ? scope.row.操作时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
@@ -122,6 +117,81 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="形位" align="center" width="100">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" highlight-current-row size="mini">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="类别">
<template slot-scope="scope">
{{ scope.row.类别 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="数值">
<template slot-scope="scope">
{{ scope.row.数值 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="零件数量">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" plain size="mini" icon="el-icon-search" @click="searchTableDetail(1, scope.row.质检流水号)">形位</el-button>
</el-popover>
</template>
</el-table-column>
<el-table-column label="尺寸" align="center" width="100">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" highlight-current-row size="mini">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="类别">
<template slot-scope="scope">
{{ scope.row.类别 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="数值">
<template slot-scope="scope">
{{ scope.row.数值 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="零件数量">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" plain size="mini" icon="el-icon-search" @click="searchTableDetail(2, scope.row.质检流水号)">尺寸</el-button>
</el-popover>
</template>
</el-table-column>
<el-table-column label="外观" align="center" width="100">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" highlight-current-row size="mini">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="类别">
<template slot-scope="scope">
{{ scope.row.类别 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="数值">
<template slot-scope="scope">
{{ scope.row.数值 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="零件数量">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" plain size="mini" icon="el-icon-search" @click="searchTableDetail(3, scope.row.质检流水号)">外观</el-button>
</el-popover>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="100">
<template slot-scope="scope">
<el-button
@@ -153,7 +223,7 @@
</template>
<script>
import { initProject, searchgroup, selecttable, QualityType, searchPic } from '@/api/Assembly/QualityInspectionInformationInquiry'
import { initProject, searchgroup, selecttable, QualityType, searchPic, searchTableDetail } from '@/api/Assembly/QualityInspectionInformationInquiry'
import { readFile } from '@/utils/request'
// import { mapGetters } from 'vuex'
export default {
@@ -168,6 +238,7 @@ export default {
number: '',
groupNumberValue: '',
groupNumber: [],
gridData: [],
QualityTypeNumber: [],
QualityTypeValue: '',
tableData1: [],
@@ -220,6 +291,12 @@ export default {
}
})
},
searchTableDetail(type, num) {
searchTableDetail(type, num).then(response => {
this.gridData = response.data
})
console.log(type)
},
selecttable() {
this.tableData1 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
@@ -232,6 +309,7 @@ export default {
this.tableData1 = response.data.rows
this.loading = false
this.total = response.data.total
console.log(this.tableData1)
})
},
viewPicture(row) {