From d75d3b7cf6ba68c9e9e69bced4552a554ca76e93 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期六, 21 六月 2025 15:12:29 +0800
Subject: [PATCH] 出库口问题修改;标签打印优化

---
 Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs      |   10 +++-
 Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs |    3 +
 Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs    |   10 ++++-
 HTML/views/ASNSetting/LabelPrintSelect.html        |   16 +++++---
 Wms/Model/ModelDto/BllAsnDto/LabelPrintInfoDto.cs  |   31 +++++++++++++++
 5 files changed, 58 insertions(+), 12 deletions(-)

diff --git a/HTML/views/ASNSetting/LabelPrintSelect.html b/HTML/views/ASNSetting/LabelPrintSelect.html
index be21290..1e01304 100644
--- a/HTML/views/ASNSetting/LabelPrintSelect.html
+++ b/HTML/views/ASNSetting/LabelPrintSelect.html
@@ -122,11 +122,11 @@
                     });
 
 					var id = getQueryString('Id');
-					var SupplierLot=getQueryString('SupplierLot');//渚涜揣鎵规
-					$('#SupplierLot').val(SupplierLot);
-					if(SupplierLot!='' && SupplierLot!=null &&SupplierLot!=undefined){
-						$('#SupplierLot').attr('readonly', 'readonly');
-					}
+					// var SupplierLot=getQueryString('SupplierLot');//渚涜揣鎵规
+					// $('#SupplierLot').val(SupplierLot);
+					// if(SupplierLot!='' && SupplierLot!=null &&SupplierLot!=undefined){
+					// 	$('#SupplierLot').attr('readonly', 'readonly');
+					// }
 					var asnType = getQueryString('Type');
 					console.log(asnType);
 					// console.log(asnType == 4);
@@ -143,7 +143,11 @@
 					 
 					synData(IP + "/BllAsn/GetAsnDetailQtyList", param , 'get', function (res) {
 						if (res.code == 0) { //鎴愬姛  
-							$("#arriveQty").val(res.data);
+							$("#arriveQty").val(res.data.Qty);
+							$("#productionTime").val(res.data.ProductionTime);
+							$("#expirationTime").val(res.data.ExpirationTime);
+							$("#storeTime").val(res.data.StoreTime);
+							$("#SupplierLot").val(res.data.SupplierLot);
 						} else { //涓嶆垚鍔�
 							layer.msg(res.msg, {
 								icon: 2,
diff --git a/Wms/Model/ModelDto/BllAsnDto/LabelPrintInfoDto.cs b/Wms/Model/ModelDto/BllAsnDto/LabelPrintInfoDto.cs
new file mode 100644
index 0000000..202683c
--- /dev/null
+++ b/Wms/Model/ModelDto/BllAsnDto/LabelPrintInfoDto.cs
@@ -0,0 +1,31 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model.ModelDto.BllAsnDto
+{
+    public class LabelPrintInfoDto
+    {
+        /// <summary>
+        /// 鍓╀綑鎵撳嵃鐨勬暟閲�
+        /// </summary>
+        public string Qty { get; set; }
+        /// <summary>
+        /// 鐢熶骇鏃ユ湡
+        /// </summary>
+        public string ProductionTime { get; set; }
+        /// <summary>
+        /// 鏈夋晥鏈�
+        /// </summary>
+        public string ExpirationTime { get; set; }
+        /// <summary>
+        /// 鍌ㄥ瓨鏈熻嚦
+        /// </summary>
+        public string StoreTime { get; set; }
+
+        /// <summary>
+        /// 渚涜揣鎵规
+        /// </summary>
+        public string SupplierLot { get; set; }
+    }
+}
diff --git a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
index 880f59b..83b9df7 100644
--- a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -1,5 +1,6 @@
 锘縰sing Model.InterFaceModel;
 using Model.ModelDto;
+using Model.ModelDto.BllAsnDto;
 using Model.ModelDto.SysDto;
 using Model.ModelVm;
 using Model.ModelVm.SysVm;
@@ -138,7 +139,7 @@
         }
 
         //鑾峰彇鍏ュ簱鍗曟槑缁嗗墿浣欐墦鍗版暟閲�
-        public string GetAsnDetailQtyList(int id)
+        public LabelPrintInfoDto GetAsnDetailQtyList(int id)
         {
             try
             {
@@ -147,7 +148,11 @@
                 {
                     throw new Exception("鏈煡璇㈠埌鍏ュ簱鍗曟槑缁�");
                 }
+                var data = new LabelPrintInfoDto();
 
+                data.ProductionTime = string.IsNullOrEmpty(detail.Lot1) ? "" : Convert.ToDateTime(detail.Lot1).ToString("yyyy-MM-dd");
+                data.ExpirationTime = string.IsNullOrEmpty(detail.Lot2) ? "" : Convert.ToDateTime(detail.Lot2).ToString("yyyy-MM-dd");
+                data.SupplierLot = detail.SupplierLot;
                 var labelQty = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNDetailNo == id).Sum(m => m.Qty + (m.SamplingQty == null? 0: m.SamplingQty));
                 if (labelQty == null)
                 {
@@ -158,7 +163,8 @@
                 {
                     qty = 0;
                 }
-                return qty.ToString();
+                data.Qty = qty.ToString();
+                return data;
             }
             catch (Exception e)
             {
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index 0322da7..361b515 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -3034,7 +3034,7 @@
                     foreach (var item in list)
                     {
                         var outModeLocate = "";
-                        if (outMode == "1")
+                        if (outMode == "17")
                         {
                             if (i < outLocatelist1.Count)
                             {
@@ -3043,11 +3043,11 @@
                             else
                             {
                                 var j = i % outLocatelist1.Count;
-                                
+
                                 outModeLocate = outLocatelist1[j].LocatNo;
                             }
                         }
-                        else if(outMode == "2")
+                        else if (outMode == "18")
                         {
                             if (i < outLocatelist1.Count)
                             {
@@ -3060,6 +3060,10 @@
                                 outModeLocate = outLocatelist2[j].LocatNo;
                             }
                         }
+                        else
+                        {
+                            throw new Exception("鍑哄簱鍙e伐浣嶅紓甯�");
+                        }
                         
                         var taskNoStr = "";
                                            
diff --git a/Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs b/Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs
index 5372da9..9e737c0 100644
--- a/Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs
+++ b/Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs
@@ -1,5 +1,6 @@
 锘縰sing Model.InterFaceModel;
 using Model.ModelDto;
+using Model.ModelDto.BllAsnDto;
 using Model.ModelDto.SysDto;
 using Model.ModelVm;
 using Model.ModelVm.SysVm;
@@ -34,7 +35,7 @@
         /// </summary>
         /// <param name="id">id</param> 
         /// <returns></returns>
-        string GetAsnDetailQtyList(int id);
+        LabelPrintInfoDto GetAsnDetailQtyList(int id);
 
         /// <summary>
         /// 鑾峰彇鐗╂枡淇℃伅锛堟坊鍔犲叆搴撳崟鏄庣粏浣跨敤锛�

--
Gitblit v1.8.0