From ae5b5c1926ab7fddc0931b2bee7f3794e8534555 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期三, 19 三月 2025 16:21:41 +0800
Subject: [PATCH] 异常
---
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs | 134 +++++++++++++++-----------------------------
1 files changed, 46 insertions(+), 88 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs
index 84b807d..c2b3d8e 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs
@@ -14,13 +14,10 @@
{
public partial class Frm_MesShouTuo : DevExpress.XtraEditors.XtraForm
{
- string _webServiceName = "MesItemQtrkManager/";
+ string _webServiceName = "MesShouTuoManager/";
List<FilterEntity> _filterList = new List<FilterEntity>();
- string _ucGys = "";//渚涘簲鍟�
- string _ucBm = "";//棰嗘枡閮ㄩ棬
- string _ucCk = "";//鍙戞枡浠撳簱
- string _ucHzlx = "";//璐т富绫诲瀷
- string _ucHz = "";//璐т富
+ string _ucCk = "";//浠撳簱
+ string _ucKh = "";//瀹㈡埛
public Frm_MesShouTuo()
{
InitializeComponent();
@@ -37,7 +34,7 @@
this.toolBarMenu1.getXmlConfig();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isSh", "", (value) =>
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isCheck", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
});
@@ -50,19 +47,14 @@
});
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
-
//閫夋嫨搴撳瓨缁勭粐锛堝彉鏄庣粏涓殑鐗╂枡鍜屽彉璐т富锛�
- this.txt_qt022.EditChanged += (s, e) =>
+ this.txt_fStockOrgId.EditChanged += (s, e) =>
{
- string _orgId = txt_qt022.GetId();
+ string _orgId = txt_fStockOrgId.GetId();
if (string.IsNullOrEmpty(_orgId))
return;
- ucLookHuoZhu1.OrgId = _orgId;
- ucLookHuoZhu1.HzId = _ucHz;
- ucLookHuoZhu1.SetHzLx(_ucHzlx);
- txt_qt009.getSuppler(_orgId, _ucBm);
- txt_qt018.getSuppler(_orgId, _ucGys);
- txt_qt008.getSuppler(_orgId, _ucCk);
+ txt_fCustId.getSuppler(_orgId, _ucKh);
+ txt_fStockId.getSuppler(_orgId, _ucCk);
System.Text.StringBuilder sbWhere = new System.Text.StringBuilder();
sbWhere.Append(" and a.FSubsidiary ='" + _orgId + "'");
var _obj = new PageQueryModel(1, 999999, "item_no", "asc", "", sbWhere.ToString(), "");
@@ -83,7 +75,7 @@
gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
this.ucBtnPrint1.btnDesignClick += (s, e) =>
{
- ucBtnPrint1.rptParameter = "rpt_Qtrk{}";
+ ucBtnPrint1.rptParameter = "rpt_Strk{}";
};
this.ucBtnPrint1.btnReportClick += (s, e) =>
{
@@ -110,7 +102,7 @@
this.ucBtnPrint1.rptParameter = "return false";
return;
}
- this.ucBtnPrint1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim()
+ this.ucBtnPrint1.rptParameter = "rpt_Strk{" + lbMxGuid.Text.Trim()
+ "," + ""
+ "," + ""
+ "," + txt_iCount_1.Text.Trim()
@@ -134,7 +126,7 @@
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_qtck, gridView1);
+ lbGuid, txt_billNo, gridView1);
toolBarMenu1.guidKey = rowGuid;
}
@@ -190,7 +182,7 @@
{
string rowGuid = "", rowName = "";
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_qtck, gridView1, "qtck");
+ lbGuid, txt_billNo, gridView1, "billNo");
if (string.IsNullOrEmpty(rowGuid))
{
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -256,7 +248,7 @@
{
string rowGuid, rowName;
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_qtck, gridView1);
+ lbGuid, txt_billNo, gridView1);
if (string.IsNullOrEmpty(rowGuid))
{
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -273,7 +265,6 @@
gvList.Add(gvMx1);
gvList.Add(gvMx2);
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
- ucLookHuoZhu1.Enabled = true;
}
}
/// <summary>
@@ -291,7 +282,6 @@
UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
- ucLookHuoZhu1.Enabled = true;
}
/// <summary>
/// 淇濆瓨浜嬩欢
@@ -301,64 +291,39 @@
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
toolBarMenu1.isSetBtn = false;
- string kcZz = txt_qt022.GetId();//搴撳瓨缁勭粐
- string kcBm = txt_qt009.GetId();//搴撳瓨閮ㄩ棬
- string kcGys = txt_qt018.GetId();//搴撳瓨渚涘簲鍟�
- string djLx = txt_qt003.Text.Trim();//鍗曟嵁绫诲瀷
- string kcfx = txt_qt019.Text.Trim();//搴撳瓨鏂瑰悜
- string inHzlx = ucLookHuoZhu1.GetHzLx();//璐т富绫诲瀷
- string inHz = ucLookHuoZhu1.GetHzId();//璐т富
- string inRkyy = txt_qt010.Text.Trim();//鍏ュ簱鍘熷洜
- string kcCk = txt_qt008.GetId();//浠撳簱
+ string kcZz = txt_fStockOrgId.GetId();//搴撳瓨缁勭粐
+ string inRkyy = txt_remark.Text.Trim();//鍘熷洜
+ string kcCk = txt_fStockId.GetId();//浠撳簱
+ string kh=txt_fCustId.GetId();//瀹㈡埛
if (string.IsNullOrEmpty(kcZz))
{
Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨搴撳瓨缁勭粐锛�");
- txt_qt022.Focus();
- return;
- }
- if (string.IsNullOrEmpty(inHzlx))
- {
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐т富绫诲瀷锛�");
- return;
- }
- if (string.IsNullOrEmpty(inHz))
- {
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐т富锛�");
- return;
- }
- if (txt_qt003.SelectedIndex < 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
- txt_qt003.Focus();
- return;
- }
- if (txt_qt019.SelectedIndex <= 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨搴撳瓨鏂瑰悜锛�");
- txt_qt019.Focus();
+ txt_fStockOrgId.Focus();
return;
}
if (string.IsNullOrEmpty(kcCk))
{
Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鏀舵枡浠撳簱锛�");
- txt_qt008.Focus();
+ txt_fStockId.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(kh))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨瀹㈡埛锛�");
+ txt_fCustId.Focus();
return;
}
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
kcZz = kcZz,//搴撳瓨缁勭粐
- kcBm = kcBm,//搴撳瓨閮ㄩ棬
- kcGys = kcGys,//搴撳瓨渚涘簲鍟�
kcCk = kcCk,//搴撳瓨浠撳簱
inRkyy = inRkyy,//鍏ュ簱鍘熷洜
- djLx = djLx,//鍗曟嵁绫诲瀷
- kcfx = kcfx,//搴撳瓨鏂瑰悜
- hzlx = inHzlx,//璐т富绫诲瀷
- inHz = inHz,//璐т富
+ kh= kh,
list = new List<dynamic>(),
};
gvMx1.CloseEditor();
+ gvMx1.PostEditor();
gvMx1.UpdateCurrentRow();
if (gvMx1.DataRowCount <= 0)
{
@@ -371,7 +336,7 @@
if (row != null)
{
Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString());
- string _msl = row["qd007"].ToString();
+ string _msl = row["Sqsl"].ToString();
if (string.IsNullOrEmpty(_msl))
{
MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�");
@@ -381,8 +346,8 @@
{
Guid = _guid,
ItemId = (row["itemId"].ToString()),
- Sqsl = (row["qd007"].ToString()),
- Bz = (row["qd010"].ToString()),
+ Sqsl = (row["Sqsl"].ToString()),
+ Bz = (row["remark"].ToString()),
});
}
}
@@ -394,13 +359,12 @@
if (_rtn.rtnCode > 0)
{
lbGuid.Text = _rtn.rtnData.outGuid;
- txt_qtck.Text = _rtn.rtnData.outNo;
+ 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);
gvList.Add(gvMx2);
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
- ucLookHuoZhu1.Enabled = false;
toolBarMenu1.currentAction = "";
}
}
@@ -418,7 +382,7 @@
private void getPageList(int curPage)
{
var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
- PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "qt001", "asc", "", _sbSqlWhere.ToString());
+ PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "billNo", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
{
@@ -433,7 +397,7 @@
{
gcMain1.DataSource = dt;
gcMain1.ForceInitialize();
- gridView1.BestFitColumns();
+ gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
}
else
UtilityHelper.SetDefaultTable(gcMain1, gridView1);
@@ -473,22 +437,14 @@
if (_rtn.rtnCode > 0)
{
dynamic dy = _rtn.rtnData;
- _ucGys = dy.qt018;
- _ucBm = dy.qt009;
- _ucCk = dy.qt008;
- _ucHzlx = dy.qt023;
- _ucHz = dy.qt024;
+ _ucCk = dy.fStockId;
+ _ucKh = dy.fCustId;
lbGuid.Text = strGuid;
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
gvList.Add(gvMx2);
UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
- _ucGys = "";
- _ucBm = "";
_ucCk = "";
- _ucHzlx = "";
- _ucHz = "";
- ucLookHuoZhu1.Enabled = isEdit;
JObject _job = JObject.Parse(strJson);
JArray array = new JArray();
foreach (var a in _job["rtnData"]["list"])
@@ -538,11 +494,13 @@
{
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"]);
gvMx1.SetFocusedRowCellValue("kcDw", SelectedDataRow["dwName"]);
gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"]);
+ gvMx1.PostEditor();
+ gvMx1.UpdateCurrentRow();
}
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
@@ -625,7 +583,7 @@
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_qtck, gridView1, "qtck");
+ lbGuid, txt_billNo, gridView1, "billNo");
if (string.IsNullOrEmpty(rowGuid))
{
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -653,7 +611,7 @@
}
int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
gridView1.FocusedRowHandle = rowHandle;
- UtilityHelper.SetCheckIco(gridView1, "isSh", "qt016", "qt002", picCheckBox, this, _inFieldValue.ToString());
+ UtilityHelper.SetCheckIco(gridView1, "isCheck", "checkBy", "checkDate", picCheckBox, this, _inFieldValue.ToString());
}
}
catch (Exception ex)
@@ -668,10 +626,10 @@
DataRow row = gvMx1.GetDataRow(e.FocusedRowHandle);
lbMxGuid.Text = row["guid"].ToString();
ucBtnPrint1.guidKey = row["guid"].ToString();
- txtWlid.Text = row["qd002"].ToString();
- txtWlgg.Text = row["qd004"].ToString();
- txtWlmc.Text = row["qd003"].ToString();
- txtQuantity.Text = row["qd007"].ToString();//鐢宠鎬婚噺
+ txtWlid.Text = row["itemNo"].ToString();
+ txtWlgg.Text = row["itemModel"].ToString();
+ txtWlmc.Text = row["itemName"].ToString();
+ txtQuantity.Text = row["sqsl"].ToString();//鐢宠鎬婚噺
txtYdy.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺
txtKdy.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺
}
--
Gitblit v1.9.3