From 17f1e58af10fda65f0494efa23a3fb96641ae2af Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 23 十二月 2024 14:10:54 +0800
Subject: [PATCH] 委外排产
---
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs | 187 ++++++++++++++++++++++++++++------------------
1 files changed, 114 insertions(+), 73 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
index b5a7ea2..e406242 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
@@ -6,8 +6,6 @@
using System;
using System.Collections.Generic;
using System.Data;
-using System.Drawing;
-using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -22,12 +20,21 @@
InitializeComponent();
this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
- toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
- toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
-
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1);
+ //toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
+ //toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+ });
+ Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
+ {
+ getModel(value);
+ }, (value) =>
+ {
+ getPageList(this.pageBar1.CurrentPage);
+ });
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
txt_depotsId.getSuppler("");
@@ -43,6 +50,42 @@
txtSupplierId.Text = this.txt_suppId.GetId();
};
gcMx1.MouseClick += GcMx1_MouseClick;
+ this.ucBtnPrint1.btnDesignClick += (s, e) =>
+ {
+ ucBtnPrint1.rptParameter = "rpt_Arrival{}";
+ };
+ this.ucBtnPrint1.btnReportClick += (s, e) =>
+ {
+ ucBtnPrint1.guidKey = "";
+ string rowGuid = lbMxGuid.Text.Trim();
+ ucBtnPrint1.guidKey = rowGuid;
+ if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
+ txt_iCount_1.Focus();
+ this.ucBtnPrint1.rptParameter = "return false";
+ return;
+ }
+ if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
+ txt_psnQty_1.Focus();
+ this.ucBtnPrint1.rptParameter = "return false";
+ return;
+ }
+ if (lbMxGuid.Text.Trim().Length < 10)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�");
+ this.ucBtnPrint1.rptParameter = "return false";
+ return;
+ }
+ this.ucBtnPrint1.rptParameter = "rpt_Arrival{" + lbMxGuid.Text.Trim()
+ + "," + ""
+ + "," + ""
+ + "," + txt_iCount_1.Text.Trim()
+ + "," + txt_psnQty_1.Text.Trim()
+ + "}";
+ };
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
@@ -66,17 +109,7 @@
txtQuantity.Text = row["Quantity"].ToString();
kyPrtQty.Text = row["kyPrtQty"].ToString();
}
- /// <summary>
- /// 鍙屽嚮浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
- if (!string.IsNullOrEmpty(rowGuid))
- getModel(rowGuid, false, 999);
- }
+
/// <summary>
/// 鍒嗛〉浜嬩欢
/// </summary>
@@ -121,44 +154,7 @@
}
private void ToolBarMenu1_btnReportClick(object sender, EventArgs e)
{
- toolBarMenu1.guidKey = "";
- string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_billNo, gridView1);
- toolBarMenu1.guidKey = rowGuid;
- if (xtraTabControl1.SelectedTabPageIndex == 0)
- {
- getModel(rowGuid, false, 999);
- this.toolBarMenu1.rptParameter = "return false";
- return;
- }
- if (lbMxGuid.Text.Trim().Length < 36)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨浣犺鎵撳嵃鐨勮锛�");
- this.toolBarMenu1.rptParameter = "return false";
- return;
- }
- if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
- txt_iCount_1.Focus();
- this.toolBarMenu1.rptParameter = "return false";
- return;
- }
- if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
- txt_psnQty_1.Focus();
- this.toolBarMenu1.rptParameter = "return false";
- return;
- }
- toolBarMenu1.guidKey = lbMxGuid.Text;
- this.toolBarMenu1.rptParameter = "rpt_Arrival{" + ""
- + "," + ""
- + "," + ""
- + "," + txt_iCount_1.Text.Trim()
- + "," + txt_psnQty_1.Text.Trim()
- + "}";
+ _print();
}
/// <summary>
@@ -169,7 +165,7 @@
private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
{
if (xtraTabControl1.SelectedTabPageIndex == 1)
- getModel(lbGuid.Text.Trim(), false, 999);
+ getModel(lbGuid.Text.Trim());
else
{
_filterList.Clear();
@@ -225,14 +221,16 @@
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
- private void getModel(string strGuid, bool isEdit, int tabIdx)
+ private void getModel(string strGuid)
{
+ bool isEdit = false;
+ if (toolBarMenu1.currentAction == "add") return;
+ if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
- UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
var _obj = new
{
guid = strGuid,//涓诲缓
@@ -247,6 +245,7 @@
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.panel1.Controls, dy, isEdit, gvList);
JArray array1 = new JArray();
foreach (var a in dy["list1"])
@@ -264,21 +263,22 @@
{
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
}
- //foreach (var a in _job["rtnData"]["list3"])
- //{
- // list3.Add(a);
- //}
- //DataTable dt1 = JsonConvert.DeserializeObject<DataTable>(list3.ToString());
- //if (dt1.Rows.Count > 0)
- //{
- // gcMx2.BindingContext = new BindingContext();
- // gcMx2.DataSource = dt1;
- // gcMx2.ForceInitialize();
- //}
- //else
- //{
- // Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
- //}
+ JArray array2 = new JArray();
+ foreach (var a in dy["list2"])
+ {
+ array2.Add(a);
+ }
+ DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(array2.ToString());
+ if (dt2.Rows.Count > 0)
+ {
+ gcMx2.BindingContext = new BindingContext();
+ gcMx2.DataSource = dt2;
+ gcMx2.ForceInitialize();
+ }
+ else
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
+ }
}
else
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
@@ -288,5 +288,46 @@
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
+ private void _print()
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_billNo, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
+ if (xtraTabControl1.SelectedTabPageIndex == 0)
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 5);
+ this.toolBarMenu1.rptParameter = "return false";
+ return;
+ }
+ if (lbMxGuid.Text.Trim().Length < 36)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨浣犺鎵撳嵃鐨勮锛�");
+ this.toolBarMenu1.rptParameter = "return false";
+ return;
+ }
+ if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
+ txt_iCount_1.Focus();
+ this.toolBarMenu1.rptParameter = "return false";
+ return;
+ }
+ if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
+ txt_psnQty_1.Focus();
+ this.toolBarMenu1.rptParameter = "return false";
+ return;
+ }
+ toolBarMenu1.guidKey = lbMxGuid.Text;
+ this.toolBarMenu1.rptParameter = "rpt_Arrival{" + ""
+ + "," + ""
+ + "," + ""
+ + "," + txt_iCount_1.Text.Trim()
+ + "," + txt_psnQty_1.Text.Trim()
+ + "}";
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.3