From 431f88fdade07a22b636714f1690cee3a55668d0 Mon Sep 17 00:00:00 2001
From: cp <513960435@qq.com>
Date: 星期三, 30 十月 2024 13:35:56 +0800
Subject: [PATCH] 完善

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/OrderController.java                |   24 +++
 zy-asrs-common/src/main/java/com/zy/asrs/common/sys/service/impl/StaDescServiceImpl.java |    1 
 zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocInPrintMat.java            |    3 
 zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/MobileService.java           |    6 
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/MobileController.java               |  151 +++++++++++++++++----
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocDetlController.java              |   29 +++-
 zy-asrs-wms/src/main/webapp/static/js/pakStore/stockAdjust.js                            |    4 
 zy-asrs-wms/src/main/webapp/views/order/order.html                                       |    2 
 zy-asrs-wms/src/main/webapp/static/js/locInPrintMat/locInPrintMat.js                     |    2 
 zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java |    1 
 zy-asrs-wms/src/main/webapp/static/js/order/order.js                                     |   36 +++++
 zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml                         |    6 
 zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/AdjDetl.java                  |    8 +
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/task/WorkMastScheduler.java                    |   21 +++
 zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/entity/param/CombParam.java      |    2 
 zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java  |   93 ++++++++----
 zy-asrs-wms/src/main/webapp/static/js/adjDetl/adjDetl.js                                 |    2 
 17 files changed, 312 insertions(+), 79 deletions(-)

diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/entity/param/CombParam.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/entity/param/CombParam.java
index a8ae070..a681c1a 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/entity/param/CombParam.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/entity/param/CombParam.java
@@ -33,6 +33,8 @@
     @Data
     public static class CombMat {
 
+        private String orderNo;
+
         //鏂欐兂鐮�
         private String containerCode;
 
diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java
index 0f15e2d..88468c7 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java
@@ -94,6 +94,7 @@
         for (GenerateOrderMatParam matParam : mats) {
             Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, matParam.getMatnr()).eq(Mat::getHostId, param.getHostId()));
             if (Cools.isEmpty(mat)) {
+                orderService.remove(new LambdaQueryWrapper<Order>().eq(Order::getOrderNo, order.getOrderNo()));
                 throw new CoolException(matParam.getMatnr() + "缂栧彿鍟嗗搧妫�绱㈠け璐ワ紝璇峰厛娣诲姞鍟嗗搧");
             }
             OrderDetl orderDetl = new OrderDetl();
diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/service/impl/StaDescServiceImpl.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/service/impl/StaDescServiceImpl.java
index de4844b..83e090e 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/service/impl/StaDescServiceImpl.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/service/impl/StaDescServiceImpl.java
@@ -19,6 +19,7 @@
         LambdaQueryWrapper<StaDesc> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(StaDesc::getTypeNo, typeNo);
         wrapper.eq(StaDesc::getHostId, hostId);
+        wrapper.orderByDesc(StaDesc::getStnNo);
         for (StaDesc staDesc : this.list(wrapper)) {
             list.add(staDesc.getStnNo());
         }
diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/AdjDetl.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/AdjDetl.java
index cd9f943..64636b7 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/AdjDetl.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/AdjDetl.java
@@ -127,6 +127,12 @@
     @ApiModelProperty(value= "浠撳簱ID")
     private Long hostId;
 
+    /**
+     * 璁㈠崟鍙�
+     */
+    @ApiModelProperty(value="璁㈠崟鍙�")
+    private String orderNo;
+
     public AdjDetl() {}
 
     public AdjDetl(String locNo,String matnr,String batch,Double oriCtns,Double oriQty,Double oriWt,Double adjCtns,Double adjQty,Double adjWt,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime) {
@@ -185,7 +191,7 @@
         UserService service = SpringUtils.getBean(UserService.class);
         User user = service.getById(this.modiUser);
         if (!Cools.isEmpty(user)){
-            return String.valueOf(user.getNickname());
+            return String.valueOf(user.getUsername());
         }
         return null;
     }
diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocInPrintMat.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocInPrintMat.java
index 79d9b86..7a39bec 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocInPrintMat.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocInPrintMat.java
@@ -119,6 +119,9 @@
     @ApiModelProperty(value="鍒朵护")
     private String decrees;
 
+    @ApiModelProperty(value = "瑷傚柈铏�")
+    private String orderNo;
+
     public LocInPrintMat() {}
 
     public LocInPrintMat(String uuid,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo,String matnr,String batch,Double anfme,String locNo,String maktx) {
diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/MobileService.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/MobileService.java
index 261db2d..bf93c85 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/MobileService.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/MobileService.java
@@ -21,7 +21,7 @@
     R WarehouseIn(String locNo, String barcode,Long hostId);
 
     R WarehouseOut(CombParam combParam, Long hostId);
-    R WarehouseOutV1(CombParam combParam, Long hostId);
-    R WarehouseOutPickMergeV1(WarehouseOutPickMergeParam param, Long hostId);
-    R WarehouseOutMergeBoardMany(WarehouseOutMergeBoardManyParam param, Long hostId);
+    R WarehouseOutV1(CombParam combParam, Long hostId,Long userId);
+    R WarehouseOutPickMergeV1(WarehouseOutPickMergeParam param, Long hostId,Long userId);
+    R WarehouseOutMergeBoardMany(WarehouseOutMergeBoardManyParam param, Long hostId,Long userId);
 }
diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java
index 1637675..c2d6f71 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java
@@ -9,6 +9,7 @@
 import com.zy.asrs.common.openapi.entity.param.CombParam;
 import com.zy.asrs.common.openapi.entity.param.WarehouseOutMergeBoardManyParam;
 import com.zy.asrs.common.openapi.entity.param.WarehouseOutPickMergeParam;
