diff --git a/src/views/technology/process/content.vue b/src/views/technology/process/content.vue index cfd5f40..8dfc115 100644 --- a/src/views/technology/process/content.vue +++ b/src/views/technology/process/content.vue @@ -212,7 +212,9 @@ export default { const len = obj.split(',').length; console.log('切割的数组',obj.split(',')); a.forEach(item => { - this.checkDevice = this.form.device.search(item) != -1; + const item1 = item+','; + console.log("打印item1",item1); + this.checkDevice = this.form.device.search(item1) != -1; console.log("check的值",this.checkDevice); if(this.checkDevice == true){ console.log("重复添加",true); @@ -225,7 +227,7 @@ export default { } }, - //新增 设备选择弹出框 + //新增 BOM选择弹出框 onItemSelectedBom(obj){ if(this.form.material == null ||this.form.material == ""){ console.log("material是空,if获取的obj",obj); diff --git a/src/views/technology/process/index.vue b/src/views/technology/process/index.vue index 3f32d68..3297075 100644 --- a/src/views/technology/process/index.vue +++ b/src/views/technology/process/index.vue @@ -836,11 +836,11 @@ export default { const len = obj.split(",").length; console.log("切割的数组", obj.split(",")); a.forEach((item) => { - this.checkEquipment = this.form.equipment.search(item) != -1; - + const item1 = item+','; + console.log("打印item1",item1); + this.checkEquipment = this.form.equipment.search(item1) != -1; if (this.checkEquipment == true) { console.log("重复添加", true); - Message.warning("您已经添加过该设备,请勿重复添加!!!"); } else if (this.checkEquipment == false) { this.selectMaterielListtag.push(item); diff --git a/src/views/technology/recipe/content.vue b/src/views/technology/recipe/content.vue index 9f322e9..f026ba8 100644 --- a/src/views/technology/recipe/content.vue +++ b/src/views/technology/recipe/content.vue @@ -323,7 +323,9 @@ export default { const len = obj.split(',').length; console.log('切割的数组',obj.split(',')); a.forEach(item => { - this.checkDevice = this.form.device.search(item) != -1; + const item1 = item+','; + console.log("打印item1",item1); + this.checkDevice = this.form.device.search(item1) != -1; console.log("check的值",this.checkDevice); if(this.checkDevice == true){ console.log("重复添加",true);