1
zrg
2025-09-12 b2537aad6e9d3249189312a464b17a18442dae89
1
4个文件已修改
116 ■■■■■ 已修改文件
WarM/条码打印/Gy_CusBarCodeBillList.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_CusBarCodeBill_KaiBei.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_CusBarCodeBill_KaiBei_LangChao.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/条码管理/WEBSController.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/ÌõÂë´òÓ¡/Gy_CusBarCodeBillList.cs
@@ -291,7 +291,7 @@
            if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
            {
                Sub_SetReport(oFrm.sOpenTmp);
                Report.Print(false);
                Report.Print(true);     //递入false时不弹出打印机设置框,true时弹出打印机设置框
                Thread.Sleep(1000);
            }
        }
WarM/ÌõÂë´òÓ¡/Gy_CusBarCodeBill_KaiBei.cs
@@ -281,11 +281,7 @@
            cmbHCusName.DisplayMember = "HName";
            cmbHCusName.ValueMember = "HItemID";
            if (cmbHCusName.Text.Contains("顺达"))
            {
                HBarCodeType = "顺达标签";
            }
            else if (cmbHCusName.Text.Contains("锐捷"))
            if (cmbHCusName.Text.Contains("锐捷"))
            {
                HBarCodeType = "锐捷标签";
            }
@@ -676,15 +672,7 @@
                        HMaterNumber = HMaterNumber.Substring(HMaterNumber.Length - 3, 3);  //取物料代码后三位
                        string sHCusModelName = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelNameCol].Value);   //客户代码(取金蝶客户物料对应表客户物料编码)
                        if (HBarCodeType == "顺达标签")
                        {
                            LSHlen = 6;
                            //条码前缀 = 'B103288'+年周
                            sTMNumber = "B103288" + sYearWeek;
                            Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                            LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                        }
                        else if (HBarCodeType == "锐捷标签")
                        if (HBarCodeType == "锐捷标签")
                        {
                            LSHlen = 5;
                            //条码前缀 = å®¢æˆ·æ–™å·+供应商代码(固定'264')+年月日(20250705)
@@ -764,7 +752,7 @@
                                LSH2 = "0" + LSH2;
                            }
                            if (HBarCodeType == "顺达标签" || HBarCodeType == "锐捷标签" || HBarCodeType == "华勤标签" || HBarCodeType == "英业达标签")
                            if (HBarCodeType == "锐捷标签" || HBarCodeType == "华勤标签" || HBarCodeType == "英业达标签")
                            {
                                TM = sTMNumber + LSH2;
                            }
@@ -1682,11 +1670,7 @@
        #region é€‰æ‹©å®¢æˆ·
        private void cmbHCusName_TextChanged(object sender, EventArgs e)
        {
            if (cmbHCusName.Text.Contains("顺达"))
            {
                HBarCodeType = "顺达标签";
            }
            else if (cmbHCusName.Text.Contains("锐捷"))
            if (cmbHCusName.Text.Contains("锐捷"))
            {
                HBarCodeType = "锐捷标签";
            }
WarM/ÌõÂë´òÓ¡/Gy_CusBarCodeBill_KaiBei_LangChao.cs
@@ -65,9 +65,10 @@
        public const Int16 HEXPPERIODCol = 43;
        public const Int16 HLSHCol = 44;
        public const Int16 HBaNoCol = 45;
        public const Int16 HCusModelCol = 46;
        //
        public  string ModName = "85";
        public  string ModCaption = "浪潮、元脑客户标签生成";
        public  string ModCaption = "浪潮、元脑、顺达客户标签生成";
        public const string ModRightName = "Gy_CusBarCodeBill_KaiBei_LangChao";
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
@@ -79,7 +80,7 @@
        public int selectRow = 0;
        public Int64 HInterID = 0;      //内码
        public Int64 HOrgID = ClsPub.HOrgID;
        public string HCusModel = "Z";     //厂商代码
        public string HCS = "Z";           //厂商代码
        public string sDate = "";          //日期
        public string sYear = "";          //年(2位)
        public string sYear4 = "";         //年(4位)
@@ -580,7 +581,7 @@
                string HCode2 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode2Col].Value);                 // æ‰¹æ¬¡ä½
                HCode2 = HCode2.ToUpper();
                string HCode3 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value);                 // ç‰ˆæœ¬å·
                string HBatchNoNumber = HCode1 + sYear + sPeriod + sDay + HCusModel;                                // æ‰¹æ¬¡ç”Ÿæˆå‰ç¼€
                string HBatchNoNumber = HCode1 + sYear + sPeriod + sDay + HCS;                                      // æ‰¹æ¬¡ç”Ÿæˆå‰ç¼€
                HBatchNoNumber = HBatchNoNumber.ToUpper();
                string HBarCodeType = cmbHCusName.Text;                                                             // æ¡ç ç±»åž‹
                string HInnerBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HInnerBillNoCol].Value);     // å®¢æˆ·è®¢å•号
