diff --git a/src/main/java/com/heai/modules/app/service/impl/WareHouseServiceImpl.java b/src/main/java/com/heai/modules/app/service/impl/WareHouseServiceImpl.java index e3788cd..dbceaf8 100644 --- a/src/main/java/com/heai/modules/app/service/impl/WareHouseServiceImpl.java +++ b/src/main/java/com/heai/modules/app/service/impl/WareHouseServiceImpl.java @@ -52,6 +52,17 @@ public class WareHouseServiceImpl implements WareHouseService { @Override @Transactional public void saveChangeLocationId(List inList){ + // 袋贴重复扫描校验,写单之前拦截 - rqrq + Set printLabelIdSet = new HashSet(); + for (int i = 0; i < inList.size(); i++) { + String printLabelId = inList.get(i).getPrintLabelId(); + if (printLabelId == null || "".equals(printLabelId.trim())) { + continue; + } + if (!printLabelIdSet.add(printLabelId.trim())) { + throw new RuntimeException("袋贴有重复扫描 请退出功能重新进入操作"); + } + } String site=inList.get(0).getSite(); //查询 新的库位在不在新的仓库里面 List checkLocation=wareHouseDao.checkLocation(inList.get(0).getSite(),inList.get(0).getNewWareHouseId(),inList.get(0).getNewLocationId()); diff --git a/src/main/resources/static/js/pda/changeLocation2.js b/src/main/resources/static/js/pda/changeLocation2.js index 2ea26f3..276c804 100644 --- a/src/main/resources/static/js/pda/changeLocation2.js +++ b/src/main/resources/static/js/pda/changeLocation2.js @@ -16,14 +16,31 @@ var inventoryData = null; var tableList = new Array(); +// 重新进入页面时清空本次扫描数据 - rqrq +function resetChangeLocationPage() { + tableList = []; + partNoData = null; + inventoryData = null; + wareHouseId = ''; + $("#partNo_search").val(""); + $("#wareHouse").val(""); + $("#newLocation").val(""); + $("#printQty").val(""); + $("#qtyIssue").val(""); + $("#qtyIssueKG").val(""); + $("#issue_table").html(""); + $("#issue_modal").modal("hide"); + $("#partNo_search").focus(); +} + //页面初始化 $(function(){ + $("#titleName").text('移库'); + resetChangeLocationPage(); +}); - $("#titleName").text('移库'); - - - $("#partNo_search").focus(); - +window.addEventListener("pageshow", function () { + resetChangeLocationPage(); });