From 719894be883cd18a0ce3334e6d9f32ebf6b9a002 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期一, 23 十二月 2024 18:35:16 +0800 Subject: [PATCH] 委外排产 --- DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs | 143 +++++++++++++++++++++-------------------------- 1 files changed, 64 insertions(+), 79 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs index acc6d88..aa11f7d 100644 --- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs +++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs @@ -136,43 +136,7 @@ /// <param name="e"></param> private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) { - toolBarMenu1.guidKey = ""; - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_hNo, gridView1, "hNo"); - //toolBarMenu1.guidKey = rowGuid; - if (string.IsNullOrEmpty(rowGuid)) - { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); - return; - } - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾瀹℃牳鍚楋紵")) - 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.ToString()); - if (_rtn.rtnCode > 0) - { - if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim()); - else - getPageList(1); - } - } - catch (Exception ex) - { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); - } - + _toolCk(1, "EditModelSubmit"); } /// <summary> @@ -183,45 +147,7 @@ /// <exception cref="NotImplementedException"></exception> private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) { - toolBarMenu1.guidKey = ""; - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_hNo, gridView1); - // toolBarMenu1.guidKey = rowGuid; - if (string.IsNullOrEmpty(rowGuid)) - { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); - return; - } - //MsgHelper.Warning(rowGuid); - - var _obj = new - { - guid = rowGuid, - }; - try - { - var strJson = UtilityHelper.HttpPost("", - _webServiceName + "DeApprove", - JsonConvert.SerializeObject(_obj)); - var _rtn = UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) - { - if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim()); - else - getPageList(1); - } - else - { - MsgHelper.Warning(_rtn.rtnMsg); - } - } - catch (Exception ex) - { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); - } - + _toolCk(0, "EditModelSubmitFSH"); } /// <summary> @@ -231,7 +157,7 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); } /// <summary> @@ -269,7 +195,6 @@ else Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) @@ -437,7 +362,9 @@ { lbGuid.Text = _rtn.rtnData; toolBarMenu1.isSetBtn = true; - UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); + List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + gvList.Add(gvMx1); + UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList); } } catch (Exception ex) @@ -584,6 +511,10 @@ } } + /// <summary> + /// 鏍规嵁杞﹂棿璇讳骇绾� + /// </summary> + /// <param name="workGuid"></param> private void _getListJybz(string workGuid) { if (string.IsNullOrEmpty(workGuid)) @@ -629,5 +560,59 @@ gvMx1.SetRowCellValue(dataIndex, "daa015", _val); } } + + + /// <summary> + /// 宸ュ叿鏉′簨浠� + /// </summary> + /// <param name="inFieldValue"></param> + private void _toolCk(int _inFieldValue,string _mth) + { + string strMsg = ""; + switch (_inFieldValue) + { + case 1: + strMsg = "瀹℃牳"; + break; + case 0: + strMsg = "鍙嶅鏍�"; + break; + }; + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_hNo, gridView1, "hNo"); + if (string.IsNullOrEmpty(rowGuid)) + { + MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + return; + } + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) + return; + var _obj = new + { + guid = rowGuid, + inFieldValue = _inFieldValue, + }; + try + { + var strJson = UtilityHelper.HttpPost("", + _webServiceName + _mth, + JsonConvert.SerializeObject(_obj)); + var _rtn = UtilityHelper.ReturnToDynamic(strJson); + MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); + if (_rtn.rtnCode > 0) + { + if (xtraTabControl1.SelectedTabPageIndex == 1) + getModel(lbGuid.Text.Trim()); + else + getPageList(this.pageBar1.CurrentPage); + } + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + + } } } \ No newline at end of file -- Gitblit v1.9.3