From b3873ae84a0f9e7ad76ce30239568ab19a79a22e Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期三, 02 六月 2021 16:43:30 +0800
Subject: [PATCH] 圣龙唯一条码、批次条码规则变更修改;系统日志管理模块,查询功能优化

---
 SCM/条码打印/Gy_BarCodeBill.cs |  115 ++++++++++++++++++++++++++++++-------
 SCM/系统管理/Xt_SystemLog.cs   |   21 ++++--
 SCM/公用类/ClsPub1.cs         |    1 
 3 files changed, 106 insertions(+), 31 deletions(-)

diff --git "a/SCM/\345\205\254\347\224\250\347\261\273/ClsPub1.cs" "b/SCM/\345\205\254\347\224\250\347\261\273/ClsPub1.cs"
index 023bc7e..00ea4a7 100644
--- "a/SCM/\345\205\254\347\224\250\347\261\273/ClsPub1.cs"
+++ "b/SCM/\345\205\254\347\224\250\347\261\273/ClsPub1.cs"
@@ -22,6 +22,7 @@
         //public static string WEBSURL = "http://192.168.10.60/WMSWEBS/WebService1.asmx";               //闊╃數    鍐呯綉瀹佹尝
         //public static string WEBSURL = "http://60.190.50.86:5050/WEBS_CE/WebService1.asmx";           //椋為緳
         //public static string WEBSURL = "http://192.192.192.13/WMSWEBS/WebService1.asmx";              //鍗撳姏
+        //public static string WEBSURL = "http://120.195.29.36:1230/WEBS-WMS/WebService1.asmx";              //姹熻嫃榫欎酣
         //public static string WEBSURL = "http://192.168.63.139/WEBS-WMS/WebService1.asmx";
         public static string WEBSURL = "http://192.168.63.79/WEBS-WMS/WebService1.asmx";              //鍏徃鍙板紡鏈�
         //public static string WEBSURL = "http://192.168.0.108/WEBS-WMS/WebService1.asmx";              //瀹�
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 fec435d..d0644d9 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"
@@ -980,6 +980,21 @@
                                 Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo  '" + sTMNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//鑾峰彇鏈�澶ф祦姘村彿
                                 LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
                             }
+                            else if (CampanyName == "鍦i緳")
+                            {
+                                LSHlen = 3;             //娴佹按鍙烽暱搴�
+                                HNumber = grdMain.Rows[j].Cells[HMaterNumberCol].Value.ToString();
+                                sSeOrderNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBillNoCol].Value);   //  鐢熶骇璁㈠崟鍙�
+                                if (DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBillTypeCol].Value).ToString() != "3710")
+                                {
+                                    MessageBox.Show("鍞竴鏉$爜蹇呴』涓烘湁婧愬崟鏉$爜锛屼笖婧愬崟绫诲瀷涓虹敓浜ц鍗曪紝璇风‘璁ゆ簮鍗曚俊鎭槸鍚︽纭紒");
+                                    return;
+                                }
+                                //鏉$爜鍓嶇紑 = 鐢熶骇璁㈠崟 + 鐗╂枡浠g爜 + 鎵规
+                                sTMNumber = sSeOrderNo + ";" + HNumber + ";" + HBatchNo;
+                                Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo  '" + sTMNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//鑾峰彇鏈�澶ф祦姘村彿
+                                LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
+                            }
                             else  //閫氱敤鏂规硶
                             {
                                 //鏉$爜鍓嶇紑 = 缁勭粐浠g爜 + 鐗╂枡鍐呯爜 + 骞� + 鏈� + 鏃�
@@ -1008,12 +1023,20 @@
                         {
                             if (CampanyName == "鍦i緳") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�
                             {
+                                //閲囪喘璁㈠崟鍙蜂负绌猴紝鍒欏彇婧愬崟鍗曞彿
                                 string sPOOrderBillNo = "";
-                                sPOOrderBillNo = grdMain.Rows[j].Cells[POOrderBillNoCol].Value.ToString();
+                                if (DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[POOrderBillNoCol].Value).ToString() == "")
+                                {
+                                    sPOOrderBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBillNoCol].Value).ToString();
+                                }
+                                else
+                                {
+                                    sPOOrderBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[POOrderBillNoCol].Value).ToString();
+                                }
                                 HNumber = grdMain.Rows[j].Cells[HMaterNumberCol].Value.ToString();
 
