yxj
2023-09-04 b91e76fb92a673e41938d94fc3daf76586398237
新增比亚迪客户条码生成规则
4个文件已修改
333 ■■■■ 已修改文件
Model/基础资料/ClsGy_Material_Model.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/基础资料/ClsIF_Material_View.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/条码打印/Gy_BarCodeBill_TeSiLa.cs 250 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/条码打印/Gy_BarCodeBill_TeSiLa.designer.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/»ù´¡×ÊÁÏ/ClsGy_Material_Model.cs
@@ -39,6 +39,7 @@
        public Int64 HErpclsID;//        int        --物料属性
        public string HPicNo;//        varchar        --图号
        public string HBarCode;
        public string HCusRelationNumber;   //零部件代码
    }
}
SCM/»ù´¡×ÊÁÏ/ClsIF_Material_View.cs
@@ -323,6 +323,78 @@
            }
        }
        /// <summary>
        /// æ¯”亚迪标签获取物料
        /// </summary>
        /// <returns></returns>
        public virtual bool RefreshViewForBYD(string sLike)
        {
            try
            {//
                oWeb.Url = ClsPub1.WEBSURL;
                SCM.frmHlpInfo_View ofrm = new SCM.frmHlpInfo_View();
                //
                string SQLName2 = "Select HItemID,HNumber ç‰©æ–™ä»£ç ,HName ç‰©æ–™åç§°,HModel è§„格型号,HCusRelationNumber é›¶éƒ¨ä»¶ä»£ç ,HUnitID,HUnitNumber å•位代码,HUnitName è®¡é‡å•位,HMinPickQty æœ€å°åŒ…装数 from h_v_IF_Material_BYD ";
                string sSQL = SQLName2 + SQLWhere + sLike + SQLOrder;
                //编辑ofrm
                ofrm.sTitle = MvarReportTitle;
                ofrm.sBill = "h_v_IF_Material_BYD";
                ofrm.txtFindInfo.Text = WherePart;
                //
                DataSet Ds;
                Ds = oWeb.getDataSetBySQL(sSQL, MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
                //oCn.RunProcReturn(sSQL, MvarItemKey);
                if (Ds == null || Ds.Tables[0].Rows.Count == 0)
                {
                    return false;
                }
                //绑定
                ofrm.grdShow.DataSource = Ds.Tables[0].DefaultView;
                Ds.Dispose();
                Ds = null;
                ofrm.grdShow.SuspendLayout();
                ofrm.grdShow.Columns[0].Visible = false;
                ofrm.ShowDialog();
                //得到对应列
                int HItemIDCol = 0;
                int HNumberCol = 1;
                int HNameCol = 2;
                int HModelCol = 3;
                //
                if (ofrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
                {
                    if (ofrm.grdShow.CurrentRow == null)
                    {
                        return false;
                    }
                    this.omodel.HItemID = Pub_Class.ClsPub.isLong(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[0].Value);
                    this.omodel.HNumber = DBUtility.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[1].Value);
                    this.omodel.HName = DBUtility.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[2].Value);
                    this.omodel.HModel = DBUtility.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[3].Value);
                    this.omodel.HCusRelationNumber = DBUtility.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[4].Value);
                    this.omodel.HUnitID = DBUtility.ClsPub.isLong(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[5].Value.ToString());
                    this.omodel.HUnitNumber = DBUtility.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[6].Value);
                    this.omodel.HUnitName = DBUtility.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[7].Value);
                    this.omodel.HQtyMin = DBUtility.ClsPub.isLong(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[8].Value.ToString());
                }
                else
                {
                    return false;
                }
                //
                ofrm.Dispose();
                ofrm = null;
                //
                return true;
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //审核代码合理性
        public  bool AllowNumber(string sCode)
SCM/ÌõÂë´òÓ¡/Gy_BarCodeBill_TeSiLa.cs
@@ -198,6 +198,7 @@
            cmbSourceBillType.Items.Clear();
            cmbHBarCodeType.Items.Add("特斯拉客户条码");
            cmbHBarCodeType.Items.Add("比亚迪客户条码");
            cmbHBarCodeType.SelectedIndex = 0;
            cmbSourceBillType.Items.Add("生产订单");
            cmbSourceBillType.Items.Add("生产汇报单");
