kyy
2025-10-22 11d39af68e6665b8d64c62e492ece4df942cfd0e
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs
@@ -39,41 +39,67 @@
            {
                txt_suppId.Text = this.txt_suppNo_1.GetCode();
            };
            //浏览打印事件
            this.ucBtnPrint1.btnPrintClick += (s, e) =>
            {
                string rowGuid, rowName;
                (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                    lbGuid, txt_itemName, gridView1);
                ucBtnPrint1.guidKey = rowGuid;
                if (string.IsNullOrEmpty(txt_suppNo_1.GetCode()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择供应商!");
                    txt_suppNo_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的条码数量!");
                    txt_iCount_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!");
                    txt_psnQty_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                this.ucBtnPrint1.rptParameter = "rpt_ItemInv{" + txt_createDate1.Text.Trim()
                       + "," + txt_tc_1.Checked.ToString().ToUpper()
                       + "," + txt_suppNo_1.GetId()
                       + "," + txt_iCount_1.Text.Trim()
                       + "," + txt_psnQty_1.Text.Trim()
                       + "}";
                _print(0);
            };
            //直接打印事件
            this.ucBtnPrint1.btnZhiJieClick += (s, e) =>
            {
                _print(1);
            };
            //隐藏批量打印按钮
            this.ucBtnPrint1.SetPlButton(false);
        }
        /// <summary>
        /// 打印
        /// </summary>
        /// <param name="type">0表示预览打印,1表示直接打印</param>
        private void _print(int type)
        {
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_itemName, gridView1);
            ucBtnPrint1.guidKey = rowGuid;
            //if (string.IsNullOrEmpty(txt_suppNo_1.GetCode()))
            //{
            //    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择供应商!");
            //    txt_suppNo_1.Focus();
            //    this.ucBtnPrint1.rptParameter = "return false";
            //    return;
            //}
            if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的条码数量!");
                txt_iCount_1.Focus();
                this.ucBtnPrint1.rptParameter = "return false";
                return;
            }
            if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!");
                txt_psnQty_1.Focus();
                this.ucBtnPrint1.rptParameter = "return false";
                return;
            }
            this.ucBtnPrint1.rptParameter = "rpt_ItemInv{" + txt_createDate1.Text.Trim()
                   + "," + txt_tc_1.Checked.ToString().ToUpper()
                   + "," + txt_suppNo_1.GetId()
                   + "," + txt_iCount_1.Text.Trim()
                   + "," + txt_psnQty_1.Text.Trim()
                   + "}";
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);