fix(入库计划): 验证rfid方法修复
This commit is contained in:
parent
9c2d1eff43
commit
e336643b5a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user