+import com.zy.asrs.common.web.BaseController;
 import com.zy.asrs.common.wms.entity.*;
 import com.zy.asrs.common.wms.mapper.LocDetlMapper;
 import com.zy.asrs.common.wms.service.*;
@@ -399,7 +400,7 @@
 
     @Override
     @Transactional
-    public R WarehouseOutV1(CombParam combParam, Long hostId) {
+    public R WarehouseOutV1(CombParam combParam, Long hostId,Long userId) {
         //鍒ゆ柇搴撲綅鐘舵��
         LocMast locMast = locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo, combParam.getLocno()).eq(LocMast::getHostId,hostId).eq(LocMast::getWhsType,0L));
         if (Cools.isEmpty(locMast)){
@@ -427,8 +428,8 @@
             if (combMat.getAnfme() > locDetl.getAnfme()){
                 return R.error("鎷i�夋暟閲忛敊璇紝瓒呭嚭搴撳瓨鏁伴噺");
             }
-            if (!Cools.isEmpty(combParam.getOrderNo())){
-                Order order = orderService.selectByNo(combParam.getOrderNo(), hostId);
+            if (!Cools.isEmpty(combMat.getOrderNo())){
+                Order order = orderService.selectByNo(combMat.getOrderNo(), hostId);
                 if (Cools.isEmpty(order)){
                     continue;
                 }
@@ -443,7 +444,7 @@
                     throw new CoolException("鎷i�夋暟閲忓嚭閿�,璁㈠崟鍓╀綑鍑哄簱鏁伴噺灏忎簬宸插嚭搴撴暟閲忎笌灏嗘嫞閫夋暟閲忎箣鍜岋紒锛侊紒");
                 }
                 // 淇敼璁㈠崟鏄庣粏浣滀笟鏁伴噺
-                if (!orderDetlService.increaseWorkQtyByOrderNo(combParam.getOrderNo(), combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), hostId)) {
+                if (!orderDetlService.increaseWorkQtyByOrderNo(combMat.getOrderNo(), combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), hostId)) {
                     throw new CoolException("淇敼鍗曟嵁鏄庣粏宸ヤ綔鏁伴噺澶辫触");
                 }
                 // 淇敼璁㈠崟鏄庣粏瀹屾垚鏁伴噺
@@ -451,7 +452,7 @@
                     throw new CoolException("淇敼鍗曟嵁鏄庣粏瀹屾垚鏁伴噺澶辫触");
                 }
                 // 淇敼璁㈠崟鐘舵�� 浣滀笟涓� ===>> 宸插畬鎴�
-                orderService.checkComplete(combParam.getOrderNo(), hostId);
+                orderService.checkComplete(combMat.getOrderNo(), hostId);
             }
             try {
                 //澶勭悊搴撳瓨淇℃伅
@@ -461,8 +462,11 @@
                 adjDetl.setBatch(locDetl.getBatch());
                 adjDetl.setOriQty(locDetl.getAnfme());
                 adjDetl.setMemo("WarehouseOutV1-pick");
+                adjDetl.setModiUser(userId);
+                adjDetl.setAppeUser(userId);
+                adjDetl.setAppeTime(new Date());
                 adjDetl.setModiTime(new Date());
-
+                adjDetl.setOrderNo(combMat.getOrderNo());
                 if (combMat.getAnfme().equals(locDetl.getAnfme())){
                     adjDetl.setAdjQty(0D);
                     //搴撳瓨鐩哥瓑鍒犻櫎鏁版嵁
@@ -470,8 +474,8 @@
                     int count = locDetlService.count(new LambdaQueryWrapper<LocDetl>().eq(LocDetl::getLocNo,combParam.getLocno()).eq(LocDetl::getHostId, hostId));
                     if (count == 0){
                         LocMast locMast1 = locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo, combParam.getLocno()).eq(LocMast::getHostId, hostId));
-                        locMast1.setLocSts("O");
-                        locMastService.updateById(locMast1);
+//                        locMast1.setLocSts("O");
+//                        locMastService.updateById(locMast1);
                     }
                 } else {
                     BigDecimal subtract = BigDecimal.valueOf(locDetl.getAnfme()).subtract(BigDecimal.valueOf(combMat.getAnfme()));
@@ -492,7 +496,7 @@
 
     @Override
     @Transactional
-    public R WarehouseOutPickMergeV1(WarehouseOutPickMergeParam param, Long hostId) {
+    public R WarehouseOutPickMergeV1(WarehouseOutPickMergeParam param, Long hostId,Long userId) {
         //鍒ゆ柇搴撲綅鐘舵��
         LocMast locMast = locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo, param.getLocNo()).eq(LocMast::getHostId,hostId).eq(LocMast::getWhsType,0L));
         if (Cools.isEmpty(locMast)){
@@ -541,6 +545,14 @@
             locDetl.setId(null);
             locDetl.setLocNo(param.getLocNo());
             locDetl.setBarcode(locMast.getBarcode());
+            Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr,locDetl.getMatnr()));
+            locDetl.setHostId(hostId);
+            locDetl.setMaktx(mat.getMaktx());
+            if(hostId==1){
+                locDetl.setOwner("瀹佹尝浠�");
+            }else{
+                locDetl.setOwner("鏂版槍浠�");
+            }
 
             String matKey = locDetl.getMatnr();
             if (!Cools.isEmpty(locDetl.getBatch())) {
@@ -604,7 +616,7 @@
                         continue;
                     }
                     if (orderDetl.getAnfme() < (orderDetl.getWorkQty() + orderDto.getAnfme())) {
-                        throw new CoolException("鎷i�夋暟閲忓嚭閿�,璁㈠崟鍓╀綑鍑哄簱鏁伴噺灏忎簬宸插嚭搴撴暟閲忎笌灏嗘嫞閫夋暟閲忎箣鍜岋紒锛侊紒");
+                        throw new CoolException("骞舵澘鏁伴噺鍑洪敊,璁㈠崟鍓╀綑鍑哄簱鏁伴噺灏忎簬宸插嚭搴撴暟閲忎笌灏嗗苟鏉挎暟閲忎箣鍜岋紒锛侊紒");
                     }
                     // 淇敼璁㈠崟鏄庣粏浣滀笟鏁伴噺
                     if (!orderDetlService.increaseWorkQtyByOrderNo(orderDto.getOrderNo(), locDetl.getMatnr(), locDetl.getBatch(), orderDto.getAnfme(), hostId)) {
@@ -616,34 +628,39 @@
                     }
                     // 淇敼璁㈠崟鐘舵�� 浣滀笟涓� ===>> 宸插畬鎴�
                     orderService.checkComplete(orderDto.getOrderNo(), hostId);
