追述加工过程上下

This commit is contained in:
Vergil
2020-02-18 16:31:08 +08:00
parent cb285b19bf
commit 42a78ecd3d

View File

@@ -343,10 +343,13 @@ export default {
this.getTable9()
var _this = this
document.onkeydown = function(e) {
if (event.keyCode === 37 || event.keyCode === 38) {
// 暂时弃用↑↓ 只用←→
// event.keyCode === 38 ||
if (event.keyCode === 37) {
_this.click_Up()
}
if (event.keyCode === 39 || event.keyCode === 40) {
// event.keyCode === 40 ||
if (event.keyCode === 39) {
_this.click_Down()
}
}
@@ -356,22 +359,26 @@ export default {
if (this.index === -1) {
console.log(-1)
} else {
this.index = this.index - 1
console.log(this.index)
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
this.批次数量 = this.tableData[this.index].批次数量
this.getCurrentRow_Click(this.tableData[this.index].工艺计划流水号)
if (this.index !== 0) {
this.index = this.index - 1
console.log(this.index)
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
this.批次数量 = this.tableData[this.index].批次数量
this.getCurrentRow_Click(this.tableData[this.index].工艺计划流水号)
}
}
},
click_Down() {
if (this.index === -1) {
console.log(-1)
} else {
this.index = this.index + 1
console.log(this.index)
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
this.批次数量 = this.tableData[this.index].批次数量
this.getCurrentRow_Click(this.tableData[this.index].工艺计划流水号)
if (this.index + 1 !== this.tableData.length) {
this.index = this.index + 1
console.log(this.index)
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
this.批次数量 = this.tableData[this.index].批次数量
this.getCurrentRow_Click(this.tableData[this.index].工艺计划流水号)
}
}
},
getCurrentRow_Click(row) {