lu
2025-01-01 2e1f7009dc6e35aa7ffa856f8f74613f57c560fa
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
@@ -25,16 +25,17 @@
            this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick;
            this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            this.toolBarMenu1.btnZhiLiangChkClick += ToolBarMenu1_btnZhiLiangChkClick;
            this.toolBarMenu1.btnZhiLiangFchkClick += ToolBarMenu1_btnZhiLiangFchkClick;
            this.toolBarMenu1.btnChkClick += ToolBarMenu1_btnZhiLiangChkClick;
            this.toolBarMenu1.btnFChkClick += ToolBarMenu1_btnZhiLiangFchkClick;
            this.toolBarMenu1.btnBoHuiClick += ToolBarMenu1_btnBoHuiClick;
            toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
            toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
            gcMx1.MouseClick += GcMx1_MouseClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "qualityAudit", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
@@ -47,14 +48,9 @@
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            //初始化物料选择和各种下拉
            txt_itemId.EditChanged += (s, e) =>
            {
                txt_itemModel.Text = this.txt_itemId.GetModel();
                txt_itemNo.Text = this.txt_itemId.GetCode();
            };
            ucUpFile1.UpChanged += UcUpFile1_UpChanged;
            xtraTabControl2.SelectedPageChanged += XtraTabControl2_SelectedPageChanged;
            gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
@@ -69,7 +65,17 @@
                return;
            getList12(rowGuid);
        }
        private void GvMx1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            if (e.FocusedRowHandle >= 0)
            {
                DataRow row = gvMx1.GetDataRow(e.FocusedRowHandle);
                string rowGuid = row["guid"].ToString();
                if (string.IsNullOrEmpty(rowGuid))
                    return;
                getList12(rowGuid);
            }
        }
        /// <summary>
        /// 分页事件
        /// </summary>
@@ -181,6 +187,28 @@
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
        }
        private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e)
        {
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_itemName, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            toolBarMenu1.rptParameter = "rpt_Detect01{}";
        }
        private void ToolBarMenu1_btnReportClick(object sender, EventArgs e)
        {
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_itemName, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            this.toolBarMenu1.rptParameter = "rpt_Detect01{" + ""
                   + "," + ""
                   + "," + ""
                   + "," + ""
                   + "," + ""
                   + "}";
        }
        /// <summary>
        /// 驳回
        /// </summary>
@@ -189,32 +217,7 @@
        private void ToolBarMenu1_btnBoHuiClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_releaseNo, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了1条数据,确定要驳回吗?"))
                return;
            try
            {
                var strJson = UtilityHelper.HttpPost("", _webServiceName + "IqcQcSubmit13",
                    JsonConvert.SerializeObject(rowGuid));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
            _toolCk(-1);
        }
        /// <summary>
        /// 质量反审核
@@ -223,33 +226,7 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnZhiLiangFchkClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_releaseNo, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了1条数据,确定质量审核吗?"))
                return;
            try
            {
                var strJson = UtilityHelper.HttpPost("", _webServiceName + "IqcQcSubmit11",
                    JsonConvert.SerializeObject(rowGuid));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
            _toolCk(0);
        }
        /// <summary>
        /// 质量审核
@@ -258,33 +235,7 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnZhiLiangChkClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_releaseNo, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了1条数据,确定质量审核吗?"))
                return;
            try
            {
                var strJson = UtilityHelper.HttpPost("", _webServiceName + "IqcQcSubmit",
                    JsonConvert.SerializeObject(rowGuid));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
            _toolCk(1);
        }
        /// <summary>
@@ -317,6 +268,7 @@
        private   void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            _sbSqlWhere += " and isnull(fsubmit,0)=1";
            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
            string json = JsonConvert.SerializeObject(pgq);
            try
@@ -561,5 +513,61 @@
                }
            }
        }
        /// <summary>
        /// 工具条事件
        /// </summary>
        /// <param name="inFieldValue"></param>
        private void _toolCk(int _inFieldValue)
        {
            string strMsg = "";
            switch (_inFieldValue)
            {
                case 1:
                    strMsg = "审核";
                    break;
                case 0:
                    strMsg = "反审核";
                    break;
                case -1:
                    strMsg = "驳回";
                    break;
            };
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?"))
                return;
            var _obj = new
            {
                guid = rowGuid,
                inFieldValue = _inFieldValue,
            };
            try
            {
                var strJson = UtilityHelper.HttpPost("",
                    _webServiceName + "EditModelSubmitZhiLiang",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
                if (_rtn.rtnCode > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                        getModel(lbGuid.Text.Trim());
                    else
                        getPageList(this.pageBar1.CurrentPage);
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}