修改
This commit is contained in:
@@ -446,10 +446,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) {
|
||||
|
||||
@@ -93,6 +93,7 @@ import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
||||
import handmovestor from '@/views/wms/st/inStor/moveStor/handmovestor'
|
||||
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
@@ -179,14 +180,18 @@ export default {
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
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)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,4 +65,12 @@ export function handdown(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, getOutBillDtl,getStructIvt,confirm,getInvTypes,handdown }
|
||||
|
||||
export function getBoxIvt(data) {
|
||||
return request({
|
||||
url: '/api/handmovestor/getBoxIvt',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, getOutBillDtl,getStructIvt,confirm,getInvTypes,handdown, getBoxIvt }
|
||||
|
||||
Reference in New Issue
Block a user