From 5c66ff724a6ab1bef5fe7877821ec91997151484 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 20 二月 2025 11:05:40 +0800
Subject: [PATCH] 委外
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs | 102 ++++++++++++++++++++++++++++++++++++---------------
1 files changed, 72 insertions(+), 30 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
index 790fdd7..856b23e 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
@@ -31,14 +31,16 @@
toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1);
+ List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gridView1);
+ Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList);
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, "qualityAudit", "", (value) =>
- {
- Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- });
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "modifyFlagTxt", "", (value) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+ });
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
@@ -54,7 +56,7 @@
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
- _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
+ Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
Task.Delay(100);
getPageList(1);
}
@@ -177,15 +179,26 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
{
+ toolBarMenu1.currentAction = "edit";
string rowGuid = "", rowName = "";
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1);
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
if (string.IsNullOrEmpty(rowGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
- UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
+ if (xtraTabControl1.SelectedTabPageIndex == 1)
+ {
+ getModel(rowGuid);
+ }
+ else
+ {
+ List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gvMx1);
+ gvList.Add(gvMx2);
+ UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList);
+ }
}
private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e)
{
@@ -201,11 +214,11 @@
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
lbGuid, txt_itemName, gridView1);
toolBarMenu1.guidKey = rowGuid;
- this.toolBarMenu1.rptParameter = "rpt_Detect01{" + ""
- + "," + ""
- + "," + ""
- + "," + ""
- + "," + ""
+ this.toolBarMenu1.rptParameter = "rpt_Detect01{" + "1"
+ + "," + "1"
+ + "," + "1"
+ + "," + "1"
+ + "," + "1"
+ "}";
}
@@ -249,14 +262,15 @@
getModel(lbGuid.Text.Trim());
else
{
- _filterList.Clear();
- if (gridView1.ActiveFilter.Count > 0)
- {
- gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
- gridView1.ActiveFilter.Clear();
- gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- }
- getPageList(1);
+ //_filterList.Clear();
+ //if (gridView1.ActiveFilter.Count > 0)
+ //{
+ // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+ // gridView1.ActiveFilter.Clear();
+ // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+ //}
+ //getPageList(1);
+ getPageList(this.pageBar1.CurrentPage);
}
}
@@ -265,7 +279,7 @@
/// </summary>
/// <param name="curPage">绗嚑椤�</param>
/// <param name="pageSize">姣忛〉鍑犳潯</param>
- private void getPageList(int curPage)
+ private void getPageList(int curPage)
{
var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
_sbSqlWhere += " and isnull(fsubmit,0)=1";
@@ -284,6 +298,7 @@
{
gcMain.DataSource = dt;
gcMain.ForceInitialize();
+ gridView1.BestFitColumns();
}
else
UtilityHelper.SetDefaultTable(gcMain, gridView1);
@@ -301,9 +316,9 @@
{
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
-
+
}
- private void getModel(string strGuid)
+ private void getModel(string strGuid)
{
bool isEdit = false;
if (toolBarMenu1.currentAction == "add") return;
@@ -340,6 +355,7 @@
gcMx1.BindingContext = new BindingContext();
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
+ gvMx1.BestFitColumns();
ucUpFile1.parentGuid = lbGuid.Text.Trim();
getList12(dt.Rows[0]["guid"].ToString());
}
@@ -355,7 +371,7 @@
{
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
-
+
}
/// <summary>
/// 閫夐」鍗″垏鎹�
@@ -409,7 +425,7 @@
/// 鏍规嵁妫�楠岄」鐩鍙栨娊鏍风粨鏋�
/// </summary>
/// <param name="guid5"></param>
- private void getList12(string guid5)
+ private void getList12(string guid5)
{
var _obj = new
{
@@ -424,6 +440,7 @@
gcMx2.BindingContext = new BindingContext();
gcMx2.DataSource = dt;
gcMx2.ForceInitialize();
+ gvMx2.BestFitColumns();
}
catch (Exception ex)
{
@@ -543,6 +560,17 @@
}
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,
@@ -555,12 +583,27 @@
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
- if (_rtn.rtnCode > 0)
+ if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
- if (xtraTabControl1.SelectedTabPageIndex == 1)
- getModel(lbGuid.Text.Trim());
+ if (_inFieldValue >= 0)
+ {
+ if (xtraTabControl1.SelectedTabPageIndex == 1)
+ {
+ getModel(lbGuid.Text.Trim());
+ }
+ 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)
@@ -568,6 +611,5 @@
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
-
}
}
\ No newline at end of file
--
Gitblit v1.9.3