@@ -541,7 +542,7 @@
                    MessageBox.Show(" ç¬¬" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "行,物料:" + ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNameCol].Value) + " ï¼Œä¸­å­˜åœ¨æ•°é‡ã€æœ€å°åŒ…装数、箱数为 0,不允许生成条码!");
                    return false;
                }
                else if (CampanyName == "四维尔")
                else if (cmbHBarCodeType.Text == "特斯拉客户条码")
                {
                    long sHMaterID = 0;
                    sHMaterID = ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value);
@@ -623,7 +624,7 @@
                string LSH2 = "";           //流水号转换成字符
                string sDate = "";          //日期
                string sYear = "";          //å¹´
                string sYear2 = "";         //å¹´
                int sYear2 = 0;             //å¹´
                string sPeriod = "";        //月
                string sDay = "";           //日
                string HBatchNo = "";       //批次
@@ -638,6 +639,7 @@
                string TeSiLaTMDate = "";   //特斯拉条码生成日期
                string HProduceDate = "";   //生产日期
                string HExpiryDate = "";    //失效日期
                string HBYDModel = "";      //零部件代码
                DataSet Ds;
                pb1.Value = 0;
                for (int j = 0; j < grdMain.Rows.Count; j++)
@@ -649,7 +651,7 @@
                        HBatchNo = ClsPub.isStrNull(grdMain.Rows[j].Cells[HBatchNoCol].Value);
                        sDate = dtpHDate.Value.ToShortDateString();
                        sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2);
                        sYear2 = ClsPub.isDate(sDate).Year.ToString();
                        sYear2 = ClsPub.isDate(sDate).Year;
                        sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString();
                        sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
                        sDay = "0" + ClsPub.isDate(sDate).Day.ToString();
