dengjunjie
5 天以前 1c8f0035e164e9780d8c35a32fc1524d67ff9d9d
优化PDA入库
已修改5个文件
74 ■■■■■ 文件已修改
新建文件夹/PDA/pages/stash/inboundorderDetail.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/PDA/pages/stash/raworderboxing.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Allocat.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
н¨Îļþ¼Ð/PDA/pages/stash/inboundorderDetail.vue
@@ -7,8 +7,8 @@
        </u-sticky> -->
        <uni-list :border="true">
            <uni-list-item direction="column" clickable @click="groupClick(item.batch_num)" link
                :to="page+item.batch_num+'&order_qty='+item.order_qty+'&order_Inqty='+item.order_Inqty+'&goods_no='+item.goods_no"
                v-for="item in allReceivingOrders" :key="item.batch_num">
                :to="page+item.batch_num+'&order_qty='+item.order_qty+'&order_Inqty='+item.order_Inqty+'&goods_no='+item.goods_no+'&id='+item.id"
                v-for="item in allReceivingOrders" :key="item.id">
                <template v-slot:body>
                    <uni-group margin-top="20">
                        <view> å•据编号:{{orderNo}} </view>
н¨Îļþ¼Ð/PDA/pages/stash/raworderboxing.vue
@@ -137,7 +137,7 @@
                matInfos: [],
                orderNo: "",
                batchNo: "",
                materielCode:"",
                materielCode: "",
                orderqty: 0,
                Inqty: 0,
                goods_no: "",
@@ -161,6 +161,7 @@
                matInfo: [],
                value2: "",
                matTotals: [],
                id: "",
                warehouseId: "",
                Test: false,
                Testlabel: "",
@@ -174,12 +175,13 @@
        onShow() {},
        onLoad(res) {
            this.focus = false;
            this.id = res.id;
            this.addressFocus = false;
            this.orderNo = res.orderNo;
            this.Inqty = res.order_Inqty;
            this.orderqty = res.order_qty;
            this.batchNo = res.batchNo;
            this.materielCode=res.goods_no;
            this.materielCode = res.goods_no;
            this.warehouseId = res.warehouseId;
            this.label = "单据编号:" + this.orderNo;
            this.batch_num = "批次号:" + res.batchNo;
@@ -460,9 +462,10 @@
                this.$u.post('/api/CabinOrder/FeedbackIn', {
                    MainData: {
                        "LocationCode": this.barcode,
                        "id":this.id,
                        "warehouseCode": this.warehouseId,
                        "orderNo": this.orderNo,
                        "materielCode":this.materielCode,
                        "materielCode": this.materielCode,
                        "Inqty": this.materSn,
                        "batchNo": this.batchNo,
                    },
@@ -523,18 +526,18 @@
                // æˆ–者直接跳转(不询问用户)
                setTimeout(() => {
                // æ–¹å¼2:跳转到指定页面
                // uni.redirectTo({
                //     url: '/pages/order/list' // æ›¿æ¢ä¸ºä½ çš„目标页面路径
                // });
                // æ–¹å¼3:跳转到首页
                // uni.switchTab({
                //     url: '/pages/index/index'
                // });
                // æ–¹å¼1:使用uni.navigateBack返回上一页
                    uni.navigateBack({
                        delta: 1
                    });
                    // æ–¹å¼2:跳转到指定页面
                    // uni.redirectTo({
                    //     url: '/pages/order/list' // æ›¿æ¢ä¸ºä½ çš„目标页面路径
                    // });
                    // æ–¹å¼3:跳转到首页
                    // uni.switchTab({
                    //     url: '/pages/index/index'
                    // });
                    // æ–¹å¼1:使用uni.navigateBack返回上一页
                    uni.navigateBack({
                        delta: 1
                    });
                }, 600);
            }
        }
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs
@@ -125,13 +125,15 @@
                var LocationCode = saveModel.MainData["LocationCode"].ToString();
                var orderNo = saveModel.MainData["orderNo"].ToString();
                var batchNo = saveModel.MainData["batchNo"].ToString();
                var id = saveModel.MainData["id"].ObjToInt();
                var materielCode = saveModel.MainData["materielCode"].ToString();
                var Inqty = saveModel.MainData["Inqty"].ObjToInt();
                var warehouseCode = saveModel.MainData["warehouseCode"].ToString();
                Dt_CabinOrder cabinOrder = BaseDal.Db.Queryable<Dt_CabinOrder>().Where(x => x.Order_no == orderNo && x.Warehouse_no == warehouseCode).Includes(x => x.Details).First();
                if (cabinOrder == null || cabinOrder.OdrderStatus == "已完成")
                    return WebResponseContent.Instance.Error($"入库单已完成");
                Dt_CabinOrderDetail cabinOrderDetail = cabinOrder.Details.Where(x => x.Goods_no == materielCode && x.Batch_num == batchNo && x.Status == 2).FirstOrDefault();
                //Dt_CabinOrderDetail cabinOrderDetail = cabinOrder.Details.Where(x => x.Goods_no == materielCode && x.Batch_num == batchNo && x.Status == 2).FirstOrDefault();
                Dt_CabinOrderDetail cabinOrderDetail = cabinOrder.Details.Where(x => x.Id == id).FirstOrDefault();
                if (cabinOrderDetail == null || cabinOrderDetail.OrderDetailStatus == "已完成")
                    return WebResponseContent.Instance.Error($"入库单明细已完成");
                Dt_MaterielInfo materielInfo = _materielInfoService.Repository.QueryFirst(x => x.MaterielCode == cabinOrderDetail.Goods_no);
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs
@@ -979,12 +979,6 @@
                    inventory_Batch.OutboundQuantity -= supplyTask.StockQuantity;
                }
                #endregion
                if (supplyTask.WarehouseCode == WarehouseEnum.立库.ObjToInt().ToString("000"))
                {
                    materielInfo.Business_qty -= supplyTask.StockQuantity;
                    if (materielInfo.Business_qty < materielInfo.MinQty)
                        CreateAllocatInOut(materielInfo);//创建调拨任务
                }
                supplyTask.TaskStatus = SupplyStatusEnum.OutFinish.ObjToInt();
                _unitOfWorkManage.BeginTran();
