From cb9a9c1d0ea86d2f86bdf1c395f430d70b7274e1 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期五, 12 十二月 2025 13:13:46 +0800
Subject: [PATCH] 其它出库单据类型和出库类型动态维护
---
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 72 ++++++++++++++++++++++++++++++++++--
1 files changed, 68 insertions(+), 4 deletions(-)
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 1c5b347..77340fe 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -267,6 +267,12 @@
{
gv.ClearSorting();
gv.OptionsCustomization.AllowSort = isEdt;
+
+ gv.OptionsFilter.AllowFilterEditor = isEdt;
+ gv.OptionsCustomization.AllowFilter = isEdt;
+ gv.OptionsView.ShowAutoFilterRow = isEdt;
+
+
foreach (GridColumn colmn in gv.Columns)
{
colmn.OptionsColumn.AllowEdit = true;
@@ -276,7 +282,8 @@
colmn.OptionsColumn.ReadOnly = false;
}
;
- if (colmn.Name.ToString().Contains("gvMxDel") || colmn.Name.ToString().Contains("gvMxTui"))
+ if (colmn.Name.ToString().Contains("gvMxDel")
+ || colmn.Name.ToString().Contains("gvMxTui"))
{
colmn.Visible = !isEdt;
if (colmn.Visible == true)
@@ -577,6 +584,14 @@
txt.IsReadly = isEdt;
continue;
}
+ //鑷畾缁勭粐all
+ if (colType is UcLookOrgAll)
+ {
+ var txt = colType as UcLookOrgAll;
+ txt.SetIdOrCode(strVal);
+ txt.IsReadly = isEdt;
+ continue;
+ }
//鑷畾鐢ㄦ埛
if (colType is UcLookUser)
{
@@ -695,6 +710,9 @@
{
gv.ClearSorting();
gv.OptionsCustomization.AllowSort = isEdt;
+ gv.OptionsFilter.AllowFilterEditor = isEdt;
+ gv.OptionsCustomization.AllowFilter = isEdt;
+ gv.OptionsView.ShowAutoFilterRow = isEdt;
foreach (GridColumn colmn in gv.Columns)
{
colmn.OptionsColumn.AllowEdit = true;
@@ -882,6 +900,14 @@
txt.IsReadly = isEdt;
continue;
}
+ //鑷畾缁勭粐All
+ if (ctrl is UcLookOrgAll)
+ {
+ var txt = ctrl as UcLookOrgAll;
+ txt.SetIdOrCode("-1");
+ txt.IsReadly = isEdt;
+ continue;
+ }
//鑷畾鐢ㄦ埛
if (ctrl is UcLookUser)
{
@@ -983,6 +1009,12 @@
{
gv.ClearSorting();
gv.OptionsCustomization.AllowSort = isEdt;
+
+ gv.OptionsFilter.AllowFilterEditor = isEdt;
+ gv.OptionsCustomization.AllowFilter = isEdt;
+ gv.OptionsView.ShowAutoFilterRow = isEdt;
+
+
foreach (GridColumn colmn in gv.Columns)
{
colmn.OptionsColumn.AllowEdit = true;
@@ -1130,6 +1162,13 @@
if (ctrl is UcLookOrg)
{
var txt = ctrl as UcLookOrg;
+ txt.IsReadly = isEdt;
+ continue;
+ }
+ //鑷畾缁勭粐
+ if (ctrl is UcLookOrgAll)
+ {
+ var txt = ctrl as UcLookOrgAll;
txt.IsReadly = isEdt;
continue;
}
@@ -2079,11 +2118,11 @@
column.MaxWidth = 0;
}
gridView1.OptionsView.ColumnAutoWidth = false;//鑷姩璋冩暣鍒楀
- gridView1.OptionsFilter.AllowFilterEditor = false;
+ gridView1.OptionsFilter.AllowFilterEditor = true;
gridView1.OptionsFilter.ShowCustomFunctions = DevExpress.Utils.DefaultBoolean.False;
- gridView1.OptionsCustomization.AllowFilter = false;
+ gridView1.OptionsCustomization.AllowFilter = true;
gridView1.OptionsFind.ShowSearchNavButtons = false;
- gridView1.OptionsView.ShowAutoFilterRow = false;
+ gridView1.OptionsView.ShowAutoFilterRow = true;
gridView1.OptionsView.ShowGroupPanel = false;
gridView1.IndicatorWidth = 60;
gridView1.CustomDrawRowIndicator += (s, e) =>
@@ -2240,6 +2279,8 @@
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
+
+
#endregion
@@ -2544,6 +2585,29 @@
return "";
}
}
+ public static string GetFirstOrg(UserControl.UcLookOrgAll txt_erpSczz)
+ {
+ string userGuid = LoginInfoModel.CurrentUser.LoginUserGuid;
+ var pgq = new PageQueryModel(1, 999999, "FID", "asc", userGuid, " and IS_STATUS=1");
+ var json = JsonConvert.SerializeObject(pgq);
+ try
+ {
+ var strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json);
+ var _obj = UtilityHelper.ReturnToDynamic(strReturn);
+ string _extendText = _obj.rtnData.extendText;
+ string[] _dftOrg = _extendText.Split(',');
+ if (_dftOrg.Length > 0)
+ {
+ txt_erpSczz.SetIdOrCode(_dftOrg[0].Trim());
+ return _dftOrg[0].Trim();
+ }
+ return "";
+ }
+ catch (Exception ex)
+ {
+ return "";
+ }
+ }
}
/// <summary>
--
Gitblit v1.9.3