@@ -663,6 +664,7 @@
            {
                string TM = "";             //条码
                int LSHlen = 4;             //流水号长度
                int LWSHlen = 5;            //外箱流水号长度
                double HSumQty = 0;         //产品数量
                double HMinQty = 0;         //内箱最小包装数
                int HBQty = 0;              //内箱数
@@ -687,6 +689,7 @@
                double HQty = 0;            //数量
                Int64 HCusID = 0;           //客户ID
                string HCusModelName = "";  //客户料号
                string HCusModel = "";      //客户物料名称
                bool HGiveAwayFlag = false; //赠品标记
                string HProduceDate;        //生产日期(保质期用)
                string HExpiryDate;         //保质期至(保质期用)
@@ -730,7 +733,7 @@
                        string sHCode1 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode1Col].Value);                 // ç‰©æ–™ç±»åˆ«
                        string sHCode2 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode2Col].Value);                 // æ‰¹æ¬¡ä½
                        sHCode2 = sHCode2.ToUpper();
                        string HBatchNoNumber = sHCode1 + sYear + sPeriod + sDay + HCusModel;                                // æ‰¹æ¬¡ç”Ÿæˆå‰ç¼€
                        string HBatchNoNumber = sHCode1 + sYear + sPeriod + sDay + HCS;                                      // æ‰¹æ¬¡ç”Ÿæˆå‰ç¼€
                        HBatchNoNumber = HBatchNoNumber.ToUpper();
                        DataSet oDsBatchNo = oCn.RunProcReturn("exec h_p_Gy_CusBarCodeBill_KaiBeiLC_GetBatchNo '" + sHSourceBillNo + "'," + sHMaterID.ToString() + ",'" + sHMaterNumber + "','" + sHCusModelName + "','" + sHCode2 + "','" + HBatchNoNumber + "'", "h_p_Gy_CusBarCodeBill_KaiBeiLC_GetBatchNo");
@@ -797,6 +800,10 @@
                            {
                                HBarCodeType = "元脑内箱码";
                            }
                            else if (cmbHCusName.Text.Contains("顺达"))
                            {
                                HBarCodeType = "顺达内箱码";
                            }
                            else
                            {
                                HBarCodeType = "内箱码";
@@ -807,6 +814,7 @@
                            HQty = HMinQty;
                            HCusID = ClsPub.isLong(cmbHCusName.SelectedValue);
                            HCusModelName = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelNameCol].Value);
                            HCusModel = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelCol].Value);
                            HGiveAwayFlag = ClsPub.isBool(grdMain.Rows[j].Cells[HGiveAwayFlagCol].Value);
                            HISKFPERIOD = ClsPub.isBool(grdMain.Rows[j].Cells[HISKFPERIODCol].Value);
                            HProduceDate = ClsPub.isStrNull(grdMain.Rows[j].Cells[HProduceDateCol].Value);
