营销合同

This commit is contained in:
Vergil
2020-05-18 10:38:43 +08:00
parent 8100278664
commit fdbfefa17e

View File

@@ -927,7 +927,29 @@ export default {
})
},
handleDelete(row) {
this.deleteRow(delList, row.项目流水号, function() { this.fetchTableData1() })
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delList(row.项目流水号).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
if (this.tableData1 && this.tableData1.length === 1 && this.PageCurrent > 1) { // 判断删除的是否是最后一页最后一行,如果是且不是第一页,页数减一
this.PageCurrent--
}
this.fetchTableData1()
this.$message.success('删除成功')
} else {
this.$message.error('已经安排生产,不能删除')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
handleSizeChange(val) {
this.PageCurrent = 1
@@ -1187,12 +1209,27 @@ export default {
}
},
deleteMachine(row) {
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') {
selectMachine(this.projectNum).then(response => {
this.tableData2 = response.data
})
this.$message.success('删除成功')
} else {
this.$message.error('已经安排生产,不能删除')
}
})
}
this.deleteRow(delMachine, row.机床流水号, a)
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
changeExecutionProgressID() {
this.dialogTimeVisible = true