From b51ed3cea777b1809afe07db7314b0e0a8c0e9b8 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 22 二月 2023 11:15:25 +0800
Subject: [PATCH] 工序出站-保存屏蔽包装标识,员工同步更改

---
 WorkM/流转卡管理/MES_StationEntrustInBill.cs |   73 +++++++++++++++++++++++++++---------
 1 files changed, 54 insertions(+), 19 deletions(-)

diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustInBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustInBill.cs"
index 324ed87..dbc2232 100644
--- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustInBill.cs"
+++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustInBill.cs"
@@ -42,7 +42,24 @@
         public void Sub_ClearBill()
         {
             DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp);
+            DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage1);
+            DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage2);
+            initGrid();
+            txtHBarCode.Text = "";
+            txtHProcExchBillNo.Enabled = true;
+            txtHWWWorkOrderBillNo.Enabled = true;
+            txtHProcNo.Enabled = true;
+            txtHBarCode.Enabled = true;
+            tabControl1.SelectedIndex = 0;
             txtHBarCode.Focus();
+            lngBillKey = 0;
+        }
+
+        //鍒濆鍖朑RID
+        private void initGrid()
+        {
+            DBUtility.Xt_BaseBillFun.initGridMESList(grdCardList, this.Name + "grdCardList");
+            grdCardList.DataSource = null;
         }
         //杩涚珯鎸夐挳
         private void cmdOK_Click(object sender, EventArgs e)
@@ -508,8 +525,18 @@
             if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify)
                 BillNew.omodel.HInterID = BillOld.omodel.HInterID;
             //涓荤被璧嬪��
-            BillNew.omodel.HYear = 2011;
-            BillNew.omodel.HPeriod = 1;
+            //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+            string s = "";
+            int sYear = 0;
+            int sPeriod = 0;
+            if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DBUtility.ClsPub.isDate(this.txtHStationInTime.Text), ref sYear, ref sPeriod, ref s) == false)
+            {
+                MessageBox.Show(s, "鎻愮ず");
+                return false;
+            }
+            //
+            BillNew.omodel.HYear = sYear;
+            BillNew.omodel.HPeriod = sPeriod;
             BillNew.omodel.HBillNo = this.txtHBillNo.Text.Trim();
             BillNew.omodel.HInnerBillNo = this.txtHInnerBillNo.Text.Trim();
             BillNew.omodel.HICMOBillNo = this.txtHICMOBillNo.Text.Trim();
@@ -1165,6 +1192,7 @@
             if (e.KeyCode == Keys.Enter)
             {
                 cmdOK.Select();
+                txtHWWWorkOrderBillNo.Focus();
             }
         }
 
@@ -1315,23 +1343,23 @@
                     MessageBox.Show("娌℃湁褰曞叆娴佽浆鍗″彿鎴栬�呮祦姘村彿");
                     return;
                 }
-                //鏍规嵁宸ュ彿鑾峰彇濮斿宸ュ崟 鍙婂唴鐮侊紝瀛愬唴鐮�   
-                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
-                DataSet ds;
-                ds = oCn.RunProcReturn("exec  h_p_WW_GetWWWorkBillInfoByNo '" + txtHWWWorkOrderBillNo.Text + "'," + lngBillKey.ToString() + "," + lngBillSubKey.ToString(), "h_p_WW_GetWWWorkBillInfoByNo");
-                if (ds == null)
-                {
-                    MessageBox.Show("娌℃湁鎵惧埌瀵瑰簲鐨勫澶栧伐鍗曪紒");
-                    return;
-                }
-                if (ds.Tables[0].Rows.Count > 0)
-                {
-                    txtHWWWorkOrderBillNo.Text = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]);
-                    lngBillKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]);
-                    lngBillSubKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HEntryID"]);
-                    txtHWWWorkOrderBillNo.Enabled = false;
-                }
-
+                ////鏍规嵁宸ュ彿鑾峰彇濮斿宸ュ崟 鍙婂唴鐮侊紝瀛愬唴鐮�   
+                //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+                //DataSet ds;
+                //ds = oCn.RunProcReturn("exec  h_p_WW_GetWWWorkBillInfoByNo '" + txtHWWWorkOrderBillNo.Text + "'," + lngBillKey.ToString() + "," + lngBillSubKey.ToString(), "h_p_WW_GetWWWorkBillInfoByNo");
+                //if (ds == null)
+                //{
+                //    MessageBox.Show("娌℃湁鎵惧埌瀵瑰簲鐨勫澶栧伐鍗曪紒");
+                //    return;
+                //}
+                //if (ds.Tables[0].Rows.Count > 0)
+                //{
+                //    txtHWWWorkOrderBillNo.Text = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]);
+                //    lngBillKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]);
+                //    lngBillSubKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HEntryID"]);
+                //    txtHWWWorkOrderBillNo.Enabled = false;
+                //}
+                txtHRemark.Focus();
             }
         }
 
@@ -1414,6 +1442,7 @@
                 if (Ds == null || Ds.Tables[0].Rows.Count == 0)
                 {
                     txtHProcExchBillNo.Text = "";
+                    txtHBarCode.Text = "";
                     MessageBox.Show("鏈煡璇㈠埌娴佽浆鍗′俊鎭紒");
                     return;
                 }
@@ -1449,5 +1478,11 @@
             //}
         }
 
+        //鏂板
+        private void cmdXZ_Click(object sender, EventArgs e)
+        {
+            this.Sub_AddBill();
+        }
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1