@@ -686,6 +688,83 @@
                            HNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNumberCol].Value);
                            HProduceDate = DateTime.Now.ToString("yyyyMMdd");
                            HExpiryDate = DateTime.Now.AddYears(2).ToString("yyyyMMdd");
                        }
                        else if (cmbHBarCodeType.Text == "比亚迪客户条码")
                        {
                            LSHlen = 5;             //流水号长度
                            HBYDModel = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HModelCol].Value);
                            HModel = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HModelCol].Value);
                            int HBYDModelbyteLen = System.Text.Encoding.Default.GetByteCount(HBYDModel);
                            if (HBYDModelbyteLen <= 0)
                            {
                                MessageBox.Show("零部件代码不能为空!");
                                return;
                            }
                            //获取年份对应代码
                            if (sYear2 <2011)
                            {
                                MessageBox.Show("所选日期年份不能小于2011å¹´!");
                                return;
                            }
                            else
                            {
                                sYear = ConvertToYear(sYear2 - 2011);
                            }
                            //获取月份对应代码
                            switch (sPeriod)
                            {
                                case "01":
                                    sPeriod = "1";
                                    break;
                                case "02":
                                    sPeriod = "2";
                                    break;
                                case "03":
                                    sPeriod = "3";
                                    break;
                                case "04":
                                    sPeriod = "4";
                                    break;
                                case "05":
                                    sPeriod = "5";
                                    break;
                                case "06":
                                    sPeriod = "6";
                                    break;
                                case "07":
                                    sPeriod = "7";
                                    break;
                                case "08":
                                    sPeriod = "8";
                                    break;
                                case "09":
                                    sPeriod = "9";
                                    break;
                                case "10":
                                    sPeriod = "0";
                                    break;
                                case "11":
                                    sPeriod = "A";
                                    break;
                                case "12":
                                    sPeriod = "B";
                                    break;
                                default:
                                    sPeriod = "";
                                    break;
                            }
                            if (sPeriod == "")
                            {
                                MessageBox.Show("错误的月份!");
                                return;
                            }
                            //比亚迪条码编码规则 = 6位供应商代码固定(127035)+ 4位零部件代码+ 4位生产日期代码+ 5位生产序列号(流水号)
                            sTMNumber = "127035" + HBYDModel + sYear + sPeriod + sDay;
                            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]);
                        }
                        else
                        {
@@ -741,9 +820,6 @@
                            if (cmbHBarCodeType.Text == "特斯拉客户条码")
                            {
                                //条码编号 = æ¡ç å‰ç¼€ + æµæ°´å·
                                TM = sTMNumber + LSH2;
                                //特斯拉条码规则   3SC4I + æ•°é‡ï¼ˆ6位,不足前面0补齐) + æ¡ç å¼ æ•°ï¼ˆ001开始,36进制) + ç”Ÿäº§æ—¥æœŸï¼ˆä»Ž2017å¹´7月1日开始计算,从000开始,36进制) + è§„格型号(字符串中去除‘-’,截取‘()’前字符串)
                                //获取条码数量,不足6位前面0补齐
                                string sQty = "";           //数量转换成字符
@@ -776,6 +852,8 @@
                                CusTM = "[)>+06:" + TeSiLaTM + ":V170474:P" + HModel + ":1P" + HNumber + ":Q" + sQty + ":6D" + HProduceDate + ":14D" + HExpiryDate + ":T:1T" + HBatchNo + ":13E+#";
                            }
                            //条码编号 = æ¡ç å‰ç¼€ + æµæ°´å·
                            TM = sTMNumber + LSH2;
                            if (TM.Trim() == "")
                            {
                                MessageBox.Show("条形码不能为空,不能生成条码!");
@@ -937,6 +1015,12 @@
                            HRemark = "特斯拉客户条码";
                            HBarCodeStatus = "";
                        }
                        else if (cmbHBarCodeType.Text == "比亚迪客户条码")
                        {
                            HBarCodeType = "唯一条码";
                            HRemark = "比亚迪客户条码";
                            HBarCodeStatus = "";
                        }
                        else
                        {
                            HBarCodeType = ClsPub.isStrNull(cmbHBarCodeType.Text);
@@ -1083,7 +1167,7 @@
            grdMain.Columns[HMaterNumberCol].HeaderText = "物料代码";
            grdMain.Columns[HMaterNameCol].HeaderText = "物料名称";
            grdMain.Columns[HMaterModelCol].HeaderText = "规格型号";
            grdMain.Columns[HModelCol].HeaderText = "产品型号";
            grdMain.Columns[HModelCol].HeaderText = "零部件代码";
            grdMain.Columns[HPinfanCol].HeaderText = "品番";
            grdMain.Columns[HPinfanBarCodeCol].HeaderText = "HPinfanBarCode";
            grdMain.Columns[HAuxPropIDCol].HeaderText = "辅助属性ID";
@@ -1149,7 +1233,7 @@
            grdMain.Columns[HSubIDCol].Visible = false;
            grdMain.Columns[HBillTypeCol].Visible = false;
            grdMain.Columns[HMaterIDCol].Visible = false;
            grdMain.Columns[HModelCol].Visible = false;
            //grdMain.Columns[HModelCol].Visible = false;
            grdMain.Columns[HAuxPropIDCol].Visible = false;
            grdMain.Columns[HUnitIDCol].Visible = false;
            grdMain.Columns[HUnitNumberCol].Visible = false;
@@ -1549,52 +1633,102 @@
                        switch (sCol)
                        {
                            case HMaterNumberCol:
                                oMater.WherePart = "";
                                sWhere = " and HUSEORGID = " + sHOrgID;
                                if (oMater.RefreshViewForBig(sWhere))
                                if(cmbHBarCodeType.Text == "比亚迪客户条码")
                                {
                                    grdMain.Rows[sRow].Cells[HMaterIDCol].Value = oMater.omodel.HItemID.ToString();
                                    grdMain.Rows[sRow].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber;
                                    grdMain.Rows[sRow].Cells[HMaterNameCol].Value = oMater.omodel.HName;
                                    grdMain.Rows[sRow].Cells[HMaterModelCol].Value = oMater.omodel.HModel;
                                    grdMain.Rows[sRow].Cells[HUnitIDCol].Value = oMater.omodel.HUnitID.ToString();
                                    grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = oMater.omodel.HUnitNumber;
                                    grdMain.Rows[sRow].Cells[HUnitNameCol].Value = oMater.omodel.HUnitName;
                                    grdMain.Rows[sRow].Cells[HMinQtyCol].Value = oMater.omodel.HQtyMin;
                                    grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0;
                                    grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = "";
                                    oEdit.Text = oMater.omodel.HNumber;
                                }
                                else
                                {
                                    grdMain.Rows[sRow].Cells[HMaterIDCol].Value = 0;
                                    grdMain.Rows[sRow].Cells[HMaterNumberCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HMaterNameCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HMaterModelCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HUnitIDCol].Value = 0;
                                    grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HUnitNameCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HMinQtyCol].Value = 0;
                                    grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0;
                                    grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = "";
                                    grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = "";
                                }
                                if (CampanyName == "四维尔") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称
                                {
                                    sHMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[sRow].Cells[HMaterIDCol].Value);
                                    //获取品番
                                    oDs2 = oWeb.getDataSetBySQL("exec h_p_HMaterPinfan " + sHMaterID, "h_p_HMaterPinfan", ref DBUtility.ClsPub.sExeReturnInfo);
                                    //
                                    if (oDs2 != null && oDs2.Tables[0].Rows.Count > 0)
                                    oMater.WherePart = "";
                                    sWhere = " and HUSEORGID = " + sHOrgID;
                                    if (oMater.RefreshViewForBYD(sWhere))
                                    {
                                        grdMain.Rows[sRow].Cells[HPinfanCol].Value = DBUtility.ClsPub.isStrNull(oDs2.Tables[0].Rows[0]["HPinfan"]);
                                        grdMain.Rows[sRow].Cells[HPinfanBarCodeCol].Value = DBUtility.ClsPub.isStrNull(oDs2.Tables[0].Rows[0]["HPinfanBarCode"]);
                                        grdMain.Rows[sRow].Cells[HMaterIDCol].Value = oMater.omodel.HItemID.ToString();
                                        grdMain.Rows[sRow].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber;
                                        grdMain.Rows[sRow].Cells[HMaterNameCol].Value = oMater.omodel.HName;
                                        grdMain.Rows[sRow].Cells[HMaterModelCol].Value = oMater.omodel.HModel;
                                        grdMain.Rows[sRow].Cells[HUnitIDCol].Value = oMater.omodel.HUnitID.ToString();
                                        grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = oMater.omodel.HUnitNumber;
                                        grdMain.Rows[sRow].Cells[HUnitNameCol].Value = oMater.omodel.HUnitName;
                                        grdMain.Rows[sRow].Cells[HMinQtyCol].Value = oMater.omodel.HQtyMin;
                                        grdMain.Rows[sRow].Cells[HModelCol].Value = oMater.omodel.HCusRelationNumber;
                                        oEdit.Text = oMater.omodel.HNumber;
                                    }
                                    else
                                    {
                                        grdMain.Rows[sRow].Cells[HPinfanCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HPinfanBarCodeCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HMaterIDCol].Value = 0;
                                        grdMain.Rows[sRow].Cells[HMaterNumberCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HMaterNameCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HMaterModelCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HUnitIDCol].Value = 0;
                                        grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HUnitNameCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HMinQtyCol].Value = 0;
                                        grdMain.Rows[sRow].Cells[HModelCol].Value = "";
                                    }
                                    if (CampanyName == "四维尔") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称
                                    {
                                        sHMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[sRow].Cells[HMaterIDCol].Value);
                                        //获取品番
                                        oDs2 = oWeb.getDataSetBySQL("exec h_p_HMaterPinfan " + sHMaterID, "h_p_HMaterPinfan", ref DBUtility.ClsPub.sExeReturnInfo);
                                        //
                                        if (oDs2 != null && oDs2.Tables[0].Rows.Count > 0)
                                        {
                                            grdMain.Rows[sRow].Cells[HPinfanCol].Value = DBUtility.ClsPub.isStrNull(oDs2.Tables[0].Rows[0]["HPinfan"]);
                                            grdMain.Rows[sRow].Cells[HPinfanBarCodeCol].Value = DBUtility.ClsPub.isStrNull(oDs2.Tables[0].Rows[0]["HPinfanBarCode"]);
                                        }
                                        else
                                        {
                                            grdMain.Rows[sRow].Cells[HPinfanCol].Value = "";
                                            grdMain.Rows[sRow].Cells[HPinfanBarCodeCol].Value = "";
                                        }
                                    }
                                }
                                else
                                {
                                    oMater.WherePart = "";
                                    sWhere = " and HUSEORGID = " + sHOrgID;
                                    if (oMater.RefreshViewForBig(sWhere))
                                    {
                                        grdMain.Rows[sRow].Cells[HMaterIDCol].Value = oMater.omodel.HItemID.ToString();
                                        grdMain.Rows[sRow].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber;
                                        grdMain.Rows[sRow].Cells[HMaterNameCol].Value = oMater.omodel.HName;
                                        grdMain.Rows[sRow].Cells[HMaterModelCol].Value = oMater.omodel.HModel;
                                        grdMain.Rows[sRow].Cells[HUnitIDCol].Value = oMater.omodel.HUnitID.ToString();
                                        grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = oMater.omodel.HUnitNumber;
                                        grdMain.Rows[sRow].Cells[HUnitNameCol].Value = oMater.omodel.HUnitName;
                                        grdMain.Rows[sRow].Cells[HMinQtyCol].Value = oMater.omodel.HQtyMin;
                                        grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0;
                                        grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = "";
                                        oEdit.Text = oMater.omodel.HNumber;
                                    }
                                    else
                                    {
                                        grdMain.Rows[sRow].Cells[HMaterIDCol].Value = 0;
                                        grdMain.Rows[sRow].Cells[HMaterNumberCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HMaterNameCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HMaterModelCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HUnitIDCol].Value = 0;
                                        grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HUnitNameCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HMinQtyCol].Value = 0;
                                        grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0;
                                        grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = "";
                                        grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = "";
                                    }
                                    if (CampanyName == "四维尔") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称
                                    {
                                        sHMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[sRow].Cells[HMaterIDCol].Value);
                                        //获取品番
                                        oDs2 = oWeb.getDataSetBySQL("exec h_p_HMaterPinfan " + sHMaterID, "h_p_HMaterPinfan", ref DBUtility.ClsPub.sExeReturnInfo);
                                        //
                                        if (oDs2 != null && oDs2.Tables[0].Rows.Count > 0)
                                        {
                                            grdMain.Rows[sRow].Cells[HPinfanCol].Value = DBUtility.ClsPub.isStrNull(oDs2.Tables[0].Rows[0]["HPinfan"]);
                                            grdMain.Rows[sRow].Cells[HPinfanBarCodeCol].Value = DBUtility.ClsPub.isStrNull(oDs2.Tables[0].Rows[0]["HPinfanBarCode"]);
                                        }
                                        else
                                        {
                                            grdMain.Rows[sRow].Cells[HPinfanCol].Value = "";
                                            grdMain.Rows[sRow].Cells[HPinfanBarCodeCol].Value = "";
                                        }
                                    }
                                }
                                break;