+
+                    try {
+                        //澶勭悊搴撳瓨淇℃伅
+                        AdjDetl adjDetl = new AdjDetl();
+                        adjDetl.setLocNo(locDetl.getLocNo());
+                        adjDetl.setMatnr(locDetl.getMatnr());
+                        adjDetl.setBatch(locDetl.getBatch());
+                        adjDetl.setOriQty(originAnfme);
+                        adjDetl.setAdjQty(locDetl.getAnfme());
+                        adjDetl.setMemo("WarehouseOutV1-pick");
+                        adjDetl.setModiUser(userId);
+                        adjDetl.setAppeUser(userId);
+                        adjDetl.setAppeTime(new Date());
+                        adjDetl.setModiTime(new Date());
+                        adjDetl.setOrderNo(order.getOrderNo());
+                        if (!adjDetlService.save(adjDetl)) {
+                            throw new CoolException("淇濆瓨搴撳瓨璋冩暣璁板綍澶辫触");
+                        }
+                    }catch (Exception e){
+                        e.printStackTrace();
+                        throw new CoolException("鏇存柊搴撳瓨鏁版嵁鍑洪敊" + e.getMessage());
+                    }
                 }
             }
 
-            try {
-                //澶勭悊搴撳瓨淇℃伅
-                AdjDetl adjDetl = new AdjDetl();
-                adjDetl.setLocNo(locDetl.getLocNo());
-                adjDetl.setMatnr(locDetl.getMatnr());
-                adjDetl.setBatch(locDetl.getBatch());
-                adjDetl.setOriQty(originAnfme);
-                adjDetl.setAdjQty(locDetl.getAnfme());
-                adjDetl.setMemo("WarehouseOutV1-pick");
-                adjDetl.setModiTime(new Date());
 
-                if (!adjDetlService.save(adjDetl)) {
-                    throw new CoolException("淇濆瓨搴撳瓨璋冩暣璁板綍澶辫触");
-                }
-            }catch (Exception e){
-                e.printStackTrace();
-                throw new CoolException("鏇存柊搴撳瓨鏁版嵁鍑洪敊" + e.getMessage());
-            }
         }
         return R.ok();
     }
 
     @Override
     @Transactional
-    public R WarehouseOutMergeBoardMany(WarehouseOutMergeBoardManyParam param, Long hostId) {
+    public R WarehouseOutMergeBoardMany(WarehouseOutMergeBoardManyParam param, Long hostId,Long userId) {
         WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode(), hostId);
         if (wrkMast == null) {
             throw new CoolException("宸ヤ綔妗d笉瀛樺湪");
@@ -663,7 +680,7 @@
         for (WrkDetl wrkDetl : wrkDetls) {
             String matKey = wrkDetl.getMatnr();
             if (!Cools.isEmpty(wrkDetl.getBatch())) {
-                matKey += "_" + wrkDetl.getBatch();
+                matKey += "_" + wrkDetl.getBatch() + "-" +wrkDetl.getOrderNo();
             }
 
             MergeBoardManyDto dto = new MergeBoardManyDto();
@@ -676,18 +693,25 @@
         for (OrderDetl orderDetl : param.getCombMats()) {
             String matKey = orderDetl.getMatnr();
             if (!Cools.isEmpty(orderDetl.getBatch())) {
-                matKey += "_" + orderDetl.getBatch();
+                matKey += "_" + orderDetl.getBatch() + "-" +orderDetl.getOrderNo();
             }
 
             MergeBoardManyDto dto = wrkData.get(matKey);
             if(dto == null){
                 WrkDetl wrkDetl = new WrkDetl();
                 wrkDetl.sync(orderDetl);
+                Mat mat=matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr,wrkDetl.getMatnr()));
+                wrkDetl.sync(mat);
                 wrkDetl.setId(null);
                 wrkDetl.setWrkNo(wrkMast.getWrkNo());
                 wrkDetl.setWrkMastId(wrkMast.getId());
+                wrkDetl.setZpallet(wrkMast.getBarcode());
                 wrkDetl.setIoTime(new Date());
-
+                wrkDetl.setHostId(hostId);
+                wrkDetl.setAppeUser(userId);
+                wrkDetl.setAppeTime(new Date());
+                wrkDetl.setModiUser(userId);
+                wrkDetl.setModiTime(new Date());
                 ArrayList<PickMergeOrderDto> orderDtos = new ArrayList<>();
                 orderDtos.add(new PickMergeOrderDto(orderDetl.getOrderNo(), orderDetl.getAnfme()));
 
@@ -700,8 +724,11 @@
                 List<PickMergeOrderDto> orders = dto.getOrders();
 
                 wrkDetl.setAnfme(wrkDetl.getAnfme() + orderDetl.getAnfme());
+                wrkDetl.setIoTime(new Date());
+                wrkDetl.setHostId(hostId);
+                wrkDetl.setModiUser(userId);
+                wrkDetl.setModiTime(new Date());
                 orders.add(new PickMergeOrderDto(orderDetl.getOrderNo(), orderDetl.getAnfme()));
-
                 dto.setWrkDetl(wrkDetl);
                 dto.setOrders(orders);
             }
@@ -750,6 +777,8 @@
                     }
                     // 淇敼璁㈠崟鐘舵�� 浣滀笟涓� ===>> 宸插畬鎴�
                     orderService.checkComplete(orderDto.getOrderNo(), hostId);
+
+
                 }
             }
         }
