lu
6 天以前 b2b169fcad7072edd66b1faa28ae390fc44d49be
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
@@ -29,24 +29,25 @@
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "shState", "", (value) =>
            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;
            //设置申请组织
            this.txt_sqOrg.EditChanged += (s, e) =>
            this.txt_fapporgid.EditChanged += (s, e) =>
            {
                string _sqGuid = txt_sqOrg.GetId();
                string _sqGuid = txt_fapporgid.GetId();
                if (string.IsNullOrEmpty(_sqGuid))
                    return;
                System.Text.StringBuilder sbWhere = new System.Text.StringBuilder();
@@ -60,16 +61,33 @@
                    var rtn = UtilityHelper.ReturnToTablePage(strReturn);
                    var dt = rtn.rtnData.list;
                    this.repositoryItemSearchLookUpEdit1.DataSource = dt;
                    //  repositoryItemSearchLookUpEdit1.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
                    //Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView2);
                }
                catch (Exception ex)
                {
                    MsgHelper.Warning("提示:" + ex.Message);
                    MsgHelper.ShowError("提示:" + ex.Message);
                }
            };
            this.gvMx1.InitNewRow += (s, e) =>
            {
                string _orgId = txt_fapporgid.GetId();
                string _orgName = txt_fapporgid.GetName();
                if (string.IsNullOrEmpty(_orgId)) return;
                gvMx1.SetFocusedRowCellValue("dcOrg", _orgName);
                gvMx1.SetFocusedRowCellValue("dcOrgGuid", _orgId);
                gvMx1.SetFocusedRowCellValue("drOrg", _orgName);
                gvMx1.SetFocusedRowCellValue("drOrgGuid", _orgId);
                gvMx1.SetFocusedRowCellValue("drHz", _orgName);
                gvMx1.SetFocusedRowCellValue("drHzGuid", _orgId);
                gvMx1.SetFocusedRowCellValue("dcHz", _orgName);
                gvMx1.SetFocusedRowCellValue("dcHzGuid", _orgId);
            };
        }
        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);
        }
@@ -92,7 +110,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();
        }
@@ -126,7 +144,7 @@
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_billno, gridView1, "billno");
                lbGuid, txt_fBillNo, gridView1, "FBillNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
@@ -147,20 +165,20 @@
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg);
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                    { }
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                    getPageList(this.pageBar1.CurrentPage);
                }
                MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                else
                    MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
@@ -170,7 +188,7 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
           if (xtraTabControl1.SelectedTabPageIndex == 1)
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim());
            else
            {
@@ -193,7 +211,7 @@
        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billno, gridView1, "billno");
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
@@ -202,14 +220,19 @@
            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);
            }
            //2025/07/12加上修改状态下不能修改供应商和组织srm,禁用
            txt_fapporgid.IsReadly = true;
            txt_ftranstype.ReadOnly = true;
            txt_fOwnerTypeIdHead.ReadOnly = true;
            txt_fOwnerTypeInIdHead.ReadOnly = true;
        }
        /// <summary>
        /// 新增事件
@@ -222,8 +245,10 @@
            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);
            //增加时,默认组织
            string deftOrg = UtilityHelper.GetFirstOrg(txt_fapporgid);
        }
        /// <summary>
