opt:手工出库优化

This commit is contained in:
zhangzq
2024-05-15 11:07:09 +08:00
parent cd42f6cc4e
commit ebe8a836da
7 changed files with 56 additions and 13 deletions

View File

@@ -387,8 +387,8 @@ export default {
},
tableChanged2(row) {
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].material_id === row.material_id) {
this.crud.notify('不允许添加相同物料!')
if (this.form.tableData[i].material_id === row.material_id && this.form.tableData[i].pcsn === row.pcsn) {
this.crud.notify('不允许添加批次相同物料!')
return false
}
}
@@ -437,6 +437,12 @@ export default {
return false
}
for (let i = 0; i < this.form.tableData.length; i++) {
for (let j = i+1; j < this.form.tableData.length; j++) {
if (this.form.tableData[i].material_id === this.form.tableData[j].material_id && this.form.tableData[i].pcsn === this.form.tableData[j].pcsn) {
this.crud.notify('不允许添加相同批次物料!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}
if (!this.form.tableData[i].edit) {
this.crud.notify('尚有未完成编辑的物料明细序号' + (i + 1) + ',请检查!')
return false