雅琪诺MES智能条码管理系统
jhz
2022-06-28 ef9b836c0c204fd05fc862c5c87f2ba100942f1f
班组职员编辑表,裁切包装回填
3个文件已修改
114 ■■■■ 已修改文件
BaseSet/公用基础资料/Gy_GroupEmpEdit.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/单据资料/Sc_ICMOReportToBarCode.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/单据资料/Sc_PackUnionBill.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BaseSet/¹«Óûù´¡×ÊÁÏ/Gy_GroupEmpEdit.cs
@@ -19,6 +19,8 @@
        static long hinterId;
        string billCode = "3301";
        public SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
        public Gy_GroupEmpEdit(long interId)
        {
            InitializeComponent();
@@ -58,25 +60,25 @@
            try
            {
                
                if (txtHSupID.Tag == null)
                {
                    MessageBox.Show("请选择班组", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                var groupId = int.Parse(txtHSupID.Tag.ToString());
                //if (txtHSupID.Tag == null)
                //{
                //    MessageBox.Show("请选择班组", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                //    return;
                //}
                var groupId =0;
                if (hinterId == 0)
                {
                    var hyear = DateTime.Now.Year;
                    var HPeriode = DateTime.Now.Month;
                    hinterId = ClsPub1.CreateBillID(billCode, ref ClsPub.sExeReturnInfo);
                    var addSql = "insert into Gy_GroupEmpListMain(HInterID,HYear,HPeriod,HBillType,HBillNo,HDate,HBillStatus,HRemark,HGroupID)values(" + hinterId + "," + hyear + "," + HPeriode + ",'" + billCode + "','" + billNo + "','" + hdate + "',1,'" + hreamrk + "'," + hgroupId + ")";
                    var addSql = "insert into Gy_GroupEmpListMain(HInterID,HYear,HPeriod,HBillType,HBillNo,HDate,HBillStatus,HRemark,HGroupID)values(" + hinterId + "," + hyear + "," + HPeriode + ",'" + billCode + "','" + billNo + "','" + hdate + "',1,'" + hreamrk + "',0)";
                    oWeb.getRunProc(addSql, ref Pub_Class.ClsPub.sExeReturnInfo);
                    AddEmpSub(hinterId);
                    MessageBox.Show("新增成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    var updateSql = "update Gy_GroupEmpListMain set HRemark='"+hreamrk+ "',HGroupID='"+hgroupId+ "' where HInterID="+hinterId;
                    var updateSql = "update Gy_GroupEmpListMain set HRemark='"+hreamrk+ "',HGroupID=0 where HInterID="+hinterId;
                    oWeb.getRunProc(updateSql, ref Pub_Class.ClsPub.sExeReturnInfo);
                    var deleteSql = "delete Gy_GroupEmpListSub where HInterID=" + hinterId;
                    oWeb.getRunProc(deleteSql, ref Pub_Class.ClsPub.sExeReturnInfo);
@@ -159,17 +161,20 @@
        private void initGrid()
        {
            grdMain.RowCount = 30;
            grdMain.ColumnCount = 6;                       //总列数
            grdMain.ColumnCount = 8;                       //总列数
            ClsPub1.initGridFst(grdMain, this.Name);
            grdMain.Columns[1].HeaderText = "编号";
            grdMain.Columns[2].HeaderText = "职员ID";
            grdMain.Columns[3].HeaderText = "职员姓名";
            grdMain.Columns[4].HeaderText = "职员编号";
            grdMain.Columns[5].HeaderText = "备注";
            grdMain.Columns[6].HeaderText = "班组ID";
            grdMain.Columns[7].HeaderText = "班组";
            //////
            ////格式化    éšè—åˆ—
            grdMain.Columns[0].Visible = false;
            grdMain.Columns[6].Visible = false;
            //grdMain.Columns[1].Visible = false;
@@ -211,22 +216,40 @@
                return;
            }
            DataSet oDs2 = new DataSet();
            SCM.ClsIF_Employee_View empl = new ClsIF_Employee_View();
            if (empl.RefreshView(" "))
            if (sCol==2)
            {
                foreach (DataGridViewRow item in grdMain.Rows)
                SCM.ClsIF_Employee_View empl = new ClsIF_Employee_View();
                if (empl.RefreshView(" "))
                {
                    if (item.Cells[2].Value != null && item.Cells[2].Value.ToString() == empl.oModel.HItemID.ToString())
                    foreach (DataGridViewRow item in grdMain.Rows)
                    {
                        if (item.Cells[2].Value != null && item.Cells[2].Value.ToString() == empl.oModel.HItemID.ToString())
                        {
                        MessageBox.Show("该职员已经存在", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                            MessageBox.Show("该职员已经存在", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            return;
                        }
                    }
                    grdMain.Rows[sRow].Cells[2].Value = empl.oModel.HItemID.ToString();
                    grdMain.Rows[sRow].Cells[3].Value = empl.oModel.HName;
                    grdMain.Rows[sRow].Cells[4].Value = empl.oModel.HNumber;
                }
                grdMain.Rows[sRow].Cells[2].Value = empl.oModel.HItemID.ToString();
                grdMain.Rows[sRow].Cells[3].Value = empl.oModel.HName;
                grdMain.Rows[sRow].Cells[4].Value = empl.oModel.HNumber;
            }
            else if (sCol == 7)
            {
                SCM.ClsIF_Group_View g = new ClsIF_Group_View();
                if (g.RefreshView(" "))
                {
                    grdMain.Rows[sRow].Cells[6].Value = g.oModel.HItemID.ToString();
                    grdMain.Rows[sRow].Cells[7].Value = g.oModel.HName;
                }
                else
                {
                    grdMain.Rows[sRow].Cells[6].Value = "";
                    grdMain.Rows[sRow].Cells[7].Value = "";
                }
            }
            oSumGrid.EditStatus = true;
          
            
@@ -259,13 +282,13 @@
                    continue;
                }
                var remark = item.Cells[5].EditedFormattedValue==null?"":item.Cells[5].EditedFormattedValue.ToString();
                var sql = "insert into Gy_GroupEmpListSub(HInterID,HEmpID,HRemark) values (" + hinterId + "," + item.Cells[2].Value + ",'" + remark + "')";
                var sql = "insert into Gy_GroupEmpListSub(HInterID,HEmpID,HGroupID,HRemark) values (" + hinterId + "," + item.Cells[2].Value + "," + item.Cells[6].Value + ",'" + remark + "')";
                oWeb.getRunProc(sql, ref Pub_Class.ClsPub.sExeReturnInfo);
            }
        }
        public void SetGridValue()
        {
            var sql = "select a.HEmpID èŒå‘˜ID,b.HName èŒå‘˜å§“名,b.HNumber èŒå‘˜ç¼–号,a.HRemark å¤‡æ³¨ from Gy_GroupEmpListSub a left join Gy_Employee b on a.HEmpID = b.HItemID where a.HInterID =" + hinterId;
            var sql = "select a.HEmpID èŒå‘˜ID,b.HName èŒå‘˜å§“名,b.HNumber èŒå‘˜ç¼–号,g.HitemID HgroupID,g.Hname HgroupName,a.HRemark å¤‡æ³¨ from Gy_GroupEmpListSub a left join Gy_Employee b on a.HEmpID = b.HItemID  left join gy_group g on a.hgroupid=g.hitemid where a.HInterID =" + hinterId;
            DataSet DSet = oWeb.getDataSetBySQL(sql, "Gy_GroupEmpListSub", ref DBUtility.ClsPub.sExeReturnInfo);
            int a = 0;
            foreach (DataRow item in DSet.Tables[0].Rows)
@@ -274,6 +297,8 @@
                grdMain.Rows[a].Cells[3].Value = item["职员姓名"].ToString();
                grdMain.Rows[a].Cells[4].Value = item["职员编号"].ToString();
                grdMain.Rows[a].Cells[5].Value = item["备注"].ToString();
                grdMain.Rows[a].Cells[6].Value = item["HgroupID"].ToString();
                grdMain.Rows[a].Cells[7].Value = item["HgroupName"].ToString();
                a++;
            }
        }
SCM/µ¥¾Ý×ÊÁÏ/Sc_ICMOReportToBarCode.cs
@@ -829,9 +829,29 @@
                //将裁切时间反写 é”€å”®è®¢å•   è£åˆ‡æ—¶é—´å’Œ å®žé™…损耗数量
                if (HSourceBillType == "生产订单") //销售裁切
                {
                    oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderCutTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'" , ref DBUtility.ClsPub.sExeReturnInfo);
                    if (HSourceInterID > 100000000 && HSourceInterID < 200000000)
                    {
                        oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderCutTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    else if(HSourceInterID > 200000000 && HSourceInterID < 300000000)
                    {
                        oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToOtherOutCutTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    else if (HSourceInterID > 300000000 && HSourceInterID < 400000000)
                    {
                        oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToPICKMTRLCutTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    else if (HSourceInterID > 400000000 && HSourceInterID < 500000000)
                    {
                        oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToMoveStockCutTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    else
                    {
                        //
                    }
                } 
                ////当完工标记勾上时 å¹¶ä¸”æ—¶ ç”Ÿäº§æ±‡æŠ¥æ£€éªŒæ—¶ 
                //if (HSourceBillType == "生产汇报单" && chkFinishFlag.Checked) //检验分切
SCM/µ¥¾Ý×ÊÁÏ/Sc_PackUnionBill.cs
@@ -399,10 +399,27 @@
                            + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "',"+ omodel.HInterID + ")";
                oWeb.getRunProc(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo);
                //将包装时间反写 é”€å”®è®¢å•
                oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderPickTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                //将包装时间反写 é”€å”®è®¢å•
                if (HSourceInterID > 100000000 && HSourceInterID < 200000000)
                {
                    oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderPickTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else if (HSourceInterID > 200000000 && HSourceInterID < 300000000)
                {
                    oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToOtherOutPickTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else if (HSourceInterID > 300000000 && HSourceInterID < 400000000)
                {
                    oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToPICKMTRLPickTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else if (HSourceInterID > 400000000 && HSourceInterID < 500000000)
                {
                    oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToMoveStockPickTime_New  " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    //
                }
                //刷新界面
                DisBillEntryList_Webs();
                //DisplaySub();