雅琪诺MES智能条码管理系统
ouyangqing
2021-02-06 4fa6d43995d10207dd084b27b3c9565d82ac517d
Merge branch 'master' of http://101.37.171.70:10101/r/YqnMes
4个文件已修改
100 ■■■■ 已修改文件
SCM/公用类/Cls_S_CLD_ICMOList.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/单据资料/Sc_ICMOReportToBarCode.cs 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/单据资料/Sc_PackUnionBill.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/生产管理/Sc_PackUnionBillList.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/¹«ÓÃÀà/Cls_S_CLD_ICMOList.cs
@@ -16,6 +16,7 @@
            base.sCondtion = "  ";
            base.sOrderSql = "  order by å•据号 desc,hsubid ";
            base.sKeyCol = "车间";
        }
        //
 
SCM/µ¥¾Ý×ÊÁÏ/Sc_ICMOReportToBarCode.cs
@@ -429,7 +429,9 @@
                double HSumQty = 0;         //产品数量
                double HMinQty = 0;         //最小包装数
                int HBQty = 0;              //箱数
                double HQty = 0;            //数量
                double HQty = 0;            //数量(标准米数)
                double HRelDiffQty = 0;     //实际损耗
                double HRelQty = 0;         //实际米数
                string WeiShu = "";         //尾数
                int LSH = 0;                //流水号
                string LSH2 = "";           //流水号转换成字符
@@ -453,7 +455,7 @@
                string HBatchNo2 = "";
                Int64 HSupID = 0;
                Int64 HGroupID = 0;
                int HPrintQty = 0;
                double HPrintQty = 0;
                Int64 HBarcodeNo = 0;       //托号
                Int64 HBarcodeQtys = 0;     //总托数
                Int64 HDeptID = 0;
@@ -529,8 +531,38 @@
                    cmdHSaveBill.Enabled = true;
                    return false;
                }
                //
                //获取数量; é”€å”®è£åˆ‡æ•°é‡ä¸ºè®¢å•数量即源单数量;
                if (HSourceBillType == "生产订单") //销售裁切
                {
                    //裁切米数 å¿…须大于 è®¢å•米数
                    if (DBUtility.ClsPub.isDoule(txtHSJQty.Text) - DBUtility.ClsPub.isDoule(txtHSYQty.Text) < 0)
                    {
                        MessageBox.Show("实际米数必须大于订单米数!");
                        cmdHSaveBill.Enabled = true;
                        return false;
                    }
                    //裁切一次控制
                    if (DBUtility.ClsPub.isDoule(txtHRelationQty.Text) >0)
                    {
                        MessageBox.Show("只能裁切一次,不能重复裁切!");
                        cmdHSaveBill.Enabled = true;
                        return false;
                    }
                    //当实际米数 å¤§äºŽ è®¢å•米数 0.2以上时,提示是否强制保存
                    if (DBUtility.ClsPub.isDoule(txtHSJQty.Text) - DBUtility.ClsPub.isDoule(txtHSYQty.Text) > 0.2)
                    {
                        if (MessageBox.Show("实际米数大于订单米数0.2米以上,确定要继续保存?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                        {
                        }
                        else
                        {
                            cmdHSaveBill.Enabled = true;
                            return false;
                        }
                    }
                }
                //根据源单 ç”Ÿæˆæ¡å½¢ç  å¹¶ä¿å­˜å¦‚数据库
                HNumber = DBUtility.ClsPub.isStrNull(txtHMaterName.Tag);
                HBatchNo = DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
@@ -562,8 +594,21 @@
                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]);
                //
                HQty = DBUtility.ClsPub.isDoule(txtHSJQty.Text);
                //获取数量; é”€å”®è£åˆ‡æ•°é‡ä¸ºè®¢å•数量即源单数量;
                if (HSourceBillType == "生产订单") //销售裁切
                {
                    HQty = DBUtility.ClsPub.isDoule(txtHSumQty.Text);
                    HRelQty = DBUtility.ClsPub.isDoule(txtHSJQty.Text);
                    HPrintQty = HRelQty;
                    HRelDiffQty = DBUtility.ClsPub.isDoule(txtHSJQty.Text) - DBUtility.ClsPub.isDoule(txtHSumQty.Text);
                }
                else
                {
                    HQty = DBUtility.ClsPub.isDoule(txtHSJQty.Text);
                    HRelQty = DBUtility.ClsPub.isDoule(txtHSJQty.Text);
                    HPrintQty = HRelQty;
                    HRelDiffQty = 0;
                }
                //
                string sSQLNoMul = " exec h_p_WMS_SetMaxNo '" + sTMNumber + "' ";
                oWeb.getRunProc(sSQLNoMul, ref DBUtility.ClsPub.sExeReturnInfo);
@@ -601,7 +646,7 @@
                HUnitID = DBUtility.ClsPub.isLong(txtHUnitName.Tag);
                HQty2 = HQty;
                //HBatchNo2 = HBatchNo;
                if (HSourceBillType == "生产订单")
                if (HSourceBillType == "生产订单") //销售裁切
                {
                    HBatchNo2 = HBatchNo;
                }
@@ -677,7 +722,7 @@
                            ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HBadReasonList,HProdLev " +
                            ") values ("
                            + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
                            + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString()
                            + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HRelDiffQty.ToString()
                            + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillTypeID + "','" + HWei + "'"
                            + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
                            + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + HJiaYe2 + "'"
