From 753361f589444455fe1b20476c658201ccd92c38 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期三, 30 七月 2025 09:53:19 +0800
Subject: [PATCH] 更新优化

---
 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue |   14 +++++++
 代码管理/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue                     |   11 +++++
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs |    4 +
 代码管理/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue                 |   10 ++++
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs       |   20 +++++++--
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs          |    1 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs    |    3 +
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs        |    7 +++
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs  |   24 +++++++++---
 9 files changed, 79 insertions(+), 15 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue"
index 9dcd95e..3288df8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue"
@@ -166,6 +166,20 @@
           width: 180,
         },
         {
+        prop: "productionDate",
+        title: "鐢熶骇鏃ユ湡",
+        type: "string",
+        width: 160,
+        
+        },
+        {
+          prop: "effectiveDate",
+          title: "鏈夋晥鏈�",
+          type: "string",
+          width: 160,
+    
+        },
+        {
           prop: "status",
           title: "鐘舵��",
           type: "string",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
index f9d81d1..f1c3cfe 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
@@ -59,7 +59,9 @@
       ],
       [
         { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],},
-        { title: "鐗╂枡缂栧彿", field: "materielCode",type: "like",}
+        { title: "鐗╂枡缂栧彿", field: "materielCode",type: "like",},
+        {title: "鐗╂枡鎵规",field: "batchNo",type: "like",},
+      
       ],
     ]);
     const columns = ref([
@@ -240,6 +242,13 @@
         width: 100,
         align: "left",
       },
+      {
+        field: "batchNo",
+        title: "鐗╂枡鎵规",
+        type: "string",
+        width: 150,
+        align: "left",
+      },
     ]);
     const detail = ref({
       cnName: "#detailCnName",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
index 0cf7e08..cbebea4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
@@ -59,7 +59,8 @@
       ],
       [
         { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],},
-        { title: "鐗╂枡缂栧彿", field: "materielCode",type: "like",}
+        { title: "鐗╂枡缂栧彿", field: "materielCode",type: "like",},
+        {title: "鐗╂枡鎵规",field: "batchNo",type: "like",},
       ],
     ]);
     const columns = ref([
@@ -240,6 +241,13 @@
         width: 100,
         align: "left",
       },
+      {
+        field: "batchNo",
+        title: "鐗╂枡鎵规",
+        type: "string",
+        width: 150,
+        align: "left",
+      },
     ]);
     const detail = ref({
       cnName: "#detailCnName",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
index 98c26f7..e5c270d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
@@ -169,5 +169,12 @@
         [ExporterHeader(DisplayName = "鐗╂枡鏁伴噺")]
         [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "鐗╂枡鏁伴噺")]
         public float Quantity { get; set; }
+        /// <summary>
+        /// 鐗╂枡鎵规
+        /// </summary>
+        [ImporterHeader(Name = "鐗╂枡鎵规")]
+        [ExporterHeader(DisplayName = "鐗╂枡鎵规")]
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鐗╂枡鎵规")]
+        public string BatchNo { get; set; }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs"
index f95c73e..beee760 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs"
@@ -165,7 +165,8 @@
                     WarehouseId = warehouse.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)
+                    Quantity = (float)proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty),
+                    BatchNo = proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.LotNumber,
                 };
                 _unitOfWorkManage.BeginTran();
                 int taskId = BaseDal.AddData(newTask);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index ffd078d..21da66a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -100,10 +100,12 @@
                     };
                     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)
+                    string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
+                    if (MaterielCode != null && Quantity != null && BatchNo != null)
                     {
                         taskOut.MaterielCode = MaterielCode;
                         taskOut.Quantity = Quantity;
+                        taskOut.BatchNo = BatchNo;
                     }
                     stockInfo.StockStatus = (int)StockStatusEmun.鍑哄簱閿佸畾;
                     LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
@@ -181,10 +183,12 @@
                     };
                     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)
+                    string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
+                    if (MaterielCode != null && Quantity != null && BatchNo != null)
                     {
                         taskOut.MaterielCode = MaterielCode;
                         taskOut.Quantity = Quantity;
+                        taskOut.BatchNo = BatchNo;
                     }
                     stockInfo.StockStatus = (int)StockStatusEmun.鍑哄簱閿佸畾;
                     LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
@@ -264,10 +268,12 @@
                     };
                     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)
+                    string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
+                    if (MaterielCode != null && Quantity != null && BatchNo != null)
                     {
                         taskOut.MaterielCode = MaterielCode;
                         taskOut.Quantity = Quantity;
+                        taskOut.BatchNo = BatchNo;
                     }
                     stockInfo.StockStatus = (int)StockStatusEmun.鍑哄簱閿佸畾;
                     LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