@@ -1000,13 +994,20 @@
                if (location != null) _locationInfoService.UpdateData(location);
                _deliveryOrderDetailServices.UpdateData(cabinOrderDetail);
                _supplyTaskService.Repository.DeleteAndMoveIntoHty(supplyTask, OperateTypeEnum.人工完成);
                _unitOfWorkManage.CommitTran();
                #region åˆ¤æ–­è¯¦æƒ…是否全部完成
                if (!_deliveryOrderDetailServices.Repository.QueryData(x => x.DeliveryOrderId == deliveryOrder.Id && x.OotDetailStatus != "已完成").Any())
                    deliveryOrder.OutStatus = "已完成";
                BaseDal.UpdateData(deliveryOrder);
                if (supplyTask.WarehouseCode == WarehouseEnum.立库.ObjToInt().ToString("000"))
                {
                    materielInfo.Business_qty -= supplyTask.StockQuantity;
                    if (materielInfo.Business_qty < materielInfo.MinQty)
                        CreateAllocatInOut(materielInfo);//创建调拨任务
                }
                #endregion
                _unitOfWorkManage.CommitTran();
                content.OK();
            }
            catch (Exception ex)
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Allocat.cs
@@ -37,7 +37,7 @@
                List<Dt_SupplyTask> supplyTasks = new List<Dt_SupplyTask>();
                //// æŸ¥è¯¢å¤§ä»¶åº“中可用的库存
                List<Dt_InventoryInfo> dt_InventoryInfos = _inventoryInfoService.Repository.QueryData(x => x.MaterielCode == materielInfo.MaterielCode && x.StockStatus == StockStatusEmun.入库完成.ObjToInt() && x.AvailableQuantity > 0 && x.WarehouseCode == WareCode);
                if (dt_InventoryInfos.Count < 1) throw new Exception($"物料编号【{materielInfo.MaterielCode}】大件库无库存!");
                if (dt_InventoryInfos.Count < 1) throw new Exception($"物料编号【{materielInfo.MaterielCode}】大件库无库存!请及时补充库存!");
                if (tactics.SelectTactice == TacticsEnum.ComeOutonFirstTime.ObjToInt())
                    dt_InventoryInfos = dt_InventoryInfos.OrderBy(x => x.ValidityPeriod).ToList();
                else
@@ -59,7 +59,11 @@
                //添加报警信息
                if (materielInfo.Business_qty < materielInfo.MinQty)
                {
                    _messageInfoService.AddMessageInfo(MessageGroupByEnum.InventoryLowAlarm, $"物料名称:{materielInfo.MaterielName}", $"【物料编码{materielInfo.MaterielCode}大件库库存过低】");
                    _messageInfoService.AddMessageInfo(MessageGroupByEnum.InventoryLowAlarm, $"物料名称:{materielInfo.MaterielName}", $"【物料编码{materielInfo.MaterielCode}已生成调拨出入库单,请进行出入库流程。大件库库存过低!请及时补充库存!】");
                }
                else
                {
                    _messageInfoService.AddMessageInfo(MessageGroupByEnum.InventoryLowAlarm, $"物料名称:{materielInfo.MaterielName}", $"【物料编码{materielInfo.MaterielCode}已生成调拨出入库单,请进行出入库流程】");
                }
                #endregion
                #region æ·»åŠ è°ƒæ‹¨å‡ºåº“å•
@@ -138,17 +142,17 @@
                }
                #endregion
                _unitOfWorkManage.BeginTran();
                //_unitOfWorkManage.BeginTran();
                _materielInfoService.UpdateData(materielInfo);
                _inventoryInfoService.Repository.UpdateData(dt_InventoryInfos);
                _supplyTaskService.AddData(supplyTasks);
                BaseDal.Db.InsertNav(deliveryOrder).Include(x => x.Details).ExecuteCommand();
                _cabinOrderServices.Repository.Db.InsertNav(cabinOrder).Include(x => x.Details).ExecuteCommand();
                _unitOfWorkManage.CommitTran();
                if (deliveryOrder.Details.Count > 1) BaseDal.Db.InsertNav(deliveryOrder).Include(x => x.Details).ExecuteCommand();
                if (cabinOrder.Details.Count > 1) _cabinOrderServices.Repository.Db.InsertNav(cabinOrder).Include(x => x.Details).ExecuteCommand();
                //_unitOfWorkManage.CommitTran();
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                //_unitOfWorkManage.RollbackTran();
                _messageInfoService.AddMessageInfo(MessageGroupByEnum.InventoryLowAlarm, "大件库补货立库", ex.Message);
                response.Error(ex.Message);
            }