rev: 限制拼盘重量不能大于150kg
This commit is contained in:
@@ -337,13 +337,19 @@ export default {
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
const tablemap = new Map()
|
||||
let num = 0
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
num = parseFloat(this.form.tableData[i].canuse_qty) + parseFloat(num)
|
||||
tablemap.set(this.form.tableData[i].storagevehicle_code, this.form.tableData[i].storagevehicle_code)
|
||||
}
|
||||
if (tablemap.size !== 2) {
|
||||
this.crud.notify('拼盘明细必须有两个载具!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (num > 150000) {
|
||||
this.crud.notify('拼盘重量不能大于150kg!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user