diff --git a/zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml b/zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml
index 35f7e18..96a0c7d 100644
--- a/zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml
+++ b/zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml
@@ -41,9 +41,9 @@
             <when test="batch != null and batch != ''">
                 and batch = #{batch}
             </when>
-            <otherwise>
-                and (batch IS NULL OR batch = '')
-            </otherwise>
+<!--            <otherwise>-->
+<!--                and (batch IS NULL OR batch = '')-->
+<!--            </otherwise>-->
         </choose>
     </select>
 
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocDetlController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocDetlController.java
index 45fd7af..1e09cae 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocDetlController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocDetlController.java
@@ -48,15 +48,28 @@
 
     @RequestMapping(value = "/locDetl/forlocNo/auth/v1")
     @ManagerAuth
-    public R forlocNoV1(@RequestParam String locNo) {
-        LambdaQueryWrapper<LocDetl> locDetlLambdaQueryWrapper = new LambdaQueryWrapper<LocDetl>()
-                .eq(LocDetl::getLocNo, locNo)
-                .eq(LocDetl::getHostId, getHostId());
-        List<LocDetl> detls = locDetlService.list(locDetlLambdaQueryWrapper);
-        if (Cools.isEmpty(detls)){
-            return R.error("鏈煡璇㈠埌搴撳瓨鏁版嵁");
+    public R forlocNoV1(@RequestParam String locNo,@RequestParam String matnr) {
+        if(Cools.isEmpty(matnr)){
+            LambdaQueryWrapper<LocDetl> locDetlLambdaQueryWrapper = new LambdaQueryWrapper<LocDetl>()
+                    .eq(LocDetl::getLocNo, locNo)
+                    .eq(LocDetl::getHostId, getHostId());
+            List<LocDetl> detls = locDetlService.list(locDetlLambdaQueryWrapper);
+            if (Cools.isEmpty(detls)){
+                return R.error("鏈煡璇㈠埌搴撳瓨鏁版嵁");
+            }
+            return R.ok(detls);
+        }else{
+            LambdaQueryWrapper<LocDetl> locDetlLambdaQueryWrapper = new LambdaQueryWrapper<LocDetl>()
+                    .eq(LocDetl::getLocNo, locNo)
+                    .eq(LocDetl::getHostId, getHostId())
+                    .like(LocDetl::getMatnr,matnr);
+            List<LocDetl> detls = locDetlService.list(locDetlLambdaQueryWrapper);
+            if (Cools.isEmpty(detls)){
+                return R.error("鏈煡璇㈠埌搴撳瓨鏁版嵁");
+            }
+            return R.ok(detls);
         }
-        return R.ok(detls);
+
     }
 
     @RequestMapping(value = "/locDetl/forlocNo/auth")
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/MobileController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/MobileController.java
index 1251aed..1d8dacd 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/MobileController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/MobileController.java
@@ -68,37 +68,108 @@
 
     @RequestMapping("/pda/WarehouseIn")
     @ManagerAuth
-    public R WarehouseIn(@RequestParam String locNo,@RequestParam String barcode){
-        return mobileService.WarehouseIn(locNo,barcode,getHostId());
+    public R WarehouseIn(@RequestParam String locNo, @RequestParam String barcode) {
+        return mobileService.WarehouseIn(locNo, barcode, getHostId());
     }
 
     @RequestMapping("/pda/WarehouseOut")
     @ManagerAuth
-    public R WarehouseOut(@RequestBody CombParam combParam){
-        return mobileService.WarehouseOut(combParam,getHostId());
+    public R WarehouseOut(@RequestBody CombParam combParam) {
+        return mobileService.WarehouseOut(combParam, getHostId());
     }
 
+    @RequestMapping("/outBound/mat/list")
+    @ManagerAuth
+    public R WarehouseMat(@RequestParam String matnr, @RequestParam String orderNo) {
+        if (Cools.isEmpty(matnr)) {
+            R.error("鍝佸彿涓嶈兘涓虹┖");
+        }
+        ArrayList<PickMatParam> maps = new ArrayList<>();
+        if (Cools.isEmpty(orderNo)) {
+            List<OrderDetl> list = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>()
+                    .eq(OrderDetl::getMatnr, matnr)
+                    .orderByDesc(OrderDetl::getCreateTime));
+            List<OrderDetl> orderDetls = new ArrayList<OrderDetl>();
+            for (OrderDetl orderDetl : list
+            ) {
+                Order order = orderService.getOne(new LambdaQueryWrapper<Order>().eq(Order::getOrderNo, orderDetl.getOrderNo()));
+                if (!Cools.isEmpty(order)) {
+                    DocType docType = docTypeService.getOne(new LambdaQueryWrapper<DocType>().eq(DocType::getDocId, order.getDocType()));
+                    if (!Cools.isEmpty(docType) && docType.getPakout() == 1) {
+                        double count = orderDetl.getAnfme() - orderDetl.getWorkQty();
+                        PickMatParam matParam = new PickMatParam();
+                        matParam.setMatnr(orderDetl.getMatnr());
+                        matParam.setBatch(orderDetl.getBatch());
+                        matParam.setOrderNo(orderDetl.getOrderNo());
+                        matParam.setOrderId(orderDetl.getOrderId());
+                        matParam.setCount(count);
+                        matParam.setUseCount(count);
+                        maps.add(matParam);
+                    }
+
+
+                }
+            }
+            return R.ok(maps);
+        } else {
+            List<OrderDetl> list = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>()
+                    .eq(OrderDetl::getMatnr, matnr)
+                    .like(OrderDetl::getOrderNo, orderNo)
+                    .orderByDesc(OrderDetl::getCreateTime));
+            for (OrderDetl orderDetl:list
+                 ) {
+                double count = orderDetl.getAnfme() - orderDetl.getWorkQty();
+                PickMatParam matParam = new PickMatParam();
+                matParam.setMatnr(orderDetl.getMatnr());
+                matParam.setBatch(orderDetl.getBatch());
+                matParam.setOrderNo(orderDetl.getOrderNo());
+                matParam.setOrderId(orderDetl.getOrderId());
+                matParam.setCount(count);
+                matParam.setUseCount(count);
+                maps.add(matParam);
+            }
+            return R.ok(maps);
+        }
+    }
+
+    /**
+     * 骞舵澘閫斾腑鎷f枡
+     *
+     * @param combParam
+     * @return
+     */
     @RequestMapping("/pda/WarehouseOut/v1")
     @ManagerAuth
-    public R WarehouseOutV1(@RequestBody CombParam combParam){
-        return mobileService.WarehouseOutV1(combParam,getHostId());
+    public R WarehouseOutV1(@RequestBody CombParam combParam) {
+        return mobileService.WarehouseOutV1(combParam, getHostId(), getUserId());
     }
 
+    /**
+     * 鎷f枡閫斾腑骞舵澘
+     *
+     * @param param
+     * @return
+     */
     @RequestMapping("/pda/WarehouseOutPickMerge/v1")
     @ManagerAuth
-    public R WarehouseOutPickMergeV1(@RequestBody WarehouseOutPickMergeParam param){
-        return mobileService.WarehouseOutPickMergeV1(param, getHostId());
+    public R WarehouseOutPickMergeV1(@RequestBody WarehouseOutPickMergeParam param) {
+        return mobileService.WarehouseOutPickMergeV1(param, getHostId(),getUserId());
     }
 
+    /**
+     * 澶氭骞舵澘
+     * @param param
+     * @return
+     */
     @RequestMapping("/pda/WarehouseOutMergeBoardMany/v1")
     @ManagerAuth
-    public R WarehouseOutMergeBoardManyV1(@RequestBody WarehouseOutMergeBoardManyParam param){
-        return mobileService.WarehouseOutMergeBoardMany(param, getHostId());
+    public R WarehouseOutMergeBoardManyV1(@RequestBody WarehouseOutMergeBoardManyParam param) {
+        return mobileService.WarehouseOutMergeBoardMany(param, getHostId(),getUserId());
     }
 
     @RequestMapping("/menu/pda/auth")
     @ManagerAuth
-    public R menuPda(){
+    public R menuPda() {
         List<RolePermission> rolePermissions;
         Long roleId = getUser().getRoleId();
         rolePermissions = rolePermissionService.list(new LambdaQueryWrapper<RolePermission>().eq(RolePermission::getRoleId, getHostId()));
@@ -119,7 +190,7 @@
      */
     @RequestMapping("/pda/decrees/check")
     @ManagerAuth
-    public R pdaDecreesCheck(@RequestParam String decrees){
+    public R pdaDecreesCheck(@RequestParam String decrees) {
         if (Cools.isEmpty(decrees)) {
             return R.error("鍒朵护涓嶈兘涓虹┖");
         }
@@ -129,7 +200,7 @@
         //鏌ヨ鏄惁鏈夋鍦ㄥ伐浣滅殑宸ヤ綔妗�
         List<WrkDetl> wrkDetls = wrkDetlService.list(new LambdaQueryWrapper<WrkDetl>().eq(WrkDetl::getBatch, decrees));
         HashMap<String, Object> map = new HashMap<>();
-        if(list.isEmpty() && wrkDetls.isEmpty()){
+        if (list.isEmpty() && wrkDetls.isEmpty()) {
             map.put("status", 1);//鍙甯稿叆搴�
         } else if (!wrkDetls.isEmpty()) {
             map.put("status", 3);//瀛樺湪宸ヤ綔妗o紝鎷掔粷鍏ュ簱
@@ -155,7 +226,7 @@
      */
     @RequestMapping("/order/search/orderNo/auth")
     @ManagerAuth
-    public R orderSearchByBarcode(@RequestParam String orderNo){
+    public R orderSearchByBarcode(@RequestParam String orderNo) {
         Order order = orderService.selectByNo(orderNo, getHostId());
         if (order == null) {
             return R.ok();
@@ -176,7 +247,7 @@
 
     @RequestMapping("/comb/auth")
     @ManagerAuth(memo = "缁勬墭")
-    public R comb(@RequestBody CombParam combParam){
+    public R comb(@RequestBody CombParam combParam) {
         mobileService.comb(combParam, getUserId(), getHostId());
         return R.ok("缁勬墭鎴愬姛");
     }
@@ -186,7 +257,7 @@
     @Deprecated
     public R pakoutQuery(@RequestParam(required = false) String barcode,
                          @RequestParam(required = false) Integer staNo,
-                         @RequestParam(required = false) String matnr){
+                         @RequestParam(required = false) String matnr) {
         if (Cools.isEmpty(barcode) && Cools.isEmpty(matnr)) {
             return R.ok();
         }
@@ -211,7 +282,7 @@
      */
     @RequestMapping("/pakout/confirm/barcode/auth")
     @ManagerAuth
-    public R pakoutQueryByBarcode(@RequestParam(required = false) String barcode){
+    public R pakoutQueryByBarcode(@RequestParam(required = false) String barcode) {
         if (Cools.isEmpty(barcode)) {
             return R.ok();
         }
@@ -232,7 +303,7 @@
     @RequestMapping("/pakout/confirm/pick/auth")
     @ManagerAuth
     public R pakoutQueryByBarcode(@RequestParam(required = false) Integer wrkNo
-            , @RequestParam(required = false) String matnr){
+            , @RequestParam(required = false) String matnr) {
         if (Cools.isEmpty(wrkNo)) {
             return R.ok();
         }
@@ -368,14 +439,14 @@
 
     @RequestMapping("/adjust/auth")
     @ManagerAuth(memo = "鐩樼偣")
-    public R adjust(@RequestBody MobileAdjustParam combParam){
+    public R adjust(@RequestBody MobileAdjustParam combParam) {
         mobileService.adjust(combParam, getUserId(), getHostId());
         return R.ok("鐩樼偣鎴愬姛");
     }
 
     @RequestMapping("/loc/f/list")
     @ManagerAuth(memo = "鑾峰彇鍦ㄥ簱搴撲綅")
-    public R locNoF(@RequestParam(required = false) String locNo){
+    public R locNoF(@RequestParam(required = false) String locNo) {
         LambdaQueryWrapper<LocMast> wrapper = new LambdaQueryWrapper<LocMast>()
                 .eq(LocMast::getLocSts, "F")
                 .eq(LocMast::getHostId, getHostId());
@@ -388,7 +459,7 @@
 
     @RequestMapping("/pick/sta/list")
     @ManagerAuth(memo = "鑾峰彇骞舵澘绔�")
-    public R pickSta(){
+    public R pickSta() {
         List<StaDesc> list = staDescService.list(new LambdaQueryWrapper<StaDesc>()
                 .eq(StaDesc::getTypeNo, 104)
                 .eq(StaDesc::getHostId, getHostId()));
@@ -397,7 +468,7 @@
 
     @RequestMapping("/pick/mat/list")
     @ManagerAuth(memo = "鑾峰彇骞舵澘鐗╂枡")
-    public R pickMats(@RequestParam(required = false) String matnr){
+    public R pickMats(@RequestParam(required = false) String matnr, @RequestParam(required = false) String orderNo) {
         List<DocType> docTypes = docTypeService.list(new LambdaQueryWrapper<DocType>().like(DocType::getPakin, 1));
         ArrayList<Long> typeList = new ArrayList<>();
         for (DocType docType : docTypes) {
@@ -420,10 +491,13 @@
         wrapper1.eq(OrderDetl::getStatus, 1);
         wrapper1.eq(OrderDetl::getHostId, getHostId());
         wrapper1.in(OrderDetl::getOrderId, orderIds);
+        wrapper1.orderByDesc(OrderDetl::getCreateTime);
         if (!Cools.isEmpty(matnr)) {
             wrapper1.like(OrderDetl::getMatnr, matnr);
         }
-
+        if (!Cools.isEmpty(orderNo)) {
+            wrapper1.like(OrderDetl::getOrderNo, orderNo);
+        }
         List<OrderDetl> list = orderDetlService.list(wrapper1);
 
         ArrayList<PickMatParam> maps = new ArrayList<>();
@@ -449,7 +523,7 @@
     @RequestMapping("/pick/in")
     @ManagerAuth(memo = "骞舵澘鍏ュ簱")
     @Transactional
-    public R pickConfirm(@RequestBody PickConfirmParam param){
+    public R pickConfirm(@RequestBody PickConfirmParam param) {
         LocMast locMast = locMastService.getOne(new LambdaQueryWrapper<LocMast>()
                 .eq(LocMast::getLocNo, param.getLocNo())
                 .eq(LocMast::getHostId, getHostId()));
@@ -570,20 +644,30 @@
     @Transactional
     public R orderOutListOrder(@RequestBody String barcode) {
         ArrayList<WrkMast> wrkMastArrayList = new ArrayList<>();
-        if (Cools.isEmpty(barcode) || barcode.isEmpty()){
+        if (Cools.isEmpty(barcode) || barcode.isEmpty()) {
             List<WrkMast> wrkMasts = wrkMastService.list(new LambdaQueryWrapper<WrkMast>()
                     .eq(WrkMast::getHostId, getHostId())
                     .eq(WrkMast::getWrkSts, 199L)
                     .eq(WrkMast::getIoType, 104));
             wrkMastArrayList.addAll(wrkMasts);
+            List<WrkMast> wrkMasts1 = wrkMastService.list(new LambdaQueryWrapper<WrkMast>()
+                    .eq(WrkMast::getHostId, getHostId())
+                    .eq(WrkMast::getWrkSts, 199L)
+                    .eq(WrkMast::getIoType, 107));
+            wrkMastArrayList.addAll(wrkMasts1);
         } else {
             List<WrkMast> wrkMasts = wrkMastService.list(new LambdaQueryWrapper<WrkMast>()
                     .like(WrkMast::getBarcode, barcode)
                     .eq(WrkMast::getHostId, getHostId())
                     .eq(WrkMast::getWrkSts, 199L)
-                    .eq(WrkMast::getIoType, 104)
-            );
+                    .eq(WrkMast::getIoType, 104));
             wrkMastArrayList.addAll(wrkMasts);
+            List<WrkMast> wrkMasts1 = wrkMastService.list(new LambdaQueryWrapper<WrkMast>()
+                    .like(WrkMast::getBarcode, barcode)
+                    .eq(WrkMast::getHostId, getHostId())
+                    .eq(WrkMast::getWrkSts, 199L)
+                    .eq(WrkMast::getIoType, 107));
+            wrkMastArrayList.addAll(wrkMasts1);
         }
 
         return R.ok().add(wrkMastArrayList);
@@ -594,12 +678,17 @@
     @Transactional
     public R orderOutListOrderPick(@RequestBody String barcode) {
         ArrayList<WrkMast> wrkMastArrayList = new ArrayList<>();
-        if (Cools.isEmpty(barcode) || barcode.isEmpty()){
+        if (Cools.isEmpty(barcode) || barcode.isEmpty()) {
             List<WrkMast> wrkMasts = wrkMastService.list(new LambdaQueryWrapper<WrkMast>()
                     .eq(WrkMast::getHostId, getHostId())
                     .eq(WrkMast::getWrkSts, 199L)
                     .eq(WrkMast::getIoType, 103));
             wrkMastArrayList.addAll(wrkMasts);
+            List<WrkMast> wrkMasts1 = wrkMastService.list(new LambdaQueryWrapper<WrkMast>()
+                    .eq(WrkMast::getHostId, getHostId())
+                    .eq(WrkMast::getWrkSts, 199L)
+                    .eq(WrkMast::getIoType, 107));
+            wrkMastArrayList.addAll(wrkMasts1);
         } else {
             List<WrkMast> wrkMasts = wrkMastService.list(new LambdaQueryWrapper<WrkMast>()
                     .like(WrkMast::getBarcode, barcode)
@@ -608,6 +697,12 @@
                     .eq(WrkMast::getIoType, 103)
             );
             wrkMastArrayList.addAll(wrkMasts);
+            List<WrkMast> wrkMasts1 = wrkMastService.list(new LambdaQueryWrapper<WrkMast>()
+                    .like(WrkMast::getBarcode, barcode)
+                    .eq(WrkMast::getHostId, getHostId())
+                    .eq(WrkMast::getWrkSts, 199L)
+                    .eq(WrkMast::getIoType, 107));
+            wrkMastArrayList.addAll(wrkMasts1);
         }
 
         return R.ok().add(wrkMastArrayList);
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/OrderController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/OrderController.java
index b49cbb0..fcf6d6a 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/OrderController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/OrderController.java
@@ -10,6 +10,7 @@
 import com.zy.asrs.common.domain.dto.WrkTraceVo;
 import com.zy.asrs.common.domain.param.OrderDomainParam;
 import com.zy.asrs.common.wms.entity.*;
+import com.zy.asrs.common.wms.mapper.OrderDetlMapper;
 import com.zy.asrs.common.wms.service.*;
 import com.zy.asrs.framework.annotations.ManagerAuth;
 import com.zy.asrs.framework.common.Cools;
@@ -53,6 +54,8 @@
     private SnowflakeIdWorker snowflakeIdWorker;
     @Autowired
     private DocTypeService docTypeService;
+    @Autowired
+    private LocInPrintMatService locInPrintMatService;
 
     @RequestMapping(value = "/order/list/orderNo")
     public R orderListorderNo(@RequestParam String orderNo) {
@@ -199,6 +202,27 @@
         return R.ok();
     }
 
+    @RequestMapping(value = "/order/dy")
+    @ManagerAuth(memo = "鎵嬪姩鍒犻櫎璁㈠崟")
+    @Transactional
+    public R dy(@RequestParam Long orderId){
+        List<OrderDetl> list = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>().eq(OrderDetl::getOrderId, orderId));
+        for (OrderDetl orderDetl : list) {
+            LocInPrintMat locInPrintMat = new LocInPrintMat();
+            locInPrintMat.setMatnr(orderDetl.getMatnr());
+            locInPrintMat.setMaktx(orderDetl.getMaktx());
+            locInPrintMat.setStatus(1);
+            locInPrintMat.setOrderNo(orderDetl.getOrderNo());
+            locInPrintMat.setBatch(orderDetl.getBatch());
+            locInPrintMat.setCreateBy(getUserId());
+            locInPrintMat.setCreateTime(new Date());
+            locInPrintMat.setUpdateTime(new Date());
+//            locInPrintMat.setDercees(orderDetl.getDercees);
+            locInPrintMatService.save(locInPrintMat);
+        }
+        return R.ok();
+    }
+
     @RequestMapping(value = "/orderQuery/auth")
     @ManagerAuth
     public R query(String condition) {
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/task/WorkMastScheduler.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/task/WorkMastScheduler.java
index e1e691d..09d11e9 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/task/WorkMastScheduler.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/task/WorkMastScheduler.java
@@ -1,7 +1,13 @@
 package com.zy.asrs.wms.task;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.zy.asrs.common.wms.entity.LocDetl;
+import com.zy.asrs.common.wms.entity.LocMast;
 import com.zy.asrs.common.wms.entity.WrkMast;
+import com.zy.asrs.common.wms.service.LocDetlService;
+import com.zy.asrs.common.wms.service.LocMastService;
 import com.zy.asrs.common.wms.service.WrkMastService;
+import com.zy.asrs.framework.common.Cools;
 import com.zy.asrs.wms.task.core.ReturnT;
 import com.zy.asrs.wms.task.handler.WorkMastHandler;
 import org.slf4j.Logger;
@@ -25,9 +31,24 @@
     private WrkMastService wrkMastService;
     @Autowired
     private WorkMastHandler workMastHandler;
+    @Autowired
+    private LocMastService locMastService;
+    @Autowired
+    private LocDetlService locDetlService;
 
     @Scheduled(cron = "0/3 * * * * ? ")
     private void execute(){
+        List<LocDetl> locDetls = locDetlService.list(new LambdaQueryWrapper<LocDetl>());
+        for (LocDetl l:locDetls
+             ) {
+            if(Cools.isEmpty(l.getZpallet())){
+                LocMast locMast=locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo,l.getLocNo()));
+                if(!Cools.isEmpty(locMast)&&!Cools.isEmpty(locMast.getBarcode())){
+                    l.setZpallet(locMast.getBarcode());
+                    locDetlService.updateById(l);
+                }
+            }
+        }
         List<WrkMast> wrkMasts = wrkMastService.selectToBeCompleteData();
         if (wrkMasts.isEmpty()) {
             return;
diff --git a/zy-asrs-wms/src/main/webapp/static/js/adjDetl/adjDetl.js b/zy-asrs-wms/src/main/webapp/static/js/adjDetl/adjDetl.js
index 24daae3..71d6c5e 100644
--- a/zy-asrs-wms/src/main/webapp/static/js/adjDetl/adjDetl.js
+++ b/zy-asrs-wms/src/main/webapp/static/js/adjDetl/adjDetl.js
@@ -22,9 +22,9 @@
 //            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
 //             {field: 'adjId', align: 'center',title: '搴忓彿'}
             {field: 'locNo', align: 'center',title: '搴撲綅鍙�'}
+            ,{field: 'orderNo', align: 'center',title: '璁㈠崟鍙�'}
             ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿'}
             ,{field: 'batch', align: 'center',title: '搴忓垪鐮�'}
-            // ,{field: 'oriCtns', align: 'center',title: '鍘熺鏁�'}
             ,{field: 'oriQty', align: 'center',title: '鍘熸暟閲�'}
             // ,{field: 'oriWt', align: 'center',title: '鍘熼噸閲�'}
             // ,{field: 'adjCtns', align: 'center',title: '鍙樻洿绠辨暟'}
diff --git a/zy-asrs-wms/src/main/webapp/static/js/locInPrintMat/locInPrintMat.js b/zy-asrs-wms/src/main/webapp/static/js/locInPrintMat/locInPrintMat.js
index c0f59f6..e017858 100644
--- a/zy-asrs-wms/src/main/webapp/static/js/locInPrintMat/locInPrintMat.js
+++ b/zy-asrs-wms/src/main/webapp/static/js/locInPrintMat/locInPrintMat.js
@@ -29,6 +29,8 @@
             ,{field: 'uuid', align: 'center',title: '缂栧彿',hide: true}
             ,{field: 'status$', align: 'center',title: '鎵撳嵃鎯呭喌', width:100,hide: false}
             ,{field: 'matnr', align: 'center',title: '鍝佸彿', width:180,hide: false}
+            ,{field: 'orderNo', align: 'center',title: '璁㈠崟鍙�', width:180,hide: false}
+            ,{field: 'decrees', align: 'center',title: '鍒朵护', width:180,hide: false}
             // ,{field: 'batch', align: 'center',title: '鎵规', width:100,hide: false}
             // ,{field: 'anfme', align: 'center',title: '閲嶉噺(kg)', width:100,hide: false}
             // ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�', width:120,hide: false}
diff --git a/zy-asrs-wms/src/main/webapp/static/js/order/order.js b/zy-asrs-wms/src/main/webapp/static/js/order/order.js
index ce8e072..0a4e6da 100644
--- a/zy-asrs-wms/src/main/webapp/static/js/order/order.js
+++ b/zy-asrs-wms/src/main/webapp/static/js/order/order.js
@@ -104,6 +104,8 @@
             showWrkTrace(data.id);
         } else if (layEvent === 'del') {
             doDel(data.id);
+        } else if (layEvent === 'dy') {
+            doDy(data.id);
         } else if (layEvent === 'complete') {
             doModify(data.id, 4);
         } else if (layEvent === 'cancel') {
@@ -503,6 +505,40 @@
         });
     }
 
+    // 鎵撳嵃
+    function doDy(orderId) {
+        layer.confirm('纭畾瑕佹墦鍗板悧锛�', {
+            shade: .1,
+            skin: 'layui-layer-admin'
+        }, function (i) {
+            layer.close(i);
+            layer.load(2);
+            $.ajax({
+                url: baseUrl+"/order/dy",
+                headers: {'token': localStorage.getItem('token')},
+                data: {
+                    orderId: orderId
+                },
+                method: 'POST',
+                success: function (res) {
+                    layer.closeAll('loading');
+                    if (res.code === 200){
+                        if (insTbCount === 0) {
+                            insTb.reload({page: {curr: 1}});
+                        } else {
+                            $(".layui-laypage-btn")[0].click();
+                        }
+                        layer.msg(res.msg, {icon: 1});
+                    } else if (res.code === 403){
+                        top.location.href = baseUrl+"/";
+                    }else {
+                        layer.msg(res.msg, {icon: 2});
+                    }
+                }
+            })
+        });
+    }
+
 
     // 淇敼璁㈠崟鐘舵��
     function doModify(orderId, settle) {
diff --git a/zy-asrs-wms/src/main/webapp/static/js/pakStore/stockAdjust.js b/zy-asrs-wms/src/main/webapp/static/js/pakStore/stockAdjust.js
index deafbee..5f9da1d 100644
--- a/zy-asrs-wms/src/main/webapp/static/js/pakStore/stockAdjust.js
+++ b/zy-asrs-wms/src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -158,8 +158,8 @@
         })
     }
 
-    function initB(barcode) {
-        http.post(baseUrl + "/locDetl/page/auth", {barcode: barcode,limit: 1000}, function (res) {
+    function initB(zpallet) {
+        http.post(baseUrl + "/locDetl/page/auth", {zpallet: zpallet,limit: 1000}, function (res) {
             matCodeData = [];
             matCodeData = res.data.records;
             console.log("matCodeData2222")
diff --git a/zy-asrs-wms/src/main/webapp/views/order/order.html b/zy-asrs-wms/src/main/webapp/views/order/order.html
index a1b75d1..3ed0018 100644
--- a/zy-asrs-wms/src/main/webapp/views/order/order.html
+++ b/zy-asrs-wms/src/main/webapp/views/order/order.html
@@ -111,7 +111,7 @@
     {{# } }}
     {{# } }}
     <a class="layui-btn layui-btn-danger layui-btn-xs btn-delete" lay-event="del">鍒犻櫎</a>
-
+    <a class="layui-btn layui-btn-danger layui-btn-xs btn-delete" lay-event="dy">鎵撳嵃</a>
 </script>
 <!-- 琛ㄦ牸鎿嶄綔鍒� -->
 <script type="text/html" id="tbLook">

--
Gitblit v1.9.1