|
@@ -681,11 +681,16 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleSelectTwoBOM(data, index) {
|
|
|
- const row = data.bomColors[index]
|
|
|
- const item = {
|
|
|
+ let list = this.form.colors[this.selectIndex].mountingsList.filter((item) => item.categoryType === data.categoryType)
|
|
|
+ if (list && list.length > 0) {
|
|
|
+ return this.msgInfo('该类型包材配件已添加')
|
|
|
+ }
|
|
|
+ let row = data.bomColors[index]
|
|
|
+ let item = {
|
|
|
bomColorName: row.nameChinese,
|
|
|
id: data.id,
|
|
|
bomColorId: row.id,
|
|
|
+ categoryType: data.categoryType,
|
|
|
quantity: '',
|
|
|
}
|
|
|
this.form.colors[this.selectIndex].mountingsList.push(item)
|