@@ -234,54 +259,58 @@
        private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
        {
            toolBarMenu1.isSetBtn = false;
            string djlx=txt_djlx.SelectedText.ToString();
            string ywlx=txt_ywlx.SelectedText.ToString();
            string dbfx=txt_ftransferdirect.SelectedText.ToString();
            string sqOrg = txt_sqOrg.GetId();
            string dblx = txt_dblx.SelectedText.ToString();
            string dchzlx=txt_dchzlx.SelectedText.ToString();
            string drhzlx=txt_drhzlx.SelectedText.ToString();
            if (txt_djlx.SelectedIndex<=0)
            string djlx = txt_fBillTypeID.Text.ToString();
            string ywlx = txt_fBusinessType.Text.ToString();
            string dbfx = txt_fTransferDirect.Text.ToString();
            string sqOrg = txt_fapporgid.GetId();
            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_fTransferDirect.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择单据类型!");
                txt_djlx.Focus();
                return;
            }
            if (txt_ftransferdirect.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调拨方向!");
                txt_ftransferdirect.Focus();
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择调拨方向!");
                txt_fTransferDirect.Focus();
                return;
            }
            if (string.IsNullOrEmpty(sqOrg))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择申请组织!");
                txt_sqOrg.Focus();
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择申请组织!");
                txt_fapporgid.Focus();
                return;
            }
            if (txt_dchzlx.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调出货主类型!");
                txt_dchzlx.Focus();
                return;
            }
            if (txt_drhzlx.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调入货主类型!");
                txt_drhzlx.Focus();
                return;
            }
            //if (txt_fOwnerTypeIdHead.SelectedIndex <= 0)
            //{
            //    Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调出货主类型!");
            //    txt_fOwnerTypeIdHead.Focus();
            //    return;
            //}
            //if (txt_fOwnerTypeInIdHead.SelectedIndex <= 0)
            //{
            //    Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调入货主类型!");
            //    txt_fOwnerTypeInIdHead.Focus();
            //    return;
            //}
            var _obj = new
            {
                guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建
                //inCkId = _inCkId,//出仓
                //inRkId = _inRkId,//入库
                inDjlx = txt_djlx.Text.Trim(),//单据类型
                inDbfx = txt_ftransferdirect.Text.Trim(),//调拨方向
                inRemark = txt_remark.Text.Trim(),//备注
                djlx = djlx,//单据类型
                ywlx = ywlx,//业务类型
                dbfx = dbfx,//调拨方向
                sqOrg = sqOrg,//审请组织
                dblx = dblx,//调拨类型
                dchzlx = dchzlx,//调出货主类型
                drhzlx = drhzlx,//调入货主类型
                inRemark = txt_fRemarks.Text.Trim(),//备注
                list = new List<dynamic>(),
            };
            gvMx1.CloseEditor();
            gvMx1.PostEditor();
            gvMx1.UpdateCurrentRow();
            if (gvMx1.DataRowCount <= 0)
            {
@@ -300,12 +329,48 @@
                        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
                    {
                        Guid = _guid,
                        ItemId = (row["itemId"].ToString()),
                        Sqsl = (row["shNum"].ToString()),
                        Bz = (row["remark"].ToString()),
                        dczz = (row["dcOrgGuid"].ToString()),
                        dcck = (row["dcCkGuid"].ToString()),
                        drzz = (row["drOrgGuid"].ToString()),
                        drck = (row["drCkGuid"].ToString()),
                        dchz = (row["dcHzGuid"].ToString()),
                        drhz = (row["drHzGuid"].ToString()),
                    });
                }
            }
@@ -313,21 +378,24 @@
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
                {
                    ToolBox.MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg);
                    lbGuid.Text = _rtn.rtnData.outGuid;
                    txt_billno.Text = _rtn.rtnData.outNo;
                    txt_fBillNo.Text = _rtn.rtnData.outNo;
                    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);
                }
                else
                    ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
@@ -340,7 +408,7 @@
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_billno, gridView1);
                lbGuid, txt_fBillNo, gridView1);
            toolBarMenu1.guidKey = rowGuid;
        }
        /// <summary>
@@ -350,7 +418,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
@@ -360,16 +428,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;//当前页
@@ -393,7 +461,7 @@
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            var _obj = new
@@ -410,7 +478,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"])
@@ -424,6 +492,7 @@
                        gcMx1.DataSource = dt;
                        gcMx1.ForceInitialize();
                        gvMx1.BestFitColumns();
                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
                    }
                    else
                    {
@@ -431,11 +500,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);
            }
        }
@@ -476,13 +545,14 @@
                case 0:
                    strMsg = "反审核";
                    break;
            };
            }
            ;
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billno, gridView1, "billno");
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?"))
@@ -498,36 +568,51 @@
                    _webServiceName + "EditModelSubmit",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
                {
                    MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString());
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                    {
                        getModel(lbGuid.Text.Trim());
                    }
                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
                    gridView1.FocusedRowHandle = rowHandle;
                    UtilityHelper.SetCheckIco(gridView1, "shState", "shBy", "shDate", picCheckBox, this, _inFieldValue.ToString());
                    UtilityHelper.SetCheckIco(gridView1, "chkStatus", "FAPPROVEBY", "FAPPROVEDATE", picCheckBox, this, _inFieldValue.ToString());
                }
                else
                    MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
        /// 选择物料
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemSearchLookUpEdit1_EditValueChanged(object sender, EventArgs e)
        {
            SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit;
            DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow();
            gvMx1.SetFocusedRowCellValue("itemNo", SelectedDataRow["itemNo"].ToString());
            gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"].ToString());
            gvMx1.SetFocusedRowCellValue("itemMpdel", SelectedDataRow["itemModel"].ToString());
            gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"].ToString());
            gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"].ToString());
            gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString());
            gvMx1.CloseEditor();
            gvMx1.PostEditor();
            gvMx1.UpdateCurrentRow();
        }
        /// <summary>
        /// 删除物料
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var rowhandle = gvMx1.FocusedRowHandle;
@@ -557,13 +642,15 @@
                    var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                    if (_rtn.rtnCode > 0)
                    {
                        if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
                        MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg);
                        getModel(lbGuid.Text);
                    }
                    MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                    else
                    MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
                }
                catch (Exception ex)
                {
                    MsgHelper.Warning("提示:" + ex.Message);
                    MsgHelper.ShowError("提示:" + ex.Message);
                }
            }
        }
