helongyang
7 小时以前 6f8fe2fc191fb466e3141a6e915d6aa63802c269
更新优化
已修改7个文件
268 ■■■■ 文件已修改
代码管理/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/receiveorderoutbound.vue 156 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue
@@ -58,7 +58,8 @@
        { title: "创建时间", field: "createDate", type: "datetime" },
      ],
      [
        { title: "所属仓库", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}
        { title: "所属仓库", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],},
        { title: "物料编号", field: "materielCode",type: "like",}
      ],
    ]);
    const columns = ref([
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue
@@ -58,7 +58,8 @@
        { title: "创建时间", field: "createDate", type: "datetime" },
      ],
      [
        { title: "所属仓库", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}
        { title: "所属仓库", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],},
        { title: "物料编号", field: "materielCode",type: "like",}
      ],
    ]);
    const columns = ref([
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs
@@ -412,7 +412,20 @@
                List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
                foreach (var item in stockInfos)
                {
                    foreach (var detail in item.Details)
                    {
                        // è¿›è¡Œå®‰å…¨è½¬æ¢
                        if (detail.OutboundQuantity != null && decimal.TryParse(detail.OutboundQuantity.ToString(), out decimal outboundDecimal))
                        {
                            decimal outboundDecimal1 = Convert.ToDecimal(detail.OutboundQuantity);
                        }
                        else
                        {
                            detail.OutboundQuantity = 0; // é»˜è®¤å€¼æˆ–记录错误
                        }
                    }
                    stockInfoDetails.AddRange(item.Details);
                }
                _stockService.StockInfoDetailService.Repository.UpdateData(stockInfoDetails);
                BaseDal.UpdateData(outboundOrderDetails);
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs
@@ -30,6 +30,7 @@
using WIDESEA_DTO.Stock;
using SqlSugar;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
namespace WIDESEA_TaskInfoService
{
@@ -97,6 +98,13 @@
                        PalletType = stockInfo.PalletType,
                        WarehouseId = stockInfo.WarehouseId,
                    };
                    string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                    float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                    if (MaterielCode != null && Quantity != null)
                    {
                        taskOut.MaterielCode = MaterielCode;
                        taskOut.Quantity = Quantity;
                    }
                    stockInfo.StockStatus = (int)StockStatusEmun.出库锁定;
                    LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
                    locationInfo.LocationStatus = (int)LocationStatusEnum.Lock;
@@ -171,6 +179,13 @@
                        PalletType = stockInfo.PalletType,
                        WarehouseId = stockInfo.WarehouseId,
                    };
                    string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                    float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                    if (MaterielCode != null && Quantity != null)
                    {
                        taskOut.MaterielCode = MaterielCode;
                        taskOut.Quantity = Quantity;
                    }
                    stockInfo.StockStatus = (int)StockStatusEmun.出库锁定;
                    LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
                    locationInfo.LocationStatus = (int)LocationStatusEnum.Lock;
@@ -247,6 +262,13 @@
                        PalletType = stockInfo.PalletType,
                        WarehouseId = stockInfo.WarehouseId,
                    };
                    string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                    float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                    if (MaterielCode != null && Quantity != null)
                    {
                        taskOut.MaterielCode = MaterielCode;
                        taskOut.Quantity = Quantity;
                    }
                    stockInfo.StockStatus = (int)StockStatusEmun.出库锁定;
                    LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
                    locationInfo.LocationStatus = (int)LocationStatusEnum.Lock;
@@ -309,6 +331,13 @@
                    PalletType = stockInfo.PalletType,
                    WarehouseId = stockInfo.WarehouseId,
                };
                string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                if (MaterielCode != null && Quantity != null)
                {
                    taskIn.MaterielCode = MaterielCode;
                    taskIn.Quantity = Quantity;
                }
                //更改库存状态
                stockInfo.StockStatus = StockStatusEmun.退库.ObjToInt();
                BaseDal.AddData(taskIn);
