更新
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user