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; }