From d4e0269da1cc87d42918cdda6afaa005b6c47a0e Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期三, 19 十一月 2025 13:40:46 +0800
Subject: [PATCH] 按大类维护
---
DevApp/Gs.DevApp/DevFrm/WOM/Frm_WomFanGong.cs | 118 ++++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 80 insertions(+), 38 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_WomFanGong.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_WomFanGong.cs
index 01ad6ef..0d06b0f 100644
--- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_WomFanGong.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_WomFanGong.cs
@@ -1,6 +1,8 @@
锘縰sing DevExpress.Utils.MVVM.Services;
+using DevExpress.XtraGrid.Views.Base.ViewInfo;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraLayout.Customization;
+using DevExpress.XtraPivotGrid.Data;
using DevExpress.XtraRichEdit.Model;
using Gs.DevApp.DevFrm.Rpt;
using Gs.DevApp.Entity;
@@ -11,6 +13,7 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -26,13 +29,17 @@
InitializeComponent();
toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
+ toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
this.toolBarMenu1.getXmlConfig();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "docStusTxt", "", (value) =>
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fgCheckStatusChk", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- }, tips);
+ }, tips, true, (strGuid) =>
+ {
+
+ });
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
@@ -42,34 +49,6 @@
}, lbGuid);
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
- //纭畾鍙嶅伐
- btnZsm.Click += (s, e) =>
- {
- if (!MsgHelper.AskQuestion("纭畾鐢熸垚鏂扮殑杩芥函鐮佸悧锛�"))
- return;
- var _obj = new
- {
- guid = lbGuid.Text.Trim(),
- };
- try
- {
- var strJson = UtilityHelper.HttpPost("",
- _webServiceName + "CreateTrace",
- JsonConvert.SerializeObject(_obj));
- var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- if (_rtn.rtnCode > 0)
- {
- MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
- getModel(lbGuid.Text.Trim());
- }
- else
- MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
- }
- catch (Exception ex)
- {
- MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
- }
- };
//杩欐槸鎵撳嵃锛岃繖鍜屽叾瀹冮〉闈㈡槸涓嶄竴鏍风殑锛屼笉鑳藉鍒惰繖閲�
this.ucBtnPrint98.SetPrintButton(false);
this.ucBtnPrint98.btnAllClick += (s, e) =>
@@ -115,10 +94,52 @@
MsgHelper.ShowError(ex.Message);
}
}
-
+
};
}
+ private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
+ {
+ string strMsg = "瀹℃牳";
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
+ if (string.IsNullOrEmpty(rowGuid))
+ {
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ return;
+ }
+ if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
+ return;
+ var _obj = new
+ {
+ guid = rowGuid,
+ };
+ try
+ {
+ var strJson = UtilityHelper.HttpPost("",
+ _webServiceName + "CreateTrace",
+ JsonConvert.SerializeObject(_obj));
+ var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ MsgHelper.ShowInformation(_rtn.rtnMsg);
+ if (xtraTabControl1.SelectedTabPageIndex == 1)
+ {
+ getModel(lbGuid.Text.Trim());
+ }
+ int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+ gridView1.FocusedRowHandle = rowHandle;
+ UtilityHelper.SetCheckIco(gridView1, "fgCheckStatusChk", "fgCheckBy", "fgCheckDatet", picCheckBox, this, 1.ToString());
+ }
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+ }
+ }
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
@@ -192,7 +213,11 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null;
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and daa.ERP_SCZZ in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date",
"asc", "", _sbSqlWhere.ToString());
var json = JsonConvert.SerializeObject(pgq);
@@ -226,7 +251,7 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
/// <summary>
@@ -240,7 +265,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -293,18 +318,35 @@
{
UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
}
+
+ JArray array7 = new JArray();
+ foreach (var a in _job["rtnData"]["list3"])
+ {
+ array7.Add(a);
+ }
+ DataTable dt7 = JsonConvert.DeserializeObject<DataTable>(array7.ToString());
+ if (dt7.Rows.Count > 0)
+ {
+ gcMx7.BindingContext = new BindingContext();
+ gcMx7.DataSource = dt7;
+ gcMx7.ForceInitialize();
+ gvMx7.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx7);
+ }
+ else
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx7, gvMx7);
+ }
}
else
{
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
-
-
}
}
\ No newline at end of file
--
Gitblit v1.9.3