From cc84c086bd92395a32bd68f7af9b93b85b73711c Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期一, 13 一月 2025 14:47:20 +0800
Subject: [PATCH] 条码生成模块,森楷启用保质期的物料,生产日期改取入库申请单制单日期

---
 SCM/条码打印/Gy_BarCodeBill.cs |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git "a/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
index 802cf8c..a1681f6 100644
--- "a/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
+++ "b/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
@@ -673,7 +673,7 @@
                     {
                         sHRemark = sHRemark + DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]);
                     }
-                    else
+                    else if (DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HExpiryDateCol].Value) == "")
                     {
                         if (DBUtility.ClsPub.isBool(oDsCheck.Tables[0].Rows[0]["HISKFPERIOD"]))
                         {
@@ -681,7 +681,14 @@
                             string HEXPUNIT;        //淇濊川鏈熷崟浣�
                             int HEXPPERIOD;         //淇濊川鏈�
 
-                            HProduceDate = dtpHDate.Value;
+                            if (CampanyName == "妫シ" && DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HProduceDateCol].Value) != "") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�
+                            {
+                                HProduceDate = DBUtility.ClsPub.isDate(grdMain.Rows[j].Cells[HProduceDateCol].Value);
+                            }
+                            else
+                            {
+                                HProduceDate = dtpHDate.Value;
+                            }
                             HEXPUNIT = DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HEXPUNIT"]);
                             HEXPPERIOD = DBUtility.ClsPub.isInt(oDsCheck.Tables[0].Rows[0]["HEXPPERIOD"]);
 
@@ -3438,6 +3445,11 @@
                 grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
                 grdMain.Rows[i].Cells[HPinfanCol].Value = oTable.Rows[0]["HPinfan"].ToString();
                 grdMain.Rows[i].Cells[HPinfanBarCodeCol].Value = oTable.Rows[0]["HPinfanBarCode"].ToString();
+                grdMain.Rows[i].Cells[HProduceDateCol].Value = oTable.Rows[0]["HProduceDate"].ToString();
+                grdMain.Rows[i].Cells[HExpiryDateCol].Value = oTable.Rows[0]["HExpiryDate"].ToString();
+                grdMain.Rows[i].Cells[HISKFPERIODCol].Value = oTable.Rows[0]["HISKFPERIOD"].ToString();
+                grdMain.Rows[i].Cells[HEXPUNITCol].Value = oTable.Rows[0]["HEXPUNIT"].ToString();
+                grdMain.Rows[i].Cells[HEXPPERIODCol].Value = oTable.Rows[0]["HEXPPERIOD"].ToString();
                 //grdMain.Rows[i].Cells[HDateCol].Value = string.Format("{0:yyyyMMdd}", ClsPub.isDate(ClsPub.GetServerDate(0)));
                 //--
                 //璁剧疆鍙紪杈戝垪
@@ -3514,6 +3526,11 @@
             grdMain.Rows[i].Cells[HRemarkCol].Value = oTable.Rows[0]["澶囨敞"].ToString();
             grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["璁″垝璺熻釜鍙�"].ToString();
             grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
+            grdMain.Rows[i].Cells[HProduceDateCol].Value = oTable.Rows[0]["鐢熶骇鏃ユ湡"].ToString();
+            grdMain.Rows[i].Cells[HExpiryDateCol].Value = oTable.Rows[0]["鏈夋晥鏈熻嚦"].ToString();
+            grdMain.Rows[i].Cells[HISKFPERIODCol].Value = oTable.Rows[0]["HISKFPERIOD"].ToString();
+            grdMain.Rows[i].Cells[HEXPUNITCol].Value = oTable.Rows[0]["HEXPUNIT"].ToString();
+            grdMain.Rows[i].Cells[HEXPPERIODCol].Value = oTable.Rows[0]["HEXPPERIOD"].ToString();
 
             if (CampanyName == "鍦i緳") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�
             {
@@ -3714,6 +3731,11 @@
             grdMain.Rows[i].Cells[HDateCol].Value = ClsPub.GetServerDate(0);
             grdMain.Rows[i].Cells[HRemarkCol].Value = "鎸夊簱瀛樼敓鎴�";
             grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["璁″垝璺熻釜鍙�"].ToString();
+            grdMain.Rows[i].Cells[HProduceDateCol].Value = oTable.Rows[0]["鐢熶骇鏃ユ湡"].ToString();
+            grdMain.Rows[i].Cells[HExpiryDateCol].Value = oTable.Rows[0]["鏈夋晥鏈熻嚦"].ToString();
+            grdMain.Rows[i].Cells[HISKFPERIODCol].Value = oTable.Rows[0]["HISKFPERIOD"].ToString();
+            grdMain.Rows[i].Cells[HEXPUNITCol].Value = oTable.Rows[0]["HEXPUNIT"].ToString();
+            grdMain.Rows[i].Cells[HEXPPERIODCol].Value = oTable.Rows[0]["HEXPPERIOD"].ToString();
             //--
             //璁剧疆鍙紪杈戝垪
             string sAllowCol = HQtyCol.ToString() +

--
Gitblit v1.9.1