From 0dcc33644c822962063832bfc5cd4d28118de781 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 26 六月 2025 17:01:56 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs | 122 ++++++++++++++++++++++------------------
1 files changed, 67 insertions(+), 55 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs b/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs
index e27e65b..b916b6e 100644
--- a/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs
@@ -14,7 +14,6 @@
{
public partial class UcBlcl : DevExpress.XtraEditors.XtraUserControl
{
- string _ucCk = "";//浠撳簱
string _ucGd = "";//宸ュ崟
string _webServiceName = "MesItemBlManager/";
List<FilterEntity> _filterList = new List<FilterEntity>();
@@ -61,13 +60,7 @@
{
string orgdId = txt_orgId.GetId();
if (string.IsNullOrEmpty(orgdId)) return;
- txt_bl010.getSuppler(orgdId, _ucCk);
- txt_aboutGuid.getSuppler(orgdId, _ucGd);
- };
- //璁剧疆浠撳簱閫夋嫨
- this.txt_bl010.EditChanged += (s, e) =>
- {
-
+ txt_aboutGuid.getSuppler(orgdId, _ucGd, "and ( daa018<>'S:鏆傚仠') and ( daa018<>'W:瀹屽伐')");
};
//璁剧疆宸ュ崟
this.txt_aboutGuid.EditChanged += (s, e) =>
@@ -81,28 +74,58 @@
txt_bl012.Text = txt_aboutGuid.GetWorkXb();
txt_bl013.Text = txt_aboutGuid.GetRwd();
txt_tldh.Text = txt_aboutGuid.GetTldh();
- var _obj = new
+ };
+
+ //閫夋嫨闇�瑕佸叆搴撶殑鏄庣粏
+ btnSelect.Click += (s, e) =>
+ {
+ if (string.IsNullOrEmpty(this.txt_orgId.GetId()))
{
- currentPage = 1,
- everyPageSize = 999999,
- sortName = "",
- keyWhere = "",
- daaGuid = strGdId
+ MsgHelper.Warning("璇烽�夋嫨鐢熶骇缁勭粐锛�");
+ txt_orgId.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(this.txt_aboutGuid.GetId()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨鐢熶骇宸ュ崟锛�");
+ return;
+ }
+ var frm = new UcBlclSelect(txt_aboutGuid.GetId(), this.txt_orgId.GetId());
+ //璧嬪�肩粰鏄庣粏琛�
+ frm.UpdateParent += (ss, ee) =>
+ {
+ try
+ {
+ var lst = ee.DynamicList;
+ DataTable _Table = (DataTable)gcMx1.DataSource;
+ int idx = 1;
+ foreach (dynamic dym in lst)
+ {
+ DataRow _row = _Table.NewRow();
+ _row["bld001"] = dym.gdh;//宸ュ崟鍙�
+ _row["bld002"] = dym.itemNo;//鐗╂枡缂栧彿
+ _row["bld003"] = dym.itemName;//鐗╂枡鍚嶇О
+ _row["bld004"] = dym.itemModel;//瑙勬牸鍨嬪彿
+ _row["dwName"] = dym.dwName;
+ _row["dabGuid"] = dym.dabGuid;
+ _row["bld013"] = idx.ToString();//椤规
+ _Table.Rows.Add(_row);
+ idx++;
+ }
+ gcMx1.BindingContext = new BindingContext();
+ gcMx1.DataSource = _Table;
+ gcMx1.ForceInitialize();
+ gvMx1.CloseEditor();
+ gvMx1.PostEditor();
+ gvMx1.UpdateCurrentRow();
+ gvMx1.BestFitColumns();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message);
+ }
};
- var json = JsonConvert.SerializeObject(_obj);
- try
- {
- var strReturn = UtilityHelper.HttpPost("",
- "WomdaaManager/GetListSelectDab", json);
- var rtn = UtilityHelper.ReturnToTablePage(strReturn);
- var dt = rtn.rtnData.list;
- this.repositoryItemSearchLookUpEdit1.DataSource = dt;
- this.repositoryItemSearchLookUpEdit1.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
- }
- catch (Exception ex)
- {
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- }
+ frm.ShowDialog();
};
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
@@ -286,6 +309,8 @@
gridViews.Add(gvMx1);
UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+ //澧炲姞鏃讹紝榛樿缁勭粐
+ string deftOrg = UtilityHelper.GetFirstOrg(txt_orgId);
}
/// <summary>
@@ -298,28 +323,21 @@
toolBarMenu1.isSetBtn = false;
string inOrgId = txt_orgId.GetId();//宸ュ崟鍙�
string inGdId = txt_aboutGuid.GetId();//宸ュ崟鍙�
- string inCkId = txt_bl010.GetId();//鍙戞枡浠�
if (string.IsNullOrEmpty(inGdId))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨宸ュ崟锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨宸ュ崟锛�");
txt_aboutGuid.Focus();
return;
}
if (string.IsNullOrEmpty(inGdId))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨宸ュ崟锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨宸ュ崟锛�");
txt_aboutGuid.Focus();
- return;
- }
- if (string.IsNullOrEmpty(inCkId))
- {
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�");
- txt_bl010.Focus();
return;
}
if (string.IsNullOrEmpty(txt_bl017.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
txt_bl017.Focus();
return;
}
@@ -328,7 +346,6 @@
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
inOrgId = inOrgId,//宸ュ崟鍙�
inGdId = inGdId,//宸ュ崟鍙�
- inCkId = inCkId,//浠撳簱
inYy = txt_bl007.Text.Trim(),//鍘熷洜
inType = txt_bl017.Text.Trim(),
list = new List<dynamic>(),
@@ -367,9 +384,10 @@
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+
if (_rtn.rtnCode > 0)
{
+ ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
lbGuid.Text = _rtn.rtnData.outGuid;
txt_blNo.Text = _rtn.rtnData.outNo;
toolBarMenu1.isSetBtn = true;
@@ -379,10 +397,12 @@
toolBarMenu1.currentAction = "";
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
}
+ else
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -393,7 +413,7 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
_sbSqlWhere += " and a.bl008='" + strType + "'";
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
@@ -430,6 +450,11 @@
}
}
+
+ /// <summary>
+ /// 璇诲彇瀹炰綋
+ /// </summary>
+ /// <param name="strGuid"></param>
private void getModel(string strGuid)
{
bool isEdit = false;
@@ -451,13 +476,11 @@
if (_rtn.rtnCode > 0)
{
dynamic dy = _rtn.rtnData;
- _ucCk = dy.bl010;
_ucGd = dy.aboutGuid;
lbGuid.Text = strGuid;
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
- _ucCk = "";
_ucGd = "";
JObject _job = JObject.Parse(strJson);
JArray array = new JArray();
@@ -564,17 +587,6 @@
{
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
- }
- private void repositoryItemSearchLookUpEdit1_EditValueChanged(object sender, EventArgs e)
- {
- SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit;
- DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow();
- gvMx1.SetFocusedRowCellValue("bld001", SelectedDataRow["gdh"]);
- gvMx1.SetFocusedRowCellValue("bld002", SelectedDataRow["itemNo"]);
- gvMx1.SetFocusedRowCellValue("bld003", SelectedDataRow["itemName"]);
- gvMx1.SetFocusedRowCellValue("bld004", SelectedDataRow["itemModel"]);
- gvMx1.SetFocusedRowCellValue("dwName", SelectedDataRow["dwName"]);
- gvMx1.SetFocusedRowCellValue("dabGuid", SelectedDataRow["dabGuid"]);
}
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
{
--
Gitblit v1.9.3