From b57d48cd0414de1e58c1049782f7fccc0089f86d Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期三, 19 二月 2025 10:27:07 +0800
Subject: [PATCH] 布局
---
DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs | 91 +++++++++++++++++++++++++++++++++++----------
1 files changed, 71 insertions(+), 20 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
index a6eecf3..aba77c5 100644
--- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
@@ -28,12 +28,15 @@
this.toolBarMenu1.btnKgClick += ToolBarMenu1_btnKgClick;
this.toolBarMenu1.btnWgClick += ToolBarMenu1_btnWgClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+ List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gridView1);
+ Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) =>
- {
- Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- });
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+ });
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
@@ -55,7 +58,7 @@
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
- _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
+ Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
Task.Delay(100);
getPageList(1);
}
@@ -157,14 +160,15 @@
getModel(lbGuid.Text.Trim());
else
{
- _filterList.Clear();
- if (gridView1.ActiveFilter.Count > 0)
- {
- gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
- gridView1.ActiveFilter.Clear();
- gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- }
- getPageList(1);
+ //_filterList.Clear();
+ //if (gridView1.ActiveFilter.Count > 0)
+ //{
+ // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+ // gridView1.ActiveFilter.Clear();
+ // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+ //}
+ //getPageList(1);
+ getPageList(this.pageBar1.CurrentPage);
}
}
/// <summary>
@@ -174,6 +178,7 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
{
+ toolBarMenu1.currentAction = "edit";
string rowGuid = "", rowName = "";
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_daa001, gridView1);
if (string.IsNullOrEmpty(rowGuid))
@@ -182,9 +187,17 @@
return;
}
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
- List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
- gvList.Add(gvMx1);
- UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
+ if (xtraTabControl1.SelectedTabPageIndex == 1)
+ {
+ getModel(rowGuid);
+ }
+ else
+ {
+ List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gvMx1);
+ gvList.Add(gvMx2);
+ UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList);
+ }
}
/// <summary>
@@ -198,7 +211,7 @@
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
- sjxt = txt_sjXt.GetCode(), //瀹為檯绾夸綋
+ sjxt = txt_sjXt.GetId(), //瀹為檯绾夸綋
bz = txt_daa009.Text.Trim()//澶囨敞
};
try
@@ -227,7 +240,7 @@
private void getPageList(int curPage)
{
var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
- PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
+ PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "desc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
{
@@ -264,11 +277,13 @@
private void getModel(string strGuid)
{
bool isEdit = false;
- if (toolBarMenu1.currentAction == "add")
+ if (toolBarMenu1.currentAction == "add") return;
+ if (toolBarMenu1.currentAction == "edit") isEdit = true;
+ if (string.IsNullOrEmpty(strGuid))
{
- Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
- };
+ }
if (string.IsNullOrEmpty(strGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -290,6 +305,7 @@
gvList.Add(gvMx1);
gvList.Add(gvMx2);
UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList);
+ // txt_sjXt.getSuppler(txt_daa013.Text);
JObject _job = JObject.Parse(strJson);
JArray array = new JArray();
foreach (var a in _job["rtnData"]["list"])
@@ -441,5 +457,40 @@
+ "," + txt_psnQty_1.Text.Trim()
+ "}";
}
+
+ private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
+ {
+ var rowhandle = gvMx2.FocusedRowHandle;
+ if (rowhandle < 0)
+ return;
+ if (e.Button.Index == 0)
+ {
+ var dr = gvMx2.GetDataRow(rowhandle);
+ var mxGuid = dr["guid"].ToString();
+ if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
+ return;
+ var _obj = new
+ {
+ mxGuid = mxGuid,
+ inType = "dhtm"
+ };
+ try
+ {
+ var strJson = UtilityHelper.HttpPost("",
+ _webServiceName + "DeleteBarcode",
+ JsonConvert.SerializeObject(_obj));
+ var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
+ }
+ MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+ }
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.3