This commit is contained in:
2022-11-29 15:36:14 +08:00
parent 6db99268b6
commit b5c6134eba
9 changed files with 223 additions and 20 deletions

View File

@@ -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) {

View File

@@ -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)
})
}
}
}

View File

@@ -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 }