|
@ -189,13 +189,11 @@ export default { |
|
|
this.$message({ showClose: true, type: 'error', message: '原料列表不能为空' }) |
|
|
this.$message({ showClose: true, type: 'error', message: '原料列表不能为空' }) |
|
|
return |
|
|
return |
|
|
} else { |
|
|
} else { |
|
|
if (this.formobj.list.length > 1) { |
|
|
let materialCodes = this.formobj.list.map(item => item['materialCode']) |
|
|
for (var i = 0; i < this.formobj.list.length; i++) { |
|
|
let materialCodeSet = new Set(materialCodes) |
|
|
if (this.formobj.list[i].materialCode === this.formobj.list[this.formobj.list.length - 1].materialCode) { |
|
|
if (materialCodeSet.size !== materialCodes.length) { |
|
|
this.$message({ showClose: true, type: 'error', message: '原料列表中需选择不同的原料进行操作' }) |
|
|
this.$message({ showClose: true, type: 'error', message: '原料列表中需选择不同的原料进行操作' }) |
|
|
return |
|
|
return |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.submitdisabled = true |
|
|
this.submitdisabled = true |
|
|