lu
8 天以前 f7289e89b6293e92271ad0673ba6abf36604ef4c
DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
@@ -27,6 +27,8 @@
        protected override void OnCreateControl()
        {
            //列表,getmodel 使用了RkqcManager,
            //保存,审核使,重新加载检验 用了MesQaItemsDetect01Manager
            base.OnCreateControl();
            if (Parent == null) return;
            this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick;
@@ -66,39 +68,51 @@
            else
                  if (strType == QcSeason.其它入库检.ToString())
                rptName = "rpt_Qtrk";
            this.ucBtnPrint1.btnPrintClick += (s, e) =>
            else
                 if (strType == QcSeason.销售退货入库检.ToString())
                rptName = "rpt_Xsth";
            else
                 if (strType == QcSeason.超期检.ToString())
            {
                ucBtnPrint1.guidKey = "";
                string rowGuid = txt_aboutGuid.Text.Trim();
                ucBtnPrint1.guidKey = rowGuid;
                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的条码数量!");
                    txt_iCount_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!");
                    txt_psnQty_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (rowGuid.Length < 10)
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!");
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                rptName = "";
                layoutControlItem25.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                layoutControlItem27.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                tabMxPage3.PageVisible = false;
            }
                this.ucBtnPrint1.rptParameter = rptName + "{" + rowGuid.Trim()
                       + "," + ""
                       + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())
                       + "," + txt_iCount_1.Text.Trim()
                       + "," + txt_psnQty_1.Text.Trim()
                       + "}";
            };
            this.ucBtnPrint1.btnPrintClick += (s, e) =>
        {
            ucBtnPrint1.guidKey = "";
            string rowGuid = txt_aboutGuid.Text.Trim();
            ucBtnPrint1.guidKey = rowGuid;
            if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的条码数量!");
                txt_iCount_1.Focus();
                this.ucBtnPrint1.rptParameter = "return false";
                return;
            }
            if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!");
                txt_psnQty_1.Focus();
                this.ucBtnPrint1.rptParameter = "return false";
                return;
            }
            if (rowGuid.Length < 10)
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!");
                this.ucBtnPrint1.rptParameter = "return false";
                return;
            }
            this.ucBtnPrint1.rptParameter = rptName + "{" + rowGuid.Trim()
                   + "," + ""
                   + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())
                   + "," + txt_iCount_1.Text.Trim()
                   + "," + txt_psnQty_1.Text.Trim()
                   + "}";
        };
            this.ucBtnPrint1.btnAllClick += (s, e) =>
            {
                string rowGuid = txt_aboutGuid.Text.Trim();
@@ -189,7 +203,7 @@
            string strGuid = lbGuid.Text.Trim();
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            var _obj = new
@@ -211,7 +225,7 @@
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
@@ -273,7 +287,7 @@
                }
                catch (Exception ex)
                {
                    MsgHelper.Warning("提示:" + ex.Message);
                    MsgHelper.ShowError("提示:" + ex.Message);
                }
            }
        }
@@ -384,7 +398,7 @@
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
@@ -411,13 +425,15 @@
        {
            toolBarMenu1.isSetBtn = false;
            string rkckid = txt_rkCkId.GetId();
            if (string.IsNullOrEmpty(rkckid))
            if (strType != QcSeason.超期检.ToString())
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择仓库!");
                txt_rkCkId.Focus();
                return;
                if (string.IsNullOrEmpty(rkckid))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择仓库!");
                    txt_rkCkId.Focus();
                    return;
                }
            }
            if (txt_fcheckResu.Text.Trim() == _strTag && string.IsNullOrEmpty(txt_fngDesc.TextTxt.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("当检验结果不合格时,请填写备注说明!");
@@ -493,7 +509,7 @@
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
@@ -509,7 +525,7 @@
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            var _obj = new
@@ -528,7 +544,7 @@
                    gvList.Add(gvMx1);
                    UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
                    string strCk = dy.rkCkId;
                    txt_rkCkId.getSuppler(txt_tlOrg.Text.Trim(), strCk);
                    txt_rkCkId.getSuppler(txt_receiveOrgId.Text.Trim(), strCk);
                    setEable(isEdit);
                    txtQuantity.Text = dy["fbatchQty"].ToString();
                    txt_kQty.Text = dy["kdy"].ToString();
@@ -585,11 +601,11 @@
                    }
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                    ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
@@ -645,7 +661,7 @@
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
@@ -668,7 +684,7 @@
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定操作吗?"))
@@ -683,9 +699,9 @@
                    "MesQaItemsDetect01Manager/" + _meth,
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg);
                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
                {
                    MsgHelper.ShowInformation("提示:" + _rtn.rtnData.outMsg);
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                    {
                        getModel(lbGuid.Text.Trim(), "0");
@@ -696,10 +712,12 @@
                    int _inFieldValue = (_meth == "EditModelSubmit" ? 1 : -1);
                    UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, parentForm, _inFieldValue.ToString());
                }
                else
                    MsgHelper.ShowError("提示:" + _rtn.rtnData.outMsg);
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }