From daebf2c2a4f1cbbf310e9d739c2ed198cfc5865e Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期二, 22 七月 2025 08:26:53 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs | 132 ++++++++++++++++++++++++++-----------------
1 files changed, 79 insertions(+), 53 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
index d821923..e850eef 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
@@ -1,3 +1,4 @@
+using Gs.DevApp.DevFrm.Rpt;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -26,32 +27,29 @@
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (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;
- this.ucBtnPrint1.btnDesignClick += (s, e) =>
- {
- ucBtnPrint1.rptParameter = "rpt_Arrival{}";
- };
- this.ucBtnPrint1.btnReportClick += (s, e) =>
+ //鎵撳嵃浜嬩欢
+ this.ucBtnPrint1.btnPrintClick += (s, e) =>
{
string rowGuid = lbMxGuid.Text.Trim();
ucBtnPrint1.guidKey = rowGuid;
- if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
+ if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�");
txt_iCount_1.Focus();
this.ucBtnPrint1.rptParameter = "return false";
return;
}
- if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
+ if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
{
Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
txt_psnQty_1.Focus();
@@ -64,20 +62,68 @@
this.ucBtnPrint1.rptParameter = "return false";
return;
}
- this.ucBtnPrint1.rptParameter = "rpt_Arrival{" + lbMxGuid.Text.Trim()
+ this.ucBtnPrint1.rptParameter = "rpt_Arrival{"
+ + lbMxGuid.Text.Trim()//鍏宠仈涓婚敭
+ "," + ""
- + "," + ""
- + "," + txt_iCount_1.Text.Trim()
- + "," + txt_psnQty_1.Text.Trim()
+ + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())//浣欐暟
+ + "," + txt_iCount_1.Text.Trim()//寮犳暟
+ + "," + txt_psnQty_1.Text.Trim()//姣忓紶鏉$爜鏁伴噺
+ "}";
txt_iCount_1.Text = "";
txt_psnQty_1.Text = "";
};
+ //鎵撳嵃鎵归噺鎿嶄綔浜嬩欢
+ this.ucBtnPrint1.btnAllClick += (s, e) =>
+ {
+ string rowGuid = lbMxGuid.Text.Trim();
+ SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "閲囪喘鍏ュ簱");
+ string strCodeList = "";
+ string strAction = "";
+ frm.UpdateParent += (ss, ee) =>
+ {
+ strCodeList = ee.StringSingle;
+ strAction = ee.Data;
+ };
+ frm.ShowDialog();
+ if (string.IsNullOrEmpty(strCodeList))
+ return;
+ if (strAction == "print") {
+ try
+ {
+ string rptParameter = "rpt_Arrival{"
+ + "100"//閲嶆墦閮芥槸浼�100锛�
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + strCodeList
+ + "}";
+ using (Form rpt = new RptPreview(rowGuid, rptParameter))
+ {
+ rpt.ShowDialog();
+ }
+ frm.Close();
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError(ex.Message);
+ }
+ }
+ };
gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
+ //鎵撳嵃鑷姩璁$畻
+ txt_psnQty_1.TextChanged += (s, e) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut, txt_yuliang_1);
+ };
+ radOut.SelectedIndexChanged += (s, e) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
+ };
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
- _filterList= Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
+ _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
Task.Delay(100);
getPageList(1);
}
@@ -91,8 +137,22 @@
txtWlgg.Text = row["itemModel"].ToString();
txtWlmc.Text = row["itemName"].ToString();
txtQuantity.Text = row["quantity"].ToString();//鏈鏀惰揣鎬婚噺
- txtYdy.Text = row["yQty"].ToString();//宸叉墦鍗版�婚噺
- txtKdy.Text = row["kQty"].ToString(); //鍙墦鍗版�婚噺
+ txt_yQty.Text = row["yQty"].ToString();//宸叉墦鍗版�婚噺
+ txt_kQty.Text = row["kQty"].ToString(); //鍙墦鍗版�婚噺
+ txt_psnQty_1.Text = row["mrtmsl"].ToString(); //榛樿姣忓紶鏉$爜鏁伴噺
+ }
+ else
+ {
+ lbMxGuid.Text = "";
+ ucBtnPrint1.guidKey = "";
+ txtWlid.Text = "";
+ txtWlgg.Text = "";
+ txtWlmc.Text = "";
+ txtQuantity.Text = "";
+ txt_yQty.Text = "";
+ txt_kQty.Text = "";
+ txt_psnQty_1.Text = "";
+ txt_iCount_1.Text = "";
}
}
/// <summary>
@@ -114,7 +174,7 @@
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
gridView1.ActiveFilter.Clear();
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
+ var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
frm.UpdateParent += Frm_UpdateParent;
frm.ShowDialog();
}
@@ -158,7 +218,7 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date",
"asc", "", _sbSqlWhere.ToString());
var json = JsonConvert.SerializeObject(pgq);
@@ -269,39 +329,5 @@
}
}
- private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
- {
- var rowhandle = gvMx2.FocusedRowHandle;
- if (rowhandle < 0)
- return;
- if (e.Button.Index == 0)
- {
- var dr = gvMx2.GetDataRow(rowhandle);
- var mxGuid = dr["guid"].ToString();
- if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
- return;
- var _obj = new
- {
- mxGuid = mxGuid,
- inType = "dhtm"
- };
- try
- {
- var strJson = UtilityHelper.HttpPost("",
- _webServiceName + "DeleteBarcode",
- JsonConvert.SerializeObject(_obj));
- var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- if (_rtn.rtnCode > 0)
- {
- if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
- }
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
- }
- catch (Exception ex)
- {
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- }
- }
- }
}
}
\ No newline at end of file
--
Gitblit v1.9.3