From 3108a1c6f7bdddcf22905ff601633a71f73a480d Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期二, 08 四月 2025 12:11:22 +0800 Subject: [PATCH] fqc --- DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01Check.cs | 190 +++++++++++++++++++++-------------------------- 1 files changed, 84 insertions(+), 106 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01Check.cs b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01Check.cs index bcc5677..ddf4c99 100644 --- a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01Check.cs +++ b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01Check.cs @@ -24,12 +24,12 @@ this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; - toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick; + this.toolBarMenu1.btnChkClick += ToolBarMenu1_btnZhiLiangChkClick; this.toolBarMenu1.getXmlConfig(); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3); - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fsubmitTxt", "", (value) => + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "modifyFlagTxt", "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); }, tips); @@ -44,36 +44,6 @@ pageBar1.PagerEvent += PageBar1_PagerEvent; xtraTabControl2.SelectedPageChanged += XtraTabControl2_SelectedPageChanged; gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; - txt_suppId.getSuppler(""); - txt_lineId.getSuppler(""); - txt_itemId.Click += (s, e) => - { - string _lineId = txt_lineId.GetId(); - if (string.IsNullOrEmpty(_lineId)) - { - Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇峰厛閫夋嫨浜х嚎锛�"); - return; - } - var frm = new SelectFqcItem(_lineId); - frm.UpdateParent += (ss, ee) => - { - try - { - var lst = new List<dynamic>(); - lst = ee.DynamicList; - txt_itemId.Text = lst[0].itemId; - txt_itemModel.Text = lst[0].itemModel; - txt_itemName.Text = lst[0].itemName; - txt_itemNo.Text = lst[0].itemNo; - txt_lotNo.Text = lst[0].gdbh; - } - catch (Exception ex) - { - MessageBox.Show(ex.Message); - } - }; - frm.ShowDialog(); - }; } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) @@ -178,63 +148,14 @@ toolBarMenu1.guidKey = rowGuid; } /// <summary> - ///鎻愪氦妫�楠屼簨浠� + /// 璐ㄩ噺瀹℃牳 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> - /// <exception cref="NotImplementedException"></exception> - private void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e) + private void ToolBarMenu1_btnZhiLiangChkClick(object sender, EventArgs e) { - toolBarMenu1.guidKey = ""; - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_releaseNo, gridView1, "lotNo"); - toolBarMenu1.guidKey = rowGuid; - if (string.IsNullOrEmpty(rowGuid)) - { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); - return; - } - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎻愪氦妫�楠屽悧锛�")) - return; - if (txt_fcheckResu.Text.Trim() == "涓嶅悎鏍�") - { - if (string.IsNullOrEmpty(txt_remarks.Text.Trim())) - { - MsgHelper.Warning("鍗曟嵁涓轰笉鍚堟牸鏃讹紝璇峰~鍐欏娉ㄨ鏄庯紒"); - return; - } - }; - var _obj = new - { - guid = rowGuid, - }; - try - { - var strJson = UtilityHelper.HttpPost("", - _webServiceName + "EditModelSubmit", - JsonConvert.SerializeObject(_obj)); - var _rtn = UtilityHelper.ReturnToDynamic(strJson); - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg); - if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) - { - if (xtraTabControl1.SelectedTabPageIndex == 1) - { - getModel(lbGuid.Text.Trim(), "0"); - } - int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); - gridView1.FocusedRowHandle = rowHandle; - int _inFieldValue = 1; - UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString()); - } - } - catch (Exception ex) - { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); - } - + _toolCk(1); } - /// <summary> /// 鍙栨秷浜嬩欢 /// </summary> @@ -310,9 +231,9 @@ string _txt_djType = txt_djType.Text.Trim(); string _txt_fbatchQty = txt_fbatchQty.Text.Trim(); string _txt_lifnr = txt_lifnr.Text.Trim(); - string _txt_suppId = txt_suppId.GetId(); - string _txt_lineId = txt_lineId.GetId(); - string _txt_itemId = txt_itemId.Text.Trim(); + string _txt_suppId =""; + string _txt_lineId =""; + string _txt_itemId = txt_itemId11111.Text.Trim(); string _txt_remarks = txt_remarks.Text.Trim(); string _txt_workNo = txt_workNo.GetCode(); string _txt_epTag = txt_epTag.Text.Trim(); @@ -332,24 +253,6 @@ { Gs.DevApp.ToolBox.MsgHelper.Warning("鎶芥鏁伴噺涓嶈兘涓虹┖锛�"); txt_fbatchQty.Focus(); - return; - } - if (string.IsNullOrEmpty(_txt_lineId.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("浜х嚎涓嶈兘涓虹┖锛�"); - txt_lineId.Focus(); - return; - } - if (string.IsNullOrEmpty(_txt_itemId.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("浜у搧涓嶈兘涓虹┖锛�"); - txt_itemId.Focus(); - return; - } - if (string.IsNullOrEmpty(_txt_itemId.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("浜у搧涓嶈兘涓虹┖锛�"); - txt_itemId.Focus(); return; } if (string.IsNullOrEmpty(_txt_lotNo.Trim())) @@ -407,7 +310,7 @@ private void getPageList(int curPage) { var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); - // _sbSqlWhere += " and isnull(fsubmit,0)=0"; + _sbSqlWhere += " and isnull(fsubmit,0)=1"; PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); try @@ -566,5 +469,80 @@ //btnLoad.Enabled = bl; //btnIpt.Text = (bl == true ? "褰曞叆鏍锋湰" : "鏌ョ湅鏍锋湰"); } + + /// <summary> + /// 宸ュ叿鏉′簨浠� + /// </summary> + /// <param name="inFieldValue"></param> + private void _toolCk(int _inFieldValue) + { + string strMsg = ""; + switch (_inFieldValue) + { + case 1: + strMsg = "瀹℃牳"; + break; + }; + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo"); + if (string.IsNullOrEmpty(rowGuid)) + { + MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + return; + } + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) + return; + if (_inFieldValue == 1) + { + if (txt_fcheckResu.Text == "涓嶅悎鏍�") + { + //if (txt_fngHandle.Text.Trim().Length == 0) + //{ + // MsgHelper.Warning("鍗曟嵁涓轰笉鍚堟牸鏃惰閫夋嫨澶勭悊鏂瑰紡锛�"); + // return; + //} + } + } + var _obj = new + { + guid = rowGuid, + inFieldValue = _inFieldValue, + }; + try + { + var strJson = UtilityHelper.HttpPost("", + _webServiceName + "EditModelSubmitZhiLiang", + JsonConvert.SerializeObject(_obj)); + var _rtn = UtilityHelper.ReturnToDynamic(strJson); + MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); + if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) + { + if (_inFieldValue >= 0) + { + if (xtraTabControl1.SelectedTabPageIndex == 1) + { + getModel(lbGuid.Text.Trim(),"0"); + } + int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); + gridView1.FocusedRowHandle = rowHandle; + UtilityHelper.SetCheckIco(gridView1, "modifyFlagTxt", "modify1By", "modify1Date", picCheckBox, this, _inFieldValue.ToString()); + } + else + { + //if (xtraTabControl1.SelectedTabPageIndex == 1) + // getModel(lbGuid.Text.Trim()); + //else + // getPageList(this.pageBar1.CurrentPage); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); + getPageList(this.pageBar1.CurrentPage); + } + } + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + } } } \ No newline at end of file -- Gitblit v1.9.3