From f2a352ef00e1b5d3c0723eb8b9aada1bea1b2713 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期三, 26 十一月 2025 15:59:45 +0800
Subject: [PATCH] 退补料打印
---
DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs | 68 ++++++++++++++++++++++++++++-----
1 files changed, 57 insertions(+), 11 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs b/DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs
index 8aacf17..87f9925 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs
@@ -1,4 +1,5 @@
-锘縰sing Gs.DevApp.ToolBox;
+锘縰sing DevExpress.XtraEditors;
+using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -11,25 +12,70 @@
{
private readonly string _webServiceName = "MesItemTblManager/";
private string daaGuid = "";
+ //鍕鹃�夋搴�
+ Dictionary<string, int> ageDict = new Dictionary<string, int>();
+
public SelectItemTbl(string _daaGuid)
{
InitializeComponent();
+ #region 鍕鹃��
+ this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); };
+ this.gridView1.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain, gridView1); };
+ this.colChkInt.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
+ this.colChkInt.OptionsFilter.AllowAutoFilter = false;
+ this.colChkInt.OptionsFilter.AllowFilter = false;
+ this.colChkInt.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False;
+ this.colChkInt.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
+ this.colChkInt.VisibleIndex = 0;
+ #endregion
+
+
+ #region 鍕鹃�夋搴�2025-11-24
+ this.gridView1.CellValueChanged += (s, e) =>
+ {
+ var row = gridView1.GetDataRow(e.RowHandle);
+ var mxGuid = row["guid"].ToString();
+ bool isChecked = (bool)e.Value;
+ int dicCount = ageDict.Count + 1;
+ if (isChecked)
+ {
+ ageDict.Add(mxGuid, dicCount); // 娣诲姞鏂伴敭鍊煎
+ }
+ };
+ #endregion
+
this.daaGuid = _daaGuid;
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false);
getPageList(1);
btnIn.Click += (s, e) =>
{
- var list = new List<string>();
- int[] rows = this.gridView1.GetSelectedRows();//鍏堣幏鍙栭�夋嫨琛岀殑琛屽彿
- DataTable dt = this.gcMain.DataSource as DataTable;//寰楀埌GridControl鐨勬暟鎹簮
- foreach (int idx in rows)
+ gridView1.PostEditor();
+ gridView1.UpdateCurrentRow();
+ var list = new List<dynamic>();
+ DataTable dt = this.gcMain.DataSource as DataTable;
{
- string _guid = dt.Rows[idx]["dabGuid"].ToString();
- list.Add(_guid);
+ foreach (DataRow dr in dt.Rows)
+ {
+ string checkBox = dr["chkInt"].ToString();
+ string _guid = dr["guid"].ToString();
+ int _idx = 0;
+ // 瀹夊叏鑾峰彇锛堟帹鑽愶級
+ if (ageDict.TryGetValue(_guid, out _idx))
+ {
+ }
+ else
+ _idx = 0;
+ if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox))
+ {
+ list.Add(new
+ {
+ guid = _guid,
+ index = _idx
+ });
+ }
+ }
}
- UpdateParent?.Invoke(this,
- new UpdateParentEventArgs { StringList = list });
- Close();
+ UpdateParent?.Invoke(this, new UpdateParentEventArgs { DynamicList = list }); Close();
};
}
@@ -38,7 +84,7 @@
/// </summary>
public event EventHandler<UpdateParentEventArgs> UpdateParent;
-
+
/// <summary>
/// </summary>
--
Gitblit v1.9.3