yusijie
19 小时以前 68b98170b5532abd258494bb8b6a0c2c4c48d6d5
添加夏宝桌面端调拨退料条码生成模块;
2个文件已修改
119 ■■■■■ 已修改文件
WarM/条码打印/Gy_BarCodeBill_XiaBao.cs 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill_XiaBao.cs
@@ -8,6 +8,7 @@
using gregn6Lib;
using Pub_Class;
using System.Threading;
using System.Text.RegularExpressions;
namespace WarM
{
@@ -37,51 +38,53 @@
        public const Int16 HBarCodeTypeCol = 16;
        public const Int16 HQtyCol = 17;
        public const Int16 HMinQtyCol = 18;
        public const Int16 HBQtyCol = 19;
        public const Int16 HinitQtyCol = 20;
        public const Int16 HISKFPERIODCol = 21;
        public const Int16 HProduceDateCol = 22;
        public const Int16 HExpiryDateCol = 23;
        public const Int16 HEXPUNITCol = 24;
        public const Int16 HEXPPERIODCol = 25;
        public const Int16 HGiveAwayFlagCol = 26;
        public const Int16 HUnitIDCol = 27;
        public const Int16 HUnitNumberCol = 28;
        public const Int16 HUnitNameCol = 29;
        public const Int16 HWhIDCol = 30;
        public const Int16 HWhNumberCol = 31;
        public const Int16 HWhNameCol = 32;
        public const Int16 HSPIDCol = 33;
        public const Int16 HSPNumberCol = 34;
        public const Int16 HSPNameCol = 35;
        public const Int16 HMTONoCol = 36;
        public const Int16 HRemarkCol = 37;
        public const Int16 HDeptIDCol = 38;
        public const Int16 HDeptNumberCol = 39;
        public const Int16 HDeptNameCol = 40;
        public const Int16 HSourceIDCol = 41;
        public const Int16 HSourceNumberCol = 42;
        public const Int16 HSourceNameCol = 43;
        public const Int16 HSupIDCol = 44;
        public const Int16 HSupNumberCol = 45;
        public const Int16 HSupNameCol = 46;
        public const Int16 HGroupIDCol = 47;
        public const Int16 HGroupNumberCol = 48;
        public const Int16 HGroupNameCol = 49;
        public const Int16 HCusIDCol = 50;
        public const Int16 HCusNumberCol = 51;
        public const Int16 HCusNameCol = 52;
        public const Int16 HCusTypeCol = 53;
        public const Int16 HSeOrderBillNoCol = 54;
        public const Int16 HSeOrderSEQCol = 55;
        public const Int16 HInnerBillNoCol = 56;
        public const Int16 HEndDateCol = 57;
        public const Int16 HSourceBillQtyCol = 58;
        public const Int16 HAuxPropFlagCol = 59;
        public const Int16 HBarCodeCol = 60;    //条码编号
        public const Int16 HTMNumberCol = 61;   //条码前缀
        public const Int16 HLSHCol = 62;        //生成条码时获取对应流水号
        public const Int16 HBarcodeNoCol = 63;  //记录需回填的流水号数量
        public const Int16 HPackBarQtyCol = 19;  //规格数量,字段内容为手动输入
        public const Int16 HBQtyCol = 20;
        public const Int16 HinitQtyCol = 21;
        public const Int16 HISKFPERIODCol = 22;
        public const Int16 HProduceDateCol = 23;
        public const Int16 HExpiryDateCol = 24;
        public const Int16 HEXPUNITCol = 25;
        public const Int16 HEXPPERIODCol = 26;
        public const Int16 HGiveAwayFlagCol = 27;
        public const Int16 HUnitIDCol = 28;
        public const Int16 HUnitNumberCol = 29;
        public const Int16 HUnitNameCol = 30;
        public const Int16 HWhIDCol = 31;
        public const Int16 HWhNumberCol = 32;
        public const Int16 HWhNameCol = 33;
        public const Int16 HSPIDCol = 34;
        public const Int16 HSPNumberCol = 35;
        public const Int16 HSPNameCol = 36;
        public const Int16 HMTONoCol = 37;
        public const Int16 HRemarkCol = 38;
        public const Int16 HDeptIDCol = 39;
        public const Int16 HDeptNumberCol = 40;
        public const Int16 HDeptNameCol = 41;
        public const Int16 HSourceIDCol = 42;
        public const Int16 HSourceNumberCol = 43;
        public const Int16 HSourceNameCol = 44;
        public const Int16 HSupIDCol = 45;
        public const Int16 HSupNumberCol = 46;
        public const Int16 HSupNameCol = 47;
        public const Int16 HGroupIDCol = 48;
        public const Int16 HGroupNumberCol = 49;
        public const Int16 HGroupNameCol = 50;
        public const Int16 HCusIDCol = 51;
        public const Int16 HCusNumberCol = 52;
        public const Int16 HCusNameCol = 53;
        public const Int16 HCusTypeCol = 54;
        public const Int16 HSeOrderBillNoCol = 55;
        public const Int16 HSeOrderSEQCol = 56;
        public const Int16 HInnerBillNoCol = 57;
        public const Int16 HEndDateCol = 58;
        public const Int16 HSourceBillQtyCol = 59;
        public const Int16 HAuxPropFlagCol = 60;
        public const Int16 HBarCodeCol = 61;    //条码编号
        public const Int16 HTMNumberCol = 62;   //条码前缀
        public const Int16 HLSHCol = 63;        //生成条码时获取对应流水号
        public const Int16 HBarcodeNoCol = 64;  //记录需回填的流水号数量
        //
        public  string ModName = "85";
        public  string ModCaption = "调拨条码生成";
@@ -598,6 +601,14 @@
                    {
                        sHRemark = sHRemark + " ç¬¬" + HSno + "行,物料:" + HMaterNumber + sHRemark2;
                    }
                    // æ­£åˆ™è¡¨è¾¾å¼ï¼šåŒ¹é…æ•´æ•°ã€æµ®ç‚¹æ•°ã€æ­£è´Ÿå·ã€ç§‘学计数法(可根据需求调整)
                    string numericRegex = @"^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$";
                    if (!Regex.IsMatch(DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPackBarQtyCol].Value), numericRegex) && DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPackBarQtyCol].Value) != "")
                    {
                        sHRemark = sHRemark + " ç¬¬" + HSno + "行,规格数量不为数字格式,请输入正确的数值!" ;
                    }
                }
            }
            if (sHRemark != "")