@@ -824,11 +832,11 @@
                            HCode2 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode2Col].Value).ToUpper();
                            HCode3 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value).ToUpper();
                            HSno = LSH;
                            HBoxNo = HCode1 + sYear + sPeriod + sDay + HCusModel;
                            HBoxNo = HCode1 + sYear + sPeriod + sDay + HCS;
                            HBoxNo = HBoxNo.ToUpper();
                            sHBaNo = ClsPub.isStrNull(grdMain.Rows[j].Cells[HBaNoCol].Value);                        // ç•Œé¢ä¸Šè¾“入的批次位
                            //客户料号HCusModelName、物料类别HCode1、批次位HCode2、版本号HCode3、批次序列号HSno、批次生成前缀HBoxNo、厂商代码HCusModel
                            //客户料号HCusModelName、物料类别HCode1、批次位HCode2、版本号HCode3、批次序列号HSno、批次生成前缀HBoxNo、客户物料名称HCusModel
                            //界面上输入的批次位HSupName、36进制批次序列号HSupNumber、客户订单号HInnerBillNo、年周HWorkLineName
                            oCn.RunProc("insert into Gy_BarCodeBill_Cus" +
                                    "(HInterID,HEntryID,HBillType,HBarCode,HBarCodeType" +
@@ -870,6 +878,7 @@
                        HCode3 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value);
                        if (cmbHCusName.Text.Contains("元脑"))
                        {
                            LWSHlen = 5;
                            HBarCodeType = "元脑外箱码";
                            //获取最大流水号
                            //条码前缀 = 'CA'+年周
@@ -877,12 +886,23 @@
                            Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                            LWSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                        }
                        else if (cmbHCusName.Text.Contains("顺达"))
                        {
                            LWSHlen = 6;
                            HBarCodeType = "顺达外箱码";
                            //获取最大流水号
                            //条码前缀 = 'B103288'+年周
                            sTMNumber = "B103288" + sYearWeek;
                            Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                            LWSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                        }
                        else
                        {
                            LWSHlen = 5;
                            HBarCodeType = "外箱码";
                            //获取最大流水号
                            //条码前缀 = ä¾›åº”商代码 + å¹´ + æœˆ + æ—¥
                            sTMNumber = HCusModel + sYear4 + sPeriod2 + sDay;
                            sTMNumber = HCS + sYear4 + sPeriod2 + sDay;
                            Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                            LWSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
                        }
@@ -905,7 +925,7 @@
                            //
                            LWSH = LWSH + 1;
                            LSH2 = LWSH.ToString();
                            while (LSH2.Length < 5)  //如果流水号位数小于 5 å‰é¢è¡¥0
                            while (LSH2.Length < LWSHlen)  //如果外箱流水号位数小于 å¤–箱流水号长度 å‰é¢è¡¥0
                            {
                                LSH2 = "0" + LSH2;
                            }
@@ -919,6 +939,7 @@
                            HQty = HWMinQty;
                            HCusID = ClsPub.isLong(cmbHCusName.SelectedValue);
                            HCusModelName = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelNameCol].Value);
                            HCusModel = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelCol].Value);
                            HGiveAwayFlag = ClsPub.isBool(grdMain.Rows[j].Cells[HGiveAwayFlagCol].Value);
                            HISKFPERIOD = ClsPub.isBool(grdMain.Rows[j].Cells[HISKFPERIODCol].Value);
                            HProduceDate = ClsPub.isStrNull(grdMain.Rows[j].Cells[HProduceDateCol].Value);
