From 90cb645e2cc2a0befcb50fff0477b07a76b49e83 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 01 七月 2025 10:46:42 +0800
Subject: [PATCH] 培讯
---
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs | 71 +++++++++++++++++++++++------------
1 files changed, 47 insertions(+), 24 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs
index 5ea585e..ae48c2b 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs
@@ -35,14 +35,14 @@
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isCheck", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- });
+ }, tips);
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
}, (value) =>
{
getPageList(this.pageBar1.CurrentPage);
- });
+ }, lbGuid);
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
//閫夋嫨搴撳瓨缁勭粐锛堜粨搴撳拰渚涘簲鍟嗭級
@@ -69,29 +69,40 @@
this.txt_fCustId.Focus();
return;
}
- var frm = new SelectShuoTuiSq(this.txt_fCustId.GetId(), txt_fStockOrgId.GetId(), txt_fIsLink.SelectedIndex.ToString());
+ if (string.IsNullOrEmpty(this.txt_fStockId.GetId()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浠撳簱锛�");
+ this.txt_fStockId.Focus();
+ return;
+ }
+ var frm = new SelectShuoTuiSq(this.txt_fCustId.GetId(), txt_fStockOrgId.GetId(), txt_fStockId.GetId(), txt_fIsLink.SelectedIndex.ToString());
//璧嬪�肩粰鏄庣粏琛�
frm.UpdateParent += (ss, ee) =>
{
try
{
- var lst = new List<string>();
- lst = ee.StringList;
- var _obj = lst;
- var strReturn = UtilityHelper.HttpPost("",
- _webServiceName + "SelectFormTo",
- JsonConvert.SerializeObject(_obj));
- var dt = UtilityHelper.ReturnToList(strReturn);
- DataTable _newTable = dt.rtnData;
- DataTable _oldTable = (DataTable)gcMx1.DataSource;
- DataRow[] sourceRows = _newTable.Select();
- for (int i = 0; i < sourceRows.Length; i++)
+ var lst = ee.DynamicList;
+ DataTable _Table = (DataTable)gcMx1.DataSource;
+ foreach (dynamic dym in lst)
{
- _oldTable.ImportRow(sourceRows[i]);
+ DataRow _row = _Table.NewRow();
+ _row["aboutGuid"] = dym.rkmxGuid;
+ _row["rkNo"] = dym.invBillNo;
+ _row["wlbm"] = dym.itemNo;
+ _row["wlmc"] = dym.itemName;
+ _row["wlgg"] = dym.itemModel;
+ _row["dwName"] = dym.dwName;
+ _row["fQty"] = dym.kt;
+ _row["sQty"] = 0;
+ _row["itemId"] = dym.itemId;
+ _Table.Rows.Add(_row);
}
gcMx1.BindingContext = new BindingContext();
- gcMx1.DataSource = _oldTable;
+ gcMx1.DataSource = _Table;
gcMx1.ForceInitialize();
+ gvMx1.CloseEditor();
+ gvMx1.PostEditor();
+ gvMx1.UpdateCurrentRow();
}
catch (Exception ex)
{
@@ -139,7 +150,7 @@
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
gridView1.ActiveFilter.Clear();
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- var frm = new ShowFilter(gridView1.Columns, _filterList);
+ var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
frm.UpdateParent += Frm_UpdateParent;
frm.ShowDialog();
}
@@ -292,6 +303,9 @@
gridViews.Add(gvMx1);
UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+ //澧炲姞鏃讹紝榛樿缁勭粐
+ string deftOrg = UtilityHelper.GetFirstOrg(txt_fStockOrgId);
+
}
/// <summary>
/// 淇濆瓨浜嬩欢
@@ -304,7 +318,7 @@
var _ckId = txt_fStockId.GetId();
var _khId = txt_fCustId.GetId();
string _orgId = txt_fStockOrgId.GetId();
-
+ int _fIsLink = txt_fIsLink.SelectedIndex == 0 ? 1 : 0;
if (string.IsNullOrEmpty(_orgId))
{
MsgHelper.Warning("璇烽�夋嫨缁勭粐锛�");
@@ -317,7 +331,7 @@
txt_fStockId.Focus();
return;
}
- if (string.IsNullOrEmpty(_ckId))
+ if (string.IsNullOrEmpty(_khId))
{
MsgHelper.Warning("璇烽�夋嫨瀹㈡埛锛�");
txt_fCustId.Focus();
@@ -336,12 +350,14 @@
Remark = txt_remark.Text.Trim(), //澶囨敞
CusId = int.Parse(_khId),
DepotId = int.Parse(_ckId),
- FIsLink = txt_fIsLink.SelectedIndex == 0 ? "Y" : "N",
+ FIsLink = _fIsLink,//鏈夋棤婧愬崟
FReturnStyle = txt_fReturnStyle.Text,//閫�鏂欐柟寮�
list = new List<dynamic>(),
- };
+ }; gvMx1.PostEditor();
gvMx1.CloseEditor();
gvMx1.UpdateCurrentRow();
+
+
if (gvMx1.DataRowCount <= 0)
{
MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鏀舵枡鏄庣粏锛�");
@@ -357,6 +373,11 @@
if (string.IsNullOrEmpty(_msl))
{
MsgHelper.ShowError("鐢宠鏁伴噺涓嶈兘涓虹┖锛�");
+ return;
+ }
+ if (string.IsNullOrEmpty(row["fStockStatusId"].ToString()) || row["fStockStatusId"].ToString() == "璇烽�夋嫨")
+ {
+ MsgHelper.ShowError("璇烽�夋嫨搴撳瓨鐘舵�侊紒");
return;
}
_obj.list.Add(new
@@ -386,6 +407,7 @@
gvList.Add(gvMx1);
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
toolBarMenu1.currentAction = "";
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
}
}
catch (Exception ex)
@@ -401,7 +423,7 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "BILL_NO", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -417,7 +439,7 @@
{
gcMain1.DataSource = dt;
gcMain1.ForceInitialize();
- gridView1.BestFitColumns();
+ gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
}
else
UtilityHelper.SetDefaultTable(gcMain1, gridView1);
@@ -549,6 +571,7 @@
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
{
gvMx1.CloseEditor();
+ gvMx1.PostEditor();
gvMx1.UpdateCurrentRow();
var rowhandle = gvMx1.FocusedRowHandle;
if (rowhandle < 0)
@@ -556,7 +579,7 @@
if (e.Button.Index == 0)
{
var dr = gvMx1.GetDataRow(rowhandle);
- var mxGuid = dr["id"].ToString();
+ var mxGuid = dr["guid"].ToString();
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
return;
if (string.IsNullOrEmpty(mxGuid))
--
Gitblit v1.9.3