凯贝紫光华智客户条码内箱、外箱条码规则变更;联想客户条码8S码、外箱、栈板码流水号获取变更,增加尾箱栈板毛重输入列
2个文件已修改
119 ■■■■■ 已修改文件
WarM/条码打印/Gy_CusBarCodeBill_KaiBei_HuaSan.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_CusBarCodeBill_KaiBei_LianXiang.cs 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/ÌõÂë´òÓ¡/Gy_CusBarCodeBill_KaiBei_HuaSan.cs
@@ -678,8 +678,18 @@
                        HMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNumberCol].Value);    // ç‰©æ–™ä»£ç 
                        HCode3 = HMaterNumber.Substring(HMaterNumber.Length - 2, 2);  //版本  å–物料代码后两位
                        //条码前缀 = ç‰©æ–™è§„格型号+供应商代码(固定'151091')+年月日(YYMMDD)
                        sTMNumber = HMaterModel + "151091" + sYear + sPeriod2 + sDay;
                        if (cmbHCusName.Text.Contains("紫光华智"))
                        {
                            //条码前缀 = ç‰©æ–™è§„格型号+供应商代码(固定'151003')+年月日(YYMMDD)
                            sTMNumber = HMaterModel + "151003" + sYear + sPeriod2 + sDay;
                        }
                        //新华三、东方通信、统合
                        else
                        {
                            //条码前缀 = ç‰©æ–™è§„格型号+供应商代码(固定'151091')+年月日(YYMMDD)
                            sTMNumber = HMaterModel + "151091" + sYear + sPeriod2 + sDay;
                        }
                        Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                        LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
@@ -705,7 +715,7 @@
                            {
                                LSH2 = "0" + LSH2;
                            }
                            //条码编号 = 8位物料规格型号 + 6位供应商代码(固定'151091')+ 6位年月日(YYMMDD)+ 2位版本 + 1位工厂(固定'0')+ 5位流水号
                            //条码编号 = æ¡ç å‰ç¼€ + 2位版本 + 1位工厂(固定'0')+ 5位流水号
                            TM = sTMNumber + HCode3 + "0" + LSH2;
                            HEntryID = j + 1;
@@ -807,7 +817,13 @@
                            //条码前缀 = 2位固定码('09') + CPN客户编码(规格型号)+ 2位预留码(固定'01')+ 5位年年月日日(YYMDD) + 3位09码流水号(固定'001') + ä¾›åº”商代码(固定'105652')
                            sWTMNumber = "09" + HMaterModel + "01" + sYear + sPeriod + sDay + "001105652";
                        }
                        //新华三、统合、紫光华智
                        //紫光华智
                        else if (cmbHCusName.Text.Contains("紫光华智"))
                        {
                            //条码前缀 = 2位固定码('09') + CPN客户编码(规格型号)+ 2位预留码(固定'01')+ 5位年年月日日(YYMDD) + 3位09码流水号(固定'001') + ä¾›åº”商代码(固定'151003')
                            sWTMNumber = "09" + HMaterModel + "01" + sYear + sPeriod + sDay + "001151003";
                        }
                        //新华三、统合
                        else
                        {
                            //条码前缀 = 2位固定码('09') + CPN客户编码(规格型号)+ 2位预留码(固定'01')+ 5位年年月日日(YYMDD) + 3位09码流水号(固定'001') + ä¾›åº”商代码(固定'151091')
@@ -839,7 +855,7 @@
                                LSH2 = "0" + LSH2;
                            }
                            //条码编号 = 2位固定码('09') + CPN客户编码(规格型号)+ 2位预留码(固定'01')+ 5位年年月日日(YYMDD) + 3位09码流水号(固定'001') + ä¾›åº”商代码(固定'151091')+ 3位流水号
                            //条码编号 = æ¡ç å‰ç¼€ + 3位流水号
                            TM = sWTMNumber + LSH2;
                            HEntryID = j + 1;
