From ce4118ba015ab9fee368516d0e738c8dc598320b Mon Sep 17 00:00:00 2001 From: cdk <2441919651@qq.com> Date: 星期四, 07 八月 2025 10:25:24 +0800 Subject: [PATCH] 考勤增加查询功能 --- DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs | 86 +++++++++++++++++++------------------------ 1 files changed, 38 insertions(+), 48 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs index eee26ec..bb56b81 100644 --- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs +++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs @@ -99,7 +99,7 @@ } catch (Exception ex) { - MessageBox.Show(ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } }; frm.ShowDialog(); @@ -199,17 +199,19 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); if (xtraTabControl1.SelectedTabPageIndex == 0) { } else Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); getPageList(this.pageBar1.CurrentPage); } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } /// <summary> @@ -268,7 +270,7 @@ lbGuid, txt_hNo, gridView1); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); @@ -282,6 +284,8 @@ gvList.Add(gvMx1); UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList); } + //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼 + txt_erpSczz.IsReadly = true; } /// <summary> /// 鏂板浜嬩欢 @@ -310,7 +314,7 @@ string workId = txt_pba013.GetId(); if (string.IsNullOrEmpty(workId.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨杞﹂棿锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨杞﹂棿锛�"); txt_pba013.Focus(); return; } @@ -335,6 +339,11 @@ if (row != null) { Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); + if (string.IsNullOrEmpty(row["daa025"].ToString())) + { + MsgHelper.ShowError("鐢熶骇绫诲瀷涓嶈兘涓虹┖锛�"); + return; + } string _LineId = row["daa015"].ToString(); if (string.IsNullOrEmpty(_LineId)) { @@ -352,48 +361,22 @@ MsgHelper.ShowError("棰勮寮�宸ユ椂闂翠笉鑳戒负绌猴紒"); return; } - //string _prepareTime = row["prepareTime"].ToString(); - //if (string.IsNullOrEmpty(_prepareTime)) - //{ - // MsgHelper.ShowError("棰勮澶囨枡鏃堕棿涓嶈兘涓虹┖锛�"); - // return; - //} - //string _planPersonnel = row["planPersonnel"].ToString(); - //if (string.IsNullOrEmpty(_planPersonnel)) - //{ - // MsgHelper.ShowError("璁″垝浜烘暟锛�"); - // return; - //} - //string _changeLinetime = row["changeLinetime"].ToString(); - //if (string.IsNullOrEmpty(_changeLinetime)) - //{ - // MsgHelper.ShowError("鎹㈢嚎鏃堕棿涓嶈兘涓虹┖锛�"); - // return; - //} string _mesEndProd = row["mesEndProd"].ToString(); if (string.IsNullOrEmpty(_mesEndProd)) { MsgHelper.ShowError("棰勮瀹屽伐鏃堕棿涓嶈兘涓虹┖锛�"); return; } - //string _restTime = row["restTime"].ToString(); - //if (string.IsNullOrEmpty(_prepareTime)) - //{ - // MsgHelper.ShowError("浼戞伅鏃堕棿涓嶈兘涓虹┖锛�"); - // return; - //} _obj.list.Add(new { Guid = _guid, AboutGuid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(row["caaGuid"].ToString()), LineId = row["daa015"].ToString(),//浜х嚎id + Hxsj = row["daa025"].ToString(),//鐢熶骇绫诲瀷 Yjkgsj = (row["mesStartProd"].ToString()),//棰勮寮�宸ユ椂闂� - Jhrs = row["planPersonnel"].ToString(),//璁″垝浜烘暟 - Hxsj = row["changeLinetime"].ToString(),//鎹㈢嚎鏃堕棿 - Bz = row["daa009"].ToString(),//澶囨敞 - Blsj = row["prepareTime"].ToString(),//棰勮澶囨枡鏃堕棿 + Yjwgsj = row["mesEndProd"].ToString(),//棰勮瀹屽伐鏃堕棿 Pcsl = row["daa008"].ToString(),//鎺掍骇鏁伴噺 - Yjwgsj = row["mesEndProd"].ToString()//棰勮瀹屽伐鏃堕棿 + Bz = row["daa009"].ToString(),//澶囨敞 }); } } @@ -401,9 +384,9 @@ { string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); if (_rtn.rtnCode > 0) { + ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); lbGuid.Text = _rtn.rtnData.outGuid; txt_hNo.Text = _rtn.rtnData.outNo; toolBarMenu1.isSetBtn = true; @@ -413,10 +396,12 @@ toolBarMenu1.currentAction = ""; Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); } + else + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -427,7 +412,7 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage) { - gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); + gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); try @@ -460,7 +445,7 @@ } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -471,7 +456,7 @@ if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -512,11 +497,11 @@ } } else - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) @@ -548,13 +533,15 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { - if (_rtn.rtnCode > 0) getModel(lbGuid.Text); + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); + getModel(lbGuid.Text); } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } @@ -583,7 +570,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } private void rptJYBZ_SelectedIndexChanged(object sender, EventArgs e) @@ -619,7 +606,8 @@ case 0: strMsg = "鍙嶅鏍�"; break; - }; + } + ; toolBarMenu1.guidKey = ""; string rowGuid, rowName; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_hNo, gridView1, "hNo"); @@ -639,9 +627,9 @@ { var strJson = UtilityHelper.HttpPost("", _webServiceName + _mth, JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { + MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString()); if (xtraTabControl1.SelectedTabPageIndex == 1) { getModel(lbGuid.Text.Trim()); @@ -650,10 +638,12 @@ gridView1.FocusedRowHandle = rowHandle; UtilityHelper.SetCheckIco(gridView1, "fstatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); } + else + MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString()); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } -- Gitblit v1.9.3