fix(入库计划): 验证rfid方法修复
This commit is contained in:
parent
9c2d1eff43
commit
e336643b5a
@ -63,15 +63,19 @@ export default {
|
|||||||
this.$emit("update:visible", false)
|
this.$emit("update:visible", false)
|
||||||
},
|
},
|
||||||
async validateRfid() {
|
async validateRfid() {
|
||||||
const rfidList = this.wmsInPlanDetailEntityList.map(entity => entity.rfid);
|
const rfidList = this.wmsInPlanDetailEntityList.filter(entity => {
|
||||||
if (rfidList.length === 0) return
|
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(","));
|
const res = await isDuplicateRfid(rfidList.join(","));
|
||||||
return res.data
|
return res.data
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
async submitForm() {
|
async submitForm() {
|
||||||
const validateRfidResult = await this.validateRfid();
|
const validateRfidResult = await this.validateRfid();
|
||||||
if (validateRfidResult.length > 0) {
|
if (Array.isArray(validateRfidResult) && validateRfidResult.length > 0) {
|
||||||
this.$modal.msgError(`RFID重复:${validateRfidResult}`);
|
this.$modal.msgError(`RFID重复:${validateRfidResult}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user