代码更新

This commit is contained in:
2022-11-27 11:57:01 +08:00
parent ce718d939b
commit 35b2831481

View File

@@ -450,11 +450,24 @@ export default {
this.form.detail_count = this.form.tableData.length
},
deleteRow(index, rows) {
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
/* this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
rows.splice(index, 1)
this.nowindex = ''
this.nowrow = {}
this.form.detail_count = this.form.tableData.length
this.form.detail_count = this.form.tableData.length*/
const box_no = rows[index].box_no
let len = rows.length
while (len--) {
const obj = rows[len]
if (box_no === obj.box_no) {
const index = rows.indexOf(obj)
if (index > -1) { // 移除找到的指定元素
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
rows.splice(index, 1)
this.form.detail_count = this.form.tableData.length
}
}
}
}
}
}