cnf
2025-08-27 9a853780edf120c99712c15fd3b174fa08ef142c
DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs
@@ -91,6 +91,16 @@
                    return;
                }
                var frm = new UcBlclSelect(txt_aboutGuid.GetId(), this.txt_orgId.GetId());
                if (txt_bl017.Text.Trim() == "生产补料")
                {
                     frm = new UcBlclSelect(txt_aboutGuid.GetId(), this.txt_orgId.GetId(), txt_bl017.Text.Trim());
                }
                else
                {
                     frm = new UcBlclSelect(txt_aboutGuid.GetId(), this.txt_orgId.GetId());
                }
                //赋值给明细表
                frm.UpdateParent += (ss, ee) =>
                {
@@ -106,6 +116,7 @@
                            _row["bld002"] = dym.itemNo;//物料编号 
                            _row["bld003"] = dym.itemName;//物料名称
                            _row["bld004"] = dym.itemModel;//规格型号
                            _row["kbsl"] = dym.kbsl;
                            _row["dwName"] = dym.dwName;
                            _row["dabGuid"] = dym.dabGuid;
                            _row["bld013"] = idx.ToString();//项次
@@ -309,6 +320,8 @@
            gridViews.Add(gvMx1);
            UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
            Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
            //增加时,默认组织
            string deftOrg = UtilityHelper.GetFirstOrg(txt_orgId);
        }
        /// <summary>
@@ -363,11 +376,34 @@
                {
                    Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString());
                    string _msl = row["bld007"].ToString();
                    string _kbsl = row["kbsl"].ToString();
                    if (string.IsNullOrEmpty(_msl))
                    {
                        MsgHelper.ShowError("数量不能为空!");
                        return;
                    }
                    if (txt_bl017.Text.Trim()=="生产补料")
                    {
                        if (decimal.TryParse(row["bld007"].ToString(), out decimal msl) &&
                       decimal.TryParse(row["kbsl"].ToString(), out decimal kbsl))
                        {
                            if (msl > kbsl)
                            {
                                MsgHelper.ShowError("" +
                                    "申请数量不能大于可补数量!");
                                return;
                            }
                        }
                        else
                        {
                            // 解析失败的处理
                            MsgHelper.ShowError("" +
                                    "输入的不是有效数字!");
                            return;
                        }
                    }
                    _obj.list.Add(new
                    {
                        Guid = _guid,