领料保存报错提示重复
This commit is contained in:
parent
b005744181
commit
dd0845a4d7
|
|
@ -538,16 +538,20 @@ export default {
|
||||||
this.$message.error('请添加数据')
|
this.$message.error('请添加数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
this.queryParams.leaseApplyDetails.forEach(item => {
|
this.queryParams.leaseApplyDetails.forEach(item => {
|
||||||
/* if(item.num==0){
|
if(item.num==0){
|
||||||
this.$message.error('机具类型库存量为零无法领料');
|
this.$message.error('机具类型库存量为零无法领料');
|
||||||
return
|
throw new Error();
|
||||||
} */
|
}
|
||||||
if (item.preNum == '') {
|
if (item.preNum == '') {
|
||||||
this.$message.error('请填写预领数量')
|
this.$message.error('请填写预领数量')
|
||||||
return
|
throw new Error();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} catch (e) {
|
||||||
|
throw e
|
||||||
|
}
|
||||||
this.queryParams.createBy = this.user.userName
|
this.queryParams.createBy = this.user.userName
|
||||||
this.queryParams.companyId = this.user.companyId
|
this.queryParams.companyId = this.user.companyId
|
||||||
let res
|
let res
|
||||||
|
|
|
||||||
|
|
@ -587,18 +587,20 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let canSave = true
|
let canSave = true
|
||||||
|
try {
|
||||||
this.queryParams.leaseApplyDetails.forEach(item => {
|
this.queryParams.leaseApplyDetails.forEach(item => {
|
||||||
if(item.num==0){
|
if(item.num==0){
|
||||||
this.$message.error('机具类型库存量为零无法领料')
|
this.$message.error('机具类型库存量为零无法领料');
|
||||||
canSave = false
|
throw new Error();
|
||||||
return
|
|
||||||
}
|
}
|
||||||
if (item.preNum == '') {
|
if (item.preNum == '') {
|
||||||
canSave = false
|
|
||||||
this.$message.error('请填写预领数量')
|
this.$message.error('请填写预领数量')
|
||||||
return
|
throw new Error();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} catch (e) {
|
||||||
|
throw e
|
||||||
|
}
|
||||||
if (!canSave) {
|
if (!canSave) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue