lu
2025-01-14 1338d3cf9734277d9d94569a82e4e2de8424cda1
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -1,5 +1,4 @@
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.Base.ViewInfo;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -30,8 +29,6 @@
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            //toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
            //toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "qt015", "", (value) =>
            {
@@ -46,10 +43,10 @@
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            txt_qt011.getSuppler("");
            txt_qt008.getSuppler("");
            txt_qt018.getSuppler("");
            //设置仓库选择
            this.txt_qt011.EditChanged += (s, e) =>
            this.txt_qt008.EditChanged += (s, e) =>
            {
            };
@@ -157,15 +154,6 @@
            _filterList = e.FilterList;
            getPageList(1);
        }
        private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e)
        {
        }
        private void ToolBarMenu1_btnReportClick(object sender, EventArgs e)
        {
        }
        /// <summary>
        /// 取消事件
        /// </summary>
@@ -257,7 +245,17 @@
                return;
            }
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
            if (xtraTabControl1.SelectedTabPageIndex == 1)
            {
                getModel(rowGuid);
            }
            else
            {
                List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                gvList.Add(gvMx1);
                gvList.Add(gvMx2);
                UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList);
            }
        }
        /// <summary>
        /// 新增事件
@@ -282,7 +280,7 @@
        {
            toolBarMenu1.isSetBtn = false;
            string inGys = txt_qt018.GetId();
            string inCjId = txt_qt011.GetId();
            string inCjId = txt_qt008.GetId();
            if (string.IsNullOrEmpty(inGys))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择供应商!");
@@ -292,21 +290,23 @@
            if (string.IsNullOrEmpty(inCjId))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择仓库!");
                txt_qt011.Focus();
                txt_qt008.Focus();
                return;
            }
            var _obj = new
            {
                guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建
                inRklb = txt_qt003.Text.Trim(),//备注
                inYwlx = txt_qt004.Text.Trim(),//业务类型
                inRkfs = txt_qt019.Text.Trim(),//入库方式
                inRklx = txt_qt020.Text.Trim(),//入库类型
                inGys = inGys,//供应商
                inCjId = inCjId,//入库仓库
                inDepart = txt_qt009.GetId(),//申请部门
                inXsdh = txt_qt021.Text.Trim(),//销售单号
                kcZz = txt_qt022.GetId(),//库存组织
                kcBm = txt_qt009.GetId(),//库存部门
                kcGys = txt_qt018.GetId(),//库存供应商
                kcCk = txt_qt008.GetId(),//库存供应商
                inRkyy = txt_qt010.Text.Trim(),//入库原因
                djLx = txt_qt003.Text.Trim(),//单据类型
                kcfx = txt_qt019.Text.Trim(),//库存方向
                hzlx = txt_qt023.Text.Trim(),//货主类型
                hzzz = txt_qt024.GetId(),//货主组织
                hzkh = txt_qt025.GetId(),//货主客户
                hzbm = txt_qt026.GetId(),//货主部门
                list = new List<dynamic>(),
            };
            gvMx1.CloseEditor();
@@ -586,10 +586,51 @@
                txtWlid.Text = row["itemId"].ToString();
                txtWlgg.Text = row["qd004"].ToString();
                txtWlmc.Text = row["qd003"].ToString();
                txtQuantity.Text = row["qd007"].ToString();//申请总量
                txtYdy.Text = row["YDYNUM"].ToString();//已打印总量
                kyPrtQty.Text = row["KDYNUM"].ToString();//可打印总量
                //txtQuantity.Text = row["qd007"].ToString();//申请总量
                //txtYdy.Text = row["YDYNUM"].ToString();//已打印总量
                //kyPrtQty.Text = row["KDYNUM"].ToString();//可打印总量
            }
        }
        /// <summary>
        /// 移出条码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var rowhandle = gvMx2.FocusedRowHandle;
            if (rowhandle < 0)
                return;
            if (e.Button.Index == 0)
            {
                var dr = gvMx2.GetDataRow(rowhandle);
                var mxGuid = dr["guid"].ToString();
                if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?"))
                    return;
                var _obj = new
                {
                    mxGuid = mxGuid,
                    inType = "dhtm"
                };
                try
                {
                    var strJson = UtilityHelper.HttpPost("",
                        _webServiceName + "DeleteBarcode",
                        JsonConvert.SerializeObject(_obj));
                    var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                    if (_rtn.rtnCode > 0)
                    {
                        if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
                    }
                    MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                }
                catch (Exception ex)
                {
                    MsgHelper.Warning("提示:" + ex.Message);
                }
            }
        }
    }
}