流程测试修改
This commit is contained in:
@@ -331,6 +331,16 @@ export default {
|
||||
},
|
||||
/** 确认选择物料 */
|
||||
confirmSelectProduct() {
|
||||
// 检查选中的物料是否已存在于表单中
|
||||
const duplicateProducts = this.selectedProducts.filter(selected =>
|
||||
this.productList.some(existing => existing.productId === selected.productId)
|
||||
);
|
||||
|
||||
if (duplicateProducts.length > 0) {
|
||||
this.$modal.msgError('以下物料已存在,请修改数量:\n' + duplicateProducts.map(p => p.productName).join('\n'));
|
||||
return;
|
||||
}
|
||||
|
||||
const newProducts = this.selectedProducts.map(item => ({
|
||||
productGuid: item.productGuid,
|
||||
productId: item.productId,
|
||||
|
||||
Reference in New Issue
Block a user