雅琪诺MES智能条码管理系统
zgq
2021-01-12 14fbc3da54fb7254940d65c574f16ed76dc9afa8
在线裁切增加批次和条码后缀二等品CP和样本品B
1个文件已修改
73 ■■■■ 已修改文件
SCM/单据资料/Sc_ICMOReportToBarCode.cs 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/µ¥¾Ý×ÊÁÏ/Sc_ICMOReportToBarCode.cs
@@ -539,12 +539,26 @@
                sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString();
                sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
                sDay = "0" + ClsPub.isDate(sDate).Day.ToString();
                sDay = sDay.Substring(sDay.Length - 2, 2);
                sDay = sDay.Substring(sDay.Length - 2, 2);
                //条码前缀 = ç»„织代码 + ç‰©æ–™å†…码 + å¹´ + æœˆ + æ—¥
                //sTMNumber = HOrgNumber + HNumber + sYear + sPeriod + sDay;
                //sTMNumber = DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
                //获取最大流水号,降等品加CP后缀以重新生成流水号
                if (sType == "SaveDown")
                {
                    sTMNumber = HNumber + ";" + DBUtility.ClsPub.isStrNull(txtHBatchNo.Text) + "CP";
                }
                else if (sType == "Sample")
                {
                    sTMNumber = HNumber + ";" + DBUtility.ClsPub.isStrNull(txtHBatchNo.Text) + "B";
                }
                else
                {
                    sTMNumber = HNumber + ";" + DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
                }
                //sTMNumber = HNumber + ";" + DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
                //条码前缀 = ç»„织代码 + ç‰©æ–™å†…码 + å¹´ + æœˆ + æ—¥
                //sTMNumber = HOrgNumber + HNumber + sYear + sPeriod + sDay;
                //sTMNumber = DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
                sTMNumber = HNumber + ";" + DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
                Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo  '" + sTMNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//获取最大流水号
                LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
@@ -560,10 +574,24 @@
                while (LSH2.Length < LSHlen)  //如果流水号小于6位数前面补0
                {
                    LSH2 = "0" + LSH2;
                }
                //条码编号 = æ¡ç å‰ç¼€ + æµæ°´å·
                TM = sTMNumber + "-" + LSH2;
                }
                //条码编号 = æ¡ç å‰ç¼€ + æµæ°´å·
                //降等品时增加CP后缀
                string sTMNumberNew = HNumber + ";" + DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
                if (sType == "SaveDown")
                {
                    TM = sTMNumberNew + "CP-" + LSH2;
                }
                else if (sType == "Sample")
                {
                    TM = sTMNumberNew + "B-" + LSH2;
                }
                else
                {
                    TM = sTMNumberNew + "-" + LSH2;
                }
                //TM = sTMNumber + "-" + LSH2;
                HBarCode = TM;
                HBarCodeType = "唯一条码";
@@ -571,13 +599,26 @@
                HMaterID = DBUtility.ClsPub.isLong(txtHMaterName.Tag);
                HAuxPropID = 0;
                HUnitID = DBUtility.ClsPub.isLong(txtHUnitName.Tag);
                HQty2 = HQty;
                HBatchNo2 = HBatchNo;
                //if (HSourceBillType != "生产订单")
                //{
                    //HBatchNo2 = TM;
                HBatchNo2 = HBatchNo + "-" + LSH2;
                //}
                HQty2 = HQty;
                //HBatchNo2 = HBatchNo;
                //if (HSourceBillType != "生产订单")
                //{
                //HBatchNo2 = TM;
                //HBatchNo2 = HBatchNo + "-" + LSH2;
                //判断按钮类型给批次增加后缀
                if (sType == "SaveDown")
                {
                    HBatchNo2 = HBatchNo + "CP-" + LSH2;
                }
                else if (sType == "Sample")
                {
                    HBatchNo2 = HBatchNo + "B-" + LSH2;
                }
                else
                {
                    HBatchNo2 = HBatchNo + "-" + LSH2;
                }
                //}
                //HSourceBillType = HSourceBillTypeID;
                HBarcodeQtys = 0;
                HBarcodeNo = 1;