refactor(入库计划): rfid校验,增加本地表单数据校验

This commit is contained in:
Kelvin 2025-01-02 15:50:54 +08:00
parent f2d3d6231b
commit 7d34b9f6d5

View File

@ -65,6 +65,11 @@ export default {
const rfidList = this.wmsInPlanDetailEntityList.filter(entity => entity.rfid && entity.rfid.trim().length > 0).map(entity => entity.rfid);
console.log(rfidList)
if (!Array.isArray(rfidList) || rfidList.length === 0) return
//
const duplicateList = rfidList.filter((item, index) => rfidList.indexOf(item) !== index);
if (Array.isArray(rfidList) || rfidList.length) {
return duplicateList;
}
const res = await isDuplicateRfid(rfidList.join(","));
return res.data
},