@@ -687,7 +732,11 @@
                            + ",'" + POOrderBillNo + "'" + "," + DBUtility.ClsPub.isLong(txtHSourceID.Tag)
                            + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + txtHReasonList.Text + "','" + HRemark + "')";
                oWeb.getRunProc(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo);
                //将裁切时间反写 é”€å”®è®¢å•   è£åˆ‡æ—¶é—´å’Œ å®žé™…损耗数量
                if (HSourceBillType == "生产订单") //销售裁切
                {
                    oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderCutTime  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() , ref DBUtility.ClsPub.sExeReturnInfo);
                }
                //刷新界面
                DisplayMain();
SCM/µ¥¾Ý×ÊÁÏ/Sc_PackUnionBill.cs
@@ -379,7 +379,7 @@
                            ",HLogo,HPackageSize,HMaterialJQty,HMaterialMQty,HCustomBatchNo " +
                            ",HSTOCKORGID,HOWNERID,HBeginDate,HSeOrderBillNo,HGBBarCode " +
                            ",POOrderBillNo " +
                            ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo " +
                            ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInterID " +
                            ") values ("
                            + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
                            + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString()
@@ -390,9 +390,12 @@
                            + ",'" + HLogo + "','" + HPackageSize + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + ",'" + HCustomBatchNo + "'"
                            + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HBeginDate.ToShortDateString() + "','" + HSeOrderBillNo + "','" + HGBBarCode + "'"
                            + ",'" + POOrderBillNo + "'"
                            + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "')";
                            + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "',"+ omodel.HInterID + ")";
                oWeb.getRunProc(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo);
                //将包装时间反写 é”€å”®è®¢å•
                oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderPickTime  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                //刷新界面
                DisBillEntryList_Webs();
@@ -422,8 +425,14 @@
        private void Sub_SetReport(string sOpenTmp)
        {
            //判断行数
            //增加判断:如果子表行 å®žé™…数量为0 åˆ™ä¸æ‰“印出来
            for (int i = 0; i < grdMain.RowCount; i++)
            {
                if (ClsPub.isDoule(grdMain.Rows[i].Cells["数量"].Value) != 0)
                {
                    grdMain.Rows[i].Cells[0].Value = "*";
                }
            }
            Report = new GridppReport();
            Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + sOpenTmp + ".grf");  //here .
            Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord);
@@ -443,7 +452,12 @@
                Report.FieldByName("联系方式").AsString = ClsPub.isStrNull(txtHLinkMan.Text)+ "-" +  ClsPub.isStrNull(txtHLinkPhone.Text);
                Report.FieldByName("地址").AsString = ClsPub.isStrNull(txtHAddress.Text);
                Report.FieldByName("物流方式").AsString = ClsPub.isStrNull(txtHConveyCompName.Text);
                //Report.FieldByName("总重量").AsString = ClsPub.isStrNull(txtHWeight.Text);
                string HWeight = ClsPub.isStrNull(txtHWeight.Text);
                if (HWeight==null || HWeight.Equals(""))
                {
                    HWeight = "0";
                }
                Report.FieldByName("总重量").AsString = HWeight;
            }
            catch (Exception e)
            {
@@ -456,7 +470,7 @@
            try
            {
                DataTable ds = new DataTable();
                BLL.Utility.FillRecordToReport(Report, grdMain, ds, 0);
                BLL.Utility.FillRecordToReport(Report, grdMain, ds, Fun_GetCol("选择"));
            }
            catch (Exception e)
            {
SCM/Éú²ú¹ÜÀí/Sc_PackUnionBillList.cs
@@ -180,15 +180,15 @@
                        sHInterID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("HInterID")].Value);
                        oWeb.getRunProc("Delete from Sc_PackUnionBillSub where HInterID=" + sHInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                        oWeb.getRunProc("Delete from Sc_PackUnionBillMain where HInterID=" + sHInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                        oWeb.getRunProc("insert into System_log values(GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.CurUserName + "','删除单据:" + DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("源单单号")].Value) + "' ,'生产包装单列表','','删除')", ref DBUtility.ClsPub.sExeReturnInfo);
                        oWeb.getRunProc("insert into System_log values(GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.CurUserName + "','删除单据:" + DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("生产订单号")].Value) + "' ,'生产包装单列表','','删除')", ref DBUtility.ClsPub.sExeReturnInfo);
                        MessageBox.Show("单据号:" + DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("生产订单号")].Value) + " åˆ é™¤æˆåŠŸï¼", "提示");
                    }
                }
                MessageBox.Show("单据号:" + DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("源单单号")].Value) + " åˆ é™¤æˆåŠŸï¼", "提示");
                Display();
            }
            catch (Exception e)
            {
                throw (e);
                MessageBox.Show("单据号:" + DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("生产订单号")].Value) + " åˆ é™¤å¤±è´¥ï¼"+e.ToString(), "提示");
            }
        }
@@ -267,7 +267,7 @@
                //Report.FieldByName("制单日期").AsString = DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("制单日期")].Value);
                Report.FieldByName("源单单号").AsString = DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("生产订单号")].Value);
                //Report.FieldByName("源单类型").AsString = DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("源单类型")].Value);
                Report.FieldByName("总重量").AsString = DBUtility.ClsPub.isStrNull(AllQty);
                Report.FieldByName("总重量").AsString = DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[Fun_GetCol("总重量")].Value);
                AllQty = 0;
            }
            catch (Exception e)