@@ -1025,9 +1054,14 @@
                    TaskStatus = TaskStatusEnum.New.ObjToInt(),
                    WarehouseId = stockInfo.WarehouseId,
                    PalletType = stockInfo.PalletType,
                    MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode,
                    Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.StockQuantity,
                };
                string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                if (MaterielCode != null && Quantity != null)
                {
                    newTask.MaterielCode = MaterielCode;
                    newTask.Quantity = Quantity;
                }
                LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
                _unitOfWorkManage.BeginTran();
                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.Lock, LocationChangeType.InboundAssignLocation);
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -97,8 +97,8 @@
                        TaskStatus = TaskStatusEnum.New.ObjToInt(),
                        WarehouseId = stockInfo.WarehouseId,
                        PalletType = stockInfo.PalletType,
                        MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode,
                        Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.StockQuantity,
                        MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode,
                        Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity),
                    };
                    //获取是否存在入库单
                    Dt_InboundOrder? inboundOrder =  null;
@@ -334,8 +334,16 @@
                        TaskStatus = TaskStatusEnum.New.ObjToInt(),
                        WarehouseId = stockInfoPPorGM.WarehouseId,
                        PalletType = stockInfoPPorGM.PalletType,
                        TaskLength= stockInfoPPorGM.StockLength
                        TaskLength= stockInfoPPorGM.StockLength,
                    };
                    string MaterielCodeGMPP = stockInfoPPorGM.Details?.Where(x => x.StockId == stockInfoPPorGM.Id).FirstOrDefault()?.MaterielCode;
                    float QuantityGMPP = (float)stockInfoPPorGM.Details?.Where(x => x.StockId == stockInfoPPorGM.Id).Sum(x => x.StockQuantity);
                    if (MaterielCodeGMPP != null && QuantityGMPP != null)
                    {
                        newTaskPPorGM.MaterielCode = MaterielCodeGMPP;
                        newTaskPPorGM.Quantity = QuantityGMPP;
                    }
                    //获取是否存在入库单
                    Dt_InboundOrder? inboundOrderPPorGM = null;
@@ -403,6 +411,13 @@
                    WarehouseId = stockInfo.WarehouseId,
                    PalletType = stockInfo.PalletType,
                };
                string MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                float Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                if (MaterielCode != null && Quantity != null)
                {
                    newTask.MaterielCode = MaterielCode;
                    newTask.Quantity = Quantity;
                }
                //获取是否存在入库单
                Dt_InboundOrder? inboundOrder = null;
@@ -433,6 +448,7 @@
                }
                else if (stockInfo.StockStatus == StockStatusEmun.拣选完成.ObjToInt())
                {
                    stockInfo.StockStatus = StockStatusEmun.入库确认.ObjToInt();
                    newTask.TaskType = TaskTypeEnum.InPick.ObjToInt();
                }
                else
@@ -482,8 +498,7 @@
                {
                    return WebResponseContent.Instance.Error($"该站点已有未执行的任务");
                }
                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == palletCode);
                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
                if (stockInfo == null)
                {
                    return WebResponseContent.Instance.Error($"未找到组盘信息");
@@ -511,7 +526,13 @@
                    WarehouseId = stockInfo.WarehouseId,
                    PalletType = stockInfo.PalletType,
                };
                string MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                float Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                if (MaterielCode != null && Quantity != null)
                {
                    newTask.MaterielCode = MaterielCode;
                    newTask.Quantity = (float)Quantity;
                }
                if (stockInfo.StockStatus == StockStatusEmun.手动组盘暂存.ObjToInt())
                {
@@ -582,7 +603,7 @@
                string roadwayNo = AssignRoadwayNo(staions, palletCode, heightType);
                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == palletCode);
                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
                if (stockInfo == null)
                {
                    return WebResponseContent.Instance.Error($"未找到组盘信息");
@@ -610,7 +631,13 @@
                    WarehouseId = stockInfo.WarehouseId,
                    PalletType = stockInfo.PalletType,
                };
                string MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                float Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                if (MaterielCode != null && Quantity != null)
                {
                    newTask.MaterielCode = MaterielCode;
                    newTask.Quantity = Quantity;
                }
                if (stockInfo.StockStatus == StockStatusEmun.手动组盘暂存.ObjToInt())
                {
                    stockInfo.StockStatus = StockStatusEmun.手动组盘入库确认.ObjToInt();
@@ -824,7 +851,9 @@
                    TaskType = palletTypeInfo.LocaitonCount==2? (int)TaskTypeEnum.InZHProductLarge : (int)TaskTypeEnum.InZHProductSmall,
                    TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                    PalletType = palletTypeInfo.PalletType,
                    WarehouseId = warehouse.WarehouseId
                    WarehouseId = warehouse.WarehouseId,
                    MaterielCode = mesLotInfo.Product,
                    Quantity = (float)mesLotInfo.Qty,
                };
                _unitOfWorkManage.BeginTran();
                Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand();
