lu
2024-12-20 a55730702b0b1b541d6ec40cac4469a2418936d5
DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
@@ -27,6 +27,8 @@
            this.toolBarMenu1.btnTzblClick += ToolBarMenu1_btnTzblClick;
            this.toolBarMenu1.btnKgClick += ToolBarMenu1_btnKgClick;
            this.toolBarMenu1.btnWgClick += ToolBarMenu1_btnWgClick;
            toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
            toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) =>
            {
@@ -41,6 +43,7 @@
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            txt_sjXt.getSuppler("");
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
@@ -284,6 +287,22 @@
                    {
                        Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
                    }
                    JArray array2 = new JArray();
                    foreach (var a in _job["rtnData"]["list2"])
                    {
                        array2.Add(a);
                    }
                    DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(array2.ToString());
                    if (dt.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);
@@ -292,6 +311,20 @@
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_daa001, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            toolBarMenu1.rptParameter = "rpt_daa{}";
        }
        private void ToolBarMenu1_btnReportClick(object sender, EventArgs e)
        {
            _print();
        }
@@ -368,5 +401,47 @@
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void _print()
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_daa001, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            if (xtraTabControl1.SelectedTabPageIndex == 0)
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 5);
                this.toolBarMenu1.rptParameter = "return false";
                return;
            }
            if (rowGuid.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;
            }
            this.toolBarMenu1.rptParameter = "rpt_daa{" + ""
                   + "," + txt_printRemark.Text.Trim()
                   + "," + ""
                   + "," + txt_iCount_1.Text.Trim()
                   + "," + txt_psnQty_1.Text.Trim()
                   + "}";
        }
    }
}