| | |
| | | // dutyRecordId: this.isDutyFilter ? this.currentDutyRecord.id : null, |
| | | // workstationId: this.isWorkstationFilter ? this.workstationId : null |
| | | // }) |
| | | // console.log(val, res) |
| | | // this.productRecords = res.data.data |
| | | }, |
| | | // 多选删除 |
| | | select(selection, row) { |
| | | console.log(selection, row) |
| | | const arr = [] |
| | | // this.idList = [] |
| | | selection.forEach((item) => { |
| | | arr.push(item.id) |
| | | }) |
| | | this.idList = [...new Set(arr)] |
| | | console.log(this.idList) |
| | | }, |
| | | // 全选删除 |
| | | selectAll(selection) { |
| | | console.log(selection) |
| | | const arr = [] |
| | | // this.idList = [] |
| | | selection.forEach((item) => { |
| | | arr.push(item.id) |
| | | }) |
| | | this.idList = [...new Set(arr)] |
| | | console.log(this.idList) |
| | | }, |
| | | async delAlls() { |
| | | let isContinue = true |
| | |
| | | isContinue = true |
| | | // this.idList = [] |
| | | const res = await delAll(this.idList) |
| | | console.log(res) |
| | | this.getProductRecords() |
| | | this.$message.success('删除成功!') |
| | | this.idList = [] |
| | |
| | | }, |
| | | // 获取生产记录列表 |
| | | getProductRecords() { |
| | | console.log(this.createDateRange) |
| | | let templateJson |
| | | if (this.createDateRange != null && this.createDateRange !== '') { |
| | | templateJson = { |
| | |
| | | item.toggleRowSelection(row) |
| | | }) |
| | | const index = this.idList.indexOf(row.id) |
| | | console.log(index) |
| | | if (index >= 0) { |
| | | this.idList.splice(index, 1) |
| | | } else { |
| | | this.idList.push(row.id) |
| | | } |
| | | console.log(this.idList) |
| | | this.currProductRecordId = row.id |
| | | this.paramValues = [] |
| | | var productRecordJson = { |
| | |
| | | nextFocus(index) { |
| | | index++ |
| | | this.$refs['reference_' + index].focus() |
| | | // console.log(this.i) |
| | | }, |
| | | // 删除某条生产记录 |
| | | delProductrecord(index, row) { |
| | |
| | | // JSON.stringify(paramValueArray) |
| | | // ) |
| | | updateProductRecord(obj).then((response) => { |
| | | console.log(this.idList) |
| | | if (response.data.code === 0) { |
| | | this.$message.success('修改成功') |
| | | console.log(this.$refs.productRecordTable) |
| | | this.$refs.productRecordTable.forEach((item) => { |
| | | item.clearSelection() |
| | | }) |