From e336643b5adee206a3a0c01bb31fdea831d3cf8d Mon Sep 17 00:00:00 2001 From: Kelvin Date: Tue, 26 Nov 2024 16:06:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=85=A5=E5=BA=93=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E9=AA=8C=E8=AF=81rfid=E6=96=B9=E6=B3=95=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue b/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue index 1206e42..b398ba6 100644 --- a/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue +++ b/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue @@ -63,15 +63,19 @@ export default { this.$emit("update:visible", false) }, async validateRfid() { - const rfidList = this.wmsInPlanDetailEntityList.map(entity => entity.rfid); - if (rfidList.length === 0) return + const rfidList = this.wmsInPlanDetailEntityList.filter(entity => { + if (entity.rfid && entity.rfid.trim().length > 0) { + return entity.rfid; + } + }); + if (!Array.isArray(rfidList) || rfidList.length === 0) return const res = await isDuplicateRfid(rfidList.join(",")); return res.data }, /** 提交按钮 */ async submitForm() { const validateRfidResult = await this.validateRfid(); - if (validateRfidResult.length > 0) { + if (Array.isArray(validateRfidResult) && validateRfidResult.length > 0) { this.$modal.msgError(`RFID重复:${validateRfidResult}`); return; }