@@ -2614,6 +2748,24 @@
            return newNumber;
        }
        //比亚迪获取年份对应代码
        public string ConvertToYear(int num)
        {
            string chars = "BCDEFGHJKLMNPRSTVWXY123456789A";
            int r;
            string newNumber = "";
            if (num >= 30)
            {
                r = num % 30;
                newNumber = chars[r].ToString();
            }
            else
            {
                newNumber = chars[num].ToString();
            }
            return newNumber;
        }
        //同步基础资料信息
        private void tb_Click(object sender, EventArgs e)
        {
SCM/ÌõÂë´òÓ¡/Gy_BarCodeBill_TeSiLa.designer.cs
@@ -480,7 +480,7 @@
            // 
            this.chkAddModel.AutoSize = true;
            this.chkAddModel.Location = new System.Drawing.Point(792, 79);
            this.chkAddModel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
            this.chkAddModel.Margin = new System.Windows.Forms.Padding(2);
            this.chkAddModel.Name = "chkAddModel";
            this.chkAddModel.Size = new System.Drawing.Size(72, 16);
            this.chkAddModel.TabIndex = 102;
@@ -491,7 +491,7 @@
            // 
            this.dtpHDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
            this.dtpHDate.Location = new System.Drawing.Point(676, 17);
            this.dtpHDate.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
            this.dtpHDate.Margin = new System.Windows.Forms.Padding(2);
            this.dtpHDate.Name = "dtpHDate";
            this.dtpHDate.Size = new System.Drawing.Size(188, 21);
            this.dtpHDate.TabIndex = 94;
@@ -608,7 +608,7 @@
            // 
            // pb1
            // 
            this.pb1.Location = new System.Drawing.Point(622, 12);
            this.pb1.Location = new System.Drawing.Point(116, 12);
            this.pb1.Name = "pb1";
            this.pb1.Size = new System.Drawing.Size(256, 23);
            this.pb1.TabIndex = 92;
@@ -931,7 +931,7 @@
            this.tabPage1.Controls.Add(this.grdMain);
            this.tabPage1.Location = new System.Drawing.Point(4, 22);
            this.tabPage1.Name = "tabPage1";
            this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
            this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
            this.tabPage1.Size = new System.Drawing.Size(929, 252);
            this.tabPage1.TabIndex = 0;
            this.tabPage1.Text = "物料信息";
@@ -942,7 +942,7 @@
            this.tabPage2.Controls.Add(this.grdSub);
            this.tabPage2.Location = new System.Drawing.Point(4, 22);
            this.tabPage2.Name = "tabPage2";
            this.tabPage2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
            this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
            this.tabPage2.Size = new System.Drawing.Size(929, 252);
            this.tabPage2.TabIndex = 1;
            this.tabPage2.Text = "条码信息";