BUG
lu
5 天以前 9c38dbf93ea5b7dea6b34b03cb3143812b20147d
DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs
@@ -29,6 +29,7 @@
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
@@ -302,111 +303,12 @@
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_releaseNo, gridView1, "releaseNo");
            toolBarMenu1.guidKey = rowGuid;
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定提交检验吗?"))
                return;
            if (txt_fcheckResu.Text.Trim() == _strTag)
            {
                if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim()))
                {
                    MsgHelper.Warning("单据为不合格时,请填写违规信息!");
                    return;
                }
                string _txt_fngHandle = txt_fngHandle.Text.Trim();
                string _txt_fmrmode = txt_fmrmode.GetCode();
                string _txt_fzrId = txt_fzrId.GetId();
                string _txt_workNo = txt_workNo.Text.Trim();
                string _txt_msg = txt_msg.TextTxt;
                string _txt_zrType = txt_zrType.Text.Trim();
                if (txt_fngHandle.SelectedIndex <= 0)
                {
                    Gs.DevApp.ToolBox.MsgHelper.Warning("请选择处置结果!");
                    txt_fngHandle.Focus();
                    return;
                }
                if (txt_zrType.SelectedIndex <= 0)
                {
                    Gs.DevApp.ToolBox.MsgHelper.Warning("请选择责任判定!");
                    txt_zrType.Focus();
                    return;
                }
                if (_txt_fzrId.Length <= 0)
                {
                    Gs.DevApp.ToolBox.MsgHelper.Warning("请选择责任人!");
                    txt_fzrId.Focus();
                    return;
                }
                //当处置结果为反工时,要选择工序和反工编号
                if (txt_fngHandle.SelectedIndex == 1)
                {
                    if (string.IsNullOrEmpty(_txt_workNo))
                    {
                        Gs.DevApp.ToolBox.MsgHelper.Warning("请填写反工单号!");
                        txt_workNo.Focus();
                        return;
                    }
                    if (string.IsNullOrEmpty(_txt_fmrmode))
                    {
                        Gs.DevApp.ToolBox.MsgHelper.Warning("请填选择反工工序!");
                        txt_fmrmode.Focus();
                        return;
                    }
                }
                else
                {
                    if (!string.IsNullOrEmpty(_txt_workNo))
                    {
                        Gs.DevApp.ToolBox.MsgHelper.Warning("不需要填写反工单号!");
                        txt_workNo.Focus();
                        return;
                    }
                    if (!string.IsNullOrEmpty(_txt_fmrmode))
                    {
                        Gs.DevApp.ToolBox.MsgHelper.Warning("不需要选择反工工序!");
                        txt_fmrmode.Focus();
                        return;
                    }
                }
            };
            var _obj = new
            {
                guid = rowGuid,
            };
            try
            {
                var strJson = UtilityHelper.HttpPost("",
                    _webServiceName + "EditModelSubmit",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg);
                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                    {
                        getModel(lbGuid.Text.Trim(), "0");
                    }
                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
                    gridView1.FocusedRowHandle = rowHandle;
                    int _inFieldValue = 1;
                    UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString());
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
            _toolCk(1);
        }
        private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
        {
            _toolCk(0);
        }
        /// <summary>
        /// 取消事件
        /// </summary>
@@ -968,5 +870,131 @@
            };
            frm.ShowDialog();
        }
        /// <summary>
        /// 检验和反检验
        /// </summary>
        /// <param name="inFieldValue"></param>
        private void _toolCk(int _inFieldValue)
        {
            string strMsg = "";
            switch (_inFieldValue)
            {
                case 1:
                    strMsg = "审核";
                    break;
                case 0:
                    strMsg = "反审核";
                    break;
            };
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_releaseNo, gridView1, "releaseNo");
            toolBarMenu1.guidKey = rowGuid;
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?"))
                return;
            if (_inFieldValue == 1)
            {
                if (txt_fcheckResu.Text.Trim() == _strTag)
                {
                    if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim()))
                    {
                        MsgHelper.Warning("单据为不合格时,请填写违规信息!");
                        return;
                    }
                    string _txt_fngHandle = txt_fngHandle.Text.Trim();
                    string _txt_fmrmode = txt_fmrmode.GetCode();
                    string _txt_fzrId = txt_fzrId.GetId();
                    string _txt_workNo = txt_workNo.Text.Trim();
                    string _txt_msg = txt_msg.TextTxt;
                    string _txt_zrType = txt_zrType.Text.Trim();
                    if (txt_fngHandle.SelectedIndex <= 0)
                    {
                        Gs.DevApp.ToolBox.MsgHelper.Warning("请选择处置结果!");
                        txt_fngHandle.Focus();
                        return;
                    }
                    if (txt_zrType.SelectedIndex <= 0)
                    {
                        Gs.DevApp.ToolBox.MsgHelper.Warning("请选择责任判定!");
                        txt_zrType.Focus();
                        return;
                    }
                    if (_txt_fzrId.Length <= 0)
                    {
                        Gs.DevApp.ToolBox.MsgHelper.Warning("请选择责任人!");
                        txt_fzrId.Focus();
                        return;
                    }
                    //当处置结果为反工时,要选择工序和反工编号
                    if (txt_fngHandle.SelectedIndex == 1)
                    {
                        if (string.IsNullOrEmpty(_txt_workNo))
                        {
                            Gs.DevApp.ToolBox.MsgHelper.Warning("请填写反工单号!");
                            txt_workNo.Focus();
                            return;
                        }
                        if (string.IsNullOrEmpty(_txt_fmrmode))
                        {
                            Gs.DevApp.ToolBox.MsgHelper.Warning("请填选择反工工序!");
                            txt_fmrmode.Focus();
                            return;
                        }
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(_txt_workNo))
                        {
                            Gs.DevApp.ToolBox.MsgHelper.Warning("不需要填写反工单号!");
                            txt_workNo.Focus();
                            return;
                        }
                        if (!string.IsNullOrEmpty(_txt_fmrmode))
                        {
                            Gs.DevApp.ToolBox.MsgHelper.Warning("不需要选择反工工序!");
                            txt_fmrmode.Focus();
                            return;
                        }
                    }
                };
            }
            var _obj = new
            {
                guid = rowGuid,
                inFieldValue = _inFieldValue,
            };
            try
            {
                var strJson = UtilityHelper.HttpPost("",
                    _webServiceName + "EditModelSubmit",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg);
                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                    {
                        getModel(lbGuid.Text.Trim(), "0");
                    }
                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
                    gridView1.FocusedRowHandle = rowHandle;
                    UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString());
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}