From c58f2d6dfc34e40a20ed960b0da61924d680b25f Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 05 十二月 2024 08:10:36 +0800
Subject: [PATCH] 到货单
---
DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesInvItemMoves.cs | 64 +++++++++++++++++++++++++++----
1 files changed, 55 insertions(+), 9 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesInvItemMoves.cs b/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesInvItemMoves.cs
index 62a02cf..4e83ef5 100644
--- a/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesInvItemMoves.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesInvItemMoves.cs
@@ -1,6 +1,4 @@
using DevExpress.XtraEditors;
-using DevExpress.XtraGrid.Views.Grid;
-using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -47,6 +45,12 @@
Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
e.Graphics.DrawString(str, f, Brushes.Gray, r);
};
+
+ gvMx1.ValidatingEditor += (sender, e) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.SetValidatingEditor(sender, e);
+ };
+
var _obj = new
{
currentPage = 1,
@@ -68,6 +72,8 @@
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
+
+
private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
_filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
@@ -225,16 +231,56 @@
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
toolBarMenu1.isSetBtn = false;
- //if (string.IsNullOrEmpty(txt_account.Text.Trim()))
+ string _fromDepotsId = txt_fromDepotsId.GetId();
+ string _invDepotsId = txt_invDepotsId.GetId();
+ if (string.IsNullOrEmpty(_fromDepotsId))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("鐧诲綍璐﹀彿涓嶈兘涓虹┖锛�");
- // txt_account.Focus();
+ Gs.DevApp.ToolBox.MsgHelper.Warning("鍙戞枡浠撲笉鑳戒负绌猴紒");
+ txt_fromDepotsId.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(_invDepotsId))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("鏀舵枡浠撲笉鑳戒负绌猴紒");
+ txt_invDepotsId.Focus();
return;
}
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
+ inFromDepotsId = _fromDepotsId,//鍙戞枡浠�
+ inInvDepotsId = _invDepotsId,//鏀舵枡浠�
+ inBz = txt_remark.Text.Trim(),//澶囨敞
+ list = new List<dynamic>(),
};
+ gvMx1.CloseEditor();
+ gvMx1.UpdateCurrentRow();
+ if (gvMx1.DataRowCount <= 0)
+ {
+ MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鏀舵枡鏄庣粏锛�");
+ return;
+ }
+ for (var i = 0; i < gvMx1.DataRowCount; i++)
+ {
+ var row = gvMx1.GetDataRow(i);
+ if (row != null)
+ {
+ Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString());
+ //string _msl = row["quantity"].ToString();
+ //if (string.IsNullOrEmpty(_msl))
+ //{
+ // MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�");
+ // return;
+ //}
+ _obj.list.Add(new
+ {
+ Guid = _guid,
+ ItemId = (row["itemId"].ToString()),
+ Sqsl = (row["quantity"].ToString()),
+ Bz = (row["remark"].ToString()),
+ });
+ }
+ }
try
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
@@ -349,9 +395,9 @@
{
SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit;
DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow();
- gvMx1.SetFocusedRowCellValue("qd002", SelectedDataRow["itemNo"]);
- gvMx1.SetFocusedRowCellValue("qd003", SelectedDataRow["itemName"]);
- gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]);
+ gvMx1.SetFocusedRowCellValue("itemNo", SelectedDataRow["itemNo"]);
+ gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"]);
+ gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"]);
}
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
@@ -394,6 +440,6 @@
}
}
-
+
}
}
\ No newline at end of file
--
Gitblit v1.9.3