修改
This commit is contained in:
@@ -468,10 +468,21 @@ export default {
|
||||
}
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
rows.splice(index, 1)
|
||||
this.nowindex = ''
|
||||
this.nowrow = {}
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
const storagevehicle_code = rows[index].storagevehicle_code
|
||||
let len = rows.length
|
||||
while (len--) {
|
||||
const obj = rows[len]
|
||||
if (storagevehicle_code === obj.storagevehicle_code) {
|
||||
const index = rows.indexOf(obj)
|
||||
if (index > -1) { // 移除找到的指定元素
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].qty)
|
||||
rows.splice(index, 1)
|
||||
this.nowindex = ''
|
||||
this.nowrow = {}
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
if (this.form.tableData.length === 0) {
|
||||
|
||||
@@ -96,6 +96,7 @@ import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import handmovestor from '@/views/wms/st/inStor/moveStor/handmovestor'
|
||||
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
@@ -188,8 +189,11 @@ export default {
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
handmovestor.getBoxIvt(this.rows).then(res => {
|
||||
this.rows = res
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user