From 4e9b0d5aafdab84c4b6aec9d7f0095bc692b3600 Mon Sep 17 00:00:00 2001
From: 杨乐 <yang.le.192@qq.com>
Date: 星期二, 25 一月 2022 21:29:36 +0800
Subject: [PATCH] 权限添加 2056

---
 WorkM/流转卡管理/MES_StationEntrustOutBill.cs |  107 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 103 insertions(+), 4 deletions(-)

diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustOutBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustOutBill.cs"
index c666828..c11f3ab 100644
--- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustOutBill.cs"
+++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustOutBill.cs"
@@ -85,10 +85,23 @@
         {
             DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp);
             //DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp2);
-            txtHBarCode.Focus();
-            txtHTaxRate.Text = "16";
+            DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage1);
+            DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage2);
             initGrid();
             initGrid_Sub();
+            txtHBarCode.Text = "";
+            txtHProcExchBillNo.Enabled = true;
+            txtHWWWorkOrderBillNo.Enabled = true;
+            txtHProcNO.Enabled = true;
+            txtHBarCode.Enabled = true;
+            txtHPieceQty.Enabled = true;
+            txtHBadPNL.Enabled = true;
+            tabControl1.SelectedIndex = 0;
+            txtHBarCode.Focus();
+            lngBillKey = 0;
+            lngBillSubKey = 0;
+            txtHTaxRate.Text = "16";
+            this.txtHICMOBillNo.Tag = "0";
         }
         //鍑虹珯鎸夐挳
         private void cmdOK_Click(object sender, EventArgs e)
@@ -469,6 +482,7 @@
             this.txtHBadPNL.Text = BillOld.omodel.HBadPNL.ToString();
             this.txtHRemark.Text = BillOld.omodel.HRemark.ToString();
             this.txtHWasterQty.Text = BillOld.omodel.HWasterQty.ToString();
+            this.txtHBadCount.Text = BillOld.omodel.HBadCount.ToString();
             this.txtHQty.Text = BillOld.omodel.HQty.ToString();
             this.txtHPieceQty.Text = BillOld.omodel.HPieceQty.ToString();
             this.txtHPlanPieceQty.Text = BillOld.omodel.HPlanPieceQty.ToString();
@@ -737,8 +751,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.txtHStationOutTime.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();
@@ -769,6 +793,7 @@
             BillNew.omodel.HOrderProcNO = DBUtility.ClsPub.isStrNull(this.txtHOrderProcNO.Text);
             BillNew.omodel.HBadPNL = DBUtility.ClsPub.isDoule(this.txtHBadPNL.Text);
             BillNew.omodel.HWasterQty = DBUtility.ClsPub.isDoule(this.txtHWasterQty.Text);
+            BillNew.omodel.HBadCount = DBUtility.ClsPub.isDoule(this.txtHBadCount.Text);
             BillNew.omodel.HRemark = DBUtility.ClsPub.isStrNull(this.txtHRemark.Text);
             BillNew.omodel.HLastSubProc = true;
             BillNew.omodel.HMainSourceInterID = sHMainSourceInterID;
@@ -859,6 +884,8 @@
         //鍒濆鍖朑RID
         private void initGrid()
         {
+            DBUtility.Xt_BaseBillFun.initGridMESList(grdCardList, this.Name + "grdCardList");
+            grdCardList.DataSource = null;
 
             //
             grdMain.ColumnCount = 10;                       //鎬诲垪鏁�
@@ -2424,6 +2451,7 @@
                 if (Ds == null || Ds.Tables[0].Rows.Count == 0)
                 {
                     txtHProcExchBillNo.Text = "";
+                    txtHBarCode.Text = "";
                     MessageBox.Show("鏈煡璇㈠埌娴佽浆鍗′俊鎭紒");
                     return;
                 }
@@ -2459,5 +2487,76 @@
             //}
         }
 
