zhaowc
2025-01-20 f2bc08e28dda7022202f07217f6a3c150f818af7
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -399,9 +399,21 @@
                {
                    throw new Exception("未查询到该出库单的信息");
                }
                if (notice.Status != "3")
                var type1 = new List<string>() { "0", "4" }; //拣货不可多出 成品出库、不合格品出库
                var type2 = new List<string>() { "1", "2", "3", "5", "6", "7", "8" };//拣货可多出 领料出库、抽检出库、物料取样出库、中间品出库、代储出库、其他出库、寄存出库
                if (type1.Contains(notice.Type))
                {
                    throw new Exception("出库单的状态不是正在执行,不能拣货");
                    if (notice.Status != "3")
                    {
                        throw new Exception("出库单的状态不是正在执行,不能拣货");
                    }
                }
                if (type2.Contains(notice.Type))
                {
                    if (notice.Status != "3" && notice.Status != "4")
                    {
                        throw new Exception("出库单的状态不是正在执行或执行完成,不能拣货");
                    }
                }
                //出库单明细
                var noticeDetail = Db.Queryable<BllExportNoticeDetail>()
@@ -4165,11 +4177,11 @@
                            throw new Exception("该箱码内存在支码不能进行数量拣货");
                        }
                        decimal boxQty = boxInfo.First().Qty;
                        if (Convert.ToInt32(pickQty1) > boxQty)
                        if (decimal.Parse(pickQty1) > boxQty)
                        {
                            throw new Exception("拣货数量不能大于箱内数量");
                        }
                        if (Convert.ToInt32(pickQty1) > needQty)
                        if (decimal.Parse(pickQty1) > needQty)
                        {
                            throw new Exception("拣货数量不能大于剩余待拣数量");
                        }