diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java b/src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java index 53b9d014..934e575f 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java @@ -635,6 +635,8 @@ public class GroupController { List groupInfoByGid = groupService.findGroupInfoByGid(gid); // 用于标志该数量是否合法 boolean flag = true; + // 用于存储不符合数量的物料名称 + String mname = ""; for (GroupInfo groupInfo : groupInfoByGid) { // 获取具体信息 @@ -656,8 +658,9 @@ public class GroupController { // 如果概述了不合法 flag = false; } + mname = groupInfo.getMname(); } - return new RestResponse(flag); + return new RestResponse(flag,200,new StatusInfo(mname,mname)); } else { throw new MyException("缺少必要参数"); } diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java b/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java index 6d7355b4..66870bfa 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java @@ -1833,14 +1833,18 @@ public class MaterialController { public RestResponse updateQrCodeType(@RequestBody Map map){ // 获取转换类型 String type = (String) map.get("type"); - + String mcode = (String) map.get("mcode"); int result = 0; - if("qTb".equals(type)){ - // 如果是二维码转条形码 - result = materialService.qrCodeToBarCode(map); - }else{ - // 如果是条形码转二维码 - result = materialService.barCodeToQrCode(map); + if(!"noMaterial".equals(mcode)){ + + if("qTb".equals(type)){ + // 如果是二维码转条形码 + result = materialService.qrCodeToBarCode(map); + }else{ + // 如果是条形码转二维码 + result = materialService.barCodeToQrCode(map); + } + } return CrudUtil.putHandle(1,result); } diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java index 5393f1eb..ccee034b 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -2281,6 +2281,7 @@ public class PageController { if (flag == 1) { // 如果是物料 + // 获取当前对应物料 // 获取当前对应物料 Material materialById = materialService.findMaterialById(mid); // 获取当前物料对应的码值 diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/SplitController.java b/src/main/java/com/dreamchaser/depository_manage/controller/SplitController.java index 7085ca70..e20982bb 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/SplitController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/SplitController.java @@ -31,15 +31,16 @@ public class SplitController { /** * 用于添加一条拆单记录 - * @param map 待添加数据 + * + * @param map 待添加数据 * @param request * @return */ @PostMapping("/splitAdd") - public RestResponse splitAdd(@RequestBody Map map, HttpServletRequest request){ - if(map.containsKey("quantity") && map.containsKey("newUnit")){ - return CrudUtil.postHandle(1,splitUnitService.addSplitInfo(map)); - }else{ + public RestResponse splitAdd(@RequestBody Map map, HttpServletRequest request) { + if (map.containsKey("quantity") && map.containsKey("newUnit")) { + return CrudUtil.postHandle(1, splitUnitService.addSplitInfo(map)); + } else { throw new MyException("缺少必要参数"); } } @@ -47,33 +48,35 @@ public class SplitController { /** * 用于根据条件查询拆单记录 - * @param map 待查询条件 + * + * @param map 待查询条件 * @param request * @return */ @GetMapping("/split_out") - public RestResponse splitOut(@RequestParam Map map,HttpServletRequest request){ - return new RestResponse(splitUnitService.findSplitInfoPByCondition(map),splitUnitService.findSplitInfoPCountByCondition(map),200); + public RestResponse splitOut(@RequestParam Map map, HttpServletRequest request) { + return new RestResponse(splitUnitService.findSplitInfoPByCondition(map), splitUnitService.findSplitInfoPCountByCondition(map), 200); } /** * 根据条件删除对应的拆单记录 + * * @param map 待删除数据 * @return */ @PostMapping("/split_del") - public RestResponse splitDel(@RequestBody Map map){ - if(map.containsKey("id")){ + public RestResponse splitDel(@RequestBody Map map) { + if (map.containsKey("id")) { Integer id = ObjectFormatUtil.toInteger(map.get("id")); Integer integer = splitUnitService.delSplitInfoById(id); - if(Integer.compare(integer,-1) == 0){ + if (Integer.compare(integer, -1) == 0) { // 如果没有删除 - return new RestResponse("",666,new StatusInfo("删除失败","该拆单正在使用中,不允许进行删除操作")); - }else{ - return CrudUtil.deleteHandle(1,integer); + return new RestResponse("", 666, new StatusInfo("删除失败", "该拆单正在使用中,不允许进行删除操作")); + } else { + return CrudUtil.deleteHandle(1, integer); } - }else if(map.containsKey("ids")){ + } else if (map.containsKey("ids")) { List ids = (List) map.get("ids"); List errInfo = new ArrayList<>(); int result = 0; @@ -86,13 +89,13 @@ public class SplitController { result += integer; } } - if(result == ids.size()){ - return CrudUtil.deleteHandle(result,ids.size()); - }else{ - return new RestResponse(errInfo,666,new StatusInfo("删除失败","有正在使用中的拆单,不允许进行删除")); + if (result == ids.size()) { + return CrudUtil.deleteHandle(result, ids.size()); + } else { + return new RestResponse(errInfo, 666, new StatusInfo("删除失败", "有正在使用中的拆单,不允许进行删除")); } - }else{ + } else { throw new MyException("缺少必要参数"); } } @@ -100,39 +103,82 @@ public class SplitController { /** * 根据条件修改拆单信息 + * * @param map 待修改数据 * @return */ @PostMapping("/split_edit") - public RestResponse splitEdit(@RequestBody Map map){ - if(map.containsKey("id")){ + public RestResponse splitEdit(@RequestBody Map map) { + if (map.containsKey("id")) { Integer integer = splitUnitService.updateSplitInfo(map); - return CrudUtil.putHandle(1,integer); - }else{ + return CrudUtil.putHandle(1, integer); + } else { throw new MyException("缺少必要参数"); } } @PostMapping("/calcPriceForSplit") - public RestResponse calcPriceForSplit(@RequestBody Map map){ + public RestResponse calcPriceForSplit(@RequestBody Map map) { // 通过物料id与计量单位获取对应拆单信息 SplitInfo splitInfoByMidAndUnit = splitUnitService.findSplitInfoByMidAndUnit(map); - if(splitInfoByMidAndUnit != null){ + if (splitInfoByMidAndUnit != null) { // 如果有拆单信息,获取对应物料的库存记录 List inventoryByMid = materialService.findInventoryByMid(splitInfoByMidAndUnit.getMid()); - if(inventoryByMid.size() > 0){ + if (inventoryByMid.size() > 0) { Inventory inventory = inventoryByMid.get(0); - return new RestResponse(inventory.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfoByMidAndUnit,-1)); + return new RestResponse(inventory.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfoByMidAndUnit, -1)); } - }else{ + } else { Integer mid = ObjectFormatUtil.toInteger(map.get("mid")); List inventoryList = materialService.findInventoryByMid(mid); - if(inventoryList.size() > 0){ + if (inventoryList.size() > 0) { Inventory inventory = inventoryList.get(0); return new RestResponse(inventory.getPrice()); } } return new RestResponse(0); } + + + /** + * 用于查找当前禁用的拆单是否正在使用 + * + * @param map + * @return + */ + @PostMapping("/findAllSplitInfoForbidden") + public RestResponse findAllSplitInfoForbidden(@RequestBody Map map) { + if (map.containsKey("id")) { + // 获取当前要禁用的拆单 + Integer sid = ObjectFormatUtil.toInteger(map.get("id")); + // 判断当前拆单是否可以禁用 + boolean sonSplitInfoByParentId = findSonSplitInfoByParentId(sid, true); + return new RestResponse(sonSplitInfoByParentId); + + } else { + throw new MyException("缺少必要参数"); + } + } + + /** + * 获取当前拆单的子拆单 + * @param parentId 待查询父级id + * @param flag 标志位 + * @return + */ + boolean findSonSplitInfoByParentId(Integer parentId,boolean flag){ + // 获取当前的子拆单 + SplitInfo splitInfoByParentId = splitUnitService.findSplitInfoByParentId(parentId); + boolean allSplitInfoForbidden = splitUnitService.findAllSplitInfoForbidden(parentId); + if(splitInfoByParentId == null){ + // 如果不存在 + return allSplitInfoForbidden; + }else{ + // 如果存在 + + // 获取当前拆单是否可以禁用 + return findSonSplitInfoByParentId(splitInfoByParentId.getId(),flag && allSplitInfoForbidden); + } + } } diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.xml b/src/main/java/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.xml index 7a2075b6..0d09b54d 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.xml @@ -86,7 +86,7 @@ select from `split` s - where s.mid = #{mid} + where s.mid = #{mid} and s.state = 1 diff --git a/src/main/java/com/dreamchaser/depository_manage/service/SplitUnitService.java b/src/main/java/com/dreamchaser/depository_manage/service/SplitUnitService.java index a9ae27fd..27231009 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/SplitUnitService.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/SplitUnitService.java @@ -148,4 +148,12 @@ public interface SplitUnitService { * @return */ SplitInfo findSplitInfoByParentId(Integer parentId); + + + /** + * 用于查找当前拆单是否正在使用 + * @param sid 待查询id + * @return + */ + boolean findAllSplitInfoForbidden(Integer sid); } diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java index f86030ea..0af298f5 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java @@ -437,7 +437,7 @@ public class MaterialServiceImpl implements MaterialService { /** * 根据套餐详情获取其在对应仓库中的库存数 * - * @param groupInfo 套餐详情 + * @param groupInfo 套餐详情 * @param depositoryList 待查询的仓库 * @return */ @@ -451,7 +451,7 @@ public class MaterialServiceImpl implements MaterialService { // 定义参数列表 Map map = new HashMap<>(); map.put("mid", groupInfo.getMid()); - if("-1".equals(unit)) { + if ("-1".equals(unit)) { // 如果是基础单位 for (Depository depository : depositoryList) { map.put("did", depository.getId()); @@ -462,17 +462,17 @@ public class MaterialServiceImpl implements MaterialService { result.add(0); } } - }else{ + } else { // 如果不是基础单位 - map.put("newUnit",unit); + map.put("newUnit", unit); // 获取当前拆单单位 SplitInfo splitInfo = splitUnitMapper.findSplitInfoByMidAndUnit(map); // 获取当前拆单单位与基础单位的进制 - int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo,-1); + int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1); // 用户获取对应拆单库存记录 - Map paramForSplitInventory = new HashMap<>(); - paramForSplitInventory.put("sid",splitInfo.getId()); + Map paramForSplitInventory = new HashMap<>(); + paramForSplitInventory.put("sid", splitInfo.getId()); for (Depository depository : depositoryList) { Integer quantity = 0; @@ -962,12 +962,16 @@ public class MaterialServiceImpl implements MaterialService { public MaterialAndBarCode findMaterialByBarCode(String barCode) { Map map = new HashMap<>(); map.put("barCode", barCode); - map.put("codeFlag",1); + map.put("codeFlag", 1); List materialByBarCodeByCondition = materialMapper.findMaterialByBarCodeByCondition(map); + MaterialAndBarCode materialAndBarCode = null; if (materialByBarCodeByCondition.size() > 0) { - return materialByBarCodeByCondition.get(0); + materialAndBarCode = materialByBarCodeByCondition.get(0); + }else{ + map.put("qrCode",barCode); + materialAndBarCode = materialMapper.findMaterialAndBarCodeByQrCode(map); } - return null; + return materialAndBarCode; } /** @@ -1002,8 +1006,16 @@ public class MaterialServiceImpl implements MaterialService { @Override public MaterialAndBarCode findMaterialByBarCodeByBarCodeAndDepositoryId(Map map) { List materialByBarCodeByCondition = materialMapper.findMaterialByBarCodeByCondition(map); + MaterialAndBarCode materialAndBarCode = null; if (materialByBarCodeByCondition.size() > 0) { - MaterialAndBarCode materialAndBarCode = materialByBarCodeByCondition.get(0); + materialAndBarCode = materialByBarCodeByCondition.get(0); + + } else { + map.put("qrCode", map.get("barCode")); + materialAndBarCode = materialMapper.findMaterialAndBarCodeByQrCode(map); + + } + if (materialAndBarCode != null) { if (materialAndBarCode.getIid() != null) { Inventory inventoryByMid = materialMapper.findInventoryById(materialAndBarCode.getIid()); if (inventoryByMid != null) { @@ -1014,9 +1026,8 @@ public class MaterialServiceImpl implements MaterialService { } else { materialAndBarCode.setPrice(0.0); } - return materialAndBarCode; } - return null; + return materialAndBarCode; } /** @@ -1074,7 +1085,16 @@ public class MaterialServiceImpl implements MaterialService { */ @Override public String findMaterialCodeByQrCode(String qrCode) { - return qrCodeMapper.findMaterialCodeByQrCode(qrCode); + String code = qrCodeMapper.findMaterialCodeByQrCode(qrCode); + if(code == null){ + Map map = new HashMap<>(); + map.put("qrCode",qrCode); + MaterialAndBarCode materialAndBarCodeByQrCode = materialMapper.findMaterialAndBarCodeByQrCode(map); + if(materialAndBarCodeByQrCode != null){ + code = materialAndBarCodeByQrCode.getMcode(); + } + } + return code; } /** @@ -1418,30 +1438,30 @@ public class MaterialServiceImpl implements MaterialService { // 定义进制时算法需要的参数 - Map paramForNewMap = new HashMap<>(); - paramForNewMap.put("mid",inventoryByMid.getMid()); - paramForNewMap.put("price",String.valueOf(inventoryByMid.getPrice() / 100)); - paramForNewMap.put("unit",unit); - paramForNewMap.put("depositoryId",map.get("depositoryId")); - paramForNewMap.put("placeId",toPlace.getId()); + Map paramForNewMap = new HashMap<>(); + paramForNewMap.put("mid", inventoryByMid.getMid()); + paramForNewMap.put("price", String.valueOf(inventoryByMid.getPrice() / 100)); + paramForNewMap.put("unit", unit); + paramForNewMap.put("depositoryId", map.get("depositoryId")); + paramForNewMap.put("placeId", toPlace.getId()); if (pidAndMidForAfter != null) { - // 如果转移后的当前库位存在该物料 + // 如果转移后的当前库位存在该物料 // 获取转移之后的拆单库存记录 paramForSplitInventory.put("iid", pidAndMidForAfter.getId()); // 转移之后的拆单库存记录 SplitInventory splitInventoryForAfter = splitUnitMapper.findSplitInventoryByIidAndSid(paramForSplitInventory); - if(splitInventoryForAfter != null ){ + if (splitInventoryForAfter != null) { // 如果转移后的拆单库存记录不为空 // 获取当前转移后的总数 int realQuantity = splitInventoryForAfter.getSaveQuantity() + quantity; - if(realQuantity >= splitInfo.getQuantity()) { + if (realQuantity >= splitInfo.getQuantity()) { // 如果当前转移后的总数大于进制数 // 获取当前进行进位的数 - int dispose = (int)Math.floor(realQuantity / (double)splitInfo.getQuantity()); + int dispose = (int) Math.floor(realQuantity / (double) splitInfo.getQuantity()); // 获取进位后当前入库的数量 realQuantity = realQuantity - dispose * splitInfo.getQuantity(); // 设置当前库存数量 @@ -1451,21 +1471,20 @@ public class MaterialServiceImpl implements MaterialService { // 修改库存记录 splitUnitMapper.updateSplitInventory(splitInventoryForAfter); - if(splitInfo.getParentId() != null){ + if (splitInfo.getParentId() != null) { // 获取当前父级 SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfo.getParentId()); - splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo,dispose,pidAndMidForAfter.getId(),paramForNewMap,quantity,splitInfo); - } - else{ + splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, dispose, pidAndMidForAfter.getId(), paramForNewMap, quantity, splitInfo); + } else { paramForNewMap.put("price", Double.toString(inventoryByMid.getPrice() / 100)); - paramForNewMap.put("realQuantity",String.valueOf(dispose)); - paramForNewMap.put("quantity",String.valueOf(dispose)); + paramForNewMap.put("realQuantity", String.valueOf(dispose)); + paramForNewMap.put("quantity", String.valueOf(dispose)); depositoryRecordService.applicationInPlace(paramForNewMap); depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(paramForNewMap.get("id"))); } // 调用新算法 - }else{ + } else { // 如果不大于进制数 @@ -1476,47 +1495,45 @@ public class MaterialServiceImpl implements MaterialService { // 修改库存数量 splitUnitMapper.updateSplitInventory(splitInventoryForAfter); } - } - else{ + } else { // 如果不存在转移后的拆单库存记录 // 定义用于添加拆单库存记录 - Map insertForSplitInventory = new HashMap<>(); - insertForSplitInventory.put("sid",splitInfo.getId()); - insertForSplitInventory.put("outQuantity",0); - insertForSplitInventory.put("iid",pidAndMidForAfter.getId()); - if(quantity >= splitInfo.getQuantity()){ + Map insertForSplitInventory = new HashMap<>(); + insertForSplitInventory.put("sid", splitInfo.getId()); + insertForSplitInventory.put("outQuantity", 0); + insertForSplitInventory.put("iid", pidAndMidForAfter.getId()); + if (quantity >= splitInfo.getQuantity()) { // 如果转移的数量大于进制数 // 获取进制数 - int dispose = (int) Math.floor(quantity / (double)splitInfo.getQuantity()); + int dispose = (int) Math.floor(quantity / (double) splitInfo.getQuantity()); // 获取当前进行入库的数量 int realQuantity = quantity - dispose * splitInfo.getQuantity(); // 如果不大于 - insertForSplitInventory.put("saveQuantity",realQuantity); - insertForSplitInventory.put("inQuantity",realQuantity); + insertForSplitInventory.put("saveQuantity", realQuantity); + insertForSplitInventory.put("inQuantity", realQuantity); splitUnitMapper.addSplitInventory(insertForSplitInventory); - if(splitInfo.getParentId() != null){ + if (splitInfo.getParentId() != null) { // 获取当前父级 SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfo.getParentId()); - splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo,dispose,pidAndMidForAfter.getId(),paramForNewMap,quantity,splitInfo); - }else{ + splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, dispose, pidAndMidForAfter.getId(), paramForNewMap, quantity, splitInfo); + } else { paramForNewMap.put("price", Double.toString(inventoryByMid.getPrice() / 100)); - paramForNewMap.put("realQuantity",String.valueOf(dispose)); - paramForNewMap.put("quantity",String.valueOf(dispose)); + paramForNewMap.put("realQuantity", String.valueOf(dispose)); + paramForNewMap.put("quantity", String.valueOf(dispose)); depositoryRecordService.applicationInPlace(paramForNewMap); depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(paramForNewMap.get("id"))); } - }else{ + } else { // 如果不大于 - insertForSplitInventory.put("saveQuantity",quantity); - insertForSplitInventory.put("inQuantity",quantity); + insertForSplitInventory.put("saveQuantity", quantity); + insertForSplitInventory.put("inQuantity", quantity); splitUnitMapper.addSplitInventory(insertForSplitInventory); } } - } - else{ + } else { // 如果转移后的当前库位不存在该物料 @@ -1528,44 +1545,42 @@ public class MaterialServiceImpl implements MaterialService { // 添加对应关系 placeService.addMaterialOnPlace(insertForAfter); - Map insertForSplitInventory = new HashMap<>(); - insertForSplitInventory.put("sid",splitInfo.getId()); - insertForSplitInventory.put("iid",insertForAfter.get("id")); - insertForSplitInventory.put("outQuantity",0); - if(quantity >= splitInfo.getQuantity()){ + Map insertForSplitInventory = new HashMap<>(); + insertForSplitInventory.put("sid", splitInfo.getId()); + insertForSplitInventory.put("iid", insertForAfter.get("id")); + insertForSplitInventory.put("outQuantity", 0); + if (quantity >= splitInfo.getQuantity()) { // 如果当前转移的数量大于进制数 // 获取进位数量 - int dispose = (int)Math.floor(quantity / (double)splitInfo.getQuantity()); + int dispose = (int) Math.floor(quantity / (double) splitInfo.getQuantity()); // 获取当前入库数量 int realQuantity = quantity - dispose * splitInfo.getQuantity(); - insertForSplitInventory.put("saveQuantity",realQuantity); - insertForSplitInventory.put("inQuantity",realQuantity); + insertForSplitInventory.put("saveQuantity", realQuantity); + insertForSplitInventory.put("inQuantity", realQuantity); splitUnitMapper.addSplitInventory(insertForSplitInventory); - if(splitInfo.getParentId() != null){ + if (splitInfo.getParentId() != null) { // 获取当前父级 SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfo.getParentId()); - splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo,dispose,ObjectFormatUtil.toInteger(insertForSplitInventory.get("id")),paramForNewMap,quantity,splitInfo); - }else{ + splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, dispose, ObjectFormatUtil.toInteger(insertForSplitInventory.get("id")), paramForNewMap, quantity, splitInfo); + } else { paramForNewMap.put("price", Double.toString(inventoryByMid.getPrice() / 100)); - paramForNewMap.put("realQuantity",String.valueOf(dispose)); - paramForNewMap.put("quantity",String.valueOf(dispose)); + paramForNewMap.put("realQuantity", String.valueOf(dispose)); + paramForNewMap.put("quantity", String.valueOf(dispose)); depositoryRecordService.applicationInPlace(paramForNewMap); depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(paramForNewMap.get("id"))); } - }else{ + } else { // 如果不大于进制数 - insertForSplitInventory.put("saveQuantity",quantity); - insertForSplitInventory.put("inQuantity",quantity); + insertForSplitInventory.put("saveQuantity", quantity); + insertForSplitInventory.put("inQuantity", quantity); splitUnitMapper.addSplitInventory(insertForSplitInventory); } - - } } @@ -2447,22 +2462,23 @@ public class MaterialServiceImpl implements MaterialService { /** * 用于将当前二维码转为条形码 + * * @param map 具体转换数据 * @return */ @Override public Integer qrCodeToBarCode(Map map) { MaterialAndBarCode materialAndBarCodeByQrCode = materialMapper.findMaterialAndBarCodeByQrCode(map); - if(materialAndBarCodeByQrCode != null){ + if (materialAndBarCodeByQrCode != null) { // 如果当前存在记录 // 设置要修改的id - map.put("id",materialAndBarCodeByQrCode.getId()); + map.put("id", materialAndBarCodeByQrCode.getId()); // 将其改为条码 - map.put("flag",1); + map.put("flag", 1); - return materialMapper.updateQrCodeAndMaterial(map); - }else{ + return materialMapper.updateQrCodeAndMaterial(map); + } else { // 如果不存在记录 return -1; @@ -2471,22 +2487,23 @@ public class MaterialServiceImpl implements MaterialService { /** * 用于将当前条形码转为二维码 + * * @param map 具体转换数据 * @return */ @Override public Integer barCodeToQrCode(Map map) { MaterialAndBarCode materialAndBarCodeByQrCode = materialMapper.findMaterialAndBarCodeByQrCode(map); - if(materialAndBarCodeByQrCode != null){ + if (materialAndBarCodeByQrCode != null) { // 如果当前存在记录 // 设置要修改的id - map.put("id",materialAndBarCodeByQrCode.getId()); + map.put("id", materialAndBarCodeByQrCode.getId()); // 将其改为二维码 - map.put("flag",2); + map.put("flag", 2); - return materialMapper.updateQrCodeAndMaterial(map); - }else{ + return materialMapper.updateQrCodeAndMaterial(map); + } else { // 如果不存在记录 return -1; diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/SplitUnitServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/SplitUnitServiceImpl.java index 8f0d3e0d..b3a8a4a1 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/SplitUnitServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/SplitUnitServiceImpl.java @@ -488,6 +488,25 @@ public class SplitUnitServiceImpl implements SplitUnitService { return splitUnitMapper.findSplitInfoByParentId(parentId); } + /** + * 用于查找当前拆单是否正在使用 + * @param sid 待查询id + * @return + */ + @Override + public boolean findAllSplitInfoForbidden(Integer sid) { + // 获取当前拆单记录所拥有的库存记录 + List splitInventoryBySid = splitUnitMapper.findSplitInventoryBySid(sid); + for (SplitInventory splitInventory : + splitInventoryBySid) { + if (Integer.compare(splitInventory.getOutQuantity(), 0) != 0) { + // 如果当前库存还未使用完成 + return false; + } + } + return true; + } + /** * 用于拆单库存处理记录的修改 * @@ -763,7 +782,7 @@ public class SplitUnitServiceImpl implements SplitUnitService { } /** - * 根据物料id查询对应的拆单记录 + * 根据物料id查询对应的拆单记录(启用中) * * @param mid 待查询物料id * @return diff --git a/src/main/resources/static/js/JcPrinter/index_Demo.js b/src/main/resources/static/js/JcPrinter/index_Demo.js index 8cd7c3fb..397afc85 100644 --- a/src/main/resources/static/js/JcPrinter/index_Demo.js +++ b/src/main/resources/static/js/JcPrinter/index_Demo.js @@ -70,8 +70,10 @@ var app = new Vue({ formLabelWidth: "120px", options: [], tags: [], + isBarCode:false, isInit: false, - versionInit:false, + versionInit: false, + isVersion:false, isInitApi: false, isDraw: false, isEditTag: false, @@ -118,7 +120,7 @@ var app = new Vue({ // 初始化型号 DrawLableVersionTextParam: { "x": 10.0, - "y": 10.0, + "y": 8.0, "height": 10, "width": 50, "value": document.getElementById("version").value, @@ -207,7 +209,8 @@ var app = new Vue({ mounted() { // 初始化打印服务 let instance = getInstance(); - if(!instance){ + if (!instance) { + // 如果失败 this.$alert('初始化打印服务失败,请重试', '提示', { confirmButtonText: '确定', callback: action => { @@ -217,66 +220,6 @@ var app = new Vue({ } }); } - else{ - getAllPrinters((data) => { - // 返回值规范化 - let arrParse = JSON.parse(JSON.stringify(data)); - if (!arrParse.resultAck.result) { - this.$alert('打印机获取失败,请重试', '提示', { - confirmButtonText: '确定', - callback: action => { - // 关闭当前页 - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); - } - }); - } else if (isJSON(arrParse.resultAck.info)) { - // 如果成功获取 - - - // 当前的所有打印设备 - allPrinters = JSON.parse(arrParse.resultAck.info); - // 所有名称 - let allPrintersName = Object.keys(allPrinters); - // 所有对应值 - let allPrintersValue = Object.values(allPrinters); - // 用于存储当前下拉框列表 - this.options = []; - // 将其保存到数据中供前端展示 - for (i = 0; i < allPrintersName.length; i++) { - // 设置新对象 - let newopt = {}; - // 设置标题 - newopt.label = allPrintersName[i]; - // 设置值 - newopt.value = allPrintersValue[i]; - // 添加对象 - this.options.push(newopt) - } - // 选中打印机(默认选中第一个) - selectPrinter(allPrintersName[0], parseInt(allPrintersValue[0]), (data => { - // 设置sdk状态为true - initSdkStatus = true; - // 返回值规范化 - var arrParse = JSON.parse(JSON.stringify(data)); - if (!arrParse.resultAck.result) { - // 如果失败 - this.$alert('打印设备连接失败,请重试', '提示', { - confirmButtonText: '确定', - callback: action => { - // 关闭当前页 - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); - } - }); - } else if (isJSON(arrParse.resultAck.info)) { - //选择成功,打印机连接成功 - console.log(data) - } - })) - } - }) - } }, methods: { // sdk重新初始化 @@ -314,7 +257,16 @@ var app = new Vue({ getAllPrinters(data => { // 返回结果规范化 let arrParse = JSON.parse(JSON.stringify(data)); - if (isJSON(arrParse.resultAck.info)) { + if (!arrParse.resultAck.result || arrParse.resultAck.result === 'false') { + this.$alert('打印机获取失败,请重试', '提示', { + confirmButtonText: '确定', + callback: action => { + // 关闭当前页 + var index = parent.layer.getFrameIndex(window.name); + parent.layer.close(index); + } + }); + } else if (isJSON(arrParse.resultAck.info)) { // 获取所有打印设备 allPrinters = JSON.parse(arrParse.resultAck.info); // 所有设备名称 @@ -337,7 +289,7 @@ var app = new Vue({ selectPrinter(allPrintersName[0], parseInt(allPrintersValue[0]), (data => { // 返回结果规范化 var arrParse = JSON.parse(JSON.stringify(data)); - if (!arrParse.resultAck.result) { + if (!arrParse.resultAck.result || arrParse.resultAck.result === 'false') { this.$alert('打印设备选择失败,请重试', '提示', { confirmButtonText: '确定', callback: action => { @@ -432,8 +384,8 @@ var app = new Vue({ } else { // 展示生成按钮 this.isInit = true; - let version = $("#version").val() - if("noMaterial" !== version){ + let version = $("#version").val(); + if ("noMaterial" !== version) { this.versionInit = true; } } @@ -479,16 +431,16 @@ var app = new Vue({ this.DrawLableVersionTextParam.fontSize = Number(this.DrawLableVersionTextParam.fontSize); this.DrawLableVersionTextParam.textAlignHorizonral = Number(this.DrawLableVersionTextParam.textAlignHorizonral); this.DrawLableVersionTextParam.lineSpacing = Number(this.DrawLableVersionTextParam.lineSpacing); - DrawLableText(this.DrawLableVersionTextParam, res => { - var arrParse = JSON.parse(JSON.stringify(res)); - //⼀维码绘制失败,退出绘制 - if (arrParse.resultAck.result !== 0) { - this.$message({ // 发起提示 - message: '绘制失败,请重试', - type: 'warning' - }); - } - }); + DrawLableText(this.DrawLableVersionTextParam, res => { + var arrParse = JSON.parse(JSON.stringify(res)); + //⼀维码绘制失败,退出绘制 + if (arrParse.resultAck.result !== 0) { + this.$message({ // 发起提示 + message: '绘制失败,请重试', + type: 'warning' + }); + } + }); this.DrawLableVersionTextParam.name = "型号"; if (this.isEditTag) { this.$set(this.tags, this.editIndex, this.DrawLableVersionTextParam); @@ -496,6 +448,7 @@ var app = new Vue({ this.tags.push(this.DrawLableVersionTextParam) } this.dialogDrawLableVersionTextParam = false; + this.isVersion = true; this.isDraw = true }, // 一维码 @@ -504,42 +457,17 @@ var app = new Vue({ this.DrawLableBarCodeParam.height = Number(this.DrawLableBarCodeParam.height); this.DrawLableBarCodeParam.x = Number(this.DrawLableBarCodeParam.x); this.DrawLableBarCodeParam.y = Number(this.DrawLableBarCodeParam.y); - if(this.versionInit){ - this.DrawLableBarCodeParam.y = Number(this.DrawLableBarCodeParam.y) + 10; + this.DrawLableBarCodeParam.textHeight = Number(this.DrawLableBarCodeParam.textHeight); + if (this.isVersion) { + this.DrawLableBarCodeParam.y = Number(this.DrawLableBarCodeParam.y) + (Number(this.DrawLableVersionTextParam.y) * 0.8); } this.DrawLableBarCodeParam.name = "条形码"; - // 发送请求将其变成条形码 - let req = {}; - req.qrCode = this.DrawLableBarCodeParam.value; - req.mcode = $("#materialCode").val(); - req.type = "qTb"; - $.ajax({ - url: "/material/updateQrCodeType", - type: "post", - dataType: "json", - data: JSON.stringify(req), - contentType: "application/json;charset=utf-8", - success: result => { - - DrawLableBarCode(this.DrawLableBarCodeParam, res => { - var arrParse = JSON.parse(JSON.stringify(res)); - //⼀维码绘制失败,退出绘制 - if (arrParse.resultAck.result !== 0) { - this.$message({ // 发起提示 - message: '绘制失败,请重试', - type: 'warning' - }); - } - }); - - - } - }); if (this.isEditTag) { this.$set(this.tags, this.editIndex, this.DrawLableBarCodeParam); } else { this.tags.push(this.DrawLableBarCodeParam) } + this.isBarCode = true; this.dialogDrawLableBarCodeParam = false; this.isDraw = true }, @@ -551,39 +479,17 @@ var app = new Vue({ this.DrawLableQrCodeParam.x = Number(this.DrawLableQrCodeParam.x); this.DrawLableQrCodeParam.y = Number(this.DrawLableQrCodeParam.y); this.DrawLableQrCodeParam.name = "二维码"; - let req = {}; - req.qrCode = this.DrawLableQrCodeParam.value; - req.mcode = $("#materialCode").val(); - req.type = "bTq"; - $.ajax({ - url: "/material/updateQrCodeType", - type: "post", - dataType: "json", - data: JSON.stringify(req), - contentType: "application/json;charset=utf-8", - success: result => { - - DrawLableQrCode(this.DrawLableQrCodeParam, res => { - var arrParse = JSON.parse(JSON.stringify(res)); - //⼀维码绘制失败,退出绘制 - if (arrParse.resultAck.result !== 0) { - this.$message({ // 发起提示 - message: '绘制失败,请重试', - type: 'warning' - }); - } - }); - - - } - }); + if (this.isVersion) { + this.DrawLableQrCodeParam.y = Number(this.DrawLableQrCodeParam.y) + (Number(this.DrawLableVersionTextParam.y) * 0.8); + } if (this.isEditTag) { this.$set(this.tags, this.editIndex, this.DrawLableQrCodeParam); } else { this.tags.push(this.DrawLableQrCodeParam) } this.dialogDrawLableQrCodeParam = false; - this.isDraw = true + this.isDraw = true; + this.isBarCode = false; }, DragList(List) { List.forEach(res => { @@ -704,40 +610,19 @@ var app = new Vue({ }); return; } - // 为了防止打印时未生成对应图像事先初始化 // 初始化画板 - InitDrawingBoard(this.InitDrawingBoardParam, (data1 => { - - - if (this.dialogDrawLableBarCodeParam) { - // 如果打印条形码 - - this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam,(data)=>{ - if(this.versionInit){ - this.DrawLableTextVersionNameApiDemo(this.DrawLableVersionTextParam,(data)=>{ - this.DrawLableBarCodeApiDemo(this.DrawLableBarCodeParam, (data => { - // 提交数据 - var totalCount = parseInt(pageCount) * parseInt(quantityCount); - startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) { - bCanclePrint = false; - var arrParse = JSON.parse(JSON.stringify(data)); - if (arrParse.resultAck.result !== 0) { - self.$message({ - message: '打印失败!', - type: 'warning' - }); - return; - } - var intPageCount = parseInt(pageCount); - var intQuantityCount = parseInt(quantityCount); - self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); - }); - })) - }) - }else{ + + if (this.isBarCode) { + // 如果打印条形码 + + + if (this.isVersion) { + InitDrawingBoard(this.InitDrawingBoardParam, (data1 => { + this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam, (data => { + this.DrawLableTextVersionNameApiDemo(this.DrawLableVersionTextParam, (data => { this.DrawLableBarCodeApiDemo(this.DrawLableBarCodeParam, (data => { // 提交数据 var totalCount = parseInt(pageCount) * parseInt(quantityCount); @@ -756,35 +641,15 @@ var app = new Vue({ self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); }); })) - } - - }) + })) + })) + })) } else { - // 如果打印二维码 - this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam,(data)=>{ - if(this.versionInit){ - this.DrawLableTextVersionNameApiDemo(this.DrawLableVersionTextParam,(data)=>{ - this.DrawLableQrCodeApiDemo(this.DrawLableBarCodeParam, (data => { - // 提交数据 - var totalCount = parseInt(pageCount) * parseInt(quantityCount); - startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) { - bCanclePrint = false; - var arrParse = JSON.parse(JSON.stringify(data)); - if (arrParse.resultAck.result !== 0) { - self.$message({ - message: '打印失败!', - type: 'warning' - }); - return; - } - var intPageCount = parseInt(pageCount); - var intQuantityCount = parseInt(quantityCount); - self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); - }); - })) - }) - }else{ - this.DrawLableQrCodeApiDemo(this.DrawLableBarCodeParam, (data => { + // 不打印型号 + + InitDrawingBoard(this.InitDrawingBoardParam, (data1 => { + this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam, (data => { + this.DrawLableBarCodeApiDemo(this.DrawLableBarCodeParam, (data => { // 提交数据 var totalCount = parseInt(pageCount) * parseInt(quantityCount); startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) { @@ -802,12 +667,65 @@ var app = new Vue({ self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); }); })) - } - - }) + })) + })) + } + } + else { + // 如果打印二维码 + + if (this.isVersion) { + InitDrawingBoard(this.InitDrawingBoardParam, (data1 => { + this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam, (data => { + this.DrawLableTextVersionNameApiDemo(this.DrawLableVersionTextParam, (data => { + this.DrawLableQrCodeApiDemo(this.DrawLableBarCodeParam, (data => { + // 提交数据 + var totalCount = parseInt(pageCount) * parseInt(quantityCount); + startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) { + bCanclePrint = false; + var arrParse = JSON.parse(JSON.stringify(data)); + if (arrParse.resultAck.result !== 0) { + self.$message({ + message: '打印失败!', + type: 'warning' + }); + return; + } + var intPageCount = parseInt(pageCount); + var intQuantityCount = parseInt(quantityCount); + self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); + }); + })) + })) + })) + })) + } + else { + InitDrawingBoard(this.InitDrawingBoardParam, (data1 => { + this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam, (data => { + this.DrawLableQrCodeApiDemo(this.DrawLableQrCodeParam, (data => { + // 提交数据 + var totalCount = parseInt(pageCount) * parseInt(quantityCount); + startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) { + bCanclePrint = false; + var arrParse = JSON.parse(JSON.stringify(data)); + if (arrParse.resultAck.result !== 0) { + self.$message({ + message: '打印失败!', + type: 'warning' + }); + return; + } + var intPageCount = parseInt(pageCount); + var intQuantityCount = parseInt(quantityCount); + self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); + }); + })) + })) + })) } - })) + } }, @@ -857,52 +775,68 @@ var app = new Vue({ pageIndex++; setTimeout(function () { // 初始化画板 - InitDrawingBoard(self.InitDrawingBoardParam, (data1 => { - if (this.dialogDrawLableBarCodeParam) { - // 添加名称 - self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam,(data)=>{ - if(self.versionInit){ - // 如果绘制型号 + if (this.isBarCode) { + // 如果绘制条形码 + + + if (self.isVersion) { + // 如果绘制型号 + + InitDrawingBoard(self.InitDrawingBoardParam, (data1 => { + self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam, (data => { // 添加型号 - self.DrawLableTextVersionNameApiDemo(self.DrawLableVersionTextParam,(data)=>{ + self.DrawLableTextVersionNameApiDemo(self.DrawLableVersionTextParam, (data => { self.DrawLableBarCodeApiDemo(self.DrawLableBarCodeParam, (data => { self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount); })) - }) - }else{ - // 如果不绘制型号 + })) + })) + })) + } else { + // 如果不绘制型号 + + InitDrawingBoard(self.InitDrawingBoardParam, (data1 => { + self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam, (data => { self.DrawLableBarCodeApiDemo(self.DrawLableBarCodeParam, (data => { self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount); })) - } + })) + })) + } - }) + } + else { + // 如果绘制二维码 - } else { - // 添加名称 - self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam,(data)=>{ - // 如果绘制型号 - if(self.versionInit){ + // 如果绘制型号 + if (self.isVersion) { + InitDrawingBoard(self.InitDrawingBoardParam, (data1 => { + self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam, (data => { // 添加型号 - self.DrawLableTextVersionNameApiDemo(self.DrawLableVersionTextParam,(data)=>{ + self.DrawLableTextVersionNameApiDemo(self.DrawLableVersionTextParam, (data => { self.DrawLableQrCodeApiDemo(self.DrawLableQrCodeParam, (data => { self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount); })) - }) - }else{ - // 如果不绘制型号 + })) + })) + })) + } + else { + // 如果不绘制型号 + InitDrawingBoard(self.InitDrawingBoardParam, (data1 => { + self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam, (data => { self.DrawLableQrCodeApiDemo(self.DrawLableQrCodeParam, (data => { self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount); })) - } - - }) - + })) + })) } - }))// 提交数据 + + } + // 提交数据 }, 500); } }); diff --git a/src/main/resources/static/js/JcPrinter/jcPrinterSdk_api_third.js b/src/main/resources/static/js/JcPrinter/jcPrinterSdk_api_third.js index 7f2d34f9..a95cade6 100644 --- a/src/main/resources/static/js/JcPrinter/jcPrinterSdk_api_third.js +++ b/src/main/resources/static/js/JcPrinter/jcPrinterSdk_api_third.js @@ -7,18 +7,20 @@ var ackJsonData; /** websocket(打印服务)连接状态*/ var websocketConnectStatus = false; /**SDK初始化状态 */ -var initSdkStatus = false; +var initSdkStatus =false; /**设备状态 */ -var deviceStatus = false; +var deviceStatus =false; /**消息列表 */ var MessageList = {}; /**通过websocket发送消息 */ function sendMsg(msg, callback) { - //console.log('sendMsg', msg.apiName); + // console.log('sendMsg', msg.apiName); MessageList[msg.apiName] = callback; + var data = JSON.stringify(msg); var tryTimes = 10; + for (var i = 0; i < tryTimes; i++) { if (g_websocket.readyState === 1) { g_websocket.send(data); @@ -33,23 +35,15 @@ function getInstance() { if ('WebSocket' in window) { g_websocket = websocketLifePeriod(); } else { - this.$alert('不支持websocket,请重试', '提示', { - confirmButtonText: '确定', - callback: action => { - // 关闭当前页 - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); - //return false; - g_websocket = null; - return false; - } - }); + console.log('unsupported websocket'); + //return false; + g_websocket = null; + return false; } - //保持在线(开启定时任务,每3秒执行一次) + //保持在线 setInterval(function () { if (g_websocket.readyState === 2 || g_websocket.readyState === 3) { - // 如果等待或者断开 getInstance(); } }, 3000); @@ -60,10 +54,9 @@ function getInstance() { //1.1.1 打开链接及回调 function websocketLifePeriod() { - let websocket; - // 37989端口为jcPrinter.exe使用的端口 + var websocket; websocket = new WebSocket('ws://127.0.0.1:37989'); - websocket.binaryType = 'arraybuffer'; + //websocket.binaryType = 'arraybuffer'; websocket.onerror = function (evt) {//since there is an error, sockets will close so... sok.onclose = function (e) { console.log("WebSocket Error: ", e); @@ -89,16 +82,14 @@ function websocketLifePeriod() { //1.1.2 websocket连接回调 function connectCallback(e) { ackJsonData = ''; - console.log('websocket connect success'); - // 设置连接状态为true - websocketConnectStatus = true; - // 初始化 + console.log('success'); + websocketConnectStatus=true; init(); } //1.1.3 关闭连接回调 function closeCallback(e) { - websocketConnectStatus = false; + websocketConnectStatus=false; console.log( 'websocket closed: ' + e.code + ' ' + e.reason + ' ' + e.wasClean ); @@ -126,43 +117,43 @@ function readCallback(e) { //接口回调 if (!!MessageList[arrParse.apiName]) { - MessageList[arrParse.apiName](arrParse); } //回调分发 - if (arrParse.apiName === 'printStatus') { - if (arrParse['resultAck']['online'] === 'online') { - deviceStatus = true; - } else { - deviceStatus = false; + if(arrParse.apiName==='printStatus'){ + if(arrParse['resultAck']['online']==='online'){ + deviceStatus=true; + }else{ + deviceStatus=false; } - } else { - if (arrParse['resultAck']['callback'] !== undefined) { + }else{ + if (arrParse['resultAck']['callback'] != undefined) { callbackName = arrParse['resultAck']['callback']['name']; - if (callbackName === 'onConnectSuccess') { + if (callbackName == 'onConnectSuccess') { var printerName = arrParse['resultAck']['callback']['printerName']; onConnectSuccess(printerName); - } else if (callbackName === 'onDisConnect') { + } else if (callbackName == 'onDisConnect') { var printerName = arrParse['resultAck']['callback']['printerName']; onDisConnect(printerName); - } else if (callbackName === 'onCoverStatusChange') { + } else if (callbackName == 'onCoverStatusChange') { var coverStatus = arrParse['resultAck']['callback']['coverStatus']; onCoverStatusChange(coverStatus); - } else if (callbackName === 'onElectricityChange') { + } else if (callbackName == 'onElectricityChange') { var powerLever = arrParse['resultAck']['callback']['powerLever']; onElectricityChange(powerLever); - } else if (callbackName === 'onPaperStatusChange') { + } else if (callbackName == 'onPaperStatusChange') { var paperStatus = arrParse['resultAck']['callback']['paperStatus']; onPaperStatusChange(paperStatus); - } else if (callbackName === 'onPrintPageCompleted') { + } else if (callbackName == 'onPrintPageCompleted') { onPrintPageCompleted(); - } else if (callbackName === 'onPrintProgress') { + } else if (callbackName == 'onPrintProgress') { onPrintProgress(); - } else if (callbackName === 'onAbnormalResponse') { + } else if (callbackName == 'onAbnormalResponse') { onAbnormalResponse(); - } else { + } + else { console.log('unknow callback api!'); } } @@ -171,7 +162,6 @@ function readCallback(e) { ackJsonData = ''; } } - //1.1.5 错误回调 function errorCallback(e) { //如果出现连接、处理、接收、发送数据失败的时候触发onerror事件 @@ -180,77 +170,24 @@ function errorCallback(e) { //封装初始化SDK/获取打印机列表/选择打印机 function init() { - // 初始化sdk initSdk(this.initSdkParam, function (data) { - // 返回值规范化 var arrParse = JSON.parse(JSON.stringify(data)); - if (arrParse.resultAck.result !== 0) { - // 如果初始化失败 - this.$alert('初始化打印服务失败,请重试', '提示', { - confirmButtonText: '确定', - callback: action => { - // 关闭当前页 - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); - } - }); + if (arrParse.resultAck.result != 0) { return; } - // 获取所有打印设备 - getAllPrinters((data) => { - // 返回值规范化 - let arrParse = JSON.parse(JSON.stringify(data)); - if (!arrParse.resultAck.result) { - this.$alert('打印机获取失败,请重试', '提示', { - confirmButtonText: '确定', - callback: action => { - // 关闭当前页 - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); - } - }); - } else if (isJSON(arrParse.resultAck.info)) { - // 如果成功获取 - // 当前的所有打印设备 - allPrinters = JSON.parse(arrParse.resultAck.info); - // 所有名称 + getAllPrinters(function (data) { + var arrParse = JSON.parse(JSON.stringify(data)); + + if (!arrParse.resultAck.result ) { + return; + } else if (isJSON(arrParse.resultAck.info)) { + allPrinters = JSON.parse(arrParse.resultAck.info) let allPrintersName = Object.keys(allPrinters); - // 所有对应值 let allPrintersValue = Object.values(allPrinters); - // 用于存储当前下拉框列表 - this.options = []; - // 将其保存到数据中供前端展示 - for (i = 0; i < allPrintersName.length; i++) { - // 设置新对象 - let newopt = {}; - // 设置标题 - newopt.label = allPrintersName[i]; - // 设置值 - newopt.value = allPrintersValue[i]; - // 添加对象 - this.options.push(newopt) - } - // 选中打印机(默认选中第一个) - selectPrinter(allPrintersName[0], parseInt(allPrintersValue[0]), (data => { - // 设置sdk状态为true - initSdkStatus = true; - // 返回值规范化 - var arrParse = JSON.parse(JSON.stringify(data)); - if (!arrParse.resultAck.result) { - // 如果失败 - this.$alert('打印设备连接失败,请重试', '提示', { - confirmButtonText: '确定', - callback: action => { - // 关闭当前页 - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); - } - }); - } else if (isJSON(arrParse.resultAck.info)) { - //选择成功,打印机连接成功 - console.log(data) - } + + selectPrinter(allPrintersName[0],parseInt(allPrintersValue[0]),(data=>{ + initSdkStatus=true; })) } }) @@ -266,14 +203,14 @@ function unInitPrintInstance() { //2.1 打印机连接成功回调onConnectSuccess function onConnectSuccess(printerName) { console.log('打印机连接成功!'); - initSdkStatus = true; - deviceStatus = true; + initSdkStatus=true; + deviceStatus=true; } //2.2 打印机断开回调onDisConnect function onDisConnect(printerName) { console.log('打印机断开!'); - initSdkStatus = false; + initSdkStatus=false; } //2.3 打印机上盖变化回调onCoverStatusChange @@ -311,7 +248,7 @@ function onAbnormalResponse() { function getAllPrinters(callbackFunction) { //刷新设备时,关闭设备 //closePrinter(); - var jsonObj = {apiName: 'getAllPrinters'}; + var jsonObj = { apiName: 'getAllPrinters' }; var allDevice = {}; sendMsg(jsonObj, callbackFunction); @@ -338,20 +275,20 @@ function picturePrint(base64Data, nPrintCount, bDenoise, callbackFunction) { function selectPrinter(printerName, port, callbackFunction) { var jsonObj = { apiName: 'selectPrinter', - parameter: {printerName: printerName, port: port} + parameter: { printerName: printerName, port: port } }; sendMsg(jsonObj, callbackFunction); } //7.停止打印 function stopPrint(callbackFunction) { - var jsonObj = {apiName: 'stopPrint'}; + var jsonObj = { apiName: 'stopPrint' }; sendMsg(jsonObj, callbackFunction); } //8.关闭打印端口 function closePrinter(callbackFunction) { - var jsonObj = {apiName: 'closePrinter'}; + var jsonObj = { apiName: 'closePrinter' }; sendMsg(jsonObj, callbackFunction); } @@ -360,7 +297,7 @@ function closePrinter(callbackFunction) { function setPrintDensity(nDensity, callbackFunction) { var jsonObj = { apiName: 'setPrintDensity', - parameter: {nDensity: nDensity} + parameter: { nDensity: nDensity } }; sendMsg(jsonObj, callbackFunction); } @@ -368,14 +305,14 @@ function setPrintDensity(nDensity, callbackFunction) { //10.设置打印速度 //nSpeed--范围为getSpeedScopeApi查询的范围 function setPrintSpeed(nSpeed, callbackFunction) { - var jsonObj = {apiName: 'setPrintSpeed', parameter: {nSpeed: nSpeed}}; + var jsonObj = { apiName: 'setPrintSpeed', parameter: { nSpeed: nSpeed } }; sendMsg(jsonObj, callbackFunction); } //11.设置打印标贴类型 //nType--间隙:01,黑标:02,连续纸:03,定位孔:04,透明纸:05,随机打印:06 function setPrintLabelType(nType, callbackFunction) { - var jsonObj = {apiName: 'setPrintLabelType', parameter: {nType: nType}}; + var jsonObj = { apiName: 'setPrintLabelType', parameter: { nType: nType } }; sendMsg(jsonObj, callbackFunction); } @@ -385,14 +322,14 @@ function setPrintLabelType(nType, callbackFunction) { function setPrinterAutoShutDownTime(nType, callbackFunction) { var jsonObj = { apiName: 'setPrinterAutoShutDownTime', - parameter: {nType: nType} + parameter: { nType: nType } }; sendMsg(jsonObj, callbackFunction); } //13.复位打印机 function setPrinterReset(callbackFunction) { - var jsonObj = {apiName: 'setPrinterReset'}; + var jsonObj = { apiName: 'setPrinterReset' }; sendMsg(jsonObj, callbackFunction); } @@ -400,64 +337,64 @@ function setPrinterReset(callbackFunction) { function setPrintPaperPos(nType, callbackFunction) { var jsonObj = { apiName: 'setPrintPaper', - parameter: {nType: nType} + parameter: { nType: nType } }; sendMsg(jsonObj, callbackFunction); } //15.获取打印速度 function getPrintSpeed(callbackFunction) { - var jsonObj = {apiName: 'getPrintSpeed'}; + var jsonObj = { apiName: 'getPrintSpeed' }; sendMsg(jsonObj, callbackFunction); } //15.获取打印机电量 function getPower(callbackFunction) { - var jsonObj = {apiName: 'getPower'}; + var jsonObj = { apiName: 'getPower' }; sendMsg(jsonObj, callbackFunction); } //16.获取标贴类型 function getPrintLabelType(callbackFunction) { - var jsonObj = {apiName: 'getPrintLabelType'}; + var jsonObj = { apiName: 'getPrintLabelType' }; sendMsg(jsonObj, callbackFunction); } //17.获取打印浓度 function getPrintDensity(callbackFunction) { - var jsonObj = {apiName: 'getPrintDensity'}; + var jsonObj = { apiName: 'getPrintDensity' }; sendMsg(jsonObj, callbackFunction); } //18.获取打印机语言 function getPrinterLanguageType(callbackFunction) { - var jsonObj = {apiName: 'getPrinterLanguageType'}; + var jsonObj = { apiName: 'getPrinterLanguageType' }; sendMsg(jsonObj, callbackFunction); } //19.查询关机时间 function getPrinterAutoShutDownTime(callbackFunction) { - var jsonObj = {apiName: 'getPrinterAutoShutDownTime'}; + var jsonObj = { apiName: 'getPrinterAutoShutDownTime' }; sendMsg(jsonObj, callbackFunction); } //20.获取打印机序列号 function getPrinterSn(callbackFunction) { - var jsonObj = {apiName: 'getPrinterSn'}; + var jsonObj = { apiName: 'getPrinterSn' }; sendMsg(jsonObj, callbackFunction); } //21.获取硬件版本 function getPrinterHardwareVersion(callbackFunction) { - var jsonObj = {apiName: 'getPrinterHardwareVersion'}; + var jsonObj = { apiName: 'getPrinterHardwareVersion' }; var responseData = {}; sendMsg(jsonObj, callbackFunction); } //22.获取软件版本 function getPrinterSoftwareVersion(callbackFunction) { - var jsonObj = {apiName: 'getPrinterSoftwareVersion'}; + var jsonObj = { apiName: 'getPrinterSoftwareVersion' }; sendMsg(jsonObj, callbackFunction); } @@ -465,53 +402,53 @@ function getPrinterSoftwareVersion(callbackFunction) { function setPrinterLanguageType(nType, callbackFunction) { var jsonObj = { apiName: 'setPrinterLanguageType', - parameter: {nType: nType} + parameter: { nType: nType } }; sendMsg(jsonObj, callbackFunction); } //24.获取打速度印范围 function getSpeedScope(callbackFunction) { - var jsonObj = {apiName: 'getSpeedScope'}; + var jsonObj = { apiName: 'getSpeedScope' }; sendMsg(jsonObj, callbackFunction); return getResult(5, 'getSpeedScope', 'set printer language timeout!'); } //25. 获取已开启的打印机 function getConnectPrinter(callbackFunction) { - var jsonObj = {apiName: 'getConnectPrinter'}; + var jsonObj = { apiName: 'getConnectPrinter' }; sendMsg(jsonObj, callbackFunction); return getResult(5, 'getConnectPrinter', 'get connect printer timeout!'); } //26.获取打印机型号 function getPrinterType(callbackFunction) { - var jsonObj = {apiName: 'getPrinterType'}; + var jsonObj = { apiName: 'getPrinterType' }; sendMsg(jsonObj, callbackFunction); } //27.获取浓度范围 function getDensityScope(callbackFunction) { - var jsonObj = {apiName: 'getDensityScope'}; + var jsonObj = { apiName: 'getDensityScope' }; sendMsg(jsonObj, callbackFunction); } //28. 获取打印模式 1-热敏 2-热转印 function getPrinterMode(callbackFunction) { - var jsonObj = {apiName: 'getPrintMode'}; + var jsonObj = { apiName: 'getPrintMode' }; sendMsg(jsonObj, callbackFunction); } //29.获取打印机mac地址 function getMacAddress(callbackFunction) { - var jsonObj = {apiName: 'getMacAddress'}; + var jsonObj = { apiName: 'getMacAddress' }; sendMsg(jsonObj, callbackFunction); } //30.设置打印模式 //nType-1热敏,2碳带 function setPrintMode(nType, callbackFunction) { - var jsonObj = {apiName: 'setPrintMode', parameter: {nType: nType}}; + var jsonObj = { apiName: 'setPrintMode', parameter: { nType: nType } }; sendMsg(jsonObj, callbackFunction); } @@ -553,13 +490,13 @@ function commitJob(printData, printerImageProcessingInfo, callbackFunction) { //33.结束打印任务endJob function endJob(callbackFunction) { - var jsonObj = {apiName: 'endJob'}; + var jsonObj = { apiName: 'endJob' }; sendMsg(jsonObj, callbackFunction); } //33.取消打印任务cancleJob function cancleJob(callbackFunction) { - var jsonObj = {apiName: 'stopPrint'}; + var jsonObj = { apiName: 'stopPrint' }; sendMsg(jsonObj, callbackFunction); } @@ -569,9 +506,9 @@ function InitDrawingBoard(json, callbackFunction) { apiName: 'InitDrawingBoard', parameter: json }; - console.log("画布宽度:" + json.width); - console.log("画布高度:" + json.height); - console.log("画布旋转角度:" + json.rotate); + // console.log("宽度:" + json.width) + // console.log("高度:" + json.height) + // console.log("旋转角度:" + json.rotate) sendMsg(jsonObj, callbackFunction); } @@ -651,6 +588,7 @@ function initSdk(json, callbackFunction) { apiName: 'initSdk', parameter: json }; + sendMsg(jsonObj, callbackFunction); } diff --git a/src/main/resources/templates/pages/JcPrinter/PrinterIndex.html b/src/main/resources/templates/pages/JcPrinter/PrinterIndex.html index dfd71864..989a441c 100644 --- a/src/main/resources/templates/pages/JcPrinter/PrinterIndex.html +++ b/src/main/resources/templates/pages/JcPrinter/PrinterIndex.html @@ -12,12 +12,12 @@ -
-

刷新

-
SDK初始化
-
-
+ + + +
@@ -164,6 +164,9 @@ + + + diff --git a/src/main/resources/templates/pages/application/application-in.html b/src/main/resources/templates/pages/application/application-in.html index 4fbfd2c8..ad40691e 100644 --- a/src/main/resources/templates/pages/application/application-in.html +++ b/src/main/resources/templates/pages/application/application-in.html @@ -961,7 +961,7 @@ var req = {}; req.qrCode = result; req.codeFlag = 2; - $("#qrCode" + objIdNumber).val(result); + $("#qrCode" + obj.id.split("qrCodeImg")[1]).val(result); $.ajax({ url: "/material/qywxApplicationInScanQrCode", type: "post", @@ -1051,6 +1051,7 @@ }) } }) + }; @@ -1198,7 +1199,7 @@ parent.wx.scanQRCode({ desc: 'scanQRCode desc', needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果, - scanType: ["qrCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有 + scanType: ["qrCode","barCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有 success: function (res) { // 回调 var result = res.resultStr;//当needResult为1时返回处理结果 diff --git a/src/main/resources/templates/pages/application/application-out.html b/src/main/resources/templates/pages/application/application-out.html index e567a1b7..45f3c558 100644 --- a/src/main/resources/templates/pages/application/application-out.html +++ b/src/main/resources/templates/pages/application/application-out.html @@ -1254,7 +1254,7 @@ // 扫描物料条码 scanBarCode = function (obj) { - parent.wx.scanQRCode({ + parent.wx.scanQRCode({ desc: 'scanQRCode desc', needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果, scanType: ["barCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有 @@ -1325,7 +1325,7 @@ parent.wx.scanQRCode({ desc: 'scanQRCode desc', needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果, - scanType: ["qrCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有 + scanType: ["qrCode","barCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有 success: function (res) { // 回调 var result = res.resultStr;//当needResult为1时返回处理结果 @@ -1467,7 +1467,7 @@ var flag = res.data; if (!flag) { // 如果当前数目不合适 - layer.msg("当前组合中有物料库存数量不足", {icon: 0, time: 500}, function () { + layer.msg("当前组合中"+res.statusInfo.message+"的库存数量不足", {icon: 0, time: 1000}, function () { $("#quantityForGroup" + id).val(""); }); diff --git a/src/main/resources/templates/pages/application/application-out_back.html b/src/main/resources/templates/pages/application/application-out_back.html index 94d7da91..dadd2924 100644 --- a/src/main/resources/templates/pages/application/application-out_back.html +++ b/src/main/resources/templates/pages/application/application-out_back.html @@ -69,12 +69,6 @@ class="layui-input" lay-verify="required"> -
- -
- -
-
@@ -155,20 +149,6 @@ step = layui.step; var temp = {}; temp.mid = $("#mid").val(); - $.ajax({ - url: "/place/findPlaceByMid", - type: "post", - dataType: 'json', - data: JSON.stringify(temp), - contentType: "application/json;charset=utf-8", - success: function (res) { - $('#place').empty(); - $.each(res.data, function (index, item) { - $('#place').append(new Option(item.depositoryName + "-" + item.code, item.id));//往下拉菜单里添加元素 - }); - form.render(); - } - }); $("#code").blur(function () { @@ -190,32 +170,18 @@ $("#mid").val(""); } else { req.mid = d.id; - - $.ajax({ - url: "/place/findPlaceByMid", - type: "post", - dataType: 'json', - data: JSON.stringify(req), - contentType: "application/json;charset=utf-8", - success: function (res) { - $('#place').empty(); - $.each(res.data, function (index, item) { - $('#place').append(new Option(item.depositoryName + "-" + item.code, item.id));//往下拉菜单里添加元素 - }); - $("#unit").empty(); - $("#unit").append(new Option(d.unit, "-1")); - $.each(d.splitInfoList, function (index, item) { - $("#unit").append(new Option(item.newUnit, item.newUnit)); - }); - $("#mname").val(d.mname); - $("#mid").val(d.id); - form.render(); - } + let unitItem = $("#unit"); + unitItem.empty(); + unitItem.append(new Option(d.unit, "-1")); + $.each(d.splitInfoList, function (index, item) { + $("#unit").append(new Option(item.newUnit, item.newUnit)); }); - + $("#mname").val(d.mname); + $("#mid").val(d.id); + form.render(); } } - }); + }) }); $("#mname").blur(function () { @@ -289,7 +255,7 @@ area: ['70%', '70%'], move: '.layui-layer-title', fixed: false, - content: '/selectMaterial?mname='+mname, + content: '/selectMaterial?mname=' + mname, success: function (layero, index) { var children = layero.children(); var content = $(children[1]); diff --git a/src/main/resources/templates/pages/application/application_multi.html b/src/main/resources/templates/pages/application/application_multi.html index 36790085..faf29f1d 100644 --- a/src/main/resources/templates/pages/application/application_multi.html +++ b/src/main/resources/templates/pages/application/application_multi.html @@ -93,8 +93,8 @@ {field: 'code',width: 200,title: '存货编码',sort: true}, {title: '所处位置', width: 200, templet: '#selectLocation', align: "center"}, {field: 'depositoryName', width: 150, title: '仓库名称'}, - {field: 'quantity', width: 150, title: '数量',edit:'quantity'}, {title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, + {field: 'quantity', width: 150, title: '数量',edit:'quantity'}, {field: 'price', width: 150, title: '单价',edit:'price'}, {field: 'applyRemark', width: 150, title: '备注说明',edit:'applyRemark'}, {title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} diff --git a/src/main/resources/templates/pages/application/form-step-look_minRecordOut.html b/src/main/resources/templates/pages/application/form-step-look_minRecordOut.html index 36234398..00bdb862 100644 --- a/src/main/resources/templates/pages/application/form-step-look_minRecordOut.html +++ b/src/main/resources/templates/pages/application/form-step-look_minRecordOut.html @@ -56,7 +56,7 @@ 库位编码 - 外芯仓库 + 外芯仓库 出库人员 diff --git a/src/main/resources/templates/pages/group/applicationOutForGroup.html b/src/main/resources/templates/pages/group/applicationOutForGroup.html index edfc250c..0fa8ee75 100644 --- a/src/main/resources/templates/pages/group/applicationOutForGroup.html +++ b/src/main/resources/templates/pages/group/applicationOutForGroup.html @@ -732,7 +732,7 @@ var flag = res.data; if (!flag) { // 如果当前数目不合适 - layer.msg("当前组合中有物料库存数量不足", {icon: 0, time: 500}, function () { + layer.msg("当前组合中"+res.statusInfo.message+"的库存数量不足", {icon: 0, time: 500}, function () { $("#quantityForGroup" + id).val(""); }); diff --git a/src/main/resources/templates/pages/place/place_edit.html b/src/main/resources/templates/pages/place/place_edit.html index 03a17131..1c271b5d 100644 --- a/src/main/resources/templates/pages/place/place_edit.html +++ b/src/main/resources/templates/pages/place/place_edit.html @@ -60,7 +60,7 @@
- + - +
-
- -
- -
-
@@ -155,20 +149,6 @@ step = layui.step; var temp = {}; temp.mid = $("#mid").val(); - $.ajax({ - url: "/place/findPlaceByMid", - type: "post", - dataType: 'json', - data: JSON.stringify(temp), - contentType: "application/json;charset=utf-8", - success: function (res) { - $('#place').empty(); - $.each(res.data, function (index, item) { - $('#place').append(new Option(item.depositoryName + "-" + item.code, item.id));//往下拉菜单里添加元素 - }); - form.render(); - } - }); $("#code").blur(function () { @@ -190,32 +170,18 @@ $("#mid").val(""); } else { req.mid = d.id; - - $.ajax({ - url: "/place/findPlaceByMid", - type: "post", - dataType: 'json', - data: JSON.stringify(req), - contentType: "application/json;charset=utf-8", - success: function (res) { - $('#place').empty(); - $.each(res.data, function (index, item) { - $('#place').append(new Option(item.depositoryName + "-" + item.code, item.id));//往下拉菜单里添加元素 - }); - $("#unit").empty(); - $("#unit").append(new Option(d.unit, "-1")); - $.each(d.splitInfoList, function (index, item) { - $("#unit").append(new Option(item.newUnit, item.newUnit)); - }); - $("#mname").val(d.mname); - $("#mid").val(d.id); - form.render(); - } + let unitItem = $("#unit"); + unitItem.empty(); + unitItem.append(new Option(d.unit, "-1")); + $.each(d.splitInfoList, function (index, item) { + $("#unit").append(new Option(item.newUnit, item.newUnit)); }); - + $("#mname").val(d.mname); + $("#mid").val(d.id); + form.render(); } } - }); + }) }); $("#mname").blur(function () { @@ -289,7 +255,7 @@ area: ['70%', '70%'], move: '.layui-layer-title', fixed: false, - content: '/selectMaterial?mname='+mname, + content: '/selectMaterial?mname=' + mname, success: function (layero, index) { var children = layero.children(); var content = $(children[1]); diff --git a/target/classes/templates/pages/application/application_multi.html b/target/classes/templates/pages/application/application_multi.html index 36790085..faf29f1d 100644 --- a/target/classes/templates/pages/application/application_multi.html +++ b/target/classes/templates/pages/application/application_multi.html @@ -93,8 +93,8 @@ {field: 'code',width: 200,title: '存货编码',sort: true}, {title: '所处位置', width: 200, templet: '#selectLocation', align: "center"}, {field: 'depositoryName', width: 150, title: '仓库名称'}, - {field: 'quantity', width: 150, title: '数量',edit:'quantity'}, {title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, + {field: 'quantity', width: 150, title: '数量',edit:'quantity'}, {field: 'price', width: 150, title: '单价',edit:'price'}, {field: 'applyRemark', width: 150, title: '备注说明',edit:'applyRemark'}, {title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} diff --git a/target/classes/templates/pages/application/form-step-look_minRecordOut.html b/target/classes/templates/pages/application/form-step-look_minRecordOut.html index 36234398..00bdb862 100644 --- a/target/classes/templates/pages/application/form-step-look_minRecordOut.html +++ b/target/classes/templates/pages/application/form-step-look_minRecordOut.html @@ -56,7 +56,7 @@ 库位编码 - 外芯仓库 + 外芯仓库 出库人员 diff --git a/target/classes/templates/pages/group/applicationOutForGroup.html b/target/classes/templates/pages/group/applicationOutForGroup.html index edfc250c..0fa8ee75 100644 --- a/target/classes/templates/pages/group/applicationOutForGroup.html +++ b/target/classes/templates/pages/group/applicationOutForGroup.html @@ -732,7 +732,7 @@ var flag = res.data; if (!flag) { // 如果当前数目不合适 - layer.msg("当前组合中有物料库存数量不足", {icon: 0, time: 500}, function () { + layer.msg("当前组合中"+res.statusInfo.message+"的库存数量不足", {icon: 0, time: 500}, function () { $("#quantityForGroup" + id).val(""); }); diff --git a/target/classes/templates/pages/place/place_edit.html b/target/classes/templates/pages/place/place_edit.html index 03a17131..1c271b5d 100644 --- a/target/classes/templates/pages/place/place_edit.html +++ b/target/classes/templates/pages/place/place_edit.html @@ -60,7 +60,7 @@
- + - +