Files
JY1.0/src/views/Outsourcing/OutsourcingQCSearch/index.vue
liushuai d30a808bc9 更新
2020-06-01 17:47:46 +08:00

795 lines
33 KiB
Vue

<template>
<div class="app-container">
<el-card>
<el-row>
<el-select v-model="machineNumberValue" filterable placeholder="机床图号" size="small" style="margin-left: 10px;width: 180px;margin-top: 5px" clearable @change="machineChange()">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" style="margin-left: 10px;width:100px" clearable>
<el-option
v-for="item in groupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="SpareParts" filterable placeholder="零件图号或零件名称" style="width: 150px;margin-left: 10px" size="small" clearable/>
<!--<span class="demonstration">时间区间:</span>-->
<el-date-picker
v-model="startTime"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px;margin-left: 10px"
type="date"
placeholder="选择开始日期"/>
<span class="demonstration">~</span>
<el-date-picker
v-model="endTime"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px"
type="date"
placeholder="选择结束日期"/>
<!--<span>质检情况:</span>-->
<el-select v-model="qualityInspectionValue" filterable placeholder="质检情况" size="small" style="width: 100px;margin-left: 10px" clearable>
<el-option
v-for="item in qualityInspection"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="primary" size="small" icon="el-icon-search" style="margin-left: 15px;margin-top: 5px" plain @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
<el-button v-positive="'loading'" type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button>
</el-tooltip>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData1" element-loading-text="质检数据较多,请耐心等候..." border size="mini" highlight-current-row style="width: 100%" stripe height="600px">
<el-table-column label="机床图号" align="center" width="90px" fixed>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" min-width="180px" show-overflow-tooltip fixed>
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="60px" fixed>
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="130px" show-overflow-tooltip fixed>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" fixed>
<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="120px" show-overflow-tooltip>
<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">-->
<!-- <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="120px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input-number v-model="scope.row.数量" :min="0" :max="scope.row.零件数量" :step="1" style="width: 90%" size="mini"/>
</template>
<template v-else>
{{ scope.row.数量 }}
</template>
</template>
</el-table-column>
<el-table-column label="检测结果" align="center" width="120px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-select v-model="scope.row.是否合格" placeholder="请选择" filterable size="mini" style="width: 100%">
<el-option
v-for="item in qualityInspection"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template>
<template v-else>
{{ scope.row.是否合格 ===1 ? '合格' : '不合格' }}
</template>
</template>
</el-table-column>
<el-table-column label="不合格数" align="center" width="120px">
<template slot-scope="scope">
<template v-if="scope.row.edit && scope.row.是否合格 === 2">
<el-input-number v-model="scope.row.不合格数量" :min="0" :max="scope.row.数量" :step="1" style="width: 90%" size="mini"/>
</template>
<template v-else-if="scope.row.是否合格 === 1">
{{ scope.row.不合格数量 = '' }}
</template>
<template v-else>
{{ scope.row.不合格数量 }}
</template>
</template>
</el-table-column>
<el-table-column label="不合格原因" align="center" width="140px">
<template slot-scope="scope">
<template v-if="scope.row.edit && scope.row.是否合格 === 2">
<el-select v-model="scope.row.不合格原因" placeholder="请选择" filterable size="mini" style="width: 100%">
<el-option
v-for="item in reasonsForNonconformity"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template>
<template v-else-if="scope.row.是否合格 === 1">
{{ scope.row.不合格原因 = null }}
</template>
<template v-else>
{{ scope.row.不合格原因文本 }}
</template>
</template>
</el-table-column>
<el-table-column label="处理结果" align="center" width="140px" show-overflow-tooltip>
<template slot-scope="scope">
<template v-if="scope.row.edit && scope.row.是否合格 === 2">
<el-select v-model="scope.row.处理结果" placeholder="请选择" filterable size="mini" style="width: 100%">
<el-option
v-for="item in disqualificationTreatment"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template>
<template v-else-if="scope.row.是否合格 === 1">
{{ scope.row.处理结果 = null }}
</template>
<template v-else>
{{ scope.row.不合格处理文本 }}
</template>
</template>
</el-table-column>
<el-table-column label="操作工" align="center" width="90px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.操作工姓名 }}
</template>
</el-table-column>
<el-table-column label="质检时间" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="140px" show-overflow-tooltip>
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.备注" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.备注 }}
</template>
</template>
</el-table-column>
<el-table-column label="编辑人" align="center" width="90px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.编辑人 }}
</template>
</el-table-column>
<el-table-column label="编辑时间" align="center" width="90px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.编辑时间 ? scope.row.编辑时间.split(' ')[0] : scope.row.编辑时间 }}
</template>
</el-table-column>
<el-table-column label="形位" align="center" width="70">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" class="subTableHeader" 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="text" 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="70">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" class="subTableHeader" 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="text" 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="70">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" class="subTableHeader" 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="text" plain size="mini" icon="el-icon-search" @click="searchTableDetail(3, scope.row.质检流水号)">外观</el-button>
</el-popover>
</template>
</el-table-column>
<el-table-column label="查看图片" align="center" width="100px">
<template slot-scope="scope">
<el-button
v-if="!scope.row.edit"
size="mini"
type="text"
plain
icon="el-icon-search"
@click="viewPicture(scope.row)">查看图片</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="图片" center style="" width="800px">
<viewer>
<img v-for="url in urls" :key="url" :src="url" lazy style="width: 700px;height: 700px">
</viewer>
</el-dialog>
</div>
</template>
<script>
import { initProject, searchgroup, selecttable, QualityType, searchPic, searchTableDetail, searchData, searchData1, processingStatus, initPerson, Prohibit, initDisqualificationTreatment, initReasonsForNonconformity, searchparts, searchprocedure, searchoperators, submitTable, confirmEdit, searchproceductnum, deleterow } from '@/api/Outsourcing/OutsourcingQCSearch'
import { mapGetters } from 'vuex'
export default {
data() {
return {
machineNumberValue: '',
machineNumber: [],
startTime: '',
endTime: '',
form2: {
机床图号: '',
组号: '',
零件图号: '',
工序: '',
质检类型: 10,
质检情况: 1,
检测数: '',
不合格数量: '',
不合格原因: '',
不合格处理: '',
备注: '',
操作工: ''
},
rules2: {
操作工: [{ required: true, message: '请选择操作工' }],
工序: [{ required: true, message: '请选择工序' }],
质检情况: [{ required: true, message: '请选择质检情况' }]
},
urls: [],
URL: '',
number: '',
reasonsForNonconformity: [],
disqualificationTreatment: [],
operators: [],
groupNumberValue: '',
groupNumber: [],
groupNumber1: [],
partNum: [],
procedureNum: [],
gridData: [],
QualityTypeNumber: [],
QualityTypeValue: '',
qualityInspectionValue: '',
qualityInspection: [
{
value: 1,
label: '合格'
}, {
value: 2,
label: '不合格'
}
],
tableData1: [],
tableData10: [],
tableData20: [],
tableData5: [],
SpareParts: '',
SparePartsNumber: '',
SparePartsName: '',
personNum: '',
person: [],
dialogFormVisible: false,
dialogFormVisible4: false,
dialogFormVisible10: false,
AddTableData_disable: false,
loading: false,
total: 0, // 总条数
pageSize: 10, // 每页显示条数
pageCurrent: 1, // 后台获取页
dialogmethod: false, // false新增 true 编辑
proceductnummax: 0
// total1: 0, // 总条数
// pageSize1: 10, // 每页显示条数
// pageCurrent1: 1, // 后台获取页
// total2: 0, // 总条数
// pageSize2: 10, // 每页显示条数
// pageCurrent2: 1 // 后台获取页
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
},
mounted() {
this.initProject()
this.QualityType()
this.fetchData()
this.fetchData1()
},
methods: {
// 表内编辑取消
cancel(row) {
row.edit = !row.edit
console.log(row, 8888)
row.备注 = row.备注_原
row.不合格数量 = row.不合格数量_原
row.是否合格 = row.是否合格_原
row.数量 = row.数量_原
row.不合格原因文本 = row.不合格原因文本_原
row.不合格处理文本 = row.不合格处理文本_原
},
// 表内编辑确定
confirmEdit(row) {
console.log(this.$store.state.user.id, 787878)
confirmEdit(row.质检流水号, row.质检类型代码, row.零部件流水号, row.是否合格, row.数量, row.不合格数量, row.不合格原因, row.处理结果, row.备注, this.$store.state.user.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.selecttable()
} else {
this.$message.error('编辑失败')
}
})
row.edit = false
},
// 删除质检
deleterow(row) {
// this.plan = row.计划流水号
console.log(row, 4545)
this.$confirm('是否删除该质检记录?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleterow(row.质检流水号, row.质检类型代码, row.零部件流水号, row.数量).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.selecttable()
} else {
this.$message.error('编辑失败')
}
})
})
},
initProject() {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
},
QualityType() {
QualityType().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.QualityTypeNumber.push({
label: response.data[i].质检类型,
value: response.data[i].质检类型代码
})
}
})
initPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
initDisqualificationTreatment().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.disqualificationTreatment.push({
label: response.data[i].不合格处理文本,
value: response.data[i].不合格处理
})
}
})
initReasonsForNonconformity().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.reasonsForNonconformity.push({
label: response.data[i].不合格原因文本,
value: response.data[i].不合格原因
})
}
})
},
approvalPass(row) {
this.$confirm('是否禁用?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
Prohibit(row.质检流水号, row.质检类型代码).then(res => {
if (res.data[0].result === '1') {
this.$message.success('操作成功')
this.selecttable()
} else {
this.$message.error('操作失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
// 删除
handleEdit(row) {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
console.log(row, 8989)
this.partNum = []
this.groupNumber = []
this.procedureNum = []
this.operators = []
this.AddTableData_disable = false
this.dialogmethod = true // 编辑置为true
this.dialogFormVisible10 = true
},
// 新增
AddTableData() {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.partNum = []
this.groupNumber = []
this.procedureNum = []
this.operators = []
this.AddTableData_disable = false
this.dialogmethod = false // 新增置为false
this.dialogFormVisible10 = true
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
exportExcel() {
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
var param = []
param[0] = ['机床流水号_check', this.check1]
param[1] = ['机床流水号', this.machineNumberValue]
param[2] = ['组件流水号_check', this.check2]
param[3] = ['组件流水号', this.groupNumberValue]
param[4] = ['零件名称_check', this.check3]
param[5] = ['零件名称', this.SpareParts]
param[6] = ['质检类型代码_check', this.check4]
param[7] = ['质检类型代码', this.QualityTypeValue]
param[8] = ['开始时间_check', this.check5]
param[9] = ['开始时间', this.startTime]
param[10] = ['结束时间_check', this.check6]
param[11] = ['结束时间', this.endTime]
param[12] = ['质检情况_check', this.check7]
param[13] = ['质检情况', this.qualityInspectionValue]
param[14] = ['人员编号_check', this.check8]
param[15] = ['人员编号', this.personNum]
var Data = this.CreateData('2001', '报表_质检管理_工序外协件_查询数据', param)
this.exportExcel_NPOI(Data)
},
// exportExcel1() {
// if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
// if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
// if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
// if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
// if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
// if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
// if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
// if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
// selecttable22(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.check8, this.personNum).then(response => {
// import('@/vendor/Export2Excel').then(excel => {
// const tHeader = ['是否禁用', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工序名称', '质检类型', '检验数量', '不合格数量', '不合格原因', '处理结果', '质检时间', '备注']
// const filterVal = ['禁用情况', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工艺名称', '质检类型', '数量', '不合格数量', '不合格原因文本', '不合格处理文本', '操作时间', '备注']
// const list = response.data
// const data = this.formatJson(filterVal, list)
// excel.export_json_to_excel({
// header: tHeader,
// data,
// filename: '质检情况表',
// autoWidth: true,
// bookType: 'xlsx'
// })
// })
// })
// },
fetchData() {
searchData().then(response => {
this.tableData10 = response.data
this.total1 = response.data.total
})
},
fetchData1() {
searchData1().then(response => {
console.log(response)
this.tableData20 = response.data
this.total2 = response.data.total
})
},
machineChange() {
this.groupNumberValue = ''
this.groupNumber = []
searchgroup(this.machineNumberValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.groupNumber.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
},
machineChange1() {
this.form2.组号 = ''
this.groupNumber1 = []
searchgroup(this.form2.机床图号).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.groupNumber1.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
},
groupChange() {
this.form2.零件图号 = ''
this.partNum = []
searchparts(this.form2.组号).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.partNum.push({
label: response.data[i].零件图号,
value: response.data[i].工艺计划流水号
})
}
})
},
partChange() {
this.form2.工序 = ''
this.procedureNum = []
searchproceductnum(this.form2.零件图号).then(response => {
this.proceductnummax = response.data[0].批次数量
})
searchprocedure(this.form2.零件图号).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.procedureNum.push({
label: response.data[i].工艺名称,
value: response.data[i].工序流水号
})
}
})
},
procedureChange() {
searchoperators(this.form2.工序).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.operators.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
submitTable() {
this.$refs['form2'].validate((valid) => {
if (valid) {
this.AddTableData_disable = true
submitTable(this.form2.工序, this.form2.质检类型, this.form2.检测数, this.form2.质检情况, this.id, this.form2.不合格数量, this.form2.不合格原因, this.form2.不合格处理, this.form2.备注, this.form2.操作工, this.$store.state.user.id).then(response => {
if (response.data[0].result === '1') {
this.dialogFormVisible10 = false
this.$message.success('新增成功')
this.selecttable()
} else {
this.$message.error('新增失败')
}
})
} else {
return false
}
})
},
searchTableDetail(type, num) {
searchTableDetail(type, num).then(response => {
this.gridData = response.data
})
console.log(type)
},
selecttable() {
this.loading = true
this.tableData1 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.check8, this.personNum, this.pageCurrent, this.pageSize).then(response => {
this.tableData1 = response.data.result
this.tableData1.map(v => {
this.$set(v, 'edit', false)
this.$set(v, '备注_原', v.备注)
this.$set(v, '不合格数量_原', v.不合格数量)
this.$set(v, '是否合格_原', v.是否合格)
this.$set(v, '数量_原', v.数量)
this.$set(v, '不合格原因文本_原', v.不合格原因文本)
this.$set(v, '不合格处理文本_原', v.不合格处理文本)
})
console.log(this.tableData1, 8979)
this.loading = false
this.total = parseInt(response.data.output[0].ItemCount)
})
},
viewPicture(row) {
this.dialogFormVisible = true
this.urls = []
searchPic(row.质检流水号).then(response => {
// this.URL = readFile + response.data[0].文件标识 + '.' + response.data[0].文件后缀
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].文件内容 !== null) {
// this.urls.push(readFile + response.data[i].文件标识 + '.' + response.data[i].文件后缀)
this.urls.push('data:image/png;base64,' + response.data[i].文件内容)
}
}
})
},
viewProcedures(row) {
this.dialogFormVisible4 = true
this.SparePartsNumber = row.零件图号
this.SparePartsName = row.零件名称
processingStatus(row.工艺计划流水号).then(response => {
this.tableData5 = response.data
})
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.selecttable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.selecttable()
}
// handleSizeChange1(val) {
// this.pageCurrent1 = 1
// this.pageSize1 = val
// this.fetchData()
// },
// handleCurrentChange1(val) {
// this.pageCurrent1 = val
// this.fetchData()
// },
// handleSizeChange2(val) {
// this.pageCurrent2 = 1
// this.pageSize2 = val
// this.fetchData1()
// },
// handleCurrentChange2(val) {
// this.pageCurrent2 = val
// this.fetchData1()
// }
}
}
</script>
<style scoped>
h3{
margin: 5px !important;
}
</style>