H1 H11校验

yangwl
A0010407 1 year ago
parent 2f167fb91b
commit a2636786da

@ -212,7 +212,9 @@ export default {
const len = obj.split(',').length; const len = obj.split(',').length;
console.log('切割的数组',obj.split(',')); console.log('切割的数组',obj.split(','));
a.forEach(item => { 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); console.log("check的值",this.checkDevice);
if(this.checkDevice == true){ if(this.checkDevice == true){
console.log("重复添加",true); console.log("重复添加",true);
@ -225,7 +227,7 @@ export default {
} }
}, },
// // BOM
onItemSelectedBom(obj){ onItemSelectedBom(obj){
if(this.form.material == null ||this.form.material == ""){ if(this.form.material == null ||this.form.material == ""){
console.log("material是空if获取的obj",obj); console.log("material是空if获取的obj",obj);

@ -836,11 +836,11 @@ export default {
const len = obj.split(",").length; const len = obj.split(",").length;
console.log("切割的数组", obj.split(",")); console.log("切割的数组", obj.split(","));
a.forEach((item) => { 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) { if (this.checkEquipment == true) {
console.log("重复添加", true); console.log("重复添加", true);
Message.warning("您已经添加过该设备,请勿重复添加!!!"); Message.warning("您已经添加过该设备,请勿重复添加!!!");
} else if (this.checkEquipment == false) { } else if (this.checkEquipment == false) {
this.selectMaterielListtag.push(item); this.selectMaterielListtag.push(item);

@ -323,7 +323,9 @@ export default {
const len = obj.split(',').length; const len = obj.split(',').length;
console.log('切割的数组',obj.split(',')); console.log('切割的数组',obj.split(','));
a.forEach(item => { 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); console.log("check的值",this.checkDevice);
if(this.checkDevice == true){ if(this.checkDevice == true){
console.log("重复添加",true); console.log("重复添加",true);

Loading…
Cancel
Save