lu
2025-10-28 53c9b6ebb6ed790f4c62150c499e9da74aaa16d2
DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs
@@ -1,3 +1,4 @@
using DevExpress.Utils.VisualEffects;
using DevExpress.XtraEditors;
using Gs.DevApp.DevFrm.Rpt;
using Gs.DevApp.DevFrm.Sales;
@@ -9,6 +10,8 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -109,6 +112,45 @@
            radOut.SelectedIndexChanged += (s, e) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
            };
            //全部打印
            ucBtnPrintAll1.btnPrintClick += (s, e) =>
            {
                this.ucBtnPrintAll1.rptType = "";
                this.ucBtnPrintAll1.mxList = null;
                if (string.IsNullOrEmpty(lbGuid.Text.Trim()))
                {
                    MsgHelper.ShowError("提示:打印前请先保存单据!");
                    return;
                }
                getModel(lbGuid.Text.Trim());
                List<dynamic> lst = new List<dynamic>();
                DataTable dt = (DataTable)gcMx1.DataSource;
                foreach (DataRow row in dt.Rows)
                {
                    string guid = row["guid"].ToString();
                    string psnQty = row["kdy"].ToString();
                    if (string.IsNullOrEmpty(psnQty))
                    {
                        continue;
                    }
                    if (psnQty == "0")
                    {
                        continue;
                    }
                    lst.Add(new
                    {
                        guid = guid,
                        kdy = psnQty,
                    });
                }
                if (lst.Count <= 0)
                {
                    MsgHelper.ShowError("提示:暂无可打印的物料!");
                    return;
                }
                this.ucBtnPrintAll1.rptType = "rpt_Xsth";
                this.ucBtnPrintAll1.mxList = lst;
            };
            #endregion
@@ -283,6 +325,8 @@
                setSrm();
            };
        }
        /// <summary>
        /// 打印
        /// </summary>