lu
2025-02-18 92c92d9bfb4431a8e2f4b8ac494547d50ea3a7f6
DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
@@ -27,8 +27,8 @@
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", "", (value) =>
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(this.GetType().FullName, gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(this.GetType().FullName, gridView1, picCheckBox, this, "status", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
@@ -43,9 +43,9 @@
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            txt_depotId.getSuppler("");
            txt_suppId.getSuppler("");
            txt_org.EditChanged += (s, e) =>
            txt_thOrgId.EditChanged += (s, e) =>
            {
                var orgId = txt_org.GetId();
                var orgId = txt_thOrgId.GetId();
                if (string.IsNullOrEmpty(orgId))
                    return;
                txt_suppId.getSuppler(orgId);
@@ -56,10 +56,10 @@
            {
                if (string.IsNullOrEmpty(this.txt_suppId.GetId()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择供应商,才能选择来料明细!");
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择供应商!");
                    return;
                }
                var frm = new SelectMesCgthSq(this.txt_suppId.GetId());
                var frm = new SelectMesCgthSq(this.txt_suppId.GetId(),this.txt_thOrgId.GetId(), (txt_isOut.Checked == true ? 1 : 0).ToString());
                //赋值给明细表
                frm.UpdateParent += (ss, ee) =>
                {
@@ -91,11 +91,9 @@
                frm.ShowDialog();
            };
        }
        private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
            _filterList= Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
            await Task.Delay(100);
            getPageList(1);
        }
@@ -193,8 +191,11 @@
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    getPageList(1);
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                    { }
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                    getPageList(this.pageBar1.CurrentPage);
                }
                MsgHelper.Warning("提示:" + _rtn.rtnMsg);
@@ -217,14 +218,15 @@
                getModel(lbGuid.Text.Trim());
            else
            {
                _filterList.Clear();
                if (gridView1.ActiveFilter.Count > 0)
                {
                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                    gridView1.ActiveFilter.Clear();
                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                }
                getPageList(1);
                //_filterList.Clear();
                //if (gridView1.ActiveFilter.Count > 0)
                //{
                //    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                //    gridView1.ActiveFilter.Clear();
                //    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                //}
                //getPageList(1);
                getPageList(this.pageBar1.CurrentPage);
            }
        }
        /// <summary>
@@ -234,17 +236,19 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
        {
            toolBarMenu1.currentAction = "edit";
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1, "billNo");
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_billNo, gridView1);
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            if (xtraTabControl1.SelectedTabPageIndex == 1)
            {
                getModel(lbGuid.Text.Trim());
                getModel(rowGuid);
            }
            else
            {
@@ -277,11 +281,11 @@
            toolBarMenu1.isSetBtn = false;
            var _ckId = txt_depotId.GetId(); //仓库编号 depots_code
            var _gysId = txt_suppId.GetId(); //供应商编号
            string _orgId = txt_org.GetId();
            string _orgId = txt_thOrgId.GetId();
            if (string.IsNullOrEmpty(_orgId))
            {
                MsgHelper.Warning("请选择组织!");
                txt_org.Focus();
                txt_thOrgId.Focus();
                return;
            }
            if (string.IsNullOrEmpty(_gysId))
@@ -356,7 +360,8 @@
                MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
                {
                    lbGuid.Text = _rtn.rtnData;
                    lbGuid.Text = _rtn.rtnData.outGuid;
                    txt_billNo.Text = _rtn.rtnData.outNo;
                    toolBarMenu1.isSetBtn = true;
                    UtilityHelper.ChangeEnableByControl(panel1.Controls, false);
                }
@@ -390,6 +395,7 @@
                    {
                        gcMain.DataSource = dt;
                        gcMain.ForceInitialize();
                        gridView1.BestFitColumns();
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain, gridView1);
@@ -445,6 +451,7 @@
                        gcMx1.BindingContext = new BindingContext();
                        gcMx1.DataSource = dt;
                        gcMx1.ForceInitialize();
                        gvMx1.BestFitColumns();
                    }
                    else
                    {
@@ -459,7 +466,6 @@
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        /// <summary>
        /// 工具条事件
        /// </summary>
@@ -498,21 +504,22 @@
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
                if (_rtn.rtnCode > 0)
                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                    {
                        getModel(lbGuid.Text.Trim());
                    else
                        getPageList(this.pageBar1.CurrentPage);
                    }
                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
                    gridView1.FocusedRowHandle = rowHandle;
                    UtilityHelper.SetCheckIco(gridView1, "status", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString());
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            gvMx1.CloseEditor();