@@ -333,10 +339,12 @@
                 };
                 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)
+                string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
+                if (MaterielCode != null && Quantity != null && BatchNo != null)
                 {
                     taskIn.MaterielCode = MaterielCode;
                     taskIn.Quantity = Quantity;
+                    taskIn.BatchNo = BatchNo;
                 }
                 //鏇存敼搴撳瓨鐘舵��
                 stockInfo.StockStatus = StockStatusEmun.閫�搴�.ObjToInt();
@@ -1059,10 +1067,12 @@
                 };
                 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)
+                string BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
+                if (MaterielCode != null && Quantity != null && BatchNo != null)
                 {
                     newTask.MaterielCode = MaterielCode;
                     newTask.Quantity = Quantity;
+                    newTask.BatchNo = BatchNo;
                 }
                 LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
                 _unitOfWorkManage.BeginTran();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index f671669..7ba7bb8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -213,6 +213,7 @@
                     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,
+                    BatchNo = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo
                 };
                 _unitOfWorkManage.BeginTran();
                 BaseDal.AddData(newTask);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index 3deae56..c1b9d98 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -100,6 +100,7 @@
                         PalletType = stockInfo.PalletType,
                         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),
+                        BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo
                     };
                     //鑾峰彇鏄惁瀛樺湪鍏ュ簱鍗�
                     Dt_InboundOrder? inboundOrder =  null;
@@ -395,10 +396,12 @@
                     };
                     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)
+                    string batchNo = stockInfoPPorGM.Details?.Where(x => x.StockId == stockInfoPPorGM.Id).FirstOrDefault()?.BatchNo;
+                    if (MaterielCodeGMPP != null && QuantityGMPP != null && batchNo != null)
                     {
                         newTaskPPorGM.MaterielCode = MaterielCodeGMPP;
                         newTaskPPorGM.Quantity = QuantityGMPP;
+                        newTaskPPorGM.BatchNo = batchNo;
                     }
 
                     //鑾峰彇鏄惁瀛樺湪鍏ュ簱鍗�
@@ -469,10 +472,12 @@
                 };
                 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)
+                string BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
+                if (MaterielCode != null && Quantity != null && BatchNo != null)
                 {
                     newTask.MaterielCode = MaterielCode;
                     newTask.Quantity = Quantity;
+                    newTask.BatchNo = BatchNo;
                 }
 
                 //鑾峰彇鏄惁瀛樺湪鍏ュ簱鍗�
@@ -594,10 +599,12 @@
                 };
                 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)
+                string BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
+                if (MaterielCode != null && Quantity != null && BatchNo != null)
                 {
                     newTask.MaterielCode = MaterielCode;
-                    newTask.Quantity = (float)Quantity;
+                    newTask.Quantity = Quantity;
+                    newTask.BatchNo = BatchNo;
                 }
 
                 if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
@@ -700,10 +707,12 @@
                 };
                 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)
+                string BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
+                if (MaterielCode != null && Quantity != null && BatchNo != null)
                 {
                     newTask.MaterielCode = MaterielCode;
                     newTask.Quantity = Quantity;
+                    newTask.BatchNo = BatchNo;
                 }
                 if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
                 {
@@ -921,6 +930,7 @@
                     WarehouseId = warehouse.WarehouseId,
                     MaterielCode = mesLotInfo.Product,
                     Quantity = (float)mesLotInfo.Qty,
+                    BatchNo = mesLotInfo.LotNo
                 };
                 _unitOfWorkManage.BeginTran();
                 Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand();
@@ -1033,7 +1043,9 @@
                     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)
+                    Quantity = (float)proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty),
+                    BatchNo = proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.LotNumber
+                
                 };
                 _unitOfWorkManage.BeginTran();
                 int taskId = BaseDal.AddData(newTask);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index a45e862..0b2db53 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -754,7 +754,8 @@
                             WarehouseId = stockInfo.WarehouseId,
                             GroupId= groupId,
                             MaterielCode = stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).FirstOrDefault()?.ProductCode,
-                            Quantity = (float)stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).Sum(x=> x.StockPcsQty)
+                            Quantity = (float)stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).Sum(x=> x.StockPcsQty),
+                            BatchNo = stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).FirstOrDefault()?.LotNumber
                         };
                         tasks.Add(task);
                     }
@@ -800,6 +801,7 @@
                         {
                             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);
+                            task.BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
                         }
                         if (stockInfo.StockLength>0)
                         {

--
Gitblit v1.9.3