From e6a7247a28acc148d8f4099ab4b02064e808d11f Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 17 十二月 2024 11:10:20 +0800
Subject: [PATCH] 打印
---
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.Designer.cs | 26 ++++----
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs | 120 +++++++++++++++++++++++++++++++++------
DevApp/Gs.DevApp/App.config | 4
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs | 17 ++---
4 files changed, 121 insertions(+), 46 deletions(-)
diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config
index a645fe4..48985a7 100644
--- a/DevApp/Gs.DevApp/App.config
+++ b/DevApp/Gs.DevApp/App.config
@@ -28,8 +28,8 @@
</assemblyBinding>
</runtime>
<appSettings>
- <add key="WebApiUrl" value="http://localhost:5263/" />
- <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />-->
+ <!--<add key="WebApiUrl" value="http://localhost:5263/" />-->
+ <add key="WebApiUrl" value="http://192.168.1.145:81/" />
<add key="LogPath" value="logs" />
<add key="ProductName" value="骞挎繁绉戞妧 G-MES V2.0" />
<add key="PageSize" value="50" />
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
index 333edf7..cb08df1 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -155,22 +155,18 @@
this.toolBarMenu1.rptParameter = "return false";
return;
}
+ if (lbMxGuid.Text.Trim().Length < 10)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�");
+ this.toolBarMenu1.rptParameter = "return false";
+ return;
+ }
this.toolBarMenu1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim()
+ "," + ""
+ "," + ""
+ "," + txt_iCount_1.Text.Trim()
+ "," + txt_psnQty_1.Text.Trim()
+ "}";
-
-
- //this.toolBarMenu1.rptParameter = "rpt_Arrival{" + ""
- // + "," + ""
- // + "," + ""
- // + "," + txt_iCount_1.Text.Trim()
- // + "," + txt_psnQty_1.Text.Trim()
- // + "}";
-
-
}
/// <summary>
@@ -415,7 +411,6 @@
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
-
var _obj = new
{
guid = strGuid,//涓诲缓
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.Designer.cs
index 1981f34..9451777 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.Designer.cs
@@ -59,7 +59,7 @@
this.labelControl12 = new DevExpress.XtraEditors.LabelControl();
this.kyPrtQty = new DevExpress.XtraEditors.TextEdit();
this.labelControl13 = new DevExpress.XtraEditors.LabelControl();
- this.textEdit6 = new DevExpress.XtraEditors.TextEdit();
+ this.txtYdy = new DevExpress.XtraEditors.TextEdit();
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
this.txtQuantity = new DevExpress.XtraEditors.TextEdit();
this.labelControl10 = new DevExpress.XtraEditors.LabelControl();
@@ -141,7 +141,7 @@
((System.ComponentModel.ISupportInitialize)(this.txt_iCount_1.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_psnQty_1.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kyPrtQty.Properties)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.textEdit6.Properties)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.txtYdy.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtQuantity.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtWlgg.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtWlmc.Properties)).BeginInit();
@@ -388,7 +388,7 @@
this.panelMx1.Controls.Add(this.labelControl12);
this.panelMx1.Controls.Add(this.kyPrtQty);
this.panelMx1.Controls.Add(this.labelControl13);
- this.panelMx1.Controls.Add(this.textEdit6);
+ this.panelMx1.Controls.Add(this.txtYdy);
this.panelMx1.Controls.Add(this.labelControl1);
this.panelMx1.Controls.Add(this.txtQuantity);
this.panelMx1.Controls.Add(this.labelControl10);
@@ -465,15 +465,15 @@
this.labelControl13.TabIndex = 223;
this.labelControl13.Text = "鍙墦鍗版�绘暟锛�";
//
- // textEdit6
+ // txtYdy
//
- this.textEdit6.Location = new System.Drawing.Point(430, 34);
- this.textEdit6.Name = "textEdit6";
- this.textEdit6.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
- this.textEdit6.Properties.Appearance.Options.UseFont = true;
- this.textEdit6.Properties.ReadOnly = true;
- this.textEdit6.Size = new System.Drawing.Size(96, 28);
- this.textEdit6.TabIndex = 222;
+ this.txtYdy.Location = new System.Drawing.Point(430, 34);
+ this.txtYdy.Name = "txtYdy";
+ this.txtYdy.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
+ this.txtYdy.Properties.Appearance.Options.UseFont = true;
+ this.txtYdy.Properties.ReadOnly = true;
+ this.txtYdy.Size = new System.Drawing.Size(96, 28);
+ this.txtYdy.TabIndex = 222;
//
// labelControl1
//
@@ -1361,7 +1361,7 @@
((System.ComponentModel.ISupportInitialize)(this.txt_iCount_1.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_psnQty_1.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kyPrtQty.Properties)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.textEdit6.Properties)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.txtYdy.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtQuantity.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtWlgg.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtWlmc.Properties)).EndInit();
@@ -1484,7 +1484,7 @@
private DevExpress.XtraEditors.LabelControl labelControl12;
private DevExpress.XtraEditors.TextEdit kyPrtQty;
private DevExpress.XtraEditors.LabelControl labelControl13;
- private DevExpress.XtraEditors.TextEdit textEdit6;
+ private DevExpress.XtraEditors.TextEdit txtYdy;
private DevExpress.XtraEditors.LabelControl labelControl1;
private DevExpress.XtraEditors.TextEdit txtQuantity;
private DevExpress.XtraEditors.LabelControl labelControl10;
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs
index 081d82e..96fcd0b 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs
@@ -27,8 +27,19 @@
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
-
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "tbl013");
+ toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
+ toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "tbl013", "", (value) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+ });
+ Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
+ {
+ getModel(value);
+ }, (value) =>
+ {
+ getPageList(this.pageBar1.CurrentPage);
+ });
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
//閫夋嫨闇�瑕佸叆搴撶殑鏄庣粏
@@ -71,6 +82,8 @@
};
frm.ShowDialog();
};
+
+ gcMx1.MouseClick += GcMx1_MouseClick;
}
private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
@@ -78,17 +91,7 @@
await Task.Delay(100);
getPageList(1);
}
- /// <summary>
- /// 鍙屽嚮浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
- if (!string.IsNullOrEmpty(rowGuid))
- getModel(rowGuid, false, 999);
- }
+
/// <summary>
/// 鍒嗛〉浜嬩欢
/// </summary>
@@ -122,6 +125,58 @@
_filterList = e.FilterList;
getPageList(1);
}
+
+ private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_billNo, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
+ toolBarMenu1.rptParameter = "rpt_SCTL{}";
+ }
+ private void ToolBarMenu1_btnReportClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_billNo, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
+ if (xtraTabControl1.SelectedTabPageIndex == 0)
+ {
+ getModel(rowGuid);
+ this.toolBarMenu1.rptParameter = "return false";
+ return;
+ }
+ if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
+ txt_iCount_1.Focus();
+ this.toolBarMenu1.rptParameter = "return false";
+ return;
+ }
+ if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
+ txt_psnQty_1.Focus();
+ this.toolBarMenu1.rptParameter = "return false";
+ return;
+ }
+ if (lbMxGuid.Text.Trim().Length < 10)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�");
+ this.toolBarMenu1.rptParameter = "return false";
+ return;
+ }
+ this.toolBarMenu1.rptParameter = "rpt_SCTL{" + lbMxGuid.Text.Trim()
+ + "," + ""
+ + "," + ""
+ + "," + txt_iCount_1.Text.Trim()
+ + "," + txt_psnQty_1.Text.Trim()
+ + "}";
+ }
+
+
/// <summary>
/// 瀹℃牳浜嬩欢
/// </summary>
@@ -149,7 +204,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>
@@ -202,7 +257,7 @@
private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
{
if (xtraTabControl1.SelectedTabPageIndex == 1)
- getModel(lbGuid.Text.Trim(), false, 999);
+ getModel(lbGuid.Text.Trim());
else
{
_filterList.Clear();
@@ -229,7 +284,8 @@
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
- getModel(rowGuid, true, 1);
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
+ UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
}
/// <summary>
/// 鏂板浜嬩欢
@@ -361,14 +417,16 @@
}
}
- private void getModel(string strGuid, bool isEdit, int tabIdx)
+ private void getModel(string strGuid)
{
+ bool isEdit = false;
+ if (toolBarMenu1.currentAction == "add") return;
+ if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
- UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
var _obj = new
{
guid = strGuid,//涓诲缓
@@ -440,7 +498,7 @@
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1);
+ if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
}
MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
}
@@ -494,7 +552,7 @@
if (_rtn.rtnCode > 0)
{
if (xtraTabControl1.SelectedTabPageIndex == 1)
- getModel(lbGuid.Text.Trim(), false, 999);
+ getModel(lbGuid.Text.Trim());
else
getPageList(1);
}
@@ -505,5 +563,27 @@
}
}
+
+
+ private void GcMx1_MouseClick(object sender, MouseEventArgs e)
+ {
+ string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gvMx1, e, "tlid");
+ if (string.IsNullOrEmpty(rowGuid))
+ return;
+ lbMxGuid.Text = rowGuid;
+ toolBarMenu1.guidKey = rowGuid;
+ var info = gvMx1.CalcHitInfo(e.Location);
+ var view = info.View;
+ var row = view.GetDataRow(info.RowHandle);
+ txtWlid.Text = row["tld002"].ToString();
+ txtWlgg.Text = row["tld004"].ToString();
+ txtWlmc.Text = row["tld003"].ToString();
+ txtQuantity.Text = row["tld004"].ToString();//鐢宠鎬婚噺
+ //txtYdy.Text = row["YDYNUM"].ToString();//宸叉墦鍗版�婚噺
+ //kyPrtQty.Text = row["KDYNUM"].ToString();//鍙墦鍗版�婚噺
+
+ txtYdy.Text ="";//宸叉墦鍗版�婚噺
+ kyPrtQty.Text ="";//鍙墦鍗版�婚噺
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.3