-                                //缁勭粐浠g爜锛涢噰璐鍗曞彿锛涚墿鏂欎唬鐮侊紱鎵规
-                                TM = HOrgNumber + ";" + sPOOrderBillNo + ";" + HNumber + ";" + HBatchNo;
+                                //鏉$爜缂栧彿 = 閲囪喘璁㈠崟鍙凤紱鐗╂枡浠g爜锛涙壒娆★紱鏁伴噺
+                                sTMNumber = sPOOrderBillNo + ";" + HNumber + ";" + HBatchNo;
                             }
                             else
                             {
@@ -1508,7 +1531,21 @@
                             {
                                 LSH2 = "0" + LSH2;
                             }
-                            if (cmbHBarCodeType.Text == "鍞竴鏉$爜" || cmbHBarCodeType.Text == "濂ュ厠鏂潯鐮�" || cmbHBarCodeType.Text == "绠卞彂鏉$爜")
+
+                            if (CampanyName == "鍦i緳") 
+                            {
+                                if (cmbHBarCodeType.Text == "鍞竴鏉$爜")
+                                {
+                                    //鏉$爜缂栧彿 = 鐢熶骇璁㈠崟锛涚墿鏂欎唬鐮侊紱鎵规锛涙墭鍙凤紱鏁伴噺
+                                    TM = sTMNumber + ";" + LSH2 + ";" + HMinQty;
+                                }
+                                else if (cmbHBarCodeType.Text == "鎵规鏉$爜")
+                                {
+                                    //鏉$爜缂栧彿 = 閲囪喘璁㈠崟鍙凤紱鐗╂枡浠g爜锛涙壒娆★紱鏁伴噺
+                                    TM = sTMNumber + ";" + HMinQty;
+                                }
+                            }
+                            else if (cmbHBarCodeType.Text == "鍞竴鏉$爜" || cmbHBarCodeType.Text == "濂ュ厠鏂潯鐮�" || cmbHBarCodeType.Text == "绠卞彂鏉$爜")
                             {
                                 //鏉$爜缂栧彿 = 鏉$爜鍓嶇紑 + 娴佹按鍙�
                                 TM = sTMNumber + LSH2;
@@ -1990,23 +2027,23 @@
 
             //璁剧疆鍙紪杈戝垪
             string sAllowCol = HQtyCol.ToString() +
-                                "," + HMinQtyCol.ToString() +
-                                "," + HMaterNumberCol.ToString() +
-                                "," + HMaterNameCol.ToString() +
-                                "," + HMaterModelCol.ToString() +
-                                "," + HPinfanCol.ToString() +
-                                "," + HAuxPropNumberCol.ToString() +
-                                "," + HUnitNumberCol.ToString() +
-                                "," + HSeOrderBillNoCol.ToString() +
-                                "," + HCusNumberCol.ToString() +
-                                "," + HDeptNumberCol.ToString() +
-                                "," + HGroupNameCol.ToString() +
-                                "," + HBatchNoCol.ToString() +
-                                "," + HSupNumberCol.ToString() +
-                                "," + POOrderBillNoCol.ToString() +
-                                "," + HPressModelCol.ToString() +
-                                "," + HGBBarCodeCol.ToString() +
-                                "," + HRemarkCol.ToString();
+                                    "," + HMinQtyCol.ToString() +
+                                    "," + HMaterNumberCol.ToString() +
+                                    "," + HMaterNameCol.ToString() +
+                                    "," + HMaterModelCol.ToString() +
+                                    "," + HPinfanCol.ToString() +
+                                    "," + HAuxPropNumberCol.ToString() +
+                                    "," + HUnitNumberCol.ToString() +
+                                    "," + HSeOrderBillNoCol.ToString() +
+                                    "," + HCusNumberCol.ToString() +
+                                    "," + HDeptNumberCol.ToString() +
+                                    "," + HGroupNameCol.ToString() +
+                                    "," + HBatchNoCol.ToString() +
+                                    "," + HSupNumberCol.ToString() +
+                                    "," + POOrderBillNoCol.ToString() +
+                                    "," + HPressModelCol.ToString() +
+                                    "," + HGBBarCodeCol.ToString() +
+                                    "," + HRemarkCol.ToString();
             //璁剧疆鍚堣鍒�
             string sTotalCol = HQtyCol.ToString();
             //
@@ -2849,7 +2886,20 @@
                 //grdMain.Rows[i].Cells[HDateCol].Value = string.Format("{0:yyyyMMdd}", ClsPub.isDate(ClsPub.GetServerDate(0)));
                 //--
                 //璁剧疆鍙紪杈戝垪
-                string sAllowCol = HQtyCol.ToString() +
+                string sAllowCol;
+                if (CampanyName == "鍦i緳") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�
+                {
+                    sAllowCol = HQtyCol.ToString() +
+                                "," + HMaterNameCol.ToString() +
+                                "," + HMaterModelCol.ToString() +
+                                "," + HPinfanCol.ToString() +
+                                "," + HSupNumberCol.ToString() +
+                                "," + POOrderBillNoCol.ToString() +
+                                "," + HMinQtyCol.ToString();
+                }
+                else
+                {
+                    sAllowCol = HQtyCol.ToString() +
                                 "," + HMaterNameCol.ToString() +
                                 "," + HMaterModelCol.ToString() +
                                 "," + HPinfanCol.ToString() +
@@ -2857,6 +2907,7 @@
                                 "," + HSupNumberCol.ToString() +
                                 "," + POOrderBillNoCol.ToString() +
                                 "," + HMinQtyCol.ToString();
+                }
                 grdMain.Columns[HBillNoCol].ReadOnly = true;
                 //璁剧疆鍚堣鍒�
                 string sTotalCol = HQtyCol.ToString();
@@ -2913,7 +2964,24 @@
             }
             //--
             //璁剧疆鍙紪杈戝垪
-            string sAllowCol = HQtyCol.ToString() +
+            string sAllowCol;
+            if (CampanyName == "鍦i緳") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�
+            {
+                sAllowCol = HQtyCol.ToString() +
+                                "," + HGroupNameCol.ToString() +
+                                "," + HMaterNameCol.ToString() +
+                                "," + HAuxPropNumberCol.ToString() +
+                                "," + HMaterModelCol.ToString() +
+                                "," + HPinfanCol.ToString() +
+                                "," + HSupNumberCol.ToString() +
+                                "," + POOrderBillNoCol.ToString() +
+                                "," + HPressModelCol.ToString() +
+                                "," + HGBBarCodeCol.ToString() +
+                                "," + HMinQtyCol.ToString();
+            }
+            else
+            {
+                sAllowCol = HQtyCol.ToString() +
                                 "," + HGroupNameCol.ToString() +
                                 "," + HMaterNameCol.ToString() +
                                 "," + HAuxPropNumberCol.ToString() +
@@ -2925,6 +2993,7 @@
                                 "," + HPressModelCol.ToString() +
                                 "," + HGBBarCodeCol.ToString() +
                                 "," + HMinQtyCol.ToString();
+            }
             grdMain.Columns[HBillNoCol].ReadOnly = true;
             //璁剧疆鍚堣鍒�
             string sTotalCol = HQtyCol.ToString();
diff --git "a/SCM/\347\263\273\347\273\237\347\256\241\347\220\206/Xt_SystemLog.cs" "b/SCM/\347\263\273\347\273\237\347\256\241\347\220\206/Xt_SystemLog.cs"
index b4f2057..2e29ff3 100644
--- "a/SCM/\347\263\273\347\273\237\347\256\241\347\220\206/Xt_SystemLog.cs"
+++ "b/SCM/\347\263\273\347\273\237\347\256\241\347\220\206/Xt_SystemLog.cs"
@@ -14,7 +14,7 @@
     {
         private int HItemIDCol = 0;
         private int HNumberCol = 0;
-        public SCM.frm_G_BillQueryCondition_Base frmCondition;
+        public frmBillQueryCondition_Base frmCondition;
         const string ViewName = "h_v_Xt_SystemLogList";
         const string ModName = "鐢ㄦ埛";
         public Pub_Class.ClsPub.Enum_InputMode InputMode;  //褰曞叆鐘舵�佹爣蹇�(0-闈炲綍鍏ョ姸鎬� 1-澧炲姞 2-淇敼)
@@ -43,7 +43,7 @@
         private void Xt_SystemLog_Load(object sender, EventArgs e)
         {
             oWeb.Url = ClsPub1.WEBSURL;
-            frmCondition = new SCM.frm_G_BillQueryCondition_Base();
+            frmCondition = new frmBillQueryCondition_Base();
             LoadTree();
             initGrid();
             InputMode = Pub_Class.ClsPub.Enum_InputMode.InputMode_View;
@@ -114,18 +114,23 @@
         //鏌ヨ
         private void cx_Click(object sender, EventArgs e)
         {
-            frmCondition = new SCM.frm_G_BillQueryCondition_Base();
-            frmCondition.Tag = "";
-            frmCondition.ViewName = ViewName;
-            frmCondition.ModName = this.Name;
+            frmCondition = new frmBillQueryCondition_Base();
+            SetCondition(frmCondition, ViewName, this.Name);
             frmCondition.ShowDialog();
             if (frmCondition.Tag.ToString() == "OK")
             {
                 Display();
             }
         }
-        
-        
+
+        public void SetCondition(frmBillQueryCondition_Base frmCondition, string ViewName, string Name)
+        {
+            frmCondition.Tag = "";
+            frmCondition.ViewName = ViewName;
+            frmCondition.ModName = Name;
+        }
+
+
         //寰楀埌瀵瑰簲鍒�
         private Int32 Fun_GetCol(string sCol)
         {

--
Gitblit v1.9.1