yxj
2021-08-04 7ae9c00025191d12ff3f3373b4da5d9cb5b74aef
洗衣机条码生成模块生成规则、条码生成前控制修改
1个文件已修改
40 ■■■■■ 已修改文件
SCM/条码打印/Gy_BarCodeBill_XiYiJi.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/ÌõÂë´òÓ¡/Gy_BarCodeBill_XiYiJi.cs
@@ -557,24 +557,29 @@
                        MessageBox.Show(" ç¬¬" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "行,物料:" + ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNameCol].Value) + " ï¼Œä¸­å­˜åœ¨æ•°é‡ã€æœ€å°åŒ…装数、箱数为 0,不允许生成条码!");
                        return false;
                    }
                    if (ClsPub.isLong(grdMain.Rows[j].Cells[HGroupIDCol].Value) == 0)
                    {
                        MessageBox.Show(" ç¬¬" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "行,物料:" + ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNameCol].Value) + " ï¼Œå¿…填项班线没有选择,不允许生成条码!");
                        return false;
                    }
                    //if (ClsPub.isLong(grdMain.Rows[j].Cells[HGroupIDCol].Value) == 0)
                    //{
                    //    MessageBox.Show(" ç¬¬" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "行,物料:" + ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNameCol].Value) + " ï¼Œå¿…填项班线没有选择,不允许生成条码!");
                    //    return false;
                    //}
                    //条码前缀一共12位,由类别代码(1位)、公司代码(1位)、客户代码(2位)、等级代码(1位)、产品大类代码(2位)、产品中类代码(2位)、型号流水号(3位)组成
                    string sNoNumber = ClsPub.isStrNull(grdMain.Rows[j].Cells[HBarCodePrefixCol].Value);
                    int sNoNumberbyteLen = System.Text.Encoding.Default.GetByteCount(sNoNumber);
                    //int sNoNumberbyteLen = System.Text.Encoding.Default.GetByteCount(sNoNumber);
                    int HBarCodeISN = ClsPub.isInt(grdMain.Rows[j].Cells[HBarCodeISNCol].Value);
                    int MaxLSH = 0;     //最大流水号
                    if (sNoNumberbyteLen != 12)
                    {
                        MessageBox.Show(" ç¬¬" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "行,条码前缀必须由12位组成!请确保类别代码(1位)、公司代码(1位)、客户代码(2位)、等级代码(1位)、产品大类代码(2位)、产品中类代码(2位)、型号流水号(3位)位数正确后,再重新生成条码!");
                        return false;
                    }
                    else
                    {
                    //if (sNoNumberbyteLen != 12)
                    //{
                    //    MessageBox.Show(" ç¬¬" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "行,条码前缀必须由12位组成!请确保类别代码(1位)、公司代码(1位)、客户代码(2位)、等级代码(1位)、产品大类代码(2位)、产品中类代码(2位)、型号流水号(3位)位数正确后,再重新生成条码!");
                    //    return false;
                    //}
                    //else
                    //{
                        if (sNoNumber=="")
                        {
                            MessageBox.Show(" ç¬¬" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "行,条码前缀不允许为空!");
                            return false;
                        }
                        if (HBarCodeISN <= 0)
                        {
                            MessageBox.Show(" ç¬¬" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "行,起始序号必须为大于 0 çš„æ•´æ•°ï¼");
@@ -590,7 +595,7 @@
                                return false;
                            }
                        }
                    }
                    //}
                }
            }
            return true;
@@ -671,9 +676,10 @@
                        //==================================
                        if (cmbHBarCodeType.Text == "唯一条码")
                        {
                            HGroupNumber = grdMain.Rows[j].Cells[HGroupNumberCol].Value.ToString();
                            sNoNumber = grdMain.Rows[j].Cells[HBarCodePrefixCol].Value.ToString();
                            sTMNumber = sNoNumber + HGroupNumber + sYear + sPeriod + sDay;
                            HGroupNumber = ClsPub.isStrNull(grdMain.Rows[j].Cells[HGroupNumberCol].Value);
                            sNoNumber = ClsPub.isStrNull(grdMain.Rows[j].Cells[HBarCodePrefixCol].Value);
                            //sTMNumber = sNoNumber + HGroupNumber + sYear + sPeriod + sDay;
                            sTMNumber = sNoNumber;
                            LSH = ClsPub.isInt(grdMain.Rows[j].Cells[HBarCodeISNCol].Value)-1;
                            oWeb.getRunProc("Exec h_p_WMS_SetBarCodeNoByEmp  '" + sNoNumber + "'," + LSH, ref DBUtility.ClsPub.sExeReturnInfo);