diff --git a/src/views/plan/whiteOrder/index.vue b/src/views/plan/whiteOrder/index.vue index afcf9664..b415da97 100644 --- a/src/views/plan/whiteOrder/index.vue +++ b/src/views/plan/whiteOrder/index.vue @@ -965,14 +965,18 @@ export default { var code = ''; var desc = ''; for (let i = 0; i < this.selectMaterielList.length; i++) { - if(code.indexOf(this.selectMaterielList[i].productCode)<0){ + if(this.form.prodCode.indexOf(this.selectMaterielList[i].productCode)<0){ code = code + this.selectMaterielList[i].productCode + ','; } - if(code.indexOf(this.selectMaterielList[i].productDescZh)<0){ + if(this.form.prodDesc.indexOf(this.selectMaterielList[i].productDescZh)<0){ desc = desc + this.selectMaterielList[i].productDescZh + ','; + }else{ + this.$message({ + message: this.selectMaterielList[i].productDescZh+'已经选择', + type: 'warning' + }) } - } this.form.prodCode += code; this.form.prodDesc += desc;