+        //鏂板
+        private void cmdXZ_Click(object sender, EventArgs e)
+        {
+            this.Sub_AddBill();
+        }
+
+        //鎶ュ簾鍝佽川纭鎸夐挳
+        private void cmdBFChecker_Click(object sender, EventArgs e)
+        {
+            QC_NoPassProdCheckBill oBF = new QC_NoPassProdCheckBill();
+            oBF.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
+            oBF.HMainSourceInterID = BillOld.omodel.HInterID;
+            oBF.HProcExchInterID = lngBillKey;
+            oBF.HProcExchEntryID = lngBillSubKey;
+            oBF.HBillSubType = "鎶ュ簾璇勫";
+            oBF.txtHLotNo.Text = txtHProcExchBillNo.Text;
+            oBF.txtHOrderProcNo.Text = txtHOrderProcNO.Text;
+            oBF.txtHMaterID.Text = txtHMaterName.Text;
+            oBF.txtHMaterNumber.Text = txtHMaterID.Text;
+            oBF.txtHModel.Text = txtHMaterModel.Text;
+            oBF.txtHMaterID.Tag = txtHMaterID.Tag;
+            oBF.txtHProcID.Tag = txtHProcID.Tag;
+            oBF.txtHProcID.Text = txtHProcID.Text;
+            oBF.txtHWorkCenterID.Text = "";
+            oBF.txtHWorkCenterID.Tag = 0;
+            oBF.txtHICMOInterID.Text = Pub_Class.ClsPub.isStrNull(txtHICMOBillNo.Tag);
+            oBF.txtHICMOBillNo.Text = txtHICMOBillNo.Text;
+            oBF.txtHProcExchQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHPlanQty.Text));
+            oBF.txtHPlanQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHWasterQty.Text));
+            oBF.txtHPlanPNL.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHBadPNL.Text));
+            oBF.txtHBadPNL.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHBadPNL.Text));
+            oBF.txtHBadQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHWasterQty.Text));
+            oBF.ShowDialog();
+            if (oBF.BillChange)
+            {
+                this.Sub_ShowBill();
+            }
+        }
+
+        //涓嶈壇鍝佽川纭鎸夐挳
+        private void cmdChecker_Click(object sender, EventArgs e)
+        {
+            QC_NoPassProdCheckBill oBF = new QC_NoPassProdCheckBill();
+            oBF.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
+            oBF.HMainSourceInterID = BillOld.omodel.HInterID;
+            oBF.HProcExchInterID = lngBillKey;
+            oBF.HProcExchEntryID = lngBillSubKey;
+            oBF.HBillSubType = "涓嶈壇璇勫";
+            oBF.txtHLotNo.Text = txtHProcExchBillNo.Text;
+            oBF.txtHOrderProcNo.Text = txtHOrderProcNO.Text;
+            oBF.txtHMaterID.Text = txtHMaterName.Text;
+            oBF.txtHMaterNumber.Text = txtHMaterID.Text;
+            oBF.txtHModel.Text = txtHMaterModel.Text;
+            oBF.txtHMaterID.Tag = txtHMaterID.Tag;
+            oBF.txtHProcID.Tag = txtHProcID.Tag;
+            oBF.txtHProcID.Text = txtHProcID.Text;
+            oBF.txtHWorkCenterID.Text = "";
+            oBF.txtHWorkCenterID.Tag = 0;
+            oBF.txtHICMOInterID.Text = Pub_Class.ClsPub.isStrNull(txtHICMOBillNo.Tag);
+            oBF.txtHICMOBillNo.Text = txtHICMOBillNo.Text;
+            oBF.txtHProcExchQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHPlanQty.Text));
+            oBF.txtHPlanQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHBadCount.Text));
+            oBF.txtHPlanPNL.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHBadPNL.Text));
+            oBF.txtHBadPNL.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHBadPNL.Text));
+            oBF.txtHBadQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHBadCount.Text));
+            oBF.ShowDialog();
+            if (oBF.BillChange)
+            {
+                this.Sub_ShowBill();
+            }
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1