代码更新

This commit is contained in:
lyd
2022-11-11 16:29:37 +08:00
parent f83a40b654
commit d34bad7abc
2 changed files with 28 additions and 9 deletions

View File

@@ -148,13 +148,30 @@ export default {
this.notify('请选中一条记录!', 'info')
return
}
const data = this.$refs.table.selection[0]
crudProduceTask.finish(data).then(res => {
this.notify('操作成功', 'success')
this.queryId()
}).cache(err => {
console.log(err.response.data.message)
})
// 判断是否有完工<加工,弹出提示
for (const i in this.$refs.table.selection) {
console.log(this.$refs.table.selection[i])
if (this.$refs.table.selection[i].finishproduce_qty < this.$refs.table.selection[i].produce_qty) {
this.$confirm('完工数量小于加工数量,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const data = this.$refs.table.selection[0]
crudProduceTask.finish(data).then(res => {
this.notify('操作成功', 'success')
this.queryId()
}).cache(err => {
console.log(err.response.data.message)
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
}
}
},
materialBack() {
if (this.$refs.table.selection.length === 0) {