From 7517f4742fbe90e6e347c40f9db83d1393bef704 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 01 四月 2025 15:19:23 +0800
Subject: [PATCH] 工序
---
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs | 69 +++++++++++++++++++++++-----------
1 files changed, 46 insertions(+), 23 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
index 654b799..1f660bd 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -30,8 +30,10 @@
this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
+ toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
+ this.toolBarMenu1.getXmlConfig();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isSh", "", (value) =>
@@ -47,7 +49,7 @@
});
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
-
+
//閫夋嫨搴撳瓨缁勭粐锛堝彉鏄庣粏涓殑鐗╂枡鍜屽彉璐т富锛�
this.txt_qt022.EditChanged += (s, e) =>
{
@@ -57,7 +59,7 @@
ucLookHuoZhu1.OrgId = _orgId;
ucLookHuoZhu1.HzId = _ucHz;
ucLookHuoZhu1.SetHzLx(_ucHzlx);
- txt_qt009.getSuppler(_orgId,_ucBm);
+ txt_qt009.getSuppler(_orgId, _ucBm);
txt_qt018.getSuppler(_orgId, _ucGys);
txt_qt008.getSuppler(_orgId, _ucCk);
System.Text.StringBuilder sbWhere = new System.Text.StringBuilder();
@@ -77,7 +79,6 @@
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
};
-
gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
this.ucBtnPrint1.btnDesignClick += (s, e) =>
{
@@ -118,9 +119,22 @@
}
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);
+ }
+ /// <summary>
+ /// 鏃ュ織
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_qtck, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
}
/// <summary>
@@ -142,7 +156,7 @@
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
gridView1.ActiveFilter.Clear();
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- var frm = new ShowFilter(gridView1.Columns, _filterList);
+ var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
frm.UpdateParent += Frm_UpdateParent;
frm.ShowDialog();
}
@@ -257,7 +271,7 @@
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);
+ UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
ucLookHuoZhu1.Enabled = true;
}
}
@@ -273,7 +287,7 @@
List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gridViews.Add(gvMx1);
gridViews.Add(gvMx2);
- UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews);
+ UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
ucLookHuoZhu1.Enabled = true;
@@ -323,9 +337,15 @@
txt_qt019.Focus();
return;
}
+ if (string.IsNullOrEmpty(kcBm) && string.IsNullOrEmpty(kcGys))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("閮ㄩ棬鎴栦緵搴斿晢蹇呴』閫変竴涓紒");
+ txt_qt009.Focus();
+ return;
+ }
if (string.IsNullOrEmpty(kcCk))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍙戞枡浠撳簱锛�");
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鏀舵枡浠撳簱锛�");
txt_qt008.Focus();
return;
}
@@ -384,7 +404,7 @@
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
gvList.Add(gvMx2);
- UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList);
+ UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
ucLookHuoZhu1.Enabled = false;
toolBarMenu1.currentAction = "";
}
@@ -412,16 +432,16 @@
if (dd.rtnCode > 0)
{
DataTable dt = dd.rtnData.list;
- gcMain.BindingContext = new BindingContext();
+ gcMain1.BindingContext = new BindingContext();
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
if (dt.Rows.Count > 0)
{
- gcMain.DataSource = dt;
- gcMain.ForceInitialize();
- gridView1.BestFitColumns();
+ gcMain1.DataSource = dt;
+ gcMain1.ForceInitialize();
+ gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
}
else
- UtilityHelper.SetDefaultTable(gcMain, gridView1);
+ UtilityHelper.SetDefaultTable(gcMain1, gridView1);
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉
pageBar1.CurrentPage = curPage;//褰撳墠椤�
@@ -439,6 +459,7 @@
}
private void getModel(string strGuid)
{
+ gcMx1.DataSource = null;
bool isEdit = false;
if (toolBarMenu1.currentAction == "add") return;
if (toolBarMenu1.currentAction == "edit") isEdit = true;
@@ -467,12 +488,13 @@
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
gvList.Add(gvMx2);
- UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList);
- _ucGys ="";
+ UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
+ _ucGys = "";
_ucBm = "";
_ucCk = "";
_ucHzlx = "";
_ucHz = "";
+ ucLookHuoZhu1.Enabled = isEdit;
JObject _job = JObject.Parse(strJson);
JArray array = new JArray();
foreach (var a in _job["rtnData"]["list"])
@@ -486,6 +508,7 @@
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
gvMx1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
}
else
{
@@ -503,6 +526,7 @@
gcMx2.DataSource = dt2;
gcMx2.ForceInitialize();
gvMx2.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2);
}
else
{
@@ -525,7 +549,7 @@
gvMx1.SetFocusedRowCellValue("qd002", SelectedDataRow["itemNo"]);
gvMx1.SetFocusedRowCellValue("qd003", SelectedDataRow["itemName"]);
gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]);
- gvMx1.SetFocusedRowCellValue("qd009", SelectedDataRow["dwName"]);
+ gvMx1.SetFocusedRowCellValue("kcDw", SelectedDataRow["dwName"]);
gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"]);
}
@@ -637,8 +661,7 @@
}
int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
gridView1.FocusedRowHandle = rowHandle;
- Form parentForm = this.FindForm();
- UtilityHelper.SetCheckIco(gridView1, "isSh", "qt016", "qt002", picCheckBox, parentForm, _inFieldValue.ToString());
+ UtilityHelper.SetCheckIco(gridView1, "isSh", "qt016", "qt002", picCheckBox, this, _inFieldValue.ToString());
}
}
catch (Exception ex)
@@ -656,9 +679,9 @@
txtWlid.Text = row["qd002"].ToString();
txtWlgg.Text = row["qd004"].ToString();
txtWlmc.Text = row["qd003"].ToString();
- //txtQuantity.Text = row["qd007"].ToString();//鐢宠鎬婚噺
- //txtYdy.Text = row["YDYNUM"].ToString();//宸叉墦鍗版�婚噺
- //kyPrtQty.Text = row["KDYNUM"].ToString();//鍙墦鍗版�婚噺
+ txtQuantity.Text = row["qd007"].ToString();//鐢宠鎬婚噺
+ txtYdy.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺
+ txtKdy.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺
}
}
/// <summary>
@@ -685,7 +708,7 @@
try
{
var strJson = UtilityHelper.HttpPost("",
- _webServiceName + "DeleteBarcode",
+ "VArrivalBarcodeManager/DeleteBarcode",
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
--
Gitblit v1.9.3