追溯加工过程

This commit is contained in:
Vergil
2020-02-25 16:31:39 +08:00
parent 7e81b57ab4
commit 5197b52e4f
2 changed files with 20 additions and 67 deletions

View File

@@ -28,16 +28,7 @@
<el-row>
<el-col style="width: 37%">
<el-card>
<el-table
v-loading="loading2"
:data="tableData1"
:row-class-name="tableRowClassName1"
class="table"
style="max-height: 830px"
highlight-current-row
empty-text=" "
border
@row-click="getRow">
<el-table v-loading="loading2" :data="tableData1" :row-class-name="tableRowClassName1" class="table" style="max-height: 830px" highlight-current-row empty-text=" " border @row-click="getRow">
<el-table-column type="index" label="序号" width="50"/>
<el-table-column align="center" label="工艺名" show-overflow-tooltip min-width="70">
<template slot-scope="scope">
@@ -69,16 +60,7 @@
</el-col>
<el-col style="width: 63%">
<el-card>
<el-table
v-loading="loading"
ref="singleTable"
:data="tableData"
:row-class-name="tableRowClassName"
class="table"
highlight-current-row
border
height="630"
@row-click="getCurrentRow">
<el-table v-loading="loading" ref="singleTable" :data="tableData" :row-class-name="tableRowClassName" class="table" highlight-current-row border height="630" @row-click="getCurrentRow">
<el-table-column align="center" label="零件图号" show-overflow-tooltip width="200">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
@@ -89,11 +71,6 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="加工数" width="70">
<template slot-scope="scope">
{{ scope.row.加工数 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划数" width="70">
<template slot-scope="scope">
{{ scope.row.投产数量 }}
@@ -101,12 +78,12 @@
</el-table-column>
<el-table-column align="center" label="加工完成" width="100">
<template slot-scope="scope">
{{ scope.row.完成日期 }}
{{ scope.row.机加工实际完成时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划完成" width="100">
<template slot-scope="scope">
{{ scope.row.计划结束时间 }}
{{ scope.row.机加工结束时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="用户名称" show-overflow-tooltip min-width="110">
@@ -359,7 +336,7 @@ export default {
if (this.index === -1) {
console.log(-1)
} else {
if (this.index !== 0) {
if (this.index !== 0 && this.isDisabled === false) {
this.index = this.index - 1
console.log(this.index)
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
@@ -372,7 +349,7 @@ export default {
if (this.index === -1) {
console.log(-1)
} else {
if (this.index + 1 !== this.tableData.length) {
if (this.index + 1 !== this.tableData.length && this.isDisabled === false) {
this.index = this.index + 1
console.log(this.index)
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
@@ -535,40 +512,12 @@ export default {
this.tableData1 = []
this.isDisabled = true
this.loading = true
if (this.Machine === '') {
this.checkbox_Machine = 0
} else {
this.checkbox_Machine = 1
}
if (this.Group === '') {
this.checkbox_Group = 0
} else {
this.checkbox_Group = 1
}
if (this.number === '') {
this.checkbox_number = 0
} else {
this.checkbox_number = 1
}
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.rows.length !== 0) {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData.push({
工艺计划流水号: response.data.rows[i].工艺计划流水号,
考核状态: response.data.rows[i].考核状态,
序号: response.data.rows[i].序号,
跟单号: response.data.rows[i].跟单号,
零件图号: response.data.rows[i].零件图号,
零件名称: response.data.rows[i].零件名称,
加工数: response.data.rows[i].完成数量, // MES里采集 现在没有
投产数量: response.data.rows[i].批次数量,
完成日期: response.data.rows[i].机加工实际完成时间 ? response.data.rows[i].机加工实际完成时间.split(' ')[0] : '', // 排产时间
计划结束时间: response.data.rows[i].机加工结束时间 ? response.data.rows[i].机加工结束时间.split(' ')[0] : '',
客户名称: response.data.rows[i].客户名称 // 客户名
})
}
}
this.total = response.data.total
this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount)
this.loading = false
})
},
@@ -695,6 +644,8 @@ export default {
row.index = rowIndex
if (parseInt(row.考核状态) > 6) {
return 'CompleteColor'
} else if (parseInt(row.考核状态) <= 6 && parseInt(row.状态) === 1) {
return 'disCompleteColor'
}
},
// 工序状态变色
@@ -725,4 +676,7 @@ export default {
.CompleteColor{
background: #9bd7fc !important;
}
.disCompleteColor{
background: rgb(233,240,250) !important;
}
</style>