From 2cfb4510c3d3044e0f2ad9ffc30a5b3998e4d830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Mon, 26 Oct 2026 13:40:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=BA=93=E8=A2=8B=E8=B4=B4=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E6=A3=80=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WareHouseServiceImpl.java | 11 ++++++++ .../static/js/pda/changeLocation2.js | 27 +++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) 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(); });