|
@ -740,6 +740,14 @@ const submitForm = async (formType, submitData) => { |
|
|
formRef.value.formLoading = false |
|
|
formRef.value.formLoading = false |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
const itemCodeCodes = data.subList.map(item => item.itemCode); // 获取所有的 code数组 |
|
|
|
|
|
const hasDuplicates = itemCodeCodes.some((code, index) => itemCodeCodes.indexOf(code) !== index);//判断每个明细的itemCode是否重复 |
|
|
|
|
|
if (hasDuplicates) { |
|
|
|
|
|
message.warning('物料不能重复') |
|
|
|
|
|
formRef.value.formLoading = false |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
formRef.value.formLoading = true |
|
|
formRef.value.formLoading = true |
|
|
try { |
|
|
try { |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|