fixed bug

This commit is contained in:
chenjianan
2019-06-25 10:11:37 +08:00
4 changed files with 111 additions and 11 deletions

View File

@@ -59,3 +59,15 @@ export function searchPic(num) {
}
})
}
// 查询外协到货单明细
export function searchTableDetail(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '质检管理_质检数据_查询数据',
param: `检测类型=${params[0]}&质检流水号=${params[1]}`
}
})
}

View File

@@ -201,9 +201,15 @@ export default {
searchTable1() {
this.tableData1 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
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) {

View File

@@ -335,10 +335,14 @@ export default {
this.sudokus = []
this.show = false
this.active = ''
this.active1 = ''
this.confirmationTime = '请查询'
this.Cutter = '请查询'
this.isMaterials = '请查询'
this.materialsType = '请查询'
this.isOut = '请查询'
this.outName = '请查询'
this.outTime = '请查询'
for (let i = 0; i < this.activities.length; i++) {
this.activities[i].type = ''
}