修改
This commit is contained in:
@@ -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 替换数据 触发视图更新
|
||||
|
||||
Reference in New Issue
Block a user