This commit is contained in:
2022-12-27 20:10:13 +08:00
parent 168ee247d5
commit 691271930c
12 changed files with 34 additions and 34 deletions

View File

@@ -154,6 +154,7 @@ export default {
return {
dialogVisible: false,
dialogVisible2: false,
goal_unassign_qty: 0,
queryrow: {},
sects: [],
tableDtl: []
@@ -173,6 +174,7 @@ export default {
rowmst: {
handler(newValue, oldValue) {
this.queryrow = newValue
this.goal_unassign_qty = JSON.parse(JSON.stringify(this.queryrow.unassign_qty))
}
}
},
@@ -230,6 +232,9 @@ export default {
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.canuse_qty)
} else {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
if (this.queryrow.unassign_qty > this.goal_unassign_qty){
this.queryrow.unassign_qty = JSON.parse(JSON.stringify(this.goal_unassign_qty))
}
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
}
this.tableDtl.splice(index, 1, row) // 通过splice 替换数据 触发视图更新