From 12c3680f0b8d0c210b76a11819132d36fc938e26 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期六, 26 七月 2025 10:29:30 +0800
Subject: [PATCH] 增加部门产线对应表
---
DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs | 129 ++++++++++++++++++++-----------------------
1 files changed, 60 insertions(+), 69 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs b/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs
index b5da7cf..2e3daa0 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs
@@ -15,33 +15,41 @@
{
string _webServiceName = "MesQcExceptionalManager/";
List<FilterEntity> _filterList = new List<FilterEntity>();
+
+ public void Initialize(string param)
+ {
+ // 浣跨敤param杩涜鍒濆鍖栧伐浣�
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+ getModel(param);
+ }
+
public MesQcExceptional()
{
InitializeComponent();
this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
- toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
this.toolBarMenu1.getXmlConfig();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) =>
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "chkStatus", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- });
+ }, tips);
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
}, (value) =>
{
getPageList(this.pageBar1.CurrentPage);
- });
+ }, lbGuid);
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
}
+
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
- Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
+ _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
Task.Delay(100);
getPageList(1);
}
@@ -77,7 +85,7 @@
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
gridView1.ActiveFilter.Clear();
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
+ var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
frm.UpdateParent += Frm_UpdateParent;
frm.ShowDialog();
}
@@ -92,7 +100,7 @@
_filterList = e.FilterList;
getPageList(1);
}
-
+
/// <summary>
/// 鍒锋柊浜嬩欢
/// </summary>
@@ -126,26 +134,13 @@
}
/// <summary>
- /// 鍙嶅鏍�
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- /// <exception cref="NotImplementedException"></exception>
- private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
- {
- _toolCk(0);
- }
-
-
-
- /// <summary>
///
/// </summary>
/// <param name="curPage">绗嚑椤�</param>
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- 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
@@ -180,8 +175,11 @@
{
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
-
}
+ /// <summary>
+ /// 璇诲彇瀹炰綋
+ /// </summary>
+ /// <param name="strGuid"></param>
private void getModel(string strGuid)
{
bool isEdit = false;
@@ -220,6 +218,8 @@
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
gvMx1.BestFitColumns();
+
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
}
else
{
@@ -234,45 +234,6 @@
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
- private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
- {
- var rowhandle = gvMx1.FocusedRowHandle;
- if (rowhandle < 0)
- return;
- if (e.Button.Index == 0)
- {
- var dr = gvMx1.GetDataRow(rowhandle);
- var mxGuid = dr["guid"].ToString();
- if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
- return;
- if (string.IsNullOrEmpty(mxGuid))
- {
- gvMx1.DeleteRow(rowhandle);
- return;
- }
- var _obj = new
- {
- guid = lbGuid.Text.Trim(),
- mxGuid = mxGuid,
- };
- try
- {
- var strJson = UtilityHelper.HttpPost("",
- _webServiceName + "DeleteModelOrMx",
- JsonConvert.SerializeObject(_obj));
- var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- if (_rtn.rtnCode > 0)
- {
- if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
- }
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
- }
- catch (Exception ex)
- {
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- }
- }
- }
/// <summary>
/// 宸ュ叿鏉′簨浠�
@@ -284,26 +245,57 @@
/// <param name="inFieldValue"></param>
private void _toolCk(int _inFieldValue)
{
+ //toolBarMenu1.guidKey = "";
+ //string rowGuid, rowName;
+ //(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ // lbGuid, txt_fBillNo, gridView1, "fBillNo");
+ //toolBarMenu1.guidKey = rowGuid;
+ //if (string.IsNullOrEmpty(rowGuid))
+ //{
+ // MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ // return;
+ //}
+ //if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎿嶄綔鍚楋紵"))
+ // return;
+ //var frm = new MesQcExceptionalShow(rowGuid);
+ //frm.UpdateParent += (s, e) =>
+ //{
+ // int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+ // gridView1.FocusedRowHandle = rowHandle;
+ // UtilityHelper.SetCheckIco(gridView1, "chkStatus", "checkBy", "checkDate", picCheckBox, this, _inFieldValue.ToString());
+ //};
+ //frm.ShowDialog();
+ //return;
+ string strMsg = "";
+ switch (_inFieldValue)
+ {
+ case 1:
+ strMsg = "瀹℃牳";
+ break;
+ case 0:
+ strMsg = "鍙嶅鏍�";
+ break;
+ };
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_fBillNo, gridView1, "fBillNo");
- toolBarMenu1.guidKey = rowGuid;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "fBillNo");
if (string.IsNullOrEmpty(rowGuid))
{
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
- if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎿嶄綔鍚楋紵"))
+ if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
return;
var _obj = new
{
guid = rowGuid,
- inFieldValue = _inFieldValue
+ inFieldValue = _inFieldValue,
};
try
{
- var strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModelSubmit", JsonConvert.SerializeObject(_obj));
+ var strJson = UtilityHelper.HttpPost("",
+ _webServiceName + "EditModelSubmit",
+ JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
@@ -314,7 +306,7 @@
}
int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
gridView1.FocusedRowHandle = rowHandle;
- UtilityHelper.SetCheckIco(gridView1, "checkStatus", "checkBy", "checkDate", picCheckBox, this, _inFieldValue.ToString());
+ UtilityHelper.SetCheckIco(gridView1, "chkStatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString());
}
}
catch (Exception ex)
@@ -322,6 +314,5 @@
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
-
}
}
\ No newline at end of file
--
Gitblit v1.9.3