@@ -674,6 +685,7 @@
                string HMaterModel = "";        //产品规格型号
                string HPinfan = "";            //品番
                DateTime HEndDate;              //计划完工日期
                double HPackBarQty = 0;        //规格数量
                oCn.BeginTran();
                Application.DoEvents();
@@ -828,6 +840,7 @@
                        HMaterModel = ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterModelCol].Value);
                        HPinfan = ClsPub.isStrNull(grdMain.Rows[j].Cells[HPinfanCol].Value);
                        HEndDate = ClsPub.isDate(grdMain.Rows[j].Cells[HEndDateCol].Value);
                        HPackBarQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HPackBarQtyCol].Value == "" ? 0 : grdMain.Rows[j].Cells[HPackBarQtyCol].Value);
                        oCn.RunProc("insert into Gy_BarCodeBill" +
                                "(HInterID,HEntryID,HBarCode,HBarCodeType,HMaterID,HUnitID" +
@@ -838,7 +851,7 @@
                                ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HInitSourceEntryID,HRemark" +
                                ",HPrintQty,HSTOCKORGID,HOWNERID,HDeptID,HSupID,HGroupID" +
                                ",HCusID,HCusType,HSeOrderBillNo,HSeOrderSEQ,HInnerBillNo,HWorkLineName" +
                                ",HMaterName,HMaterModel,HPinfan,HEndDate,HMaker,HMakeDate" +
                                ",HMaterName,HMaterModel,HPinfan,HEndDate,HMaker,HMakeDate,HPackBarQty" +
                                ") values ("
                                + " " + HInterID.ToString() + "," + HEntryID.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString()
                                + ", " + HAuxPropID.ToString() + ",'" + HBatchNo + "','" + HMTONo + "'," + HQty.ToString() + "," + HinitQty.ToString() + "," + HSourceBillQty.ToString()
@@ -848,7 +861,7 @@
                                + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "'," + HInitSourceEntryID.ToString() + ",'" + HRemark + "'"
                                + ", " + HPrintQty.ToString() + "," + HSTOCKORGID.ToString() + "," + HOWNERID.ToString() + "," + HDeptID.ToString() + "," + HSupID.ToString() + "," + HGroupID.ToString()
                                + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HSeOrderBillNo + "'," + HSeOrderSEQ.ToString() + ",'" + HInnerBillNo + "','" + HWorkLineName + "'"
                                + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "','" + HEndDate.ToShortDateString() + "','" + ClsPub.CurUserName + "',getdate()" +
                                + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "','" + HEndDate.ToShortDateString() + "','" + ClsPub.CurUserName + "',getdate()" + "," + HPackBarQty +
                                ")");
                    }
                    pb1.Value = j + 1;
