This commit is contained in:
liushuai
2020-03-11 18:09:35 +08:00
parent b6c062607f
commit c099ccf0be
14 changed files with 312 additions and 140 deletions

View File

@@ -437,7 +437,25 @@ export default {
})
},
handleDelete(row) {
this.deleteRow(delList, row.项目流水号, function() { this.fetchTableData1() })
this.$confirm('删除该项目,将不可恢复,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delList(row.项目流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.fetchTableData1()
} else {
this.$message.error('请先删除机床信息')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
addMachine(row) {
this.projectNum = row.项目流水号
@@ -460,12 +478,32 @@ export default {
}
},
deleteMachine(row) {
function a() {
selectMachine(this.projectNum).then(response => {
this.tableData2 = response.data
// function a() {
// selectMachine(this.projectNum).then(response => {
// this.tableData2 = response.data
// })
// }
this.$confirm('删除该机床,将不可恢复,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delMachine(row.机床流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
selectMachine(this.projectNum).then(response => {
this.tableData2 = response.data
})
} else {
this.$message.error('已经投产的机床不能删除')
}
})
}
this.deleteRow(delMachine, row.机床流水号, a)
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
editMachine(row) {
this.flag = 2