dengjunjie
2025-10-26 7bfa3796ce60a29c4fe2244a7b7a553149773483
优化PDA功能
已修改6个文件
109 ■■■■ 文件已修改
新建文件夹/PDA/pages/stash/CheckFinish.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/PDA/pages/stash/CheckoutorderDetail.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/PDA/pages/stash/outboundorderDetail.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/Business.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
н¨Îļþ¼Ð/PDA/pages/stash/CheckFinish.vue
@@ -470,9 +470,15 @@
                            title: "盘点成功",
                            type: "success"
                        })
                        this.Inqty=res.message;
                        // this.Inqty=res.message;
                        // this.order_Inqty="已出库数量:"+this.Inqty;
                        this.barcode="";
                        uni.setStorageSync('checkTask',true);
                        setTimeout(() => {
                            uni.navigateBack({
                                delta: 1
                            });
                        }, 600);
                        // this.materSn="";
                    } else {
                        this.$refs.uToast.show({
н¨Îļþ¼Ð/PDA/pages/stash/CheckoutorderDetail.vue
@@ -40,6 +40,7 @@
                orderNo: "",
                pageNo: 1,
                scrollTop: 0,
                checkTask: false,
                warehouseId: ""
            }
        },
@@ -53,6 +54,15 @@
        onReachBottom() {
            this.pageNo += 1;
            this.getData();
        },
        onShow() {
            this.checkTask = uni.getStorageSync('checkTask');
            if (this.checkTask) {
                uni.removeStorageSync('checkTask');
                this.pageNo = 1;
                // ä»Žå…¶ä»–页面返回时刷新
                this.getData();
            }
        },
        onPageScroll(e) {
            this.scrollTop = e.scrollTop;
@@ -100,6 +110,25 @@
                                this.status = 'noMore';
                                //this.allReceivingOrders = [];
                                this.loadVisible = true;
                            if (this.allReceivingOrders.length < 1) {
                                uni.showModal({
                                    title: '提示',
                                    content: '盘点已完成,是否返回首页?',
                                    success: (res) => {
                                        if (res.confirm) {
                                            // ç”¨æˆ·ç‚¹å‡»ç¡®å®š
                                            setTimeout(() => {
                                                uni.navigateBack({
                                                    delta: 2
                                                });
                                            }, 500);
                                        } else {
                                            // ç”¨æˆ·ç‚¹å‡»å–消,可以停留在当前页面
                                            // æˆ–者执行其他操作
                                        }
                                    }
                                });
                            }
                            }
                        }
                    })
н¨Îļþ¼Ð/PDA/pages/stash/outboundorderDetail.vue
@@ -59,6 +59,7 @@
            this.outTask = uni.getStorageSync('outTask');
            if (this.outTask) {
                uni.removeStorageSync('outTask');
                this.pageNo = 1;
                // ä»Žå…¶ä»–页面返回时刷新
                this.getData();
            }