@@ -936,11 +957,11 @@
                            HCode2 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode2Col].Value).ToUpper();
                            HCode3 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value).ToUpper();
                            HSno = 0;
                            HBoxNo = HCode1 + sYear + sPeriod + sDay + HCusModel;
                            HBoxNo = HCode1 + sYear + sPeriod + sDay + HCS;
                            HBoxNo = HBoxNo.ToUpper();
                            sHBaNo = ClsPub.isStrNull(grdMain.Rows[j].Cells[HBaNoCol].Value);                        // ç•Œé¢ä¸Šè¾“入的批次位
                            //客户料号HCusModelName、物料类别HCode1、批次位HCode2、版本号HCode3、批次序列号HSno、批次生成前缀HBoxNo、厂商代码HCusModel
                            //客户料号HCusModelName、物料类别HCode1、批次位HCode2、版本号HCode3、批次序列号HSno、批次生成前缀HBoxNo、客户物料名称HCusModel
                            //界面上输入的批次位HSupName、36进制批次序列号HSupNumber、客户订单号HInnerBillNo、年周HWorkLineName
                            oCn.RunProc("insert into Gy_BarCodeBill_Cus" +
                                    "(HInterID,HEntryID,HBillType,HBarCode,HBarCodeType" +
@@ -993,7 +1014,7 @@
        private void Display()
        {
            //刷新内箱码列表
            DataSet DSet = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill_CusList where HInterID=" + HInterID.ToString() + " and (条码类型='内箱码' or æ¡ç ç±»åž‹='元脑内箱码') order by HItemID", "h_v_Gy_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo);
            DataSet DSet = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill_CusList where HInterID=" + HInterID.ToString() + " and (条码类型='内箱码' or æ¡ç ç±»åž‹='元脑内箱码' or æ¡ç ç±»åž‹='顺达内箱码') order by HItemID", "h_v_Gy_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo);
            //生成首行标题
            if (DSet == null)
            {
@@ -1004,7 +1025,7 @@
            grdSub.DataSource = DSet.Tables[0].DefaultView;
            //刷新外箱码列表
            DataSet DWSet = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill_CusList where HInterID=" + HInterID.ToString() + " and (条码类型='外箱码' or æ¡ç ç±»åž‹='元脑外箱码') order by HItemID", "h_v_Gy_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo);
            DataSet DWSet = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill_CusList where HInterID=" + HInterID.ToString() + " and (条码类型='外箱码' or æ¡ç ç±»åž‹='元脑外箱码' or æ¡ç ç±»åž‹='顺达外箱码') order by HItemID", "h_v_Gy_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo);
            //生成首行标题
            if (DWSet == null)
            {
@@ -1064,7 +1085,7 @@
        private void initGrid()
        {
            grdMain.RowCount = 0;
            grdMain.ColumnCount = 46;                       //总列数
            grdMain.ColumnCount = 47;                       //总列数
            DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
            grdMain.Columns[HSnoCol].HeaderText = "序号";
            grdMain.Columns[HMainIDCol].HeaderText = "源单主ID";
@@ -1076,6 +1097,7 @@
            grdMain.Columns[HMaterNameCol].HeaderText = "物料名称";
            grdMain.Columns[HMaterModelCol].HeaderText = "规格型号";
            grdMain.Columns[HCusModelNameCol].HeaderText = "客户料号";
            grdMain.Columns[HCusModelCol].HeaderText = "客户物料名称";
            grdMain.Columns[HUnitIDCol].HeaderText = "计量单位ID";
            grdMain.Columns[HUnitNumberCol].HeaderText = "计量单位代码";
            grdMain.Columns[HUnitNameCol].HeaderText = "计量单位名称";
@@ -1892,10 +1914,12 @@
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        grdMain.Rows[j].Cells[HCusModelNameCol].Value = "";
                        grdMain.Rows[j].Cells[HCusModelCol].Value = "";
                    }
                    else
                    {
                        grdMain.Rows[j].Cells[HCusModelNameCol].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCusRelationNumber"]);
                        grdMain.Rows[j].Cells[HCusModelCol].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCusRelationName"]);
                        if (num == 2)
                        {
                            grdMain.Rows[j].Cells[HCode1Col].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCode1"]);
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -381,7 +381,7 @@
            {
                Int64 HWhID = 0;
                HWhID = DBUtility.ClsPub.isLong(HBarCode.Replace("HWH", ""));
                ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HSPFlag from Gy_Warehouse with(nolock) where HStopflag=0 and HItemID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Warehouse");
                ds = oCn.RunProcReturn("exec h_p_Gy_Warehouse_PDA " + HWhID.ToString() + "," + HStockOrgID.ToString(), "h_p_Gy_Warehouse_PDA");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
@@ -409,6 +409,44 @@
            }
        }
        /// <summary>
        /// èŽ·å–PDA仓库列表信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetWarehouseList_Json")]
        [HttpGet]
        public object GetWarehouseList_Json(string Warehouse, Int64 HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_Gy_WarehouseList_PDA '" + Warehouse + "'," + HStockOrgID.ToString(), "h_p_Gy_WarehouseList_PDA");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何仓库记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "返回仓库信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ä»“位资料