Commit 383d9c75 authored by jingnan's avatar jingnan 👀

换件领用取消相同物料不能重复添加的校验

parent e0842cad
......@@ -381,7 +381,6 @@ export default {
},
submitEvent({ formData, addContinue }) {
const extMaterialIds = this.tableData.map(item => item.extMaterialId).includes(formData[0].extMaterialId)
if (extMaterialIds) return this.$utils.showMessageWarning('相同物料不能重复添加,请重新选择!')
if (this.basicData.useRequestType === 'swapUse') {
this.tableData.forEach((item, index) => {
if (item.extSupportingItemVO && item.extSupportingItemVO.id === formData[0].extSupportingItemVO.id) {
......@@ -389,6 +388,7 @@ export default {
}
})
} else {
if (extMaterialIds) return this.$utils.showMessageWarning('相同物料不能重复添加,请重新选择!')
this.tableData.push(...formData)
}
this.dialogShow = addContinue || false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment