From a8d0898b92d7dfde3c034abec55f78921dddc862 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Thu, 14 Sep 2023 15:05:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=99=BD=E8=83=9A=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=A4=9A=E9=80=89=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/whiteOrder/index.vue | 32 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/views/plan/whiteOrder/index.vue b/src/views/plan/whiteOrder/index.vue index 2dc27e80..49497906 100644 --- a/src/views/plan/whiteOrder/index.vue +++ b/src/views/plan/whiteOrder/index.vue @@ -244,16 +244,20 @@ + - - - + + + + + + - - - + + + @@ -561,8 +565,8 @@ export default { factoryCode: null, orderType: null, orderCode: null, - prodCode: null, - prodDesc: null, + prodCode: '', + prodDesc: '', quantity: null, quantitySplit: null, unit: null, @@ -580,8 +584,8 @@ export default { }, // 表单参数 form: { - prodCode: null, - prodDesc: null, + prodCode: '', + prodDesc: '', planProDate: null, planComplete: null, quantity: null, @@ -964,8 +968,8 @@ export default { code = code + this.selectMaterielList[i].productCode + ','; desc = desc + this.selectMaterielList[i].productDescZh + ','; } - this.form.prodCode = code; - this.form.prodDesc = desc; + this.form.prodCode += code; + this.form.prodDesc += desc; // 关闭选择物料弹窗 this.innerVisible = false; }, @@ -1156,8 +1160,8 @@ export default { factoryCode: null, orderType: null, orderCode: null, - prodCode: null, - prodDesc: null, + prodCode: '', + prodDesc: '', quantity: null, quantitySplit: null, unit: null, From dca6d4fad60c036566e0d13758c29b84e60d582e Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Thu, 14 Sep 2023 15:07:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=99=BD=E8=83=9A=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=A4=9A=E9=80=89=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/whiteOrder/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/plan/whiteOrder/index.vue b/src/views/plan/whiteOrder/index.vue index 49497906..afcf9664 100644 --- a/src/views/plan/whiteOrder/index.vue +++ b/src/views/plan/whiteOrder/index.vue @@ -965,8 +965,14 @@ export default { var code = ''; var desc = ''; for (let i = 0; i < this.selectMaterielList.length; i++) { - code = code + this.selectMaterielList[i].productCode + ','; - desc = desc + this.selectMaterielList[i].productDescZh + ','; + if(code.indexOf(this.selectMaterielList[i].productCode)<0){ + code = code + this.selectMaterielList[i].productCode + ','; + } + + if(code.indexOf(this.selectMaterielList[i].productDescZh)<0){ + desc = desc + this.selectMaterielList[i].productDescZh + ','; + } + } this.form.prodCode += code; this.form.prodDesc += desc; From 4661a46a7afbbbe8d1973a2b8ed17fa626200de2 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Thu, 14 Sep 2023 15:12:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=99=BD=E8=83=9A=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=A4=9A=E9=80=89=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/whiteOrder/index.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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;