From 8eca9ec2bfdf7450ed4b36f814a64be788ec59ea Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期六, 22 二月 2025 15:50:05 +0800
Subject: [PATCH] 调拨
---
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs | 101 +++++++++++++++++++++++++++++++++++---------------
1 files changed, 70 insertions(+), 31 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
index 033d35d..0d6d267 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
@@ -7,7 +7,6 @@
using System;
using System.Collections.Generic;
using System.Data;
-using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -29,6 +28,7 @@
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
+ toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "shState", "", (value) =>
{
@@ -170,18 +170,19 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
{
- if (xtraTabControl1.SelectedTabPageIndex == 1)
+ if (xtraTabControl1.SelectedTabPageIndex == 1)
getModel(lbGuid.Text.Trim());
else
{
- _filterList.Clear();
- if (gridView1.ActiveFilter.Count > 0)
- {
- gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
- gridView1.ActiveFilter.Clear();
- gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- }
- getPageList(1);
+ //_filterList.Clear();
+ //if (gridView1.ActiveFilter.Count > 0)
+ //{
+ // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+ // gridView1.ActiveFilter.Clear();
+ // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+ //}
+ //getPageList(1);
+ getPageList(this.pageBar1.CurrentPage);
}
}
/// <summary>
@@ -201,7 +202,7 @@
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
if (xtraTabControl1.SelectedTabPageIndex == 1)
{
- getModel(rowGuid);
+ getModel(lbGuid.Text.Trim());
}
else
{
@@ -233,26 +234,49 @@
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
toolBarMenu1.isSetBtn = false;
- // string _inCkId = txt_invFcode.GetId();//鍑�
- // string _inRkId = txt_fromFcode.GetId();//鍏�
- //if (string.IsNullOrEmpty(_inCkId))
- //{
- // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍑鸿揣浠撳簱锛�");
- // txt_invFcode.Focus();
- // return;
- //}
- //if (string.IsNullOrEmpty(_inRkId))
- //{
- // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鏀惰揣浠撳簱锛�");
- // txt_fromFcode.Focus();
- // return;
- //}
+ string djlx=txt_djlx.SelectedText.ToString();
+ string ywlx=txt_ywlx.SelectedText.ToString();
+ string dbfx=txt_ftransferdirect.SelectedText.ToString();
+ string sqOrg = txt_sqOrg.GetId();
+ string dblx = txt_dblx.SelectedText.ToString();
+ string dchzlx=txt_dchzlx.SelectedText.ToString();
+ string drhzlx=txt_drhzlx.SelectedText.ToString();
+ if (txt_djlx.SelectedIndex<=0)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
+ txt_djlx.Focus();
+ return;
+ }
+ if (txt_ftransferdirect.SelectedIndex <= 0)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冩嫧鏂瑰悜锛�");
+ txt_ftransferdirect.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(sqOrg))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鐢宠缁勭粐锛�");
+ txt_sqOrg.Focus();
+ return;
+ }
+ if (txt_dchzlx.SelectedIndex <= 0)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨嚭璐т富绫诲瀷锛�");
+ txt_dchzlx.Focus();
+ return;
+ }
+ if (txt_drhzlx.SelectedIndex <= 0)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨叆璐т富绫诲瀷锛�");
+ txt_drhzlx.Focus();
+ return;
+ }
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
//inCkId = _inCkId,//鍑轰粨
//inRkId = _inRkId,//鍏ュ簱
- inDjlx = txt_fbilltypeid.Text.Trim(),//鍗曟嵁绫诲瀷
+ inDjlx = txt_djlx.Text.Trim(),//鍗曟嵁绫诲瀷
inDbfx = txt_ftransferdirect.Text.Trim(),//璋冩嫧鏂瑰悜
inRemark = txt_remark.Text.Trim(),//澶囨敞
list = new List<dynamic>(),
@@ -295,10 +319,9 @@
lbGuid.Text = _rtn.rtnData.outGuid;
txt_billno.Text = _rtn.rtnData.outNo;
toolBarMenu1.isSetBtn = true;
- //List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
- //gvList.Add(gvMx1);
- //UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList);
- //ucLookHuoZhu1.Enabled = false;
+ List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gvMx1);
+ UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList);
toolBarMenu1.currentAction = "";
}
}
@@ -307,7 +330,19 @@
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
-
+ /// <summary>
+ /// 鏃ュ織
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_billno, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
+ }
/// <summary>
///
/// </summary>
@@ -331,6 +366,7 @@
{
gcMain.DataSource = dt;
gcMain.ForceInitialize();
+ gridView1.BestFitColumns();
}
else
UtilityHelper.SetDefaultTable(gcMain, gridView1);
@@ -387,6 +423,7 @@
gcMx1.BindingContext = new BindingContext();
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
+ gvMx1.BestFitColumns();
}
else
{
@@ -487,6 +524,8 @@
gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"].ToString());
gvMx1.SetFocusedRowCellValue("itemMpdel", SelectedDataRow["itemModel"].ToString());
gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString());
+ gvMx1.CloseEditor();
+ gvMx1.UpdateCurrentRow();
}
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
--
Gitblit v1.9.3