YL
2022-02-21 a905b3df0d0c9ae045b51d1299fbb2f2dcbc2e2d
WorkM/Á÷ת¿¨¹ÜÀí/MES_StationOutBill.cs
@@ -60,9 +60,16 @@
        public void Sub_ClearBill()
        {
            DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp);
            txtHSourceName.Focus();
            DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage2);
            DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage3);
            initGrid();
            initGrid_Sub();
            txtHBarCode.Text = "";
            txtHProcExchBillNo.Enabled = true;
            txtHProcNo.Enabled = true;
            txtHBarCode.Enabled = true;
            tabControl2.SelectedIndex = 0;
            txtHSourceName.Focus();
            //得到操作员信息(出站操作员默认为登录人,根据登录人用户名,找到职员同名的记录,默认写入 æ“ä½œå‘˜ æ–‡æœ¬æ¡†ï¼›å¦‚果没找到则为空;)
            DataSet Ds;
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
@@ -184,6 +191,8 @@
                    cmdXG.Enabled = true;
                    cmdCancel.Enabled = true;
                    cmdChecker.Enabled = true;
                    cmdBFChecker.Enabled = true;
                    txtHBarCode.Enabled = false;
                    Sub_LrtextStatus(false);
                    break;
                case DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew:
@@ -194,6 +203,7 @@
                    cmdXG.Enabled = false;
                    cmdCancel.Enabled = true;
                    cmdChecker.Enabled = false;
                    cmdBFChecker.Enabled = false;
                    Sub_LrtextStatus(true);
                    break;
                case DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify:
@@ -204,6 +214,7 @@
                    cmdXG.Enabled = false;
                    cmdCancel.Enabled = true;
                    cmdChecker.Enabled = false;
                    cmdBFChecker.Enabled = false;
                    Sub_LrtextStatus(true);
                    break;
            }
@@ -580,7 +591,7 @@
                MessageBox.Show("工作中心没有选择!", "提示");
                return false;
            }
            if (DBUtility.ClsPub.isDoule(txtHQty.Text) + DBUtility.ClsPub.isDoule(txtHWasterQty.Text) <= 0)
            if (DBUtility.ClsPub.isDoule(txtHQty.Text) + DBUtility.ClsPub.isDoule(txtHWasterQty.Text) + DBUtility.ClsPub.isDoule(txtHBadCount.Text)  <= 0)
            {
                MessageBox.Show("数量不能为0!", "提示");
                return false;
@@ -663,8 +674,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.HICMOBillNo = this.txtHICMOBillNo.Text.Trim();
            BillNew.omodel.HICMOInterID = DBUtility.ClsPub.isLong(this.txtHICMOBillNo.Tag);
@@ -791,6 +812,7 @@
        private void initGrid()
        {
            DBUtility.Xt_BaseBillFun.initGridMESList(grdCardList, this.Name + "grdCardList");
            grdCardList.DataSource = null;
        }
@@ -1554,6 +1576,40 @@
            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 = txtHCenterID.Text;
            oBF.txtHWorkCenterID.Tag = txtHCenterID.Tag;
            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();
            }
        }
        //报废品质确认按钮
        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;
@@ -1575,7 +1631,7 @@
            if (oBF.BillChange)
            {
                this.Sub_ShowBill();
            }
            }
        }
        private void label20_Click(object sender, EventArgs e)