From 3a2951930c1827030a3428c8e38a06acd36c217a Mon Sep 17 00:00:00 2001
From: kyy <3283105747@qq.com>
Date: 星期一, 17 十一月 2025 19:44:44 +0800
Subject: [PATCH] 到货条码一键打、采购入库单、到货条码打印、IQC检验列表页面加字段加需求跟踪号、
---
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs | 136 +++------------------------------
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.resx | 3
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.Designer.cs | 94 ++++++++++++++---------
3 files changed, 74 insertions(+), 159 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.Designer.cs
index 7598a5d..a361b64 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.Designer.cs
@@ -188,6 +188,7 @@
this.xtraTabPage3 = new DevExpress.XtraTab.XtraTabPage();
this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl();
this.lay99 = new DevExpress.XtraLayout.LayoutControl();
+ this.ucBtnPrintOne1 = new Gs.DevApp.UserControl.UcBtnPrintOne();
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
this.txt_iCount_2 = new DevExpress.XtraEditors.TextEdit();
this.txt_yuliang_2 = new DevExpress.XtraEditors.TextEdit();
@@ -217,6 +218,7 @@
this.layoutControlItem39 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem35 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem40 = new DevExpress.XtraLayout.LayoutControlItem();
+ this.layoutControlItem41 = new DevExpress.XtraLayout.LayoutControlItem();
this.gcMx3 = new DevExpress.XtraGrid.GridControl();
this.gvMx3 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.gridColumn33 = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -319,8 +321,8 @@
this.gv_hbdy = new DevExpress.XtraGrid.Columns.GridColumn();
this.tips = new DevExpress.Utils.ToolTipController(this.components);
this.behaviorManager1 = new DevExpress.Utils.Behaviors.BehaviorManager(this.components);
- this.ucBtnPrintOne1 = new Gs.DevApp.UserControl.UcBtnPrintOne();
- this.layoutControlItem41 = new DevExpress.XtraLayout.LayoutControlItem();
+ this.gridColumn109 = new DevExpress.XtraGrid.Columns.GridColumn();
+ this.gridColumn110 = new DevExpress.XtraGrid.Columns.GridColumn();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
this.xtraTabControl1.SuspendLayout();
this.xtraTabPage1.SuspendLayout();
@@ -424,6 +426,7 @@
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem39)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem35)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem40)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem41)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gcMx3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit3)).BeginInit();
@@ -474,7 +477,6 @@
((System.ComponentModel.ISupportInitialize)(this.gcMx2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.behaviorManager1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem41)).BeginInit();
this.SuspendLayout();
//
// toolBarMenu1
@@ -858,7 +860,8 @@
this.gridColumn102,
this.gridColumn103,
this.gridColumn104,
- this.gridColumn105});
+ this.gridColumn105,
+ this.gridColumn110});
this.gvMxL2.DetailHeight = 272;
this.gvMxL2.GridControl = this.gcMxL2;
this.gvMxL2.Name = "gvMxL2";
@@ -2038,6 +2041,17 @@
this.lay99.TabIndex = 0;
this.lay99.Text = "layoutControl2";
//
+ // ucBtnPrintOne1
+ //
+ this.ucBtnPrintOne1.allClickKey = null;
+ this.ucBtnPrintOne1.guidKey = null;
+ this.ucBtnPrintOne1.Location = new System.Drawing.Point(1011, 12);
+ this.ucBtnPrintOne1.Margin = new System.Windows.Forms.Padding(0);
+ this.ucBtnPrintOne1.Name = "ucBtnPrintOne1";
+ this.ucBtnPrintOne1.rptParameter = null;
+ this.ucBtnPrintOne1.Size = new System.Drawing.Size(330, 52);
+ this.ucBtnPrintOne1.TabIndex = 485;
+ //
// layoutControl2
//
this.layoutControl2.Controls.Add(this.txt_iCount_2);
@@ -2390,6 +2404,16 @@
this.layoutControlItem40.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem40.TextVisible = false;
//
+ // layoutControlItem41
+ //
+ this.layoutControlItem41.Control = this.ucBtnPrintOne1;
+ this.layoutControlItem41.Location = new System.Drawing.Point(999, 0);
+ this.layoutControlItem41.Name = "layoutControlItem41";
+ this.layoutControlItem41.OptionsTableLayoutItem.ColumnIndex = 3;
+ this.layoutControlItem41.Size = new System.Drawing.Size(334, 56);
+ this.layoutControlItem41.TextSize = new System.Drawing.Size(0, 0);
+ this.layoutControlItem41.TextVisible = false;
+ //
// gcMx3
//
this.gcMx3.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -2428,7 +2452,8 @@
this.gridColumn50,
this.gridColumn52,
this.gridColumn53,
- this.gridColumn54});
+ this.gridColumn54,
+ this.gridColumn109});
this.gvMx3.DetailHeight = 272;
this.gvMx3.GridControl = this.gcMx3;
this.gvMx3.Name = "gvMx3";
@@ -2567,7 +2592,7 @@
this.gridColumn47.MinWidth = 44;
this.gridColumn47.Name = "gridColumn47";
this.gridColumn47.Visible = true;
- this.gridColumn47.VisibleIndex = 8;
+ this.gridColumn47.VisibleIndex = 9;
this.gridColumn47.Width = 73;
//
// gridColumn48
@@ -2577,7 +2602,7 @@
this.gridColumn48.MinWidth = 44;
this.gridColumn48.Name = "gridColumn48";
this.gridColumn48.Visible = true;
- this.gridColumn48.VisibleIndex = 9;
+ this.gridColumn48.VisibleIndex = 10;
this.gridColumn48.Width = 80;
//
// gridColumn49
@@ -2587,7 +2612,7 @@
this.gridColumn49.MinWidth = 22;
this.gridColumn49.Name = "gridColumn49";
this.gridColumn49.Visible = true;
- this.gridColumn49.VisibleIndex = 10;
+ this.gridColumn49.VisibleIndex = 11;
this.gridColumn49.Width = 82;
//
// gridColumn50
@@ -2604,7 +2629,7 @@
this.gridColumn52.FieldName = "depotCode";
this.gridColumn52.Name = "gridColumn52";
this.gridColumn52.Visible = true;
- this.gridColumn52.VisibleIndex = 11;
+ this.gridColumn52.VisibleIndex = 12;
//
// gridColumn53
//
@@ -2612,7 +2637,7 @@
this.gridColumn53.FieldName = "depotName";
this.gridColumn53.Name = "gridColumn53";
this.gridColumn53.Visible = true;
- this.gridColumn53.VisibleIndex = 12;
+ this.gridColumn53.VisibleIndex = 13;
//
// gridColumn54
//
@@ -2620,7 +2645,7 @@
this.gridColumn54.FieldName = "staffName";
this.gridColumn54.Name = "gridColumn54";
this.gridColumn54.Visible = true;
- this.gridColumn54.VisibleIndex = 13;
+ this.gridColumn54.VisibleIndex = 14;
//
// repositoryItemButtonEdit3
//
@@ -3285,7 +3310,7 @@
this.gridColumn15.MinWidth = 44;
this.gridColumn15.Name = "gridColumn15";
this.gridColumn15.Visible = true;
- this.gridColumn15.VisibleIndex = 10;
+ this.gridColumn15.VisibleIndex = 11;
this.gridColumn15.Width = 60;
//
// gridColumn19
@@ -3295,7 +3320,7 @@
this.gridColumn19.MinWidth = 44;
this.gridColumn19.Name = "gridColumn19";
this.gridColumn19.Visible = true;
- this.gridColumn19.VisibleIndex = 11;
+ this.gridColumn19.VisibleIndex = 12;
this.gridColumn19.Width = 66;
//
// gridColumn12
@@ -3305,7 +3330,7 @@
this.gridColumn12.MinWidth = 22;
this.gridColumn12.Name = "gridColumn12";
this.gridColumn12.Visible = true;
- this.gridColumn12.VisibleIndex = 12;
+ this.gridColumn12.VisibleIndex = 13;
this.gridColumn12.Width = 68;
//
// gridColumn27
@@ -3341,7 +3366,7 @@
this.gridColumn29.FieldName = "depotCode";
this.gridColumn29.Name = "gridColumn29";
this.gridColumn29.Visible = true;
- this.gridColumn29.VisibleIndex = 13;
+ this.gridColumn29.VisibleIndex = 14;
this.gridColumn29.Width = 62;
//
// gridColumn30
@@ -3350,7 +3375,7 @@
this.gridColumn30.FieldName = "depotName";
this.gridColumn30.Name = "gridColumn30";
this.gridColumn30.Visible = true;
- this.gridColumn30.VisibleIndex = 14;
+ this.gridColumn30.VisibleIndex = 15;
this.gridColumn30.Width = 62;
//
// gridColumn31
@@ -3359,7 +3384,7 @@
this.gridColumn31.FieldName = "staffName";
this.gridColumn31.Name = "gridColumn31";
this.gridColumn31.Visible = true;
- this.gridColumn31.VisibleIndex = 15;
+ this.gridColumn31.VisibleIndex = 16;
this.gridColumn31.Width = 82;
//
// gridColumn107
@@ -3369,7 +3394,7 @@
this.gridColumn107.MinWidth = 21;
this.gridColumn107.Name = "gridColumn107";
this.gridColumn107.Visible = true;
- this.gridColumn107.VisibleIndex = 16;
+ this.gridColumn107.VisibleIndex = 10;
this.gridColumn107.Width = 78;
//
// repositoryItemButtonEdit1
@@ -3589,26 +3614,21 @@
this.gv_hbdy.Visible = true;
this.gv_hbdy.VisibleIndex = 13;
//
- // ucBtnPrintOne1
+ // gridColumn109
//
- this.ucBtnPrintOne1.allClickKey = null;
- this.ucBtnPrintOne1.guidKey = null;
- this.ucBtnPrintOne1.Location = new System.Drawing.Point(1011, 12);
- this.ucBtnPrintOne1.Margin = new System.Windows.Forms.Padding(0);
- this.ucBtnPrintOne1.Name = "ucBtnPrintOne1";
- this.ucBtnPrintOne1.rptParameter = null;
- this.ucBtnPrintOne1.Size = new System.Drawing.Size(330, 52);
- this.ucBtnPrintOne1.TabIndex = 485;
+ this.gridColumn109.Caption = "闇�姹傝窡韪彿";
+ this.gridColumn109.FieldName = "xqgz";
+ this.gridColumn109.Name = "gridColumn109";
+ this.gridColumn109.Visible = true;
+ this.gridColumn109.VisibleIndex = 8;
//
- // layoutControlItem41
+ // gridColumn110
//
- this.layoutControlItem41.Control = this.ucBtnPrintOne1;
- this.layoutControlItem41.Location = new System.Drawing.Point(999, 0);
- this.layoutControlItem41.Name = "layoutControlItem41";
- this.layoutControlItem41.OptionsTableLayoutItem.ColumnIndex = 3;
- this.layoutControlItem41.Size = new System.Drawing.Size(334, 56);
- this.layoutControlItem41.TextSize = new System.Drawing.Size(0, 0);
- this.layoutControlItem41.TextVisible = false;
+ this.gridColumn110.Caption = "闇�姹傝窡韪彿";
+ this.gridColumn110.FieldName = "xqgz";
+ this.gridColumn110.Name = "gridColumn110";
+ this.gridColumn110.Visible = true;
+ this.gridColumn110.VisibleIndex = 14;
//
// Frm_ArrivalBarcode
//
@@ -3723,6 +3743,7 @@
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem39)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem35)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem40)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem41)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gcMx3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit3)).EndInit();
@@ -3773,7 +3794,6 @@
((System.ComponentModel.ISupportInitialize)(this.gcMx2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.behaviorManager1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem41)).EndInit();
this.ResumeLayout(false);
}
@@ -4042,5 +4062,7 @@
private DevExpress.XtraGrid.Columns.GridColumn gridColumn108;
private UserControl.UcBtnPrintOne ucBtnPrintOne1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem41;
+ private DevExpress.XtraGrid.Columns.GridColumn gridColumn110;
+ private DevExpress.XtraGrid.Columns.GridColumn gridColumn109;
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
index ff01d88..181488c 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
@@ -163,135 +163,25 @@
};
// --------------------gvMx3 ucBtnPrintOne1 鎵归噺鎵撳嵃浜嬩欢锛堜紭鍖栫増锛�--------------------
+
+ //涓�閿墦鍗颁簨浠�
this.ucBtnPrintOne1.btnPrintClick += (s, e) =>
{
- // 1. 鍩虹楠岃瘉锛氫富琛ㄨ閫夋嫨
string mainGuid = lbGuid.Text.Trim();
- if (string.IsNullOrEmpty(mainGuid) || mainGuid.Length < 10)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛鍦ㄤ富琛ㄤ腑閫夋嫨鏁版嵁琛岋紒");
- this.ucBtnPrintOne1.rptParameter = "return false";
- return;
- }
-
- // 2. 鑾峰彇鏄庣粏鏁版嵁婧�
- DataTable dtDetails = gcMx3.DataSource as DataTable;
- if (dtDetails == null || dtDetails.Rows.Count == 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("褰撳墠涓昏〃鏃犲叧鑱旂殑鏄庣粏鏁版嵁锛岃鍏堝姞杞芥槑缁嗭紒");
- this.ucBtnPrintOne1.rptParameter = "return false";
- return;
- }
-
- // 3. 绛涢�夊彲鎵撳嵃鏄庣粏锛堥�昏緫涓嶅彉锛�
- List<string> validReleaseNos = new List<string>();
- List<string> validPrintQtys = new List<string>();
- string releaseNoField = "releaseNo";
-
- if (!dtDetails.Columns.Contains(releaseNoField))
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError($"鏄庣粏鏁版嵁婧愮己灏戝繀瑕佸瓧娈碉細{releaseNoField}");
- this.ucBtnPrintOne1.rptParameter = "return false";
- return;
- }
-
- foreach (DataRow row in dtDetails.Rows)
- {
- string rowReleaseNo = row[releaseNoField]?.ToString()?.Trim() ?? "";
- if (string.IsNullOrEmpty(rowReleaseNo) || rowReleaseNo.Length < 5)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError($"璺宠繃鏃犳晥鏄庣粏琛岋細缂哄皯鎴栨棤鏁堢殑releaseNo");
- continue;
- }
-
- string kQtyStr = row["kQty"]?.ToString()?.Trim() ?? "0";
- if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(kQtyStr)
- || !decimal.TryParse(kQtyStr, out decimal kQty)
- || kQty <= 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError($"璺宠繃鏄庣粏琛岋紙releaseNo锛歿rowReleaseNo}锛夛細鍙墦鍗版暟閲忔棤鏁堟垨<=0");
- continue;
- }
-
- if (!validReleaseNos.Contains(rowReleaseNo))
- {
- validReleaseNos.Add(rowReleaseNo);
- validPrintQtys.Add(kQty.ToString("F2"));
- }
- else
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError($"璺宠繃閲嶅鏄庣粏琛岋紙releaseNo锛歿rowReleaseNo}锛夛細宸插寘鍚releaseNo");
- }
- }
-
- if (validReleaseNos.Count == 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("娌℃湁鍙壒閲忔墦鍗扮殑鏄庣粏琛岋紙鎵�鏈夎鍧囦负鏃犳晥鏁版嵁鎴栧彲鎵撳嵃鏁伴噺<=0锛�");
- this.ucBtnPrintOne1.rptParameter = "return false";
- return;
- }
-
- // 4. 缁勮鍙傛暟锛堥�傞厤_rptGetParameterP瑙f瀽閫昏緫锛�
- string releaseNosStr = string.Join("|", validReleaseNos);
- string printQtysStr = string.Join("|", validPrintQtys);
-
- // 浠呬紶6涓叧閿弬鏁帮紝瀵瑰簲瑙f瀽鏂规硶鐨剆0-s5
- string[] reportParams = new string[]
- {
- "batch", // s0 鈫� @in1锛氭壒閲忔爣璇�
- "0", // s1 鈫� @in2锛氬崰浣�
- "0", // s2 鈫� @in3锛氫綑閲�
- "1", // s3 鈫� @in4锛氬紶鏁�
- printQtysStr, // s4 鈫� @in5锛氭暟閲忓垪琛�
- releaseNosStr // s5 鈫� @in6锛歳eleaseNo鍒楄〃
- };
-
- /*string paramContent = string.Join(",", reportParams);
- string rptParam = $"rpt_Arrival_One{{{paramContent}}}";
-
- this.ucBtnPrintOne1.guidKey = mainGuid;
- this.ucBtnPrintOne1.rptParameter = rptParam;
-
- // 5. 璋冪敤棰勮锛堥�昏緫涓嶅彉锛�
- try
- {
- using (Form rptPreviewForm = new RptPreview(mainGuid, rptParam))
- {
- DialogResult previewResult = rptPreviewForm.ShowDialog();
- if (previewResult == DialogResult.OK)
- {
- getModel(mainGuid);
- Gs.DevApp.ToolBox.MsgHelper.ShowError($"鎵归噺鎵撳嵃瀹屾垚锛佸叡鎵撳嵃 {validReleaseNos.Count} 鏉℃湁鏁堟槑缁�");
- }
- else if (previewResult == DialogResult.Cancel)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("鐢ㄦ埛鍙栨秷鎵归噺鎵撳嵃鎿嶄綔");
- }
- }
- }
- catch (Exception ex)
- {
- string errorMsg = $"鎵归噺鎵撳嵃寮傚父锛歿ex.Message}";
- if (ex.InnerException != null)
- {
- errorMsg += $"\n鍐呴儴閿欒锛歿ex.InnerException.Message}";
- }
- Gs.DevApp.ToolBox.MsgHelper.ShowError(errorMsg);
- this.ucBtnPrintOne1.rptParameter = "return false";
- }
-*/
-
- this.ucBtnPrintOne1.guidKey = mainGuid;
+ ucBtnPrintOne1.guidKey = mainGuid;
this.ucBtnPrintOne1.rptParameter = "rpt_Arrival{"
- + string.Join(",", reportParams) // 鎷兼帴reportParams鏁扮粍鍏冪礌
- + "}";
- // 6. 娓呯┖鎺т欢
- txt_iCount_2.Text = "";
- txt_psnQty_2.Text = "";
- txt_releaseNo.Text = "";
+ + "101"//涓�閿墦鍗�101
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "}";
+
+ txt_iCount_1.Text = "";
+ txt_psnQty_1.Text = "";
};
-
+
this.ucBtnPrintOne1.btnAllClick += (s, e) =>
{
string mainGuid = lbGuid.Text.Trim();
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.resx b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.resx
index a989fe1..0eb38cd 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.resx
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.resx
@@ -123,4 +123,7 @@
<metadata name="behaviorManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>93, 17</value>
</metadata>
+ <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>25</value>
+ </metadata>
</root>
\ No newline at end of file
--
Gitblit v1.9.3