@@ -946,7 +959,7 @@
        private void initGrid()
        {
            grdMain.RowCount = 0;
            grdMain.ColumnCount = 64;                       //总列数
            grdMain.ColumnCount = 65;                       //总列数
            DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
            grdMain.Columns[HSnoCol].HeaderText = "序号";
            grdMain.Columns[HMainIDCol].HeaderText = "源单主ID";
@@ -970,6 +983,7 @@
            grdMain.Columns[HQtyCol].HeaderText = "数量";
            grdMain.Columns[HMinQtyCol].HeaderText = "重量";
            grdMain.Columns[HBQtyCol].HeaderText = "箱数";
            grdMain.Columns[HPackBarQtyCol].HeaderText = "规格数量";
            grdMain.Columns[HinitQtyCol].HeaderText = "初始化数量";
            grdMain.Columns[HSourceBillQtyCol].HeaderText = "源单可生成条码数量";
            grdMain.Columns[HBarCodeTypeCol].HeaderText = "条码类型";
@@ -1067,6 +1081,7 @@
                                "," + HBatchNoCol.ToString() +
                                "," + HBarCodeTypeCol.ToString() +
                                "," + HProduceDateCol.ToString() +
                                "," + HPackBarQtyCol.ToString() +
                                "," + HRemarkCol.ToString();
            //设置合计列
@@ -1179,6 +1194,7 @@
                                        grdMain.Rows[sRow].Cells[HISKFPERIODCol].Value = oMater.omodel.HISKFPERIOD;
                                        grdMain.Rows[sRow].Cells[HBarCodeTypeCol].Value = oMater.omodel.HBarCodeType;
                                        grdMain.Rows[sRow].Cells[HBQtyCol].Value = 1;
                                        grdMain.Rows[sRow].Cells[HPackBarQtyCol].Value = 0;
                                        //启用批次
                                        if (oMater.omodel.HBatchManager)
                                        {
@@ -1227,6 +1243,7 @@
                                        grdMain.Rows[sRow].Cells[HEXPPERIODCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HProduceDateCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HExpiryDateCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HPackBarQtyCol].Value = 0;
                                    }
                                }
                                else
@@ -1251,6 +1268,7 @@
                                    grdMain.Rows[sRow].Cells[HEXPPERIODCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HProduceDateCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HExpiryDateCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HPackBarQtyCol].Value = 0;
                                }
                                break;
@@ -1522,6 +1540,7 @@
            grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["最小包装数"].ToString();
            grdMain.Rows[i].Cells[HAuxPropFlagCol].Value = oTable.Rows[0]["HAuxPropFlag"].ToString();
            //启用辅助属性
            if (DBUtility.ClsPub.isBool(oTable.Rows[0]["HAuxPropFlag"].ToString()))
            {
@@ -1574,6 +1593,7 @@
                                "," + HBatchNoCol.ToString() +
                                "," + HBarCodeTypeCol.ToString() +
                                "," + HProduceDateCol.ToString() +
                                "," + HPackBarQtyCol.ToString() +
                                "," + HRemarkCol.ToString();
            grdMain.Columns[HBillNoCol].ReadOnly = true;
            //设置合计列
@@ -1965,6 +1985,7 @@
                grdMain.Rows[row + r].Cells[HBatchNoCol].Value = grdMain.Rows[row].Cells[HBatchNoCol].Value;
                grdMain.Rows[row + r].Cells[HQtyCol].Value = grdMain.Rows[row].Cells[HQtyCol].Value;
                grdMain.Rows[row + r].Cells[HMinQtyCol].Value = 0;
                grdMain.Rows[row + r].Cells[HPackBarQtyCol].Value = 0;
                grdMain.Rows[row + r].Cells[HBQtyCol].Value = grdMain.Rows[row].Cells[HBQtyCol].Value;
                grdMain.Rows[row + r].Cells[HinitQtyCol].Value = grdMain.Rows[row].Cells[HinitQtyCol].Value;
                grdMain.Rows[row + r].Cells[HISKFPERIODCol].Value = grdMain.Rows[row].Cells[HISKFPERIODCol].Value;
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -5138,7 +5138,7 @@
        {
            try
            {
                ds = oCN.RunProcReturn($"select *,b.hnumber,b.hname HMaterName_m from Gy_BarCodeBill a left join Gy_Material b on a.HMaterID=b.HItemID where HBarCode='{HbarCode}' ", "Gy_Material");
                ds = oCN.RunProcReturn($"select *,b.hnumber HMaterNumber,b.hname HMaterName_m from Gy_BarCodeBill a with(nolock) left join Gy_Material b with(nolock) on a.HMaterID=b.HItemID where HBarCode='{HbarCode}' ", "Gy_Material");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";