WarM/ÌõÂë´òÓ¡/Gy_CusBarCodeBill_KaiBei_LianXiang.cs
@@ -55,27 +55,29 @@
        public const Int16 HWMinQtyCol = 33;
        public const Int16 HWBQtyCol = 34;
        public const Int16 HCustomQty1Col = 35;
        public const Int16 HZMinQtyCol = 36;
        public const Int16 HZBQtyCol = 37;
        public const Int16 HCustomQty2Col = 38;
        public const Int16 HProduceDateCol = 39;
        public const Int16 HExpiryDateCol = 40;
        public const Int16 HCusIDCol = 41;
        public const Int16 HCusNumberCol = 42;
        public const Int16 HCusNameCol = 43;
        public const Int16 HSourceInterIDCol = 44;
        public const Int16 HSourceEntryIDCol = 45;
        public const Int16 HSourceBillNoCol = 46;
        public const Int16 HSourceBillTypeCol = 47;
        public const Int16 HInitQtyCol = 48;
        public const Int16 HMTONoCol = 49;
        public const Int16 HISKFPERIODCol = 50;
        public const Int16 HEXPUNITCol = 51;
        public const Int16 HEXPPERIODCol = 52;
        public const Int16 HLSHCol = 53;
        public const Int16 HBaNoCol = 54;
        public const Int16 HCusModelCol = 55;
        public const Int16 HRemarkCol = 56;
        public const Int16 HCustomQty3Col = 36;
        public const Int16 HZMinQtyCol = 37;
        public const Int16 HZBQtyCol = 38;
        public const Int16 HCustomQty2Col = 39;
        public const Int16 HCustomQty4Col = 40;
        public const Int16 HProduceDateCol = 41;
        public const Int16 HExpiryDateCol = 42;
        public const Int16 HCusIDCol = 43;
        public const Int16 HCusNumberCol = 44;
        public const Int16 HCusNameCol = 45;
        public const Int16 HSourceInterIDCol = 46;
        public const Int16 HSourceEntryIDCol = 47;
        public const Int16 HSourceBillNoCol = 48;
        public const Int16 HSourceBillTypeCol = 49;
        public const Int16 HInitQtyCol = 50;
        public const Int16 HMTONoCol = 51;
        public const Int16 HISKFPERIODCol = 52;
        public const Int16 HEXPUNITCol = 53;
        public const Int16 HEXPPERIODCol = 54;
        public const Int16 HLSHCol = 55;
        public const Int16 HBaNoCol = 56;
        public const Int16 HCusModelCol = 57;
        public const Int16 HRemarkCol = 58;
        //
        public  string ModName = "85";
        public  string ModCaption = "联想客户标签生成";
@@ -783,6 +785,7 @@
                string HCustom6 = "";       //成品料号
                double HCustomQty1 = 0;     //整箱毛重
                double HCustomQty2 = 0;     //整栈毛重
                string HWei = "";           //尾箱/尾栈标记
                Int64 HSno = 0;             //批次序列号
                string HBoxNo = "";         //批次生成前缀
                string sHBaNo = "";         //界面上输入的批次位
@@ -831,7 +834,7 @@
                            }
                            //
                            LSH = LSH + 1;
                            LSH2 = ConvertToBase(ClsPub.isInt(LSH), 33);
                            LSH2 = ConvertToBase(ClsPub.isInt(LSH), 32);
                            while (LSH2.Length < LSHlen)  //如果流水号位数小于 LSHlen å‰é¢è¡¥0
                            {
                                LSH2 = "0" + LSH2;
@@ -934,17 +937,28 @@
                        nn = 0;     //本次流水号累计使用个数
                        for (int i = 0; i < HWBQty; i++)
                        {
                            if (HSumQty - HWMinQty > 0)
                            if (HSumQty - HWMinQty >= 0)
                            {
                                HWei = "";
                                HSumQty = HSumQty - HWMinQty;
                                HCustomQty1 = ClsPub.isDoule(grdMain.Rows[j].Cells[HCustomQty1Col].Value);               // æ•´ç®±æ¯›é‡    ç•Œé¢ä¸Šè¾“å…¥
                            }
                            else
                            {
                                HWei = "尾数";
                                HWMinQty = HSumQty;
                                HCustomQty1 = ClsPub.isDoule(grdMain.Rows[j].Cells[HCustomQty3Col].Value);               // å°¾ç®±æ¯›é‡    ç•Œé¢ä¸Šè¾“å…¥
                                if (HCustomQty1 <= 0)
                                {
                                    MessageBox.Show("第 " + ClsPub.isStrNull(grdMain.Rows[j].Cells[HSnoCol].Value) + " è¡Œç‰©æ–™ï¼Œå°¾ç®±æ¯›é‡ä¸å…è®¸å°äºŽ 0 ï¼");
                                    bc.Enabled = true;
                                    oCn.RollBack();
                                    return;
                                }
                            }
                            //
                            LWSH = LWSH + 1;
                            LSH2 = ConvertToBase(ClsPub.isInt(LWSH), 33);
                            LSH2 = LWSH.ToString();
                            while (LSH2.Length < LWSHlen)  //如果外箱流水号位数小于 å¤–箱流水号长度 å‰é¢è¡¥0
                            {
                                LSH2 = "0" + LSH2;
@@ -987,7 +1001,6 @@
                            HCustom4 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCustom4Col].Value);                   // FRU ç•Œé¢ä¸Šè¾“å…¥
                            HCustom5 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCustom5Col].Value);                   // EC  ç•Œé¢ä¸Šè¾“å…¥
                            HCustom6 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCustom6Col].Value);                   // æˆå“æ–™å·    ç•Œé¢ä¸Šè¾“å…¥
                            HCustomQty1 = ClsPub.isDoule(grdMain.Rows[j].Cells[HCustomQty1Col].Value);               // æ•´ç®±æ¯›é‡    ç•Œé¢ä¸Šè¾“å…¥
                            HCustomQty2 = ClsPub.isDoule(grdMain.Rows[j].Cells[HCustomQty2Col].Value);               // æ•´æ ˆæ¯›é‡    ç•Œé¢ä¸Šè¾“å…¥
                            //FRU HCustom4、EC HCustom5、成品料号 HCustom6、整箱毛重HCustomQty1、整栈毛重HCustomQty2
