bug
lu
2025-06-14 b70819eee3a21dfb202f99eb0663891cabd9b76d
DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesDeliver.cs
@@ -14,7 +14,7 @@
{
    public partial class Frm_SalesDeliver : DevExpress.XtraEditors.XtraForm
    {
        string _webServiceName = "SalesDeliverManager/";
        string _webServiceName = "SalesDeliverManager/";
        List<FilterEntity> _filterList = new List<FilterEntity>();
        public Frm_SalesDeliver()
        {
@@ -34,14 +34,14 @@
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "chkStatus", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
            }, tips);
            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            }, lbGuid);
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            //设置销售单
@@ -67,27 +67,17 @@
                    var rtn = UtilityHelper.ReturnToTablePage(strReturn);
                    var dt = rtn.rtnData.list;
                    this.repositoryItemSearchLookUpEdit1.DataSource = dt;
                    repositoryItemSearchLookUpEdit1.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
                }
                catch (Exception ex)
                {
                    MsgHelper.Warning("提示:" + ex.Message);
                }
            };
            //gridView1.FocusedRowChanged += (s, e) =>
            //{
            //    if (gridView1.GetSelectedRows() != null)
            //    {
            //        var selectedRow = gridView1.GetSelectedRows()[0]; // 获取第一个选中行的索引
            //        var checkStatus = gridView1.GetRowCellValue(selectedRow, "guid").ToString(); // 获取指定列的值
            //        getModel(checkStatus);
            //    }
            //};
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
            Task.Delay(100);
            getPageList(1);
        }
@@ -110,7 +100,7 @@
            gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
            gridView1.ActiveFilter.Clear();
            gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
            var frm = new ShowFilter(gridView1.Columns, _filterList);
            var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
            frm.UpdateParent += Frm_UpdateParent;
            frm.ShowDialog();
        }
@@ -220,7 +210,7 @@
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            if (xtraTabControl1.SelectedTabPageIndex == 1)
            {
                getModel(lbGuid.Text.Trim());
                getModel(rowGuid);
            }
            else
            {
@@ -276,6 +266,7 @@
                list = new List<dynamic>(),
            };
            gvMx1.CloseEditor();
            gvMx1.PostEditor();
            gvMx1.UpdateCurrentRow();
            if (gvMx1.DataRowCount <= 0)
            {
@@ -292,6 +283,11 @@
                    if (string.IsNullOrEmpty(_msl))
                    {
                        MsgHelper.ShowError("数量不能为空!");
                        return;
                    }
                    if (string.IsNullOrEmpty(row["YjfhDate"].ToString()))
                    {
                        MsgHelper.ShowError("预计发货时间不能为空!");
                        return;
                    }
                    _obj.list.Add(new
@@ -318,6 +314,7 @@
                    gvList.Add(gvMx1);
                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
                    toolBarMenu1.currentAction = "";
                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                }
            }
            catch (Exception ex)
@@ -345,7 +342,7 @@
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
            string json = JsonConvert.SerializeObject(pgq);
            try
@@ -361,7 +358,7 @@
                    {
                        gcMain1.DataSource = dt;
                        gcMain1.ForceInitialize();
                        gridView1.BestFitColumns();
                        gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain1, gridView1);
@@ -419,6 +416,7 @@
                        gcMx1.DataSource = dt;
                        gcMx1.ForceInitialize();
                        gvMx1.BestFitColumns();
                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
                    }
                    else
                    {
@@ -535,6 +533,7 @@
            gvMx1.SetFocusedRowCellValue("gyOrg", SelectedDataRow["gyOrg"].ToString());
            gvMx1.SetFocusedRowCellValue("kcOrg", SelectedDataRow["kcOrg"].ToString());
            gvMx1.CloseEditor();
            gvMx1.PostEditor();
            gvMx1.UpdateCurrentRow();
        }
@@ -578,7 +577,5 @@
                }
            }
        }
    }
}