完善产品管理

This commit is contained in:
2024-08-14 11:20:16 +08:00
parent 1bd02b44dc
commit d7bcf8b894

View File

@@ -185,10 +185,12 @@ export default {
this.$message({ showClose: true, type: 'error', message: '原料列表不能为空' }) this.$message({ showClose: true, type: 'error', message: '原料列表不能为空' })
return return
} else { } else {
for (var i = 0; i < this.formobj.list.length; i++) { if (this.formobj.list.length > 1) {
if (this.formobj.list[i].materialCode === this.formobj.list[this.formobj.list.length - 1].materialCode) { for (var i = 0; i < this.formobj.list.length; i++) {
this.$message({ showClose: true, type: 'error', message: '原料列表中需选择不同的原料进行操作' }) if (this.formobj.list[i].materialCode === this.formobj.list[this.formobj.list.length - 1].materialCode) {
return this.$message({ showClose: true, type: 'error', message: '原料列表中需选择不同的原料进行操作' })
return
}
} }
} }
} }