@@ -600,17 +687,13 @@
            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))
            {
                MsgHelper.Warning("提示:请先选择调出组织!");
                MsgHelper.ShowError("提示:请先选择调出组织!");
                return;
            };
            }
            ;
            SelectCk frm = new SelectCk(strOrgGuid);
            frm.UpdateParent += (ss, ee) =>
            {
@@ -634,15 +717,17 @@
            var dr = gvMx1.GetDataRow(rowhandle);
            if (dr["dcCkGuid"] == null)
            {
                MsgHelper.Warning("提示:请先选择调出仓库!");
                MsgHelper.ShowError("提示:请先选择调出仓库!");
                return;
            };
            }
            ;
            var strCkGuid = dr["dcCkGuid"].ToString();
            if (string.IsNullOrEmpty(strCkGuid))
            {
                MsgHelper.Warning("提示:请先选择调出仓库!");
                MsgHelper.ShowError("提示:请先选择调出仓库!");
                return;
            };
            }
            ;
            SelectCw frm = new SelectCw(strCkGuid);
            frm.UpdateParent += (ss, ee) =>
            {
@@ -685,17 +770,13 @@
            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.ShowError("提示:请先选择调入组织!");
                return;
            };
            }
            ;
            SelectCk frm = new SelectCk(strOrgGuid);
            frm.UpdateParent += (ss, ee) =>
            {
@@ -719,15 +800,17 @@
            var dr = gvMx1.GetDataRow(rowhandle);
            if (dr["drCkGuid"] == null)
            {
                MsgHelper.Warning("提示:请先选择调入仓库!");
                MsgHelper.ShowError("提示:请先选择调入仓库!");
                return;
            };
            }
            ;
            var strCkGuid = dr["drCkGuid"].ToString();
            if (string.IsNullOrEmpty(strCkGuid))
            {
                MsgHelper.Warning("提示:请先选择调入仓库!");
                MsgHelper.ShowError("提示:请先选择调入仓库!");
                return;
            };
            }
            ;
            SelectCw frm = new SelectCw(strCkGuid);
            frm.UpdateParent += (ss, ee) =>
            {
@@ -747,14 +830,14 @@
        private void rptDrHz_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var rowhandle = gvMx1.FocusedRowHandle;
            if (rowhandle < 0)
                return;
            int _drhzlx = txt_drhzlx.SelectedIndex;
            if (_drhzlx <= 0)
            {
                MsgHelper.Warning("提示:请先选择调入货主类型!");
                return;
            }
            //if (rowhandle < 0)
            //    return;
            int _drhzlx = txt_fOwnerTypeInIdHead.SelectedIndex;
            //if (_drhzlx <= 0)
            //{
            //    MsgHelper.Warning("提示:请先选择调入货主类型!");
            //    return;
            //}
            SelectHz frm = new SelectHz("", _drhzlx.ToString());
            frm.UpdateParent += (ss, ee) =>
            {
@@ -762,6 +845,7 @@
                lst = ee.DynamicList;
                gvMx1.SetFocusedRowCellValue("drHz", lst[0].name);
                gvMx1.SetFocusedRowCellValue("drHzGuid", lst[0].guid);
            };
            frm.ShowDialog();
        }
@@ -774,14 +858,14 @@
        private void rptDcHz_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var rowhandle = gvMx1.FocusedRowHandle;
            if (rowhandle < 0)
                return;
            int _drhzlx = txt_dchzlx.SelectedIndex;
            if (_drhzlx <= 0)
            {
                MsgHelper.Warning("提示:请先选择调出货主类型!");
                return;
            }
            //if (rowhandle < 0)
            //    return;
            int _drhzlx = txt_fOwnerTypeIdHead.SelectedIndex;
            //if (_drhzlx <= 0)
            //{
            //    MsgHelper.Warning("提示:请先选择调出货主类型!");
            //    return;
            //}
            SelectHz frm = new SelectHz("", _drhzlx.ToString());
            frm.UpdateParent += (ss, ee) =>
            {