lu
2025-04-07 e19ea4337fa65725e6e22073a7b600dcc9887d4b
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
@@ -29,19 +29,20 @@
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
           // Gs.DevApp.ToolBox.DragResizeHelp.RegisterControl(this, this.panelControl3, splitContainerControl1.Panel1, label1);
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            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;
            //设置申请组织
@@ -70,7 +71,7 @@
        }
        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);
        }
@@ -93,7 +94,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();
        }
@@ -127,7 +128,7 @@
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_fBillNo, gridView1, "fBillNo");
                lbGuid, txt_fBillNo, gridView1, "FBillNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
@@ -154,7 +155,6 @@
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                    getPageList(this.pageBar1.CurrentPage);
                }
                MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
@@ -194,7 +194,7 @@
        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "billno");
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
@@ -203,13 +203,13 @@
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            if (xtraTabControl1.SelectedTabPageIndex == 1)
            {
                getModel(lbGuid.Text.Trim());
                getModel(rowGuid);
            }
            else
            {
                List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                gvList.Add(gvMx1);
                UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList);
                UtilityHelper.ChangeEnableByControl( splitMx1.Panel1.Controls, true, gvList);
            }
        }
        /// <summary>
@@ -223,9 +223,8 @@
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
            List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
            gridViews.Add(gvMx1);
            UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews);
            UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
            Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
        }
        /// <summary>
        /// 保存事件
@@ -242,12 +241,12 @@
            string dblx = txt_ftranstype.Text.ToString();
            string dchzlx = txt_fOwnerTypeIdHead.Text.ToString();
            string drhzlx = txt_fOwnerTypeInIdHead.Text.ToString();
            if (txt_fBillTypeID.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择单据类型!");
                txt_fBillTypeID.Focus();
                return;
            }
            //if (txt_fBillTypeID.SelectedIndex <= 0)
            //{
            //    Gs.DevApp.ToolBox.MsgHelper.Warning("请选择单据类型!");
            //    txt_fBillTypeID.Focus();
            //    return;
            //}
            if (txt_fTransferDirect.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调拨方向!");
@@ -286,6 +285,7 @@
                list = new List<dynamic>(),
            };
            gvMx1.CloseEditor();
            gvMx1.PostEditor();
            gvMx1.UpdateCurrentRow();
            if (gvMx1.DataRowCount <= 0)
            {
@@ -302,6 +302,36 @@
                    if (string.IsNullOrEmpty(_msl))
                    {
                        MsgHelper.ShowError("数量不能为空!");
                        return;
                    }
                    if (string.IsNullOrEmpty(row["dcOrgGuid"].ToString()))
                    {
                        MsgHelper.ShowError("调出组织不能为空!");
                        return;
                    }
                    if (string.IsNullOrEmpty(row["dcCkGuid"].ToString()))
                    {
                        MsgHelper.ShowError("调出仓库不能为空!");
                        return;
                    }
                    if (string.IsNullOrEmpty(row["drOrgGuid"].ToString()))
                    {
                        MsgHelper.ShowError("调入组织不能为空!");
                        return;
                    }
                    if (string.IsNullOrEmpty(row["drCkGuid"].ToString()))
                    {
                        MsgHelper.ShowError("调入仓库不能为空!");
                        return;
                    }
                    if (string.IsNullOrEmpty(row["dcHzGuid"].ToString()))
                    {
                        MsgHelper.ShowError("调出货主不能为空!");
                        return;
                    }
                    if (string.IsNullOrEmpty(row["drHzGuid"].ToString()))
                    {
                        MsgHelper.ShowError("调入货主不能为空!");
                        return;
                    }
                    _obj.list.Add(new
@@ -331,8 +361,9 @@
                    toolBarMenu1.isSetBtn = true;
                    List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                    gvList.Add(gvMx1);
                    UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList);
                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
                    toolBarMenu1.currentAction = "";
                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                }
            }
            catch (Exception ex)
@@ -370,16 +401,16 @@
                if (dd.rtnCode > 0)
                {
                    DataTable dt = dd.rtnData.list;
                    gcMain.BindingContext = new BindingContext();
                    gcMain1.BindingContext = new BindingContext();
                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                    if (dt.Rows.Count > 0)
                    {
                        gcMain.DataSource = dt;
                        gcMain.ForceInitialize();
                        gridView1.BestFitColumns();
                        gcMain1.DataSource = dt;
                        gcMain1.ForceInitialize();
                        gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain, gridView1);
                        UtilityHelper.SetDefaultTable(gcMain1, gridView1);
                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                    pageBar1.TotalPages = dd.rtnData.pages;//总页
                    pageBar1.CurrentPage = curPage;//当前页
@@ -420,7 +451,7 @@
                    lbGuid.Text = strGuid;
                    List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                    gvList.Add(gvMx1);
                    UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList);
                    UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
                    JObject _job = JObject.Parse(strJson);
                    JArray array = new JArray();
                    foreach (var a in _job["rtnData"]["list"])
@@ -434,6 +465,7 @@
                        gcMx1.DataSource = dt;
                        gcMx1.ForceInitialize();
                        gvMx1.BestFitColumns();
                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
                    }
                    else
                    {
@@ -489,7 +521,7 @@
            };
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "fBillNo");
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
@@ -536,6 +568,7 @@
            gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"].ToString());
            gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString());
            gvMx1.CloseEditor();
            gvMx1.PostEditor();
            gvMx1.UpdateCurrentRow();
        }
@@ -611,11 +644,6 @@
            if (rowhandle < 0)
                return;
            var dr = gvMx1.GetDataRow(rowhandle);
            if (dr["dcOrgGuid"] == null)
            {
                MsgHelper.Warning("提示:请先选择调出组织!");
                return;
            };
            var strOrgGuid = dr["dcOrgGuid"].ToString();
            if (string.IsNullOrEmpty(strOrgGuid))
            {
@@ -696,15 +724,10 @@
            if (rowhandle < 0)
                return;
            var dr = gvMx1.GetDataRow(rowhandle);
            if (dr["drOrgGuid"] == null)
            {
                MsgHelper.Warning("提示:请先选择调出组织!");
                return;
            };
            var strOrgGuid = dr["drOrgGuid"].ToString();
            if (string.IsNullOrEmpty(strOrgGuid))
            {
                MsgHelper.Warning("提示:请先选择调出组织!");
                MsgHelper.Warning("提示:请先选择调入组织!");
                return;
            };
            SelectCk frm = new SelectCk(strOrgGuid);