From 770b80efd437680e84a674ddf3db90037a833f47 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期四, 23 十月 2025 12:34:54 +0800
Subject: [PATCH] 添加库存信息和批次信息的可用库存数量

---
 新建文件夹/WMS/src/views/inbound/inboundOrder.vue                               |    4 +-
 新建文件夹/WMS/src/views/inbound/inboundOrderDetail_Hty.vue                     |    4 +-
 新建文件夹/WMS/src/views/inbound/inboundOrder_Hty.vue                           |    2 
 新建文件夹/WMS/src/views/basic/materielInfo.vue                                 |   16 ++++----
 新建文件夹/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_Inventory_Batch.cs |    8 ++++
 新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs   |    8 +++
 新建文件夹/WMS/src/views/inbound/inboundOrderDetail.vue                         |    4 +-
 新建文件夹/WMS/src/views/stock/Dt_Inventory_Batch.vue                           |    4 +-
 新建文件夹/WMS/src/views/outbound/outboundOrder_Hty.vue                         |    4 +-
 新建文件夹/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_InventoryInfo.cs   |   16 ++++++++
 新建文件夹/WMS/src/views/outbound/outboundOrder.vue                             |    2 
 11 files changed, 51 insertions(+), 21 deletions(-)

diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_InventoryInfo.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_InventoryInfo.cs"
index b5ea7c0..0a817ff 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_InventoryInfo.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_InventoryInfo.cs"
@@ -100,6 +100,22 @@
         [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鏁�", DefaultValue = "0")]
         public decimal OutboundQuantity { get; set; }
 
+
+        /// <summary>
+        /// 鍙敤搴撳瓨鏁伴噺  =瀹為檯搴撳瓨鏁�-寰呭嚭搴撴暟閲�
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鍙敤搴撳瓨鏁伴噺", DefaultValue = "0")]
+        public decimal AvailableQuantity { get; set; }
+
+
+
+        /// <summary>
+        /// 鎶ヨ淇℃伅
+        /// </summary>
+         [SugarColumn(IsNullable = true,Length =255, ColumnDescription = "鎶ヨ淇℃伅")]
+        public string AlarmInformation { get; set; }
+
+
         /// <summary>
         /// 鐩樼偣鏁帮紱鐩樼偣鍚庡疄闄呮暟閲�
         /// </summary>
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_Inventory_Batch.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_Inventory_Batch.cs"
index 5bd5a25..3899606 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_Inventory_Batch.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_Model/Models/WMSInfo/Dt_Inventory_Batch.cs"
@@ -68,6 +68,14 @@
         [SugarColumn(IsNullable = false, ColumnDescription = "寰呭嚭搴撴暟", DefaultValue = "0")]
         public decimal OutboundQuantity { get; set; }
 
+
+        /// <summary>
+        /// 鍙敤搴撳瓨鏁伴噺  =瀹為檯搴撳瓨鏁�-寰呭嚭搴撴暟閲�
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鍙敤搴撳瓨鏁伴噺", DefaultValue = "0")]
+        public decimal AvailableQuantity { get; set; }
+
+
         /// <summary>
         /// 鐩樼偣鏁帮紱鐩樼偣鍚庡疄闄呮暟閲忥紙鍚岀墿鏂欏悓鎵规鎬诲拰锛�
         /// </summary>
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs"
index 5a66e35..1d72719 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs"
@@ -91,7 +91,7 @@
         public ApiResponse<Dt_InventoryInfo> OrderFeedback(EdiOrderCallbackRequest request)
         {
             try
-            {
+            {  
                 // 1锔忊儯 鏍¢獙璇锋眰
                 if (request == null || request.details == null || !request.details.Any())
                 {
@@ -130,6 +130,7 @@
                             StockQuantity = 0,
                             OutboundQuantity = 0,
                             SupplyQuantity = 0,
+                            AvailableQuantity = 0,
                             InDate = DateTime.Now,
                             ProductionDate = detail.finishDate.ToString("yyyy-MM-dd"),
                             ShelfLife = 0,
@@ -152,6 +153,7 @@
                             BatchNo = detail.batchNo,
                             StockQuantity = 0,
                             OutboundQuantity = 0,
+                            AvailableQuantity = 0,
                             SupplyQuantity = 0,
                             ERPStockQuantity = 0,
                             Status = false,
@@ -166,11 +168,13 @@
                     {
                         case "1": //鍏ュ簱
                             entity.StockQuantity = orderQty; //瀹為檯搴撳瓨
+                            entity.AvailableQuantity = orderQty;
                             entity.InDate = DateTime.Now;
                             entity.Remark = "鍏ュ簱鍗曞洖浼�";
 
 
                             batch.StockQuantity = orderQty;
+                            batch.AvailableQuantity = orderQty;
                             batch.Remark = "鍏ュ簱鍗曞洖浼�";
                             UpdateInboundOrderDetailStatus(detail.batchNo, detail.productCode);
                             break;
@@ -179,12 +183,14 @@
                             decimal actualOutQty = entity.StockQuantity - orderQty;// 璁$畻鏈瀹為檯鍑哄簱鏁伴噺 20
                             entity.StockQuantity=orderQty; //瀹為檯搴撳瓨鏁� 100
                             entity.OutboundQuantity =Math.Max(0,entity.OutboundQuantity-actualOutQty); //寰呭嚭搴撴暟閲�
+                            entity.AvailableQuantity = entity.StockQuantity - entity.OutboundQuantity;//鍙敤搴撳瓨
                             if (entity.StockQuantity < 0) entity.StockQuantity = 0;
                             entity.Remark = "鍑哄簱鍗曞洖浼�";
 
 
                             batch.StockQuantity = orderQty;
                             batch.OutboundQuantity =Math.Max(0,batch.OutboundQuantity-actualOutQty);//寰呭嚭搴撴暟閲�
+                            batch.AvailableQuantity = batch.StockQuantity - batch.OutboundQuantity; //鍙敤搴撳瓨
                             if (batch.StockQuantity < 0) batch.StockQuantity = 0;
                             batch.Remark = "鍑哄簱鍗曞洖浼�";
                             UpdateOutboundOrderDetailStatus(detail.batchNo, detail.productCode);
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/basic/materielInfo.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/basic/materielInfo.vue"
index 966f974..48d43b7 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/basic/materielInfo.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/basic/materielInfo.vue"
@@ -190,14 +190,14 @@
         }
       ],
       [
-        // {
-        //   title: "涓嬪彂鐘舵��",
-        //   field: "goodStatusState",
-        //   type: "select",
-        //   dataKey: "goodStatusState",
-        //   data: [],
-        //   required: true,
-        // }
+        {
+          title: "涓嬪彂鐘舵��",
+          field: "goodStatusState",
+          type: "select",
+          dataKey: "goodStatusState",
+          data: [],
+          required: true,
+        }
       ],
       [
         {
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrder.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrder.vue"
index df5b41c..02f9667 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrder.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrder.vue"
@@ -274,8 +274,8 @@
           type: "string",
           width: 120,
           align: "left",
-          // bind: { key: "reservoirArea", data: [] }
-          // edit:{type:'select',dataKey:'reservoirArea',data:[]}
+          bind: { key: "warehouseNuber", data: [] },
+          edit:{type:'select',dataKey:'warehouseNuber',data:[]},
           edit:{type:""}
         },
         {
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrderDetail.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrderDetail.vue"
index c03a219..390a6af 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrderDetail.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrderDetail.vue"
@@ -52,7 +52,7 @@
           title: "搴撳尯",
           field: "reservoirarea",
           type: "select",
-          dataKey: "reservoirArea",
+          dataKey: "warehouseNuber",
           data: [],
         },
         {
@@ -169,7 +169,7 @@
         type: "string",
         width: 120,
         align: "left",
-        bind: { key: "reservoirArea", data: [] },
+        bind: { key: "warehouseNuber", data: [] },
       },
       {
         field: "goodsNo",
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrderDetail_Hty.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrderDetail_Hty.vue"
index 58216f7..bd0ccd1 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrderDetail_Hty.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrderDetail_Hty.vue"
@@ -91,7 +91,7 @@
                     type: 'string',
                     width: 120,
                     align: 'left',
-                    bind: { key: "reservoirArea", data: [] }
+                    bind: { key: "warehouseNuber", data: [] }
                 },
                 {
                     field: 'goodsNo',
@@ -203,7 +203,7 @@
             type: 'string',
             width: 120,
             align: 'left',
-            bind: { key: "reservoirArea", data: [] }
+            bind: { key: "warehouseNuber", data: [] }
         },
         {
             field: 'goodsNo',
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrder_Hty.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrder_Hty.vue"
index 849112b..510755d 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrder_Hty.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/inbound/inboundOrder_Hty.vue"
@@ -194,7 +194,7 @@
                         type: 'string',
                         width: 120,
                         align: 'left',
-                        bind: { key: "reservoirArea", data: [] }
+                        bind: { key: "warehouseNuber", data: [] }
                     },
                     {
                         field: 'goods_no',
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/outbound/outboundOrder.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/outbound/outboundOrder.vue"
index 4001278..dc3c80c 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/outbound/outboundOrder.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/outbound/outboundOrder.vue"
@@ -268,7 +268,7 @@
                         type: 'string',
                         width: 120,
                         align: 'left',
-                        // bind: { key: "reservoirArea", data: [] }
+                        bind: { key: "warehouseNuber", data: [] },
                         edit:{type:""}
 
                     },
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/outbound/outboundOrder_Hty.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/outbound/outboundOrder_Hty.vue"
index 88c2cc1..b17616a 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/outbound/outboundOrder_Hty.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/outbound/outboundOrder_Hty.vue"
@@ -117,11 +117,11 @@
                 },
                 {
                     field: 'warehouse_no',
-                    title: '搴撴埧鍙�',
+                    title: '搴撳尯',
                     type: 'string',
                     width: 100,
                     align: 'left',
-                    bind: { key: "warehouse", data: [] }
+                    bind: { key: "warehouseNuber", data: [] }
                 },
                 {
                     field: 'account_time',
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue"
index 926b2da..0b6cda6 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue"
@@ -66,7 +66,7 @@
           type: "number",
         },
         {
-          title: "寰呭嚭搴撴暟",
+          title: "寰呭嚭搴撴暟閲�",
           required: true,
           field: "outboundQuantity",
           type: "number",
@@ -175,7 +175,7 @@
       },
       {
         field: "outboundQuantity",
-        title: "寰呭嚭搴撴暟",
+        title: "寰呭嚭搴撴暟鏁伴噺",
         type: "number",
         width: 100,
         align: "left",

--
Gitblit v1.9.3