@@ -1009,7 +1022,7 @@
                                    ") values (" + HInterID + "," + HEntryID + ",'','" + HBarCode + "','" + HBarCodeType + "'"
                                    + "," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HAuxPropID.ToString() + ",'" + HBatchNo + "'," + HQty.ToString()
                                    + "," + HCusID.ToString() + ",'" + HCusModel + "','" + HCusModelName + "','" + sDate + "',''"
                                    + "," + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + DBUtility.ClsPub.BoolToString(HISKFPERIOD) + ",''"
                                    + "," + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + DBUtility.ClsPub.BoolToString(HISKFPERIOD) + ",'" + HWei + "'"
                                    + "," + (HProduceDate == "" ? "NULL" : "'" + HProduceDate + "'") + "," + (HExpiryDate == "" ? "NULL" : "'" + HExpiryDate + "'")
                                    + "," + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + ",1,0"
                                    + "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "'"
@@ -1048,17 +1061,28 @@
                        nn = 0;     //本次流水号累计使用个数
                        for (int i = 0; i < HZBQty; i++)
                        {
                            if (HSumQty - HZMinQty > 0)
                            if (HSumQty - HZMinQty >= 0)
                            {
                                HWei = "";
                                HSumQty = HSumQty - HZMinQty;
                                HCustomQty2 = ClsPub.isDoule(grdMain.Rows[j].Cells[HCustomQty2Col].Value);               // æ•´æ ˆæ¯›é‡    ç•Œé¢ä¸Šè¾“å…¥
                            }
                            else
                            {
                                HWei = "尾数";
                                HZMinQty = HSumQty;
                                HCustomQty2 = ClsPub.isDoule(grdMain.Rows[j].Cells[HCustomQty4Col].Value);               // å°¾æ ˆæ¯›é‡    ç•Œé¢ä¸Šè¾“å…¥
                                if (HCustomQty2 <= 0)
                                {
                                    MessageBox.Show("第 "+ClsPub.isStrNull(grdMain.Rows[j].Cells[HSnoCol].Value)+" è¡Œç‰©æ–™ï¼Œå°¾æ ˆæ¯›é‡ä¸å…è®¸å°äºŽ 0 ï¼");
                                    bc.Enabled = true;
                                    oCn.RollBack();
                                    return;
                                }
                            }
                            //
                            LZSH = LZSH + 1;
                            LSH2 = ConvertToBase(ClsPub.isInt(LZSH), 33);
                            LSH2 = LZSH.ToString();
                            while (LSH2.Length < LWSHlen)  //如果外箱流水号位数小于 å¤–箱流水号长度 å‰é¢è¡¥0
                            {
                                LSH2 = "0" + LSH2;
@@ -1102,7 +1126,6 @@
                            HCustom5 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCustom5Col].Value);                   // EC  ç•Œé¢ä¸Šè¾“å…¥
                            HCustom6 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCustom6Col].Value);                   // æˆå“æ–™å·    ç•Œé¢ä¸Šè¾“å…¥
                            HCustomQty1 = ClsPub.isDoule(grdMain.Rows[j].Cells[HCustomQty1Col].Value);               // æ•´ç®±æ¯›é‡    ç•Œé¢ä¸Šè¾“å…¥
                            HCustomQty2 = ClsPub.isDoule(grdMain.Rows[j].Cells[HCustomQty2Col].Value);               // æ•´æ ˆæ¯›é‡    ç•Œé¢ä¸Šè¾“å…¥
                            //FRU HCustom4、EC HCustom5、成品料号 HCustom6、整箱毛重HCustomQty1、整栈毛重HCustomQty2
                            oCn.RunProc("insert into Gy_BarCodeBill_Cus" +
@@ -1123,7 +1146,7 @@
                                    ") values (" + HInterID + "," + HEntryID + ",'','" + HBarCode + "','" + HBarCodeType + "'"
                                    + "," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HAuxPropID.ToString() + ",'" + HBatchNo + "'," + HQty.ToString()
                                    + "," + HCusID.ToString() + ",'" + HCusModel + "','" + HCusModelName + "','" + sDate + "',''"
                                    + "," + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + DBUtility.ClsPub.BoolToString(HISKFPERIOD) + ",''"
                                    + "," + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + DBUtility.ClsPub.BoolToString(HISKFPERIOD) + ",'" + HWei + "'"
                                    + "," + (HProduceDate == "" ? "NULL" : "'" + HProduceDate + "'") + "," + (HExpiryDate == "" ? "NULL" : "'" + HExpiryDate + "'")
                                    + "," + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + ",1,0"
                                    + "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "'"
@@ -1221,7 +1244,7 @@
        #region  å°†åè¿›åˆ¶æ•°å€¼è½¬æˆæŒ‡å®šè¿›åˆ¶æ•°å€¼ï¼ˆnum为要转换的十进行数值,nbase为指定进制)
        public string ConvertToBase(int num, int nbase)
        {
            string chars = "0123456789ABCDEFGHJKLMNPQRSTVWXYZ";
            string chars = "0123456789ABCDEFGHJKLMNPRSTVWXYZ";  //数字+字母组合,字母不包含IOQU
            if (nbase < 2 || nbase > chars.Length)
                return "";
            int r;
@@ -1246,7 +1269,7 @@
        private void initGrid()
        {
            grdMain.RowCount = 0;
            grdMain.ColumnCount = 57;                       //总列数
            grdMain.ColumnCount = 59;                       //总列数
            DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
            grdMain.Columns[HSnoCol].HeaderText = "序号";
            grdMain.Columns[HMainIDCol].HeaderText = "源单主ID";
@@ -1297,6 +1320,8 @@
            grdMain.Columns[HCustom6Col].HeaderText = "成品料号";
            grdMain.Columns[HCustomQty1Col].HeaderText = "整箱毛重";
            grdMain.Columns[HCustomQty2Col].HeaderText = "整栈毛重";
            grdMain.Columns[HCustomQty3Col].HeaderText = "尾箱毛重";
            grdMain.Columns[HCustomQty4Col].HeaderText = "尾栈毛重";
            //格式化   éšè—åˆ—
            grdMain.Columns[HTagCol].Visible = false;
@@ -1355,6 +1380,8 @@
                                "," + HCustom6Col.ToString() +
                                "," + HCustomQty1Col.ToString() +
                                "," + HCustomQty2Col.ToString() +
                                "," + HCustomQty3Col.ToString() +
                                "," + HCustomQty4Col.ToString() +
                                "," + HRemarkCol.ToString();
            //设置合计列
@@ -1811,6 +1838,8 @@
                                "," + HCustom6Col.ToString() +
                                "," + HCustomQty1Col.ToString() +
                                "," + HCustomQty2Col.ToString() +
                                "," + HCustomQty3Col.ToString() +
                                "," + HCustomQty4Col.ToString() +
                                "," + HRemarkCol.ToString();
            grdMain.Columns[HBillNoCol].ReadOnly = true;
            //设置合计列