追溯加工过程
This commit is contained in:
@@ -30,7 +30,7 @@ export function getGroups(stepNumber) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, checkbox_number, number, k, m, pageCurrent, pageSize) {
|
export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, checkbox_number, number, pageCurrent, pageSize) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -38,9 +38,8 @@ export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, check
|
|||||||
UserID: state.state.user.id,
|
UserID: state.state.user.id,
|
||||||
ModularID: router.currentRoute.path,
|
ModularID: router.currentRoute.path,
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_横向赋值新建存储过程_新',
|
name: '车间生产管理工艺_追溯加工过程_查询',
|
||||||
param: '项目流水号_check=0=string&机床流水号_check=' + checkbox_Machine + '=string&机床流水号=' + Machine + '=string&组件流水号_check=' + checkbox_Group + '=string&组件流水号=' + Group + '=string&零件图号_check=' + checkbox_number + '=string&零件图号=' + number + '=string&是否查询全部数据=1=string&单件是否外协=1=string&考核状态=6=int&开始时间_check=0&开始时间=' + k + '&结束时间_check=0&结束时间=' + m,
|
param: `机床流水号_check=${checkbox_Machine}&机床流水号=${Machine}&组件流水号_check=${checkbox_Group}&组件流水号=${Group}&零件图号_check=${checkbox_number}&零件图号=${number}&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output`
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,16 +28,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col style="width: 37%">
|
<el-col style="width: 37%">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<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">
|
||||||
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 type="index" label="序号" width="50"/>
|
||||||
<el-table-column align="center" label="工艺名" show-overflow-tooltip min-width="70">
|
<el-table-column align="center" label="工艺名" show-overflow-tooltip min-width="70">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -69,16 +60,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col style="width: 63%">
|
<el-col style="width: 63%">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table v-loading="loading" ref="singleTable" :data="tableData" :row-class-name="tableRowClassName" class="table" highlight-current-row border height="630" @row-click="getCurrentRow">
|
||||||
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">
|
<el-table-column align="center" label="零件图号" show-overflow-tooltip width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件图号 }}
|
{{ scope.row.零件图号 }}
|
||||||
@@ -89,11 +71,6 @@
|
|||||||
{{ scope.row.零件名称 }}
|
{{ scope.row.零件名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column align="center" label="计划数" width="70">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.投产数量 }}
|
{{ scope.row.投产数量 }}
|
||||||
@@ -101,12 +78,12 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="加工完成" width="100">
|
<el-table-column align="center" label="加工完成" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.完成日期 }}
|
{{ scope.row.机加工实际完成时间 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="计划完成" width="100">
|
<el-table-column align="center" label="计划完成" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.计划结束时间 }}
|
{{ scope.row.机加工结束时间 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="用户名称" show-overflow-tooltip min-width="110">
|
<el-table-column align="center" label="用户名称" show-overflow-tooltip min-width="110">
|
||||||
@@ -359,7 +336,7 @@ export default {
|
|||||||
if (this.index === -1) {
|
if (this.index === -1) {
|
||||||
console.log(-1)
|
console.log(-1)
|
||||||
} else {
|
} else {
|
||||||
if (this.index !== 0) {
|
if (this.index !== 0 && this.isDisabled === false) {
|
||||||
this.index = this.index - 1
|
this.index = this.index - 1
|
||||||
console.log(this.index)
|
console.log(this.index)
|
||||||
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
|
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
|
||||||
@@ -372,7 +349,7 @@ export default {
|
|||||||
if (this.index === -1) {
|
if (this.index === -1) {
|
||||||
console.log(-1)
|
console.log(-1)
|
||||||
} else {
|
} else {
|
||||||
if (this.index + 1 !== this.tableData.length) {
|
if (this.index + 1 !== this.tableData.length && this.isDisabled === false) {
|
||||||
this.index = this.index + 1
|
this.index = this.index + 1
|
||||||
console.log(this.index)
|
console.log(this.index)
|
||||||
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
|
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
|
||||||
@@ -535,40 +512,12 @@ export default {
|
|||||||
this.tableData1 = []
|
this.tableData1 = []
|
||||||
this.isDisabled = true
|
this.isDisabled = true
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.Machine === '') {
|
this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
|
||||||
this.checkbox_Machine = 0
|
this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
|
||||||
} else {
|
this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
|
||||||
this.checkbox_Machine = 1
|
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
|
||||||
if (this.Group === '') {
|
this.total = parseInt(response.data.output[0].ItemCount)
|
||||||
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.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -695,6 +644,8 @@ export default {
|
|||||||
row.index = rowIndex
|
row.index = rowIndex
|
||||||
if (parseInt(row.考核状态) > 6) {
|
if (parseInt(row.考核状态) > 6) {
|
||||||
return 'CompleteColor'
|
return 'CompleteColor'
|
||||||
|
} else if (parseInt(row.考核状态) <= 6 && parseInt(row.状态) === 1) {
|
||||||
|
return 'disCompleteColor'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 工序状态变色
|
// 工序状态变色
|
||||||
@@ -725,4 +676,7 @@ export default {
|
|||||||
.CompleteColor{
|
.CompleteColor{
|
||||||
background: #9bd7fc !important;
|
background: #9bd7fc !important;
|
||||||
}
|
}
|
||||||
|
.disCompleteColor{
|
||||||
|
background: rgb(233,240,250) !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user