From eab5800dabe79a5cb623b43b680c4e921ac89361 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 11 十二月 2024 19:22:38 +0800
Subject: [PATCH] 11
---
DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesInvItemMoves.cs | 72 ++++++++++++++++++++++++++++--------
1 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesInvItemMoves.cs b/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesInvItemMoves.cs
index ed95aad..ee0ffef 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;
@@ -17,7 +15,7 @@
{
public partial class Frm_MesInvItemMoves : DevExpress.XtraEditors.XtraForm
{
- string _webServiceName = "User/";
+ string _webServiceName = "MesInvItemMovesManager/";
List<FilterEntity> _filterList = new List<FilterEntity>();
public Frm_MesInvItemMoves()
{
@@ -68,10 +66,12 @@
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
- private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
+
+
+ private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
_filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
- await Task.Delay(100);
+ Task.Delay(100);
getPageList(1);
}
/// <summary>
@@ -225,16 +225,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));
@@ -258,15 +298,15 @@
/// </summary>
/// <param name="curPage">绗嚑椤�</param>
/// <param name="pageSize">姣忛〉鍑犳潯</param>
- private async void getPageList(int curPage)
+ private void getPageList(int curPage)
{
- UcLoading _loading = new UcLoading();
+
var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
{
- var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetListPage", json);
+ var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json);
ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn);
if (dd.rtnCode > 0)
{
@@ -294,7 +334,7 @@
{
ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
- _loading.Stop();
+
}
private void getModel(string strGuid, bool isEdit, int tabIdx)
{
@@ -349,9 +389,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 +434,6 @@
}
}
-
+
}
}
\ No newline at end of file
--
Gitblit v1.9.3