@@ -148,12 +149,25 @@
                                this.status = 'noMore';
                                //this.allReceivingOrders = [];
                                this.loadVisible = true;
                                uni.setStorageSync('isout',true);
                            if (this.allReceivingOrders.length < 1) {
                                uni.showModal({
                                    title: '提示',
                                    content: '出库已完成,是否返回首页?',
                                    success: (res) => {
                                        if (res.confirm) {
                                            // ç”¨æˆ·ç‚¹å‡»ç¡®å®š
                                setTimeout(() => {
                                    uni.navigateBack({
                                        delta: 1
                                                    delta: 2
                                    });
                                }, 600);
                                            }, 500);
                                        } else {
                                            // ç”¨æˆ·ç‚¹å‡»å–消,可以停留在当前页面
                                            // æˆ–者执行其他操作
                                        }
                                    }
                                });
                            }
                            }
                        }
                    })
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/Business.cs
@@ -97,20 +97,21 @@
                    return responseContent.OK("所有入库单已存在,无需新增");
                }
                _unitOfWorkManage.BeginTran();
                try
                {
                    List<Dt_CabinOrder> _CabinOrders = new List<Dt_CabinOrder>();
                    //存储入库单号
                    List<string> orderNos = new List<string>();
                    foreach (var order in newOrders)
                    {
                    try
                    {
                        _unitOfWorkManage.BeginTran();
                        if (order.order_type == "1") //正常入库
                        {
                            responseContent = _cabinOrderServices.CreateInboundOrder(order);
                            if (!responseContent.Status) throw new Exception(responseContent.Message);
                            List<Dt_CabinOrder>? dt_CabinOrders = responseContent.Data as List<Dt_CabinOrder>;
                            if (dt_CabinOrders != null) _CabinOrders.AddRange(dt_CabinOrders);
                            if (dt_CabinOrders != null)
                                _cabinOrderServices.Db.InsertNav(dt_CabinOrders).Include(x => x.Details).ExecuteCommand();
                        }
                        else if (order.order_type == "3")//入库退料
                        {
@@ -134,21 +135,16 @@
                                };
                                upstramOutOrderInfo.details.Add(detail);
                            }
                            _deliveryOrderServices.CreateOutboundOrder(upstramOutOrderInfo);
                            var content = _deliveryOrderServices.CreateOutboundOrder(upstramOutOrderInfo);
                            if (!content.Status) throw new Exception(content.Message);
                            #endregion
                        }
                        else if (order.order_type == "5")//报溢入库
                        {
                            _cabinOrderServices.CreateCheckInOrder(order);
                            var content = _cabinOrderServices.CreateCheckInOrder(order);
                            if (!content.Status) throw new Exception(content.Message);
                        }
                    };
                    _cabinOrderServices.Db.InsertNav(_CabinOrders).Include(x => x.Details).ExecuteCommand();
                    //在下发给wcs
                    //EdiIn(); //发给下游
                    //如果这个方法成功了,那么就调用CompleteOrder接口,然后改变
                    _unitOfWorkManage.CommitTran();
                    return responseContent.OK("同步入库单成功");
                }
                catch (Exception ex)
                {
@@ -156,6 +152,13 @@
                    SendErrorToUpstream(1, "", ex.Message, "");
                    return responseContent.Error("同步失败: " + ex.Message);
                }
                };
                //在下发给wcs
                //EdiIn(); //发给下游
                //如果这个方法成功了,那么就调用CompleteOrder接口,然后改变
                return responseContent.OK("同步入库单成功");
            }
            catch (Exception ex)
            {
@@ -225,7 +228,8 @@
                    {
                        if (outorder.order_type == "1") // æ­£å¸¸å‡ºåº“单
                        {
                            _deliveryOrderServices.CreateOutboundOrder(outorder);//创建出库单、处理库存、添加出库任务
                            var content = _deliveryOrderServices.CreateOutboundOrder(outorder);
                            if (!content.Status) throw new Exception(content.Message);
                        }
                        else if (outorder.order_type == "2")//出库退货
                        {
@@ -252,6 +256,7 @@
                                order.details.Add(detail);
                            }
                            responseContent = _cabinOrderServices.CreateInboundOrder(order);
                            if (!responseContent.Status) throw new Exception(responseContent.Message);
                            List<Dt_CabinOrder>? dt_CabinOrders = responseContent.Data as List<Dt_CabinOrder>;
                            if (dt_CabinOrders != null && dt_CabinOrders.Count > 0)
                                _cabinOrderServices.Db.InsertNav(dt_CabinOrders).Include(x => x.Details).ExecuteCommand();
@@ -259,7 +264,8 @@
                        }
                        else if (outorder.order_type == "6")//报损出库
                        {
                            _deliveryOrderServices.CreateCheckOutOrder(outorder);
                            var content = _deliveryOrderServices.CreateCheckOutOrder(outorder);
                            if (!content.Status) throw new Exception(content.Message);
                        }
                    }
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs
@@ -858,7 +858,7 @@
                Dt_SupplyTask supplyTask = _supplyTaskService.Repository.QueryFirst(x => x.TaskId == TaskId && x.TaskStatus == SupplyStatusEnum.NewOut.ObjToInt());
                if (supplyTask == null) throw new Exception("当前出库任务已完成");
                if (supplyTask.LocationCode != LocationCode) throw new Exception($"当前出库货位【{LocationCode}】与任务分配货位不匹配");
                OutTaskFinish(supplyTask);
                content = OutTaskFinish(supplyTask);
            }
            catch (Exception ex)
            {
@@ -872,11 +872,10 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_DeliveryOrder cabinOrder = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == supplyTask.OrderNo && x.Warehouse_no == supplyTask.WarehouseCode).Includes(x => x.Details).First();
                Dt_DeliveryOrder? cabinOrder = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == supplyTask.OrderNo && x.Warehouse_no == supplyTask.WarehouseCode).Includes(x => x.Details).First();
                if (cabinOrder == null) return WebResponseContent.Instance.Error($"出库单已完成");
                Dt_DeliveryOrderDetail cabinOrderDetail = cabinOrder.Details.Where(x => x.Batch_num == supplyTask.BatchNo && x.Reservoirarea == supplyTask.WarehouseCode && x.Goods_no == supplyTask.MaterielCode).First();
                Dt_DeliveryOrderDetail? cabinOrderDetail = cabinOrder.Details.Where(x => x.Batch_num == supplyTask.BatchNo && x.Reservoirarea == supplyTask.WarehouseCode && x.Goods_no == supplyTask.MaterielCode).FirstOrDefault();
                if (cabinOrderDetail == null) return WebResponseContent.Instance.Error($"出库单明细已完成");
                Dt_MaterielInfo materielInfo = _basicService.MaterielInfoService.Repository.QueryFirst(x => x.MaterielCode == cabinOrderDetail.Goods_no);
                if (materielInfo == null) return WebResponseContent.Instance.Error($"请维护物料编号【{cabinOrderDetail.Goods_no}】的物料信息");
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.StockEnum;
@@ -351,7 +352,8 @@
                                    #endregion
                                    #region å¤„理出库单、库存信息、出库任务、调拨任务
                                    _deliveryOrderServices.OutTaskFinish(supplyTask);
                                    var content = _deliveryOrderServices.OutTaskFinish(supplyTask);
                                    if (!content.Status) throw new Exception(content.Message);
                                    #endregion
                                }
                            }
@@ -375,7 +377,8 @@
                                {
                                    supplyTask.SupplyQuantity = supplyTask.StockQuantity;
                                }
                                _deliveryOrderServices.CheckTaskFinish(supplyTask);
                                var content = _deliveryOrderServices.CheckTaskFinish(supplyTask);
                                if (!content.Status) throw new Exception(content.Message);
                            }
                            break;
                    }