From d6b40e55405f2814e4663a3a4e537de57c48c20f Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 11 八月 2022 19:57:54 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WorkM/流转卡管理/MES_StationOutBill.cs | 162 ++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 120 insertions(+), 42 deletions(-) diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" index f967c86..7d741e9 100644 --- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" +++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" @@ -669,6 +669,35 @@ MessageBox.Show("鍗曟嵁鍙烽噸澶嶏紒", "鎻愮ず"); return false; } + + //鏍规嵁涓嶅悓瀹㈡埛锛屽褰曞叆鎬诲伐鏃朵笌鏍囧噯鎬诲伐鏃惰繘琛屽姣斿垽鏂� + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + long sMaterID = DBUtility.ClsPub.isLong(this.txtHMaterID.Tag); + long sProcID = DBUtility.ClsPub.isLong(this.txtHProcID.Tag); + double sQty = DBUtility.ClsPub.isDoule(this.txtHQty.Text); + double sBadCount = DBUtility.ClsPub.isDoule(this.txtHBadCount.Text); + double sWasterQty = DBUtility.ClsPub.isDoule(this.txtHWasterQty.Text); + double sWorkTimes = DBUtility.ClsPub.isSingle(this.txtHWorkTimes.Text); + DataSet Ds; + Ds = oCn.RunProcReturn("exec h_p_MES_StationOutBill_WorkTimesCtrl " + sMaterID.ToString() + "," + sProcID.ToString() + "," + sQty.ToString() + "," + sBadCount.ToString() + "," + sWasterQty.ToString() + "," + sWorkTimes.ToString(), "h_p_MES_StationOutBill_WorkTimesCtrl"); + if (Ds == null || Ds.Tables[0].Rows.Count == 0) + { + MessageBox.Show("褰曞叆鎬诲伐鏃朵笌鏍囧噯鎬诲伐鏃跺姣斿垽鏂け璐ワ紒", "鎻愮ず"); + return false; + } + else + { + if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1) + { + MessageBox.Show(DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"])); + return false; + } + else if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 2) + { + MessageBox.Show(DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"])); + } + } + return true; } //淇濆瓨鍗曟嵁 @@ -1247,6 +1276,7 @@ txtHEmpID.Tag = 0; txtHEmpName.Text = ""; } + txtHQty.Focus(); } } @@ -1276,6 +1306,7 @@ txtHSourceID.Tag = 0; txtHSourceName.Text = ""; } + txtHMouldNum.Focus(); } } @@ -1284,50 +1315,72 @@ if (e.KeyCode == Keys.Enter) { - // DAL.ClsGy_Employee_View oEmp = new DAL.ClsGy_Employee_View(); + // DAL.ClsGy_Employee_View oEmp = new DAL.ClsGy_Employee_View(); - // Int64 HCenterID = Pub_Class.ClsPub.isLong(txtHCenterID.Tag); - // //鑾峰彇鎺т欢浣嶇疆 - // int x = 0; int y = 0; - // BLL.ClsPub_BLL.SetXY(this, panel4, gbUp, txtHGroupID, ref x, ref y); - // //閫夋嫨鍩虹 - // BLL.ClsBaseDownSelect.SetTextByGroup(txtHGroupID, HCenterID, x, y); - // Int64 HGroupID = Pub_Class.ClsPub.isLong(txtHGroupID.Tag.ToString()); - // BillOld.ShowEmpByGroup(HGroupID, ref DBUtility.ClsPub.sExeReturnInfo, false); - - // int i = 0; - // foreach (Model.ClsSc_StationOutBillSub oSub in BillOld.DetailColl) - // { - // if (i >= grdSub.RowCount - 1) - // grdSub.Rows.Add(); - + // Int64 HCenterID = Pub_Class.ClsPub.isLong(txtHCenterID.Tag); + // //鑾峰彇鎺т欢浣嶇疆 + // int x = 0; int y = 0; + // BLL.ClsPub_BLL.SetXY(this, panel4, gbUp, txtHGroupID, ref x, ref y); + // //閫夋嫨鍩虹 + // BLL.ClsBaseDownSelect.SetTextByGroup(txtHGroupID, HCenterID, x, y); + // Int64 HGroupID = Pub_Class.ClsPub.isLong(txtHGroupID.Tag.ToString()); + // BillOld.ShowEmpByGroup(HGroupID, ref DBUtility.ClsPub.sExeReturnInfo, false); - // grdSub.Rows[i].Cells[HEmpIDCol].Value = oSub.HEmpID.ToString(); - // if (oEmp.GetInfoByID(oSub.HEmpID)) - // { + // int i = 0; + // foreach (Model.ClsSc_StationOutBillSub oSub in BillOld.DetailColl) + // { + // if (i >= grdSub.RowCount - 1) + // grdSub.Rows.Add(); - // grdSub.Rows[i].Cells[HEmpNoCol].Value = oEmp.omodel.HNumber; - // // grdSub.Rows[i].Cells[HEmpIDCol].Value = oEmp.oModel.HItemID; - // grdSub.Rows[i].Cells[HEmpNumberCol].Value = oEmp.omodel.HNumber; - // grdSub.Rows[i].Cells[HEmpNameCol].Value = oEmp.omodel.HName; - // } - // else - // { - // grdSub.Rows[i].Cells[HEmpNoCol].Value = ""; - // // grdSub.Rows[i].Cells[HEmpIDCol].Value = oEmp.oModel.HItemID; - // grdSub.Rows[i].Cells[HEmpNumberCol].Value = ""; - // grdSub.Rows[i].Cells[HEmpNameCol].Value = ""; - // } - - - // i = i + 1; - // } - // //GRID鍏佽鍒锋柊 - //// DBUtility.Xt_BaseBillFun.SetSumGrid(oSumGrid); - // // - // //Sub_OperStatus(); - txtHQty.Select(); + // grdSub.Rows[i].Cells[HEmpIDCol].Value = oSub.HEmpID.ToString(); + // if (oEmp.GetInfoByID(oSub.HEmpID)) + // { + + // grdSub.Rows[i].Cells[HEmpNoCol].Value = oEmp.omodel.HNumber; + // // grdSub.Rows[i].Cells[HEmpIDCol].Value = oEmp.oModel.HItemID; + // grdSub.Rows[i].Cells[HEmpNumberCol].Value = oEmp.omodel.HNumber; + // grdSub.Rows[i].Cells[HEmpNameCol].Value = oEmp.omodel.HName; + // } + // else + // { + // grdSub.Rows[i].Cells[HEmpNoCol].Value = ""; + // // grdSub.Rows[i].Cells[HEmpIDCol].Value = oEmp.oModel.HItemID; + // grdSub.Rows[i].Cells[HEmpNumberCol].Value = ""; + // grdSub.Rows[i].Cells[HEmpNameCol].Value = ""; + // } + + + // i = i + 1; + // } + // //GRID鍏佽鍒锋柊 + //// DBUtility.Xt_BaseBillFun.SetSumGrid(oSumGrid); + // // + // //Sub_OperStatus(); + + if (DBUtility.ClsPub.isStrNull(txtHGroupID.Text) != "") + { + DAL.ClsGy_Group_View oGroup = new DAL.ClsGy_Group_View(); + if (oGroup.GetInfoByNumber(DBUtility.ClsPub.isStrNull(txtHGroupID.Text))) + { + txtHGroupID.Text = oGroup.omodel.HNumber; + txtHGroupID.Tag = oGroup.omodel.HItemID; + txtHGroupName.Text = oGroup.omodel.HName; + } + else + { + txtHGroupID.Text = ""; + txtHGroupID.Tag = 0; + txtHGroupName.Text = ""; + } + } + else + { + txtHGroupID.Text = ""; + txtHGroupID.Tag = 0; + txtHGroupName.Text = ""; + } + txtHEmpID.Focus(); } } @@ -1493,7 +1546,7 @@ { //txtHWasterQty.Select(); //cmdOK.Focus(); - txtHDSQty.Focus(); + txtHQCCheckID.Focus(); } } private void txtHPieceQty_KeyDown(object sender, KeyEventArgs e) @@ -1685,7 +1738,7 @@ { Sub_WriteInForm_SM2(Ds.Tables[0], i); } - txtHPayProcID.Focus(); + txtHSourceID.Focus(); //濡傛灉鏄敮涓� 鏍哥畻宸ュ簭鍒� 榛樿甯﹀嚭 骞惰烦鑷� 鑱屽憳 //if (oProc.GetSubProcInfoByID(DBUtility.ClsPub.isLong(txtHProcID.Tag))) //{ @@ -2445,6 +2498,7 @@ txtHQCCheckID.Tag = 0; txtHQCCheckName.Text = ""; } + txtHBadCount.Focus(); } } @@ -2563,5 +2617,29 @@ { } + + private void txtHMouldNum_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + txtHGroupID.Focus(); + } + } + + private void txtHBadCount_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + txtHWorkTimes.Focus(); + } + } + + private void txtHWorkTimes_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + txtHWasterQty.Focus(); + } + } } } \ No newline at end of file -- Gitblit v1.9.1