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 | 184 +++++++++++++++-------------------------------
1 files changed, 60 insertions(+), 124 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
index 849e58f..181488c 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
@@ -163,133 +163,66 @@
};
// --------------------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;
-// }
+ //涓�閿墦鍗颁簨浠�
+ this.ucBtnPrintOne1.btnPrintClick += (s, e) =>
+ {
+ string mainGuid = lbGuid.Text.Trim();
+ ucBtnPrintOne1.guidKey = mainGuid;
+ this.ucBtnPrintOne1.rptParameter = "rpt_Arrival{"
+ + "101"//涓�閿墦鍗�101
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "}";
-// // 3. 绛涢�夊彲鎵撳嵃鏄庣粏锛堥�昏緫涓嶅彉锛�
-// List<string> validReleaseNos = new List<string>();
-// List<string> validPrintQtys = new List<string>();
-// string releaseNoField = "releaseNo";
+ txt_iCount_1.Text = "";
+ txt_psnQty_1.Text = "";
+ };
-// if (!dtDetails.Columns.Contains(releaseNoField))
-// {
-// Gs.DevApp.ToolBox.MsgHelper.ShowError($"鏄庣粏鏁版嵁婧愮己灏戝繀瑕佸瓧娈碉細{releaseNoField}");
-// this.ucBtnPrintOne1.rptParameter = "return false";
-// return;
-// }
+
+ this.ucBtnPrintOne1.btnAllClick += (s, e) =>
+ {
+ string mainGuid = lbGuid.Text.Trim();
+ SelectDeleteBar frm = new SelectDeleteBar(mainGuid, "鎵归噺鏉$爜"); // 鏍囬鍖哄垎鏉ユ簮
+ string strCodeList = "";
+ string strAction = "";
+ frm.UpdateParent += (ss, ee) =>
+ {
+ strCodeList = ee.StringSingle;
+ strAction = ee.Data;
+ };
+ frm.ShowDialog();
+ if (string.IsNullOrEmpty(strCodeList))
+ return;
+ if (strAction == "print")
+ {
+ try
+ {
+ string rptParameter = "rpt_Arrival{"
+ + "100"//閲嶆墦閮芥槸浼�100锛�
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + strCodeList
+ + "}";
+ using (Form rpt = new RptPreview(mainGuid, rptParameter))
+ {
+ rpt.ShowDialog();
+ }
+ frm.Close();
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError(ex.Message);
+ }
+ }
+ };
-// 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;
-// this.ucBtnPrintOne1.rptParameter = "rpt_Arrival_One{"
-// + string.Join(",", reportParams) // 鎷兼帴reportParams鏁扮粍鍏冪礌
-// + "}";
-// // 6. 娓呯┖鎺т欢
-// txt_iCount_2.Text = "";
-// txt_psnQty_2.Text = "";
-// txt_releaseNo.Text = "";
-// };
//鏄庣粏琛屽垏鎹簨浠�
// 鍏抽敭锛氱粦瀹歡vMx1鍜実vMx3鐨勭劍鐐硅鍙樺寲浜嬩欢
@@ -322,9 +255,12 @@
//gvMx1.Columns["quantity"].SummaryItem.DisplayFormat = "鍚堣: {0}";
// 涓轰簡鏂逛究浣跨敤鏁村悎鍒� UtilityHelper 绫讳腑鐨� SetupGridSummary 鏂规硶
- // UtilityHelper.SetupGridSummary(gvMx1, "quantity", "okRkqty");
- // UtilityHelper.SetupGridSummary(gvMxL1, "quantity", "okRkqty");
-
+ UtilityHelper.SetupGridSummary(gvMx1, "quantity", "okRkqty");
+ UtilityHelper.SetupGridSummary(gvMxL1, "quantity", "okRkqty");
+ UtilityHelper.SetupGridSummary(gvMx2, "quantity", "okRkqty");
+ UtilityHelper.SetupGridSummary(gvMxL2, "quantity", "okRkqty");
+ UtilityHelper.SetupGridSummary(gvMx3, "quantity", "okRkqty");
+ UtilityHelper.SetupGridSummary(gvMxL3, "quantity", "okRkqty");
// 妫�鏌ユ暟鎹姞杞藉悗鍐嶈缃鑹�
this.Load += (s, e) =>
{
--
Gitblit v1.9.3