@@ -936,8 +965,8 @@
                    TaskStatus = TaskStatusEnum.New.ObjToInt(),
                    WarehouseId = warePoint.WarehouseId,
                    PalletType = proStockInfo.PalletType,
                    MaterielCode = proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.ProductCode,
                    Quantity = (float)proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty)
                    MaterielCode = proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.ProductCode,
                    Quantity = (float)proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty)
                };
                _unitOfWorkManage.BeginTran();
                int taskId = BaseDal.AddData(newTask);
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -531,8 +531,8 @@
                        };
                        if (taskType != TaskTypeEnum.OutEmpty)
                        {
                            task.MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                            task.Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.StockQuantity;
                            task.MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                            task.Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                        }
                        if (stockInfo.StockLength>0)
                        {
´úÂë¹ÜÀí/»´°²PDA/pages/stash/receiveorderoutbound.vue
@@ -177,6 +177,7 @@
    import {
        config
    } from '../../common/config';
import message from '../../tuniao-ui/libs/function/message';
    const innerAudioContext = uni.createInnerAudioContext();
    export default {
        data() {
@@ -230,7 +231,9 @@
                endTypeRange: [],
                sns: "",
                receiveOrderId: 0,
                warehouseId:""
                warehouseId:"",
                toastQueue: [], // æç¤ºé˜Ÿåˆ—
                isShowingToast: false
            }
        },
@@ -260,6 +263,29 @@
            }
        },
        methods: {
            showToast(options) {
                        this.toastQueue.push(options);
                        this.processToastQueue();
                    },
                    // å¤„理提示队列
                    processToastQueue() {
                        // å¦‚果正在显示提示或队列为空,则不执行
                        if (this.isShowingToast || this.toastQueue.length === 0) return;
                        this.isShowingToast = true;
                        const toastOptions = this.toastQueue.shift();
                        // æ˜¾ç¤ºæç¤º
                        this.$refs.uToast.show({
                            ...toastOptions,
                            complete: () => {
                                // æç¤ºå…³é—­åŽå¤„理下一个
                                this.isShowingToast = false;
                                this.processToastQueue();
                            }
                        });
                    },
            inputDialogToggle(itemCode) {
                this.itemCode = itemCode;
                this.$refs.inputDialog.open()
@@ -376,53 +402,91 @@
                });
            },
            submit() {
                if (this.sns == "") {
                    this.$refs.uToast.show({
                        title: "请扫描内箱标签",
                        type: 'error'
                // æå–生产日期(格式为"生产日期:YYYY-MM")
                const productionDateStr = this.ProductionDate.replace('生产日期:', '');
                if (!productionDateStr) {
                    this.showToast({
                        title: "未获取到生产日期",
                        type: 'error'
                    });
                    return;
                }
                // è§£æžç”Ÿäº§æ—¥æœŸçš„年月
                const [prodYear, prodMonth] = productionDateStr.split('-').map(Number);
                // èŽ·å–å½“å‰æ—¥æœŸçš„å¹´æœˆ
                const currentDate = new Date();
                const currentYear = currentDate.getFullYear();
                const currentMonth = currentDate.getMonth() + 1;
                // æ¯”较年月是否一致
                const isDateMismatch = prodYear !== currentYear || prodMonth !== currentMonth;
                if (isDateMismatch) {
                    this.showToast({
                        title: "该物料生产日期的年月与当前年月不一致",
                        type: 'warning',
                        duration: 1500
                    });
                }
                // åŽŸæœ‰çš„ç¡®è®¤æ”¶è´§é€»è¾‘
                if (this.sns == "") {
                    this.$refs.uToast.show({
                        title: "请扫描内箱标签",
                        type: 'error'
                    })
                    return;
                }
                if (this.Quantity == "") {
                    this.$refs.uToast.show({
                        title: "请输入实际数量",
                        type: 'error'
                    })
                    return;
                }
                if(this.warehouseId==2){
                    //替换指定两个字符间的字符
                    this.sns = this.sns.replace(/(Q:)([^,PO]+)(,PO)/, (match, p1, p2, p3) => {
                        return p1 + this.Quantity + p3;
                    });
                }
                const sendRequest = () => {
                    this.$u.post('/api/ReceiveOrderDetail/AddReceiveOrderDetail?serNum=' + this.sns + '&orderNo=' + this
                        .orderNo, {}).then(res => {
                        if (res.status) {
                            this.PurchaseOrderNo="采购单号:";
                            this.matCode="物料编码:";
                            this.LotNo="物料批次:";
                            this.orderQty="订单数量:";
                            this.ProductionDate="生产日期:";
                            this.EffectiveDate="有效日期:";
                            this.Quantity="";
                            setTimeout(() => {
                                this.innerCode="";
                                this.focus=false;
                            }, 100);
                            this.orderInfo=[];
                            this.sns = "";
                            this.$refs.uToast.show({
                                title:"确认收货成功",
                                type: "success"
                            })
                        } else {
                            this.$refs.uToast.show({
                                title: res.message,
                                type: "error"
                            })
                        }
                    })
                    return;
                };
                // å¦‚果有日期不匹配提示,等待提示完成后发送请求
                if (isDateMismatch) {
                    setTimeout(sendRequest, 1500); // ç­‰å¾…1.5秒(与提示时长一致)
                } else {
                    sendRequest(); // æ²¡æœ‰æ—¥æœŸæç¤ºï¼Œç«‹å³å‘送请求
                }
                if (this.Quantity == "") {
                    this.$refs.uToast.show({
                        title: "请输入实际数量",
                        type: 'error'
                    })
                    return;
                }
                if(this.warehouseId==2){
                    //替换指定两个字符间的字符
                    this.sns = this.sns.replace(/(Q:)([^,PO]+)(,PO)/, (match, p1, p2, p3) => {
                      return p1 + this.Quantity + p3;
                    });
                }
                this.$u.post('/api/ReceiveOrderDetail/AddReceiveOrderDetail?serNum=' + this.sns + '&orderNo=' + this
                    .orderNo, {}).then(res => {
                    if (res.status) {
                        this.PurchaseOrderNo="采购单号:";
                        this.matCode="物料编码:";
                        this.LotNo="物料批次:";
                        this.orderQty="订单数量:";
                        this.ProductionDate="生产日期:";
                        this.EffectiveDate="有效日期:";
                        this.Quantity="";
                        setTimeout(() => {
                            this.innerCode="";
                            this.focus=false;
                        }, 100);
                        this.orderInfo=[];
                        this.sns = "";
                        this.$refs.uToast.show({
                            title: "确认收货成功",
                            type: "success"
                        })
                    } else {
                        this.$refs.uToast.show({
                            title: res.message,
                            type: "error"
                        })
                    }
                })
            },
            submit1() {
                this.$u.post('/api/ReceiveOrder/FeedbackReceiveOrder?orderId=' + this